:root {
  --bg-top: #f6efe1;
  --bg-bottom: #e8dcc7;
  --panel: rgba(255, 250, 242, 0.88);
  --panel-strong: #fffaf2;
  --ink: #2e241c;
  --muted: #746455;
  --accent: #b5532f;
  --accent-deep: #8f3f21;
  --accent-soft: #efcfbb;
  --success: #2f7a56;
  --error: #b33c36;
  --shadow: 0 24px 60px rgba(63, 38, 16, 0.16);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 32%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(101, 73, 44, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 73, 44, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 90%);
  pointer-events: none;
}

.page-shell {
  position: relative;
  padding: 24px 16px 40px;
}

.app {
  width: min(100%, 720px);
  margin: 0 auto;
}

.hero,
.game-panel,
.wrongbook-panel,
.result-panel,
.punch-panel,
.modal-card {
  backdrop-filter: blur(16px);
}

.hero {
  padding: 20px 8px 24px;
}

.eyebrow,
.card-kicker,
.feedback-label,
.status-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.hero h1,
.result-panel h2,
.modal-card h2,
.word-display {
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
}

.hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
}

.hero-copy,
.result-copy,
.panel-copy,
.sentence-text,
.feedback-value {
  margin: 0;
  color: var(--ink);
  line-height: 1.75;
}

.hero-copy,
.result-copy,
.panel-copy {
  color: var(--muted);
}

.library-panel,
.game-panel,
.wrongbook-panel,
.result-panel,
.punch-panel {
  background: var(--panel);
  border: 1px solid rgba(125, 92, 64, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 8px 0 8px;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.library-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(181, 83, 47, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 248, 239, 0.92));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.library-card:hover,
.library-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(181, 83, 47, 0.35);
  box-shadow: 0 18px 28px rgba(143, 63, 33, 0.12);
}

.library-card.is-disabled {
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.library-card.is-total {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(181, 83, 47, 0.14), rgba(255, 248, 239, 0.96));
}

.library-card.is-wrongbook {
  background: linear-gradient(135deg, rgba(47, 122, 86, 0.12), rgba(255, 248, 239, 0.96));
}

.library-name {
  display: block;
  margin-bottom: 6px;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.library-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.library-mode-button {
  flex: 1 1 160px;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.library-mode-button:hover,
.library-mode-button:focus-visible {
  transform: translateY(-2px);
}

.library-mode-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.library-mode-button-primary {
  border: 0;
  color: #fff8f0;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 12px 22px rgba(143, 63, 33, 0.2);
}

.library-mode-button-secondary {
  border: 1px solid rgba(125, 92, 64, 0.2);
  color: var(--ink);
  background: rgba(255, 250, 242, 0.92);
}

.question-heading {
  display: grid;
  gap: 6px;
}

.question-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-pill {
  background: rgba(255, 247, 237, 0.92);
  border: 1px solid rgba(181, 83, 47, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.status-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  transition: transform 220ms ease, color 220ms ease;
}

.question-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 252, 247, 0.88));
  border-radius: var(--radius-lg);
  padding: 18px;
}

.word-display {
  margin: 8px 0 18px;
  font-size: clamp(2.8rem, 12vw, 4rem);
  line-height: 1;
}

.sentence-block {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(239, 207, 187, 0.33);
}

.sentence-source {
  margin-top: 8px;
}

.choice-panel {
  margin-top: 18px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-button {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 88px;
  border: 1px solid rgba(125, 92, 64, 0.2);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 250, 242, 0.96);
  color: var(--ink);
  text-align: left;
  font: inherit;
  line-height: 1.6;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(181, 83, 47, 0.34);
  box-shadow: 0 16px 26px rgba(143, 63, 33, 0.12);
}

.choice-button:disabled {
  cursor: default;
}

.choice-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: 999px;
  background: rgba(181, 83, 47, 0.12);
  color: var(--accent-deep);
  font-weight: 700;
}

.choice-text {
  flex: 1;
  padding-top: 2px;
}

.choice-button.is-selected {
  transform: translateY(-2px) scale(1.01);
}

.choice-button.is-correct {
  border-color: rgba(47, 122, 86, 0.45);
  background: rgba(47, 122, 86, 0.12);
  box-shadow: 0 16px 24px rgba(47, 122, 86, 0.12);
}

.choice-button.is-correct .choice-index {
  background: rgba(47, 122, 86, 0.16);
  color: var(--success);
}

.choice-button.is-wrong {
  border-color: rgba(179, 60, 54, 0.35);
  background: rgba(179, 60, 54, 0.08);
  animation: choice-shake 320ms ease-out;
}

.choice-button.is-wrong .choice-index {
  background: rgba(179, 60, 54, 0.12);
  color: var(--error);
}

.answer-form {
  margin-top: 18px;
}

.input-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.96rem;
  font-weight: 600;
}

textarea,
.feedback-input {
  width: 100%;
  resize: none;
  border: 1px solid rgba(125, 92, 64, 0.26);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea:focus,
.feedback-input:focus {
  outline: none;
  border-color: rgba(181, 83, 47, 0.75);
  box-shadow: 0 0 0 4px rgba(181, 83, 47, 0.12);
  transform: translateY(-1px);
}

.primary-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  margin-top: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #fff8f0;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 14px 24px rgba(143, 63, 33, 0.24);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(143, 63, 33, 0.28);
  filter: brightness(1.02);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  width: 100%;
  border: 1px solid rgba(125, 92, 64, 0.24);
  border-radius: 999px;
  padding: 15px 18px;
  margin-top: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.92);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(181, 83, 47, 0.35);
  background: rgba(255, 247, 237, 0.98);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.result-panel,
.punch-panel {
  text-align: center;
}

.result-panel h2 {
  margin: 14px auto 0;
  max-width: 10em;
  font-size: clamp(2.55rem, 8.8vw, 4.2rem);
  line-height: 1.14;
  letter-spacing: 0.01em;
}

.result-subtitle {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.55;
}

.result-score {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.result-copy {
  margin-top: 18px;
}

.wrong-summary {
  margin-top: 18px;
  margin-bottom: 8px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
  text-align: left;
}

.wrong-summary-title {
  margin: 0 0 10px;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: 1.2rem;
}

.wrong-list {
  display: grid;
  gap: 10px;
}

.wrong-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(246, 239, 225, 0.96);
  border: 1px solid rgba(125, 92, 64, 0.12);
}

.wrong-item-title {
  margin: 0 0 8px;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: 1.15rem;
}

.wrong-item-meta,
.wrong-item-answer {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.wrong-item-answer strong {
  color: var(--ink);
}

.wrongbook-summary-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(47, 122, 86, 0.1), rgba(255, 248, 239, 0.92));
  border: 1px solid rgba(47, 122, 86, 0.14);
}

.wrongbook-summary-count {
  margin: 0;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: 1.35rem;
}

.wrongbook-summary-meta {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.wrongbook-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.wrongbook-action-row .primary-button,
.wrongbook-action-row .secondary-button {
  flex: 1 1 200px;
}

.wrongbook-all {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
}

.punch-card {
  margin: 18px 0 14px;
  padding: 24px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 235, 156, 0.72), transparent 42%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(246, 236, 218, 0.96));
  border: 1px solid rgba(181, 83, 47, 0.14);
  box-shadow:
    0 22px 34px rgba(125, 92, 64, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.punch-kudos {
  margin: 0 0 10px;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
}

.punch-date,
.punch-streak {
  margin: 0;
  color: var(--muted);
}

.punch-quote {
  margin: 20px 0 0;
  padding: 18px 16px 0;
  border-top: 1px solid rgba(125, 92, 64, 0.12);
}

.punch-quote-text {
  margin: 0;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  line-height: 1.65;
  color: var(--ink);
}

.punch-quote-source {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

.punch-copy {
  max-width: 28rem;
  margin: 0 auto 8px;
}

.punch-panel .primary-button,
.punch-panel .secondary-button {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 36, 28, 0.46);
}

.modal-card {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 36px);
  background: var(--panel-strong);
  border-radius: var(--radius-xl);
  padding: 24px 20px 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card::after {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 116, 0.55), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.feedback-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(47, 122, 86, 0.12);
  color: var(--success);
}

.feedback-badge.is-wrong {
  background: rgba(179, 60, 54, 0.12);
  color: var(--error);
}

.is-celebrating .modal-card {
  animation: celebrate-in 540ms ease-out;
}

.is-celebrating .modal-card::after {
  opacity: 1;
  animation: burst-glow 720ms ease-out;
}

.is-celebrating .feedback-badge {
  animation: badge-bounce 520ms ease-out;
}

.is-celebrating #score-text {
  color: var(--success);
  transform: scale(1.08);
}

.is-encouraging .modal-card {
  animation: encourage-in 420ms ease-out;
}

.is-encouraging .feedback-badge {
  animation: badge-pulse 460ms ease-out;
}

.feedback-group + .feedback-group {
  margin-top: 14px;
}

.feedback-value {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(246, 239, 225, 0.92);
}

.feedback-word {
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: 1.6rem;
}

.feedback-form-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(246, 239, 225, 0.78);
  border: 1px solid rgba(125, 92, 64, 0.14);
  text-align: left;
}

.feedback-form-title {
  margin: 0;
  font-family: "STSong", "Songti SC", "Noto Serif SC", serif;
  font-size: 1.18rem;
}

.feedback-form-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.feedback-form {
  margin-top: 14px;
}

.feedback-quick-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.feedback-chip,
.feedback-toggle {
  border: 1px solid rgba(125, 92, 64, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.92);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.feedback-chip {
  padding: 8px 12px;
  font-size: 0.92rem;
}

.feedback-toggle {
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  text-align: left;
  font-size: 0.94rem;
  font-weight: 600;
}

.feedback-chip:hover,
.feedback-chip:focus-visible,
.feedback-toggle:hover,
.feedback-toggle:focus-visible {
  border-color: rgba(181, 83, 47, 0.35);
  background: rgba(255, 247, 237, 0.98);
}

.feedback-extra-fields {
  margin-top: 12px;
}

.feedback-form .input-label + .feedback-input,
.feedback-form .input-label + textarea {
  margin-top: 10px;
}

.feedback-form .input-label:not(:first-of-type) {
  margin-top: 14px;
}

.feedback-form .primary-button,
.feedback-form .secondary-button {
  margin-top: 12px;
}

.feedback-status {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(47, 122, 86, 0.12);
  color: var(--success);
  line-height: 1.6;
}

.feedback-status.is-error {
  background: rgba(179, 60, 54, 0.12);
  color: var(--error);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@keyframes celebrate-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  45% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes encourage-in {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  30% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes badge-bounce {
  0% {
    transform: scale(0.88);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes burst-glow {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }

  30% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes badge-pulse {
  0% {
    transform: scale(0.94);
  }

  50% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes choice-shake {
  0% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-4px);
  }

  60% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

@media (min-width: 720px) {
  .page-shell {
    padding: 40px 20px 56px;
  }

  .library-panel,
  .game-panel,
  .result-panel,
  .punch-panel {
    padding: 24px;
  }

  .question-card {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 16px 12px 28px;
  }

  .hero {
    padding: 8px 2px 18px;
  }

  .hero h1 {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: clamp(1.85rem, 9vw, 2.55rem);
    line-height: 1.12;
  }

  .hero-copy,
  .result-copy,
  .panel-copy,
  .sentence-text,
  .feedback-value,
  .library-meta,
  .wrong-item-meta,
  .wrong-item-answer {
    line-height: 1.68;
    font-size: 0.96rem;
  }

.library-panel,
.game-panel,
.wrongbook-panel,
.result-panel,
.punch-panel {
  padding: 14px;
  border-radius: 22px;
}

  .panel-heading {
    margin-bottom: 14px;
  }

  .panel-heading h2 {
    font-size: clamp(1.4rem, 7.5vw, 1.9rem);
    line-height: 1.18;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .library-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  .library-mode-button {
    flex: initial;
    width: 100%;
    min-height: 58px;
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .library-card,
  .question-card,
  .wrong-summary,
  .punch-card,
  .modal-card {
    padding: 14px;
  }

  .feedback-group + .feedback-group {
    margin-top: 10px;
  }

  .feedback-value {
    padding: 11px 12px;
  }

  .punch-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .punch-kudos {
    margin-bottom: 8px;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }

  .punch-quote {
    margin-top: 16px;
    padding: 14px 10px 0;
  }

  .punch-quote-text {
    font-size: clamp(1.14rem, 5.6vw, 1.42rem);
    line-height: 1.58;
  }

  .punch-quote-source {
    margin-top: 8px;
    font-size: 0.84rem;
  }

  .feedback-form-panel {
    margin-top: 12px;
    padding: 12px;
  }

  .feedback-form-title {
    font-size: 1.05rem;
  }

  .feedback-form-copy,
  .feedback-status {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .feedback-form {
    margin-top: 10px;
  }

  .feedback-quick-reasons {
    gap: 6px;
    margin-top: 8px;
  }

  .feedback-chip {
    padding: 7px 10px;
    font-size: 0.86rem;
  }

  .feedback-toggle {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .feedback-form .input-label + .feedback-input,
  .feedback-form .input-label + textarea {
    margin-top: 8px;
  }

  .feedback-form .input-label:not(:first-of-type) {
    margin-top: 10px;
  }

  .feedback-form .primary-button,
  .feedback-form .secondary-button {
    margin-top: 10px;
  }

  .library-name {
    font-size: 1.18rem;
  }

  .library-card.is-total {
    grid-column: auto;
  }

  .status-pill {
    padding: 10px 12px;
  }

  .status-pill strong {
    font-size: 0.98rem;
    white-space: nowrap;
  }

  .word-display {
    margin-bottom: 14px;
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  .choice-button {
    min-height: 76px;
    padding: 12px 14px;
  }

  .sentence-block {
    padding: 12px 14px;
  }

  textarea,
  .primary-button,
  .secondary-button,
  .feedback-input {
    font-size: 0.96rem;
  }

  textarea,
  .feedback-input {
    padding: 11px 13px;
  }

  .primary-button,
  .secondary-button {
    padding: 13px 16px;
  }

  .result-score,
  .punch-score {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .result-panel h2 {
    margin-top: 12px;
    max-width: 9em;
    font-size: clamp(2.2rem, 10vw, 3rem);
    line-height: 1.16;
  }

  .result-subtitle {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .wrong-item-title,
  .feedback-word {
    font-size: 1.05rem;
  }

  .modal {
    padding: 12px;
    place-items: start center;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
  }
}
