/* NIKORI flavor maps — /nikori/map (templates/nikori/map.html + partials/nikori_map_board.html).
   Phone first: the board is a full-width square at 375px with 28px numbered markers.
   A marker's name shows as a tooltip on hover/focus only — always-on labels collide
   wherever bottles cluster; the numbered cards are the key. Colours: nikori.css tokens. */

.sm { max-width: 720px; margin: 0 auto; padding: 36px 16px 56px; }
.sm-head { margin-bottom: 18px; }
.sm-title { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.2; margin: 4px 0 6px; color: var(--color-text-primary); }
.sm-sub { color: var(--color-text-secondary); font-size: .95rem; margin: 0; }
.sm-empty, .sm-hint { color: var(--color-text-secondary); font-size: .85rem; }
.sm-more { margin-top: 28px; text-align: center; }
.sm-more a { color: var(--color-accent-gold-light); font-weight: 600; text-decoration: none; }

/* tabs */
.sm-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.sm-tabs::-webkit-scrollbar { display: none; }
.sm-tab { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none;
  color: var(--color-text-secondary); border: 1px solid rgba(232, 213, 184, .22); }
.sm-tab.is-on { background: var(--color-cream); border-color: var(--color-cream); color: #1a231d; }

/* the board: poles around a square */
.sm-frame { display: grid; grid-template-columns: 22px 1fr 22px; grid-template-rows: auto auto auto; gap: 6px; }
.sm-pole { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-cream);
  text-align: center; }
.sm-pole--top { grid-column: 1 / -1; }
.sm-pole--bottom { grid-column: 1 / -1; }
.sm-pole--left, .sm-pole--right { display: flex; align-items: center; justify-content: center; }
.sm-pole--left span, .sm-pole--right span { writing-mode: vertical-rl; white-space: nowrap; }
.sm-pole--left span { transform: rotate(180deg); }

.sm-board { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; background: #101814;
  border: 1px solid var(--color-border); }
.sm-q { position: absolute; width: 50%; height: 50%; }
.sm-q--tl { left: 0; top: 0; border-top-left-radius: 15px; background: rgba(90, 171, 118, .10); }
.sm-q--tr { right: 0; top: 0; border-top-right-radius: 15px; background: rgba(232, 170, 90, .09); }
.sm-q--bl { left: 0; bottom: 0; border-bottom-left-radius: 15px; background: rgba(150, 190, 230, .07); }
.sm-q--br { right: 0; bottom: 0; border-bottom-right-radius: 15px; background: rgba(230, 150, 190, .07); }
.sm-axis { position: absolute; border-color: rgba(232, 213, 184, .16); border-style: dashed; border-width: 0; }
.sm-axis--v { left: 50%; top: 4%; bottom: 4%; border-left-width: 1px; }
.sm-axis--h { top: 50%; left: 4%; right: 4%; border-top-width: 1px; }

.sm-marker { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; background: var(--color-cream); color: #1a231d; font: 800 .8rem/28px var(--font-body);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45); transition: transform .12s ease; }
.sm-marker:hover, .sm-marker:focus-visible { transform: translate(-50%, -50%) scale(1.12); outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-gold-light); }
.sm-marker-name { display: none; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  white-space: nowrap; padding: 4px 9px; border-radius: 8px; background: var(--color-bg-card); border: 1px solid var(--color-border);
  color: var(--color-text-primary); font: 500 .74rem/1.2 var(--font-body); pointer-events: none; z-index: 2; }
.sm-marker:hover, .sm-marker:focus-visible { z-index: 3; }
.sm-marker:hover .sm-marker-name, .sm-marker:focus-visible .sm-marker-name { display: block; }

/* columns maps (Bubbly): two lanes */
.sm-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-lane { background: #101814; border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 10px; }
.sm-lane-title { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--color-cream);
  text-align: center; margin-bottom: 8px; }
.sm-lane-item { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 7px 6px; margin: 0;
  background: none; border: 0; border-radius: 10px; color: var(--color-text-primary); font: 500 .82rem/1.3 var(--font-body);
  cursor: pointer; }
.sm-lane-item:hover { background: var(--color-bg-card-hover); }

/* cards, grouped by corner / column */
.sm-groups { margin-top: 22px; }
.sm-group + .sm-group { margin-top: 16px; }
.sm-group-title { font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent-gold-light); margin: 0 0 8px; }
.sm-card { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; margin: 0 0 8px;
  background: var(--gradient-card); border: 1px solid var(--color-border); border-radius: 14px; color: var(--color-text-primary);
  font-family: var(--font-body); cursor: pointer; }
.sm-card:hover, .sm-card:focus-visible { border-color: var(--color-accent-gold-light); outline: none; }
.sm-num { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--color-cream); color: #1a231d;
  font: 800 .75rem/24px var(--font-body); text-align: center; }
.sm-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sm-card-name { font-weight: 600; }
.sm-card-jp { font-size: .78rem; color: var(--color-text-muted); }
.sm-card-line { font-size: .86rem; color: var(--color-cream); }
.sm-card-line.is-fallback { color: var(--color-text-secondary); }
.sm-card-meta { font-size: .78rem; color: var(--color-text-secondary); }

/* quiz result: the guest's point, the picks, everything else dimmed */
.sm-inline { color: var(--color-accent-gold-light); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sm-here { position: absolute; width: 22%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(90, 171, 118, .18); border: 1.5px dashed var(--color-accent-gold-light); pointer-events: none; }
.sm-here span { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); white-space: nowrap;
  font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent-gold-light); }
.sm-marker.is-pick { width: 34px; height: 34px; line-height: 34px; z-index: 2;
  box-shadow: 0 0 0 3px var(--color-accent-gold-light), 0 2px 10px rgba(0, 0, 0, .5); }
.sm-marker.is-dim, .sm-lane-item.is-dim { opacity: .38; }
.sm-marker.is-dim:hover, .sm-marker.is-dim:focus-visible { opacity: 1; }
.sm-lane-item.is-pick { background: var(--color-accent-gold-dim); }
.sm-card.is-pick { border-color: var(--color-accent-gold-light); }

/* bottle photos: white-background product shots on a cream panel, the white
   multiplied away so a bottle sits *on* the panel rather than in a white box */
.sm-thumb, .sm-bottle-photo { position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  background: var(--color-cream-light); overflow: hidden; }
.sm-thumb img, .sm-bottle-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.sm-thumb { width: 52px; height: 68px; border-radius: 10px; padding: 4px; }
.sm-thumb .sm-num, .sm-bottle-photo .sm-num { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px;
  font-size: .68rem; line-height: 20px; background: #1a231d; color: var(--color-cream); }

/* the answer: a swipeable strip, next card peeking so the swipe is obvious */
.sm-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px -16px 4px;
  padding: 4px 16px 10px; scrollbar-width: none; }
.sm-strip::-webkit-scrollbar { display: none; }
.sm-bottle { flex: 0 0 68%; max-width: 260px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 3px;
  text-align: left; padding: 0 0 12px; border-radius: 18px; overflow: hidden; cursor: pointer; font-family: var(--font-body);
  background: var(--gradient-card); border: 1px solid var(--color-accent-gold-light); color: var(--color-text-primary); }
.sm-bottle:focus-visible { outline: 2px solid var(--color-cream); outline-offset: 2px; }
.sm-bottle-photo { aspect-ratio: 4 / 5; width: 100%; padding: 14px 18px 8px; margin-bottom: 6px; }
.sm-bottle-photo .sm-num { top: 10px; left: 10px; width: 26px; height: 26px; font-size: .8rem; line-height: 26px; }
.sm-bottle-name, .sm-bottle .sm-card-line, .sm-bottle .sm-card-meta { padding: 0 14px; }
.sm-bottle-name { font-weight: 700; line-height: 1.25; }
.sm-where { margin: 6px 0 12px; font-size: .78rem; color: var(--color-text-secondary); }
.sm-all-title { font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--color-text-secondary); margin: 0 0 12px; }

/* the quiz */
.sq-step { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent-gold-light); margin: 0; }
.sq-context { color: var(--color-text-secondary); margin: 0 0 18px; }
.sq-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sq-mood { display: flex; flex-direction: column; gap: 2px; padding: 16px 14px; border-radius: 16px; text-decoration: none;
  background: var(--color-bg-card); border: 1px solid var(--color-border); color: var(--color-text-primary); }
.sq-mood:hover, .sq-mood:focus-visible { border-color: var(--color-accent-gold-light); outline: none; }
.sq-mood-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 8px; border-radius: 50%;
  color: var(--color-cream); background: var(--color-accent-gold-dim); border: 1px solid var(--color-border); }
.sq-mood:hover .sq-mood-icon, .sq-mood:focus-visible .sq-mood-icon { color: var(--color-cream-light);
  border-color: var(--color-accent-gold-light); }
.sq-mood-title { font-weight: 700; }
.sq-mood-hint { font-size: .8rem; color: var(--color-text-secondary); }
.sq-options { display: grid; gap: 10px; }
.sq-option { display: block; padding: 18px 16px; border-radius: 14px; text-align: center; text-decoration: none; font-weight: 700;
  background: var(--color-bg-card); border: 1px solid var(--color-border); color: var(--color-text-primary); }
.sq-option.is-middle { font-weight: 500; color: var(--color-text-secondary); }
.sq-option:hover, .sq-option:focus-visible { border-color: var(--color-accent-gold-light); outline: none; }
.sq-skip, .sq-back { margin-top: 22px; text-align: center; }
.sq-skip a, .sq-back a { color: var(--color-accent-gold-light); font-weight: 600; text-decoration: none; }

@media (min-width: 760px) {
  .sm { padding-top: 48px; }
  .sm-strip { margin: 6px 0 4px; padding: 4px 0 10px; overflow: visible; }
  .sm-bottle { flex: 1 1 0; max-width: none; }
  .sm-frame { grid-template-columns: 28px 1fr 28px; }
}

/* ── The QR door (/nikori/start): three ways in, the flight first ───────────── */
.sd-cards { display: grid; gap: 10px; margin-top: 18px; }
.sd-card { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 16px; text-decoration: none;
  background: var(--color-bg-card); border: 1px solid var(--color-border); color: var(--color-text-primary); }
.sd-card:hover, .sd-card:focus-visible { border-color: var(--color-accent-gold-light); outline: none; }
.sd-card--flight { background: var(--color-accent-gold-dim); border-color: var(--color-accent-gold-light); }
.sd-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent-gold-light); }
.sd-title { font-weight: 700; font-size: 1.05rem; }
.sd-hint { font-size: .82rem; color: var(--color-text-secondary); }
.sd-foot { margin-top: 22px; text-align: center; font-size: .82rem; color: var(--color-text-secondary); }
