@font-face { font-family: "EBG"; src: url("/static/fonts/ebg-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "EBG"; src: url("/static/fonts/ebg-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #FBF7EF;
  --card: #F6EEE8;
  --ink: #2B1B22;
  --soft: #4A363E;
  --muted: #7E7176;
  --wine: #6B1E3A;
  --wine-d: #4E1229;
  --wine-l: #F4E3E7;
  --vine: #4F6B3A;
  --vine-l: #E6EEDC;
  --gold: #C98B2B;
  --gold-l: #F6D9A8;
  --rule: #E7D9D3;
  --serif: "EBG", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--wine); margin: 0; line-height: 1.1; overflow-wrap: anywhere; }
.row > h1, .row > .title, .row > .nm { min-width: 0; overflow-wrap: anywhere; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 10px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.brand { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--vine); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- buttons and fields ---------- */
.btn {
  display: block; width: 100%; text-align: center; background: var(--wine); color: #fff;
  border-radius: 12px; padding: 15px 16px; font-weight: 700; font-size: 17px;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; }
.btn.ghost { background: transparent; color: var(--wine); box-shadow: inset 0 0 0 2px var(--wine); }
.btn.red { background: var(--vine); }
.btn.gold { background: var(--gold-l); color: var(--vine); }
.btn.small { display: inline-block; width: auto; padding: 8px 12px; font-size: 14px; border-radius: 9px; }
.link { color: var(--wine); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.input {
  width: 100%; border: 2px solid var(--rule); background: #fff; border-radius: 11px;
  padding: 12px 13px; font-size: 17px; outline: none;
}
.input:focus { border-color: var(--wine); }
.input.code { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.error { color: #B3261E; font-weight: 600; font-size: 15px; min-height: 1.2em; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.card.white { background: #fff; box-shadow: 0 0 0 1px var(--rule); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; background: #EEE8DC; color: var(--muted); white-space: nowrap; }
.tag.live { background: var(--vine); color: #fff; }
.tag.done { background: #EDD8DE; color: var(--wine); }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 11px 16px; border-radius: 11px; font-size: 15px; z-index: 50; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,.25);
}

/* ---------- swatches, people ---------- */
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; }
.swatch.on { outline: 3px solid var(--ink); outline-offset: 3px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 7px; background: #fff; border-radius: 99px;
  padding: 6px 12px 6px 7px; box-shadow: 0 0 0 1px var(--rule); font-weight: 600; font-size: 15px; }
.person .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.person .dot svg { width: 12px; height: 12px; }
.person.done { box-shadow: 0 0 0 2px var(--wine); }

/* ---------- rating controls ---------- */
.rate { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.rate > .lbl { font-weight: 600; font-size: 17px; }
.dots { display: flex; gap: 6px; }
.dots button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.dots button i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--wine); display: block; }
.dots button.on i { background: var(--wine); }
.hats { display: flex; gap: 2px; color: var(--vine); }
.hats button, .hats span { width: 38px; height: 38px; display: grid; place-items: center; }
.hats svg { width: 30px; height: 30px; }
.hats .off { color: #DCD2C2; }
.chips { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.chips button { height: 42px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--rule); background: #fff; font-weight: 700; font-size: 15px; }
.chips button.on { background: var(--gold); box-shadow: none; color: #fff; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--rule); padding: 6px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; background: var(--card); font-size: 24px; font-weight: 700; color: var(--wine); }
.stepper .v { font-weight: 800; font-size: 22px; }
.stepper .v.unset { color: var(--muted); font-weight: 600; font-size: 17px; }
.sec-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
/* the smallest phones (320–359 px): five dots and a label must still fit on one row */
@media (max-width: 359px) {
  .phone-app { padding: 14px 14px 24px; }
  .rate > .lbl { font-size: 15px; }
  .dots { gap: 2px; }
  .dots button, .hats button, .hats span { width: 31px; height: 34px; }
  .dots button i { width: 22px; height: 22px; }
  .hats svg { width: 25px; height: 25px; }
  .chips { gap: 3px; }
  .chips button { font-size: 13px; }
}

/* ---------- phone shell ---------- */
.phone-app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 18px 18px 28px; display: flex; flex-direction: column; gap: 16px; }
.phone-app.joker { background: var(--vine); color: #fff; max-width: none; }
.phone-app.joker > .inner { max-width: 444px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.phone-app.joker .brand { color: var(--gold-l); }
.phone-app.joker h2 { color: #fff; font-size: 28px; }
.opt { display: block; width: 100%; text-align: left; border-radius: 12px; padding: 14px 15px; font-size: 17px; font-weight: 600;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); color: #fff; }
.opt.on { background: #fff; color: var(--vine); box-shadow: none; }
.opt.own { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); border: 0; outline: 2px dashed transparent; }
.joker .input { border-color: transparent; color: var(--ink); }
.joker .note { color: #F5D0D8; font-size: 13px; text-align: center; }
.scale { display: flex; flex-direction: column; gap: 10px; }
.scale input[type=range] { width: 100%; accent-color: #fff; height: 40px; }
.scale .poles { display: flex; justify-content: space-between; font-weight: 700; gap: 12px; }
.scale .poles span:last-child { text-align: right; }
.big-check { width: 96px; height: 96px; border-radius: 50%; background: var(--card); display: grid; place-items: center; margin: 18px auto 4px; }
.big-check svg { width: 52px; height: 52px; }
.prog { height: 10px; border-radius: 6px; background: var(--card); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.reveal-card { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 0 0 1px var(--rule); }
.reveal-card .place { font-family: var(--serif); font-weight: 600; color: var(--vine); font-size: 18px; }
.reveal-card .nm { font-weight: 800; font-size: 18px; color: var(--wine); }
.badge { display: inline-block; background: var(--gold); color: #fff; font-weight: 800; border-radius: 10px; padding: 8px 12px; }
.verdict-text { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--soft); }

/* ---------- glasses ---------- */
.glass { width: 22px; height: 30px; flex: none; }

/* ---------- landing ---------- */
.landing { max-width: 560px; margin: 0 auto; padding: 32px 20px 40px; display: flex; flex-direction: column; gap: 22px; }
.landing .lineup { display: flex; gap: 10px; justify-content: space-between; }
/* glass() sets a fixed inline size; here the eight glasses share the width instead */
.landing .lineup .glass { width: calc((100% - 70px) / 8) !important; height: auto !important; aspect-ratio: 40 / 54; }
.dek { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--soft); line-height: 1.3; }

/* ---------- host ---------- */
.host-app { max-width: 1100px; margin: 0 auto; padding: 14px 18px 60px; }
.host-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: inline-flex; background: var(--card); border-radius: 12px; padding: 4px; }
.tabs button { padding: 9px 16px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--wine); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.host-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .host-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .host-app { padding: 12px 12px 60px; } .wine, .card { padding: 12px 13px; } }
.wine { background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--rule); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.wine.open { box-shadow: 0 0 0 2px var(--vine); }
.wine .title { font-weight: 800; font-size: 18px; color: var(--wine); }
.wine .facts { color: var(--muted); font-size: 14px; }
.iconbtn { width: 34px; height: 34px; border-radius: 9px; background: var(--card); font-weight: 700; color: var(--wine); }
.iconbtn.danger { color: var(--vine); }
.iconbtn.confirm { width: auto; padding: 0 10px; background: var(--vine); color: #fff; }
.jbox { border-radius: 12px; box-shadow: inset 0 0 0 2px var(--vine-l); padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; }
.jbox .h { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--vine); }
.jbox .chosen { font-weight: 700; font-size: 16px; }
.jbox .alts { font-size: 14px; color: var(--soft); }
.sugg { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.sugg .q { flex: 1; font-size: 15px; }
.sugg .src { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--vine); animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-weight: 600; }
.switch input { width: 46px; height: 28px; appearance: none; -webkit-appearance: none; background: var(--rule); border-radius: 99px; position: relative; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--wine); }
.switch input:disabled { opacity: .45; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } }
.choice button { text-align: left; background: #fff; border-radius: 12px; padding: 13px 14px; box-shadow: inset 0 0 0 2px var(--rule);
  font-size: 14px; line-height: 1.35; color: var(--soft); }
.choice button b { display: block; font-size: 17px; color: var(--wine); margin-bottom: 3px; }
.choice button.on { box-shadow: inset 0 0 0 3px var(--wine); background: var(--wine-l); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets .opt { width: auto; padding: 10px 13px; font-size: 15px; }
.tal-show { font-family: var(--serif); font-weight: 600; font-size: 30px; min-height: 1.2em; color: #fff; }
/* the price guess sits on the light rating page, not on the joker colour */
.price-guess .opt { background: #fff; color: var(--wine); box-shadow: inset 0 0 0 1.5px var(--rule); }
.price-guess .opt:active { background: var(--wine-l); }
.price-guess .tal-show { color: var(--wine); font-size: 22px; min-height: 0; }
.switch input:checked::after { left: 21px; }
.qr-img { width: 100%; max-width: 220px; border-radius: 10px; display: block; background: #fff; }
.codebig { font-weight: 800; font-size: 30px; letter-spacing: .12em; color: var(--wine); }
.card .codebig { font-size: 24px; letter-spacing: .08em; word-break: break-all; }
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, 94vw); background: var(--paper); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(40,20,28,.45); }
dialog form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.colorpick { display: flex; gap: 8px; flex-wrap: wrap; }
.colorpick button { padding: 4px; border-radius: 8px; }
.colorpick button.on { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- control bar (host, evening) ---------- */
.evening { display: flex; flex-direction: column; gap: 12px; }
.controls { position: sticky; bottom: 0; background: var(--paper); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--rule); z-index: 5; }
.controls .btn { width: auto; flex: 1; min-width: 220px; font-size: 19px; padding: 17px; }
.controls .info { color: var(--soft); font-size: 15px; }

/* ---------- the big screen (iPad) ---------- */
.screen { background: var(--wine); color: #fff; border-radius: 20px; padding: 28px 32px; min-height: 560px; position: relative; overflow: hidden; }
.screen-page { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--wine); }
.screen-page .screen { border-radius: 0; min-height: 100vh; min-height: 100dvh; padding: 36px 40px 40px; }
.screen .k { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-l); }
.screen h1, .screen h2, .screen h3 { color: #fff; }
.screen h1 { font-size: clamp(40px, 6vw, 64px); }
.screen h2 { font-size: clamp(28px, 3.6vw, 40px); }
.screen .sub { color: #EFCFD8; font-size: 19px; }
.screen .cols { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: start; }
@media (orientation: portrait), (max-width: 760px) { .screen .cols { grid-template-columns: 1fr; gap: 26px; } }
.screen .lobby-title { font-size: clamp(36px, 4.6vw, 58px); margin: 6px 0 18px; }
.screen .joinrow { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.screen .joininfo p { margin: 0 0 4px; }
.screen .qrwrap { background: #fff; border-radius: 18px; padding: 12px; width: min(270px, 34vh, 70vw); flex: none; }
.screen .qrwrap img { width: 100%; display: block; }
.screen .joinurl { font-size: 21px; font-weight: 700; color: #fff; word-break: break-all; }
.screen .codebig { color: #fff; font-size: 46px; }
.screen .people .person { background: #7E2A48; color: #fff; box-shadow: none; font-size: 17px; }
.screen .person .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.screen .people .person.done { background: #fff; color: var(--wine); }
.screen .stat { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.screen .stat .num { font-weight: 800; font-size: clamp(52px, 7vw, 84px); line-height: 1; }
.screen .stat .lab { color: #EFCFD8; font-size: 17px; line-height: 1.2; }
.screen .hats { color: #F3A6B5; }
.screen .hats .off { color: #8E3A57; }
.screen .hats span { width: 46px; height: 46px; }
.screen .hats svg { width: 42px; height: 42px; }
.screen .minis { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 22px; justify-content: start; color: #EFCFD8; font-size: 16px; }
.screen .minis b { color: #fff; font-size: 22px; }
.screen .quote { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.3; color: #F7E9ED; margin-top: 18px; }
.screen .jq { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; margin: 6px 0 16px; }
.screen .bars { display: flex; flex-direction: column; gap: 12px; }
.screen .bar { display: grid; grid-template-columns: minmax(140px, 38%) 1fr 34px; align-items: center; gap: 12px; font-size: 19px; }
.screen .bar .track-bar { height: 36px; background: #7E2A48; border-radius: 6px; overflow: hidden; }
.screen .bar .track-bar i { display: flex; align-items: center; gap: 2px; padding: 0 3px; height: 100%; min-width: 36px; background: var(--gold-l); border-radius: 6px; transition: width .6s; }
.screen .bar .c { font-weight: 800; text-align: right; }
.screen .scalebar { position: relative; height: 18px; background: #7E2A48; border-radius: 9px; margin: 22px 0 10px; }
.screen .scalebar .d { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--gold-l); opacity: .85; }
.screen .scalebar .m { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #F3A6B5; box-shadow: 0 0 0 4px var(--wine); }
.screen .poles { display: flex; justify-content: space-between; font-size: 19px; font-weight: 700; }
.screen .texts { display: flex; flex-wrap: wrap; gap: 10px; }
.screen .texts span { background: #7E2A48; border-radius: 10px; padding: 8px 13px; font-size: 19px; }
.screen .cornerqr { position: absolute; right: 22px; bottom: 20px; display: flex; align-items: center; gap: 12px; color: #EFCFD8; text-align: right; font-size: 14px; }
.screen .cornerqr img { width: 84px; height: 84px; background: #fff; border-radius: 8px; padding: 5px; }
.screen .cornerqr b { color: #fff; font-size: 18px; letter-spacing: .1em; }
.screen .progline { font-size: 22px; margin: 10px 0 14px; }
.screen .bigprog { height: 16px; background: #7E2A48; border-radius: 9px; overflow: hidden; margin-bottom: 18px; }
.screen .bigprog i { display: block; height: 100%; background: var(--gold-l); transition: width .5s; }
.screen .rev-main { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px 26px; }
.screen .rev-main .place { font-family: var(--serif); font-weight: 600; color: var(--vine); font-size: 26px; }
.screen .rev-main .nm { font-family: var(--serif); font-weight: 600; color: var(--wine); font-size: clamp(34px, 4.4vw, 52px); line-height: 1.05; margin: 4px 0 6px; }
.screen .rev-main .facts { color: var(--soft); font-size: 19px; }
.screen .rev-main .hats .off { color: #E6DDCF; }
.screen .rev-list { display: flex; flex-direction: column; gap: 8px; }
.screen .rev-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 18px; color: #EFCFD8; border-bottom: 1px solid #7E2A48; padding-bottom: 6px; }
.screen .rev-list b { color: #fff; }
.screen .prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.screen .prize { background: #7E2A48; border-radius: 16px; padding: 16px 18px; }
.screen .prize .t { font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--gold-l); }
.screen .prize .w { font-weight: 800; font-size: 21px; margin: 4px 0; }
.screen .prize .d { color: #EFCFD8; font-size: 15px; }
.screen .verdicts { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.screen .verdicts p { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.3vw, 25px); line-height: 1.35; color: #FAF2F4; margin: 0; }
.screen .verdicts p b { font-style: normal; color: var(--gold-l); font-family: var(--sans); font-size: .75em; letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.drum { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--gold-l); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.screen .lineup { display: flex; gap: 14px; margin: 10px 0 24px; }
.screen .lineup svg { width: 40px; height: auto; }

/* ======================================================= 21 Nov 2026: druvor, figures, infographics */

/* druvor (generated stickers, transparent) */
.avatar { object-fit: contain; display: inline-block; flex: none; }
.person { padding: 3px 12px 3px 4px; }
.person .tick { width: 16px; height: 16px; color: var(--wine); display: inline-grid; place-items: center; }
.person .tick svg { width: 14px; height: 14px; }
.screen .person .tick { color: var(--wine); }
.druvagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.druvapick { background: #fff; border-radius: 12px; padding: 3px; box-shadow: inset 0 0 0 2px var(--rule); display: grid; place-items: center; }
.druvapick.on { box-shadow: inset 0 0 0 3px var(--wine); background: var(--wine-l); }
.druvapick.taken { opacity: .28; }
.druva-chosen { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; min-height: 64px; }
.hero { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 0 14px; }

/* the Christmas figures: grey when empty, partly filled for means */
.figs { display: inline-flex; gap: 2px; align-items: center; }
.fig { position: relative; display: inline-block; width: var(--s); height: var(--s); }
.fig img { width: var(--s); height: var(--s); object-fit: contain; display: block; max-width: none; }
.fig .base { filter: grayscale(1); opacity: .22; }
.fig .fill { position: absolute; left: 0; top: 0; bottom: 0; overflow: hidden; }
.figbtn { padding: 2px 1px; border-radius: 8px; }
.figbtn:active { transform: scale(.92); }
.rate.wide { flex-direction: column; align-items: flex-start; gap: 4px; }
.rate .val { color: var(--gold); margin-left: 4px; }
.screen .fig .base { opacity: .3; }

/* the guest picks the colour */
.shades { display: flex; gap: 2px; justify-content: space-between; margin-top: 6px; }
.shade { padding: 5px 4px; border-radius: 9px; }
.shade.on { background: var(--wine-l); box-shadow: inset 0 0 0 2px var(--wine); }
.glass { color: var(--muted); }
.screen .glass { color: #EFCFD8; }

/* each guest's druva on a 1..n line */
.track { position: relative; margin: 6px calc(var(--s) / 2) 0; }
.track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 2px; background: currentColor; opacity: .22; border-radius: 1px; }
.track .tick-mark { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; line-height: 1; opacity: .55; }
.track .pin { position: absolute; transform: translateX(-50%); line-height: 0; }
.screen .track { color: #EFCFD8; }

/* comments, all of them, without names */
.bubbles { display: flex; flex-wrap: wrap; gap: 8px; }
.bubble { background: #fff; color: var(--ink); border-radius: 14px 14px 14px 4px; padding: 8px 13px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.3; box-shadow: 0 0 0 1px var(--rule); }
.screen .bubbles.big .bubble { font-size: 20px; box-shadow: none; }

/* joker answers with faces */
.jrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.jrow .jlabel { flex: 1; font-weight: 600; }
.jfaces { display: flex; gap: 2px; }
.scaleline { position: relative; height: 44px; margin: 6px 15px 4px; }
.scaleline::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 4px; border-radius: 2px; background: var(--rule); }
.scaleline .pin { position: absolute; bottom: 0; transform: translateX(-50%); line-height: 0; }
.poles { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }

/* the iPad's results picture */
.screen .frows { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.screen .frow { display: grid; grid-template-columns: 120px max-content 44px; justify-content: start; align-items: center; gap: 12px; }
.screen .flabel { color: #EFCFD8; font-size: 17px; }
.screen .fval { font-size: 19px; text-align: right; }
.screen .rev-main .frows { margin-top: 10px; }
.screen .frows.light .flabel { color: var(--muted); }
.screen .frows.light .fval { color: var(--ink); }
.screen .rev-main .glass { color: var(--muted); }
.screen .colourblock { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.screen .scalebar.faces { height: 14px; margin: 50px 20px 12px; }
.screen .scalebar .face { position: absolute; bottom: 8px; transform: translateX(-50%); line-height: 0; }
.screen .answers { display: flex; flex-wrap: wrap; gap: 10px; }
.screen .ans { display: inline-flex; align-items: center; gap: 8px; background: #7E2A48; border-radius: 12px; padding: 5px 13px 5px 5px; font-size: 19px; }

/* the summary page */
.summary-page { background: var(--paper); }
.summary { max-width: 1040px; margin: 0 auto; padding: 26px 22px 50px; }
.sum-head { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 24px; align-items: center; border-bottom: 3px solid var(--wine); padding-bottom: 18px; }
.sum-head h1 { font-size: clamp(34px, 5vw, 54px); margin: 4px 0 6px; }
.sum-head .hero { margin: 0; max-width: 100%; }
.sum-head .people { margin-top: 12px; }
@media (max-width: 720px) { .sum-head { grid-template-columns: 1fr; } }
.sum-section { margin-top: 30px; }
.sum-section > h2 { font-size: 28px; margin-bottom: 12px; }
.toplist { display: flex; flex-direction: column; gap: 8px; }
.toprow { display: grid; grid-template-columns: 30px 30px minmax(120px, 1.1fr) 2fr 44px; align-items: center; gap: 10px; }
.topplace { font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--vine); text-align: center; }
.topname { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.topbar { height: 22px; background: var(--card); border-radius: 4px; overflow: hidden; }
.topbar i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.topval { font-size: 20px; text-align: right; color: var(--wine); }
@media (max-width: 560px) { .toprow { grid-template-columns: 24px 24px 1fr 52px; } .topbar { grid-column: 3 / 4; } .topname { grid-column: 3 / 5; grid-row: 1; } .topval { grid-row: 2; grid-column: 4; } }
.wine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.sum-wine { background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--rule); padding: 16px 18px; break-inside: avoid; }
.sum-wine h3 { font-size: 22px; }
.place-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; font-weight: 800; }
.sum-num { font-size: 32px; color: var(--wine); }
.sum-joker { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.sum-guest { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 12px 16px; break-inside: avoid; }
.badge.small { font-size: 12px; padding: 4px 9px; border-radius: 8px; }
.prize-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.sum-prize { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 0 0 1px var(--rule); }
.sum-prize .place { font-family: var(--serif); font-weight: 600; color: var(--vine); font-size: 19px; }
.sum-verdict { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: start; }
.sum-verdict .judge { width: 100%; height: auto; }
.sum-verdict .vhead { display: block; font-style: normal; font-family: var(--sans); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--vine); }
@media (max-width: 560px) { .sum-verdict { grid-template-columns: 1fr; } .sum-verdict .judge { width: 130px; } }
.sum-foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media print {
  .noprint { display: none !important; }
  :root { --sans: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif; }  /* static faces: Chrome embeds the variable system font as Type 3 */
  body { background: #fff; font-size: 13px; font-synthesis: none; }
  .summary { padding: 0; max-width: none; }
  /* A4 is ~720 css px wide: keep two columns instead of the phone layout */
  .sum-head { grid-template-columns: 1fr 190px !important; gap: 16px; padding-bottom: 10px; }
  .sum-head .hero { max-width: 190px; }
  .sum-head h1 { font-size: 36px; }
  .sum-section { margin-top: 18px; }
  .sum-section > h2 { font-size: 22px; break-after: avoid; }
  .wine-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .sum-wine { padding: 10px 12px; box-shadow: 0 0 0 1px var(--rule); }
  .sum-wine h3 { font-size: 17px; }
  .sum-wine .rate { padding: 1px 0; }
  .sum-wine .lbl { font-size: 12px; }
  .bubble { font-size: 13px; padding: 5px 9px; }
  .guest-grid, .prize-list { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .sum-guest .avatar { width: 64px !important; height: 64px !important; }
  .sum-verdict { grid-template-columns: 110px 1fr; }
  .verdict-text { font-size: 14px; }
  .sum-foot { break-before: avoid; margin-top: 16px; }
  .sum-prize, .sum-guest, .toprow { break-inside: avoid; }
}
/* the smallest phones: figures and the eight glasses must stay inside the card (268 px) */
@media (max-width: 359px) {
  .phone-app .card.white .figs:not(.ten) { --s: 25px !important; }
  .phone-app .figs.ten { --s: 21px !important; }
  .shade { padding: 4px 2px; }
  .shade .glass { width: 22px !important; height: 30px !important; }
}
