@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/courier-prime-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/courier-prime-latin-700-normal.woff2") format("woff2"); }
:root { --bg:#fdf4e8; --card:#fffaf2; --ink:#17302c; --muted:#516761; --line:#ead9c4; --accent:#f58a2c; --link:#a84a0e;
  --red:#b3261e; --yellow:#8a5a00; --green:#1f6b3a; --type:"Courier Prime","Courier New",monospace; --ui:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#1c1633; --card:#281f47; --ink:#f1ecf8; --muted:#b6acca; --line:#40356a; --accent:#ff9f6e; --link:#c9baff; --red:#ff8a80; --yellow:#ffd166; --green:#7bdc9b; } }
:root[data-theme="dark"] { color-scheme: dark; --bg:#1c1633; --card:#281f47; --ink:#f1ecf8; --muted:#b6acca; --line:#40356a; --accent:#ff9f6e; --link:#c9baff; --red:#ff8a80; --yellow:#ffd166; --green:#7bdc9b; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); -webkit-text-size-adjust: 100%; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--type); }
.wrap { max-width: 760px; margin: 0 auto; padding: 14px 16px 48px; }
.top { display: flex; justify-content: flex-end; min-height: 36px; }
.head { text-align: center; padding: 0 0 8px; }
.logo { display: block; width: 150px; height: auto; margin: 0 auto 4px; color: var(--ink); }
.head h1 { font-size: 2.1rem; margin: 0; letter-spacing: -.01em; }
.head h1 a { color: inherit; text-decoration: none; }
.tag { color: var(--muted); margin: 6px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 15px var(--ui); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, canvas:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.btn.primary { background: #0a3cff; border-color: #0a3cff; color: #fff; }
.btn.seafoam { background: #93e9be; border-color: #6fcf9f; color: #17302c; }
.btn.seafoam:hover { background: #a6f0cc; border-color: #4fb986; }
.theme-flip { width: 40px; padding: 4px; }
.theme-flip .ti { width: 18px; height: 18px; }
.theme-flip .ti-dark { display: none; }
.theme-flip[data-pref="dark"] .ti-light { display: none; }
.theme-flip[data-pref="dark"] .ti-dark { display: block; }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 10px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.box h2 { font-size: 1.05rem; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: .88rem; margin: 2px 0 0; }
.pill { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.mode { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); font: inherit; cursor: pointer; }
.mode b { display: block; font-size: 1rem; }
.mode[aria-pressed="true"] { border: 2px solid var(--ink); padding: 11px 13px; }
.mode .ic { width: 34px; height: 34px; flex: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 38px; min-width: 44px; padding: 4px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 14px var(--ui); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
label.f { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
input[type="text"], select { min-height: 42px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 16px var(--ui); width: 100%; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cover { text-align: center; padding: 18px 8px; border: 2px dashed var(--line); border-radius: 18px; margin: 12px 0; display: grid; gap: 14px; justify-items: center; }
.cover h2 { font-size: 1.9rem; margin: 0; }
.secret { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--card); }
.secret .word { font-family: var(--type); font-size: 1.4rem; margin: 6px 0; min-height: 1.6em; letter-spacing: .04em; }
.bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0 6px; border-bottom: 1px solid var(--line); }
.bar .prompt { font-family: var(--type); font-size: 1.15rem; margin: 0; }
.clock { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.clock > i { display: block; height: 100%; background: var(--ink); width: 100%; transition: width .25s linear; }
.clock.low > i { background: var(--red); }
.time { font-variant-numeric: tabular-nums; font-weight: 700; }
.time.low { color: var(--red); }
.canvas-wrap { width: min(100%, 560px); aspect-ratio: 1; margin: 10px auto; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fffdf8; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.tools { display: grid; gap: 10px; width: min(100%, 560px); margin: 0 auto; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.sw[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
input[type="color"] { width: 42px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; }
input[type="range"] { width: 100%; min-height: 32px; }
.layers { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.layer { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.layer button { border: 0; background: transparent; color: var(--ink); min-height: 36px; padding: 4px 10px; font: 600 14px var(--ui); cursor: pointer; }
.layer[data-on="true"] { border: 2px solid var(--ink); }
.layer button[aria-pressed="false"] { opacity: .45; }
.final { display: block; width: min(100%, 560px); margin: 10px auto; border: 2px solid var(--ink); border-radius: 12px; background: #fffdf8; }
.lib { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .lib { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lib figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lib img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #fffdf8; }
.lib figcaption { padding: 8px 10px 10px; font-size: .88rem; display: grid; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .2s; max-width: 90vw; font-size: .9rem; z-index: 20; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.foot { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 22px; }
@media (forced-colors: active) { .mode[aria-pressed="true"], .chip[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; } }
[hidden] { display: none !important; }
.prompt { font-family: var(--type); font-size: 1.15rem; margin: 4px 0 0; }
.mode .ic { width: 34px; height: 34px; flex: none; }
.ic { width: 24px; height: 24px; }
