:root {
  --paper: #ffffff;
  --ink: #1f1a1b;
  --stone: #766e6a;
  --rule: #e4dfda;
  --wash: #f5f3f0;
  --garnet: #6e1428;
  --garnet-2: #8a2237;
  --garnet-soft: #f6ecee;
  --leaf: #4f5d36;
  --leaf-soft: #eef1e6;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--garnet);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 200;
  font-family: var(--sans);
  font-size: 14px;
}
.skip:focus {
  left: 8px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- header ---------- */
.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 28px 0;
}
.brand {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
  color: var(--garnet);
}
.tabs {
  display: flex;
  gap: 28px;
  font-family: var(--sans);
  font-size: 16px;
  padding-bottom: 4px;
}
.tabs a {
  text-decoration: none;
  color: var(--stone);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.tabs a:hover {
  color: var(--ink);
}
.tabs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--garnet);
}
.rank {
  display: grid;
  grid-template-columns: auto;
  justify-items: end;
  text-decoration: none;
  padding-bottom: 4px;
  gap: 2px;
}
.rank-name {
  font-size: 17px;
  line-height: 1.1;
}
.rank-pts {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
}
.bar {
  display: block;
  width: 120px;
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--leaf);
  border-radius: 2px;
  transition: width 0.6s ease;
}
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 72px;
}
.top + main {
  border-top: 0;
}
main::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  margin: 18px 0 28px;
}

/* ---------- shared controls ---------- */
.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  background: var(--garnet);
  color: #fff;
  border: 1px solid var(--garnet);
  border-radius: 4px;
  padding: 9px 16px;
  cursor: pointer;
  line-height: 1.3;
}
.btn:hover {
  background: var(--garnet-2);
  border-color: var(--garnet-2);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn.quiet {
  background: transparent;
  color: var(--ink);
  border-color: #cfc8c2;
}
.btn.quiet:hover {
  border-color: var(--ink);
  background: transparent;
}
.link {
  font-family: var(--sans);
  font-size: 15px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--garnet);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.link:hover {
  color: var(--garnet-2);
}
.link.plain {
  color: var(--ink);
}
.link.serif {
  font-family: var(--serif);
  font-size: inherit;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.muted {
  color: var(--stone);
}
.small {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  line-height: 1.45;
}
.err {
  font-family: var(--sans);
  font-size: 14px;
  color: #8a1c1c;
  margin: 10px 0 0;
}
.field {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid #cfc8c2;
  border-radius: 4px;
  background: #fff;
}
.field:focus {
  outline: none;
  border-color: var(--garnet);
  box-shadow: 0 0 0 3px var(--garnet-soft);
}
.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: -2px;
}

/* ---------- map tab ---------- */
.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
  gap: 16px 28px;
  align-items: center;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
}
.search {
  position: relative;
}
.search input {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  padding: 11px 14px 11px 40px;
  border: 1px solid #cfc8c2;
  border-radius: 4px;
  background: #fff;
  outline: none;
}
.search input:focus {
  border-color: var(--garnet);
  box-shadow: 0 0 0 3px var(--garnet-soft);
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stone);
}
.suggest {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(31, 26, 27, 0.08);
  list-style: none;
  margin: 0;
  padding: 4px;
  display: none;
  max-height: 360px;
  overflow: auto;
  font-family: var(--sans);
  font-size: 15px;
}
.suggest.open {
  display: block;
}
.suggest li {
  padding: 8px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
}
.suggest li .sub {
  color: var(--stone);
  font-size: 13px;
  margin-left: auto;
  text-align: right;
}
.suggest li.active,
.suggest li:hover {
  background: var(--wash);
}
.filters {
  display: grid;
  gap: 6px;
  font-family: var(--sans);
  font-size: 15px;
  min-width: 0;
}
.filters .group {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}
.filters button {
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1.5px solid transparent;
}
.filters button:hover {
  color: var(--ink);
}
.filters button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.kart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 960px) {
  .kart-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}
.map-wrap {
  position: relative;
}
#map {
  height: 560px;
  background: var(--wash);
  border-radius: 6px;
  overflow: hidden;
}
@media (max-width: 960px) {
  #map {
    height: 400px;
  }
}
.mapbar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 5;
  font-family: var(--sans);
}
.mapbar button {
  font-size: 13px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}
.mapbar button:hover {
  border-color: var(--stone);
}
.mapbar button[aria-pressed="true"] {
  border-color: var(--ink);
}
.legend {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend .ring {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--garnet);
  background: #fff;
}
.legend .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--garnet);
}
.jvm-zoom-btn {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--rule);
  width: 28px !important;
  height: 28px !important;
  line-height: 26px !important;
  font-size: 17px !important;
  left: 12px !important;
  border-radius: 4px !important;
  font-family: var(--sans);
}
.jvm-zoom-btn.jvm-zoomin {
  top: 12px !important;
}
.jvm-zoom-btn.jvm-zoomout {
  top: 44px !important;
}
.jvm-tooltip {
  background: var(--ink) !important;
  font-family: var(--sans) !important;
  font-size: 13px !important;
  border-radius: 3px !important;
  padding: 4px 8px !important;
  box-shadow: none !important;
}
#map path.jvm-region {
  vector-effect: non-scaling-stroke;
  stroke-width: 0.7px;
}
#map.zoomed circle.jvm-marker {
  r: 4px;
}
#wine-areas ellipse {
  cursor: pointer;
}
#wine-areas ellipse:hover {
  fill-opacity: 0.5;
}

/* ---------- panel ---------- */
.panel {
  min-height: 420px;
}
.kicker {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.wine-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.2vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.place {
  font-style: italic;
  font-size: 21px;
  margin: 6px 0 18px;
  color: var(--ink);
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0 0 14px;
  font-size: 17px;
}
.facts dt {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  padding-top: 3px;
}
.facts dd {
  margin: 0;
}
.lede {
  margin: 0 0 18px;
  max-width: 36em;
}
.toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 30px;
}
.toggle {
  font-family: var(--sans);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #cfc8c2;
  border-radius: 4px;
  padding: 6px 11px;
  cursor: pointer;
}
.toggle:hover {
  border-color: var(--ink);
}
.toggle[aria-pressed="true"] {
  border-color: var(--garnet);
  color: var(--garnet);
  background: var(--garnet-soft);
}
.toggle[aria-pressed="true"] .icon-fill {
  fill: currentColor;
}

.section-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.01em;
}
.tasks-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.progress-line {
  display: flex;
  gap: 3px;
  margin: 0 0 4px;
}
.progress-line i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
}
.progress-line i.on {
  background: var(--leaf);
}
.tasks {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.task {
  border-bottom: 1px solid var(--rule);
}
.task-row {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px;
  align-items: start;
  text-align: left;
  background: none;
  border: 0;
  padding: 14px 4px;
  cursor: pointer;
}
.task-row:hover .task-name {
  color: var(--garnet);
}
.task-row[disabled] {
  cursor: default;
}
.task-row[disabled]:hover .task-name {
  color: inherit;
}
.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #bdb5ae;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.task.done .check {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}
.task-name {
  display: block;
  font-size: 18px;
  line-height: 1.3;
}
.task-desc {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin-top: 2px;
}
.task-pts {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  white-space: nowrap;
  padding-top: 3px;
}
.task.done .task-pts {
  color: var(--leaf);
}
.task-body {
  padding: 2px 4px 22px 42px;
}
@media (max-width: 520px) {
  .task-body {
    padding-left: 4px;
  }
}

.qtext {
  font-size: 19px;
  margin: 4px 0 12px;
  line-height: 1.4;
}
.opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 520px) {
  .opts {
    grid-template-columns: 1fr;
  }
}
.opt {
  font-family: var(--serif);
  font-size: 17px;
  text-align: left;
  background: #fff;
  border: 1px solid #d6cfc9;
  border-radius: 4px;
  padding: 9px 12px;
  cursor: pointer;
  line-height: 1.3;
}
.opt:hover:not(:disabled) {
  border-color: var(--ink);
}
.opt:disabled {
  cursor: default;
  color: var(--stone);
}
.opt.right {
  border-color: var(--leaf);
  background: var(--leaf-soft);
  color: var(--ink);
}
.opt.wrong {
  border-color: #b45a5a;
  background: #fbefef;
  color: var(--ink);
}
.feedback {
  font-size: 17px;
  margin: 0 0 12px;
}
.feedback strong {
  font-weight: 600;
}
.feedback .ok {
  color: var(--leaf);
}
.feedback .no {
  color: #8a1c1c;
}
.step {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  margin: 0 0 2px;
}
.spk {
  background: none;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: var(--garnet);
  border-radius: 3px;
  vertical-align: -3px;
  line-height: 0;
}
.spk:hover {
  background: var(--garnet-soft);
}
.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--garnet);
  color: var(--garnet);
  border-radius: 4px;
  padding: 9px 14px;
  cursor: pointer;
  margin: 4px 0 12px;
}
.play:hover {
  background: var(--garnet-soft);
}
.wordlist {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 16px;
  margin: 14px 0 0;
  font-size: 17px;
}
.wordlist dt {
  font-style: italic;
}
.wordlist dd {
  margin: 0;
  color: var(--stone);
}

.dice {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}
.die {
  background: none;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: #a99f98;
  border-radius: 5px;
  line-height: 0;
}
.die:hover {
  color: var(--ink);
}
.die[aria-pressed="true"] {
  color: var(--garnet);
}
.die-label {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin-left: 8px;
}
textarea.field {
  resize: vertical;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}

.ai-out {
  font-size: 17px;
}
.ai-out h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 18px 0 4px;
}
.ai-out h3:first-child {
  margin-top: 4px;
}
.ai-out h4 {
  font-size: 17px;
  margin: 12px 0 4px;
}
.ai-out p {
  margin: 0 0 10px;
}
.ai-out ul,
.ai-out ol {
  margin: 0 0 10px;
  padding-left: 22px;
}
.qa-q {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  border-left: 2px solid var(--garnet);
  padding: 2px 0 2px 12px;
  margin: 16px 0 8px;
}
.ask {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ask .field {
  flex: 1;
  min-width: 0;
}
.thinking {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 10px;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--rule);
  border-top-color: var(--garnet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.intro h2 {
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}
.intro p {
  margin: 0 0 14px;
  max-width: 32em;
}
.grape-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 22px;
  border-top: 1px solid var(--rule);
}
.grape-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.grape-list .where {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin-left: auto;
}

/* ---------- daily tab ---------- */
.daily-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .daily-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.block-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.block-sub {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin: 0 0 18px;
}
.fact-text {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.32;
  font-weight: 400;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.score {
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  margin: 6px 0 8px;
  letter-spacing: -0.02em;
}
.pairing {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.pair-form {
  display: flex;
  gap: 8px;
  max-width: 640px;
}
.pair-form .field {
  flex: 1;
  min-width: 0;
}
.pair-intro {
  font-size: 20px;
  margin: 22px 0 12px;
  max-width: 40em;
}
.pair-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 32px;
}
.pair-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.pair-list .swatch {
  margin-top: 8px;
}
.pair-list p {
  margin: 2px 0 0;
  font-size: 16px;
}
.pair-list .where {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
}

/* ---------- profile tab ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.you-are {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--stone);
  margin: 0;
}
.big-rank {
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 4px 0 14px;
  color: var(--garnet);
}
.big-bar {
  width: 100%;
  max-width: 440px;
  height: 6px;
}
.ladder {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  max-width: 440px;
}
.ladder li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 18px;
  color: var(--stone);
}
.ladder li.reached {
  color: var(--ink);
}
.ladder li.current {
  font-weight: 600;
  color: var(--garnet);
}
.ladder .need {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
}
.ladder .mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #c9c1ba;
  display: grid;
  place-items: center;
}
.ladder li.reached .mark {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin: 0 0 36px;
}
.stat b {
  display: block;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat span {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
}
.earn {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin: 0 0 32px;
  max-width: 36em;
  line-height: 1.55;
}
.mine-list {
  list-style: none;
  margin: 6px 0 24px;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.mine-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.mine-list .where {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
}
.mine-list .die-mini {
  margin-left: auto;
  color: var(--garnet);
  line-height: 0;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
  max-width: min(88vw, 360px);
}
.toast-item {
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  animation: tin 0.3s ease-out;
  transition: opacity 0.4s;
}
.toast-item b {
  font-weight: 600;
}
.toast-item.out {
  opacity: 0;
}
@keyframes tin {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 17px;
  }
  .top {
    grid-template-columns: 1fr auto;
    padding: 20px 18px 0;
    gap: 14px;
  }
  .tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 22px;
  }
  .rank {
    grid-column: 2;
    grid-row: 1;
  }
  .bar {
    width: 90px;
  }
  main {
    padding: 0 18px 56px;
  }
  main::before {
    margin: 12px 0 22px;
  }
}

/* ---------- v3: mode switch, filters, list ---------- */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.top {
  grid-template-columns: auto 1fr auto auto;
}
.modeswitch {
  display: flex;
  border: 1px solid #cfc8c2;
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--sans);
  margin-bottom: 2px;
}
.modeswitch button {
  background: #fff;
  border: 0;
  padding: 7px 18px;
  font-size: 15px;
  cursor: pointer;
  color: var(--stone);
}
.modeswitch button + button {
  border-left: 1px solid #cfc8c2;
}
.modeswitch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.toolbar .search {
  flex: 1 1 280px;
  max-width: 460px;
}
.sortbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
}
.sortbox .field {
  width: auto;
  padding: 8px 10px;
  font-size: 15px;
}
.viewswitch {
  display: flex;
  border: 1px solid #cfc8c2;
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--sans);
  margin-left: auto;
}
.viewswitch button {
  background: #fff;
  border: 0;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--stone);
}
.viewswitch button + button {
  border-left: 1px solid #cfc8c2;
}
.viewswitch button[aria-pressed="true"] {
  background: var(--wash);
  color: var(--ink);
  font-weight: 500;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 16px;
  min-height: 28px;
  font-family: var(--sans);
}
.chips .count {
  font-size: 14px;
  color: var(--stone);
  margin-right: 6px;
}
.fchip {
  font-family: var(--sans);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--ink);
}
.fchip:hover {
  border-color: var(--stone);
}
.fchip.food {
  background: #fff;
}
.fpanel {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 22px;
  margin: 0 0 14px;
  background: #fff;
}
.fgrid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 28px;
}
@media (max-width: 1000px) {
  .fgrid {
    grid-template-columns: 1fr;
  }
}
.fh {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 8px;
}
.fh:not(:first-child) {
  margin-top: 18px;
}
.tchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tchip {
  font-family: var(--sans);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #d6cfc9;
  border-radius: 3px;
  padding: 5px 10px;
  cursor: pointer;
}
.tchip:hover {
  border-color: var(--ink);
}
.tchip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid #d6cfc9;
  border-radius: 3px;
  overflow: hidden;
  font-family: var(--sans);
}
.seg button {
  background: #fff;
  border: 0;
  border-right: 1px solid #d6cfc9;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--stone);
}
.seg button:last-child {
  border-right: 0;
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.frow {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
@media (max-width: 520px) {
  .frow {
    grid-template-columns: 1fr;
  }
}
.flabel {
  font-family: var(--sans);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.flabel small {
  color: var(--stone);
  font-size: 12px;
}
.fpanel-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.rlist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.ritem {
  width: 100%;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto 42px;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 11px 6px;
  cursor: pointer;
}
.ritem:hover {
  background: var(--wash);
}
.ritem.sel {
  background: var(--garnet-soft);
}
.ritem .swatch {
  border: 1.5px solid transparent;
  width: 13px;
  height: 13px;
  box-shadow: none;
}
.rmain {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rname {
  font-size: 18px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rsub {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rprog {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  text-align: right;
}
.abv {
  font-family: var(--sans);
  font-size: 14px;
}
.dots {
  display: inline-flex;
  gap: 3px;
}
.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
}
.dots i.on {
  background: var(--garnet);
}
.empty {
  padding: 40px 0;
  text-align: center;
}
.profile-bars {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  max-width: 420px;
}
.pbar {
  display: grid;
  grid-template-columns: 130px auto 1fr;
  gap: 12px;
  align-items: center;
  font-family: var(--sans);
  font-size: 14px;
}
.plabel {
  color: var(--stone);
}
.pscale {
  display: inline-flex;
  gap: 3px;
}
.pscale i {
  width: 22px;
  height: 6px;
  border-radius: 2px;
  background: var(--rule);
}
.pscale i.on {
  background: var(--ink);
}
.pword {
  color: var(--ink);
}
.foods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
}
.foods .small {
  margin-right: 4px;
}
.examples {
  margin: 0 0 20px;
  font-size: 17px;
}
@media (max-width: 700px) {
  .top {
    grid-template-columns: 1fr auto;
  }
  .modeswitch {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }
  .viewswitch {
    margin-left: 0;
  }
  .toolbar .search {
    flex-basis: 100%;
    max-width: none;
  }
  .pbar {
    grid-template-columns: 110px auto 1fr;
  }
}
@media (min-width: 961px) {
  .panel {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding-right: 6px;
  }
}

/* ---------- v4: public site ---------- */
.hero {
  padding: 6px 0 30px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--rule);
  max-width: 780px;
}
.hero h1 {
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.hero p {
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 38em;
}
.hero a.btn {
  text-decoration: none;
  display: inline-block;
}
.hero-hide {
  margin-left: auto;
}
.foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 28px 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
}
.foot p {
  margin: 0 0 6px;
  max-width: 60em;
}
.agegate {
  position: fixed;
  inset: 0;
  background: rgba(31, 26, 27, 0.55);
  display: grid;
  place-items: center;
  z-index: 300;
  padding: 20px;
}
.agebox {
  background: #fff;
  border-radius: 6px;
  padding: 28px 30px;
  max-width: 440px;
  width: 100%;
}
.agebox h2 {
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 10px;
}
.agebox p {
  margin: 0 0 18px;
}
.about {
  max-width: 760px;
}
.about h2 {
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.about > p {
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 28px;
}
.faq {
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  padding: 16px 28px 16px 0;
  font-size: 21px;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 28px;
}
.faq details > div {
  padding: 0 0 18px;
  max-width: 40em;
}
.faq details > div p {
  margin: 0 0 10px;
}
@media (max-width: 700px) {
  .hero p {
    font-size: 18px;
  }
  .foot {
    padding: 20px 18px 36px;
  }
}

/* ---------- v5: home page ---------- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 18px 0 48px;
}
@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 8px;
  }
}
.home-intro h1 {
  font-weight: 500;
  font-size: clamp(46px, 7.2vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  color: var(--garnet);
  text-wrap: balance;
}
.home-lede {
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 31em;
}
.home-cta {
  gap: 12px 14px;
}
.btn.big {
  font-size: 17px;
  padding: 13px 22px;
}
.btn.dark {
  background: var(--ink);
  border-color: var(--ink);
}
.btn.dark:hover {
  background: #3a3234;
  border-color: #3a3234;
}
.home-today {
  border-left: 1px solid var(--rule);
  padding: 4px 0 4px 32px;
}
@media (max-width: 900px) {
  .home-today {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding: 24px 0 0;
  }
}
.today-date {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin: 0 0 4px;
}
.home-today h2 {
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 10px;
}
.today-fact {
  font-size: 20px;
  line-height: 1.45;
  margin: 0 0 10px;
}
.today-quiz {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.today-quiz p {
  margin: 0 0 12px;
  font-size: 17px;
}
.home-what {
  padding: 40px 0 8px;
  border-top: 1px solid var(--rule);
}
.home-h {
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
}
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}
.home-grid article {
  border-top: 1px solid var(--ink);
  padding: 16px 0 30px;
  display: flex;
  flex-direction: column;
}
.home-grid h3 {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.home-grid p {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.5;
  flex: 1;
}
.home-grid .link {
  align-self: flex-start;
}
.home-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin: 22px 0 8px;
  padding: 24px 28px;
  background: var(--garnet-soft);
  border-radius: 6px;
}
.home-start p {
  margin: 0;
  max-width: 44em;
  font-size: 18px;
}
.foot {
  border-top: 0;
  padding-top: 0;
}
.foot::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  margin: 0 0 22px;
}

/* ---------- AI dock and helpers ---------- */
body.has-dock main {
  padding-bottom: 140px;
}
body.has-dock .toast {
  bottom: 96px;
}
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #fff;
  border-top: 1px solid var(--rule);
  box-shadow: 0 -8px 24px rgba(31, 26, 27, 0.05);
  font-family: var(--sans);
}
.dock-bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.dock-tools {
  font-family: var(--sans);
  font-size: 15px;
  background: none;
  border: 0;
  border-right: 1px solid var(--rule);
  padding: 8px 18px 8px 0;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.dock-tools::after {
  content: "";
  width: 7px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: translateY(2px) rotate(45deg);
  transition: transform 0.2s;
}
.dock-tools[aria-expanded="true"]::after {
  transform: translateY(-2px) rotate(225deg);
}
.dock-tools:hover {
  color: var(--garnet);
}
.dock-ask {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 10px;
  align-items: center;
}
.dock-ask .field {
  padding: 9px 12px;
}
.dock-ask select.field {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23766e6a' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  cursor: pointer;
}
.dock-ask .btn {
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}
.dock-answer,
.tools {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px 6px;
  max-height: min(46vh, 440px);
  overflow: auto;
  border-bottom: 1px solid var(--rule);
}
.dock-answer {
  font-family: var(--serif);
  position: relative;
}
.dock-answer .qa-q {
  margin-top: 0;
  margin-right: 60px;
}
.dock-close {
  position: absolute;
  right: 28px;
  top: 18px;
  font-size: 14px;
}
.tools-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 16px;
}
.tools-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 4px 0 8px;
  font-size: 15px;
  color: var(--stone);
  cursor: pointer;
  margin-bottom: -1px;
}
.tools-tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--garnet);
}
.tools-body {
  padding-bottom: 10px;
}
.tools-body .frow {
  grid-template-columns: 200px 1fr;
}
.gloss {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 8px 24px;
  font-size: 15px;
}
.gloss dt {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}
.gloss dd {
  margin: 0;
  color: #3c3536;
  line-height: 1.5;
}
.cmp-wrap {
  overflow-x: auto;
}
.cmp {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
  width: 100%;
}
.cmp th,
.cmp td {
  text-align: left;
  vertical-align: top;
  padding: 7px 14px 7px 0;
  border-bottom: 1px solid var(--rule);
}
.cmp thead th {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
.cmp tbody th {
  font-weight: 500;
  color: var(--stone);
  white-space: nowrap;
  width: 140px;
}
.cmp .pscale {
  display: inline-flex;
  gap: 3px;
}
.ai-sum {
  border-top: 1px solid var(--rule);
  margin: 22px 0 6px;
  padding-top: 16px;
}
.ai-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-links .btn {
  text-decoration: none;
}
.sm-btn {
  font-size: 14px;
  padding: 6px 12px;
}
.sum-out {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--wash);
  border-radius: 4px;
}
.sum-out blockquote {
  margin: 10px 0 0;
  font-style: italic;
}
@media (max-width: 760px) {
  .dock-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 16px;
  }
  .dock-tools {
    border-right: 0;
    padding: 0;
    order: 2;
    font-size: 14px;
  }
  .dock-ask {
    grid-template-columns: minmax(0, 1fr) auto;
    order: 1;
  }
  .dock-ask input {
    grid-column: 1 / -1;
  }
  .dock-answer,
  .tools {
    padding: 14px 16px 4px;
    max-height: 52vh;
  }
  .dock-close {
    right: 16px;
    top: 14px;
  }
  .tools-body .frow {
    grid-template-columns: 1fr;
  }
  .gloss {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .gloss dd {
    margin-bottom: 10px;
  }
  body.has-dock main {
    padding-bottom: 180px;
  }
  body.has-dock .toast {
    bottom: 150px;
  }
}
/* text size and contrast */
body.text-l .top,
body.text-l .toolbar,
body.text-l #filterPanel,
body.text-l #chips,
body.text-l #listWrap,
body.text-l .panel,
body.text-l #view-hjem,
body.text-l #view-daglig,
body.text-l #view-profil,
body.text-l #view-om,
body.text-l .dock-bar,
body.text-l .tools,
body.text-l .dock-answer {
  zoom: 1.12;
}
body.text-xl .top,
body.text-xl .toolbar,
body.text-xl #filterPanel,
body.text-xl #chips,
body.text-xl #listWrap,
body.text-xl .panel,
body.text-xl #view-hjem,
body.text-xl #view-daglig,
body.text-xl #view-profil,
body.text-xl #view-om,
body.text-xl .dock-bar,
body.text-xl .tools,
body.text-xl .dock-answer {
  zoom: 1.25;
}
body.contrast {
  --stone: #3d3735;
  --rule: #a59d98;
  --ink: #000;
}
body.contrast .field,
body.contrast .btn.quiet,
body.contrast .toggle,
body.contrast .seg {
  border-color: #5e5653;
}
body.contrast .link {
  text-decoration-thickness: 2px;
}
body.contrast .gloss dd {
  color: #000;
}
@media (max-width: 760px) {
  body.text-l .top,
  body.text-xl .top {
    zoom: 1;
  }
}
@media (max-width: 520px) {
  .pbar {
    grid-template-columns: 96px auto minmax(0, 1fr);
    gap: 10px;
  }
  .pscale i {
    width: 17px;
  }
}
.dock-ask.one-ai {
  grid-template-columns: minmax(0, 1fr) auto;
}
.ai-who {
  margin: 6px 0 0;
}
.ai-sum-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
@media (max-width: 760px) {
  .dock-ask.one-ai {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .dock-ask.one-ai input {
    grid-column: auto;
  }
}
/* hops */
.hop-note {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  line-height: 1.4;
  margin-top: 2px;
}
/* theme of the week */
.theme {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px 56px;
}
@media (max-width: 900px) {
  .theme {
    grid-template-columns: 1fr;
  }
}
.theme .block-sub {
  margin-bottom: 6px;
}
.theme-title {
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--garnet);
  margin: 0 0 14px;
}
.theme-intro {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  max-width: 30em;
}
.theme-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-family: var(--sans);
  font-size: 15px;
}
.theme-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.theme-steps li .small {
  display: block;
}
.theme-steps .check {
  width: 22px;
  height: 22px;
  border: 1.5px solid #cfc8c2;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
}
.theme-steps li.done .check {
  background: var(--leaf);
  border-color: var(--leaf);
}
.theme-steps .check .icon {
  width: 13px;
  height: 13px;
}
.theme-items {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  columns: 2;
  column-gap: 28px;
}
@media (max-width: 560px) {
  .theme-items {
    columns: 1;
  }
}
.theme-items li {
  break-inside: avoid;
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
  font-size: 16px;
}
.theme-items .swatch {
  align-self: center;
}
.theme-items .where {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
}
.theme-items li.seen .link {
  color: var(--stone);
}
.theme-quiz {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--wash);
  border-radius: 4px;
}
.home-theme {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px 48px;
  align-items: end;
  border-top: 1px solid var(--rule);
  padding: 32px 0 40px;
}
@media (max-width: 760px) {
  .home-theme {
    grid-template-columns: 1fr;
  }
}
.home-theme h2 {
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--garnet);
  margin: 4px 0 10px;
}
.home-theme p {
  margin: 0;
  max-width: 34em;
}
.home-theme-act {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
/* label reader */
.label-in {
  font-family: var(--sans);
  resize: vertical;
  min-height: 96px;
  line-height: 1.45;
}
.label-out {
  margin-top: 14px;
}
.label-out dt .small {
  font-weight: 400;
}
.label-ai {
  margin-top: 14px;
}
.tools-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.tools-tabs button {
  flex: none;
}
textarea.field.label-in {
  font-family: var(--sans);
  font-size: 16px;
}

/* =====================================================================
   v8: finish, motion, pictures and flags
   ===================================================================== */
:root {
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 180ms;
}
html {
  scroll-behavior: smooth;
}
::selection {
  background: #ecd3d9;
  color: var(--ink);
}
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
p,
li,
dd {
  text-wrap: pretty;
}
.stat b,
.score,
.rank-pts,
.task-pts,
.abv,
.rprog {
  font-variant-numeric: tabular-nums;
}

/* calmer, consistent interaction */
.btn,
.toggle,
.tchip,
.fchip,
.opt,
.seg button,
.viewswitch button,
.mapbar button,
.play,
.spk,
.die,
.task-row,
.ritem,
.dock-tools,
.tools-tabs button,
.filters button,
.suggest li,
.field,
.search input {
  transition:
    color var(--t) var(--ease),
    background-color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    transform 120ms var(--ease);
}
.btn {
  box-shadow: 0 1px 0 rgba(31, 26, 27, 0.08);
}
.btn:not(.quiet):hover {
  box-shadow: 0 6px 16px -8px rgba(110, 20, 40, 0.55);
}
.btn.dark:hover {
  box-shadow: 0 6px 16px -8px rgba(31, 26, 27, 0.6);
}
.btn:active,
.toggle:active,
.tchip:active,
.opt:active:not(:disabled),
.play:active,
.fchip:active {
  transform: translateY(1px);
}
.btn.quiet:hover {
  background: #fff;
  box-shadow: 0 4px 12px -8px rgba(31, 26, 27, 0.35);
}
.link {
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  transition:
    color var(--t) var(--ease),
    text-decoration-color var(--t) var(--ease);
}
.link:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline-offset: 3px;
  border-radius: 3px;
}

/* header tabs: underline grows in */
.tabs a {
  position: relative;
  border-bottom: 0;
  transition: color var(--t) var(--ease);
}
.tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--garnet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.tabs a:hover::after {
  transform: scaleX(0.35);
  background: var(--rule);
}
.tabs a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--garnet);
}
.bar > span {
  transition: width 0.9s var(--ease-out);
}

/* wine/beer switch with a sliding marker */
.modeswitch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  isolation: isolate;
}
.modeswitch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: var(--ink);
  transition: transform 320ms var(--ease-out);
}
body[data-mode="ol"] .modeswitch::before {
  transform: translateX(100%);
}
.modeswitch button,
.modeswitch button[aria-pressed="true"] {
  background: transparent;
  transition: color 240ms var(--ease);
}
.modeswitch button[aria-pressed="true"] {
  color: #fff;
}

/* views and panel come in softly */
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.view:not([hidden]) {
  animation: viewIn 420ms var(--ease-out) backwards;
}
.panel.enter > * {
  animation: rise 460ms var(--ease-out) both;
}
.panel.enter > :nth-child(2) {
  animation-delay: 40ms;
}
.panel.enter > :nth-child(3) {
  animation-delay: 80ms;
}
.panel.enter > :nth-child(4) {
  animation-delay: 120ms;
}
.panel.enter > :nth-child(5) {
  animation-delay: 160ms;
}
.panel.enter > :nth-child(n + 6) {
  animation-delay: 200ms;
}
.task-body,
.fpanel:not([hidden]),
.theme-quiz,
.sum-out,
.label-out,
.label-ai {
  animation: drop 280ms var(--ease-out) both;
}
.suggest.open {
  animation: drop 180ms var(--ease-out);
}
.faq details[open] > div {
  animation: drop 260ms var(--ease-out);
}
.tools:not([hidden]),
.dock-answer:not([hidden]) {
  animation: slideUp 300ms var(--ease-out) both;
}
.dock {
  box-shadow: 0 -12px 32px -18px rgba(31, 26, 27, 0.25);
}

/* lists */
.ritem .rname {
  transition:
    color var(--t) var(--ease),
    transform 260ms var(--ease-out);
  display: block;
}
.ritem:hover .rname {
  color: var(--garnet);
  transform: translateX(3px);
}
.home-grid article {
  border-top-color: var(--ink);
  transition: border-color 260ms var(--ease);
}
.home-grid article:hover {
  border-top-color: var(--garnet);
}
.home-grid article:hover h3 {
  color: var(--garnet);
}
.home-grid h3 {
  transition: color 260ms var(--ease);
}
.progress-line i,
.check,
.theme-steps .check,
.ladder .mark,
.dots i,
.pscale i {
  transition:
    background-color 400ms var(--ease),
    border-color 400ms var(--ease);
}

/* quiz feedback */
@keyframes good {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes nudge {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}
.opt.right {
  animation: good 420ms var(--ease-out);
}
.opt.wrong {
  animation: nudge 300ms var(--ease);
}
.feedback {
  animation: fadeIn 260ms var(--ease);
}

/* toasts */
.toast-item {
  animation: toastIn 380ms var(--ease-out);
  transition:
    opacity 380ms var(--ease),
    transform 380ms var(--ease);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.5);
}
.toast-item.out {
  opacity: 0;
  transform: translateY(6px);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* flags */
.flag {
  display: inline-block;
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: -1px;
  margin-right: 8px;
  box-shadow: 0 0 0 1px rgba(31, 26, 27, 0.12);
}
.flag.sm {
  width: 16px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
}
.place .flag {
  width: 24px;
  height: 18px;
  vertical-align: -2px;
  margin-right: 10px;
}

/* pictures */
.media {
  display: grid;
  gap: 10px;
  margin: 2px 0 20px;
}
.media.two {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}
.media.one {
  grid-template-columns: 1fr;
}
.mfig {
  margin: 0;
  min-width: 0;
  position: relative;
}
.mimg {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--wash);
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4/3;
}
.media.one .mimg {
  aspect-ratio: 16/9;
}
.mimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 600ms var(--ease),
    transform 1200ms var(--ease-out);
}
.mimg img.in {
  opacity: 1;
  transform: none;
}
.mimg:hover img.in {
  transform: scale(1.025);
}
.mfig figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  margin-top: 6px;
  line-height: 1.35;
}
.mlabel {
  color: var(--ink);
}
.mcredit {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--stone);
  margin: 0;
  line-height: 1.4;
}
.mcredit a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.skel {
  aspect-ratio: 4/3;
  border-radius: 6px;
  background: linear-gradient(100deg, var(--wash) 30%, #ece8e4 50%, var(--wash) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -50% 0;
  }
}
@media (max-width: 520px) {
  .media.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* picture viewer */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 94vw);
  max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(20, 16, 17, 0.78);
  backdrop-filter: blur(3px);
  animation: fadeIn 220ms var(--ease);
}
.lightbox[open] {
  animation: lbIn 280ms var(--ease-out);
}
.lightbox.closing {
  animation: lbOut 180ms var(--ease) forwards;
}
.lightbox.closing::backdrop {
  animation: fadeOut 180ms var(--ease) forwards;
}
@keyframes lbIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes lbOut {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
  }
}
.lightbox figure {
  margin: 0;
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  margin: 0 auto;
  background: #222;
}
.lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  color: #f1ece8;
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 2px 0;
}
.lightbox figcaption span {
  font-family: var(--serif);
  font-size: 19px;
  margin-right: auto;
}
.lightbox figcaption a {
  color: #cfc6bf;
}
.lightbox .link.plain {
  color: #fff;
}

/* panel scrollbar */
.panel {
  scrollbar-width: thin;
  scrollbar-color: #d9d2cc transparent;
}
.media.two .mimg,
.media.two .skel {
  aspect-ratio: auto;
  height: clamp(150px, 15vw, 220px);
}
@media (max-width: 960px) {
  .media.two .mimg,
  .media.two .skel {
    height: clamp(130px, 34vw, 260px);
  }
}
@media (max-width: 760px) {
  .dock-ask input {
    grid-column: auto;
  }
  .dock-ask select.field {
    grid-column: 1;
    justify-self: start;
    width: auto;
    min-width: 150px;
    padding: 7px 32px 7px 10px;
    font-size: 14px;
  }
  .dock-bar {
    position: relative;
  }
  .dock-bar:has(.dock-ask:not(.one-ai):not([hidden])) .dock-tools {
    position: absolute;
    right: 16px;
    bottom: 16px;
  }
}
@media (max-width: 760px) {
  .dock-ask input {
    grid-column: 1;
    grid-row: 1;
  }
  .dock-ask .btn {
    grid-column: 2;
    grid-row: 1;
  }
  .dock-ask select.field {
    grid-row: 2;
  }
}

/* =====================================================================
   v9: easier to use, pictures everywhere, better map
   ===================================================================== */
/* list with pictures */
.ritem {
  grid-template-columns: 52px minmax(0, 1fr) auto 42px;
  padding: 9px 8px;
  border-radius: 0;
}
.rthumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--c) 26%, #fff),
    color-mix(in srgb, var(--c) 55%, #fff)
  );
  position: relative;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(31, 26, 27, 0.06);
}
.rthumb::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--e);
}
.rthumb.found::after {
  background: var(--c);
}
.rthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.rthumb img.in {
  opacity: 1;
}
.rname {
  font-size: 18px;
}
.rsub {
  font-size: 13.5px;
  margin-top: 1px;
}
@media (max-width: 520px) {
  .ritem {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .rthumb {
    width: 46px;
    height: 46px;
  }
  .rprog {
    display: none;
  }
}

/* map */
#map {
  background: #e8edee;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(31, 26, 27, 0.05);
}
#map path.jvm-region {
  transition: fill 300ms var(--ease);
}
#map path.jvm-region.used {
  cursor: pointer;
}
#map path.jvm-region.used:hover {
  fill: #d5c4bd !important;
}
body[data-mode="ol"] #map path.jvm-region.used:hover {
  fill: #dcc9a8 !important;
}
#map circle.jvm-marker {
  transition:
    r 200ms var(--ease),
    stroke-width 200ms var(--ease);
}
#map circle.jvm-marker:hover {
  r: 9px;
}
#map.zoomed circle.jvm-marker:hover {
  r: 6px;
}
@keyframes ping {
  0% {
    stroke-opacity: 1;
    stroke-width: 2.5px;
  }
  70% {
    stroke-opacity: 0.15;
    stroke-width: 9px;
  }
  100% {
    stroke-opacity: 1;
    stroke-width: 2.5px;
  }
}
#map circle.jvm-marker.is-sel {
  animation: ping 2.2s var(--ease) infinite;
}
.mapbar button {
  box-shadow: 0 2px 8px -4px rgba(31, 26, 27, 0.25);
  transition:
    border-color var(--t) var(--ease),
    background-color var(--t) var(--ease);
}
.mapbar button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.jvm-zoom-btn {
  box-shadow: 0 2px 8px -4px rgba(31, 26, 27, 0.25);
  transition: background-color var(--t) var(--ease);
}
.jvm-zoom-btn:hover {
  background: var(--wash) !important;
}
.jvm-tooltip {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  box-shadow: 0 12px 28px -12px rgba(31, 26, 27, 0.35) !important;
  max-width: 280px;
  white-space: normal !important;
}
.tt {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.35;
}
.tt b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.2;
  margin-bottom: 2px;
}
.tt span {
  display: block;
  color: var(--stone);
}
.tt .tt-type {
  font-size: 12px;
}
.tt img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}
.map-hint {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  margin: 8px 0 0;
}
.kart-grid {
  transition: grid-template-columns 300ms var(--ease-out);
}
.kart-grid.bigmap {
  grid-template-columns: minmax(0, 1fr);
}
.kart-grid.bigmap #map {
  height: min(78vh, 820px);
}
.kart-grid.bigmap .panel {
  position: static;
  max-height: none;
}
#map {
  transition: height 300ms var(--ease-out);
}

/* bigger targets and clearer controls */
.btn,
.toggle,
.tchip,
.seg button,
.viewswitch button,
.modeswitch button,
.mapbar button {
  min-height: 38px;
}
.toggle {
  padding: 8px 13px;
}
.sortbox .field,
.search input {
  min-height: 44px;
}
.fchip {
  padding: 6px 10px;
  border-radius: 999px;
}
.chips .fchip::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  background:
    linear-gradient(45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%);
  opacity: 0.55;
}
.chips .fchip.food::after {
  display: none;
}
.to-map {
  display: none;
  margin: 0 0 14px;
  font-size: 14px;
}
@media (max-width: 960px) {
  .to-map {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .to-map::before {
    content: "";
    width: 7px;
    height: 7px;
    border-left: 1.5px solid currentColor;
    border-top: 1.5px solid currentColor;
    transform: rotate(-45deg);
  }
}
@media (max-width: 700px) {
  .btn,
  .toggle,
  .tchip,
  .mapbar button {
    min-height: 42px;
  }
  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .mapbar {
    top: auto;
    bottom: 12px;
    right: 12px;
    left: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .mapbar button {
    font-size: 13px;
    padding: 6px 10px;
    min-height: 36px;
  }
  #btnBig {
    display: none;
  }
}
.panel .facts dd .link.serif {
  font-size: inherit;
}
.intro {
  padding: 6px 0;
}

/* =====================================================================
   v10: new look and every screen size
   ===================================================================== */
:root {
  --r: 10px;
  --r-sm: 7px;
  --page: 1240px;
  --pad: 28px;
  --card: #faf8f6;
  --card-line: #eee8e3;
}
html {
  scroll-padding-top: calc(var(--head, 80px) + 12px);
}

/* header that follows you */
.top {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  backdrop-filter: saturate(1.5) blur(12px);
  box-shadow: 0 0 0 100vmax rgba(255, 255, 255, 0.9);
  clip-path: inset(0 -100vmax -1px);
  padding-top: 22px;
  padding-bottom: 14px;
  transition:
    transform 320ms var(--ease-out),
    padding 240ms var(--ease);
}
.top.scrolled {
  padding-top: 12px;
  padding-bottom: 10px;
}
.top.scrolled {
  box-shadow:
    0 0 0 100vmax rgba(255, 255, 255, 0.9),
    0 1px 0 100vmax var(--rule);
}
.top.away {
  transform: translateY(-100%);
}
.brand {
  transition: font-size 240ms var(--ease);
}
.top.scrolled .brand {
  font-size: 28px;
}
main::before {
  display: none;
}
main {
  padding-top: 26px;
}

/* softer shapes */
.btn,
.toggle,
.field,
.search input,
.sortbox .field,
.opt,
.play,
.tchip,
.mapbar button,
.jvm-zoom-btn,
.fpanel,
.theme-quiz,
.sum-out {
  border-radius: var(--r-sm) !important;
}
.modeswitch,
.viewswitch,
.seg {
  border-radius: var(--r-sm);
}
.tchip,
.fchip {
  border-radius: 999px !important;
}
#map,
.mimg,
.skel {
  border-radius: var(--r);
}
.home-start {
  border-radius: var(--r);
}

/* the detail panel as a card on wide screens */
@media (min-width: 961px) {
  .panel {
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: 14px;
    padding: 26px 26px 22px;
    top: calc(var(--head, 80px) + 14px);
    max-height: calc(100vh - var(--head, 80px) - var(--dockh, 0px) - 28px);
  }
  .panel .toggle {
    background: #fff;
  }
  .panel .tasks,
  .panel .task {
    border-color: #e9e3de;
  }
}

/* front page doors to wine and beer */
.home-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 44px;
}
.door {
  position: relative;
  display: block;
  min-height: clamp(180px, 24vw, 300px);
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: #fff;
  isolation: isolate;
}
.door-vin {
  background: linear-gradient(140deg, #7a1a2e, #3e0b17);
}
.door-ol {
  background: linear-gradient(140deg, #c98a2b, #5b3510);
}
.door-img {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.door-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 700ms var(--ease),
    transform 1600ms var(--ease-out);
}
.door-img img.in {
  opacity: 1;
  transform: none;
}
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(20, 12, 10, 0.72), rgba(20, 12, 10, 0.08) 60%);
}
.door:hover .door-img img.in {
  transform: scale(1.035);
}
.door-text {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.door-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.door-sub {
  font-family: var(--sans);
  font-size: 15px;
  opacity: 0.92;
}
.door-h::after {
  content: "";
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  border-right: 3px solid currentColor;
  border-top: 3px solid currentColor;
  transform: translate(0.1em, -0.08em) rotate(45deg);
  margin-left: 0.18em;
  transition: transform 300ms var(--ease-out);
}
.door:hover .door-h::after {
  transform: translate(0.26em, -0.08em) rotate(45deg);
}

/* big screens */
@media (min-width: 1560px) {
  :root {
    --page: 1440px;
  }
  .top,
  main,
  .foot,
  .dock-bar,
  .tools,
  .dock-answer {
    max-width: var(--page);
  }
  body {
    font-size: 19px;
  }
  #map {
    height: min(70vh, 760px);
  }
  .kart-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 48px;
  }
}
@media (min-width: 1900px) {
  :root {
    --page: 1600px;
  }
}

/* tablets */
@media (max-width: 1100px) and (min-width: 961px) {
  .kart-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 28px;
  }
  .tabs {
    gap: 20px;
  }
}
@media (max-width: 960px) {
  #map {
    height: min(58vh, 520px);
  }
  .panel {
    background: var(--card);
    border-radius: 14px;
    padding: 22px 20px;
    border: 1px solid var(--card-line);
  }
}

/* phones */
@media (max-width: 700px) {
  .top {
    grid-template-columns: auto 1fr auto;
    padding: 14px 18px 10px;
    gap: 8px 12px;
    align-items: center;
  }
  .brand {
    grid-row: 1;
    grid-column: 1;
    font-size: 30px;
  }
  .top.scrolled .brand {
    font-size: 26px;
  }
  .rank {
    grid-row: 1;
    grid-column: 2;
    justify-items: start;
    padding: 0;
  }
  .rank-name {
    font-size: 14px;
    font-family: var(--sans);
  }
  .rank .bar {
    width: 64px;
    height: 3px;
  }
  .modeswitch {
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
    margin: 0;
  }
  .modeswitch button {
    padding: 6px 14px;
    min-height: 34px;
    font-size: 14px;
  }
  .tabs {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 20px;
    padding-bottom: 0;
    margin: 0 -18px;
    padding: 0 18px;
  }
  .tabs a {
    padding: 6px 0;
  }
  main {
    padding-top: 18px;
  }
  .home-doors {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 32px;
  }
  .door {
    min-height: 150px;
  }
  .home-intro h1 {
    font-size: clamp(40px, 12vw, 56px);
  }
  .fact-text {
    font-size: 24px;
  }
  .wine-name {
    font-size: clamp(32px, 9vw, 42px);
  }
  .place {
    font-size: 19px;
  }
  .toolbar {
    gap: 8px;
  }
  .sortbox {
    flex: 1;
  }
  .sortbox .field {
    flex: 1;
  }
}
@media (max-width: 400px) {
  .rank-pts {
    display: none;
  }
  .brand {
    font-size: 26px;
  }
  .modeswitch button {
    padding: 6px 11px;
  }
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .top {
    padding-left: 14px;
    padding-right: 14px;
  }
  .tabs {
    margin: 0 -14px;
    padding: 0 14px;
    gap: 16px;
  }
}
/* short screens, like phones on their side */
@media (max-height: 500px) {
  .top {
    position: relative;
  }
  .dock-bar {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .dock-answer,
  .tools {
    max-height: 48vh;
  }
  #map {
    height: 78vh;
  }
}
.home-intro .home-doors {
  margin: 6px 0 14px;
}
.home-how {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
}
@media (min-width: 901px) {
  .home-intro .door {
    min-height: clamp(180px, 17vw, 260px);
  }
}
@media (max-width: 700px) {
  .mapbar {
    top: 12px;
    bottom: auto;
    left: auto;
    right: 12px;
    justify-content: flex-end;
  }
  .mapbar button {
    min-height: 34px;
    padding: 5px 9px;
    font-size: 12.5px;
  }
}
@media (max-width: 380px) {
  #btnWorld {
    display: none;
  }
}
.modeswitch {
  grid-template-columns: repeat(2, minmax(max-content, 1fr));
  flex: none;
}
@media (max-width: 960px) and (min-width: 701px) {
  .top {
    gap: 20px;
  }
  .tabs {
    gap: 18px;
  }
}
.ai-sum {
  margin-bottom: 26px;
}

/* =====================================================================
   v11: rank, steps, badges
   ===================================================================== */
button.rank {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: right;
  border-radius: var(--r-sm);
  padding: 4px 6px;
  margin: -4px -6px 0;
  transition: background-color var(--t) var(--ease);
}
button.rank:hover,
button.rank[aria-expanded="true"] {
  background: var(--wash);
}
.rank-name {
  font-family: var(--serif);
}
.rank-step {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--stone);
  margin-left: 2px;
}
.top {
  position: sticky;
}
.rankpop {
  position: absolute;
  right: 28px;
  top: calc(100% - 4px);
  width: min(380px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(31, 26, 27, 0.35);
  padding: 18px 18px 14px;
  z-index: 80;
  animation: drop 220ms var(--ease-out);
  font-family: var(--sans);
}
.rp-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.rp-label {
  font-size: 13px;
  color: var(--stone);
}
.rp-name {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.05;
  color: var(--garnet);
  letter-spacing: -0.02em;
}
.rp-sub {
  font-size: 14px;
}
.rp-bar {
  width: 100% !important;
  height: 6px !important;
  margin-top: 6px;
}
.rp-streak {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  margin-top: 6px;
}
.rp-streak .bicon {
  color: #c2551f;
}
.rp-h {
  font-size: 13px;
  color: var(--stone);
  margin: 12px 0 4px;
}
.rp-all {
  margin-top: 10px;
  font-size: 14px;
}
.actions {
  list-style: none;
  margin: 0;
  padding: 0;
}
.action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 4px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background-color var(--t) var(--ease);
}
.actions li:last-child .action {
  border-bottom: 0;
}
.action:hover {
  background: var(--wash);
}
.a-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.a-what {
  font-size: 15px;
  color: var(--ink);
}
.a-why {
  font-size: 13px;
  color: var(--stone);
}
.a-pts {
  font-size: 13px;
  font-weight: 600;
  color: var(--leaf);
  background: var(--leaf-soft);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#profActions {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 2px 10px;
  margin: 10px 0 0;
}
/* profile */
.rank-card {
  background: linear-gradient(160deg, #fbf6f4, #f6ecee);
  border: 1px solid #efe2e4;
  border-radius: 16px;
  padding: 26px 26px 20px;
  margin-bottom: 30px;
}
.rank-card .big-rank {
  margin-bottom: 6px;
}
.rank-text {
  margin: 0 0 16px;
  font-size: 18px;
  max-width: 28em;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 460px;
}
.steps span {
  height: 8px;
  border-radius: 999px;
  background: #eadfe0;
  overflow: hidden;
}
.steps i {
  display: block;
  height: 100%;
  background: var(--garnet);
  border-radius: 999px;
  transition: width 0.9s var(--ease-out);
}
.steps span.full i {
  background: var(--leaf);
}
.rank-line {
  margin: 10px 0 0;
}
.rank-line b {
  color: var(--ink);
  font-weight: 600;
}
.ladder li {
  grid-template-columns: 24px 1fr auto;
  align-items: start;
}
.ladder .mark {
  margin-top: 3px;
}
.l-name {
  display: block;
}
.l-text {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
  font-weight: 400;
  line-height: 1.35;
}
.how {
  margin: 22px 0 0;
  border-top: 1px solid var(--rule);
}
.how summary {
  cursor: pointer;
  padding: 14px 0;
  font-family: var(--serif);
  font-size: 20px;
}
.ptable {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
  margin: 0 0 10px;
}
.ptable td {
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.ptable td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--leaf);
  font-weight: 600;
}
.badges {
  list-style: none;
  margin: 12px 0 30px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.badge {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -16px rgba(31, 26, 27, 0.45);
}
.b-medal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wash);
  color: #b3aaa4;
  margin-bottom: 6px;
  border: 1.5px dashed #d6cec8;
}
.badge.won .b-medal {
  background: radial-gradient(circle at 35% 30%, #fff3d6, #e8c27a);
  color: #6b4a12;
  border: 1.5px solid #c99a45;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}
.b-name {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.2;
}
.badge:not(.won) .b-name {
  color: var(--stone);
}
.b-desc {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--stone);
  line-height: 1.35;
  flex: 1;
}
.b-prog {
  height: 4px;
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
  margin-top: 6px;
}
.b-prog i {
  display: block;
  height: 100%;
  background: var(--garnet);
}
.b-pts {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--stone);
  margin-top: 2px;
}
.badge.won .b-pts {
  color: var(--leaf);
  font-weight: 600;
}
.plog {
  list-style: none;
  margin: 8px 0 30px;
  padding: 0;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 14px;
}
.plog li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.pl-when {
  font-size: 12.5px;
  color: var(--stone);
}
.pl-pts {
  color: var(--leaf);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* rank up */
.rankup {
  border: 0;
  border-radius: 20px;
  padding: 0;
  max-width: min(440px, 92vw);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
}
.rankup::backdrop {
  background: rgba(31, 26, 27, 0.5);
  backdrop-filter: blur(3px);
  animation: fadeIn 260ms var(--ease);
}
.rankup[open] {
  animation: lbIn 380ms var(--ease-out);
}
.ru-body {
  padding: 34px 30px 26px;
  text-align: center;
  position: relative;
}
.ru-ring {
  width: 110px;
  height: 110px;
  display: block;
  margin: 0 auto 8px;
  transform: rotate(-90deg);
}
.ru-track {
  fill: none;
  stroke: var(--garnet-soft);
  stroke-width: 7;
}
.ru-fill {
  fill: none;
  stroke: var(--garnet);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: ringFill 1.1s 200ms var(--ease-out) forwards;
}
@keyframes ringFill {
  to {
    stroke-dashoffset: 0;
  }
}
.ru-label {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin: 0;
}
.ru-name {
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--garnet);
  margin: 6px 0 10px;
  animation: rise 600ms 350ms var(--ease-out) both;
}
.ru-text {
  margin: 0 0 8px;
  font-size: 18px;
}
.ru-next {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin: 0 0 18px;
}
@media (max-width: 700px) {
  .rankpop {
    position: fixed;
    left: 12px;
    right: 12px;
    width: auto;
    top: calc(var(--head, 100px) + 6px);
  }
  button.rank {
    text-align: left;
    margin: 0;
    padding: 2px 4px;
  }
  .rank-card {
    padding: 20px 18px 16px;
  }
  .badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.rankpop {
  position: fixed;
  top: calc(var(--head, 90px) + 6px);
  right: max(12px, calc((100vw - var(--page)) / 2 + 22px));
}

/* =====================================================================
   v12: wine and beer as two worlds, calmer layout
   ===================================================================== */
body {
  transition: background-color 400ms var(--ease);
}
body[data-mode="ol"] {
  --garnet: #8a5410;
  --garnet-2: #a3651a;
  --garnet-soft: #f8eedd;
  --leaf: #4f5d36;
  --card: #fbf8f2;
  --card-line: #efe6d6;
}
body[data-mode="ol"] ::selection {
  background: #f1dfbd;
}
body[data-mode="ol"] .rank-card {
  background: linear-gradient(160deg, #fcf8f1, #f7ecd8);
  border-color: #efe1c6;
}
body[data-mode="ol"] .steps span {
  background: #eee2cc;
}
body[data-mode="ol"] .door-ol {
  box-shadow: 0 0 0 3px var(--garnet);
}
body[data-mode="vin"] .door-vin {
  box-shadow: 0 0 0 3px var(--garnet);
}
.door {
  transition: box-shadow 300ms var(--ease);
}
.brand,
.big-rank,
.home-intro h1,
.theme-title,
.home-theme h2,
.rp-name,
.ru-name {
  transition: color 400ms var(--ease);
}
.rankup[data-mode="ol"] {
  --garnet: #8a5410;
  --garnet-soft: #f8eedd;
}

/* panel: fewer, smaller controls */
.toggles {
  gap: 6px;
  margin-bottom: 22px;
}
.toggle {
  padding: 6px 11px;
  min-height: 34px;
  font-size: 13.5px;
  border-radius: 999px !important;
}
.ai-sum {
  border-top: 0;
  margin: 0 0 26px;
  padding: 0;
}
.ai-sum.has {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.sum-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
  background: var(--garnet-soft);
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 11px 14px;
  cursor: pointer;
  font-family: var(--sans);
  transition:
    border-color var(--t) var(--ease),
    background-color var(--t) var(--ease);
}
.sum-btn:hover {
  border-color: var(--garnet);
}
.sum-t {
  font-size: 15px;
  font-weight: 500;
  color: var(--garnet);
}
.sum-s {
  font-size: 13px;
  color: var(--stone);
}
.facts {
  margin-bottom: 12px;
}
.profile-bars {
  gap: 4px;
  margin-bottom: 14px;
}
.foods {
  margin-bottom: 14px;
}
.tasks-head {
  margin-top: 4px;
}

/* profile: calmer */
.prof-top {
  margin: 0 0 18px;
}
.prof-switch {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  margin: 0;
  padding: 10px 14px;
  background: var(--wash);
  border-radius: var(--r);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.prof-switch b {
  color: var(--ink);
  font-weight: 600;
}
.prof-switch .link {
  font-size: 14px;
  margin-left: auto;
}
.badges {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-bottom: 14px;
}
.badge {
  padding: 12px;
}
.b-medal {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
}
.stats {
  margin-bottom: 30px;
}
.stat b {
  font-size: 34px;
}
.how {
  margin-top: 10px;
}
.how summary {
  font-size: 18px;
  padding: 12px 0;
}
.ladder {
  margin-top: 0;
  border-top: 0;
}

/* home: less at once */
.home-what {
  padding-top: 34px;
}
.home-grid article {
  padding-bottom: 24px;
}
.toast-item {
  max-width: 340px;
}
.prof-switch {
  display: block;
}
.prof-switch .link {
  margin-left: 8px;
}

/* =====================================================================
   v13: one typeface (Lora), simpler and calmer
   ===================================================================== */
:root {
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Lora", Georgia, "Times New Roman", serif;
}
body {
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}
@media (min-width: 1560px) {
  body {
    font-size: 18px;
  }
}
h1,
h2,
h3,
.wine-name,
.big-rank,
.home-intro h1,
.theme-title,
.home-theme h2,
.rp-name,
.ru-name,
.door-h,
.about h2,
.intro h2,
.fact-text,
.home-h,
.section-h,
.block-h {
  letter-spacing: -0.01em;
}
.home-intro h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 500;
  margin-bottom: 12px;
}
.home-lede {
  font-size: clamp(18px, 1.6vw, 21px);
  margin-bottom: 22px;
  color: var(--stone);
}
.wine-name {
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.08;
  font-weight: 500;
}
.big-rank {
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  font-weight: 500;
}
.fact-text {
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.45;
}
.theme-title {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
}
.place {
  font-size: 19px;
}
.btn {
  font-weight: 600;
  letter-spacing: 0.005em;
}
.small,
.kicker,
.flabel,
.rsub,
.tt,
.a-why,
.b-desc,
.mcredit,
.map-hint,
.legend,
.step {
  letter-spacing: 0;
}
.tabs {
  font-size: 16.5px;
}
.tabs a[aria-current="page"] {
  font-weight: 600;
}
.rank-name {
  font-size: 16px;
}
.rank-pts,
.rank-step,
.small,
.rsub,
.legend,
.map-hint,
.mcredit,
.b-desc,
.b-pts,
.a-why,
.pl-when {
  font-size: 13.5px;
}
.toggle,
.fchip,
.tchip,
.seg button,
.viewswitch button,
.mapbar button,
.sum-s {
  font-size: 14px;
}
.stat b,
.score {
  font-weight: 500;
}
/* the two cards on the front page are the main thing */
.home-intro .home-doors {
  margin: 8px 0 14px;
  gap: 14px;
}
.home-intro .door,
.door {
  min-height: clamp(220px, 24vw, 330px);
}
.door-h {
  font-size: clamp(44px, 5vw, 70px);
  font-weight: 500;
}
.door-sub {
  font-size: 16px;
}
@media (max-width: 700px) {
  .home-intro .door,
  .door {
    min-height: 170px;
  }
  .door-h {
    font-size: 46px;
  }
}
/* calmer motion */
.panel.enter > * {
  animation-duration: 320ms;
}
.panel.enter > :nth-child(n + 2) {
  animation-delay: 0ms;
}
b,
strong {
  font-weight: 600;
}
/* colour only on main buttons and links; everything else neutral */
:root {
  --leaf: #3a3433;
  --leaf-soft: #efecea;
}
body[data-mode="ol"] {
  --leaf: #3a3433;
  --leaf-soft: #efecea;
}
.a-pts,
.pl-pts,
.ptable td:last-child,
.badge.won .b-pts,
.task.done .task-pts {
  color: var(--ink);
  background: transparent;
}
.a-pts {
  border: 1px solid var(--rule);
}
.bar > span,
.steps i,
.steps span.full i,
.progress-line i.on,
.b-prog i {
  background: var(--ink);
}
.task.done .check,
.theme-steps li.done .check,
.ladder li.reached .mark {
  background: var(--ink);
  border-color: var(--ink);
}
.feedback .ok {
  color: var(--ink);
}
.opt.right {
  border-color: var(--ink);
  background: var(--wash);
}
.badge.won .b-medal {
  background: var(--wash);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.rank-card,
body[data-mode="ol"] .rank-card {
  background: var(--card);
  border-color: var(--card-line);
}
.big-rank {
  color: var(--ink);
}
.ladder li.current {
  color: var(--ink);
}
.home-intro h1,
.theme-title,
.home-theme h2 {
  color: var(--ink);
}
.brand {
  color: var(--garnet);
}
.panel .lede {
  margin-top: 2px;
}
/* price and occasion */
.info {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 4px 14px;
  margin: 0 0 18px;
}
.info-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
}
.info-row + .info-row {
  border-top: 1px solid var(--rule);
}
.info-k {
  font-size: 14px;
  color: var(--stone);
}
.info-v {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.info-hint {
  font-size: 13.5px;
  color: var(--stone);
  flex-basis: 100%;
}
.price {
  display: inline-flex;
  gap: 2px;
  margin-right: 4px;
}
.price i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: #cfc8c2;
  letter-spacing: 0;
}
.price i.on {
  color: var(--ink);
}
.occs {
  gap: 6px;
}
.occ {
  font: inherit;
  font-size: 14px;
  background: var(--garnet-soft);
  color: var(--garnet);
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: filter var(--t) var(--ease);
}
.occ:hover {
  filter: brightness(0.96);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 520px) {
  .info-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.price {
  gap: 3px;
  align-self: center;
}
.price i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ddd6d0;
  display: inline-block;
}
.price i.on {
  background: var(--ink);
}
/* profile without points */
.prof-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.prof-title {
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 42px);
  margin: 0;
}
.stats4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 36px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 700px) {
  .stats4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.task-pts:empty {
  display: none;
}
.tasks-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 12px 16px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color var(--t) var(--ease);
}
.tasks-toggle:hover {
  border-color: var(--ink);
}
.tasks-toggle span:first-child::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  margin-left: 10px;
}
/* front page: search, popular, food */
.home-search {
  margin: 0 0 38px;
}
.home-sform {
  display: flex;
  gap: 10px;
  max-width: 720px;
}
.home-sform .field {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  padding: 12px 16px;
  min-height: 50px;
}
.home-sform .btn {
  min-height: 50px;
  padding: 0 22px;
}
.home-pop {
  margin: 0 0 40px;
}
.pop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.pop {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.pop-img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4/3;
  border-radius: var(--r) !important;
  margin-bottom: 8px;
}
.pop-img::after {
  display: none;
}
.pop-name {
  font-size: 17px;
  line-height: 1.25;
  transition: color var(--t) var(--ease);
}
.pop:hover .pop-name {
  color: var(--garnet);
}
.pop-sub {
  font-size: 13.5px;
  color: var(--stone);
}
.home-food {
  margin: 0 0 44px;
  padding: 26px 28px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 14px;
}
.home-food .home-h {
  margin-bottom: 4px;
}
.home-food-p {
  margin: 0 0 14px;
  color: var(--stone);
}
@media (max-width: 560px) {
  .pop-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-food {
    padding: 20px 18px;
  }
}
html {
  scroll-padding-bottom: calc(var(--dockh, 0px) + 16px);
}
.pop-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 560px) {
  .pop-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* sommelier */
.somm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .somm-grid {
    grid-template-columns: 1fr;
  }
}
.somm-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.somm-intro {
  margin: 4px 0 16px;
}
.somm-log {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px;
  min-height: 260px;
  max-height: min(58vh, 620px);
  overflow: auto;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.somm-q {
  align-self: flex-end;
  max-width: 85%;
  margin: 0;
  background: var(--garnet);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  font-size: 16px;
  line-height: 1.45;
}
.somm-a {
  align-self: flex-start;
  max-width: 92%;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 12px 16px;
  border-radius: 14px 14px 14px 4px;
  font-size: 16px;
}
.somm-a p:last-child {
  margin-bottom: 0;
}
.somm-start {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
}
.somm-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.somm-form .field {
  flex: 1;
  min-width: 0;
  min-height: 48px;
}
.somm-item {
  font-weight: 600;
}
.somm-side .section-h {
  margin-bottom: 12px;
}
.small-recs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.pop-why {
  font-size: 12.5px;
  color: var(--stone);
  line-height: 1.35;
  margin-top: 2px;
}
.prof-recs {
  margin: 0 0 34px;
}
.prof-recs .section-h {
  margin-bottom: 12px;
}
.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 15px;
  color: var(--garnet);
  border: 1px dashed var(--garnet);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  cursor: pointer;
  background: var(--garnet-soft);
}
.photo-btn:hover {
  border-style: solid;
}
.photo-out {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: #fff;
}
.photo-thumb {
  width: 110px;
  height: 146px;
  object-fit: cover;
  border-radius: var(--r-sm);
}
@media (max-width: 520px) {
  .photo-out {
    grid-template-columns: 1fr;
  }
  .photo-thumb {
    width: 100%;
    height: auto;
    max-height: 220px;
  }
}
@media (max-width: 440px) {
  .tabs {
    gap: 13px !important;
    font-size: 15px;
  }
}
@media (max-width: 350px) {
  .tabs {
    gap: 10px !important;
    font-size: 14px;
  }
}
/* smart search, voice, taste */
.sg-smart {
  background: var(--garnet-soft) !important;
  color: var(--garnet);
}
.sg-k {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 4px;
}
.mic {
  flex: none;
  width: 48px;
  min-height: 48px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background-color var(--t) var(--ease),
    color var(--t) var(--ease);
}
.mic:hover {
  border-color: var(--ink);
}
.mic.on {
  background: var(--garnet);
  color: #fff;
  border-color: var(--garnet);
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  50% {
    box-shadow: 0 0 0 6px var(--garnet-soft);
  }
}
.somm-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin-top: 10px;
  font-size: 14px;
}
.somm-speak {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--stone);
  cursor: pointer;
}
.taste-prof {
  margin: 0 0 30px;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.taste-sum {
  margin: 6px 0 14px;
}
.today-rec {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.tr-img {
  width: 64px !important;
  height: 64px !important;
  flex: none;
}
.tr-name {
  font-size: 19px;
}
/* sommelier map, like a maps app */
.somm-mapbox {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rule);
  margin-bottom: 12px;
}
.somm-map {
  height: 300px;
  background: #e8edee;
}
.somm-map .jvm-marker {
  transition: r 200ms var(--ease);
}
#sommMapEl text,
.somm-map .jvm-marker-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
  pointer-events: none;
  transform: translate(-3px, 4px);
}
.somm-picks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pick {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition:
    border-color var(--t) var(--ease),
    transform 200ms var(--ease);
}
.pick:hover {
  border-color: var(--ink);
  transform: translateX(2px);
}
.pick-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--garnet);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.pick-img {
  width: 52px !important;
  height: 52px !important;
}
.pick-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pick-name {
  font-size: 16px;
  line-height: 1.25;
}
.pick-sub {
  font-size: 13px;
  color: var(--stone);
}
.somm-acts {
  margin-top: 12px;
  gap: 8px;
}
.shop {
  margin: 0 0 34px;
}
.shop-del {
  margin-left: 8px;
  font-size: 13px;
}
@media (max-width: 900px) {
  .has-picks .somm-side {
    order: -1;
  }
  .somm-map {
    height: 240px;
  }
}
