/* Idolova theme: a "gallery" look in plum, cream and gold instead of black and white.
   Loaded after the base styles in index.html. Removing the <link rel="stylesheet" href="theme.css">
   line from index.html brings back the plain prototype look; nothing else depends on this file. */

:root{
  --bg:#F5EEE3; --surface:#FFFCF6; --ink:#231A2C; --muted:#73677D; --line:#E6DBC9;
  --accent:#955600; --accent-ink:#FFFFFF; --accent-soft:#F4E4C6;
  --grad:linear-gradient(135deg,#B46C06 0%,#955600 55%,#7C3D12 100%);
  --glow:rgba(149,86,0,.30);
  --wash:radial-gradient(900px 520px at 50% -140px,#E9D8F2 0%,rgba(233,216,242,0) 70%);
  --frame:rgba(149,86,0,.30);
  --serif:"Instrument Serif","Iowan Old Style",Georgia,serif;
  --medal1:linear-gradient(135deg,#F9DC7E,#C8901A);
  --medal2:linear-gradient(135deg,#ECEEF3,#9BA1AF);
  --medal3:linear-gradient(135deg,#EDBA92,#A8632F);
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#130F19; --surface:#1D1726; --ink:#F6F0E7; --muted:#A99EB5; --line:#322940;
  --accent:#F4B842; --accent-ink:#1B1204; --accent-soft:#3A2B12;
  --grad:linear-gradient(135deg,#FFDB7D 0%,#F4B842 50%,#E8813A 100%);
  --glow:rgba(244,184,66,.34);
  --wash:radial-gradient(900px 520px at 50% -140px,#3B2459 0%,rgba(59,36,89,0) 70%);
  --frame:rgba(244,184,66,.42)}}
:root[data-theme="dark"]{
  --bg:#130F19; --surface:#1D1726; --ink:#F6F0E7; --muted:#A99EB5; --line:#322940;
  --accent:#F4B842; --accent-ink:#1B1204; --accent-soft:#3A2B12;
  --grad:linear-gradient(135deg,#FFDB7D 0%,#F4B842 50%,#E8813A 100%);
  --glow:rgba(244,184,66,.34);
  --wash:radial-gradient(900px 520px at 50% -140px,#3B2459 0%,rgba(59,36,89,0) 70%);
  --frame:rgba(244,184,66,.42)}

/* soft coloured light at the top of every page */
body::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--wash)}
::selection{background:var(--accent-soft)}

/* header: a solid strip in the page colour with a hairline under it. It used to be see-through (frosted),
   which let the photos show through it, and behind the clock on iPhones too. Safari on iOS 26 fills the area
   behind the clock and the bottom toolbar with the page colour, so the header and the bottom bar use exactly
   that colour and everything lines up. */
/* the strip runs the full width of the screen, not just the centre column */
/* (pinned to the screen rather than stretched sideways: anything wider than the screen makes phones
   enlarge the page, which pushes the bottom bar and the pop-up sheets out of view) */
:root{--hdr-h:66px}                       /* 12 + 44 (logo tap area) + 10 */
/* the header starts at the very top (the browser's default 8px body margin used to push it down at the top of
   the page, out of line with the strip); the 8px moves under the header so the content stays where it was */
body{margin-top:0}
header.top{background:var(--bg);height:var(--hdr-h);margin-bottom:8px}
/* The full-width strip is drawn by html::before rather than by the header, so that on phones the header can
   slide away (a transform on the header would pin the strip to the header's own narrower box). */
html::before{content:"";position:fixed;inset:0 0 auto 0;height:calc(var(--hdr-h) + env(safe-area-inset-top, 0px));z-index:4;background:var(--bg);border-bottom:1px solid var(--line);transition:transform .55s cubic-bezier(.22,.61,.36,1)}
/* coming back is slower and eases in gently; going away stays quick (the html.hdr-up rules below) */
header.top{transition:transform .55s cubic-bezier(.22,.61,.36,1),opacity .4s ease .05s}
/* phones: the header slides up while you scroll down and comes back as soon as you scroll up (app.js sets
   html.hdr-up). On computers the main menu lives in the header, so it always stays.
   On iPhones (Safari 26) whatever sits just above the top of the page shows behind the clock and battery.
   So the header's contents fade out completely, and the plain strip parks exactly there: the clock and
   battery stay on a clean cream background instead of over the logo or the photos. */
@media (max-width:999px){
  html.hdr-up::before{transform:translateY(-100%);transition:transform .35s ease}
  html.hdr-up header.top{transform:translateY(calc(-100% - env(safe-area-inset-top, 0px)));opacity:0;transition:transform .35s ease,opacity .2s ease}
}
.brand{font-size:22px;display:inline-flex;align-items:baseline}
.brand span,.hero span,.reveal .big{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero{font-size:29px}
.eyebrow{display:flex;align-items:center;gap:8px}
.eyebrow::before{content:"";flex:none;width:16px;height:1px;background:var(--accent)}

/* buttons and switches: gold instead of inverted black and white */
.btn{border-radius:12px;transition:transform .1s,border-color .15s,box-shadow .15s}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--grad);border-color:transparent;color:var(--accent-ink);box-shadow:0 8px 20px -10px var(--glow),inset 0 1px 0 rgba(255,255,255,.28)}
.seg{border-radius:14px;padding:4px;background:color-mix(in srgb,var(--surface) 72%,transparent)}
.seg button{border-radius:10px;transition:color .15s}
.seg button[aria-pressed="true"]{background:var(--grad);color:var(--accent-ink);box-shadow:0 6px 16px -8px var(--glow)}
.gsw{background:color-mix(in srgb,var(--surface) 72%,transparent)}
.gsw button{transition:color .15s}
.gsw button[aria-pressed="true"]{background:var(--grad);color:var(--accent-ink);box-shadow:0 6px 14px -8px var(--glow)}
input[type=text]:focus,select:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px var(--accent-soft)}

/* the photo card: a thin gold frame and a glow, like a lit picture */
.feedcard{border-radius:26px;box-shadow:0 0 0 1px var(--frame),0 30px 60px -30px rgba(20,8,30,.6),0 0 90px -34px var(--glow)}
.topcard{border-radius:26px}
.pimg{box-shadow:0 0 0 1px var(--frame),0 26px 50px -32px rgba(20,8,30,.6),0 0 80px -36px var(--glow)}
.rres .you{background:var(--grad);box-shadow:0 10px 18px -12px var(--glow)}
.rres.pop .you{animation:rmm-pop .28s cubic-bezier(.2,1.3,.4,1)}
.cap .nm{font-size:27px}
.chip-ov.newc,.podium3 .pr,.pod .pr{background:var(--grad);color:var(--accent-ink)}
.pick{border-radius:22px;box-shadow:0 0 0 1px var(--line);transition:box-shadow .15s,transform .15s}
.pod{border-radius:12px}

/* rating bar: the scale warms up from 1 to 10 */
.ratebar{padding-block:14px 8px}
.ratebar button{height:50px;border-radius:13px;font-size:15px;padding:0;color:var(--ink);
  border:1px solid color-mix(in srgb,var(--accent) var(--p),var(--line));
  background:color-mix(in srgb,var(--accent) var(--p),var(--surface));
  transition:transform .12s,background .15s,box-shadow .15s}
.ratebar button:nth-child(1){--p:2%}  .ratebar button:nth-child(2){--p:5%}
.ratebar button:nth-child(3){--p:8%}  .ratebar button:nth-child(4){--p:12%}
.ratebar button:nth-child(5){--p:16%} .ratebar button:nth-child(6){--p:20%}
.ratebar button:nth-child(7){--p:25%} .ratebar button:nth-child(8){--p:30%}
.ratebar button:nth-child(9){--p:36%} .ratebar button:nth-child(10){--p:42%}
.ratebar button.sel{background:var(--grad);color:var(--accent-ink);border-color:transparent;transform:translateY(-3px) scale(1.04);box-shadow:0 12px 20px -12px var(--glow)}

/* the score that appears after you rate */
.reveal{background:rgba(14,8,20,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.reveal .pill{border-radius:22px;padding:18px 28px;border:1px solid var(--frame);animation:rmm-pop .28s cubic-bezier(.2,1.3,.4,1)}
.reveal .big{font-size:46px;line-height:1.05}
@keyframes rmm-pop{from{transform:scale(.8);opacity:0}}

/* leaderboard: cards with gold, silver and bronze medals */
.board{border-top:0;display:flex;flex-direction:column;gap:6px}
.row{grid-template-columns:30px 46px minmax(0,1fr) auto;border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:8px 14px 8px 10px;transition:border-color .15s,transform .15s}
.rank{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;text-align:center}
.rank.gold{color:#1B1204;font-weight:700}
.board li:nth-child(1) .rank.gold{background:var(--medal1)}
.board li:nth-child(2) .rank.gold{background:var(--medal2)}
.board li:nth-child(3) .rank.gold{background:var(--medal3)}
.board li:nth-child(1) .row{border-color:var(--frame);background:linear-gradient(90deg,var(--accent-soft),var(--surface) 62%)}
.th{border-radius:10px}
.sc{font-size:16px}

/* profile pieces */
.stat{border-radius:14px}
.tile{border-radius:14px}
.pav{box-shadow:0 0 0 2px var(--bg),0 0 0 3px var(--frame)}
.notif,.rules,.checks{border-radius:16px}

/* bottom bar and sheets */
/* solid, in the page colour: on iPhones the strip under the bar (behind Safari's toolbar) is filled with
   the page colour, so the bar matches it instead of being a lighter band above a darker one */
nav.bar{background:var(--bg)}
nav.bar a{position:relative;transition:color .15s}
nav.bar a[aria-current="page"]::before{content:"";position:absolute;top:0;left:50%;width:28px;height:3px;border-radius:0 0 3px 3px;transform:translateX(-50%);background:var(--grad)}
.scrim{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.sheet{border-radius:26px 26px 0 0;border-top:1px solid var(--frame)}
/* the little handle on top of a sheet: on phones you can pull the sheet down by it (or anywhere) to close it */
.sheet .grab{flex:none;width:36px;height:5px;border-radius:3px;background:color-mix(in srgb,var(--ink) 18%,transparent)}
.sharecard{border-radius:22px;box-shadow:0 0 0 1px var(--frame)}
.toast{border-radius:14px}

/* hover effects only where there is a real pointer, so they don't stick on phones */
@media (hover:hover){
  .btn:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--line))}
  .ratebar button:hover{background:var(--grad);color:var(--accent-ink);border-color:transparent;transform:translateY(-3px);box-shadow:0 12px 20px -12px var(--glow)}
  .row:hover{border-color:var(--frame);transform:translateX(2px)}
  .picon:hover,.emos button:hover{background:var(--accent-soft)}
  .pick:hover{outline:0;box-shadow:0 0 0 2px var(--accent);transform:translateY(-2px)}
}
