@import url("./lb-tokens.css");

/* Salon-app: altid digital dark (Contexts/LittleBourgogne/brand-visual.md) */
html {
  color-scheme: dark;
}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
  background-color: var(--lb-bg);
  color: var(--lb-fg);
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  max-width: 100%;
  font-family: var(--sans);
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(107, 31, 42, 0.25), transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  line-height: 1.5;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--ambient-backdrop, none), var(--wine-backdrop, none);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

body[data-view="welcome"]::before,
body[data-view="intro"]::before,
body[data-view="tasting"]::before,
body[data-view="done"]::before {
  opacity: 0.14;
}

body[data-view="tasting"]::before {
  opacity: 0.2;
}

body[data-view="welcome"]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.35) 0%, var(--bg) 42%);
  pointer-events: none;
}

.salon-frame {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 2rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.salon-frame--host {
  max-width: min(72rem, 100%);
  width: 100%;
  padding: 1rem clamp(0.85rem, 3vw, 1.5rem) 2rem;
  min-width: 0;
}

.ornament {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.35em;
  font-size: 0.65rem;
  margin: 0.5rem 0;
  opacity: 0.85;
}

.logo-wrap {
  text-align: center;
  margin-bottom: 0.75rem;
}

.logo-wrap img {
  display: block;
  margin: 0 auto;
  max-width: min(16rem, 92vw);
  width: auto;
  height: auto;
  max-height: 3.25rem;
  object-fit: contain;
}

#app-root {
  width: 100%;
  flex: 1 0 auto;
  min-width: 0;
}

.salon-frame {
  overflow-x: clip;
}

/* —— Napoleon / billedbank —— */
.napoleon-hero {
  margin: 0 0 1.35rem;
  position: relative;
}

.napoleon-hero__frame {
  border: 1px solid var(--gold);
  padding: 3px;
  background: linear-gradient(
    145deg,
    rgba(27, 58, 107, 0.35),
    rgba(201, 162, 39, 0.15),
    transparent
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 12px 40px rgba(0, 0, 0, 0.45);
}

.napoleon-hero__frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold-dim);
  pointer-events: none;
  z-index: 1;
}

.napoleon-hero__img {
  display: block;
  width: 100%;
  max-height: min(46vh, 22rem);
  object-fit: cover;
  object-position: center 15%;
}

.napoleon-hero__caption {
  margin: 0;
  padding: 0.65rem 0.75rem;
  text-align: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: linear-gradient(180deg, transparent, rgba(10, 12, 16, 0.85));
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
}

.napoleon-hero__badge {
  margin-right: 0.35rem;
}

.napoleon-accent {
  width: 4.5rem;
  margin: 0 auto 0.75rem;
  opacity: 0.85;
}

.napoleon-accent__img {
  width: 100%;
  border-radius: 50%;
  border: 1px solid var(--gold);
  object-fit: cover;
  aspect-ratio: 1;
}

.wine-banner {
  margin: -0.25rem 0 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: 2px;
}

.wine-banner img {
  width: 100%;
  height: 8.5rem;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.05);
}

.wine-banner__shade {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Host — Napoleon nøgleposition */
.host-hero-row {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 720px) {
  .host-hero-row {
    grid-template-columns: minmax(220px, 320px) 1fr;
    align-items: start;
  }
}

.host-napoleon {
  margin: 0;
}

.host-napoleon .napoleon-hero__img {
  max-height: min(52vh, 28rem);
}

.host-napoleon .napoleon-hero__caption {
  font-size: 1.05rem;
}

.host-intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.host-intro-copy .salon-title {
  text-align: left;
  font-size: 2.2rem;
}

.host-intro-copy .lede {
  text-align: left;
}

.host-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.host-gallery img {
  width: 100%;
  height: 4rem;
  object-fit: cover;
  border: 1px solid var(--border);
  opacity: 0.75;
}

.eyebrow {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

h1.salon-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin: 0.25rem 0 0.5rem;
  line-height: 1.15;
}

.lede {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.15rem 1rem;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  pointer-events: none;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
}

.field textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.consent-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.25rem 0 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.consent-row input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--gold);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.22), rgba(201, 162, 39, 0.08));
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 44px;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.progress-dots span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--border);
}

.progress-dots span.active {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-dim);
}

.scenario {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 0 0 1.1rem;
  text-align: center;
}

.choice-card {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 52px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-panel);
  color: var(--fg);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.choice-card:hover {
  background: var(--bg-panel-hover);
}

.choice-card:active {
  transform: scale(0.99);
}

.choice-card.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 12px var(--gold-dim);
}

/* Role reveal */
.reveal-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 6, 8, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.reveal-screen.visible {
  opacity: 1;
  pointer-events: auto;
}

.reveal-inner {
  max-width: 24rem;
  text-align: center;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.9s ease, opacity 0.9s ease;
}

.reveal-screen.visible .reveal-inner {
  transform: translateY(0);
  opacity: 1;
}

.reveal-symbol {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 12px var(--gold-dim));
}

.reveal-dramatic {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.reveal-title {
  font-family: var(--serif);
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.reveal-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--fg);
}

.reveal-body {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.reveal-error {
  font-size: 0.85rem;
  color: #f0b4b4;
  background: rgba(107, 31, 42, 0.35);
  border: 1px solid rgba(240, 180, 180, 0.35);
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  text-align: left;
  line-height: 1.4;
}

.reveal-fallback {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--gold);
  font-family: var(--serif);
}

.reveal-fallback-btn {
  margin-top: 0.75rem;
  width: 100%;
}

.reveal-fallback-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.reveal-fallback-hint code {
  color: var(--gold);
  font-size: 0.85em;
}

/* Tasting */
.wine-header {
  text-align: center;
  margin-bottom: 1rem;
}

.wine-code {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
}

.score-row {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.score-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.12s;
}

.score-btn.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.2);
  color: var(--gold);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.chip {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  min-height: 36px;
}

.chip.selected {
  border-color: var(--gold);
  color: var(--fg);
  background: rgba(201, 162, 39, 0.15);
}

.view-hidden {
  display: none !important;
}

.status-bar {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: auto;
  padding-top: 1rem;
}

.status-bar.error {
  color: #e8a0a0;
}

.host-connectivity-banner {
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: rgba(180, 120, 60, 0.15);
  border: 1px solid rgba(200, 160, 90, 0.35);
  font-size: 0.85rem;
  color: var(--text);
  text-align: left;
}

.host-connectivity-banner a {
  color: var(--gold);
}

.host-connectivity-banner .btn--sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-left: 0.35rem;
}

.session-create-steps {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

/* Host */
.host-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.host-grid > .host-card,
.host-grid > .panel {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 900px) {
  .host-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.host-card h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  color: var(--gold);
}

.host-card--wordcloud h2 {
  margin-bottom: 0.45rem;
}

#wordcloud-canvas {
  width: 100%;
  height: 100px;
  max-height: 100px;
  display: block;
}

.host-card--wordcloud {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.word-verdict-ticker {
  margin: 0;
  padding: 0;
  border-top: none;
  min-height: 2.5rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.word-hints-ticker {
  margin: 0 0 0.75rem;
  padding: 0;
  min-height: 2rem;
  width: 100%;
  overflow: hidden;
}

.word-hints-ticker__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.word-hints-ticker__track {
  display: flex;
  width: max-content;
  animation: word-verdict-scroll var(--ticker-duration, 60s) linear infinite;
}

.word-hints-ticker__group {
  display: flex;
  gap: 0.75rem;
  padding-right: 0.75rem;
  flex-shrink: 0;
  align-items: center;
}

.word-hint-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 6px;
  background: rgba(10, 12, 16, 0.35);
  font-size: 0.85rem;
  color: var(--text-muted, #9a9080);
}

.word-hint-chip__who {
  color: var(--gold, #c9a227);
  font-size: 0.8rem;
}

.word-hint-chip strong {
  color: var(--text, #f4efe6);
  text-transform: uppercase;
  font-weight: 600;
}

body.host-summary-mode .host-actions,
body.host-summary-mode #btn-reveal-winner,
body.host-summary-mode #btn-export-json,
body.host-summary-mode #btn-export-csv,
body.host-summary-mode #btn-export-participants {
  display: none !important;
}

.panel--resume {
  margin-bottom: 1rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.panel--resume .btn--ghost {
  margin-top: 0.5rem;
}

.word-verdict-ticker__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.word-verdict-ticker__track {
  display: flex;
  width: max-content;
  animation: word-verdict-scroll var(--ticker-duration, 48s) linear infinite;
}

.word-verdict-ticker__group {
  display: flex;
  gap: 1rem;
  padding-right: 1rem;
  flex-shrink: 0;
  align-items: center;
}

.word-verdict-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.07);
  font-size: 0.88rem;
  line-height: 1.35;
}

.word-verdict-symbol {
  font-size: 1rem;
}

.word-verdict-text {
  font-family: var(--serif);
  color: var(--fg);
}

.word-verdict-who {
  font-size: 0.72rem;
  color: var(--muted);
}

.word-verdict-empty {
  display: block;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
  text-align: center;
  padding: 0.5rem 0;
}

@keyframes word-verdict-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .word-verdict-ticker__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }

  .word-verdict-ticker__group[aria-hidden="true"] {
    display: none;
  }
}

.host-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.host-toolbar .btn {
  max-width: 12rem;
}

.new-session-panel {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
}

.new-session-panel .lede {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0.5rem 0 0.25rem;
}

.new-session-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.new-session-row input {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--fg);
}

.new-session-panel .btn {
  margin-top: 0.75rem;
}

.session-qr-stage[hidden] {
  display: none !important;
}

.session-qr-stage:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  margin: 0;
  background: rgba(8, 10, 14, 0.94);
  overflow-y: auto;
  grid-column: unset;
}

body.qr-overlay-open {
  overflow: hidden;
}

.session-qr-stage:not([hidden]) .session-qr-stage__inner {
  max-width: 28rem;
  width: 100%;
  padding: 1.25rem 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(26, 31, 42, 0.98), rgba(14, 17, 24, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.session-qr-loading {
  margin: 2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.session-qr-img {
  display: block;
  width: min(360px, 72vw);
  height: auto;
  border: 3px solid var(--gold);
  padding: 8px;
  background: #f4efe6;
  border-radius: 4px;
}

.session-qr-url {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
}

.session-qr-fallback a {
  color: var(--gold);
}

.session-qr-stage {
  text-align: center;
  padding: 1.25rem 1rem 1.5rem;
}

.session-qr-stage__inner {
  max-width: 32rem;
  margin: 0 auto;
}

.session-qr-ornament {
  margin-bottom: 0.35rem;
}

.session-qr-stage h2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 0.35rem;
  color: var(--gold);
}

.session-qr-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.session-qr-origin-hint {
  font-size: 0.82rem;
  color: var(--gold);
  margin: 0 0 1rem;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.25);
}

.session-qr-origin-hint--warn {
  color: #e8c090;
  background: rgba(180, 80, 60, 0.12);
  border-color: rgba(200, 120, 90, 0.35);
}

.session-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 12rem;
}

.session-qr canvas {
  display: block;
  width: min(360px, 72vw);
  height: auto;
  border: 3px solid var(--gold);
  padding: 8px;
  background: #f4efe6;
  border-radius: 4px;
}

.session-qr-img {
  margin: 0 auto;
}

.session-qr-event {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.session-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.session-qr-actions .btn {
  max-width: none;
}

.session-qr-details {
  margin-top: 1rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
}

.session-qr-details summary {
  cursor: pointer;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.wine-setup-lede {
  margin: -0.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.wine-setup-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.wine-setup-head,
.wine-setup-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 1.2fr 5.5rem 2.25rem;
  gap: 0.45rem;
  align-items: center;
}

.wine-setup-head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 0 0.15rem;
}

.wine-setup-block {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}

.wine-setup-ref-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
  padding-left: 4.95rem;
}

.wine-setup-ref-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.wine-setup-domain,
.wine-setup-name,
.wine-setup-vintage,
.wine-setup-notes {
  width: 100%;
  font-size: 0.88rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--fg);
}

.wine-setup-spacer {
  width: 2.25rem;
}

@media (max-width: 720px) {
  .wine-setup-head {
    display: none;
  }

  .wine-setup-row {
    grid-template-columns: 3.5rem 1fr;
  }

  .wine-setup-domain,
  .wine-setup-name,
  .wine-setup-vintage {
    grid-column: 2;
  }

  .wine-setup-ref-row {
    grid-template-columns: 1fr;
    padding-left: 0;
  }
}

.wine-setup-num {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1rem;
}

.wine-setup-remove {
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
}

.wine-setup-lookup {
  white-space: nowrap;
  font-size: 0.78rem;
}

.wine-setup-actions {
  margin-top: 0.85rem;
}

.wine-picker-section {
  margin-bottom: 1.25rem;
}

.wine-picker-heading {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.wine-picker-search {
  width: 100%;
  max-width: 24rem;
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(10, 12, 16, 0.5);
  color: var(--fg);
}

.wine-picker-grid {
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.wine-picker-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(201, 162, 39, 0.15);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.wine-picker-item__text {
  color: var(--muted);
  line-height: 1.35;
}

.wine-picker-selected {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wine-picker-selected-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 6px;
  background: rgba(10, 12, 16, 0.35);
}

.wine-picker-selected-num {
  font-family: var(--serif);
  color: var(--gold);
  min-width: 3rem;
}

.wine-picker-selected-label {
  flex: 1;
  font-size: 0.9rem;
  color: var(--fg);
}

.wine-picker-selected-actions {
  display: flex;
  gap: 0.25rem;
}

.wine-picker-empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.wine-picker-details {
  margin: 1rem 0;
  color: var(--muted);
}

.wine-picker-details summary {
  cursor: pointer;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.winner-stage {
  text-align: center;
  padding: 1.25rem 1rem 1.5rem;
}

.winner-stage h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--gold);
  margin: 0.35rem 0;
}

.winner-subtitle {
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.winner-score {
  font-family: var(--serif);
  color: var(--fg);
  margin: 0 0 1rem;
}

.winner-quotes {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  max-width: 40rem;
  margin-inline: auto;
}

.winner-quote {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.winner-quote-symbol {
  margin-right: 0.35rem;
}

.winner-quote blockquote {
  margin: 0.25rem 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--fg);
}

.winner-quote-who {
  font-size: 0.78rem;
  color: var(--muted);
}

.winner-quote-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rank-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.rank-list li > span:first-child {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.rank-list .avg {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.2rem;
}

.story-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guest-roster-lede {
  margin: -0.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.guest-roster {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.guest-roster-empty {
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}

.guest-roster-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.06);
  font-size: 0.92rem;
  line-height: 1.3;
}

.guest-roster-symbol {
  font-size: 1.05rem;
}

.guest-roster-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--fg);
}

.guest-roster-role {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.guest-roster-role::before {
  content: "·";
  margin-right: 0.35rem;
  color: var(--muted);
}

.story-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.story-list .who {
  color: var(--gold);
  font-family: var(--serif);
}

.role-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.role-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.78rem;
}

.role-bar-row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.role-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.role-bar-fill {
  height: 100%;
  background: var(--gold);
}

.host-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
  min-width: 0;
}

.host-actions .btn {
  width: auto;
  flex: 1 1 9rem;
  min-width: min(100%, 8.5rem);
  max-width: 100%;
}

/* Vært: aktiv session + mine sessioner */
.host-session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.65rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.08);
  font-size: 0.88rem;
}

.host-session-bar__label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

.host-session-bar__code {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
}

.host-session-bar__live {
  color: #6ecf8a;
  font-size: 0.78rem;
  margin-left: auto;
}

.session-create-stage .field {
  margin-bottom: 0.75rem;
}

.host-sessions-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.host-sessions-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
}

.host-sessions-item:hover {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.06);
}

.host-sessions-item--active {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
}

.host-sessions-item__name {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.host-sessions-item__meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
}

/* Pointtavle — sorteret deltagerliste */
.guest-roster {
  flex-direction: column;
  flex-wrap: nowrap;
}

.guest-roster-item--ranked {
  display: grid;
  grid-template-columns: 1.75rem 1.25rem minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.65rem;
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background: rgba(201, 162, 39, 0.05);
}

.guest-roster-name,
.guest-roster-role {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guest-roster-rank {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold);
  text-align: center;
}

.guest-roster-points {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Gæst: feedback efter hver vin */
.feedback-panel {
  text-align: left;
}

.feedback-hints {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feedback-hint {
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--gold);
  background: rgba(201, 162, 39, 0.06);
  border-radius: 0 6px 6px 0;
}

.feedback-hint__word {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.feedback-hint p {
  margin: 0;
  color: var(--fg);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Host — mobil og smalle skærme */
@media (max-width: 640px) {
  .host-hero-row {
    gap: 1rem;
  }

  .host-toolbar .btn {
    flex: 1 1 calc(50% - 0.25rem);
    max-width: none;
    min-width: 0;
    min-height: 44px;
    font-size: 0.92rem;
    padding: 0.6rem 0.65rem;
  }

  .host-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .host-actions .btn {
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .guest-roster-item--ranked {
    grid-template-columns: 1.5rem 1.25rem minmax(0, 1fr);
    grid-template-areas:
      "rank symbol name"
      "rank symbol role"
      "rank symbol points";
  }

  .guest-roster-rank {
    grid-area: rank;
  }

  .guest-roster-symbol {
    grid-area: symbol;
  }

  .guest-roster-name {
    grid-area: name;
  }

  .guest-roster-role {
    grid-area: role;
  }

  .guest-roster-points {
    grid-area: points;
  }

  .guest-roster-role::before {
    content: none;
  }
}
