/* Noche FLY — guest phone. Light Christmas-card skin (cream · wine · pine) from the invitation. */

:root {
  --paper: #FFFCF6;
  --line: rgba(126, 16, 32, .10);
  --line-2: rgba(27, 26, 23, .12);
  --gutter: 16px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

html { background: var(--cream); }
html.locked, html.locked body { overflow: hidden; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  background:
    radial-gradient(90% 50% at 100% 0%, rgba(212, 169, 58, .10), transparent 60%),
    radial-gradient(80% 50% at 0% 100%, rgba(10, 127, 69, .07), transparent 60%),
    var(--cream);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- decoration ---------- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.decor .d { position: absolute; }
.d1 { width: 18px; height: 18px; top: calc(var(--safe-t) + 18px); left: 14px; color: var(--wine); opacity: .75; transform: rotate(-12deg); }
.d2 { width: 34px; height: 34px; top: calc(var(--safe-t) + 60px); right: 12px; color: var(--wine); opacity: .30; }
.d3 { width: 14px; height: 14px; top: 30%; right: 10px; color: var(--gold); opacity: .9; }
.d4 { width: 30px; height: 30px; top: 46%; left: -6px; color: var(--pine); opacity: .22; }
.d5 { width: 12px; height: 12px; top: 64%; right: 18px; color: var(--wine); opacity: .55; }
.d6 { width: 16px; height: 16px; bottom: 14%; left: 12px; color: var(--gold); opacity: .85; transform: rotate(14deg); }
.d7 { width: 40px; height: 40px; bottom: 4%; right: -8px; color: var(--pine); opacity: .20; }
.d8 { width: 11px; height: 11px; top: 82%; left: 46%; color: var(--gold); opacity: .8; }
@media (min-width: 640px) {
  .d1 { width: 28px; height: 28px; left: 8%; top: 8%; }
  .d2 { width: 70px; height: 70px; right: 9%; top: 12%; }
  .d3 { width: 22px; height: 22px; right: 16%; }
  .d4 { width: 64px; height: 64px; left: 10%; }
  .d5 { width: 20px; height: 20px; right: 12%; }
  .d6 { width: 26px; height: 26px; left: 15%; }
  .d7 { width: 80px; height: 80px; right: 10%; }
  .d8 { left: 20%; }
}

/* ---------- layout ---------- */
.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 10px) calc(var(--safe-r) + var(--gutter)) calc(var(--safe-b) + 28px) calc(var(--safe-l) + var(--gutter));
}
.screen { display: flex; flex-direction: column; gap: 16px; }
.screen-center { min-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 40px); justify-content: center; align-items: center; text-align: center; }
#home { display: flex; flex-direction: column; gap: 16px; }

.top { display: flex; justify-content: center; padding-top: 4px; }
.top .crest { width: 112px; height: auto; }
.top-home { align-items: center; justify-content: flex-start; gap: 12px; padding: 2px 2px 0; }
.top-home .crest { width: 74px; flex: none; }
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-gala); font-weight: 800; font-size: 28px; line-height: 1.05; color: var(--wine); letter-spacing: -.01em; }
.brand-sub { font-family: var(--font-sport); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--pine); line-height: 1.25; margin-top: 3px; }

.crest { height: auto; filter: drop-shadow(0 6px 14px rgba(11, 77, 46, .18)); }
.crest-xl { width: min(220px, 60vw); }
.pulse { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(.95); opacity: .75; } }
.boot-text { font-family: var(--font-sport); font-weight: 600; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--pine); }
.fly-mascot { width: 150px; height: auto; }

/* ---------- type ---------- */
.eyebrow { margin: 0; font-family: var(--font-sport); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--pine); }
.eyebrow.light { color: var(--gold-hi); }
.title { margin: 0; font-family: var(--font-gala); font-weight: 800; font-size: clamp(30px, 8.6vw, 40px); line-height: 1.04; color: var(--wine); letter-spacing: -.015em; text-wrap: balance; }
.title em { font-style: italic; font-weight: 600; color: var(--pine); }
.h2 { margin: 0; font-family: var(--font-gala); font-weight: 800; font-size: 22px; line-height: 1.12; color: var(--wine); letter-spacing: -.01em; }
.lead { margin: 0; font-size: 17px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.center { text-align: center; }
.note { margin: 0; font-size: 15px; color: var(--ink-2); }
.fine { margin: 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.label { display: block; margin: 0 0 6px; font-family: var(--font-sport); font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.label small { font-weight: 600; letter-spacing: .04em; text-transform: none; font-family: var(--font-body); font-size: 13px; opacity: .8; }

.intro { display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 0 4px; }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 8px 24px rgba(60, 30, 10, .07), 0 1px 3px rgba(60, 30, 10, .06);
}

/* ---------- icons ---------- */
.i { width: 22px; height: 22px; flex: none; }
.i-sm { width: 16px; height: 16px; }
.i-xl { width: 40px; height: 40px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px;
  border: 0; border-radius: 16px;
  font-family: var(--font-sport); font-weight: 800; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05;
  text-align: center; text-decoration: none;
  transition: transform .12s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .icon-btn:focus-visible, .nom-item:focus-visible, .face:focus-visible, .nominee:focus-visible, .branch-btn:focus-visible, .me-photo:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--wine); color: var(--cream); box-shadow: 0 6px 16px rgba(163, 24, 43, .28), 0 -2px 0 rgba(0, 0, 0, .15) inset; }
.btn-primary:hover:not(:disabled) { background: #B31D31; }
.btn-secondary { background: transparent; color: var(--wine-deep); border: 2px solid rgba(163, 24, 43, .35); }
.btn-secondary:hover:not(:disabled) { background: rgba(163, 24, 43, .05); }
.btn-link { background: none; color: var(--ink-2); min-height: 48px; font-size: 17px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.btn-gold { background: var(--gold-grad); color: #3A0A12; box-shadow: 0 8px 22px rgba(0, 0, 0, .28), 0 -2px 0 rgba(0, 0, 0, .12) inset; font-size: 22px; min-height: 60px; }
.btn-gold:disabled { background: rgba(255, 255, 255, .16); color: rgba(255, 248, 235, .85); box-shadow: none; opacity: 1; }
.btn-ghost-light { background: transparent; color: var(--cream); border: 2px solid rgba(255, 248, 235, .45); }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  border: 0; border-radius: 50%; background: rgba(163, 24, 43, .07); color: var(--wine);
}
.row { display: flex; gap: 10px; }
.row > .btn { flex: 1; padding: 0 12px; }

.spin { width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field input {
  width: 100%; min-height: 54px; padding: 0 16px;
  font-size: 18px; color: var(--ink);
  background: #fff; border: 2px solid var(--line-2); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: #A39E92; }
.field input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(47, 93, 58, .14); }
.branch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.branch-btn {
  min-height: 60px; border-radius: 14px; border: 2px solid var(--line-2); background: #fff; color: var(--ink);
  font-family: var(--font-sport); font-weight: 800; font-size: 22px; letter-spacing: .04em; text-transform: uppercase;
  transition: all .15s var(--ease); touch-action: manipulation;
}
.branch-btn[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: var(--cream); box-shadow: 0 6px 14px rgba(47, 93, 58, .28); }
.form-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(163, 24, 43, .08); color: var(--wine-deep); font-size: 15px; font-weight: 500; }
.form-error.light { background: rgba(0, 0, 0, .25); color: #FFE6E9; }

/* ---------- invitation strip ---------- */
.invite { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: 100%; margin: 4px 0 0; }
.inv-side { border-top: 1.5px solid rgba(47, 93, 58, .45); border-bottom: 1.5px solid rgba(47, 93, 58, .45); padding: 6px 0; font-weight: 500; font-size: 16px; color: var(--pine); text-align: center; white-space: nowrap; }
.inv-day { font-family: var(--font-gala); font-weight: 800; font-size: 54px; line-height: .9; color: var(--eagle-deep); }
.inv-place { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; color: var(--pine); font-weight: 500; font-size: 15px; text-align: center; }

/* ---------- gate ---------- */
.gate { gap: 14px; padding: 12px 4px; }
.gate .title { margin-top: 6px; }
.gate .invite { max-width: 320px; margin-top: 12px; }

/* ---------- registration ---------- */
.reg { gap: 18px; }
.later { display: flex; flex-direction: column; align-items: center; }
.nudge { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; align-items: center; width: 100%; animation: pop .3s var(--ease); }
.nudge p { margin: 0; font-size: 15px; color: var(--ink-2); }
.nudge b { color: var(--wine); }
.nudge .row { grid-column: 1 / -1; margin-top: 6px; }
.nudge-fly { width: 64px; height: auto; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* photo panel */
.ph { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ph-frame {
  position: relative; width: min(220px, 58vw); aspect-ratio: 1; border-radius: 50%;
  background: repeating-linear-gradient(45deg, #F7F1E6 0 10px, #F1E9DA 10px 20px);
  box-shadow: 0 0 0 5px #fff, 0 0 0 7px rgba(163, 24, 43, .25), 0 14px 30px rgba(60, 30, 10, .18);
  overflow: hidden; display: grid; place-items: center;
}
.ph-compact .ph-frame { width: 140px; }
.ph-frame img { width: 100%; height: 100%; object-fit: cover; }
.ph-frame.is-done { box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--eagle), 0 14px 30px rgba(60, 30, 10, .18); }
.ph-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: rgba(163, 24, 43, .55); font-family: var(--font-sport); font-weight: 800; font-size: 26px; letter-spacing: .06em; }
.ph-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(27, 18, 12, .45); color: #fff; font-family: var(--font-sport); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ph-busy .spin { width: 30px; height: 30px; }
.ph-ok { position: absolute; right: 12%; bottom: 6%; width: 40px; height: 40px; border-radius: 50%; background: var(--eagle); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; animation: pop .3s var(--ease); }
.ph-compact .ph-ok { width: 32px; height: 32px; right: 6%; bottom: 2%; }
.ph-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }

/* ---------- avatars ---------- */
.av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--cream-2); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-empty { background: hsl(var(--h, 350) 45% 88%); color: hsl(var(--h, 350) 55% 28%); font-family: var(--font-sport); font-weight: 800; letter-spacing: .04em; }
.av-md { width: 44px; height: 44px; font-size: 17px; }
.av-lg { width: 100%; aspect-ratio: 1; font-size: 30px; }
.av-xl { width: 96px; height: 96px; font-size: 34px; }
.av-hero { width: min(220px, 56vw); height: min(220px, 56vw); font-size: 72px; }

/* ---------- home ---------- */
.me-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px; }
.me-photo { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; }
.me-photo .av { box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(163, 24, 43, .22); }
.me-photo-badge { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--paper); }
.me-info { min-width: 0; }
.me-name { margin: 0; font-family: var(--font-gala); font-weight: 800; font-size: 24px; line-height: 1.08; color: var(--ink); overflow-wrap: anywhere; }
.me-nick { margin: 2px 0 0; font-family: var(--font-gala); font-style: italic; font-weight: 600; color: var(--pine); font-size: 17px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(27, 26, 23, .06); color: var(--ink-2); font-family: var(--font-sport); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.chip-wine { background: rgba(163, 24, 43, .09); color: var(--wine-deep); padding-left: 10px; }
.chip-green { background: var(--eagle); color: #fff; }
.me-edit { align-self: start; }

.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF5468; box-shadow: 0 0 0 0 rgba(255, 84, 104, .7); animation: beat 1.3s infinite; flex: none; }
@keyframes beat { 70% { box-shadow: 0 0 0 10px rgba(255, 84, 104, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 84, 104, 0); } }

.reminder { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start; background: linear-gradient(160deg, #FFF8EC, #FBEBD3); border-color: rgba(212, 169, 58, .45); }
.reminder-fly { width: 76px; height: auto; margin-top: 4px; }
.reminder p { margin: 6px 0 12px; color: var(--ink-2); font-size: 15px; }
.reminder .btn { min-height: 50px; font-size: 18px; padding: 0 18px; }

.team-card { padding: 0; overflow: hidden; border: 0; }
.team-head { background: var(--team); color: var(--team-fg); padding: 20px 18px 18px; text-align: center; position: relative; }
.team-head::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .22), transparent 60%); pointer-events: none; }
.team-kicker { margin: 0; font-family: var(--font-sport); font-weight: 800; font-size: 18px; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.team-name { margin: 2px 0 0; font-family: var(--font-sport); font-weight: 900; font-style: italic; font-size: clamp(54px, 17vw, 76px); line-height: .9; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.team-body { padding: 16px 18px 18px; }
.mates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px 8px; }
.mates li { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; font-size: 13px; font-weight: 500; text-align: center; }
.mates li span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mates .av-md { width: 54px; height: 54px; box-shadow: 0 0 0 3px var(--team); }
.mates .is-me { font-weight: 700; color: var(--wine); }
.team-wait { text-align: center; }
.team-wait p:last-child { margin: 6px 0 0; color: var(--ink-2); }

.event-card { text-align: center; }
.event-card .label { color: var(--wine); }
.event-tip { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(47, 93, 58, .08); color: var(--eagle-deep); font-size: 15px; text-align: left; }

.section { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px; }
.count { font-family: var(--font-sport); font-weight: 800; font-size: 16px; letter-spacing: .06em; color: var(--pine); }
.section-sub { display: flex; gap: 8px; align-items: flex-start; margin: -2px 2px 2px; font-size: 14px; color: var(--ink-2); }
.section-sub .i { margin-top: 2px; color: var(--pine); }

.winners-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.win-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; }
.win-row span:last-child { display: flex; flex-direction: column; min-width: 0; }
.win-row small { font-family: var(--font-sport); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pine); font-size: 13px; }
.win-row b { font-family: var(--font-gala); font-size: 18px; color: var(--wine); line-height: 1.15; }
.win-row .av-md { box-shadow: 0 0 0 2px var(--gold); }

.board { list-style: none; margin: 0; padding: 6px 14px; }
.board li { display: flex; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board .pos { width: 22px; font-family: var(--font-sport); font-weight: 800; font-size: 18px; color: var(--ink-2); }
.board .dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15) inset; }
.board .tn { flex: 1; font-weight: 600; }
.board .tn small { font-family: var(--font-sport); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--pine); font-size: 12px; margin-left: 4px; }
.board b { font-family: var(--font-sport); font-weight: 800; font-size: 20px; }
.board .is-mine { font-weight: 700; }

.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0 4px; color: var(--ink-2); font-size: 13px; text-align: center; }
.foot img { width: 70px; height: auto; opacity: .95; }
.foot p { margin: 0; }

/* ---------- layers ---------- */
.layer {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(90% 40% at 100% 0%, rgba(212, 169, 58, .10), transparent 60%),
    var(--cream);
  animation: layer-in .28s var(--ease);
}
@keyframes layer-in { from { opacity: 0; transform: translateY(14px); } }
.layer-inner {
  max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + var(--gutter)) calc(var(--safe-b) + 28px) calc(var(--safe-l) + var(--gutter));
}
.layer-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 2; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter); background: rgba(244, 239, 230, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.layer-title { text-align: center; min-width: 0; }
.layer-title h2 { margin: 0; font-family: var(--font-gala); font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--wine); overflow-wrap: anywhere; }
.layer-title .eyebrow { font-size: 13px; }

/* nominate */
.nominate .lead { font-size: 16px; }
.anon { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(47, 93, 58, .08); font-size: 14px; color: var(--eagle-deep); font-weight: 500; text-align: center; text-wrap: balance; }
.anon .i { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.search { position: sticky; top: calc(var(--safe-t) + 66px); z-index: 1; display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 52px; background: #fff; border: 2px solid var(--line-2); border-radius: 14px; color: var(--ink-2); margin-top: 6px; box-shadow: 0 6px 16px rgba(60, 30, 10, .06); }
.search:focus-within { border-color: var(--pine); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; min-height: 48px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.faces { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 440px) { .faces { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.face { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px 2px; border: 0; background: none; border-radius: 16px; color: var(--ink); transition: transform .12s var(--ease), background .15s; }
.face:active { transform: scale(.96); background: rgba(163, 24, 43, .06); }
.face .av { box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(60, 30, 10, .12); }
.face-name { font-size: 14px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.face-name small { font-weight: 500; color: var(--ink-2); }
.face-nick { margin-top: -4px; font-family: var(--font-gala); font-style: italic; font-size: 13px; color: var(--pine); text-align: center; overflow-wrap: anywhere; }
.faces-empty { grid-column: 1 / -1; padding: 24px 8px; text-align: center; color: var(--ink-2); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(27, 18, 12, .45); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 56; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 24px calc(var(--gutter) + var(--safe-r)) calc(var(--safe-b) + 16px) calc(var(--gutter) + var(--safe-l));
  background: var(--paper); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
  animation: sheet-in .28s var(--ease);
}
@keyframes sheet-in { from { transform: translate(-50%, 40px); opacity: 0; } }
.sheet p { margin: 0; color: var(--ink-2); }
.sheet .av-xl { width: 110px; height: 110px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold); margin-bottom: 4px; }
.sheet .btn-primary { margin-top: 6px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 32px 8px; }
.empty p { margin: 0; color: var(--ink-2); }
.empty-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(163, 24, 43, .08); color: var(--wine); }
.empty-icon.ok { background: var(--eagle); color: #fff; }

/* welcome */
.welcome { align-items: center; text-align: center; justify-content: center; min-height: 100%; gap: 12px; position: relative; padding-top: calc(var(--safe-t) + 24px); }
.welcome .crest { width: 90px; margin-bottom: 10px; }
.welcome-photo .av { box-shadow: 0 0 0 6px #fff, 0 0 0 10px var(--gold), 0 20px 40px rgba(60, 30, 10, .25); animation: pop .5s var(--ease); }
.welcome-title { font-size: clamp(34px, 10vw, 46px); }
.welcome-look { margin: 0; font-family: var(--font-sport); font-weight: 800; font-size: 26px; letter-spacing: .06em; text-transform: uppercase; color: var(--pine); }
.welcome .btn { margin-top: 8px; }
.welcome-stars .i { position: absolute; color: var(--gold); }
.ws1 { top: 12%; left: 8%; width: 26px !important; height: 26px !important; }
.ws2 { top: 20%; right: 10%; width: 18px !important; height: 18px !important; color: var(--wine) !important; }
.ws3 { top: 40%; left: 4%; width: 36px !important; height: 36px !important; color: var(--pine) !important; opacity: .3; }
.ws4 { top: 46%; right: 6%; width: 22px !important; height: 22px !important; }

.notice { align-items: center; text-align: center; padding-top: calc(var(--safe-t) + 32px); }
.notice-card { width: 100%; }

/* ---------- live vote ---------- */
.layer-vote {
  z-index: 60;
  color: var(--cream);
  background:
    radial-gradient(120% 55% at 50% -5%, rgba(243, 217, 139, .20), transparent 60%),
    radial-gradient(140% 90% at 50% 0%, #B21E33 0%, var(--wine-deep) 50%, #45070F 100%);
  background-attachment: fixed;
}
.vote-inner {
  max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 14px;
  padding: calc(var(--safe-t) + 16px) calc(var(--safe-r) + var(--gutter)) calc(var(--safe-b) + 20px) calc(var(--safe-l) + var(--gutter));
}
.vote-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .25); font-family: var(--font-sport); font-weight: 800; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: #FFE3E7; }
.vote-title { margin: 0; font-family: var(--font-gala); font-weight: 800; font-size: clamp(28px, 8vw, 42px); line-height: 1.02; letter-spacing: -.015em; color: #FFF8EB; text-wrap: balance; overflow-wrap: anywhere; }
.vote-desc { margin: 0; color: rgba(255, 248, 235, .82); font-size: 15px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }

.cd-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.countdown { position: relative; width: 78px; height: 78px; flex: none; display: grid; place-items: center; }
.cd-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cd-track { fill: rgba(0, 0, 0, .22); stroke: rgba(255, 255, 255, .14); stroke-width: 5; }
.cd-bar { fill: none; stroke: var(--gold-hi); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear, stroke .3s; }
.cd-num { position: relative; font-family: var(--font-sport); font-weight: 800; font-size: 36px; line-height: 1; color: #FFF8EB; font-variant-numeric: tabular-nums; }
.countdown.is-low .cd-bar { stroke: #FF7A8A; }
.countdown.is-low .cd-num { color: #FFD0D6; animation: tickpulse 1s infinite; }
.countdown.is-over .cd-num { font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
@keyframes tickpulse { 50% { transform: scale(1.12); } }
.cd-meta { margin: 0; display: flex; flex-direction: column; gap: 2px; font-family: var(--font-sport); font-weight: 600; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 248, 235, .78); line-height: 1.15; }
.cd-label { font-weight: 800; font-size: 19px; color: #FFF8EB; }
.cd-meta b { color: var(--gold-hi); font-weight: 800; }

.voted-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 248, 235, .96); color: var(--ink); box-shadow: 0 10px 26px rgba(0, 0, 0, .25); animation: pop .35s var(--ease); }
.voted-card h2 { margin: 0; font-family: var(--font-gala); font-weight: 800; font-size: 24px; color: var(--eagle-deep); }
.voted-card p { margin: 2px 0 0; font-size: 15px; color: var(--ink-2); }
.voted-check { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--eagle); color: #fff; display: grid; place-items: center; }
.voted-check .i-xl { width: 32px; height: 32px; }
.vote-notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(243, 217, 139, .35); }
.vote-notice p { margin: 0; font-size: 15px; color: rgba(255, 248, 235, .9); }
.vote-notice b { color: var(--gold-hi); }
.vote-notice .i { color: var(--gold-hi); margin-top: 2px; }

.nominees { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nominees > li { display: flex; }
.nominees .nominee { flex: 1; }
.nm-label { flex: 1; }
.nominees.n1 { grid-template-columns: minmax(0, 260px); justify-content: center; }
.nominees.n3 > li:last-child, .nominees.n5 > li:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
.nominee {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden; text-align: left;
  border: 0; border-radius: 18px; background: #FFF8EB; color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28); transition: transform .15s var(--ease), box-shadow .15s, opacity .2s;
  touch-action: manipulation;
}
.nominee:disabled { cursor: default; }
.nominee:active:not(:disabled) { transform: scale(.97); }
.nominee.is-sel { transform: translateY(-3px); box-shadow: 0 0 0 4px var(--gold-hi), 0 14px 30px rgba(0, 0, 0, .35); }
.nominees.is-voted .nominee:not(.is-mine) { opacity: .55; }
.nominee.is-mine { box-shadow: 0 0 0 4px var(--eagle), 0 10px 24px rgba(0, 0, 0, .28); }
.nm-media { position: relative; display: flex; width: 100%; aspect-ratio: 1; background: var(--cream-2); overflow: hidden; }
.nominees .nm-media { aspect-ratio: 4 / 3.4; }
.nm-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; min-width: 0; }
.nm-duo img { width: 50%; }
.nm-duo img + img { border-left: 3px solid #FFF8EB; }
.nm-video, .nominees .nm-video { aspect-ratio: 16 / 10; background: #111; }
.nm-play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; padding: 9px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; }
.nm-empty { display: grid; place-items: center; background: hsl(var(--h, 350) 45% 86%); color: hsl(var(--h, 350) 55% 28%); font-family: var(--font-sport); font-weight: 800; font-size: 44px; }
.nm-label { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px 11px; min-height: 52px; justify-content: center; }
.nm-label b { font-family: var(--font-gala); font-weight: 800; font-size: 18px; line-height: 1.12; color: var(--wine-deep); overflow-wrap: anywhere; }
.nm-label small { font-size: 13px; color: var(--ink-2); line-height: 1.25; }
.nm-check { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: #3A0A12; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); transform: scale(0); transition: transform .2s var(--ease); }
.nominee.is-sel .nm-check { transform: scale(1); }
.nominee.is-mine .nm-check { transform: scale(1); background: var(--eagle); color: #fff; }

.vote-bar {
  position: sticky; bottom: 0; margin: auto calc(-1 * var(--gutter)) calc(-1 * (var(--safe-b) + 20px)); padding: 14px var(--gutter) calc(var(--safe-b) + 16px);
  background: linear-gradient(to top, rgba(69, 7, 15, .98) 55%, rgba(69, 7, 15, 0)); display: flex; flex-direction: column; gap: 8px;
}
.vote-bar .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 60px; padding: 0 16px; }
.vote-bar .btn .spin { display: inline-block; vertical-align: -3px; margin-right: 8px; }

.vote-center { align-items: center; justify-content: center; text-align: center; gap: 14px; position: relative; }
.vote-center .crest { width: 96px; }
.vote-x { position: absolute; top: calc(var(--safe-t) + 12px); right: calc(var(--safe-r) + 12px); background: rgba(0, 0, 0, .25); color: var(--cream); }
.big-count { margin: 0; font-family: var(--font-sport); font-weight: 800; font-size: 40px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-hi); }
.vote-look { margin: 4px 0 10px; font-size: 18px; font-weight: 500; color: #FFF8EB; }
.reveal-kicker { margin: 0; font-family: var(--font-gala); font-style: italic; font-weight: 600; font-size: clamp(26px, 7.5vw, 34px); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.winners { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: 100%; }
.winners li { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(260px, 74vw); animation: winner-in .7s var(--ease) both; }
.winners.tie li { width: min(170px, 42vw); }
.winners .nm-media { border-radius: 22px; box-shadow: 0 0 0 5px var(--gold), 0 20px 44px rgba(0, 0, 0, .4); }
.winners .nm-video { border-radius: 16px; }
.winners b { margin-top: 8px; font-family: var(--font-gala); font-weight: 800; font-size: clamp(26px, 8vw, 36px); line-height: 1.05; color: #FFF8EB; overflow-wrap: anywhere; }
.winners.tie b { font-size: 22px; }
.winners small { color: rgba(255, 248, 235, .8); }
@keyframes winner-in { from { transform: scale(.6) rotate(-4deg); opacity: 0; } }

/* ---------- toast, network, confetti ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(var(--safe-b) + 18px); transform: translate(-50%, 20px); opacity: 0;
  width: max-content; max-width: min(440px, calc(100vw - 32px)); padding: 14px 18px; border-radius: 16px;
  background: var(--eagle-deep); color: #fff; font-weight: 500; font-size: 15px; text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  transition: transform .25s var(--ease), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--wine-deep); }
.net {
  position: fixed; z-index: 90; top: calc(var(--safe-t) + 8px); left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; background: rgba(27, 26, 23, .82); color: #fff;
  font-family: var(--font-sport); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -24px; animation-name: fall; animation-timing-function: cubic-bezier(.3, .1, .6, 1); animation-fill-mode: forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--r)); } }

.noscript { padding: 24px; text-align: center; }

/* ---------- wider screens: same column, a bit more air ---------- */
@media (min-width: 640px) {
  .app { padding-top: calc(var(--safe-t) + 28px); }
  .top-home .crest { width: 86px; }
  .layer-inner { padding-top: calc(var(--safe-t) + 20px); }
  .nominees.is-video { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.its-you { margin: 0; padding: 8px 16px; border-radius: 999px; background: var(--gold-grad); color: #3A0A12; font-family: var(--font-sport); font-weight: 800; font-size: 20px; letter-spacing: .05em; text-transform: uppercase; animation: pop .5s var(--ease) .6s both; }

/* Tablet / desktop: nominees side by side so the whole vote fits on screen. */
@media (min-width: 720px) {
  .vote-inner { max-width: 980px; }
  .vote-head, .voted-card, .vote-notice { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
  .nominees { grid-template-columns: repeat(auto-fit, minmax(0, 210px)); justify-content: center; gap: 16px; }
  .nominees.n3 > li:last-child, .nominees.n5 > li:last-child { grid-column: auto; width: auto; }
  .nominees.is-video { grid-template-columns: repeat(auto-fit, minmax(0, 280px)); }
  .vote-bar { margin-top: 8px; }
  .vote-bar > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
}
.arrive-card { display: flex; flex-direction: column; gap: 12px; text-align: center; border-color: rgba(10, 127, 69, .3); background: linear-gradient(160deg, #F3FAF5, #E4F2E9); }
.arrive-card p { margin: 6px 0 0; color: var(--ink-2); }

/* ---------- round 2: PIN, "Ya me registré", live nomination, staff link, rehearsal ---------- */
.hint { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.hint .i { margin-top: 2px; color: var(--pine); }
.field .pin-input, .pin-input {
  width: 100%; min-height: 58px; padding: 0 16px; text-align: center;
  font-family: var(--font-sport); font-weight: 800; font-size: 30px; letter-spacing: .5em; text-indent: .5em;
  color: var(--ink); background: #fff; border: 2px solid var(--line-2); border-radius: 14px;
  -webkit-appearance: none; appearance: none;
}
.pin-input::placeholder { color: #C9C2B4; letter-spacing: .3em; }
.pin-input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(47, 93, 58, .14); }

.already { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink-2); font-size: 15px; text-align: center; }
.already .btn { min-width: 220px; }
.staff-link { display: block; align-self: center; margin: 6px auto 0; padding: 12px 16px; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; opacity: .75; }
.foot .staff-link { margin-top: 0; }

.dups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dup { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; }
.dup .av-xl { width: 72px; height: 72px; font-size: 26px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(163, 24, 43, .2); }
.dup-info { display: flex; flex-direction: column; min-width: 0; }
.dup-info b { font-family: var(--font-gala); font-size: 22px; color: var(--ink); line-height: 1.1; overflow-wrap: anywhere; }
.dup-info span { font-family: var(--font-gala); font-style: italic; color: var(--pine); }
.dup .btn { grid-column: 1 / -1; }

.claim-card { align-items: center; text-align: center; }
.claim-card .av-xl { width: 112px; height: 112px; font-size: 38px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold); }
.claim-card .pin-input { max-width: 240px; }

.pin-card p { margin: 6px 0 12px; color: var(--ink-2); font-size: 15px; }
.pin-row { display: flex; gap: 10px; }
.pin-row .pin-input { flex: 1; min-width: 0; font-size: 26px; min-height: 54px; }
.pin-row .btn { flex: none; min-height: 54px; padding: 0 18px; }

.howto { display: flex; gap: 14px; align-items: flex-start; }
.howto-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: #3A0A12; }
.howto p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

/* live nomination on the dark wine layer */
.anon-dark { background: rgba(0, 0, 0, .22); color: rgba(255, 248, 235, .92); }
.layer-vote .search { top: calc(var(--safe-t) + 8px); margin-top: 0; }
.faces-dark .face { color: #FFF8EB; }
.faces-dark .face:active { background: rgba(255, 255, 255, .08); }
.faces-dark .face .av { box-shadow: 0 0 0 3px rgba(255, 248, 235, .9), 0 6px 14px rgba(0, 0, 0, .3); }
.faces-dark .face-name small { color: rgba(255, 248, 235, .7); }
.faces-dark .face-nick { color: var(--gold-hi); }
.faces-dark .faces-empty { color: rgba(255, 248, 235, .8); }
.cd-sub:empty { display: none; }
.cd-sub { color: var(--gold-hi); font-weight: 800; }

.ribbon {
  position: fixed; z-index: 95; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top, 0px) + 24px);
  padding-top: env(safe-area-inset-top, 0px); display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: repeating-linear-gradient(135deg, #F5C518 0 12px, #1B1A17 12px 24px);
  font-family: var(--font-sport); font-weight: 900; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #1B1A17;
}
.ribbon span { background: #F5C518; padding: 1px 10px; border-radius: 4px; }
/* Everything that respects the notch also clears the rehearsal strip. */
html.rehearsal { --safe-t: calc(env(safe-area-inset-top, 0px) + 24px); }
html.rehearsal .layer-head { top: 24px; }
html.rehearsal .search { top: calc(var(--safe-t) + 66px); }
html.rehearsal .layer-vote .search { top: calc(var(--safe-t) + 8px); }
