
:root { color-scheme: light dark; --bg: #fff; --hover: #f7f9f9; --field: #eff3f4; --text: #0f1419; --muted: #536471; --line: #eff3f4; --accent: #1d9bf0; --bad: #f4212e; --good: #00ba7c; --blur: rgba(255,255,255,.85); }
@media (prefers-color-scheme: dark) { :root { --bg: #000; --hover: #080808; --field: #202327; --text: #e7e9ea; --muted: #71767b; --line: #2f3336; --blur: rgba(0,0,0,.65); } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex: none; }
code { font-size: 14px; }
.shell { display: flex; justify-content: center; min-height: 100vh; }

.side { position: sticky; top: 0; height: 100vh; width: 275px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 12px; font-size: 18px; font-weight: 800; color: var(--accent); }
.brand span { color: var(--text); }
.nav-item { display: flex; align-items: center; gap: 20px; width: max-content; padding: 12px 24px 12px 12px; border: 0; border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: 20px; cursor: pointer; }
.nav-item:hover { background: var(--field); }
.nav-item[aria-current] { font-weight: 800; }
.side form { margin-top: auto; padding-bottom: 8px; }

.column { width: 100%; max-width: 600px; min-width: 0; border-inline: 1px solid var(--line); padding-bottom: 40px; }
.top { position: sticky; top: 0; z-index: 2; padding: 16px; background: var(--blur); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 20px; font-weight: 800; }
.right { width: 350px; padding: 8px 0 0 24px; }
.right-inner { position: sticky; top: 8px; }

.search { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid transparent; border-radius: 999px; background: var(--field); color: var(--muted); }
.search:focus-within { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.search svg { width: 18px; height: 18px; }
.top .search { margin-top: 12px; }

.post { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.post:hover { background: var(--hover); }
.avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; text-transform: uppercase; }
.c0 { background: #1d9bf0; } .c1 { background: #7856ff; } .c2 { background: #f91880; } .c3 { background: #e2730a; } .c4 { background: #00a06a; } .c5 { background: #536471; }
.body { flex: 1; min-width: 0; }
.head { display: flex; gap: 4px; white-space: nowrap; }
.name { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.handle { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.time { flex: none; color: var(--muted); }
.text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.grid { display: grid; gap: 2px; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.grid.many { grid-template-columns: 1fr 1fr; }
.cell { position: relative; min-width: 0; background: var(--field); }
.cell img, .cell video { display: block; width: 100%; max-height: 510px; object-fit: contain; background: #000; }
.many .cell img, .many .cell video { aspect-ratio: 16 / 9; object-fit: cover; }
.top .top-search .search { display: flex; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-row .sub { margin: 0; color: var(--muted); font-size: 13px; }
.top .button { flex: none; padding: 7px 16px; font-size: 14px; }
.account { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.account:hover { background: var(--hover); }
.account-link { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.account-info { flex: 1; min-width: 0; }
.account-info div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta { color: var(--muted); font-size: 13px; }
.account-error { color: var(--bad); font-size: 13px; }
.subtle-link { flex: none; color: var(--accent); font-size: 14px; }
.badge { display: inline-block; margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.quote { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.quote .text { margin-top: 2px; }
.form-title { margin: 20px 0 8px; font-size: 15px; font-weight: 700; }
.form-title:first-child { margin-top: 0; }
.panel .field input { max-width: 100%; }
.years { width: 96px !important; }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.check input:disabled + span { color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.button.secondary { border: 1px solid var(--line); background: none; color: var(--text); }
.button.danger { background: var(--bad); color: #fff; }
.section-title { margin: 0; padding: 16px 16px 0; font-size: 17px; font-weight: 800; }
.zoom { display: block; cursor: zoom-in; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: rgba(0,0,0,.94); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: #000; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; touch-action: none; user-select: none; -webkit-user-select: none; transform-origin: center; }
.lightbox img.zoomed { cursor: grab; }
.lb-button { position: absolute; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(39,44,48,.8); color: #fff; cursor: pointer; }
.lb-button:hover { background: rgba(80,88,95,.9); }
.lb-button:focus-visible { outline: 2px solid var(--accent); }
.lb-close { top: 12px; left: 12px; }
.lb-download { top: 12px; right: 12px; }
.lb-previous { left: 12px; top: calc(50% - 22px); }
.lb-next { right: 12px; top: calc(50% - 22px); }
.lightbox.single .lb-previous, .lightbox.single .lb-next { display: none; }
.dl { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; }
.dl:hover { background: rgba(0,0,0,.85); }
.dl svg { width: 18px; height: 18px; }
.actions { display: flex; gap: 20px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.actions a { display: flex; align-items: center; gap: 6px; }
.actions a:hover { color: var(--accent); }
.actions svg { width: 18px; height: 18px; }
.pending { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.more { display: block; padding: 16px; text-align: center; color: var(--accent); }
.more:hover { background: var(--hover); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

.panel { padding: 16px; border-bottom: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.row span:first-child { color: var(--muted); }
.row span:last-child { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.steps { margin: 0 0 12px; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
textarea { display: block; width: 100%; min-height: 120px; margin-top: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: 13px/1.4 ui-monospace, monospace; }
textarea:focus, .field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.button { display: inline-block; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
.button:hover { opacity: .88; }
.good { color: var(--good); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }

.auth { position: relative; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; overflow: hidden; background: var(--bg); }
.auth::before { content: ""; position: absolute; inset: -40% -20% auto; height: 80%; background: radial-gradient(closest-side, rgba(29,155,240,.22), transparent); pointer-events: none; }
.auth-card { position: relative; width: 100%; max-width: 400px; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); box-shadow: 0 16px 48px rgba(0,0,0,.12); }
.mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px; background: rgba(29,155,240,.14); color: var(--accent); }
.auth-card h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; text-align: center; }
.auth-card .hint { margin: 6px 0 24px; font-size: 15px; text-align: center; }
.field { display: block; margin-bottom: 14px; color: var(--muted); font-size: 14px; font-weight: 600; }
.field input { display: block; width: 100%; height: 48px; margin-top: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; font-weight: 400; }
.password { position: relative; display: block; }
.password input { padding-right: 52px; }
.eye { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.eye[hidden] { display: none; }
.eye:hover { color: var(--text); }
.eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.eye svg { width: 20px; height: 20px; }
.eye .shown { display: none; }
.eye[aria-pressed="true"] .shown { display: block; }
.eye[aria-pressed="true"] .concealed { display: none; }
.cf-turnstile { min-height: 65px; margin: 18px 0; }
.auth-card .button { width: 100%; height: 48px; padding: 0; background: var(--accent); color: #fff; }
.auth-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.error { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: rgba(244,33,46,.1); color: var(--bad); font-size: 14px; text-align: center; }
@media (max-width: 460px) { .auth { padding: 0; place-items: stretch; } .auth-card { display: flex; flex-direction: column; justify-content: center; max-width: none; padding: 32px 20px; border: 0; border-radius: 0; background: none; box-shadow: none; } }

@media (max-width: 1100px) { .right { display: none; } .side { width: 88px; align-items: center; } .side .brand span, .nav-item span { display: none; } .nav-item { padding: 12px; } }
@media (min-width: 1101px) { .top .search { display: none; } }
@media (max-width: 500px) {
  .shell { display: block; }
  .column { border-inline: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .side { position: fixed; inset: auto 0 0; z-index: 3; width: 100%; height: auto; flex-direction: row; justify-content: space-around; padding: 2px 8px env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); }
  .side .brand { display: none; }
  .side form { margin: 0; padding: 0; }
  .nav-item { padding: 12px; }
  .post { padding: 12px; }
  .row { padding: 12px; }
}
