/* Idle Idol — trading card theme.
   Loaded after each page's own styles (index.html, about.html) and restyles them:
   a dark, collectible look where every mascot is a framed card, and a mascot opens full screen. */

/* ---------- colours and type (beats the light / dark defaults in each page) ---------- */
:root:not(#_){
  --bg:#0e0b1a; --surface:#1b1530; --ink:#f4f0ff; --muted:#a79fcb; --line:#2f2752; --chip:#261e44;
  --accent:#ff5ea8; --accent-ink:#1b1030; --accent-low:#c2337a; --accent-text:#ff7fba; --divider:rgba(255,255,255,.12); --pink:#ff5ea8; --violet:#7b5cff;
  --paper:#fffaf0; --card-ink:#18122a; --badge-ink:#18122a;
  --sea:#141b3d; --land:#2b2556; --good:#4fd08f; --bad:#ff7a6e;
  --shadow:0 1px 0 rgba(0,0,0,.3),0 10px 24px -12px rgba(0,0,0,.8); --pop:0 18px 40px -12px rgba(0,0,0,.9);
  --f-display:"Bungee","Space Grotesk",system-ui,sans-serif; --f-body:"Space Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a79fcb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --stage:radial-gradient(900px 600px at 50% 40%,#2b1757,#0b0716 70%);
  color-scheme:dark}
/* Cyan day (see accent.js): John's colour becomes the accent. The logo hover is the same every day, so it doesn't use the accent. */
:root:not(#_)[data-accent="blue"]{--accent:#71dce4; --accent-low:#2f8f99; --accent-text:#71dce4}
body{background:#0e0b1a radial-gradient(1200px 600px at 85% -10%,#3b1d6e,transparent 60%) fixed,radial-gradient(900px 500px at -10% 25%,#0e3b5a,transparent 60%) fixed}
body::before{background:#0e0b1a}
::selection{background:var(--accent);color:var(--accent-ink)}

/* ---------- logo ---------- */
/* White at rest and on hover; hovering slides a 3D offset out in three layers, always pink, a pink-cyan in between, then cyan out from behind it. */
.logo{color:#fff9ee;height:clamp(26px,3.4vw,36px);overflow:visible}
/* hover: two copies of the logo slide out from behind the letters, darker nearest, lighter behind.
   Moving copies with transform is smooth; animating drop-shadow snapped to whole pixels. Offsets are in logo units (about 4px and 8px at full size). */
.logo .lyr{opacity:0;transform:translate(0,0);transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .12s linear}
.logo .l1{color:#ff5ea8} .logo .l2{color:#b99ad6} .logo .l3{color:#71dce4}  /* the path fills with currentColor */
.brand:hover .logo .lyr,.brand:focus-visible .logo .lyr{opacity:1}
.brand:hover .logo .l1,.brand:focus-visible .logo .l1{transform:translate(7.4px,7.4px)}
.brand:hover .logo .l2,.brand:focus-visible .logo .l2{transform:translate(14.8px,14.8px)}
.brand:hover .logo .l3,.brand:focus-visible .logo .l3{transform:translate(22.2px,22.2px)}
@media (prefers-reduced-motion:reduce){.logo .lyr{transition:none}}
/* nav: a darker full-width band with a hairline under it (the shadow + clip-path stretch the background edge to edge
   while the content stays in the centred .wrap) */
/* box-shadow and border-image-outset paint past the element's edges without adding to the page width
   (an oversized child element here made phones zoom out) */
header.top{padding-block:18px;min-height:0;margin-bottom:20px;background:#07050d;
  box-shadow:0 0 0 100vmax #07050d;clip-path:inset(0 -100vmax);
  border-bottom:1px solid transparent;border-image:linear-gradient(var(--divider),var(--divider)) 0 0 1 0 / 0 0 1px 0 / 0 100vmax}
/* the same header on every page, so the logo stays put when moving between them */
.wrap,header.top.wrap{max-width:1240px}
header.top .brand{height:44px;display:flex;align-items:center}
/* main nav: the same text links on every page, the current page underlined */
.mainnav{display:flex;align-items:center;gap:24px}
.mainnav .navlink{display:inline-flex;align-items:center;font-family:var(--f-body);font-weight:700;font-size:15px;color:#b7abc9;text-decoration:none;padding:6px 2px;border-bottom:2px solid transparent;transition:color .15s,border-color .15s}
.mainnav .navlink:hover{color:#fff9ee;border-bottom-color:var(--accent)}
.mainnav .navlink[aria-current="page"]{color:#fff9ee;border-bottom-color:var(--accent)}
.mainnav .navlink:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:4px}

/* ---------- controls ---------- */
.bar{background:rgba(14,11,26,.82);border-bottom:0}
.search input,select,.ghost{background-color:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14);border-radius:14px}
.ghost:hover{border-color:var(--accent)}
/* search, filters and Surprise me all share one height */
.bar .search input,.bar select,.bar .ghost{height:46px;box-sizing:border-box}
.bar .ghost{padding-block:0}
.bar .seg{height:46px;box-sizing:border-box}
.bar .seg button{padding-block:0}
.search input:focus{border-color:var(--accent)}
select option{background:#1b1430;color:var(--ink)}
.seg{border-radius:14px;background:rgba(255,255,255,.06)}
.seg button{border-radius:11px}
.seg button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}
.addbtn,.btn{border-radius:14px;box-shadow:0 5px 0 var(--accent-low);font-family:var(--f-body)}
.addbtn:hover,.btn:hover{transform:translateY(-2px);box-shadow:0 7px 0 var(--accent-low)}
.addbtn:active,.btn:active{transform:translateY(3px);box-shadow:0 2px 0 var(--accent-low)}
/* count the 5px edge as part of Add a mascot, so the whole button centres on the mascot count beside it */
.meta .addbtn{margin-bottom:5px}
.btn.alt{background:rgba(255,255,255,.08);color:var(--ink);border-color:rgba(255,255,255,.14);box-shadow:0 5px 0 rgba(0,0,0,.45)}
.btn[aria-pressed="true"]{background:transparent;color:var(--accent-text);box-shadow:none}
.meta b{color:var(--accent-text);font-family:"Bungee";font-size:18px;font-weight:400}
.chip{border-radius:999px;border:2px solid var(--c,rgba(255,255,255,.2));background:transparent;color:var(--ink)}
.chip[aria-pressed=true]{background:var(--c,var(--ink));color:var(--card-ink);border-color:var(--c,var(--ink))}
.subs .chip{border-color:rgba(255,255,255,.18)}
.subs .chip[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.chip[aria-pressed=true] small{color:inherit;opacity:.7}
.linkbtn{color:var(--accent-text)}
.perm{color:var(--accent-text)}
.toast{background:var(--accent);color:var(--accent-ink)}

/* ---------- mascot cards: same thin frame as the About page cards, picture edge to edge ---------- */
.grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:22px}
/* 1,900+ cards: skip layout and paint for cards well below the first screen until they scroll near.
   The first 20 (the visible rows) render normally; the size placeholder stops the scrollbar jumping. */
.grid .card:nth-child(n+21){content-visibility:auto;contain-intrinsic-size:auto none auto 290px}
/* One quiet plum frame for every card (matches the dark UI); red is kept for hover and keyboard focus so it always means something.
   The category colour still shows in the small tag under the name. */
.card{--frame:#4a3a5c;border:2px solid var(--frame);border-radius:20px;padding:0;position:relative;color:var(--card-ink);overflow:hidden;
  background:var(--paper);
  box-shadow:0 14px 30px -10px rgba(0,0,0,.8);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.card:hover,.card:focus-visible{border-color:var(--accent)}
.card::after{content:"";position:absolute;inset:0;pointer-events:none;mix-blend-mode:overlay;transition:none;
  background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.6) 45%,rgba(120,220,255,.4) 52%,transparent 65%) 120% 0/250% 100%}
.card:hover{transform:scale(1.04);box-shadow:0 24px 40px -12px rgba(0,0,0,.9);z-index:1}
.card:hover::after{background-position:-20% 0;transition:background-position .7s}  /* shimmer runs on hover only; rolling off resets it instantly */
.card:focus-visible{outline-offset:4px}
.thumb{border-radius:0;border:0;background:#fbfaf6}
.thumb img{background:#fbfaf6;padding:6%}
/* cut-outs on pure white: multiply turns their white into the same soft off-white, so no white box shows */
.thumb img:not(.cv){mix-blend-mode:multiply}
.thumb img.cv{padding:0}
/* mascots on a white background: shrink to fit so none of them is cropped */
.thumb img[data-fit=contain]:not(#_){object-fit:contain!important;object-position:50% 50%!important;padding:7%!important}
.badge{border-color:var(--paper)}
.cbody{padding:12px 14px 14px;gap:4px}
.cname{font-family:var(--f-body);font-weight:700;font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.cmotif{display:none}
.cplace{display:block;color:#5a5070;font-size:12.5px;line-height:1.3;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cplace .tag{background:transparent;color:color-mix(in srgb,var(--c) 70%,#000);padding:0;font-size:10.5px;flex:none}
.cplace>span:first-child{overflow:hidden;text-overflow:ellipsis}
.card .flag{background:var(--card-ink);color:var(--paper)}
.card.dim{opacity:.7}

/* ---------- map ---------- */
.map{border-radius:20px;border:1px solid rgba(255,255,255,.08)}
.pin .av{border-width:3px;box-shadow:0 0 0 2px #0e0b1a,0 4px 10px rgba(0,0,0,.6)}
.pin.dot .av{border-color:#0e0b1a;box-shadow:none}
.pin.sel .av{border-color:var(--paper);box-shadow:0 0 0 4px var(--accent),0 4px 12px rgba(0,0,0,.6)}
.mctl button{background:var(--surface);color:var(--ink)}
.mctl button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.tip{background:var(--paper);color:var(--card-ink)}
.pickbar{background:var(--accent);color:var(--accent-ink)}

/* ---------- mascot detail: a compact info column ---------- */
.sheet{background:#151026}
.sbody{gap:14px}
.sbody h2{font-family:"Bungee";font-weight:400;letter-spacing:0;font-size:28px}
.sub{gap:5px;margin-top:8px}
.tag{background:rgba(255,255,255,.07);color:var(--ink);font-size:11px;font-weight:500;letter-spacing:.05em;padding:3px 10px;border-radius:999px}
.tag.gp{background:var(--accent);color:var(--accent-ink)}
.credit{font-size:11.5px;margin:-6px 0 0}
.acts{gap:6px}
.acts .ghost{padding:6px 11px;font-size:13px;border-radius:10px}
.acts .ghost svg{width:14px;height:14px}
.role{display:none}
.desc{font-size:15px;line-height:1.55}
.sec h3{font-size:11px;letter-spacing:.1em;margin:0 0 8px;color:var(--accent-text)}
/* breathing room between About, Profile, Fun facts, Grand Prix and Sources */
.sbody .sec{margin-top:14px}
/* Hide details / Show details, beside the close button */
.hidebtn{font:inherit;font-size:13px;font-weight:600;height:44px;padding:0 16px;border-radius:999px;cursor:pointer;background:#191423;color:var(--ink);border:1px solid #42334e}
.hidebtn:hover{border-color:var(--accent)}
.sheet.bare .sbody{display:none}
/* Grand Prix top 500 place, under the tags */
.gprank{display:flex;align-items:center;gap:10px;margin:12px 0 0;font-size:14px;color:var(--muted)}
.gprank .rk{background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:13px;padding:3px 10px;border-radius:999px}
/* actions sit between two hairlines */
.sbody .acts{border-block:1px solid var(--divider);padding-block:14px}
/* Grand Prix card: three headline numbers, then the year-by-year table */
.gpcard{border:1px solid var(--line);border-radius:16px;padding:16px 18px 10px}
.gpstats{display:grid;grid-template-columns:repeat(3,1fr);margin:4px 0 12px}
.gpstats>div{display:flex;flex-direction:column;gap:2px;padding:0 14px;border-left:1px solid var(--divider)}
.gpstats>div:first-child{padding-left:0;border-left:0}
.gpstats span{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.gpstats b{font-family:"Bungee";font-weight:400;font-size:26px;line-height:1.1;color:var(--ink)}
.gpstats>div:first-child b{color:var(--accent-text)}
.gpstats small{font-size:12.5px;color:var(--muted)}
.rbtn{background:rgba(255,255,255,.1);color:var(--ink);box-shadow:none;border:1px solid rgba(255,255,255,.16)}
.rbtn:hover{background:rgba(255,255,255,.2)}
/* Picture switcher: only shown when a mascot has 2+ pictures (fursuit / illustration / 3D).
   Styled as a segmented control, like Map/Grid, so it reads as a switch rather than as tags. */
.vsw:not(#_){display:inline-flex;align-self:start;justify-self:start;gap:2px;padding:3px;margin:0;border-radius:12px;background:rgba(255,255,255,.06);width:auto}
.vsw button{border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:12.5px;padding:5px 12px}
.vsw button:hover{color:var(--ink)}
.vsw button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}
/* profile facts: label and value on one line */
/* a fixed, narrow label column so values never get squeezed to a word per line; long labels wrap instead */
dl.facts{grid-template-columns:92px minmax(0,1fr);gap:6px 12px;font-size:13.5px}
dl.facts dd{overflow-wrap:anywhere}
dl.facts dt{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;line-height:1.35;padding-top:3px;font-weight:700}
table.gph{font-size:13px;width:100%;border-collapse:collapse}
table.gph th{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;padding:6px 0 4px;text-align:left;color:var(--muted)}
table.gph th,table.gph td{line-height:1.55}
table.gph td{padding:4px 0}
table.gph tr+tr td,table.gph tr:first-child th{border-top:1px solid var(--divider)}
table.gph th:last-child,table.gph td:last-child{text-align:right}
table.gph tr.best td:nth-child(2){color:var(--accent-text);font-weight:700}
/* Photo source, Grand Prix profile and official artwork are plain links */
.sbody .btns{gap:4px 18px}
.sbody .btns .btn,.sbody .btns .btn.alt{background:none;border:0;box-shadow:none;padding:0;border-radius:0;color:var(--accent-text);font-size:13.5px;font-weight:600;text-decoration:underline;text-underline-offset:3px;transform:none}
.sbody .btns .btn:hover{color:var(--ink)}
.srcs a{font-size:12.5px;color:var(--muted)}
.srcs .pcredit{font-size:12.5px;color:var(--ink)}
.srcs .pcredit a{font-size:12.5px;color:var(--muted)}
.sec ul{gap:2px}
.note{background:rgba(255,255,255,.06)}
.nchip{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.14)}
.nchip:hover{border-color:var(--accent)}
/* picture: photos fill the space; pictures cut out on white fill the height with white either side */
.shead{background:var(--stage)!important}
.shead img{background:transparent}

/* Wider screens: the mascot opens over a dark backdrop as two cards — the picture on the left, details on the right. */
@media (min-width:641px){
  /* same specificity as before the <dialog> switch, so .open (fade in) still wins; display only while open */
  .sheet[open]{display:grid}
  .sheet,.sheet.docked{inset:0;width:100%;height:auto;max-width:none;grid-template-columns:minmax(0,1fr) clamp(360px,38vw,460px);grid-template-rows:minmax(0,1fr) auto;gap:28px;
    overflow:hidden;transform:none;opacity:0;transition:opacity .22s ease;box-shadow:none;padding:40px 40px 24px;background:#0e0a18}
  .sheet.open{opacity:1}
  .sheet .snav{position:absolute;top:22px;right:22px;z-index:5;height:auto;margin:0;padding:0}
  .sheet .snav{display:flex;align-items:center;gap:8px}
  .sheet .snav .rbtn{width:44px;height:44px;background:#191423;border-color:#42334e}
  /* bigger chevrons on the picture */
  .sheet .pnav .rbtn svg{width:28px;height:28px;stroke-width:2.4}
  /* Hide details: the picture fills the sheet */
  .sheet.bare{grid-template-columns:minmax(0,1fr)}
  .sheet.bare .sbody{display:none}
  .sheet .shead{grid-column:1;grid-row:1;aspect-ratio:auto;max-height:none;height:100%;border-radius:20px;overflow:hidden}
  .sheet .shead .badge{width:min(40%,320px)}
  .sheet .shead img,.sheet .shead img.cv{inset:0;width:100%;height:100%;object-fit:cover!important;object-position:50% 25%;
    border:0!important;border-radius:0!important;padding:0!important;box-shadow:none;animation:picIn .35s ease}
  /* stay hidden for the split second theme.js takes to check the picture's background */
  .sheet .shead img:not([data-checked]){opacity:0;animation:showLate 0s .8s forwards}
  /* arrows: their own row below the picture and info, centred */
  .sheet .pnav{grid-column:1/-1;grid-row:2;padding:0;margin-top:-8px}
  .sheet .pnav .rbtn{width:50px;height:50px}
  .sheet .sbody{grid-column:2;grid-row:1;overflow:auto;overscroll-behavior:contain;padding:24px 26px 28px;background:#191423;border:1px solid #42334e;border-radius:20px;align-content:start}
  dialog.sheet::backdrop{background:rgba(0,0,0,.6)}
  /* Add a mascot: a side column as wide as the Edit column (docked beside the map, so the pin can be moved) */
  #cform[open]{display:block}  /* display only while open, so the closed dialog stays hidden */
  #cform,#cform.docked{inset:0 0 0 auto;width:clamp(360px,38vw,460px);max-width:none;padding:0;  /* no 40px .sheet padding here, so the fields are as wide as the info panel */
    opacity:1;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
    transform:translateX(100%);transition:transform .25s ease;box-shadow:none;background:#151026}
  #cform.open{transform:none}
  #cform:not(.inline) .sbody{padding:14px 22px 48px}
  /* Edit opens in the info column, with the mascot's picture still showing on the left */
  #cform.inline,#cform.inline.docked{inset:0 0 0 auto;width:clamp(360px,38vw,460px);z-index:23;background:#151026;transform:none;opacity:0;transition:opacity .2s ease;
    box-shadow:-1px 0 0 rgba(255,255,255,.06);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
  #cform.inline.open{opacity:1}
  body:has(#cform.inline[open]) .sheet .pnav{display:none}
  #cform.inline::backdrop{background:transparent}  /* editing keeps the mascot picture bright on the left */
  #cform.inline .sbody{padding:14px 22px 48px}
}
#cform .sbody{overflow:visible;height:auto;min-height:0}
/* iPad portrait and smaller: Add and Edit both cover the whole screen, fields in a centred column */
@media (min-width:641px) and (max-width:899px){
  #cform,#cform.docked,#cform.inline,#cform.inline.docked{inset:0;width:100%;transform:none;opacity:0;transition:opacity .2s ease;box-shadow:none}
  #cform.open,#cform.inline.open{opacity:1}
  #cform .sbody,#cform.inline .sbody,#cform:not(.inline) .sbody{width:min(460px,100%);margin:0 auto;padding:6px 22px 64px;border:0;border-radius:0;background:transparent}  /* no card at this size: the fields sit straight on the page */
}
/* every field full width, on Add and Edit, at every screen size */
#cform .cf .two{grid-template-columns:1fr}
/* cut-outs on white: whole mascot at full height, white either side (beats the photo rules above) */
.sheet .shead:has(> img[data-fit=contain]){background:#fff!important}
.sheet .shead img[data-fit=contain]:not(#_){object-fit:contain!important;object-position:50% 50%!important;background:#fff!important}
@keyframes picIn{from{opacity:0;transform:scale(.97)}}
@keyframes showLate{to{opacity:1}}

/* ---------- forms (Add a mascot / Edit) ---------- */
.cf input:not([type=file]),.cf textarea,.cf select{background-color:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14)}
.cf fieldset.box,.drop{border-color:rgba(255,255,255,.16)}
.cfloc{background:rgba(255,255,255,.06)}
.cf .fld>span em.req{color:var(--accent-text)}
.cf>.cfcount{margin:0 0 -8px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}

/* ---------- About page ---------- */
.hero h1{font-family:"Bungee";font-weight:400;letter-spacing:0;line-height:1}
h2{font-family:"Bungee";font-weight:400;letter-spacing:0}
.eyebrow{display:none}
body.about{--ab-page:#0e0a18;--ab-card:#191423;--ab-line:#42334e;--ab-ink:#fff9ee;--ab-muted:#b7abc9;--ed:#f179c6;--john:#71dce4;
  background:var(--ab-page);color:var(--ab-ink)}
body.about::before{background:var(--ab-page)}
.about .lede{color:var(--ab-muted);max-width:44ch;margin:0}

/* hero: title and intro on the left, Ed and John side by side on the right with a hairline between */
.abouthero{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:48px;align-items:start;padding-bottom:48px;border-bottom:1px solid var(--divider)}
.intro h1{font-family:"Bungee";font-weight:400;letter-spacing:0;line-height:1;font-size:clamp(36px,5.4vw,64px);margin:0 0 24px;max-width:none}
.intro h1 em{font-style:normal;color:var(--accent)}
.about section.duo{margin:0;display:grid;grid-template-columns:1fr 1fr}
.duo .person{background:none;border:0;border-radius:0;box-shadow:none;padding:0 20px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;color:var(--ab-ink)}
.duo .person:first-child{padding-left:0}
.duo .person+.person{padding-right:0}
/* padding-top shows the photo's own backdrop colour above the head, so heads sit lower in the circle */
.duo .face{width:min(100%,144px);height:auto;aspect-ratio:1;border-radius:50%;object-fit:cover;object-position:50% 0;padding-top:16px;background:var(--c);
  border:5px solid var(--ab-page);box-shadow:0 0 0 3px var(--c);box-sizing:border-box;margin:3px 0 12px}  /* 3px top so the outer ring lines up with the top of the title */
.duo h2{font-family:var(--f-body);font-weight:700;font-size:24px;margin:0;letter-spacing:0}
.duo p{margin:0;color:var(--ab-muted);font-size:15px;line-height:1.55}
.duo p a{color:var(--c);text-underline-offset:3px}
.duo .ghost{margin-top:8px;color:var(--ab-ink);background:transparent;border:1.5px solid var(--c);border-radius:999px}
.duo .ghost:hover{background:color-mix(in srgb,var(--c) 14%,transparent)}

/* books: two cards, cover on top, title, subtitle and facts below; the whole card opens the book page */
.about section.booksec{margin-top:48px}
.booksec h2{font-size:clamp(24px,3vw,34px);margin:0 0 22px}
.books{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.books .book{display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:0;background:var(--ab-card);border:1px solid var(--ab-line);border-radius:20px;overflow:hidden;
  color:var(--ab-ink);text-decoration:none;box-shadow:none;transition:border-color .2s ease,transform .2s ease}
.books .book:hover{border-color:var(--accent);transform:translateY(-3px)}
.books .book:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.books .book .cover{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:0}
.books .book .body{padding:20px 24px 22px;display:flex;flex-direction:column;gap:6px}
.books .book h3{font-family:var(--f-body);font-weight:700;font-size:24px;margin:0}
.books .book .sub{color:var(--accent-text);font-weight:600;margin:0}
.books .book .facts{margin-top:8px}
.books .book .facts li{background:rgba(255,255,255,.07);color:var(--ab-ink)}
@media (prefers-reduced-motion:reduce){.books .book{transition:none}.books .book:hover{transform:none}}
.about .credit{margin-top:48px;padding-top:22px;border-top:1px solid var(--divider);color:var(--ab-muted);font-size:13px}

@media (max-width:900px){
  .abouthero{grid-template-columns:1fr;gap:36px}
}
@media (max-width:560px){
  .duo .person{padding:0 16px}
  .duo .face{width:min(100%,112px)}
  .books{grid-template-columns:1fr}
}

/* Book pages (idle-idol.html, fuzz-and-fur.html): where Look inside on the About page goes */
.bookhero{display:grid;grid-template-columns:minmax(0,1fr);gap:32px;max-width:880px}
.bookhero h1{font-family:"Bungee";font-weight:400;letter-spacing:0;line-height:1;font-size:clamp(36px,6vw,60px);margin:0 0 10px}
.bookhero .sub{color:var(--ab-muted);font-weight:700;margin:0 0 14px}
.bookhero .facts li{background:rgba(255,255,255,.07);color:var(--ab-ink)}
.bookhero .btns{margin-top:18px}
.bookhero .cover{width:100%;height:auto;border-radius:20px;border:1px solid var(--ab-line)}
.story{max-width:880px;margin-top:48px;display:flex;flex-direction:column;gap:18px}
.story h2{font-family:var(--f-body);font-weight:700;font-size:22px;letter-spacing:0;margin:18px 0 -6px;color:var(--ab-ink)}
.story p{margin:0;max-width:64ch;color:var(--ab-muted)}
.story a{color:var(--accent-text);text-underline-offset:3px}
.story figure{margin:0}
.story img{width:100%;height:auto;border-radius:16px}
/* gallery always fills whole rows: 5 across on desktop (6th hidden), 3 across on tablets and large phones, 2 on small phones (all 6) */
.story .pics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.story .pics figure:nth-child(n+6){display:none}
@media (max-width:760px){.story .pics{grid-template-columns:repeat(3,minmax(0,1fr))}.story .pics figure:nth-child(n+6){display:block}}
@media (max-width:420px){.story .pics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.story .pics img{aspect-ratio:3/4;object-fit:cover}
.story .pics figcaption{font-size:13px;color:var(--ab-muted);margin-top:6px}
.story .video{position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#000}
.story .video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
/* Next book: a card linking to the other book, then the photo credit as a small footnote */
.nextbook{display:grid;grid-template-columns:minmax(120px,240px) minmax(0,1fr);align-items:center;gap:24px;margin-top:56px;padding:14px 26px 14px 14px;
  background:var(--ab-card);border:1px solid var(--ab-line);border-radius:20px;color:var(--ab-ink);text-decoration:none;transition:border-color .2s ease,transform .2s ease}
.nextbook:hover{border-color:var(--accent);transform:translateY(-3px)}
.nextbook:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.nextbook img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:12px}
.nb-txt{display:flex;flex-direction:column;gap:4px;min-width:0}
.nb-lbl{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ab-muted)}
.nb-ttl{font-family:var(--f-body);font-weight:700;font-size:clamp(22px,2.6vw,30px);line-height:1.15}
.nb-sub{color:var(--accent-text);font-weight:600}
@media (prefers-reduced-motion:reduce){.nextbook{transition:none}.nextbook:hover{transform:none}}
@media (max-width:560px){.nextbook{grid-template-columns:96px minmax(0,1fr);gap:14px;padding:10px 16px 10px 10px}.nextbook img{aspect-ratio:1;border-radius:10px}.nb-ttl{font-size:20px}}
.bookpage .credit{margin-top:20px;padding-top:0;border-top:0;font-size:12px}
@media (max-width:760px){.bookhero{gap:24px}}


@media (max-width:640px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .cbody{padding:10px 11px 11px}
  .cname{font-size:14px}
  .sheet .shead img{background:transparent}
  /* Hide details on a phone: the picture fills the screen and shows whole, rather than sitting above an empty panel */
  .sheet.bare .shead{aspect-ratio:auto;height:100dvh}
  .sheet.bare .shead img.cv{object-fit:contain!important;object-position:50% 50%}
  /* filters on two lines so the labels show in full: Categories beside Surprise me, then Styles (as wide as its longest choice) beside Countries */
  .bar .row2 select{min-width:0;padding-right:30px;background-position:right 11px center}
  .bar .row2 #cat{order:1;flex:1 1 200px}
  .bar .row2 #surprise{order:2;flex:none}
  .bar .row2 #style{order:3;flex:0 0 auto}
  .bar .row2 #country{order:4;flex:1 1 150px}
}
/* arrows and close sit on a dark disc so they read over white and pale pictures */
.sheet .pnav .rbtn,.sheet .snav .rbtn{background:rgba(14,11,26,.72);color:#fff;border-color:rgba(255,255,255,.22);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.sheet .pnav .rbtn:hover,.sheet .snav .rbtn:hover{background:rgba(14,11,26,.9)}

/* ---------- mascot panel: no scrollbar until you scroll, then a thin bar with no track ---------- */
.sheet,.sheet *{scrollbar-width:thin;scrollbar-color:transparent transparent}
.sheet.scrolling,.sheet .scrolling{scrollbar-color:rgba(255,255,255,.32) transparent}
.sheet ::-webkit-scrollbar,.sheet::-webkit-scrollbar{width:6px;height:6px;background:transparent}
.sheet ::-webkit-scrollbar-track,.sheet::-webkit-scrollbar-track{background:transparent}
.sheet ::-webkit-scrollbar-thumb,.sheet::-webkit-scrollbar-thumb{background:transparent;border-radius:3px}
.sheet .scrolling::-webkit-scrollbar-thumb,.sheet.scrolling::-webkit-scrollbar-thumb{background:rgba(255,255,255,.32)}

/* ---------- "Suggest an edit": a quiet text link at the bottom of the mascot panel ---------- */
.sugedit{display:inline-flex;align-items:center;gap:7px;justify-self:start;align-self:start;margin-top:4px;padding:4px 0;background:none;border:0;cursor:pointer;
  font:inherit;font-size:13.5px;color:var(--muted);text-decoration:none;transition:color .15s}
.sugedit svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sugedit:hover,.sugedit:focus-visible{color:var(--ink)}

/* sources: the credited site is the link (no arrow); keep its name in one piece */
.srcs .pcredit a{word-break:normal;text-underline-offset:3px}

/* mascot panel: copy-link icon beside the name; one divider under the actions instead of two */
.sbody .namerow{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.sbody .iconbtn{flex:none;display:grid;place-items:center;width:38px;height:38px;margin-top:-2px;padding:0;border-radius:999px;cursor:pointer;
  background:transparent;color:var(--muted);border:1px solid var(--divider);transition:color .15s,border-color .15s}
.sbody .iconbtn:hover,.sbody .iconbtn:focus-visible{color:var(--ink);border-color:var(--accent)}
.sbody .iconbtn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sbody .acts{border-top:0;padding-top:0}

/* picture drop box: file types on their own, smaller line */
.drop .dtypes{font-size:12.5px;opacity:.8}

/* Add a mascot / Edit panel (wide screens): square, flush to the right edge, no scrollbar gap.
   The page's own scrollbar is hidden while it's open, so the panel can reach the edge of the window. */
@media (min-width:900px){
  html:has(#cform[open]){overflow:hidden}
  #cform{scrollbar-width:none}
  #cform::-webkit-scrollbar{display:none}
  #cform .sbody{border-radius:0;border:0;min-height:100%;box-sizing:border-box}
  #cform:not(.inline){background:#191423}
}

/* sent: tick, Thanks! and message centred in the panel, with one big Add another button */
#cform .cfdone{align-items:center;justify-content:center;text-align:center;min-height:100%;box-sizing:border-box;gap:18px;padding-block:48px}
#cform .cfdone .ok{width:72px;height:72px}
#cform .cfdone .ok svg{width:36px;height:36px}
#cform .cfdone .role{max-width:32ch;margin-inline:auto}
#cform .cfdone .cfagain{align-self:center;display:inline-flex;align-items:center;justify-content:center;margin-top:6px;min-width:220px;height:52px;padding:0 28px;font-size:16px;font-weight:700;text-decoration:none}

/* ---------- shop promo (shop-promo.js): a strip under the header (and a card wherever there's [data-shop-card]) ----------
   Sits in Idle Idol's dark look (surface, line, Space Grotesk) so it belongs on the page, with WhatWhat Prints' own touches
   (the acorn on a cream disc) so it still reads as a different shop. In the page flow, never fixed,
   so it can't cover the map or a mascot. Hidden in full-screen map. */
.promo-in,.promo-card{--wwp-paper:#f5efe6;--wwp-rasp:#be3455;--wwp-rasp-dk:#a02646;
  position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px 16px;
  background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px 46px 10px 14px;color:var(--ink);box-shadow:var(--shadow)}
.promo-top{margin-top:-6px;margin-bottom:14px}
.promo-card{margin-top:40px;padding:16px 20px}
.promo-acorn{grid-column:1;grid-row:1 / span 2;align-self:center;width:58px;height:58px;box-sizing:border-box;padding:7px 9px 5px;object-fit:contain;background:var(--wwp-paper);border-radius:50%}
.promo-card .promo-acorn{width:72px;height:72px}
.promo-txt{grid-column:2;grid-row:1 / span 2;min-width:0;line-height:1.4}
.promo-headline{margin-bottom:2px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.promo-tag{grid-column:1;grid-row:1 / span 2;align-self:center;justify-self:start;position:relative;z-index:1;transform:translate(-6px,-24px);font:700 10px/1 var(--f-body);letter-spacing:.08em;color:var(--ink);background:var(--surface);border:1px solid var(--muted);border-radius:4px;padding:2px 4px}
.promo-head{font-family:var(--f-body);font-weight:700;font-size:16px}
.promo-card .promo-head{font-size:19px}
.promo-body{display:inline;white-space:pre-line;color:var(--muted);font-size:14px;text-wrap:pretty}
.promo-acts{grid-row:1 / span 2;grid-column:3;align-self:center;display:flex;align-items:center;gap:12px}
.promo-cta{display:inline-flex;align-items:center;font-weight:700;font-size:14px;text-decoration:none;background:var(--accent);color:var(--accent-ink);padding:9px 16px;border-radius:12px;box-shadow:0 3px 0 var(--accent-low);transition:transform .15s}
.promo-cta:hover{transform:translateY(-1px)}
.promo-code{position:relative;font-size:12px;font-weight:700;color:var(--ink);display:inline-flex;flex-direction:column;align-items:center;gap:3px;white-space:nowrap}
.promo-code-btn{font:700 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em;color:var(--ink);background:var(--chip);border:1.5px dashed var(--muted);border-radius:8px;padding:6px 8px;cursor:copy}
.promo-code-btn:hover{border-color:var(--ink)}
.promo-code-msg{position:absolute;top:100%;margin-top:2px;font-size:11px;color:var(--good);font-weight:700}
.promo-code-msg:empty{display:none}
.promo-x{position:absolute;top:8px;right:8px;width:30px;height:30px;display:grid;place-items:center;background:none;border:0;border-radius:8px;color:var(--muted);cursor:pointer}
.promo-x:hover{color:var(--ink);background:rgba(255,255,255,.08)}
.promo-x svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
body.mapfull .promo-strip{display:none}
/* pinned to the bottom: above the page, below the full-screen map (15) and the mascot sheet (21) */
.promo-bottom{position:fixed;left:0;right:0;bottom:0;z-index:14;padding-block:10px calc(10px + env(safe-area-inset-bottom,0px));
  background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid var(--line)}
.promo-bottom .promo-in{box-shadow:none}
body.has-promo-bar{padding-bottom:var(--promo-room,0px)}
body.has-promo-bar .toast{bottom:calc(24px + var(--promo-room,0px))}
body:has(.sheet[open]) .promo-bottom,body.mapfull .promo-bottom{display:none}
@media (max-width:640px){
  .promo-top{margin-top:-10px}
  /* pinned on phones: one flat bar, no card inside it, the discount beside the code */
  .promo-bottom{padding-block:8px calc(8px + env(safe-area-inset-bottom,0px));background:var(--surface)}
  .promo-bottom .promo-in{background:none;border:0;border-radius:0;padding:0 34px 0 0;gap:8px 10px}
  .promo-bottom .promo-acorn{width:38px;height:38px;padding:4px 6px 3px}
  .promo-bottom .promo-tag{transform:translate(-4px,-14px)}
  .promo-bottom .promo-head{font-size:15px}
  .promo-bottom .promo-code{flex-direction:row;gap:6px}
  .promo-bottom .promo-acts{justify-content:space-between}
  .promo-bottom .promo-x{top:-2px;right:-4px}
  .promo-in,.promo-card{grid-template-columns:auto minmax(0,1fr);padding:12px 40px 12px 12px;gap:10px 12px}
  .promo-strip .promo-body{display:none}
  .promo-txt{grid-row:1}
  .promo-tag{grid-row:1;transform:translate(-6px,-18px)}
  .promo-acorn,.promo-card .promo-acorn{grid-row:1;width:44px;height:44px;padding:5px 7px 4px}
  .promo-acts,.promo-card .promo-acts{grid-row:2;grid-column:1 / -1;flex-wrap:wrap;gap:8px 12px}
  .promo-card .promo-head{font-size:17px}
}
