* { box-sizing: content-box; }
html { color-scheme: dark; background: #0c0b0f; }
body { margin: 0; padding: 18px; font-family: Inter, "Segoe UI", Arial, sans-serif; }
p,h2 { margin: 0; }
button,input,select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 774px; margin: 0 auto; }
.preview-toolbar strong { display: block; color: #f0c6b1; font-size: 11px; letter-spacing: 1.6px; }
.preview-toolbar span { display: block; color: #a29494; font-size: 11px; margin-top: 5px; }
.preview-toolbar label { font-size: 11px; color: #b3a1a6; white-space: nowrap; }
.preview-toolbar select { background: #211820; color: #f4ebde; border: 1px solid #68404d; border-radius: 4px; padding: 5px; margin-left: 5px; }
.preview-notice { max-width: 774px; margin: 10px auto 14px; font-size: 11px; color: #a29494; line-height: 1.5; }
#preview-stage { position: relative; margin: 0 auto; max-width: 774px; }
#win { position: relative; left: 0; top: 0; width: 772px; transform-origin: top left; overflow: hidden; box-shadow: 0 20px 65px #0008; }
#hdr { overflow: hidden; }
#panel { scrollbar-color: #703141 #0c0b0f; scrollbar-width: thin; overflow-x: hidden; }
.page { width: 494px; }
.chk input.checkbox { appearance: none; cursor: pointer; vertical-align: middle; position: relative; }
.chk input.checkbox:checked::after { content: ""; position: absolute; width: 7px; height: 4px; left: 4px; top: 4px; border-left: 2px solid #fff4e9; border-bottom: 2px solid #fff4e9; transform: rotate(-45deg); }
.chk input.checkbox:checked { animation: none; transform: none; flex: 0 0 auto; }
input.range { appearance: none; cursor: pointer; background: #1e181f; border: 1px solid #43272f; border-radius: 3px; margin: 0; }
input.range::-webkit-slider-thumb { appearance: none; width: 14px; height: 18px; border-radius: 3px; background: #d2455e; }
input.range::-moz-range-thumb { width: 14px; height: 18px; border: 0; border-radius: 3px; background: #d2455e; }
input.range::-moz-range-progress { height: 18px; background: #6f2233; }
input.range:focus-visible,.cbox:focus-visible,.copt:focus-visible,.col:focus-visible,button:focus-visible { outline: 2px solid #f27682; outline-offset: 2px; }
.cbox,.copt,.col { cursor: pointer; }
.cbox .caret { overflow: hidden; }
.preset-label { font-size: 10px; letter-spacing: 2px; color: #a29494; margin: 12px 0 6px; }
.hint { font-size: 11px; color: #a29494; }
#navhint { pointer-events: none; right: 12px; overflow-wrap: normal; }
#preview-feedback { min-height: 16px; max-width: 774px; margin: 12px auto 0; font-size: 11px; line-height: 1.5; color: #dbaab5; }
@media (max-width: 600px) {
  body { padding: 10px; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  #win { box-sizing: border-box; width: 100%; transform: none; }
  #bodyrow { flex-direction: column; padding: 12px; }
  #nav { box-sizing: border-box; width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  #nav p.lbl { width: 100%; padding: 3px 6px 5px; }
  #nav button { width: auto; flex: 1 0 28%; margin: 0; padding: 0 10px; text-align: center; }
  #navhint,#weave { display: none; }
  #nav button:hover { transform: none; }
  #panel { box-sizing: border-box; width: 100%; height: 410px; margin: 12px 0 0; padding: 15px; }
  .page { width: 100%; }
  .row { flex-wrap: wrap; gap: 4px; }
  .half { width: 100%; }
  .chk { line-height: 1.5; }
  .cbox,.clist,.picker { box-sizing: border-box; width: 100%; }
  .picker { margin-left: 0; }
  input.range { box-sizing: border-box; width: 100%; }
  .prow input.range { flex: 1; width: 0; min-width: 0; }
  .col .cname { min-width: 0; }
  .col .hex { flex: 0 0 auto; font-size: 10px; width: 65px; }
  .description,.note { line-height: 1.55; }
  #cards { transform: scale(.65); transform-origin: top right; animation: none; top: 10px; right: 6px; }
  #roulette { width: 74px; height: 74px; border-radius: 50%; }
  #foot { flex-wrap: wrap; gap: 8px; margin: 0 12px; }
  #foot .btn { margin: 0; padding: 0 12px; font-size: 12px; }
  #meta { font-size: 9px; line-height: 1.6; margin: 10px 12px 12px; }
  .tick .tlab { min-width: 0; line-height: 1.5; }
  .tick .tbtn { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
