:root { --bg: #14110f; --card: #1f1a17; --ink: #f1e9df; --mute: #a89d90; --line: #3a322c; --acc: #ff8a3d; --ok: #69db7c; --bad: #ff6b6b; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { max-width: 1100px; margin: 0 auto; padding: 22px 16px 4px; }
h1 { margin: 0; font-size: 30px; letter-spacing: .5px; color: var(--acc); }
h2 { margin: 0 0 10px; font-size: 18px; }
.tag { margin: 4px 0 0; color: var(--mute); }
.card { max-width: 1100px; margin: 14px auto; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
footer { max-width: 1100px; margin: 10px auto 30px; padding: 0 16px; font-size: 13px; }
label { display: block; margin: 8px 0; font-size: 13px; color: var(--mute); }
label.row, .row { display: flex; gap: 8px; align-items: center; }
input, select, textarea, button { font: inherit; color: var(--ink); background: #2a2420; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
input[type=checkbox] { width: auto; }
input[type=range] { width: 100%; padding: 0; }
textarea { width: 100%; margin-top: 4px; }
#keyin, #keypass, #unlockpass { width: 100%; max-width: 420px; margin-top: 4px; display: block; }
.grid select, .grid input { width: 100%; margin-top: 3px; }
#guide, #chatmodel, #action { width: auto; min-width: 220px; margin-top: 3px; }
#keyform, #keylocked, #keyset { max-width: 640px; }
#keybox details, #chatbox > p, #editbox > p { max-width: 760px; }
.grid, .estimate, .warn { max-width: 920px; }
#extendbox .grid { max-width: 560px; }
.row input[type=number] { width: 90px; }
button { cursor: pointer; }
button:hover { border-color: var(--acc); }
.go { background: var(--acc); color: #1b0f05; font-weight: 700; border: none; padding: 10px 22px; margin-top: 10px; }
.go:disabled { opacity: .5; cursor: wait; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tab.on { background: var(--acc); color: #1b0f05; border-color: var(--acc); }
.mute { color: var(--mute); }
.mono { font-family: ui-monospace, Consolas, monospace; }
.ok { color: var(--ok); font-weight: 700; }
.warn { color: var(--bad); margin-top: 8px; }
.estimate { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 7px; font-size: 14px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 2px solid var(--line); display: block; }
.thumbs figure:first-child img { border-color: var(--acc); }
.thumbs figcaption { font-size: 11px; color: var(--mute); text-align: center; }
.thumbs button { position: absolute; top: 2px; right: 2px; padding: 0 6px; font-size: 12px; }
#paintwrap { margin-top: 8px; max-width: 100%; overflow: auto; }
#paint { max-width: 100%; max-height: 70vh; width: auto; height: auto; border-radius: 6px; touch-action: none; cursor: crosshair; display: block; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.shot { background: #2a2420; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.shot img { width: 100%; display: block; background: repeating-conic-gradient(#3a322c 0% 25%, #2a2420 0% 50%) 50% / 20px 20px; }
.shot .meta { padding: 6px 8px; font-size: 12px; color: var(--mute); }
.shot .meta p { margin: 2px 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.shot .acts { display: flex; gap: 6px; padding: 0 8px 8px; flex-wrap: wrap; }
.shot .acts button, .shot .acts a { font-size: 12px; padding: 4px 8px; color: var(--ink); text-decoration: none; background: #342d28; border: 1px solid var(--line); border-radius: 6px; }
.row.wrap { flex-wrap: wrap; align-items: flex-end; }
.row.wrap label { margin: 4px 0; }
.thread { max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.turn { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.turn.you { background: #2a2420; align-self: flex-end; max-width: 85%; }
.turn.it { background: #1a1512; }
.turn img { max-width: 100%; max-height: 380px; display: block; margin-top: 6px; border-radius: 6px; }
.turn .rev { font-size: 12px; color: var(--mute); margin-top: 4px; }
.cmphead { font-weight: 700; color: var(--acc); }
details { margin-top: 10px; color: var(--mute); }
details li { margin: 4px 0; }
