@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bark: #73464c;
  --rose: #ab5675;
  --blossom: #ee6a7c;
  --petal: #ffa7a5;
  --sun: #ffe07e;
  --cream: #ffe7d6;
  --mint: #72dcbb;
  --teal: #34acba;
  --bg: #fff8f4;
  --bg-accent-1: rgba(255, 224, 126, 0.45);
  --bg-accent-2: rgba(52, 172, 186, 0.35);
  --card: rgba(255, 231, 214, 0.96);
  --panel: rgba(255, 247, 239, 0.92);
  --text: #3d2a2f;
  --muted: #7b5a64;
  --helper: #9d6f7d;
  --accent: var(--teal);
  --accent-soft: var(--mint);
  --accent-strong: var(--blossom);
  --border: rgba(115, 70, 76, 0.22);
  --frost: rgba(255, 231, 214, 0.8);
  --shadow: 0 22px 0 rgba(115, 70, 76, 0.12);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(255, 231, 214, 0.85), rgba(255, 224, 126, 0.5)),
    radial-gradient(circle at 12% 18%, var(--bg-accent-1), transparent 32%),
    radial-gradient(circle at 84% 20%, var(--bg-accent-2), transparent 38%),
    repeating-linear-gradient(0deg, rgba(171, 86, 117, 0.08), rgba(171, 86, 117, 0.08) 6px, transparent 6px, transparent 12px),
    linear-gradient(180deg, #fff8f4 0%, #ffe7d6 60%, #ffede0 100%);
  color: var(--text);
  padding: 36px 24px 56px;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.orb {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 18px;
  filter: blur(60px);
  opacity: 0.2;
  z-index: 0;
}

.orb-one {
  background: var(--petal);
  top: -40px;
  left: -10px;
}

.orb-two {
  background: var(--mint);
  bottom: -50px;
  right: 40px;
}

.gridlines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(171, 86, 117, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 172, 186, 0.12) 1px, transparent 1px);
  background-size: 100px 100px;
  mask-image: radial-gradient(circle at 30% 40%, rgba(0, 0, 0, 0.3), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.pixel-garden {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.pixel-flower {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--sun);
  box-shadow: 0 0 0 3px var(--petal), -12px 0 0 0 var(--petal), 12px 0 0 0 var(--petal), 0 -12px 0 0 var(--petal),
    0 12px 0 0 var(--petal), -12px -12px 0 0 var(--mint), 12px -12px 0 0 var(--mint), -12px 12px 0 0 var(--mint),
    12px 12px 0 0 var(--mint), 0 0 0 6px #3d2328;
  border-radius: 2px;
  opacity: 0.65;
}

.flower-one {
  top: 18%;
  left: 8%;
  transform: scale(1.8) rotate(4deg);
}

.flower-two {
  top: 36%;
  right: 12%;
  transform: scale(1.5) rotate(-6deg);
}

.flower-three {
  bottom: 18%;
  left: 18%;
  transform: scale(2.1) rotate(8deg);
}

.flower-four {
  bottom: 10%;
  right: 22%;
  transform: scale(1.3) rotate(2deg);
}

.page-shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  z-index: 2;
}

.page-footer {
  margin: 32px auto 0;
  max-width: 1180px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(255, 231, 214, 0.75);
  border: 2px dashed var(--border);
  border-radius: 12px;
  color: var(--helper);
}

main {
  max-width: 1180px;
  margin: 0 auto;
}

.app-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.hero {
  background: linear-gradient(135deg, rgba(255, 231, 214, 0.9), rgba(255, 224, 126, 0.4)),
    linear-gradient(135deg, rgba(52, 172, 186, 0.12), rgba(171, 86, 117, 0.12));
  border: 4px solid #3d2328;
  box-shadow: var(--shadow), 0 12px 24px rgba(61, 42, 47, 0.12);
  padding: 24px 26px;
  position: relative;
  isolation: isolate;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 6px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, var(--petal), var(--petal) 6px, var(--sun) 6px, var(--sun) 12px);
  color: #3d2328;
  font-family: "Press Start 2P", monospace;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 0 #3d2328;
  border: 3px solid #3d2328;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose);
  font-size: 0.75rem;
  margin: 0 0 4px;
}

h1 {
  margin: 0;
  letter-spacing: -0.7px;
  color: #3d2328;
  font-family: "Press Start 2P", monospace;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  font-size: 1.05rem;
}

.card {
  background: var(--card);
  border: 4px solid #3d2328;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow), 0 10px 0 rgba(52, 34, 38, 0.18);
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(171, 86, 117, 0.35);
  border-radius: 10px;
  pointer-events: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(52, 172, 186, 0.16);
  border: 2px solid rgba(61, 35, 40, 0.28);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 900px) {
  .panel-grid {
    grid-template-columns: minmax(380px, 1.1fr) minmax(320px, 0.9fr);
  }
}

.panel {
  background: var(--panel);
  border: 3px solid #3d2328;
  border-radius: 12px;
  padding: 16px;
  box-shadow: inset 0 0 0 2px rgba(255, 224, 126, 0.35), inset 0 8px 0 rgba(255, 224, 126, 0.25);
}

.panel--primary {
  grid-column: 1 / -1;
  border-width: 4px;
  background: linear-gradient(180deg, #fff8f4 0%, rgba(255, 224, 126, 0.3) 100%);
  box-shadow: 0 14px 0 rgba(61, 35, 40, 0.12), inset 0 0 0 2px rgba(52, 172, 186, 0.18);
}

.panel--secondary {
  background: rgba(255, 247, 239, 0.85);
  border-style: dashed;
  border-color: rgba(61, 35, 40, 0.4);
  box-shadow: inset 0 0 0 2px rgba(171, 86, 117, 0.18);
}

.panel h3 {
  margin: 0 0 4px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.panel-header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.optional-pill {
  background: rgba(52, 172, 186, 0.12);
  border-color: rgba(61, 35, 40, 0.25);
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.helper {
  margin: 0;
  color: var(--helper);
  font-size: 0.92rem;
  line-height: 1.5;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

label input,
textarea,
select {
  background: #fff4e9;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.input-hero {
  font-size: 1.08rem;
  padding: 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 0 rgba(61, 35, 40, 0.08);
  background: linear-gradient(180deg, #fff7f1 0%, #ffe7d6 100%);
}

select,
select.dropdown {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--helper) 50%),
    linear-gradient(135deg, var(--helper) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
}

select[multiple].multi-select {
  min-height: 120px;
  padding-right: 28px;
  background: linear-gradient(180deg, #fff4e9 0%, #ffe7d6 100%);
  border-color: rgba(171, 86, 117, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

select[multiple].multi-select option {
  padding: 8px 10px;
  border-radius: 8px;
  margin: 2px 0;
}

select[multiple].multi-select option:checked {
  background: rgba(99, 102, 241, 0.16);
  color: var(--text);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 167, 165, 0.3);
  color: var(--text);
  border: 2px solid rgba(61, 35, 40, 0.22);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.chip.muted {
  background: #e2e8f0;
  color: var(--muted);
  border-color: transparent;
}

label input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(52, 172, 186, 0.25);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}


.pronoun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

fieldset {
  border: 2px solid rgba(61, 35, 40, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 167, 165, 0.12);
}

legend {
  padding: 0 8px;
  color: var(--rose);
  font-weight: 700;
}

.test-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.test-style {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #fff7f1;
  border: 2px solid rgba(61, 35, 40, 0.2);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 224, 126, 0.35);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.test-style:hover,
.test-style:focus-within {
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(52, 172, 186, 0.14);
  transform: translateY(-1px);
}

.test-style input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.test-style input[disabled] {
  pointer-events: none;
  opacity: 0.85;
}

.test-style input[disabled] + .test-style-copy .helper {
  color: #5f6d7a;
}

.test-style-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.test-style-title {
  font-size: 1rem;
  font-weight: 700;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.pill-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 247, 241, 0.75);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(61, 42, 47, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pill-option input {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(61, 35, 40, 0.22);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 126, 0.28);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pill-option span {
  font-weight: 700;
  font-size: 0.95rem;
}

.pill-option:hover {
  background: rgba(255, 247, 241, 0.95);
  border-color: rgba(61, 35, 40, 0.26);
}

.pill-option:focus-within {
  border-color: rgba(52, 172, 186, 0.7);
  box-shadow: 0 0 0 4px rgba(52, 172, 186, 0.16);
}

.pill-option input:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(52, 172, 186, 0.18);
}

.pill-option input:checked + span {
  color: var(--accent-strong);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
}

.primary {
  background: linear-gradient(135deg, var(--blossom), var(--petal));
  color: #3d2328;
  border: 3px solid #3d2328;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  min-width: 200px;
  box-shadow: 0 12px 0 #3d2328, 0 16px 26px rgba(171, 86, 117, 0.25);
}

.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.ghost {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.text-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.95rem;
}

.text-button:hover {
  color: var(--accent);
}

.hidden {
  display: none;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.test-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #b91c1c;
}

.ghost.danger:hover {
  border-color: #ef4444;
  color: #991b1b;
}

.label {
  color: var(--helper);
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0;
}

.counter {
  font-weight: 700;
  color: var(--accent-strong);
}

.trial-container {
  min-height: 220px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  font-size: 1.2rem;
  background: linear-gradient(180deg, #fff4e9 0%, #ffe7d6 100%);
  position: relative;
}

.trial-text {
  font-size: 1.4rem;
  line-height: 1.4;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

button.option {
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, #fff7f1, #ffe7d6);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.1s ease, border-color 0.2s ease;
}

button.option:hover,
button.option:focus {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.option-error {
  animation: flashRed 0.8s ease;
  border-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

button.option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #f8fafc 25%, #e2e8f0 100%);
  color: #94a3b8;
  transform: none;
  box-shadow: inset 0 0 0 2px rgba(148, 163, 184, 0.35);
}

.feedback-correct {
  animation: flashGreen 0.8s ease;
}

.feedback-incorrect {
  animation: flashRed 0.8s ease;
}

@keyframes flashGreen {
  0% {
    background-color: rgba(52, 211, 153, 0.25);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes flashRed {
  0% {
    background-color: rgba(248, 113, 113, 0.25);
  }
  100% {
    background-color: transparent;
  }
}

.test-footer {
  margin-top: 12px;
  color: var(--helper);
  text-align: right;
}

.dual-grid {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.number-stream {
  text-align: center;
}

.number-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 8px;
}

.pronoun-stream {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.dual-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  background: #fff7f1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}

.dual-progress-text {
  font-weight: 700;
  color: var(--helper);
}

.dual-progress-fill {
  width: 0;
  height: 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--teal), var(--mint));
  transition: width 160ms ease-out;
}

.dual-timer {
  margin: 8px 0 4px;
  color: var(--blossom);
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.summary-card {
  background: #fff7f1;
  border: 2px solid var(--border);
  padding: 12px;
  border-radius: 10px;
}

.summary-card--chart {
  background: #f6f5ff;
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-list li {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.4;
}

.stat-list small {
  display: block;
  color: var(--helper);
  margin-top: 4px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.chart {
  position: relative;
  padding: 14px 10px 10px;
  background: radial-gradient(circle at 16% 10%, rgba(255, 224, 126, 0.3), transparent 42%),
    linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(52, 172, 186, 0.12));
  border: 1px solid rgba(61, 42, 47, 0.1);
  border-radius: 12px;
  overflow: hidden;
  min-height: 180px;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 46px;
}

.chart-bars {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  min-height: 160px;
  width: 100%;
}

.chart-bar-track {
  width: 100%;
  height: 140px;
  border-radius: 12px 12px 10px 10px;
  background: linear-gradient(180deg, rgba(52, 172, 186, 0.18), rgba(124, 58, 237, 0.06));
  box-shadow: inset 0 0 0 1px rgba(61, 42, 47, 0.08), inset 0 -8px 18px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-end;
  padding: 6px;
}

.chart-bar-fill {
  width: 100%;
  border-radius: 10px 10px 8px 8px;
  background: linear-gradient(180deg, var(--accent), #3f168d);
  min-height: 18px;
  transition: height 0.2s ease;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.12), 0 12px 16px rgba(61, 42, 47, 0.18);
}

.chart-value {
  font-weight: 800;
  color: #1e1b4b;
  background: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(61, 42, 47, 0.12);
  box-shadow: 0 6px 16px rgba(61, 42, 47, 0.12);
}

.chart-label {
  font-size: 12px;
  color: var(--helper);
  text-align: center;
}

.chart-caption {
  margin: 0 0 6px;
  font-weight: 800;
  color: #1f2937;
}

.chart-guides {
  position: absolute;
  inset: 12px 10px 28px 10px;
  pointer-events: none;
}

.chart-guide {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(61, 42, 47, 0.12);
  font-size: 10px;
  color: rgba(61, 42, 47, 0.45);
  padding-top: 2px;
}

.heatmap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 8px;
  align-items: stretch;
}

.heatmap-row--header {
  color: var(--helper);
  font-size: 12px;
}

.heatmap-label {
  font-weight: 700;
}

.heatmap-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(52, 172, 186, calc(0.08 + (var(--heat) * 0.36)));
  color: #1f2937;
  border: 1px solid rgba(61, 42, 47, 0.1);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.05);
}

.heatmap-cell--label {
  background: rgba(61, 42, 47, 0.04);
  color: var(--helper);
  box-shadow: none;
}

.summary-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.saved-summary {
  margin: 20px 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.token-wrong {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.12);
  color: #312e81;
}

.token-dim {
  opacity: 0.65;
  cursor: not-allowed;
}

.dropdown {
  padding: 8px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
  min-width: 140px;
}

.dropdown.checked {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(52, 172, 186, 0.18);
}

.token.checked::after {
  content: "✓";
  color: #166534;
  font-weight: 900;
  margin-left: 6px;
}

.token.attention {
  border-color: #f59e0b;
  background: #fff7ed;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4);
}

.editing-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.completion-badge {
  background: #ecfdf3;
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #15803d;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
}

.completion-badge.hidden {
  display: none;
}

.feedback-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
}

.feedback-banner {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.12);
  border: 2px solid transparent;
}

.feedback-banner.correct {
  background: #ecfdf3;
  color: #166534;
  border-color: rgba(74, 222, 128, 0.45);
}

.feedback-banner.incorrect {
  background: #fef2f2;
  color: #991b1b;
  border-color: rgba(248, 113, 113, 0.45);
}

.feedback-actions {
  position: absolute;
  top: 68px;
  right: 12px;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 231, 214, 0.95);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(61, 42, 47, 0.16);
}

.feedback-actions .primary {
  min-width: 120px;
}

.feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 2px currentColor;
}

.mobile-controls {
  display: flex;
  gap: 12px;
}

.mobile-controls .option {
  flex: 1;
}

@media (max-width: 720px) {
  body {
    padding: 18px;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel {
    padding: 14px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .test-style-grid {
    grid-template-columns: 1fr;
  }

  .test-style {
    align-items: stretch;
  }

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

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions button {
    width: 100%;
  }

  .trial-text {
    font-size: 1.2rem;
  }
}
