:root {
  --primary: #c1ff72;
  --dark: #1f2a2e;
  --surface: #f4f8fa;
  --muted: #6b7a86;
  --border: #e0e6eb;
  --white: #ffffff;
  --font: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--dark);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 0% 0%, rgba(193, 255, 114, 0.2), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 100%, rgba(31, 42, 46, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.bg-blob {
  position: fixed;
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  left: -8%;
  top: -12%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 38% 40%, rgba(193, 255, 114, 0.75) 0%, rgba(193, 255, 114, 0.28) 28%, transparent 58%),
    radial-gradient(circle at 62% 48%, rgba(56, 189, 248, 0.45) 0%, rgba(56, 189, 248, 0.12) 32%, transparent 60%),
    radial-gradient(circle at 48% 62%, rgba(251, 200, 100, 0.35) 0%, transparent 52%);
  filter: blur(90px);
  opacity: 0.7;
  will-change: transform;
  transition: opacity 0.35s ease;
  /* soft falloff — no hard disk edge */
  mask-image:
    radial-gradient(circle at 45% 45%, #000 0%, #000 35%, transparent 72%),
    linear-gradient(to bottom, #000 0%, #000 50%, transparent 88%);
  mask-composite: intersect;
  -webkit-mask-image:
    radial-gradient(circle at 45% 45%, #000 0%, #000 35%, transparent 72%),
    linear-gradient(to bottom, #000 0%, #000 50%, transparent 88%);
  -webkit-mask-composite: source-in;
}

@media (prefers-reduced-motion: reduce) {
  .bg-blob {
    display: none;
  }

  .timer-chip.critical {
    animation: none;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  border: 1.5px solid var(--dark);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}

.lang-btn.active {
  background: var(--dark);
  color: #fff;
}

.top-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.session-chip {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--dark);
  background: rgba(193, 255, 114, 0.45);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intro {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.asterisk {
  flex-shrink: 0;
  animation: spin 12s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.intro h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-right: auto;
}

.dd {
  position: relative;
  margin-left: auto;
}

.dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1.5px solid var(--dark);
  background: var(--white);
  border-radius: 999px;
  padding: 0.55rem 0.95rem 0.55rem 1.05rem;
  cursor: pointer;
  font-weight: 750;
  font-size: 0.9rem;
  color: var(--dark);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dd-btn:hover,
.dd.open .dd-btn {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.dd-chev {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dd.open .dd-chev {
  transform: rotate(180deg);
}

.dd-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: max(100%, 220px);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(31, 42, 46, 0.12);
  z-index: 20;
  max-height: min(60vh, 360px);
  overflow-y: auto;
}

.dd-menu[hidden] {
  display: none;
}

.dd-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
  cursor: pointer;
  border-radius: 8px;
}

.dd-item:hover {
  background: var(--surface);
}

.dd-item.active {
  background: var(--primary);
  color: var(--dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border-radius: 0;
  padding: 1.25rem 1.3rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 168px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  color: var(--dark);
  width: 100%;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
}

.card-ico {
  position: absolute;
  right: -6px;
  bottom: -8px;
  width: 92px;
  height: 92px;
  color: #1f2a2e;
  opacity: 0.07;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.card-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card:hover .card-ico {
  opacity: 0.12;
  transform: translate(-4px, -4px) scale(1.04);
}

.card-cat {
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  flex: 1;
  max-width: 85%;
}

.card-meta,
.card-cta {
  position: relative;
  z-index: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.card-meta .price {
  color: var(--dark);
}

.card-cta {
  margin-top: 0.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-cta .cta-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}

.card:hover .card-cta {
  color: #6a9e2a;
}

.ibtn .icon svg {
  width: 18px;
  height: 18px;
}

.level-section {
  margin: 1rem 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.level-section:first-child {
  margin-top: 0.35rem;
}

.levels {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.15rem 0 1rem;
}

.level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.level:hover {
  border-color: var(--primary);
  background: var(--white);
}

.level-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.level-main strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.level-main span {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
}

.level-go {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: grid;
  place-items: center;
}

.level-go svg {
  width: 16px;
  height: 16px;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  padding: 3rem 1rem;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.overlay.open {
  display: flex;
}

.panel {
  position: relative;
  background: var(--white);
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(31, 42, 46, 0.28);
  animation: up 0.22s ease;
}

@keyframes up {
  from {
    transform: translateY(12px) scale(0.985);
    opacity: 0.7;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--dark);
}

.panel-body {
  padding: 1.45rem 1.35rem 1.5rem;
  overflow-y: auto;
  max-height: min(88vh, 720px);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.panel-kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--primary);
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  padding-right: 2rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-in {
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.98rem;
}

.more {
  border-top: 1px solid var(--border);
  margin-bottom: 1.35rem;
}

.more details {
  border-bottom: 1px solid var(--border);
}

.more summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: 750;
  display: flex;
  justify-content: space-between;
}

.more summary::-webkit-details-marker {
  display: none;
}

.more summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 500;
}

.more details[open] summary::after {
  content: "−";
}

.more .body {
  padding: 0 0 0.95rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
}

.more .body p {
  margin: 0;
  line-height: 1.45;
}

.more ul {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
}

.more li {
  line-height: 1.4;
}

.more li + li {
  margin-top: 0.3rem;
}

.hint {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.85rem;
}

/* Buttons — Skill Space interactive style */
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ibtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  background: var(--primary);
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.85rem 3.6rem 0.85rem 1.35rem;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ibtn .label {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  transition: color 0.2s ease, transform 0.2s ease;
}

.ibtn .icon {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: left 0.35s ease, right 0.35s ease, transform 0.35s ease;
}

.ibtn .icon svg {
  width: 18px;
  height: 18px;
}

.ibtn:hover {
  background: var(--dark);
  border-color: var(--white);
}

.ibtn:hover .label {
  color: var(--white);
  transform: translateX(0.35rem);
}

.ibtn:hover .icon {
  transform: translateY(-50%) rotate(45deg);
}

.ibtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 9999px;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--dark);
}

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

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 750;
}

.form-stack input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  background: var(--surface);
}

.form-stack input:focus {
  outline: none;
  border-color: var(--dark);
  background: var(--white);
}

.error {
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
}

.q-shell {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.q-top {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 2.2rem;
}

.progress {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #a8e85a, var(--primary));
  width: 0;
  transition: width 0.25s ease;
}

.q-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.mod-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(193, 255, 114, 0.35);
  border: 1px solid rgba(193, 255, 114, 0.7);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dark);
}

.q-step {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.timer-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 3.4rem;
  justify-content: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--dark);
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease;
}

.timer-chip.urgent {
  background: #f5a524;
  color: var(--dark);
}

.timer-chip.critical {
  background: #e5484d;
  color: #fff;
  animation: pulse-timer 0.9s ease infinite;
}

@keyframes pulse-timer {
  50% {
    transform: scale(1.04);
  }
}

.q-prompt {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.28;
  color: var(--dark);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.opt-mark {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
}

.opt-text {
  flex: 1;
  line-height: 1.35;
  padding-top: 0.12rem;
}

.opt:hover {
  border-color: #b7c2cb;
  background: var(--white);
}

.opt.selected {
  border-color: var(--dark);
  background: #f7ffe8;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.opt.selected .opt-mark {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.composer-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.composer-hint {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.idea-meter {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.idea-meter i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d5dde3;
  display: inline-block;
}

.idea-meter i.on {
  background: var(--dark);
}

.idea-meter[data-ready="1"] {
  color: var(--dark);
}

.idea-meter[data-ready="1"] i.on {
  background: #78c92b;
}

.ideas-box,
.precision-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: var(--surface);
  color: var(--dark);
  margin: 0;
  line-height: 1.45;
  min-height: auto;
  resize: vertical;
}

.ideas-box {
  min-height: 5.5rem;
}

.ideas-box-tall {
  min-height: 8.5rem;
}

.ideas-box:focus,
.precision-input:focus {
  outline: none;
  border-color: var(--dark);
  background: var(--white);
  box-shadow: none;
}

.score-live {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.score-live.is-mid {
  background: #fff7e6;
  border-color: #f5d78e;
}

.score-live.is-good {
  background: rgba(193, 255, 114, 0.28);
  border-color: rgba(193, 255, 114, 0.75);
}

.score-live-pct {
  flex: 0 0 auto;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--dark);
}

.score-live-msg {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
  padding-top: 0.15rem;
}

.composer-precision .precision-target {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: var(--white);
  border: 1px dashed #c5ced6;
  margin-bottom: 0.15rem;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
}

.precision-input {
  min-height: auto;
}

.q-actions {
  margin-top: 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.score-break {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.score-break-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.score-break-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.score-break-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--muted);
}

.score-break-item.is-started {
  color: var(--dark);
  border-color: #d5dde5;
  background: var(--surface);
}

.score-break-item.is-current {
  border-color: rgba(193, 255, 114, 0.85);
  background: rgba(193, 255, 114, 0.22);
  color: var(--dark);
  font-weight: 700;
}

.score-break-item.is-good.is-started {
  border-color: rgba(193, 255, 114, 0.65);
}

.score-break-name {
  font-weight: 650;
}

.score-break-pct {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.score-break-item.is-pending .score-break-pct {
  font-weight: 600;
  opacity: 0.7;
}

.finish-early:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.finish-hint {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.finish-ready {
  margin: 0.15rem 0 0.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: opacity 0.2s ease;
}

.finish-ready.is-dim {
  opacity: 0.55;
}

.finish-ready strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.finish-ready p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.finish-record {
  border-style: dashed;
}

.lesson-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 550;
}

.lesson-box strong {
  color: var(--dark);
  display: block;
  margin-bottom: 0.35rem;
}

.lesson-box p {
  margin: 0;
}

.score-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: center;
  margin-bottom: 1.15rem;
}

.result-score {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  margin: 0;
  line-height: 0.95;
  color: var(--dark);
}

.result-score span {
  font-size: 1.15rem;
  letter-spacing: 0;
  margin-left: 0.1rem;
  color: var(--muted);
}

.result-title {
  margin: 0 0 0.85rem !important;
  font-size: 1.75rem !important;
  line-height: 1.15 !important;
}

.verdict {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 0;
  font-weight: 750;
  line-height: 1.35;
}

.ai-coach {
  margin: 0 0 1.15rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(193, 255, 114, 0.22), rgba(244, 248, 250, 0.95));
  border: 1px solid rgba(193, 255, 114, 0.55);
}

.ai-coach-head {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.ai-coach-wait {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.ai-notes {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.ai-note {
  margin: 0;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--dark);
}

.ai-note:first-child {
  border-top: 0;
  padding-top: 0;
}

.ai-report {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--dark);
}

.verdict.high {
  background: rgba(193, 255, 114, 0.35);
  border-color: var(--primary);
}

.verdict.mid {
  background: #fff7e6;
  border-color: #f5d78e;
}

.verdict.low {
  background: #fdecea;
  border-color: #f0b4ae;
}

.result-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.bar-track > i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.site-footer {
  position: relative;
  z-index: 2;
  width: 100vw;
  margin: 3.25rem 0 0;
  margin-left: calc(50% - 50vw);
  padding: 2.1rem max(1.25rem, calc(50vw - 540px)) 2.4rem;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -24px 48px rgba(244, 248, 250, 0.92);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: max(1.25rem, calc(50vw - 540px));
  right: max(1.25rem, calc(50vw - 540px));
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, rgba(193, 255, 114, 0.15) 55%, transparent 100%);
}

.footer-inner {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: end;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.footer-col {
  display: grid;
  gap: 0.55rem;
}

.footer-col-cta {
  gap: 0.35rem;
}

@media (min-width: 720px) {
  .footer-col-cta {
    justify-items: end;
    text-align: right;
  }
}

.footer-brand {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-address {
  margin: 0;
  color: var(--dark);
  font-size: 1rem;
  font-weight: 600;
  max-width: 28rem;
  line-height: 1.45;
}

.footer-maps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-top: 0.15rem;
}

.footer-dot {
  color: var(--muted);
  font-weight: 700;
}

.footer-map {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-map:hover {
  color: var(--dark);
  border-bottom-color: var(--primary);
}

.footer-phone {
  color: var(--dark);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1.15;
  width: fit-content;
}

.footer-phone:hover {
  color: #6a9e2a;
}

.footer-mail {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  width: fit-content;
}

.footer-mail:hover {
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .app {
    width: calc(100% - 1.25rem);
    padding: 0.85rem 0 3rem;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.65rem;
    margin-bottom: 1.25rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .brand-logo {
    height: 34px;
  }

  .top-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 0.4rem;
    max-width: 100%;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
    gap: 0.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav-link {
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
  }

  .top-tag,
  .session-chip:not([hidden]) {
    display: none;
  }

  .lang-btn {
    padding: 0.38rem 0.55rem;
    font-size: 0.74rem;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .overlay {
    align-items: flex-end;
    padding: 0;
  }

  .panel {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }

  .panel-body {
    max-height: 92vh;
  }

  .q-prompt {
    font-size: 1.15rem;
  }

  .score-hero {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .timer-chip {
    margin-left: 0;
  }
}
