@font-face { font-family: UI; src: url(fonts/gothica1-Regular.woff2) format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: UI; src: url(fonts/gothica1-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: block; }
@font-face { font-family: UI; src: url(fonts/gothica1-ExtraBold.woff2) format('woff2'); font-weight: 800; font-display: block; }
@font-face { font-family: Inter; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: block; }
@font-face { font-family: Serif; src: url(fonts/instrument-italic.woff2) format('woff2'); font-style: italic; font-display: block; }
@font-face { font-family: Mono; src: url(fonts/geistmono.woff2) format('woff2'); font-weight: 100 900; font-display: block; }
:root { --bg: #ecebe7; --ink: #181613; --mute: #8a857c; --line: rgba(0,0,0,.09); --ac: #ea6c5a; --sans: Inter, UI, system-ui, sans-serif; --kr: UI, Inter, system-ui, sans-serif; --mono: Mono, ui-monospace, monospace; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 15px/1.5 var(--kr); -webkit-font-smoothing: antialiased; }
a { color: inherit; } [hidden] { display: none !important; } button { font: inherit; color: inherit; }
.top, .intro, .app, .how, .foot { max-width: 1320px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 2px; }
.brand { display: flex; align-items: center; gap: 9px; } .brand b { font: 800 18px var(--kr); letter-spacing: -.03em; }
.brand b::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; box-shadow: inset 0 0 0 2.5px var(--ink); background: radial-gradient(circle, var(--ac) 0 3px, transparent 3.5px); }
.brand i { font: 500 12px var(--mono); color: var(--mute); font-style: normal; }
.gh { font: 600 14px var(--sans); text-decoration: none; }
h1 { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; word-break: keep-all; }
h1 .q { font: 800 44px/1.08 var(--kr); letter-spacing: -.045em; word-spacing: .06em; } h1 em { font: italic 400 28px/1.1 Serif, serif; letter-spacing: -.02em; color: #4d4943; }
.btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 11px; font: 800 13.5px var(--kr); box-shadow: inset 0 0 0 1.5px var(--ink); white-space: nowrap; }
.btn.dark { background: var(--ink); color: #fff; }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding-top: 40px; } .how h3 { margin: 0 0 6px; font: 800 15px var(--kr); } .how p { margin: 0; font-size: 14px; color: #4d4943; word-break: keep-all; }
.foot { padding-top: 26px; padding-bottom: 90px; font: 400 12.5px var(--sans); color: var(--mute); }
.toast { position: fixed; left: 50%; top: 22px; transform: translate(-50%, -20px); opacity: 0; background: var(--ink); color: #fff; font: 600 13.5px var(--kr); padding: 9px 16px; border-radius: 99px; transition: .25s; pointer-events: none; z-index: 50; } .toast.on { opacity: 1; transform: translate(-50%, 0); }
.lnk { all: unset; cursor: pointer; font: 700 13px var(--kr); color: #6b665d; text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; background: #fff; border-radius: 11px; padding: 3px; gap: 2px; box-shadow: 0 0 0 1px var(--line); } .seg button { all: unset; cursor: pointer; padding: 6px 11px; border-radius: 8px; font: 700 12.5px var(--kr); color: #6b665d; white-space: nowrap; } .seg button.on { background: var(--ink); color: #fff; } .seg button:disabled { opacity: .35; cursor: not-allowed; }
.rng input { width: 110px; accent-color: var(--ink); } .rng output { font: 500 12px var(--mono); width: 22px; color: var(--ink); } .rng.off { opacity: .35; pointer-events: none; }
.cur { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; }
.cur svg { position: absolute; left: -9px; top: -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); } .cur path { fill: #fff; stroke: #111; stroke-width: 1.4; stroke-linejoin: round; } .cur .closed { display: none; } .cur.down .open { display: none; } .cur.down .closed { display: block; }
.cur i { position: absolute; left: 26px; top: 26px; white-space: nowrap; font: 700 13px var(--kr); font-style: normal; background: var(--ink); color: #fff; padding: 4px 10px; border-radius: 99px; } .cur i:empty { display: none; }
.cur.flip i { left: auto; right: 14px; }
.intro { padding-top: 22px; } .lede { margin: 10px 0 0; max-width: 780px; color: #4d4943; word-break: keep-all; }
.seg button:not(.on):hover { color: var(--ink); }
.seg.sm button { padding: 5px 9px; font-size: 12px; }
.mini { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 99px; background: #f1eee8; font: 700 12.5px var(--kr); color: #5d584f; white-space: nowrap; } .mini:hover { filter: brightness(.96); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.card { background: #fff; border-radius: 22px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -24px rgba(40,30,10,.4); min-height: 0; }
.app { display: grid; grid-template-columns: 452px minmax(0, 1fr); gap: 16px; padding-top: 22px; height: 640px; }
body.film .app { height: 600px; }
/* wheel card */
.wcard { display: flex; flex-direction: column; overflow: hidden; }
.wbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; } .sp { flex: 1; }
.wpane, .ppane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; padding: 12px 14px 0; }
.chips button { all: unset; cursor: pointer; padding: 6px 11px; border-radius: 99px; background: #f1eee8; font: 700 12.5px var(--kr); color: #5d584f; white-space: nowrap; }
.chips button.on { background: var(--ink); color: #fff; } .chips button:not(.on):hover { filter: brightness(.95); }
.wheelbox { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; margin: 4px 14px 0; }
.wheelbox canvas, .wheelbox svg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; }
#hand { touch-action: none; cursor: crosshair; overflow: visible; }
#hand line { stroke: rgba(255,255,255,.85); stroke-width: 1.6; } #hand .ctr { fill: #fff; }
#hand .hd { cursor: grab; } #hand .hd circle:not(.hit) { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
#hand .hit { fill: transparent; stroke: none; }
#hand .hd.sel circle:not(.hit) { stroke: var(--ink); stroke-width: 3.5; } #hand .hd.base.sel circle:not(.hit) { stroke: #fff; stroke-width: 4.5; }
#hand .hd.base circle:not(.hit) { stroke-width: 4.5; }
.lrow label { white-space: nowrap; } .lrow { display: flex; align-items: center; gap: 10px; padding: 8px 18px 14px; font: 700 12.5px var(--kr); color: #5d584f; }
.lrow input { width: 170px; accent-color: var(--ink); } .lrow output { font: 500 12px var(--mono); color: var(--ink); width: 22px; }
.note { font: 500 11.5px var(--kr); color: var(--mute); text-align: right; }
/* photo pane */
.pchips { display: flex; gap: 6px; padding: 12px 14px 0; flex-wrap: wrap; }
.pchips button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 3px; border-radius: 99px; background: #f1eee8; font: 700 12.5px var(--kr); color: #5d584f; white-space: nowrap; }
.pchips button img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; } .pchips button.on { background: var(--ink); color: #fff; } .pchips .own { padding-left: 11px; }
.pbox { position: relative; flex: 1; min-height: 0; margin: 12px 14px 0; display: grid; place-items: start center; }
.pwrap { position: relative; border-radius: 14px; overflow: visible; touch-action: none; }
.pwrap img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 14px; display: block; object-fit: cover; }
#pins i { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0,0,0,.45); cursor: grab; }
#pins i.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink), 0 3px 8px rgba(0,0,0,.45); width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.phint { margin: 8px 18px 12px; font: 500 12px var(--kr); color: var(--mute); }
/* right column */
.right { display: grid; grid-template-rows: 236px minmax(0, 1fr); gap: 16px; min-height: 0; min-width: 0; }
.pal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.sw { display: flex; flex-direction: column; min-width: 0; background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -24px rgba(40,30,10,.4); transition: box-shadow .2s; }
.sw.sel { box-shadow: 0 0 0 2px var(--ink), 0 14px 30px -24px rgba(40,30,10,.4); }
.blk { all: unset; cursor: pointer; position: relative; flex: 1; border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; transition: background .12s; }
.blk .aa { font: 800 26px var(--kr); letter-spacing: -.03em; } .blk .ratio { font: 600 11px var(--mono); opacity: .9; }
.blk .tagb { position: absolute; right: 9px; top: 9px; font: 800 10.5px var(--kr); padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.88); color: #16130f; display: none; } .sw.base .tagb { display: block; }
.swb { display: flex; align-items: center; gap: 2px; padding: 7px 2px 0 6px; }
.hx { all: unset; flex: 1; min-width: 0; font: 600 14px var(--mono); letter-spacing: .02em; color: var(--ink); padding: 2px 0; border-bottom: 1.5px dashed transparent; } .hx:focus { border-bottom-color: var(--ink); }
.cp { all: unset; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #6b665d; } .cp:hover { background: #f1eee8; color: var(--ink); }
.lch { display: block; padding: 0 6px 3px; font: 500 10.5px var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lower { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; min-height: 0; }
.prev, .exp { display: flex; flex-direction: column; padding: 14px 16px; overflow: hidden; }
.ph { display: flex; align-items: center; gap: 8px; } .ph b { font: 800 14.5px var(--kr); white-space: nowrap; }
.stage { --bg: #fff; --ink: #000; --a1: #f00; --a2: #0f0; --a3: #00f; --btnink: #fff; flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.poster { position: relative; height: 100%; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--ink); transition: background .12s; }
.poster i { position: absolute; display: block; transition: background .12s; } .poster .o1 { width: 74%; aspect-ratio: 1; border-radius: 50%; background: var(--a1); right: -16%; top: 8%; }
.poster .o2 { width: 46%; height: 30%; background: var(--a2); left: 9%; bottom: 23%; border-radius: 0 60px 0 0; } .poster .o3 { width: 26%; aspect-ratio: 1; background: var(--a3); right: 12%; bottom: 13%; border-radius: 50%; }
.poster b { position: absolute; left: 9%; top: 8%; font: 800 clamp(16px, 2.1vw, 26px)/1.05 var(--kr); letter-spacing: -.04em; } .poster span { position: absolute; left: 9%; bottom: 6%; font: 600 9px var(--mono); letter-spacing: .06em; }
.ui { border-radius: 12px; background: var(--bg); color: var(--ink); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden; transition: background .12s; }
.ui .uh { display: flex; align-items: center; gap: 8px; } .ui .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--a2); } .ui b { font: 800 14px var(--kr); }
.ui p { margin: 0; font: 500 12px/1.5 var(--kr); word-break: keep-all; } .ui .tags { display: flex; gap: 5px; } .ui .tags span { font: 700 11px var(--kr); padding: 3px 8px; border-radius: 99px; background: var(--a3); color: var(--btnink); }
.ui .tags span + span { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.ui button { all: unset; margin-top: auto; align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: var(--a1); color: var(--btnink); font: 800 12.5px var(--kr); }
.cr { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cr li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 6px; padding: 6px 9px; border-radius: 9px; background: #f6f4f0; font: 600 11px var(--kr); color: #5d584f; }
.cr li b { font: 600 12.5px var(--mono); color: var(--ink); } .cr li i { grid-column: 1 / -1; font-style: normal; font: 800 10.5px var(--kr); } .cr li.ok i { color: #1f8a4c; } .cr li.no i { color: #d23b2b; }
.code { flex: 1; min-height: 0; margin: 12px 0 10px; padding: 12px 13px; border-radius: 12px; background: #f6f4f0; font: 500 12px/1.6 var(--mono); color: #3a3630; overflow: auto; white-space: pre; }
.xb { display: flex; gap: 6px; flex-wrap: wrap; }
/* colour-vision preview */
.app[data-cvd="protan"] :is(.blk, .stage, #wheel, #hand .hd, #pins i, #pimg) { filter: url(#cvd-protan); }
.app[data-cvd="deutan"] :is(.blk, .stage, #wheel, #hand .hd, #pins i, #pimg) { filter: url(#cvd-deutan); }
.app[data-cvd="tritan"] :is(.blk, .stage, #wheel, #hand .hd, #pins i, #pimg) { filter: url(#cvd-tritan); }
.app[data-cvd="gray"] :is(.blk, .stage, #wheel, #hand .hd, #pins i, #pimg) { filter: url(#cvd-gray); }
/* narrower screens */
@media (max-width: 1100px) { .lower { grid-template-columns: 1fr; } .exp { display: none; } }
@media (max-width: 860px) {
  .top, .intro, .app, .how, .foot { padding-left: 16px; padding-right: 16px; } h1 .q { font-size: 32px; } h1 em { font-size: 21px; }
  .app { grid-template-columns: 1fr; height: auto; } .wcard { height: min(560px, 132vw); } .right { grid-template-rows: auto auto; }
  .pal { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .sw { padding: 4px; border-radius: 14px; } .blk { height: 92px; flex: none; padding: 8px; } .blk .aa { font-size: 19px; } .blk .ratio { font-size: 9.5px; }
  .hx { font-size: 11px; } .swb { padding: 5px 0 0 3px; } .cp { width: 22px; height: 22px; } .lch { display: none; } .blk .tagb { right: 5px; top: 5px; font-size: 9.5px; padding: 1px 5px; }
  .lower { grid-template-columns: 1fr; } .exp { display: flex; } .stage { height: 250px; flex: none; } .code { height: 150px; flex: none; }
  .cr { grid-template-columns: 1fr; } .how { grid-template-columns: 1fr 1fr; } .ph { flex-wrap: wrap; } .seg.sm button { padding: 5px 7px; font-size: 11.5px; }
}
/* film, tall 9:16 */
body.film.tall .lede, body.film.tall .how, body.film.tall .foot, body.film.tall .exp, body.film.tall .cr, body.film.tall .lch { display: none; }
body.film.tall .top, body.film.tall .intro, body.film.tall .app { padding-left: 16px; padding-right: 16px; } body.film.tall .intro { padding-top: 10px; }
body.film.tall h1 .q { font-size: 30px; } body.film.tall h1 em { font-size: 19px; }
body.film.tall .app { grid-template-columns: 1fr; grid-template-rows: 436px minmax(0, 1fr); height: 735px; padding-top: 14px; gap: 10px; }
body.film.tall .right { grid-template-rows: 140px minmax(0, 1fr); gap: 10px; }
body.film.tall .pal { gap: 6px; } body.film.tall .sw { padding: 4px; border-radius: 14px; } body.film.tall .blk { padding: 7px 8px; } body.film.tall .blk .aa { font-size: 18px; } body.film.tall .blk .ratio { font-size: 9px; }
body.film.tall .hx { font-size: 11px; } body.film.tall .swb { padding: 5px 0 1px 3px; } body.film.tall .cp { width: 20px; height: 20px; } body.film.tall .blk .tagb { right: 5px; top: 5px; font-size: 9px; padding: 1px 5px; }
body.film.tall .lower { grid-template-columns: 1fr; } body.film.tall .prev { padding: 10px 12px; } body.film.tall .stage { margin-top: 8px; } body.film.tall .ph b { font-size: 13px; }
body.film.tall .chips button { padding: 5px 9px; font-size: 12px; } body.film.tall .lrow { padding: 4px 16px 10px; }
.wbar .seg, .ph .seg { background: #f1eee8; box-shadow: none; } .seg button.on { box-shadow: 0 1px 3px rgba(0,0,0,.12); }
body.film .lede { display: none; }
body.film.tall .wcard { height: auto; } body.film.tall .blk { height: auto; flex: 1; } body.film.tall .stage { height: auto; flex: 1; }
body.film.tall .prev .ph, body.film.tall .note { display: none; } body.film.tall .prev .stage { margin-top: 0; } body.film.tall .poster b { font-size: 17px; } body.film.tall .ui { padding: 10px 12px; gap: 5px; } body.film.tall .ui p { font-size: 11px; }
body.film.tall .poster span, body.film.tall .ui p { display: none; }
.lrow { flex: none; height: 44px; padding-top: 0; padding-bottom: 6px; } .note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; } .lrow .sp { flex: 1 1 0; }
