@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Noto+Serif+SC:wght@500;600;700&display=swap");
:root {
  --ink: #20211f;
  --muted: #77776f;
  --paper: #f7f5ef;
  --card: #fffdf8;
  --line: #dfddd5;
  --accent: #e6f45b;
  --accent-ink: #41451b;
  --serif: "Noto Serif SC", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "DM Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  transition: 0.3s;
}
body.dark {
  --ink: #eeeede;
  --muted: #a6a69b;
  --paper: #20211f;
  --card: #2c2d29;
  --line: #474840;
  --accent: #d9ea4f;
  --accent-ink: #30340f;
}
.topbar {
  height: 76px;
  padding: 0 clamp(22px, 6vw, 92px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 18px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font: 500 13px var(--mono);
  letter-spacing: -3px;
  padding-right: 3px;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar .language-switch {
  margin: 0;
  transform: scale(0.86);
  transform-origin: left center;
}
.topbar nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  margin-right: 30px;
}
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.icon-btn {
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}
.hero {
  text-align: center;
  padding: 30px 20px 58px;
}
.eyebrow {
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 12px;
}
.eyebrow span {
  color: #b1bd2c;
  margin-left: 6px;
}
h1 {
  font: 700 clamp(34px, 5vw, 58px)/1.05 var(--serif);
  letter-spacing: -0.07em;
  margin: 0;
  white-space: nowrap;
}
h1 br {
  display: none;
}
h1 em {
  font-style: normal;
  color: #a8b63d;
}
.lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0 20px;
  white-space: nowrap;
}
.lede br.desktop {
  display: none;
}
.language-switch {
  display: inline-flex;
  background: #eae8e0;
  padding: 3px 8px 3px 11px;
  border-radius: 14px;
  margin-bottom: 34px;
  align-items: center;
  cursor: pointer;
}
.dark .language-switch {
  background: #34352f;
}
.language-switch select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  min-width: 106px;
  padding: 8px 22px 8px 0;
  font: 500 13px var(--sans);
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 9px) 50%, calc(100% - 5px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.language-switch select:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.practice-wrap {
  width: min(520px, 100%);
  margin: auto;
  text-align: left;
}
.status-row,
.progress {
  display: none;
}
.status-row {
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
  color: var(--muted);
  margin-bottom: 9px;
}
.progress {
  height: 3px;
  background: var(--line);
  border-radius: 4px;
  margin-bottom: 13px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 3.3%;
  background: var(--ink);
  transition: width 0.3s;
}
.twist-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  min-height: 320px;
  padding: 23px 25px 18px;
  box-shadow: 0 16px 40px #393b2010;
  user-select: none;
  touch-action: pan-y;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.card-top,
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.difficulty {
  font: 500 11px var(--mono);
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 6px 9px;
  border-radius: 5px;
}
.favorite {
  font-size: 25px;
  line-height: 1;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.favorite.saved {
  color: #c2cf3e;
}
.card-body {
  padding: 40px 6px 30px;
  min-height: 215px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quote-mark {
  font: 700 54px/0.5 var(--serif);
  color: var(--accent-ink);
  height: 28px;
}
.card-body p {
  font: 600 25px/1.55 var(--serif);
  letter-spacing: -0.03em;
  margin: 11px 0;
}
.translation {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.card-foot {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  color: var(--muted);
  font: 11px var(--mono);
}
.drag-hint {
  opacity: 0.65;
}
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0 12px;
}
.round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.shuffle {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: 22px;
  padding: 12px 19px;
  font: 500 13px var(--sans);
  cursor: pointer;
}
.tip {
  text-align: center;
  color: var(--muted);
  font: 11px var(--mono);
}
kbd {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 5px;
  background: var(--card);
}
.features {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 30px 90px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}
.feature-icon {
  font-size: 24px;
  color: #a8b63d;
}
.features h3 {
  font: 600 19px var(--serif);
  margin: 15px 0 8px;
}
.features p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
.features > div {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px clamp(22px, 6vw, 92px);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 11px var(--mono);
}
@media (max-width: 700px) {
  .topbar {
    height: 64px;
  }
  .top-left {
    gap: 10px;
  }
  .topbar .language-switch {
    transform: scale(0.76);
    margin-right: -24px;
  }
  .topbar nav {
    display: none;
  }
  .hero {
    padding: 24px 16px 42px;
  }
  .desktop {
    display: none;
  }
  .features {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 60px;
  }
  .twist-card {
    min-height: 300px;
  }
  h1 {
    font-size: clamp(24px, 7vw, 34px);
  }
  .lede {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card-body p {
    font-size: 22px;
  }
  footer {
    display: block;
    line-height: 2;
  }
}

/* Progress metadata is intentionally hidden for a distraction-free card. */
.status-row,
.progress {
  display: none !important;
}

.seo-copy {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 30px 90px;
}
.seo-copy h2 {
  font: 600 28px var(--serif);
  letter-spacing: -0.04em;
  margin: 0 0 14px;
}
.seo-copy > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 24px;
}
.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq summary {
  cursor: pointer;
  font: 500 15px var(--serif);
}
.faq details p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 10px 0 0;
}

.feedback-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  padding: 11px 16px;
  font: 500 13px var(--sans);
  cursor: pointer;
  box-shadow: 0 8px 24px #0002;
}
.feedback-fab span {
  margin-left: 5px;
}
.feedback-backdrop {
  position: fixed;
  inset: 0;
  background: #17181266;
  z-index: 30;
  backdrop-filter: blur(3px);
}
.feedback-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100vw - 32px));
  z-index: 31;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px #0003;
}
.feedback-panel[hidden],
.feedback-backdrop[hidden] {
  display: none;
}
.feedback-close {
  position: absolute;
  right: 16px;
  top: 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}
.feedback-panel h2 {
  font: 600 27px var(--serif);
  letter-spacing: -0.04em;
  margin: 0 0 8px;
}
.feedback-lede {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 22px;
}
.feedback-panel label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0 7px;
}
.feedback-panel label span {
  color: #ad5d43;
}
.feedback-panel input,
.feedback-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  font: 13px var(--sans);
  outline: none;
}
.feedback-panel textarea {
  resize: vertical;
  min-height: 110px;
}
.feedback-panel input:focus,
.feedback-panel textarea:focus {
  border-color: #a8b63d;
  box-shadow: 0 0 0 3px #a8b63d22;
}
.feedback-submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px;
  margin-top: 18px;
  font: 600 13px var(--sans);
  cursor: pointer;
}
.feedback-submit span {
  float: right;
  font-size: 18px;
  line-height: 12px;
}
.feedback-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.feedback-status {
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 0;
  color: var(--muted);
}
.feedback-status.error {
  color: #ad5d43;
}
.feedback-status.success {
  color: #667522;
}
@media (max-width: 700px) {
  .feedback-fab {
    right: 16px;
    bottom: 16px;
  }
  .feedback-panel {
    right: 16px;
    bottom: 16px;
    padding: 24px;
  }
}
.topbar {
  gap: 24px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.topbar .language-switch {
  margin: 0;
  transform: none;
}
.topbar nav {
  display: flex;
  gap: 26px;
  margin: 0;
}
.icon-btn {
  border-radius: 10px;
  padding: 7px 9px;
  transition: background 0.2s;
}
.icon-btn:hover {
  background: var(--line);
}
.language-switch {
  border-radius: 12px;
}
@media (max-width: 700px) {
  .top-actions {
    gap: 8px;
  }
  .topbar nav {
    display: none;
  }
  .language-switch select {
    min-width: 96px;
  }
}
