/* The signed-in app: navigation, dashboard, levels, progress, projection, lessons, quiz and summary. */

/* ---------- layout ---------- */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 120px;
}

.page > * + * {
  margin-top: 20px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-head h1 {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.03em;
}

.page-head.wide {
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

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

.card-head h3 {
  margin: 0;
}

.card-head p {
  margin: 4px 0 0;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .btn {
  margin-top: 14px;
}

.empty {
  padding: 12px 0;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grow {
  flex: 1;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot.root {
  background: var(--root);
}

.dot.word {
  background: var(--word);
}

.dotted {
  border-bottom: 1px dotted currentColor;
}

/* ---------- navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .brand {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.nav .links {
  display: flex;
  flex: 1;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav .links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 60px;
  padding: 0 12px;
  color: var(--mut);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.nav .links a:hover,
.nav .links a[aria-current] {
  color: var(--ink);
}

.nav .links a[aria-current]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--root);
}

.badge {
  display: inline-block;
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.badge.lessons {
  background: var(--salmon);
  color: var(--salmon-ink);
}

.badge.reviews {
  background: var(--sky);
  color: var(--sky-ink);
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--mut);
  font-size: 14px;
}

.search-btn kbd {
  margin-left: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.icon-btn:disabled {
  opacity: 0.35;
}

.user {
  position: relative;
}

.user summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}

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

.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--root);
  color: var(--on);
  font-weight: 800;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.menu button {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
}

.menu button:hover {
  background: var(--surface-2);
}

#banner .banner {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 92vw;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--warn);
  color: var(--warn-ink);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  font-size: 15px;
}

#banner .banner button {
  border: 1px solid currentColor;
  border-radius: 8px;
  background: none;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---------- dashboard ---------- */
.hero-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 220px;
  padding: 22px 24px;
  border-radius: 20px;
  color: #fff;
}

.hero-card::after {
  content: attr(data-mark);
  position: absolute;
  right: -6px;
  bottom: -14px;
  z-index: -1;
  pointer-events: none;
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  opacity: 0.1;
}

.hero-card h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.hero-card .big {
  margin: 10px 0 2px;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-card .big small {
  font-size: 0.4em;
  opacity: 0.7;
  letter-spacing: 0;
}

.hero-card .sub {
  margin: 0 0 16px;
  font-size: 15px;
  opacity: 0.92;
}

.hero-card .foot {
  margin: 12px 0 0;
  font-size: 13px;
  opacity: 0.85;
}

.hero-card.lessons {
  background: linear-gradient(135deg, #6f3418, #b4531d);
}

.hero-card.reviews {
  background: linear-gradient(135deg, #1b3580, #2f66d8);
}

.hero-card.level {
  background: linear-gradient(135deg, #0e4a2f, #1d8a50);
}

.meter-row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 14px;
}

.meter {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
}

.meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #fff;
}

.meter b {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 16px;
  background: #fff;
  opacity: 0.8;
}

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

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: none;
  font-weight: 600;
  font-size: 15px;
}

.tab span {
  margin-left: 8px;
  color: var(--mut);
  font-weight: 500;
}

.tab.on {
  border-color: var(--ink);
  background: var(--surface-2);
}

.level-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.level-panel .scroll {
  max-height: 440px;
  overflow: auto;
}

.level-panel h4 {
  margin: 18px 0 8px;
  font-size: 15px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chip-col small {
  min-height: 14px;
  font-size: 11px;
  color: var(--mut);
}

.chip {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--root);
  color: var(--on);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.chip.word {
  background: var(--word);
}

.chip.cur {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--bg);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}

.seg button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--mut);
  font-weight: 600;
  font-size: 14px;
}

.seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pct {
  margin: 6px 0;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pct small {
  font-size: 0.45em;
  opacity: 0.7;
}

.stack {
  display: flex;
  height: 14px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--mut);
}

.sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
}

.row-bar {
  margin-top: 16px;
}

.row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.stats3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stats3 > div {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface-2);
}

.stats3 small {
  display: block;
  font-size: 13px;
  color: var(--mut);
}

.stats3 b {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.big3 > div {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.big3 b {
  font-size: 30px;
}

.big3 .accent {
  background: var(--root);
  border-color: var(--root);
  color: var(--on);
}

.big3 .accent small {
  color: inherit;
  opacity: 0.85;
}

.card .stats3 {
  margin: 4px 0 8px;
}

/* ---------- charts ---------- */
.chart {
  display: block;
  width: 100%;
  height: auto;
}

.chart text {
  fill: var(--mut);
  font-size: 11px;
  font-family: inherit;
}

.chart .grid {
  stroke: var(--line);
}

.chart .bar {
  fill: var(--root);
}

.chart .bar + text {
  fill: var(--ink);
  font-weight: 700;
}

.chart .done {
  fill: none;
  stroke: var(--root);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .proj {
  stroke: var(--word);
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
}

.chart .band {
  fill: var(--word);
  opacity: 0.14;
}

.chart .goal {
  fill: var(--word);
}

.chart .today {
  stroke: var(--mut);
  stroke-dasharray: 2 4;
}

.chart .dbar {
  fill: var(--root);
}

.chart .dbar.faded {
  opacity: 0.3;
}

.chart .avg {
  stroke: var(--word);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

/* ---------- tiles, levels, progress ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 10px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 86px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--root);
  color: var(--on);
  text-decoration: none;
}

.tile.word {
  background: var(--word);
}

.tile-word {
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: break-word;
}

.tile-en {
  font-size: 13px;
  opacity: 0.92;
}

.tile-state {
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.88;
}

.tile.mini {
  min-height: 0;
  padding: 8px 12px;
}

.tile.locked {
  background: transparent;
  border: 2px dashed var(--line);
  color: var(--mut);
}

.tile.ready {
  box-shadow: inset 0 0 0 3px var(--ink);
}

.tile.started {
  box-shadow: inset 0 -6px 0 var(--gc);
}

.tile.g0 {
  --gc: var(--g0);
}
.tile.g1 {
  --gc: var(--g1);
}
.tile.g2 {
  --gc: var(--g2);
}
.tile.g3 {
  --gc: var(--g3);
}
.tile.g4 {
  --gc: var(--g4);
}

.strip {
  display: flex;
  gap: 6px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.strip a {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--mut);
  font-weight: 700;
  text-decoration: none;
}

.strip a.done {
  color: var(--ok);
}

.strip a.locked {
  opacity: 0.5;
}

.strip a.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.levels-page .page-head {
  text-align: center;
}

.levels-page .page-head h1 {
  font-size: 46px;
}

.step {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 26px;
  text-decoration: none;
}

.step.off {
  opacity: 0.3;
}

.note {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--warn);
  color: var(--warn-ink);
}

.group h3 {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
}

.group h3 .mut {
  margin-left: 12px;
  font-weight: 500;
}

.pcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.pcard {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
}

.pcard.on {
  border-color: var(--root);
}

.pcard .pct {
  font-size: 42px;
}

.pcard .stack {
  width: 100%;
}

.overall {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.controls-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
}

.chip-btn b {
  font-size: 16px;
}

.chip-btn.on {
  border-color: var(--root);
  background: color-mix(in srgb, var(--root) 10%, var(--surface));
}

/* ---------- item page and lessons ---------- */
.hero {
  padding: 36px 18px 32px;
  text-align: center;
  background: var(--root);
  color: var(--on);
}

.hero.word {
  background: var(--word);
}

.hero h2 {
  margin: 0;
  font-size: clamp(52px, 14vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.hero .art {
  margin-right: 0.1em;
  font-size: 0.4em;
  font-weight: 600;
  opacity: 0.85;
}

.hero p {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 600;
}

.item-page .hero {
  border-radius: 20px;
}

.crumb {
  margin: 0 0 4px;
}

.crumb a {
  color: var(--mut);
  text-decoration: none;
}

.status {
  text-align: center;
  color: var(--mut);
}

.status strong {
  color: var(--ink);
}

.lesson {
  padding-bottom: 120px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 14px;
}

.panel {
  width: calc(100% - 28px);
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.item-page .panel {
  width: 100%;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.panel h3.sep {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.panel h4 {
  margin: 20px 0 6px;
  font-size: 15px;
  color: var(--mut);
}

.row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 4px 0;
}

.row .mut {
  min-width: 110px;
}

.row b {
  font-size: 22px;
}

.mn {
  margin: 6px 0;
  font-size: 19px;
  line-height: 1.5;
}

.ex {
  margin: 12px 0;
}

.ex p {
  margin: 0;
}

.ex .nl {
  font-size: 19px;
}

.play {
  margin-left: 10px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--mut);
  font-size: 13px;
  vertical-align: middle;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- quiz ---------- */
.quiz {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.qcard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.qtop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--mut);
}

.qbar {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: var(--line);
}

.qbar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--ok);
}

.qhero {
  padding: 48px 16px;
  text-align: center;
  color: var(--banner-ink);
}

.qhero.nl {
  background: linear-gradient(160deg, var(--nl), color-mix(in srgb, var(--nl) 70%, #000));
}

.qhero.en {
  background: linear-gradient(160deg, var(--en), color-mix(in srgb, var(--en) 70%, #000));
}

.qhero h2 {
  margin: 0;
  font-size: clamp(44px, 13vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.qlab {
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.qlab.nl {
  background: color-mix(in srgb, var(--nl) 14%, var(--surface));
}

.qlab.en {
  background: color-mix(in srgb, var(--en) 14%, var(--surface));
}

.qin {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 0;
}

.qin input {
  padding: 14px 16px;
  font-size: 24px;
  text-align: center;
}

.qin input.ok {
  border-color: var(--ok);
  background: var(--ok);
  color: var(--ok-ink);
}

.qin input.bad {
  border-color: var(--bad);
  background: var(--bad);
  color: var(--bad-ink);
}

.send {
  flex: none;
  width: 48px;
  height: 48px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: none;
  font-size: 22px;
}

.fb:not(:empty) {
  margin: 14px 22px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--mut);
  text-align: center;
}

.fb.warn {
  background: var(--warn);
  color: var(--warn-ink);
}

.fb.ok {
  color: var(--ok);
}

.fb.bad {
  color: var(--bad);
}

.qbtn {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px 22px;
}

.soft {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  color: var(--mut);
  font-size: 15px;
}

.soft:disabled {
  opacity: 0.4;
}

.info {
  padding: 0 22px 22px;
}

.ibox {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ibox .ans {
  margin: 2px 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.sep2 {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ---------- session summary ---------- */
.summary h1 {
  margin: 8px 0 0;
  text-align: center;
  font-size: 36px;
}

.sum-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 22px 0;
}

.ring {
  width: 140px;
  height: 140px;
}

.ring-bg {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 12;
}

.ring-fg {
  fill: none;
  stroke: var(--ok);
  stroke-width: 12;
  stroke-linecap: round;
}

.ring text {
  fill: var(--ink);
  font-size: 30px;
  font-weight: 800;
  font-family: inherit;
}

.sum-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sum-stats > div {
  min-width: 112px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.sum-stats small {
  display: block;
  font-size: 13px;
  color: var(--mut);
}

.sum-stats b {
  font-size: 24px;
}

.sum-stats b span {
  font-size: 13px;
  font-weight: 500;
  color: var(--mut);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.pill.up {
  background: color-mix(in srgb, var(--ok) 22%, var(--surface));
  color: var(--ok);
}

.pill.down {
  background: color-mix(in srgb, var(--bad) 22%, var(--surface));
  color: var(--bad);
}

.pill.learned {
  background: var(--ok);
  color: var(--ok-ink);
}

.pill.burned {
  background: var(--gold);
  color: var(--gold-ink);
}

.levelup {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ok);
  color: var(--ok-ink);
  text-align: center;
  font-weight: 700;
}

.sgroup h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 18px;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.count.ok {
  background: var(--ok);
  color: var(--ok-ink);
}

.count.bad {
  background: var(--bad);
  color: var(--bad-ink);
}

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

.stile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--root);
  color: var(--on);
  text-decoration: none;
}

.stile.word {
  background: var(--word);
}

.stile.burned {
  background: var(--gold);
  color: var(--gold-ink);
}

.stile b {
  font-size: 22px;
}

.stile small {
  font-size: 11px;
  opacity: 0.9;
}

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* ---------- search ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(5, 10, 25, 0.55);
}

.palette {
  width: min(560px, 92vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

#results {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

#results a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}

#results a:hover,
#results a:focus-visible {
  background: var(--surface-2);
}

#results span {
  flex: 1;
  color: var(--mut);
}

#results small {
  color: var(--mut);
}

#results .empty {
  padding: 12px;
  color: var(--mut);
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero-row,
  .two,
  .stats3 {
    grid-template-columns: 1fr;
  }

  .card .stats3,
  .levels-page .stats3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-btn {
    min-width: 0;
  }

  .search-btn span,
  .search-btn kbd,
  .uname {
    display: none;
  }

  .overall {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    gap: 8px;
    padding: 8px 10px 0;
  }

  .nav .search-btn {
    margin-left: auto;
  }

  .nav .links {
    order: 3;
    flex: 0 0 100%;
    margin: 0 -4px;
  }

  .nav .links a {
    height: 42px;
  }

  #banner .banner {
    top: 110px;
  }
}

@media (max-width: 560px) {
  .qin input {
    padding: 12px;
    font-size: 18px;
  }

  .page {
    padding: 16px 14px 120px;
  }

  .bar .mut {
    display: none;
  }

  .stats3 b {
    font-size: 20px;
  }

  .big3 b {
    font-size: 22px;
  }
}
