/* KvK Theme Vote. The app skin (tokens, header, hero, panels, buttons, dialogs) is /assets/swordland.css;
   this file only adds what the vote page needs. Colours come from the skin tokens so both themes follow. */
.theme-words{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.theme-app input[type=text],.theme-app input[type=date],.theme-owner input[type=text],.theme-owner input[type=date],.theme-owner input[type=datetime-local]{min-width:0;max-width:100%;width:100%;min-height:44px;border:1px solid var(--bone-edge);border-radius:6px;background:var(--bone-2);color:var(--ink);padding:9px 11px;font-weight:400}
.theme-app .field{margin-top:14px}
.theme-app .field small{display:block}
.theme-counter{justify-self:end;font-size:.7rem;font-weight:400;color:var(--ink-soft)}
.theme-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,1fr);gap:22px;align-items:start;margin-top:22px}
.theme-main,.theme-side{display:grid;gap:22px;min-width:0}
.theme-crest{width:88px;height:110px;flex:none;filter:drop-shadow(0 4px 9px #0003)}
img.crest{height:auto}
.event-date>span{display:block}
.hero .theme-rule-line{color:#f4f3ed;font-size:1rem;margin-top:10px}
.theme-u{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.event-date .eyebrow span{color:inherit;font-size:inherit}
/* Live countdown in the hero */
.theme-close{min-width:300px}
.theme-cd{display:flex;gap:8px;margin:10px 0 12px}
.theme-cd-unit{display:grid;justify-items:center;gap:2px;min-width:62px;padding:8px 6px 6px;border:1px solid #c69a5466;border-radius:8px;background:#ffffff0a}
.theme-cd-unit strong{font:700 1.9rem/1 "Saira Condensed",sans-serif;color:#f4f3ed;font-variant-numeric:tabular-nums;margin:0}
.event-date .theme-cd-unit small{font-size:.6rem;letter-spacing:.12em;text-transform:uppercase;color:#e6c486;font-weight:700}
.event-date .theme-close-when{font:600 1.05rem "Saira Condensed",sans-serif;color:#edf0f5;letter-spacing:.01em}
.theme-span{grid-column:1/-1}
.theme-crown-big{width:56px;height:56px;fill:var(--selected)}
.theme-log-link{margin-top:14px;border-top:1px solid var(--bone-edge);padding-top:6px}
.theme-log-link .text-btn{gap:8px}
.theme-title-row{display:flex;align-items:center;gap:20px}

/* Who you are voting as */
.theme-ballot{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 20px;align-items:center;border-top:3px solid #b68b47}
.theme-ballot p{font-size:.88rem}
.theme-ballot .theme-who{display:flex;align-items:center;gap:12px;min-width:0}
.theme-ballot .theme-who strong{font-size:1rem}
.theme-meters{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.theme-meter{display:grid;gap:2px;padding:7px 12px;border:1px solid var(--bone-edge);border-radius:7px;background:var(--bone);min-width:110px}
.theme-meter span{font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-soft);font-weight:700}
.theme-meter strong{font:700 1.25rem/1.1 "Saira Condensed",sans-serif}
.theme-ballot-msg{grid-column:1/-1;font-size:.8rem;color:var(--ink-soft);min-height:1.3em}

/* Faces: MightPulse portrait with an initial fallback, same rules as Bear results */
.theme-face{width:34px;height:34px;border-radius:50%;flex:none;display:grid;place-items:center;overflow:hidden;background:#d5b97d;color:#342715;font-weight:700;font-size:.8rem;position:relative}
.theme-face img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.theme-face.small{width:24px;height:24px;font-size:.66rem}
.theme-tag{font-size:.68rem;font-weight:700;color:var(--brass-dp);letter-spacing:.04em}

/* Podium */
.theme-podium{display:grid;grid-template-columns:1fr 1.18fr 1fr;gap:12px;align-items:end;padding-top:14px}
.theme-podium.two{grid-template-columns:1fr 1.18fr;width:min(100%,560px);margin-inline:auto}
.theme-pod{position:relative;background:var(--bone-2);border:1px solid var(--bone-edge);border-radius:11px;box-shadow:var(--shadow);padding:16px 12px 14px;text-align:center;min-width:0}
.theme-pod .theme-place{font:700 .8rem "Saira Condensed",sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-soft)}
.theme-pod h3{font-size:1.15rem;margin:6px 0 4px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.theme-pod .theme-pod-votes{font-size:.78rem;color:var(--ink-soft)}
.theme-pod.first{border:2px solid #b68b47;background:linear-gradient(180deg,var(--selected),var(--bone-2) 70%);padding:30px 14px 18px;margin-top:-14px}
.theme-pod.first .theme-place{color:var(--brass-dp)}
.theme-pod.first h3{font-size:1.45rem}
.theme-crown{position:absolute;top:-17px;left:50%;transform:translateX(-50%);width:34px;height:34px;color:#b68b47;fill:var(--bone-2)}

/* Ranking rows */
.theme-rows{list-style:none;margin:16px 0 0;padding:0}
.theme-row{display:grid;grid-template-columns:2.2rem minmax(0,1fr) auto;gap:14px;padding:16px 0;border-top:1px solid var(--bone-edge)}
.theme-row:first-child{border-top:0}
.theme-row.highlight{animation:theme-flash 1.6s ease-out}
@keyframes theme-flash{0%{background:var(--selected)}100%{background:transparent}}
.theme-rank{font:700 1.5rem/1 "Saira Condensed",sans-serif;color:var(--ink-soft);text-align:right;padding-top:2px}
.theme-row h3{font-size:1.28rem;overflow-wrap:anywhere}
.theme-row .pill{margin-left:8px;vertical-align:3px}
.theme-desc{font-size:.85rem;color:var(--ink-soft);margin-top:3px;overflow-wrap:anywhere}
.theme-by{display:flex;align-items:center;gap:8px;font-size:.76rem;color:var(--ink-soft);margin-top:8px;flex-wrap:wrap}
.theme-by strong{color:var(--ink);font-weight:600}
.theme-bar{height:7px;border-radius:4px;background:var(--bone);margin-top:11px;overflow:hidden}
.theme-bar span{display:block;height:100%;width:0;border-radius:4px;background:linear-gradient(90deg,#b68b47,#963728);transition:width .7s cubic-bezier(.2,.7,.2,1)}
.theme-expiry{font-size:.74rem;color:var(--ink);margin-top:8px;padding:5px 9px;border-left:3px solid #b58d4d;background:var(--selected)}
.theme-row-tools{display:flex;gap:4px 14px;flex-wrap:wrap;margin-top:4px}
.theme-row-tools .text-btn{font-size:.78rem}
.theme-voters{list-style:none;margin:8px 0 0;padding:10px 12px;display:flex;gap:8px 14px;flex-wrap:wrap;border:1px solid var(--bone-edge);border-radius:8px;background:var(--bone)}
.theme-voters li{display:flex;align-items:center;gap:6px;font-size:.78rem}
.theme-vote-col{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:56px}
.theme-vote{width:48px;height:48px;border-radius:50%;border:1px solid var(--bone-edge);background:var(--bone-2);color:var(--ink-soft);display:grid;place-items:center;padding:0}
.theme-vote:hover:not(:disabled){border-color:#963728;color:#963728}
.theme-vote[aria-pressed=true]{background:#963728;border-color:#963728;color:#fff}
.theme-vote svg{width:22px;height:22px;fill:currentColor}
.theme-vote-count{font:700 1.15rem/1 "Saira Condensed",sans-serif}
.theme-vote-label{font-size:.66rem;color:var(--ink-soft)}
[data-theme=dark] .theme-vote:hover:not(:disabled){border-color:#e8a596;color:#e8a596}
[data-theme=dark] .theme-vote[aria-pressed=true]{color:#fff}

/* Winner */
.theme-winner{margin-bottom:22px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;align-items:center;border:2px solid #b68b47;background:linear-gradient(135deg,var(--selected),var(--bone-2) 75%)}
.theme-winner .theme-crown-big{width:56px;height:56px;color:#b68b47}
.theme-winner h2{font-size:2.3rem;overflow-wrap:anywhere}
.theme-winner .eyebrow{color:var(--brass-dp)}
.theme-winner ul{margin:8px 0 0;padding-left:20px;font:700 1.3rem "Saira Condensed",sans-serif}

/* Side panels */
.theme-side h2{font-size:1.55rem}
.theme-side .btn.primary{width:100%;margin-top:16px}
.theme-status{font-size:.8rem;margin-top:12px;min-height:1.4em}
.theme-rules{margin:12px 0 0;padding-left:18px;font-size:.84rem;color:var(--ink-soft);display:grid;gap:7px}
.theme-rules strong{color:var(--ink)}
details.panel>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font:700 1.25rem "Saira Condensed",sans-serif}
.theme-past{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:10px}
.theme-past li{border:1px solid var(--bone-edge);border-radius:8px;padding:11px 13px}
.theme-past strong{display:block;font:700 1.15rem "Saira Condensed",sans-serif;overflow-wrap:anywhere}
.theme-past span{font-size:.74rem;color:var(--ink-soft)}
.theme-snap{list-style:none;margin:12px 0 0;padding:0}
.theme-snap li{display:grid;grid-template-columns:1.6rem minmax(0,1fr) auto;gap:10px;padding:9px 0;border-top:1px solid var(--bone-edge);font-size:.84rem}
.theme-snap li:first-child{border-top:0}
.theme-snap small{display:block;color:var(--ink-soft);font-size:.74rem;overflow-wrap:anywhere}

/* Owner settings dialog (owner only, opened from the header gear) */
#owner-dialog{width:min(640px,calc(100% - 30px));padding:24px 26px}
#owner-dialog .dialog-head{margin-bottom:8px}
#owner-dialog h2{font-size:1.9rem}
.theme-tabs{margin:6px 0 4px;gap:0 20px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.theme-tabs::-webkit-scrollbar{display:none}
.theme-tabs button{flex:none;font-size:.84rem;padding-bottom:10px}
.theme-owner section{padding-top:14px}
.theme-owner h3{font-size:1.15rem;margin:22px 0 4px}
.theme-owner h3:first-child{margin-top:4px}
.theme-help{font-size:.82rem;color:var(--ink-soft);margin:4px 0 0}
.theme-owner-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.theme-owner-grid .theme-wide{grid-column:1/-1}
.theme-owner select{width:100%}
.theme-owner .field{align-content:start;grid-template-columns:minmax(0,1fr)}
/* Dates need little room. iOS Safari otherwise sizes its native date control from its own minimum width,
   which ran past the dialog on a phone, so the native look is dropped and the width is set outright. */
.theme-owner input[type=date],.theme-owner input[type=datetime-local]{-webkit-appearance:none;appearance:none;display:block;width:13rem;max-width:100%;min-width:0;line-height:1.4}
.theme-owner input[type=datetime-local]{width:16rem}
.theme-owner input::-webkit-date-and-time-value{text-align:left;margin:0}
.theme-preview{display:grid;gap:2px;margin-top:14px;padding:12px 14px;border-left:3px solid #b58d4d;background:var(--selected);border-radius:0 8px 8px 0;font-size:.8rem;color:var(--ink-soft)}
.theme-preview strong{font-size:1rem;color:var(--ink)}
.theme-more{margin-top:14px;font-size:.84rem}
.theme-more>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600;text-decoration:underline;text-underline-offset:4px}
.theme-act{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:16px}
.theme-switch{display:flex;align-items:flex-start;gap:12px;margin-top:16px;padding:12px 14px;border:1px solid var(--bone-edge);border-radius:9px;cursor:pointer}
.theme-switch input{appearance:none;-webkit-appearance:none;flex:none;width:44px;height:26px;margin:0;border-radius:13px;background:var(--bone-edge);position:relative;cursor:pointer;transition:background .2s}
.theme-switch input::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transition:transform .2s}
.theme-switch input:checked{background:#296b55}
.theme-switch input:checked::after{transform:translateX(18px)}
.theme-switch span{display:grid;gap:2px;font-size:.86rem}
.theme-switch small{color:var(--ink-soft);font-size:.78rem}
.theme-manage{list-style:none;margin:8px 0 0;padding:0;border:1px solid var(--bone-edge);border-radius:9px}
.theme-manage:empty{display:none}
.theme-manage li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;border-top:1px solid var(--bone-edge);font-size:.84rem}
.theme-manage li:first-child{border-top:0}
.theme-manage li>span{min-width:0;display:grid;gap:1px;overflow-wrap:anywhere}
.theme-manage small{color:var(--ink-soft);font-size:.74rem}
.theme-manage .btn{min-height:38px;padding:6px 12px;font-size:.78rem;flex:none}
#owner-msg{margin-top:14px}
.theme-voter-list{margin-top:6px}
.theme-voter-list>summary{cursor:pointer;min-height:36px;display:flex;align-items:center;gap:4px;font-size:.78rem;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.theme-voter-list ul{list-style:none;margin:4px 0 0;padding:0}
.theme-manage .theme-voter-list li{padding:6px 0;border-top:1px dashed var(--bone-edge)}
.theme-ip-summary{font-size:.88rem;font-weight:600;margin:12px 0 0}
.theme-ip-group{margin-top:16px}
.theme-ip-head{font-size:.86rem}
.theme-ip-tag{font-family:"JetBrains Mono",monospace;font-size:.78rem;color:var(--ink-soft)}

/* Changelog and confirmation dialogs */
.theme-log{list-style:none;margin:0;padding:0;max-height:60vh;overflow:auto}
.theme-log li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 14px;padding:10px 0;border-top:1px solid var(--bone-edge);font-size:.82rem}
.theme-log li:first-child{border-top:0}
.theme-log time{color:var(--ink-soft);font-size:.74rem;white-space:nowrap}
.theme-log strong{overflow-wrap:anywhere}
#theme-confirm,#theme-similar{width:min(480px,calc(100% - 30px))}
#theme-confirm p,#theme-similar p{margin-top:10px;font-size:.9rem}

@media(max-width:900px){.theme-layout{grid-template-columns:1fr}}
/* The skin hides this label on narrow screens; here the date means nothing without it. */
@media(max-width:800px){.hero .event-date .eyebrow{display:block;margin-bottom:4px}}
@media(max-width:600px){
  .theme-ballot{grid-template-columns:1fr}
  .theme-podium{gap:8px;padding-top:18px}
  .theme-pod{padding:12px 7px 10px}
  .theme-pod h3{font-size:.95rem}
  .theme-pod.first{padding:24px 8px 12px}
  .theme-pod.first h3{font-size:1.08rem}
  .theme-pod .theme-pod-votes{font-size:.72rem}
  .theme-row{grid-template-columns:1.6rem minmax(0,1fr) auto;gap:10px}
  .theme-rank{font-size:1.2rem}
  .theme-row h3{font-size:1.12rem}
  .theme-winner{grid-template-columns:1fr}
  .theme-winner h2{font-size:1.8rem}
  .theme-crest{width:56px;height:70px}
  .theme-close{min-width:0}
  .theme-cd-unit{min-width:0;flex:1}
  .theme-cd-unit strong{font-size:1.6rem}
  .theme-owner-grid{grid-template-columns:1fr}
  /* Six tabs never fit one row on a phone; a 3 by 2 grid keeps every tab visible (no hidden scroll). */
  .theme-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;border-bottom:0;overflow:visible;margin-top:10px}
  .theme-tabs button{min-height:44px;padding:6px 4px;border:1px solid var(--bone-edge);border-radius:7px;font-size:.78rem;line-height:1.2;white-space:normal;text-align:center}
  .theme-tabs button[aria-pressed=true]{border:2px solid #963728;background:var(--selected);color:var(--ink)}
  #owner-dialog{padding:20px 18px}
  .theme-log li{grid-template-columns:1fr}
}
/* The owner's gear makes three header buttons; keep one row on phones. Players never see the gear. */
@media(max-width:520px){.top .wrap>.flex{flex-wrap:nowrap;gap:6px}.top .identity{max-width:112px}.top .identity strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top:has(#owner-open:not([hidden])) .brand small{display:none}}
@media(prefers-reduced-motion:reduce){.theme-bar span{transition:none}.theme-row.highlight{animation:none}}
