:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #14141b;
  color: #f8f5ff;
}
* { box-sizing: border-box; }
body {
  max-width: 54rem;
  margin: auto;
  padding: max(1.2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
header { padding-bottom: .8rem; }
header p, .status, small { color: #d1c4e4; }
header p { margin: .35rem 0; }
.status, small { font-size: .85rem; }
h1 { font-size: clamp(1.9rem, 8vw, 3rem); }
h1, h2, h3 { margin: 0; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
main, form, .stack { display: grid; gap: .85rem; }
section { background: #211d2b; border: 1px solid #51435f; border-radius: 1rem; padding: 1rem; min-width: 0; }
nav, .row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
nav { position: sticky; top: 0; padding: .65rem 0; background: #14141b; z-index: 1; }
nav button { flex: 1 0 auto; }
.row > label { flex: 1 1 9rem; }
label { display: grid; gap: .3rem; overflow-wrap: anywhere; }
input, textarea, select, button { font: inherit; font-size: 1rem; min-height: 44px; border-radius: .55rem; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #9888ac; padding: .55rem .65rem; }
input[type=color] { min-width: 44px; padding: .2rem; }
button { background: #dbc0ff; color: #21182c; font-weight: 650; border: 0; padding: .45rem .65rem; cursor: pointer; }
nav button, .secondary { background: #352945; color: #f8f5ff; }
nav button[aria-current] { background: #dbc0ff; color: #21182c; }
button:disabled { opacity: .6; cursor: default; }
a { color: #e3c9ff; }
:focus-visible { outline: 3px solid #e1c8ff; outline-offset: 3px; }
ul, ol { margin: 0; padding-left: 1.25rem; }
li { margin: .35rem 0; overflow-wrap: anywhere; }
.palette { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,7rem),1fr)); }
.color { display: grid; gap: .45rem; }
.color input { height: 4rem; }
.show-colors { display: flex; min-height: 5rem; border-radius: .65rem; overflow: hidden; }
.show-colors span { flex: 1; }
.wheel { width: min(12rem,100%); aspect-ratio: 1; border-radius: 50%; touch-action: manipulation;
  background: conic-gradient(from 90deg,red,#ff0,lime,cyan,blue,magenta,red); }
#notice { position: fixed; bottom: max(1rem,env(safe-area-inset-bottom)); right: 1rem; max-width: calc(100% - 2rem); z-index: 2; }
#notice:not(:empty) { background: #f4e6ff; color: #201426; border-radius: .55rem; padding: .6rem .8rem; }
@media print {
  :root { color-scheme: light; background: white; color: black; }
  nav, button, #notice, .no-print, .status { display: none !important; }
  section { background: white; border-color: #aaa; break-inside: avoid; }
  header p { color: #222; }
  .show-colors { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
#print-export { display: none; }
@media print {
  body:has(#print-export) > :not(#print-export) { display: none !important; }
  #print-export { display: block; }
}
