:root {
  --bg: #f3eedc;
  --bg-soft: #ebe2c4;
  --paper: rgba(250, 246, 234, 0.92);
  --paper-strong: rgba(255, 252, 243, 0.98);
  --frame: #c6bb8b;
  --frame-dark: #9c9368;
  --olive: #5d6d56;
  --olive-deep: #43503f;
  --olive-soft: #8f9b7a;
  --lemon: #d6c86d;
  --lemon-soft: #e8ddb0;
  --terracotta: #af8b6f;
  --ink: #313126;
  --muted: #6f715f;
  --line: rgba(108, 112, 82, 0.18);
  --shadow: 0 24px 60px rgba(89, 86, 52, 0.16);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 200, 109, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(93, 109, 86, 0.16), transparent 22%),
    linear-gradient(180deg, #f6f0dd 0%, #efe6cb 48%, #ece3c7 100%);
}

body::before,
body::after,
.page-shell::before,
.page-shell::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

body::before {
  inset: 22px;
  border: 1px solid rgba(156, 147, 104, 0.28);
  border-radius: 34px;
}

body::after {
  inset: 36px;
  border: 1px solid rgba(198, 187, 139, 0.22);
  border-radius: 28px;
}

.page-shell::before,
.page-shell::after {
  width: 120px;
  height: 120px;
  background:
    radial-gradient(circle at center, rgba(198, 187, 139, 0.18) 0, rgba(198, 187, 139, 0.18) 26%, transparent 27%),
    radial-gradient(circle at center, transparent 0 47%, rgba(156, 147, 104, 0.26) 48% 50%, transparent 51%);
}

.page-shell::before {
  top: 16px;
  left: 16px;
}

.page-shell::after {
  bottom: 16px;
  right: 16px;
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  display: grid;
  gap: 24px;
}

.host-screen {
  grid-template-columns: minmax(320px, 430px) 1fr;
  align-items: stretch;
}

.phone-screen {
  max-width: 560px;
  margin: 0 auto;
  align-items: center;
}

.card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 243, 0.96) 0%, rgba(247, 241, 223, 0.94) 100%);
  border: 1px solid rgba(156, 147, 104, 0.28);
  box-shadow: var(--shadow);
  border-radius: 34px;
  padding: clamp(24px, 5vw, 42px);
  backdrop-filter: blur(10px);
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 26px;
  pointer-events: none;
}

.card::before {
  border: 1px solid rgba(198, 187, 139, 0.48);
}

.card::after {
  inset: 24px;
  border-radius: 18px;
  border: 1px solid rgba(93, 109, 86, 0.10);
}

.hero {
  text-align: center;
  background:
    radial-gradient(circle at top center, rgba(214, 200, 109, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(255, 252, 243, 0.98) 0%, rgba(245, 238, 217, 0.96) 100%);
}

.hero::before {
  background:
    linear-gradient(90deg, transparent, rgba(198, 187, 139, 0.42), transparent),
    linear-gradient(0deg, transparent, rgba(198, 187, 139, 0.32), transparent);
  border: none;
  inset: 18px;
  border-radius: 26px;
  opacity: 0.35;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--olive);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .18em;
  font-size: 0.76rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(214, 200, 109, 0.20);
  border: 1px solid rgba(198, 187, 139, 0.4);
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2f3428;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 0.95;
  margin: 0 0 18px;
}

h2 {
  font-size: clamp(1.95rem, 4vw, 3.6rem);
  line-height: 1.02;
  margin: 0 0 18px;
}

h3 {
  font-size: 1.35rem;
  margin: 10px 0 10px;
}

.hero h1::after,
#playState h1::after,
#hostState h2::after {
  content: "❦";
  display: block;
  font-size: 1.05rem;
  margin-top: 10px;
  color: var(--frame-dark);
  letter-spacing: 0.24em;
}

p, li, label, input, button {
  font-size: 1rem;
}

.muted,
.join-link {
  color: var(--muted);
}

.room-code {
  font-size: clamp(1.1rem, 2.3vw, 1.55rem);
  color: var(--olive-deep);
}

.room-code strong {
  display: inline-block;
  margin-left: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(214, 200, 109, 0.18);
  border: 1px solid rgba(198, 187, 139, 0.42);
}

.qr-wrap {
  background: var(--paper-strong);
  display: inline-flex;
  padding: 16px;
  border-radius: 26px;
  margin: 14px 0;
  border: 1px solid rgba(198, 187, 139, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65);
}

.qr-wrap img {
  width: min(300px, 72vw);
  height: auto;
  display: block;
  border-radius: 18px;
}

.join-link {
  word-break: break-all;
  font-size: .95rem;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.45);
  border: 1px dashed rgba(156, 147, 104, 0.34);
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 800;
  color: var(--olive-deep);
}

input {
  width: 100%;
  border: 1px solid rgba(156, 147, 104, 0.40);
  background: rgba(255,255,255,0.68);
  color: var(--ink);
  border-radius: 18px;
  font-size: 1.05rem;
  padding: 16px 18px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

input:focus {
  border-color: rgba(93, 109, 86, 0.72);
  box-shadow: 0 0 0 4px rgba(143, 155, 122, 0.14);
}

button {
  border: 1px solid rgba(74, 88, 66, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--olive) 0%, var(--olive-deep) 100%);
  color: #f8f3e4;
  font-weight: 800;
  font-size: 1rem;
  padding: 16px 22px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(67, 80, 63, 0.22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(67, 80, 63, 0.26);
  filter: saturate(1.02);
}

button.secondary {
  background: linear-gradient(180deg, #8f9978 0%, #6f775f 100%);
}

button.ghost {
  background: rgba(214, 200, 109, 0.14);
  color: var(--olive-deep);
  border: 1px solid rgba(156, 147, 104, 0.40);
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.players {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.players li {
  background: rgba(255, 252, 243, 0.82);
  border: 1px solid rgba(198, 187, 139, 0.48);
  color: var(--olive-deep);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(93, 109, 86, 0.07);
}

.vote-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.vote-list button {
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, rgba(255,252,243,0.94) 0%, rgba(246,239,217,0.96) 100%);
  color: var(--olive-deep);
  border: 1px solid rgba(198, 187, 139, 0.60);
  box-shadow: none;
}

.vote-list button:hover {
  background: linear-gradient(180deg, rgba(231,223,177,0.40) 0%, rgba(246,239,217,0.98) 100%);
}

.progress {
  font-size: clamp(1.25rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--olive-deep);
  margin: 14px 0;
}

.results {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: rgba(255, 252, 243, 0.72);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(198, 187, 139, 0.44);
}

.result-row strong {
  font-size: 1.05rem;
}

.bar {
  grid-column: 1 / -1;
  height: 14px;
  border-radius: 999px;
  background: rgba(222, 213, 166, 0.65);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--lemon) 0%, #c6ba74 35%, var(--olive-soft) 100%);
  border-radius: 999px;
}

.error {
  color: #8c4936;
  font-weight: 700;
}

.big-winner {
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  background: rgba(255, 252, 243, 0.78);
  color: var(--olive-deep);
  border-radius: 26px;
  padding: 20px 22px;
  border: 1px solid rgba(198, 187, 139, 0.48);
  text-align: center;
}

.big-winner::before,
.big-winner::after {
  content: "✦";
  color: var(--frame-dark);
  padding: 0 12px;
}

a { color: var(--olive-deep); }

a button { display: inline-block; }

@media (max-width: 900px) {
  body::before,
  body::after { inset: 10px; border-radius: 22px; }
  .page-shell::before,
  .page-shell::after { width: 88px; height: 88px; opacity: 0.28; }
  .host-screen { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .screen { padding: 16px; gap: 18px; }
  .card { border-radius: 28px; padding: 22px 18px; }
  .card::before { inset: 10px; border-radius: 20px; }
  .card::after { inset: 18px; border-radius: 14px; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 30rem;
  margin: 0 auto 16px;
}

.hero-panel {
  background:
    radial-gradient(circle at top center, rgba(214, 200, 109, 0.28), transparent 36%),
    radial-gradient(circle at 12% 18%, rgba(93, 109, 86, 0.10), transparent 18%),
    linear-gradient(180deg, rgba(255,252,243,0.98) 0%, rgba(244,236,211,0.96) 100%);
}

.hero-panel .muted {
  max-width: 27rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-ornament {
  font-size: 1.8rem;
  color: var(--frame-dark);
  margin: 10px 0 14px;
}

.intro-card {
  text-align: center;
}

.intro-card .stack {
  text-align: left;
  margin-top: 16px;
}

.host-screen.game-started {
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin: 0 auto;
}

.host-screen.game-started .hero-panel {
  display: none;
}

.host-screen.game-started .state-panel {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.state-panel h2 {
  text-align: center;
}

.state-panel .eyebrow,
.state-panel .progress,
.state-panel > .muted,
.state-panel .big-winner {
  text-align: center;
}

.state-panel .eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.state-panel .actions {
  justify-content: center;
}

.state-panel h3 {
  margin-top: 18px;
}

/* === v5: pełnoekranowy ekran startowy + włoska winnica === */
.host-screen {
  grid-template-columns: 1fr;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
}

.host-stage {
  min-height: calc(100vh - 96px);
  width: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(26px, 5vw, 70px);
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 16%, rgba(214, 200, 109, 0.28), transparent 20%),
    radial-gradient(circle at 85% 12%, rgba(93, 109, 86, 0.18), transparent 24%),
    radial-gradient(circle at 82% 88%, rgba(214, 200, 109, 0.20), transparent 28%),
    linear-gradient(135deg, rgba(255, 252, 241, 0.98) 0%, rgba(244, 235, 208, 0.97) 50%, rgba(232, 224, 196, 0.98) 100%);
}

.host-stage::before {
  inset: 18px;
  border-radius: 28px;
  border: 1px solid rgba(154, 146, 95, 0.50);
  background: none;
}

.host-stage::after {
  inset: 34px;
  border-radius: 20px;
  border: 1px solid rgba(93, 109, 86, 0.16);
}

.host-lobby-intro,
.state-panel {
  position: relative;
  z-index: 2;
}

.host-lobby-intro {
  text-align: left;
  max-width: 720px;
}

.host-lobby-intro .eyebrow {
  margin-bottom: 18px;
}

.host-lobby-intro h1 {
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  max-width: 12ch;
  margin-bottom: 16px;
  text-wrap: balance;
}

.host-lobby-intro .lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.hero-divider {
  color: var(--frame-dark);
  font-size: 1.8rem;
  margin: 22px 0;
  letter-spacing: 0.28em;
}

.join-area {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 20px;
}

.join-copy {
  max-width: 280px;
}

.lobby-mode .state-panel {
  align-self: center;
}

.lobby-players-box {
  background: rgba(255, 252, 243, 0.56);
  border: 1px solid rgba(198, 187, 139, 0.42);
  border-radius: 30px;
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 16px 42px rgba(89, 86, 52, 0.10);
}

.lobby-players-box h2 {
  text-align: left;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.lobby-players-box h2::after {
  content: none !important;
}

.small-eyebrow {
  font-size: .68rem;
  padding: 7px 12px;
}

.game-started .host-stage {
  display: flex;
  min-height: calc(100vh - 96px);
  justify-content: center;
  align-items: center;
}

.game-started .host-lobby-intro {
  display: none;
}

.game-started .state-panel {
  width: min(980px, 100%);
}

.vine,
.lemon,
.grape {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.vine::before,
.vine::after {
  content: "";
  position: absolute;
  border: solid rgba(70, 90, 61, 0.36);
  border-width: 2px 0 0 0;
  border-radius: 50%;
  transform: rotate(-9deg);
}

.vine-top {
  top: 18px;
  right: 38px;
  width: 360px;
  height: 120px;
}

.vine-top::before {
  width: 330px;
  height: 90px;
  top: 28px;
  right: 0;
}

.vine-top::after {
  content: "🍃  🍇   🍃    🍋   🍃";
  border: 0;
  width: auto;
  height: auto;
  top: 20px;
  right: 8px;
  font-size: 1.45rem;
  letter-spacing: 14px;
  opacity: 0.70;
  filter: saturate(0.72) sepia(0.08);
}

.vine-bottom {
  left: 26px;
  bottom: 20px;
  width: 430px;
  height: 130px;
  transform: rotate(180deg);
}

.vine-bottom::before {
  width: 390px;
  height: 90px;
  top: 28px;
  left: 0;
}

.vine-bottom::after {
  content: "🍃  🍋   🍃    🍇   🍃";
  border: 0;
  top: 22px;
  left: 8px;
  font-size: 1.35rem;
  letter-spacing: 14px;
  opacity: 0.55;
  filter: saturate(0.72) sepia(0.08);
}

.lemon::before,
.lemon::after {
  content: "";
  position: absolute;
  display: block;
  background: radial-gradient(circle at 35% 35%, #eee1a0 0%, #d4c061 55%, #bcae54 100%);
  border: 1px solid rgba(149, 135, 57, 0.28);
  border-radius: 50% 42% 50% 42%;
  box-shadow: 0 10px 24px rgba(89, 86, 52, 0.10);
}

.lemon::after {
  background: radial-gradient(circle at 35% 35%, #98a47f 0%, #62725d 70%);
  width: 24px;
  height: 12px;
  border-radius: 80% 0 80% 0;
  border: 0;
}

.lemon-one {
  right: 90px;
  bottom: 96px;
  width: 70px;
  height: 70px;
  opacity: 0.72;
}

.lemon-one::before {
  width: 56px;
  height: 44px;
  transform: rotate(-18deg);
}

.lemon-one::after {
  top: -8px;
  left: 42px;
  transform: rotate(22deg);
}

.lemon-two {
  left: 88px;
  top: 108px;
  width: 58px;
  height: 58px;
  opacity: 0.48;
}

.lemon-two::before {
  width: 48px;
  height: 38px;
  transform: rotate(20deg);
}

.lemon-two::after {
  top: -6px;
  left: 34px;
}

.grape-one {
  right: 42px;
  top: 185px;
  width: 70px;
  height: 88px;
  opacity: 0.28;
  background:
    radial-gradient(circle at 20px 16px, #5f6f57 0 8px, transparent 9px),
    radial-gradient(circle at 38px 18px, #5f6f57 0 8px, transparent 9px),
    radial-gradient(circle at 28px 34px, #5f6f57 0 8px, transparent 9px),
    radial-gradient(circle at 46px 36px, #5f6f57 0 8px, transparent 9px),
    radial-gradient(circle at 36px 52px, #5f6f57 0 8px, transparent 9px);
}

.grape-one::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 35px;
  width: 42px;
  height: 22px;
  background: #62725d;
  border-radius: 80% 0 80% 0;
  transform: rotate(-16deg);
}

@media (max-width: 980px) {
  .host-stage {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .host-lobby-intro {
    text-align: center;
    margin: 0 auto;
  }
  .host-lobby-intro h1,
  .host-lobby-intro .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .join-area {
    justify-content: center;
    flex-wrap: wrap;
  }
  .lobby-players-box h2 {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .host-stage {
    min-height: calc(100vh - 32px);
    padding: 28px 20px;
  }
  .host-lobby-intro h1 {
    font-size: clamp(3rem, 18vw, 4.9rem);
  }
  .join-area {
    gap: 10px;
  }
  .join-copy {
    max-width: 100%;
  }
  .vine-top,
  .vine-bottom,
  .lemon-one,
  .lemon-two,
  .grape-one {
    opacity: 0.25;
  }
}

/* === v6: zdjęcia graczek + pełny ekran poziomy na rzutnik === */
.host-screen {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: clamp(18px, 2.6vw, 34px);
}

.host-stage {
  min-height: calc(100vh - clamp(36px, 5.2vw, 68px));
  max-width: 1600px;
  margin: 0 auto;
  grid-template-columns: minmax(520px, 1.18fr) minmax(390px, 0.82fr);
  gap: clamp(28px, 4.5vw, 76px);
}

.host-lobby-intro h1 {
  font-size: clamp(4rem, 8vw, 8.4rem);
}

.qr-wrap img {
  width: min(290px, 24vw);
}

.lobby-players-box {
  max-height: 76vh;
  overflow: auto;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(232,221,176,0.98), rgba(143,155,122,0.75));
  border: 2px solid rgba(255, 252, 243, 0.95);
  box-shadow: 0 7px 16px rgba(67, 80, 63, 0.18);
  color: var(--olive-deep);
  font-weight: 900;
  vertical-align: middle;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-large {
  width: clamp(58px, 5vw, 86px);
  height: clamp(58px, 5vw, 86px);
  flex-basis: clamp(58px, 5vw, 86px);
  font-size: 1.35rem;
}

.players-with-photos li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 7px;
}

.file-input {
  padding: 12px;
  background: rgba(255,255,255,0.55);
}

.photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 106px;
  height: 106px;
  border-radius: 999px;
  margin: 0 auto 4px;
  background: rgba(255,252,243,0.68);
  border: 1px dashed rgba(156, 147, 104, 0.52);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  overflow: hidden;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vote-list button {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-row-photo {
  grid-template-columns: auto 1fr auto;
}

.result-row-photo .bar {
  grid-column: 1 / -1;
}

.game-started .host-stage {
  max-width: 1700px;
  min-height: calc(100vh - clamp(36px, 5.2vw, 68px));
  padding: clamp(28px, 3.2vw, 54px);
}

.game-started .state-panel {
  width: 100%;
  max-width: none;
}

.projector-question-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  width: 100%;
}

.question-main h2 {
  text-align: left;
  font-size: clamp(3rem, 5.8vw, 6.8rem);
  max-width: 11ch;
  text-wrap: balance;
}

.question-main h2::after {
  margin-left: 0 !important;
}

.question-main .progress,
.question-main .eyebrow {
  text-align: left;
  margin-left: 0;
}

.live-board {
  min-width: 0;
  border-radius: 30px;
  padding: clamp(18px, 2.6vw, 34px);
  background: rgba(255, 252, 243, 0.54);
  border: 1px solid rgba(198, 187, 139, 0.38);
  box-shadow: 0 18px 48px rgba(89, 86, 52, 0.10);
}

.horizontal-results {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 18px);
  width: 100%;
  margin: 24px auto 0;
  overflow-x: auto;
  padding: 8px 4px 12px;
}

.horizontal-results.compact {
  justify-content: flex-start;
  margin-top: 10px;
}

.result-tile {
  position: relative;
  min-width: clamp(110px, 10vw, 150px);
  max-width: 170px;
  flex: 1 0 clamp(110px, 10vw, 150px);
  min-height: clamp(210px, 25vh, 330px);
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  align-items: start;
  justify-items: center;
  gap: 7px;
  padding: 16px 12px 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,252,243,0.92), rgba(237,229,200,0.76));
  border: 1px solid rgba(198, 187, 139, 0.44);
  box-shadow: 0 14px 32px rgba(89, 86, 52, 0.10);
  text-align: center;
}

.horizontal-results.compact .result-tile {
  min-width: clamp(96px, 8vw, 132px);
  flex-basis: clamp(96px, 8vw, 132px);
  min-height: clamp(180px, 23vh, 280px);
}

.result-tile.leading {
  border-color: rgba(143, 155, 122, 0.76);
  box-shadow: 0 18px 38px rgba(67, 80, 63, 0.17);
}

.result-tile .rank {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(214, 200, 109, 0.28);
  color: var(--olive-deep);
  font-weight: 900;
  font-size: .78rem;
}

.result-tile strong {
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  line-height: 1.15;
  color: var(--olive-deep);
}

.result-tile .vote-count {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: .9;
  color: var(--olive-deep);
  font-weight: 700;
}

.vertical-bar {
  align-self: end;
  width: 26px;
  height: 100%;
  min-height: 76px;
  border-radius: 999px;
  background: rgba(222, 213, 166, 0.54);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.08);
}

.vertical-bar span {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lemon) 0%, var(--olive-soft) 100%);
  transition: height .25s ease;
}

.results {
  max-height: 48vh;
  overflow: auto;
}

@media (orientation: landscape) and (min-width: 900px) {
  .host-stage {
    aspect-ratio: 16 / 9;
    min-height: auto;
    height: calc(100vh - clamp(36px, 5.2vw, 68px));
  }
  .game-started .host-stage {
    aspect-ratio: 16 / 9;
    height: calc(100vh - clamp(36px, 5.2vw, 68px));
  }
}

@media (max-width: 980px) {
  .projector-question-layout {
    grid-template-columns: 1fr;
  }
  .question-main h2,
  .question-main .progress,
  .question-main .eyebrow {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .horizontal-results.compact {
    justify-content: center;
  }
}

/* === v7: realny poziomy ekran startowy pod rzutnik === */
.host-screen {
  padding: clamp(14px, 2vw, 28px);
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  overflow: hidden;
}

.projector-lobby-stage {
  position: relative;
  width: 100%;
  max-width: none;
  height: calc(100vh - clamp(28px, 4vw, 56px));
  min-height: 0;
  margin: 0;
  padding: clamp(28px, 4vw, 64px);
  border-radius: clamp(26px, 3vw, 44px);
  border: 1px solid rgba(156, 147, 104, 0.32);
  box-shadow: 0 28px 70px rgba(89, 86, 52, 0.18);
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 14%, rgba(214, 200, 109, 0.30), transparent 20%),
    radial-gradient(circle at 86% 18%, rgba(93, 109, 86, 0.18), transparent 22%),
    radial-gradient(circle at 88% 88%, rgba(214, 200, 109, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255, 252, 241, 0.98) 0%, rgba(244, 235, 208, 0.97) 52%, rgba(232, 224, 196, 0.98) 100%);
}

.projector-lobby-stage::before,
.projector-lobby-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.projector-lobby-stage::before {
  inset: 18px;
  border-radius: clamp(20px, 2.5vw, 34px);
  border: 1px solid rgba(154, 146, 95, 0.50);
}

.projector-lobby-stage::after {
  inset: 34px;
  border-radius: clamp(16px, 2vw, 26px);
  border: 1px solid rgba(93, 109, 86, 0.16);
}

.lobby-wide-scene {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(560px, 1.18fr) minmax(470px, .82fr);
  gap: clamp(34px, 5vw, 86px);
  align-items: center;
}

.lobby-copy {
  text-align: left;
  max-width: 820px;
  padding-left: clamp(10px, 2vw, 34px);
}

.lobby-copy .eyebrow {
  margin-bottom: clamp(14px, 2vw, 26px);
}

.lobby-copy h1 {
  max-width: 11ch;
  font-size: clamp(5rem, 9.5vw, 10.8rem);
  line-height: .82;
  margin: 0 0 clamp(18px, 2.5vw, 30px);
  text-wrap: balance;
}

.lobby-copy h1::after {
  content: none !important;
}

.lobby-copy .lead {
  margin: 0;
  max-width: 42rem;
  font-size: clamp(1.18rem, 1.7vw, 1.6rem);
  line-height: 1.5;
}

.italian-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  margin-top: clamp(22px, 3vw, 42px);
  color: var(--frame-dark);
  opacity: .9;
}

.italian-divider i {
  display: block;
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(156,147,104,0), rgba(156,147,104,.58), rgba(156,147,104,0));
}

.lobby-right-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(16px, 2vh, 24px);
  min-height: 0;
}

.qr-zone {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
  padding: clamp(18px, 2vw, 26px);
  border-radius: 34px;
  background: rgba(255, 252, 243, 0.46);
  border: 1px solid rgba(198, 187, 139, 0.42);
  box-shadow: 0 18px 44px rgba(89, 86, 52, 0.10);
}

.projector-lobby-stage .qr-wrap {
  margin: 0;
  padding: 12px;
  border-radius: 24px;
}

.projector-lobby-stage .qr-wrap img {
  width: min(245px, 16vw);
  min-width: 185px;
}

.projector-lobby-stage .join-link {
  max-width: 320px;
  margin-bottom: 0;
  font-size: .82rem;
  background: rgba(255,255,255,0.34);
}

.lobby-mode .state-panel {
  align-self: stretch;
  min-height: 0;
}

.lobby-mode .lobby-players-box {
  height: 100%;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 252, 243, 0.38);
  border: 1px solid rgba(198, 187, 139, 0.38);
  box-shadow: 0 18px 44px rgba(89, 86, 52, 0.08);
}

.lobby-mode .lobby-players-box h2 {
  font-size: clamp(2.2rem, 3.6vw, 4.6rem);
  margin-bottom: 10px;
}

.lobby-mode .players-with-photos {
  align-content: flex-start;
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}

.lobby-mode .players-with-photos li {
  padding: 9px 13px 9px 9px;
}

.lobby-mode .actions {
  margin-top: 10px;
}

.lobby-mode .actions button {
  width: 100%;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
}

.host-screen.game-started {
  display: grid;
  place-items: center;
  max-width: none;
}

.game-started .projector-lobby-stage {
  padding: clamp(26px, 3vw, 48px);
}

.game-started .lobby-wide-scene {
  display: block;
  height: 100%;
}

.game-started .lobby-copy,
.game-started .qr-zone {
  display: none;
}

.game-started .lobby-right-panel {
  display: block;
  height: 100%;
}

.game-started .state-panel {
  width: 100%;
  height: 100%;
}

.game-started .projector-question-layout {
  height: 100%;
}

@media (orientation: landscape) and (min-width: 900px) {
  .projector-lobby-stage {
    aspect-ratio: 16 / 9;
    height: min(calc(100vh - clamp(28px, 4vw, 56px)), calc((100vw - clamp(28px, 4vw, 56px)) * 9 / 16));
    width: min(calc(100vw - clamp(28px, 4vw, 56px)), calc((100vh - clamp(28px, 4vw, 56px)) * 16 / 9));
    margin: auto;
  }
}

@media (max-width: 1100px) {
  .lobby-wide-scene {
    grid-template-columns: 1fr;
    gap: 18px;
    overflow: auto;
  }
  .lobby-copy {
    text-align: center;
    margin: 0 auto;
    padding-left: 0;
  }
  .lobby-copy h1,
  .lobby-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .italian-divider {
    margin-left: auto;
    margin-right: auto;
  }
  .qr-zone {
    max-width: 720px;
    margin: 0 auto;
  }
}

.game-started .projector-lobby-stage {
  display: block !important;
}

/* === v8: pytanie nad statystykami + słupki live + poprawiony ekran startowy === */
.lobby-copy .wedding-title {
  font-size: clamp(0.78rem, 1.25vw, 1.05rem);
  letter-spacing: .22em;
  margin-bottom: clamp(10px, 1.2vw, 16px);
  background: rgba(214, 200, 109, 0.14);
}

.lobby-copy .dolce-title {
  max-width: 12ch;
  font-size: clamp(4.4rem, 8.2vw, 9.4rem);
  line-height: .82;
  letter-spacing: .015em;
  margin-bottom: clamp(12px, 1.8vw, 24px);
  text-shadow: 0 12px 34px rgba(89, 86, 52, 0.13);
}

.lobby-copy .dolce-title::first-letter {
  font-size: 1.10em;
}

.projector-lobby-stage .qr-zone,
.lobby-mode .lobby-players-box {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.projector-lobby-stage .qr-zone {
  padding: 0 !important;
}

.projector-lobby-stage .qr-wrap {
  background: rgba(255, 252, 243, 0.72);
  border-color: rgba(198, 187, 139, 0.44);
}

.projector-lobby-stage .join-link {
  background: transparent !important;
  border-color: rgba(156, 147, 104, 0.20);
}

.lobby-mode .lobby-players-box {
  padding: 0 !important;
}

.lobby-mode .lobby-players-box h2 {
  font-size: clamp(1.8rem, 3vw, 3.8rem);
}

.game-started .projector-lobby-stage {
  padding: clamp(20px, 2.5vw, 40px);
}

.game-started .state-panel {
  display: block;
  min-height: 0;
  overflow: hidden;
}

.question-top-layout {
  height: 100%;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: clamp(8px, 1.5vh, 18px);
}

.question-top-layout .question-main {
  text-align: center;
  max-width: min(1180px, 92%);
  margin: 0 auto;
}

.question-top-layout .question-main .eyebrow,
.question-top-layout .question-main .progress {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.question-top-layout .question-main h2 {
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: clamp(2.15rem, 4.1vw, 5rem);
  line-height: .96;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}

.question-top-layout .question-main h2::after {
  content: none !important;
}

.question-top-layout .question-main .progress {
  font-size: clamp(1rem, 1.7vw, 1.8rem);
  margin: clamp(6px, 1vh, 12px) auto 0;
}

.question-top-layout .live-board {
  min-height: 0;
  height: 100%;
  padding: clamp(8px, 1.6vw, 24px);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.question-top-layout .live-board .small-eyebrow {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: clamp(2px, .7vh, 8px);
}

.question-actions {
  justify-content: center;
  margin-top: 0;
}

.vertical-results {
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(14px, 2vw, 32px);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: clamp(18px, 2.2vw, 30px) 10px clamp(8px, 1vw, 16px);
}

.vertical-results.compact {
  flex: 1;
  min-height: 0;
  margin-top: 0;
}

.bar-person {
  height: 100%;
  min-width: clamp(92px, 8vw, 140px);
  max-width: 160px;
  flex: 1 0 clamp(92px, 8vw, 140px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  justify-items: center;
  gap: clamp(8px, 1vh, 14px);
  text-align: center;
}

.bar-stage {
  position: relative;
  height: 100%;
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid rgba(156, 147, 104, 0.28);
}

.bar-stack {
  position: relative;
  width: clamp(42px, 4vw, 66px);
  min-height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transition: height .35s ease;
}

.bar-column {
  width: 100%;
  flex: 1;
  min-height: 8px;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, #d9cd78 0%, #b7bd7c 38%, #65755b 100%);
  box-shadow: 0 16px 26px rgba(67, 80, 63, 0.18), inset 0 1px 0 rgba(255,255,255,0.45);
  border: 1px solid rgba(255, 252, 243, 0.52);
}

.bar-avatar {
  position: relative;
  z-index: 2;
  margin-bottom: -2px;
  width: clamp(54px, 4.7vw, 78px) !important;
  height: clamp(54px, 4.7vw, 78px) !important;
  flex-basis: clamp(54px, 4.7vw, 78px) !important;
  border-width: 3px;
}

.bar-person.leading .bar-avatar {
  box-shadow: 0 0 0 5px rgba(214, 200, 109, 0.24), 0 14px 28px rgba(67, 80, 63, 0.24);
}

.bar-caption {
  width: 100%;
  min-height: 56px;
  display: grid;
  gap: 3px;
  align-content: start;
}

.bar-caption strong {
  color: var(--olive-deep);
  font-size: clamp(.82rem, 1vw, 1.02rem);
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bar-caption span {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--olive-deep);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.5vw, 3rem);
  line-height: .95;
}

/* Stary kafelkowy wykres ukrywamy, gdyby został użyty przez cache przeglądarki */
.horizontal-results {
  display: none;
}

.game-started #hostState > .eyebrow,
.game-started #hostState > h2 {
  text-align: center;
}

.game-started #hostState > h2 {
  font-size: clamp(1.9rem, 3.6vw, 4.4rem);
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-started #hostState > h2::after {
  content: none !important;
}

.game-started #hostState > .big-winner {
  margin: clamp(8px, 1vh, 14px) auto;
  max-width: 900px;
}

.game-started #hostState > .vertical-results {
  height: min(54vh, 470px);
  min-height: 250px;
}

@media (orientation: landscape) and (min-width: 900px) {
  .projector-lobby-stage {
    overflow: hidden;
  }
  .lobby-copy .dolce-title {
    font-size: min(8.4vw, 9rem);
  }
  .lobby-copy .wedding-title {
    font-size: min(1.15vw, 1rem);
  }
}

@media (max-height: 760px) and (orientation: landscape) {
  .question-top-layout .question-main h2 {
    font-size: clamp(1.85rem, 3.5vw, 3.8rem);
  }
  .question-top-layout .question-main .progress {
    font-size: clamp(.95rem, 1.4vw, 1.35rem);
  }
  .vertical-results {
    padding-top: 8px;
  }
  .bar-caption {
    min-height: 46px;
  }
  .bar-caption span {
    font-size: clamp(1.35rem, 2vw, 2.2rem);
  }
}

@media (max-width: 1100px) {
  .lobby-copy .dolce-title {
    max-width: none;
    font-size: clamp(3.5rem, 10vw, 6.6rem);
  }
  .question-top-layout .question-main h2 {
    font-size: clamp(1.9rem, 6vw, 4rem);
  }
}

/* === v9: wykres skaluje się do wolnej przestrzeni, bez zakrywania pytania === */
.host-screen.voting-mode .projector-lobby-stage,
.host-screen.results-mode .projector-lobby-stage {
  overflow: hidden;
}

.host-screen.voting-mode .state-panel,
.host-screen.results-mode .state-panel {
  overflow: hidden;
  min-height: 0;
}

.host-screen.voting-mode .question-top-layout {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: clamp(4px, 1vh, 12px);
  overflow: hidden;
}

.host-screen.voting-mode .question-main {
  min-height: 0;
  max-height: clamp(130px, 24vh, 230px);
  overflow: hidden;
}

.host-screen.voting-mode .question-main .eyebrow {
  margin-bottom: clamp(4px, .7vh, 8px);
  padding-top: 6px;
  padding-bottom: 6px;
}

.host-screen.voting-mode .question-main h2 {
  font-size: clamp(1.7rem, 3.25vw, 4.25rem);
  line-height: .94;
  max-height: 1.9em;
  margin-bottom: clamp(4px, .8vh, 8px);
}

.host-screen.voting-mode .question-main .progress {
  font-size: clamp(.9rem, 1.35vw, 1.45rem);
  margin-top: 0;
}

.host-screen.voting-mode .live-board {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-top: clamp(2px, .6vh, 8px);
  padding-bottom: clamp(2px, .6vh, 8px);
}

.host-screen.voting-mode .live-board .small-eyebrow {
  flex: 0 0 auto;
  margin-bottom: clamp(2px, .5vh, 6px);
  padding-top: 5px;
  padding-bottom: 5px;
}

.host-screen.voting-mode .vertical-results.compact {
  flex: 1 1 auto;
  height: auto;
  min-height: 0 !important;
  max-height: 100%;
  padding-top: clamp(8px, 1.1vh, 18px);
  padding-bottom: 0;
}

.host-screen.voting-mode .vertical-results.compact .bar-stage {
  min-height: 0 !important;
}

.host-screen.voting-mode .vertical-results.compact .bar-caption {
  min-height: clamp(36px, 5.8vh, 54px);
}

.host-screen.voting-mode .vertical-results.compact .bar-caption span {
  font-size: clamp(1.2rem, 1.8vw, 2.15rem);
}

.host-screen.voting-mode .vertical-results.compact .bar-avatar {
  width: clamp(42px, 4vw, 66px) !important;
  height: clamp(42px, 4vw, 66px) !important;
  flex-basis: clamp(42px, 4vw, 66px) !important;
}

/* (v9 rule that turned #hostState into a grid removed — it broke the v12
   projector chart in results mode; .state-panel overflow is handled above.) */

.host-screen.results-mode #hostState > .eyebrow {
  margin-bottom: 0;
  justify-self: center;
}

.host-screen.results-mode #hostState > h2 {
  font-size: clamp(1.55rem, 3vw, 3.8rem);
  line-height: .96;
  max-height: 1.95em;
  margin-bottom: 0;
}

.host-screen.results-mode #hostState > .big-winner {
  margin-top: 0;
  margin-bottom: 0;
  padding: clamp(10px, 1.2vw, 16px) clamp(14px, 1.6vw, 22px);
  font-size: clamp(1.1rem, 2.2vw, 2.1rem);
}

.host-screen.results-mode #hostState > .vertical-results {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none;
  padding-top: clamp(8px, 1.2vh, 18px);
  padding-bottom: 0;
}

.host-screen.results-mode #hostState > .vertical-results .bar-stage {
  min-height: 0 !important;
}

.host-screen.results-mode #hostState > .vertical-results .bar-avatar {
  width: clamp(44px, 4.4vw, 72px) !important;
  height: clamp(44px, 4.4vw, 72px) !important;
  flex-basis: clamp(44px, 4.4vw, 72px) !important;
}

.host-screen.results-mode #hostState > .actions {
  margin-top: 0;
}

@media (max-height: 720px) and (orientation: landscape) {
  .host-screen.voting-mode .question-main {
    max-height: 118px;
  }
  .host-screen.voting-mode .question-main h2 {
    font-size: clamp(1.45rem, 2.8vw, 3.1rem);
  }
  .host-screen.voting-mode .question-main .eyebrow,
  .host-screen.voting-mode .live-board .small-eyebrow {
    font-size: .68rem;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .host-screen.voting-mode .question-main .progress {
    font-size: clamp(.78rem, 1.1vw, 1.05rem);
  }
  .host-screen.voting-mode .vertical-results.compact .bar-caption {
    min-height: 34px;
  }
  .host-screen.voting-mode .vertical-results.compact .bar-caption strong {
    font-size: .72rem;
  }
  .host-screen.voting-mode .vertical-results.compact .bar-caption span {
    font-size: 1.2rem;
  }
  .host-screen.results-mode #hostState > h2 {
    font-size: clamp(1.35rem, 2.5vw, 2.8rem);
  }
  .host-screen.results-mode #hostState > .big-winner {
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* === v11: więcej włoskich ornamentów, gałązek oliwnych i subtelnych cytrynek === */
.projector-lobby-stage::before,
.projector-lobby-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: .28;
  filter: blur(.1px);
}

.projector-lobby-stage::before {
  width: clamp(210px, 22vw, 380px);
  height: clamp(210px, 22vw, 380px);
  left: max(-80px, -5vw);
  bottom: max(-90px, -6vw);
  border-radius: 55% 45% 58% 42%;
  background:
    radial-gradient(ellipse at 42% 28%, rgba(214, 200, 109, .65) 0 13%, transparent 14%),
    radial-gradient(ellipse at 62% 52%, rgba(214, 200, 109, .58) 0 12%, transparent 13%),
    radial-gradient(ellipse at 35% 70%, rgba(214, 200, 109, .42) 0 11%, transparent 12%),
    linear-gradient(135deg, transparent 0 46%, rgba(93, 109, 86, .30) 47% 49%, transparent 50%);
  transform: rotate(-18deg);
}

.projector-lobby-stage::after {
  width: clamp(230px, 26vw, 460px);
  height: clamp(150px, 18vw, 310px);
  right: max(-100px, -6vw);
  top: max(-50px, -3vw);
  background:
    radial-gradient(ellipse at 20% 45%, rgba(93, 109, 86, .32) 0 8%, transparent 9%),
    radial-gradient(ellipse at 36% 32%, rgba(93, 109, 86, .30) 0 8%, transparent 9%),
    radial-gradient(ellipse at 52% 54%, rgba(93, 109, 86, .26) 0 8%, transparent 9%),
    radial-gradient(ellipse at 68% 38%, rgba(93, 109, 86, .24) 0 8%, transparent 9%),
    linear-gradient(165deg, transparent 0 48%, rgba(93, 109, 86, .36) 49% 51%, transparent 52%);
  transform: rotate(16deg);
}

.olive-branch,
.olive-sprig {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: .42;
}

.olive-branch {
  width: clamp(170px, 18vw, 330px);
  height: clamp(120px, 13vw, 230px);
}

.olive-branch::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(67, 80, 63, .65), transparent);
  transform: rotate(-18deg);
}

.olive-branch span {
  position: absolute;
  width: clamp(24px, 3vw, 48px);
  height: clamp(12px, 1.6vw, 25px);
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, rgba(93, 109, 86, .54), rgba(143, 155, 122, .26));
  box-shadow: inset 0 0 0 1px rgba(67, 80, 63, .10);
}

.olive-branch span:nth-child(1) { left: 13%; top: 42%; transform: rotate(-42deg); }
.olive-branch span:nth-child(2) { left: 27%; top: 28%; transform: rotate(-18deg); }
.olive-branch span:nth-child(3) { left: 45%; top: 51%; transform: rotate(150deg); }
.olive-branch span:nth-child(4) { left: 61%; top: 33%; transform: rotate(-20deg); }
.olive-branch span:nth-child(5) { left: 76%; top: 48%; transform: rotate(138deg); }

.olive-branch-left {
  left: clamp(12px, 3vw, 50px);
  top: clamp(18px, 3vw, 55px);
  transform: rotate(-8deg);
}

.olive-branch-right {
  right: clamp(12px, 3vw, 50px);
  bottom: clamp(18px, 3vw, 55px);
  transform: rotate(172deg);
}

.olive-sprig {
  width: clamp(86px, 9vw, 170px);
  height: clamp(86px, 9vw, 170px);
  opacity: .34;
}

.olive-sprig::before,
.olive-sprig::after {
  content: "";
  position: absolute;
}

.olive-sprig::before {
  left: 50%;
  top: 8%;
  width: 2px;
  height: 84%;
  background: linear-gradient(180deg, transparent, rgba(67, 80, 63, .45), transparent);
  transform: rotate(34deg);
}

.olive-sprig::after {
  inset: 12%;
  background:
    radial-gradient(ellipse at 28% 24%, rgba(93, 109, 86, .40) 0 10%, transparent 11%),
    radial-gradient(ellipse at 58% 34%, rgba(93, 109, 86, .34) 0 10%, transparent 11%),
    radial-gradient(ellipse at 32% 52%, rgba(93, 109, 86, .32) 0 10%, transparent 11%),
    radial-gradient(ellipse at 68% 62%, rgba(93, 109, 86, .30) 0 10%, transparent 11%);
}

.sprig-one { left: 18%; bottom: 8%; transform: rotate(-24deg); }
.sprig-two { right: 27%; top: 10%; transform: rotate(36deg); }
.sprig-three { right: 9%; top: 42%; transform: rotate(-55deg); opacity: .24; }

.lobby-wide-scene,
.state-panel,
.qr-zone,
.lobby-players-box,
.question-top-layout,
#hostState {
  position: relative;
  z-index: 2;
}

.lobby-copy::before,
.lobby-copy::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: .22;
  z-index: -1;
}

.lobby-copy::before {
  width: clamp(140px, 16vw, 260px);
  height: clamp(140px, 16vw, 260px);
  left: -4vw;
  top: 12%;
  background:
    radial-gradient(ellipse at 35% 38%, rgba(214, 200, 109, .70) 0 12%, transparent 13%),
    radial-gradient(ellipse at 58% 56%, rgba(214, 200, 109, .58) 0 11%, transparent 12%),
    radial-gradient(ellipse at 38% 68%, rgba(214, 200, 109, .42) 0 10%, transparent 11%);
}

.lobby-copy::after {
  width: clamp(180px, 18vw, 300px);
  height: clamp(120px, 13vw, 220px);
  right: 3vw;
  bottom: 4%;
  background:
    radial-gradient(circle at 20% 45%, rgba(88, 82, 54, .30) 0 5%, transparent 6%),
    radial-gradient(circle at 32% 58%, rgba(88, 82, 54, .26) 0 5%, transparent 6%),
    radial-gradient(circle at 45% 48%, rgba(88, 82, 54, .24) 0 5%, transparent 6%),
    radial-gradient(circle at 57% 61%, rgba(88, 82, 54, .20) 0 5%, transparent 6%),
    linear-gradient(135deg, transparent 0 48%, rgba(93, 109, 86, .20) 49% 51%, transparent 52%);
}

@media (max-height: 720px) and (orientation: landscape) {
  .olive-branch,
  .olive-sprig,
  .projector-lobby-stage::before,
  .projector-lobby-stage::after {
    opacity: .22;
    transform: scale(.86);
  }
}

/* ===== v12: final responsive projector layout + line-art olive ornaments ===== */
.olive-branch,
.olive-sprig {
  display: none !important;
}

.olive-ornaments {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.olive-line {
  position: absolute;
  width: clamp(190px, 19vw, 330px);
  height: auto;
  opacity: 0.30;
}

.olive-line path,
.olive-line ellipse {
  fill: none;
  stroke: rgba(67, 80, 63, 0.60);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.olive-line .stem {
  stroke-width: 3.2;
}

.olive-line ellipse {
  fill: rgba(143, 155, 122, 0.08);
}

.olive-line-tl { top: 14px; left: 18px; }
.olive-line-tr { top: 14px; right: 18px; }
.olive-line-bl { bottom: 14px; left: 18px; }
.olive-line-br { bottom: 14px; right: 18px; }

.screen,
.host-stage,
#hostState,
.lobby-wide-scene,
.projector-view {
  position: relative;
  z-index: 2;
}

.host-screen.game-started {
  padding: 0 !important;
  max-width: none !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  display: block !important;
  overflow: hidden !important;
}

.host-screen.game-started .projector-lobby-stage {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  display: block !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

/* #hostState lives inside #heroPanel, so the panel must stay rendered —
   display:contents removes its box (and the right-panel's) without hiding
   the game view; the lobby copy/QR are already hidden by .game-started rules. */
.host-screen.game-started #heroPanel,
.host-screen.game-started .lobby-right-panel {
  display: contents !important;
}

.host-screen.game-started .vine,
.host-screen.game-started .lemon,
.host-screen.game-started .grape {
  display: none !important;
}

.host-screen.game-started #hostState {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.projector-view {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.35vh, 16px);
  padding: clamp(18px, 2.1vw, 32px) clamp(30px, 4vw, 64px) clamp(14px, 1.8vw, 26px);
  overflow: hidden;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 16% 18%, rgba(214, 200, 109, 0.18), transparent 26%),
    radial-gradient(circle at 83% 78%, rgba(93, 109, 86, 0.11), transparent 28%);
}

.projector-view::before,
.projector-view::after {
  display: none !important;
}

.question-badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.question-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(7px, 1vh, 12px) clamp(22px, 3vw, 34px);
  border-radius: 999px;
  border: 1px solid rgba(198, 187, 139, 0.72);
  background: rgba(223, 215, 180, 0.34);
  color: var(--olive-deep);
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
  font-size: clamp(0.78rem, 1.05vw, 1.12rem);
  line-height: 1;
}

.question-zone {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: center;
  gap: clamp(6px, 1.0vh, 12px);
  overflow: visible;
  padding: 0 clamp(8px, 1vw, 18px);
}

.question-title {
  margin: 0 !important;
  max-width: min(92vw, 1380px);
  text-align: center;
  color: #2f3428;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.012em;
  line-height: 0.94;
  font-size: clamp(2.35rem, 5.2vw, 5.55rem) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(2 * 0.98em);
}

.question-title::after {
  display: none !important;
}

.question-title-lg {
  font-size: clamp(1.95rem, 4.25vw, 4.45rem) !important;
  line-height: 0.98;
  max-height: calc(2 * 1.02em);
}

.question-title-xl {
  font-size: clamp(1.65rem, 3.55vw, 3.75rem) !important;
  line-height: 1.02;
  max-height: calc(2 * 1.06em);
}

.question-subline {
  min-height: clamp(28px, 3.4vh, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive-deep);
  font-weight: 900;
  text-align: center;
  font-size: clamp(1.05rem, 1.75vw, 1.95rem);
  line-height: 1.1;
}

.winner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  padding: clamp(7px, 1vh, 10px) clamp(18px, 2.8vw, 32px);
  border-radius: 999px;
  border: 1px solid rgba(198, 187, 139, 0.62);
  background: rgba(255, 252, 243, 0.62);
  color: var(--olive-deep);
  font-size: clamp(1.05rem, 1.8vw, 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-zone {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(7px, 1.05vh, 13px);
  overflow: hidden;
}

.chart-label {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(7px, 1vh, 10px) clamp(20px, 3vw, 32px);
  border-radius: 999px;
  border: 1px solid rgba(198, 187, 139, 0.64);
  background: rgba(223, 215, 180, 0.28);
  color: var(--olive-deep);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: clamp(0.76rem, 0.95vw, 1rem);
  line-height: 1;
}

.chart-area {
  /* pin to the 1fr row — in results mode the chart-label is display:none,
     which would otherwise let the chart slide into the auto row and collapse */
  grid-row: 2;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(12px, 1.9vw, 30px);
  padding: clamp(18px, 2.7vh, 34px) clamp(12px, 1vw, 20px) 0;
  overflow: hidden;
}

.bar-card {
  flex: 1 1 0;
  max-width: 180px;
  min-width: 68px;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  justify-items: center;
  overflow: visible;
}

.bar-stack {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  /* reset legacy v8 chart rules that leak in (flex-direction:column / flex:1) */
  flex-direction: row;
  align-items: end;
  justify-content: center;
  position: relative;
  overflow: visible;
  padding-top: clamp(36px, 5.8vh, 70px);
}

.bar-column {
  flex: none;
  width: clamp(40px, 5.8vw, 84px);
  max-height: 100%;
  min-height: 7px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #d8cb73 0%, #c7bb70 44%, #95a07f 100%);
  position: relative;
  transition: height .35s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 18px rgba(67,80,63,0.12);
}

.bar-avatar {
  position: absolute !important;
  left: 50%;
  top: 0;
  transform: translate(-50%, -56%);
  width: clamp(42px, 4.2vw, 64px) !important;
  height: clamp(42px, 4.2vw, 64px) !important;
  border-radius: 999px;
  object-fit: cover;
  border: clamp(3px, .45vw, 5px) solid rgba(255, 250, 236, 0.96);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  background: #f4efdc;
  z-index: 2;
}

.bar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

.bar-value {
  position: absolute;
  top: clamp(-54px, -5.2vh, -38px);
  left: 50%;
  transform: translateX(-50%);
  font-weight: 900;
  color: var(--olive-deep);
  font-size: clamp(0.9rem, 1.25vw, 1.35rem);
  white-space: nowrap;
  z-index: 3;
}

.player-name {
  margin-top: clamp(7px, 1vh, 12px);
  padding-bottom: 2px;
  width: 100%;
  text-align: center;
  color: var(--olive-deep);
  font-weight: 800;
  font-size: clamp(0.72rem, 1.0vw, 1.05rem);
  line-height: 1.12;
  max-height: 2.25em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projector-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  padding-bottom: 0;
}

.projector-actions button {
  padding: clamp(9px, 1.2vh, 14px) clamp(18px, 2.4vw, 28px);
  font-size: clamp(0.82rem, 1vw, 1rem);
}

/* Disable previous v8-v11 chart/question systems so they cannot overlap new layout. */
.projector-question-layout,
.question-top-layout,
.live-board,
.vertical-results,
.big-winner {
  all: unset;
}

.projector-results .chart-label {
  display: none;
}

@media (max-height: 720px) {
  .projector-view {
    gap: 7px;
    padding-top: 14px;
    padding-bottom: 10px;
  }
  .question-title {
    font-size: clamp(1.9rem, 4.65vw, 4.65rem) !important;
  }
  .question-title-lg {
    font-size: clamp(1.65rem, 3.75vw, 3.75rem) !important;
  }
  .question-title-xl {
    font-size: clamp(1.42rem, 3.25vw, 3.25rem) !important;
  }
  .question-subline {
    min-height: 28px;
    font-size: clamp(0.95rem, 1.55vw, 1.55rem);
  }
  .chart-area {
    padding-top: 22px;
  }
  .bar-stack {
    padding-top: 42px;
  }
  .player-name {
    font-size: clamp(0.68rem, .88vw, .95rem);
  }
}

@media (max-height: 560px) {
  .question-badge,
  .chart-label {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .projector-actions button {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .bar-avatar {
    width: clamp(34px, 3.5vw, 48px) !important;
    height: clamp(34px, 3.5vw, 48px) !important;
  }
  .bar-value {
    top: -38px;
  }
}

@media (max-width: 900px) {
  .olive-line {
    opacity: 0.18;
    width: 170px;
  }
}

/* ===== v13: replace shadow blobs with illustrated olive branches ===== */
.vine,
.lemon,
.grape,
.olive-line,
.olive-branch,
.olive-sprig {
  display: none !important;
}

.projector-lobby-stage::before,
.projector-lobby-stage::after,
.host-stage::before,
.host-stage::after,
.lobby-wide-scene::before,
.lobby-wide-scene::after,
.projector-view::before,
.projector-view::after {
  display: none !important;
  content: none !important;
}

.host-stage,
.projector-lobby-stage,
.projector-view {
  background: transparent !important;
}

.olive-ornaments {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.olive-ink {
  position: absolute;
  height: auto;
  opacity: 0.32;
}

.olive-ink path,
.olive-ink ellipse {
  fill: none;
  stroke: rgba(52, 55, 45, 0.72);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.olive-ink .branch {
  stroke-width: 4;
}

.olive-ink .olive-fruit {
  fill: rgba(93, 109, 86, 0.08);
  stroke-width: 1.8;
}

.olive-corner {
  width: clamp(210px, 20vw, 340px);
}

.olive-corner-tl { top: 8px; left: 8px; }
.olive-corner-tr { top: 8px; right: 8px; }
.olive-corner-bl { bottom: 8px; left: 8px; }
.olive-corner-br { bottom: 8px; right: 8px; }

.olive-frame {
  opacity: 0.22;
}

.olive-frame-top,
.olive-frame-bottom {
  width: clamp(170px, 16vw, 280px);
  left: 50%;
  transform: translateX(-50%);
}

.olive-frame-top { top: 28px; }
.olive-frame-bottom { bottom: 28px; }

.olive-frame-left,
.olive-frame-right {
  width: clamp(54px, 5vw, 82px);
  top: 50%;
  transform: translateY(-50%);
}

.olive-frame-left { left: 22px; }
.olive-frame-right { right: 22px; }

.screen,
.host-stage,
#hostState,
.lobby-wide-scene,
.projector-view,
.phone-screen,
.card {
  position: relative;
  z-index: 2;
}

@media (max-width: 1100px) {
  .olive-frame-top,
  .olive-frame-bottom,
  .olive-frame-left,
  .olive-frame-right {
    display: none;
  }
}

@media (max-width: 900px) {
  .olive-corner {
    width: 180px;
    opacity: 0.22;
  }
}
