.link {
  color: var(--w);
  text-decoration: none;
}
.profile-page {
  max-width: 820px;
  margin: 60px auto;
}
.auth > p {
  max-width: 560px;
  margin-top: 16px;
  color: var(--mut);
}
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}
.auth .panel {
  display: grid;
  gap: 12px;
}
.auth label {
  display: grid;
  gap: 6px;
  color: var(--mut);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.auth input {
  padding: 11px;
  color: var(--w);
  border: 1px solid #554063;
  border-radius: 9px;
  background: #0e0b14;
}
.auth button {
  margin-top: 8px;
}
.profile-card,
.history {
  padding: 30px;
  border: 1px solid #5b4370;
  border-radius: 22px;
  background: linear-gradient(145deg, #211530, #100d18);
}
.profile-card p,
.history p {
  margin-top: 10px;
  color: var(--mut);
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 30px 0;
}
.profile-stats div {
  padding: 16px;
  background: #f1ede5;
}
.profile-stats b,
.profile-stats small {
  display: block;
}
.profile-stats b {
  color: #17131a;
  font-size: 24px;
}
.profile-stats small {
  color: #17131a;
}
.profile-top-answers {
  --top-answer-control-size: clamp(10px, 1vw, 18px);
  --top-answer-control-edge: clamp(5px, .6vw, 11px);
  --top-answer-control-gap: clamp(2px, .3vw, 5px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 24px);
  margin: 24px 0 30px;
}
.profile-top-answer {
  display: flex;
  position: relative;
  flex-direction: column;
  width: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 5 / 7;
  padding: clamp(10px, 1.15vw, 22px);
  overflow: hidden;
  color: #17131a;
  border: 2px solid #17131a;
  border-radius: 1px;
  background: #f1ede5;
  box-shadow: 7px 7px 0 #17131a;
}
.profile-top-answer-preview {
  position: absolute;
  z-index: 1;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.profile-top-answer > small {
  position: relative;
  z-index: 0;
  display: block;
  min-width: 0;
  padding-right: calc(
    (var(--top-answer-control-size) * 2) +
    var(--top-answer-control-gap) +
    var(--top-answer-control-edge)
  );
  color: #625c64;
  font-size: clamp(6px, .52vw, 9px);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.profile-top-answer-pin {
  position: absolute;
  z-index: 2;
  top: var(--top-answer-control-edge);
  right: var(--top-answer-control-edge);
  display: grid;
  place-items: center;
  width: var(--top-answer-control-size);
  height: var(--top-answer-control-size);
  padding: 0;
  color: #17131a;
  border: 0;
  background: transparent;
  line-height: 1;
  cursor: pointer;
}
.profile-top-answer-delete {
  position: absolute;
  z-index: 2;
  top: var(--top-answer-control-edge);
  right: calc(
    var(--top-answer-control-edge) +
    var(--top-answer-control-size) +
    var(--top-answer-control-gap)
  );
  display: grid;
  place-items: center;
  width: var(--top-answer-control-size);
  height: var(--top-answer-control-size);
  padding: 0;
  color: #7d1d2f;
  border: 0;
  background: transparent;
  line-height: 1;
  cursor: pointer;
}
.profile-top-answer-delete svg {
  width: calc(var(--top-answer-control-size) * .72);
  height: calc(var(--top-answer-control-size) * .72);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}
.profile-top-answer-delete:hover {
  color: #a62d45;
}
.profile-top-answer-pin svg {
  width: calc(var(--top-answer-control-size) * .74);
  height: calc(var(--top-answer-control-size) * .74);
  transform: translateY(clamp(1px, .12vw, 2px));
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}
.profile-top-answer-pin.is-pinned {
  color: #7d1d2f;
}
.profile-top-answer p {
  position: relative;
  z-index: 0;
  margin: auto 0;
  color: #17131a;
  min-width: 0;
  min-height: 0;
  font-size: clamp(7px, 1.3vw, 22px);
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: pre-wrap;
}
.profile-top-answer mark {
  padding: 0;
  color: #7d1d2f;
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.profile-answer-preview {
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow: auto;
  padding: 30px 20px;
  background: radial-gradient(circle at 50% 20%, #25181d 0, #11100f 54%);
}
.profile-answer-preview-stage {
  width: min(100%, 420px);
  margin: 0 auto;
}
.profile-answer-preview-stage > .ghost {
  margin-bottom: 22px;
}
.profile-answer-preview-card-stage {
  position: relative;
}
.profile-answer-preview-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #8a2437;
  border: 1px solid #8a2437;
  border-radius: 50%;
  background: rgb(138 36 55 / 12%);
  transform: translateY(-50%);
}
.profile-answer-preview-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}
.profile-answer-preview-arrow:hover:not(:disabled) {
  background: rgb(138 36 55 / 22%);
}
.profile-answer-preview-arrow:disabled {
  opacity: .32;
  cursor: default;
}
#profile-answer-previous {
  right: calc(100% + 14px);
}
#profile-answer-next {
  left: calc(100% + 14px);
}
.profile-answer-preview-card {
  display: flex;
  box-sizing: border-box;
  flex-direction: column;
  width: 100%;
  height: min(calc(140vw - 56px), 588px);
  min-height: 0;
  overflow: hidden;
  aspect-ratio: 5 / 7;
  padding: clamp(36px, 6vw, 60px);
  color: #17131a;
  border: 2px solid #17131a;
  background: #f1ede5;
  box-shadow: 10px 10px 0 #17131a;
  text-align: left;
}
.profile-answer-preview-card .eyebrow {
  margin-bottom: 60px;
  color: #625c64;
}
.profile-answer-preview-answer {
  margin: auto 0;
  min-height: 0;
  min-width: 0;
  color: #17131a;
  font-size: clamp(36px, 6.5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: pre-wrap;
}
.profile-answer-preview-answer .answer-emphasis {
  color: #8a2437;
}
.answer-pair {
  white-space: nowrap;
}
.profile-answer-preview-site {
  margin-top: 60px;
  color: #625c64;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.profile-actions a {
  text-decoration: none;
}
.history {
  margin-top: 16px;
}
.history h2 {
  margin-top: 6px;
}
.history-list {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}
.history-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 9px;
  background: #160f21;
}
.history-list span {
  color: var(--mut);
}
.history-list b {
  color: var(--blue);
  font-size: 12px;
}
@media (max-width: 600px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .profile-page {
    margin: 35px auto;
  }
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-top-answers {
    gap: 6px;
  }
  .profile-top-answer {
    padding: 8px;
  }
  .profile-answer-preview-arrow {
    width: 38px;
    height: 38px;
  }
  #profile-answer-previous {
    right: 8px;
  }
  #profile-answer-next {
    left: 8px;
  }
  .history-list div {
    align-items: flex-start;
    flex-direction: column;
  }
}
