/* DayOnePixel */
:root {
  --bg: #0c0c0d;
  --bg-2: #111113;
  --panel: #161618;
  --panel-2: #1d1d20;
  --line: #2a2a2e;
  --line-2: #3a3a40;
  --text: #f1efe9;
  --muted: #a3a09a;
  --dim: #6f6c67;
  --accent: #ff5a1f;
  --accent-2: #ff7a47;
  --accent-ink: #160700;
  --ok: #7bd88f;
  --err: #ff6b5e;
  --r: 6px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.05; font-weight: 650; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); }
button { font: inherit; color: inherit; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { height: 56px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; }
.logo i { width: 14px; height: 14px; background: var(--accent); display: block; box-shadow: 6px 6px 0 -1px var(--bg), 6px 6px 0 0 var(--text); margin-right: 4px; }
.top nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
@media (max-width: 600px) { .top nav .hide-sm { display: none; } }

/* Model header */
.head { padding: 34px 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-family: var(--mono); font-size: 12px; }
.chip { border: 1px solid var(--line-2); border-radius: 99px; padding: 3px 10px; color: var(--muted); }
.chip.new { border-color: var(--accent); color: var(--accent); }
.head h1 { font-size: clamp(38px, 6.6vw, 72px); }
.head p { color: var(--muted); font-size: 18px; margin: 14px 0 0; max-width: 40em; }

/* Studio */
.studio { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); min-height: 560px; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }
.controls { padding: 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) { .controls { border-right: 0; border-bottom: 1px solid var(--line); } }
.lbl { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 8px; }
textarea { width: 100%; min-height: 150px; resize: vertical; font: 15px/1.55 var(--sans); color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; outline: none; }
textarea:focus { border-color: var(--text); }
textarea::placeholder { color: var(--dim); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.examples button { background: none; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 13px; padding: 4px 10px; cursor: pointer; }
.examples button:hover { border-color: var(--line-2); color: var(--text); }
.ratios { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ratios button { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 0 8px; cursor: pointer; display: grid; place-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ratios button span { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
.ratios button[aria-pressed="true"] { border-color: var(--text); color: var(--text); background: var(--panel); }
.go { margin-top: auto; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--r); padding: 15px; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; }
.go:hover { background: var(--accent-2); }
.go:disabled { opacity: .55; cursor: not-allowed; }
.meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.meta b { color: var(--text); font-weight: 500; }
#ts { min-height: 0; }

.canvas { position: relative; display: grid; place-items: center; padding: 20px; min-height: 420px;
  background-color: var(--bg-2);
  background-image: linear-gradient(45deg, var(--panel) 25%, transparent 25%), linear-gradient(-45deg, var(--panel) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--panel) 75%), linear-gradient(-45deg, transparent 75%, var(--panel) 75%);
  background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0; }
.frame { position: relative; width: min(100%, 560px); aspect-ratio: 1 / 1; border: 1px dashed var(--line-2); border-radius: var(--r); display: grid; place-items: center; background: rgba(12, 12, 13, .7); overflow: hidden; transition: aspect-ratio .2s; }
.frame img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--bg); }
.empty { text-align: center; color: var(--dim); font-size: 14px; padding: 20px; }
.empty strong { display: block; color: var(--muted); font-size: 15px; margin-bottom: 4px; font-weight: 500; }
.loading { position: absolute; inset: 0; display: none; place-items: center; background: rgba(12, 12, 13, .82); }
.frame.busy .loading { display: grid; }
.loading .bar { width: 60%; height: 2px; background: var(--line); overflow: hidden; margin: 12px auto 0; }
.loading .bar::after { content: ""; display: block; width: 40%; height: 100%; background: var(--accent); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.loading p { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }
.actions { display: none; gap: 8px; margin-top: 14px; justify-content: center; flex-wrap: wrap; }
.actions.show { display: flex; }
.actions a, .actions button { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 14px; font-size: 14px; text-decoration: none; cursor: pointer; }
.actions a:hover, .actions button:hover { border-color: var(--text); }
.out { display: flex; flex-direction: column; align-items: center; width: 100%; }
.msg { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; max-width: 520px; }
.msg.err { color: var(--err); }

/* Content */
main section { margin: 72px 0; }
.sh { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
@media (max-width: 760px) { .sh { grid-template-columns: 1fr; gap: 10px; } }
.sh > .k { font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding-top: 6px; }
.sh h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 16px; }
.sh p { color: var(--muted); margin: 0 0 12px; max-width: 46em; }
.facts { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.facts th, .facts td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 38%; font-weight: 400; color: var(--dim); font-family: var(--mono); font-size: 13px; }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 700px) { .tips { grid-template-columns: 1fr; } }
.tip { background: var(--bg); padding: 18px 20px; }
.tip h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 6px; }
.tip p { margin: 0; font-size: 15px; }
.tip code { font-family: var(--mono); font-size: 13px; color: var(--accent-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-family: var(--mono); color: var(--dim); font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.prose { max-width: 720px; padding: 40px 0; }
.prose h1 { font-size: 48px; margin-bottom: 8px; }
.prose h3 { font-size: 20px; margin: 28px 0 6px; letter-spacing: -0.01em; }
.prose p { color: var(--muted); }

footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 28px 0 40px; font-size: 13px; color: var(--dim); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
footer p { margin: 0; max-width: 680px; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Account */
.account { display: flex; align-items: center; gap: 12px; font-size: 14px; margin-left: 8px; }
.account .who { color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .credits { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-radius: 99px; padding: 2px 9px; }
.account button { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 13px; padding: 0; }
.account button:hover { color: var(--text); }
.account .signin { background: var(--text); color: var(--bg); border-radius: var(--r); padding: 6px 12px; font-weight: 600; text-decoration: none; }
@media (max-width: 600px) { .account .who { display: none; } }

/* Support & admin */
.prose.wide { max-width: 820px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: var(--r); padding: 11px 18px; font-weight: 700; text-decoration: none; }
.ticket-form { display: grid; gap: 8px; margin: 18px 0 40px; }
.ticket-form input { font: 15px var(--sans); color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: 11px 14px; outline: none; }
.ticket-form input:focus { border-color: var(--text); }
.ticket-form .lbl { margin: 8px 0 0; }
.ticket-form .go { margin-top: 8px; }
.ticket { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); margin-bottom: 14px; }
.ticket-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ticket-head strong { font-weight: 600; }
.ticket-head span { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.status { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border-radius: 99px; padding: 2px 8px; border: 1px solid var(--line-2); }
.status.answered { color: var(--ok); border-color: var(--ok); }
.status.open { color: var(--accent); border-color: var(--accent); }
.m { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; font-size: 15px; color: var(--text); }
.m.admin { background: var(--panel); }
.m .by { display: block; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-bottom: 4px; white-space: normal; }
.reply { display: grid; gap: 8px; padding: 12px 16px; }
.reply textarea { min-height: 80px; }
.reply-row { display: flex; gap: 8px; flex-wrap: wrap; }
.reply-row button { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 14px; cursor: pointer; font-size: 14px; }
.reply-row button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.tabs { display: flex; gap: 6px; margin: 16px 0 20px; flex-wrap: wrap; }
.tabs button { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; cursor: pointer; color: var(--muted); font-size: 14px; }
.tabs button[aria-pressed="true"] { border-color: var(--text); color: var(--text); }
.muted { color: var(--dim); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table th { font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 400; text-transform: uppercase; }
.admin-table tr.warn td { background: rgba(255, 90, 31, .08); }
.admin-table tr.banned td { opacity: .45; }
.admin-table button { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 3px 10px; cursor: pointer; font-size: 12px; }
