/* KingDoctor: one look for every page. Neo-brutalist: flat colour, thick black lines, hard shadows.
   Colours come from the logo (black, white, red eye) plus Kick green. */
:root {
  color-scheme: light;
  --ink: #0b0b0b; --paper: #f6f1e4; --white: #ffffff; --red: #ff1f44; --kick: #53fc18; --yellow: #ffd60a; --blue: #4d7cff; --pink: #ff8fd0;
  --dim: #3d3a33; --line: 3px solid var(--ink); --drop: 6px 6px 0 var(--ink); --drop-s: 4px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  background-image: radial-gradient(#0b0b0b22 1.2px, transparent 1.2px); background-size: 22px 22px;
  font: 600 16px/1.5 "Arial Black", "Segoe UI", system-ui, sans-serif; font-family: "Segoe UI", system-ui, Arial, sans-serif;
}
h1, h2, legend, b, .home, button, .btn, header nav a { font-family: "Arial Black", Impact, "Segoe UI", system-ui, sans-serif; }
a { color: var(--ink); }

/* Top bar */
header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 20px; background: var(--ink); border-bottom: 4px solid var(--red); }
header a.home { color: var(--white); text-decoration: none; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.02em; }
header a.home span { color: var(--red); }
header a.home img { vertical-align: -6px; margin-right: 8px; }
header nav { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
header nav a { color: var(--ink); background: var(--white); text-decoration: none; padding: 4px 10px; border: 2px solid var(--white); font-size: 0.85rem; text-transform: uppercase; }
header nav a:hover { background: var(--kick); border-color: var(--kick); }
#who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 0.95rem; }
#who img { width: 30px; height: 30px; border: 2px solid var(--white); }
#who button { padding: 4px 10px; box-shadow: none; }

main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 70px; }
h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.05; text-transform: uppercase; letter-spacing: -0.01em; }
h2 { margin: 30px 0 12px; font-size: 1.15rem; text-transform: uppercase; }
.sub, p.lead { margin: 0 0 22px; color: var(--dim); max-width: 60ch; }
.note { color: var(--dim); font-size: 0.9rem; font-weight: 500; }

/* Buttons */
button, a.btn {
  display: inline-block; padding: 10px 16px; border: var(--line); border-radius: 0; background: var(--kick); color: var(--ink);
  font-size: 0.95rem; text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: var(--drop-s);
  transition: transform 0.06s, box-shadow 0.06s;
}
button:hover, a.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
button:active, a.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
button.plain, a.plain, button:not(.primary):not(.danger):not(.sw).quiet { background: var(--white); }
button.danger { background: var(--red); color: var(--white); }
button:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: var(--drop-s); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Boxes */
.panel, .box, .card, .tile, .facts div, .empty { background: var(--white); border: var(--line); box-shadow: var(--drop); }
.panel, .box { padding: 18px; margin-bottom: 22px; }
.empty { padding: 26px; text-align: center; background: var(--yellow); }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
input[type=text] { flex: 1; min-width: 0; padding: 10px 12px; border: var(--line); border-radius: 0; background: var(--white); color: var(--ink); font: inherit; box-shadow: var(--drop-s); }
footer { margin-top: 40px; padding: 12px 14px; border: var(--line); background: var(--ink); color: var(--white); font-size: 0.85rem; font-weight: 500; }

/* Home page: three full-width columns */
body.home main { max-width: 1500px; padding: 26px 24px 60px; }
.hero { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0; }
.hero h1 span { background: var(--red); color: var(--white); padding: 0 8px; }
.hero p { margin: 0; flex: 1; min-width: 220px; color: var(--dim); font-weight: 500; }
.hero a.btn.live { background: var(--ink); color: var(--white); box-shadow: 6px 6px 0 var(--red); }
.home-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.col { background: var(--white); border: var(--line); box-shadow: var(--drop); padding: 0 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.col h2 { margin: 0 -20px; padding: 10px 20px; background: var(--ink); color: var(--white); border-bottom: var(--line); }
.col:nth-child(1) h2 { box-shadow: inset 0 -6px 0 var(--kick); }
.col:nth-child(2) h2 { box-shadow: inset 0 -6px 0 var(--yellow); }
.col:nth-child(3) h2 { box-shadow: inset 0 -6px 0 var(--pink); }
.col .note { margin: 0; }
.col > a.btn { align-self: flex-start; }
.charbox { display: grid; place-items: end center; height: 260px; border: var(--line); background: linear-gradient(var(--blue) 0 72%, var(--kick) 72% 100%); position: relative; padding-bottom: 12px; }
.charbox svg { max-height: 230px; width: auto; }
#charName { position: absolute; top: 8px; left: 8px; background: var(--ink); color: var(--white); padding: 2px 8px; font-weight: 700; font-size: 0.85rem; }
#charName:empty { display: none; }
.mini { border: var(--line); background: var(--paper); padding: 10px 12px; font-size: 0.92rem; font-weight: 500; }
.mini b { display: block; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 2px; }
.mini a { font-weight: 700; color: var(--ink); }
code { font-family: Consolas, "Courier New", monospace; font-weight: 700; background: var(--ink); color: var(--kick); padding: 0 5px; }
.tiles { display: grid; gap: 14px; }
.tile { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.tile b { display: block; text-transform: uppercase; }
.tile small { font-size: 0.9rem; font-weight: 500; }
a.tile:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.t-print { background: var(--kick); } .t-cite { background: var(--yellow); }
.games b { display: block; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 8px; }
.games ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 0.88rem; font-weight: 500; }
.games li code { margin-right: 4px; }
.games small { color: var(--dim); font-size: 0.85rem; font-weight: 500; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { border: var(--line); padding: 10px 12px; background: var(--paper); }
.stat > span { display: block; font-family: "Arial Black", Impact, sans-serif; font-size: 2.2rem; line-height: 1; }
.stat small { display: block; margin-top: 4px; font-size: 0.8rem; font-weight: 500; color: var(--dim); }
.stat:nth-child(1) { background: var(--kick); } .stat:nth-child(2) { background: var(--yellow); }
.stat:nth-child(3) { background: var(--pink); } .stat:nth-child(4) { background: var(--white); }
.stat small span { font: inherit; }
.stat em { display: inline-block; margin-top: 6px; font-style: normal; font-weight: 800; font-size: 0.78rem; background: var(--ink); color: var(--white); padding: 1px 6px; }
body.home header nav a.live { background: var(--red); border-color: var(--red); color: var(--white); }
body.home #who { margin-left: 12px; }
#special { position: absolute; top: 8px; right: 8px; background: var(--yellow); border: 2px solid var(--ink); padding: 1px 8px; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }
.charbox > #char svg { height: 200px; width: auto; overflow: visible; } /* the games' drawing lets the hammer reach past its box */
body.home main { padding-top: 30px; }
@media (max-width: 1100px) { .home-cols { grid-template-columns: 1fr 1fr; } .home-cols .col:nth-child(3) { grid-column: 1 / -1; } }
@media (max-width: 760px) { .home-cols { grid-template-columns: 1fr; } .home-cols .col:nth-child(3) { grid-column: auto; } body.home main { padding: 18px 14px 40px; } }
.logo { display: inline-block; background: var(--ink); border: var(--line); box-shadow: 8px 8px 0 var(--red); padding: 18px 26px; margin-bottom: 22px; transform: rotate(-2deg); }
.logo img { display: block; max-width: 100%; height: auto; }

/* Character customizer */
.layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
#stageBox { position: sticky; top: 16px; text-align: center; }
#stage { height: 270px; display: grid; place-items: end center; padding-bottom: 14px; border: var(--line); background: linear-gradient(var(--blue) 0 72%, var(--kick) 72% 100%); }
#nameTag { margin-top: 12px; font-family: "Arial Black", Impact, sans-serif; text-transform: uppercase; }
#stageBox .row button { flex: 1; }
#randomBtn { background: var(--yellow); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { padding: 2px 8px; margin-bottom: 10px; background: var(--ink); color: var(--white); text-transform: uppercase; font-size: 0.85rem; }
.swatches, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; padding: 0; box-shadow: none; border: var(--line); }
.sw:hover { box-shadow: none; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--red); }
.anycolor { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.92rem; }
.anycolor input { width: 56px; height: 36px; padding: 0; border: var(--line); border-radius: 0; background: var(--white); cursor: pointer; }
.chips button { padding: 6px 12px; font-size: 0.82rem; background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--kick); box-shadow: 3px 3px 0 var(--red); }
.sliders { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; align-items: center; }
.sliders label { font-size: 0.95rem; }
input[type=range] { width: 100%; accent-color: var(--red); }
#status { min-height: 1.5em; margin-top: 12px; font-size: 0.92rem; }
#status.ok { background: var(--kick); padding: 2px 6px; } #status.bad { background: var(--red); color: var(--white); padding: 2px 6px; }
#gate { text-align: center; background: var(--yellow); }
#gate p { margin: 0 0 14px; }

/* Citations */
form.find { display: flex; gap: 10px; margin: 0 0 26px; max-width: 440px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.tile { display: block; overflow: hidden; color: inherit; text-decoration: none; }
a.tile:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 8px 8px 0 var(--red); }
.tile img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; background: #fff; border-bottom: var(--line); }
body.review .tile img { object-fit: contain; }
.tile > div { padding: 10px 12px; }
.tile b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { color: var(--dim); font-weight: 500; }
.one { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 30px; align-items: start; }
.one > img { width: 100%; display: block; background: #fff; border: var(--line); box-shadow: 8px 8px 0 var(--red); }
.facts { display: grid; gap: 14px; margin: 18px 0 22px; }
.facts div { padding: 8px 14px; box-shadow: var(--drop-s); }
.facts small { display: block; color: var(--dim); text-transform: uppercase; font-size: 0.75rem; }
.more { margin-top: 26px; text-align: center; }

/* Picture printing */
ol.steps { padding-left: 22px; margin: 0 0 26px; }
ol.steps li { margin-bottom: 4px; font-weight: 500; }
.cols { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
canvas, img.label { width: 100%; max-width: 260px; aspect-ratio: 2 / 3; background: #fff; display: block; border: var(--line); }
.status { padding: 2px 8px; border: 2px solid var(--ink); text-transform: uppercase; font-size: 0.85rem; }
.status.review { background: var(--yellow); } .status.approved { background: var(--kick); }
.status.rejected { background: var(--red); color: var(--white); } .status.printed { background: var(--white); }
label.check { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
#msg { min-height: 1.5em; margin-top: 10px; color: #b00020; }

@media (max-width: 760px) {
  .layout, .one, .cols { grid-template-columns: 1fr; }
  #stageBox { position: static; }
}

/* Notice shown before a viewer leaves for Kick's login screen (login-note.js) */
.login-note { margin: 12px 0 0; }
dialog.kd-login { width: min(440px, calc(100vw - 32px)); padding: 20px; border: var(--line); border-radius: 0; background: var(--white); color: var(--ink); box-shadow: var(--drop); }
dialog.kd-login::backdrop { background: #0b0b0bb3; }
dialog.kd-login h2 { margin: 0 0 12px; padding: 4px 8px; background: var(--yellow); border: var(--line); display: inline-block; }
dialog.kd-login p { margin: 0 0 10px; font-weight: 500; }

/* Daily case items on the customize page */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
button.gear { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; background: var(--white); border: var(--line); border-bottom: 8px solid var(--rar); box-shadow: var(--drop-s); text-transform: none; font-size: 0.8rem; line-height: 1.15; }
button.gear svg { width: 72px; height: auto; }
button.gear .gname { font-family: "Arial Black", Impact, sans-serif; }
button.gear .grar { font-family: system-ui, sans-serif; font-weight: 600; font-size: 0.72rem; color: var(--dim); }
button.gear[aria-pressed="true"] { background: var(--kick); }
button.gear.locked { opacity: 1; background: #e9e4d6; box-shadow: none; }
button.gear.locked svg { filter: grayscale(1) opacity(0.35); }
.special-toggle { display: flex; align-items: center; gap: 8px; font-weight: 800; } .special-toggle input { width: 20px; height: 20px; accent-color: #53fc18; }
