:root {
  --bg: #0b0b0d; --bg2: #121216; --card: #1c1c21; --card2: #26262d; --line: #2c2c34; --line2: #3b3b45;
  --text: #f2f2f4; --muted: #9a9aa6; --dim: #6a6a76;
  --acc: #ffe135; --acc-bg: rgba(255, 225, 53, .12); --acc-ink: #1a1600;
  --ok: #3ecf8e; --ok-bg: rgba(62, 207, 142, .12);
  --rec: #ff4757; --rec-bg: rgba(255, 71, 87, .12);
  --blue: #5aa9ff;
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 'IBM Plex Sans Thai', system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hide { display: none !important; }
.sp { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2); background: var(--card2);
  border-radius: 12px; padding: 9px 14px; font-weight: 600; min-height: 44px; white-space: nowrap; transition: transform .06s, background .15s; }
a.btn { color: var(--text); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.sm { min-height: 34px; padding: 4px 10px; font-size: 13px; border-radius: 9px; }
.btn.big { min-height: 56px; font-size: 17px; padding: 12px 20px; }
.btn.acc { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.go { background: var(--ok); border-color: var(--ok); color: #0b1a12; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--rec); border-color: rgba(255, 71, 87, .4); background: transparent; }
.btn.round { border-radius: 999px; width: 44px; padding: 0; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

input, select, textarea { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
label.f { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; letter-spacing: .02em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ── โครงหน้า ─────────────────────────────── */
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 80px; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 13, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); min-height: 58px; }
.top h1 { font-size: 17px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.top .sub { font-size: 12px; color: var(--muted); font-weight: 400; display: block; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--card2); object-fit: cover; }

.brand { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.brand-mark { width: 46px; height: 46px; border-radius: 12px; background: var(--acc); display: grid; place-items: center; font-weight: 700; color: var(--acc-ink); font-size: 22px; }
.home h1 { font-size: 26px; margin: 0; letter-spacing: -.01em; }
.lead { color: var(--muted); margin: 4px 0 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.panel h2 { font-size: 16px; margin: 0 0 6px; }
.join-row { display: flex; gap: 8px; margin-top: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: .2em; font-family: var(--mono); font-size: 20px; text-align: center; }
.list a, .list .item { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.list a:first-child, .list .item:first-child { border-top: 0; }
.list .t { flex: 1; min-width: 0; }
.list .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .t small { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--card2); color: var(--muted); }
.chip.acc { background: var(--acc-bg); color: var(--acc); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.rec { background: var(--rec-bg); color: var(--rec); }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.kind-pick button { border: 2px solid var(--line2); background: var(--bg2); border-radius: 12px; padding: 12px; text-align: left; }
.kind-pick button.on { border-color: var(--acc); background: var(--acc-bg); }
.kind-pick button b { display: block; font-size: 16px; }
.kind-pick button small { color: var(--muted); }
.kind-pick button:disabled { opacity: .5; }

/* ── แท็บ ─────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 12px 0; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 6px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--card2); color: var(--text); }
.sync { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sync.off i { background: var(--rec); }
.sync.wait i { background: var(--acc); }

/* ── รายการช็อต ───────────────────────────── */
.shot { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.shot:active { background: var(--card2); }
.shot .hd { display: flex; align-items: baseline; gap: 8px; }
.shot .hd .sc { font-size: 20px; font-weight: 700; font-family: var(--mono); }
.shot .hd .sc small { font-size: 12px; color: var(--muted); font-family: inherit; font-weight: 600; margin-right: 2px; }
.shot .hd .roll { color: var(--acc); font-family: var(--mono); font-size: 13px; font-weight: 700; }
.shot .desc { color: var(--text); margin: 2px 0; }
.shot .set { color: var(--muted); font-size: 12.5px; font-family: var(--mono); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.takes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk { border: 2px solid var(--card2); background: var(--card2); border-radius: 999px; padding: 4px 11px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; min-height: 34px; max-width: 100%; }
.tk .n { font-size: 16px; }
.tk .c { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.tk .nt { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk.circle { border-color: var(--acc); background: transparent; }
.tk.circle .n { color: var(--acc); }
.tk.ng { border-color: transparent; background: var(--rec-bg); color: var(--rec); text-decoration: line-through; }
.tk.add { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); width: 40px; justify-content: center; padding: 0; font-size: 22px; line-height: 1; }
.tk.add.sm { width: auto; padding: 0 12px; font-size: 14px; }
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 15; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ── หน้าแก้ช็อต (ช่องแบบไทล์) ─────────────── */
.editor { position: fixed; inset: 0; background: var(--bg); z-index: 30; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.editor .body { max-width: 720px; margin: 0 auto; padding: 10px 10px 260px; }
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 7px; margin-bottom: 7px; }
.tile { background: var(--card); border: 1.5px solid transparent; border-radius: 12px; padding: 8px 10px 7px; min-height: 66px; cursor: text; position: relative; overflow: hidden; }
.tile.on { border-color: var(--acc); }
.tile label { display: block; font-size: 11.5px; font-weight: 700; color: var(--acc); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1px; pointer-events: none; }
.tile input, .tile textarea { background: transparent; border: 0; padding: 0; min-height: 0; border-radius: 0; font-size: 21px; font-weight: 600; line-height: 1.25; width: 100%; }
.tile textarea { font-size: 16px; font-weight: 500; min-height: 24px; resize: none; overflow: hidden; }
.tile input:focus, .tile textarea:focus { outline: none; }
.tile .sub { font-size: 14px; font-weight: 500; color: var(--text); opacity: .85; }
.tile .sub input { font-size: 15px; font-weight: 500; }
.tile.s2 { grid-column: span 2; } .tile.s3 { grid-column: span 3; } .tile.s4 { grid-column: span 4; } .tile.s5 { grid-column: span 5; } .tile.s6 { grid-column: span 6; } .tile.s12 { grid-column: span 12; }
.sect { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 14px 6px 6px; text-transform: uppercase; }
.editor .takes-box { background: var(--card); border-radius: 12px; padding: 10px; }
.editor .takes-box label { display: block; font-size: 11.5px; font-weight: 700; color: var(--acc); letter-spacing: .04em; margin-bottom: 8px; }
.editor .takes { margin-top: 0; }

/* แถบชิปด่วนใต้ช่องที่กำลังพิมพ์ */
.kb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(18, 18, 22, .97); border-top: 1px solid var(--line2); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px); transform: translateY(110%); transition: transform .15s; }
.kb.on { transform: none; }
.kb .kb-hd { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 0 4px 6px; }
.kb .keys { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.kb .keys::-webkit-scrollbar { display: none; }
.kb .keys button { flex: 0 0 auto; }
.kb .keys:empty { display: none; }
.kb .digits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.kb .digits button { border: 0; background: var(--card2); border-radius: 10px; padding: 8px; font-weight: 600; font-size: 19px; min-height: 46px; font-family: var(--mono); }
.kb .digits button[data-act^="i:"]:not([data-act="i:0"]):not([data-act="i:1"]):not([data-act="i:2"]):not([data-act="i:3"]):not([data-act="i:4"]):not([data-act="i:5"]):not([data-act="i:6"]):not([data-act="i:7"]):not([data-act="i:8"]):not([data-act="i:9"]) { font-family: inherit; font-size: 15px; background: var(--card); }
.kb .digits button[data-act="bs"] { background: var(--card); }
.kb .digits > div button { border: 0; background: var(--card); border-radius: 10px; padding: 8px 12px; font-weight: 600; min-height: 40px; }
.kb-hd button { border: 0; background: var(--card2); border-radius: 8px; padding: 4px 10px; font-weight: 600; color: var(--text); min-height: 32px; font-size: 13px; }
.kb-hd button.acc { background: var(--acc); color: var(--acc-ink); }
.kb .keys button { border: 0; background: var(--card2); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 15px; min-height: 40px; }
.kb .keys button.acc { background: var(--acc); color: var(--acc-ink); }
.kb .keys button.w { min-width: 56px; }
.kb .keys button.rec { color: var(--rec); }

/* ── modal ────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 600px) { .overlay { align-items: center; } }
.modal { background: var(--card); border: 1px solid var(--line2); border-radius: 18px 18px 0 0; width: 100%; max-width: 560px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; }
@media (min-width: 600px) { .modal { border-radius: 18px; } }
.modal h3 { margin: 0 0 8px; font-size: 18px; }
.modal .foot { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.modal .foot .btn { flex: 1; }
.qr { background: #fff; padding: 14px; border-radius: 14px; display: grid; place-items: center; margin: 10px auto; width: fit-content; }
.qr canvas, .qr img { display: block; }
.big-code { font-family: var(--mono); font-size: 32px; letter-spacing: .25em; text-align: center; font-weight: 700; }
.tk-big { display: flex; align-items: center; gap: 10px; }
.tk-big .n { font-size: 34px; font-weight: 700; font-family: var(--mono); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; border: 2px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 10px; font-weight: 600; min-height: 48px; }
.seg button.on-circle { border-color: var(--acc); color: var(--acc); }
.seg button.on-ng { border-color: var(--rec); color: var(--rec); }
.seg button.on-plain { border-color: var(--text); }
.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stat div { background: var(--bg2); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 22px; font-family: var(--mono); }
.stat small { color: var(--muted); }
.members { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── toast ────────────────────────────────── */
#toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; }
.toast { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 16px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); max-width: 92vw; animation: pop .2s; }
.toast.err { border-color: var(--rec); color: var(--rec); }
.toast.ok { border-color: var(--ok); }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } }

/* ── หน้าพิมพ์ ────────────────────────────── */
.print-page { background: #fff; color: #111; padding: 20px; font: 12px/1.35 'IBM Plex Sans Thai', system-ui, sans-serif; min-height: 100vh; }
.print-page h1 { font-size: 18px; margin: 0 0 4px; }
.print-page .meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 14px; margin: 8px 0 12px; font-size: 12px; }
.print-page .meta b { color: #666; font-weight: 600; font-size: 10.5px; text-transform: uppercase; display: block; }
.print-page table { width: 100%; border-collapse: collapse; font-size: 11px; }
.print-page th, .print-page td { border: 1px solid #bbb; padding: 3px 5px; text-align: left; vertical-align: top; }
.print-page th { background: #eee; font-size: 10px; text-transform: uppercase; }
.print-page tr.shot-hd td { background: #f6f6f6; font-weight: 600; }
.print-page .circ { display: inline-block; border: 2px solid #111; border-radius: 50%; width: 22px; height: 22px; line-height: 18px; text-align: center; font-weight: 700; }
.print-page .ng { text-decoration: line-through; color: #999; }
.print-bar { position: sticky; top: 0; background: var(--card); padding: 10px 16px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
@media print {
  .print-bar, #toasts { display: none !important; }
  body { background: #fff; }
  .print-page { padding: 0; }
  @page { size: A4 landscape; margin: 10mm; }
}

@media (min-width: 700px) { .tile input { font-size: 24px; } .editor .body { padding-bottom: 300px; } .fab { right: calc(50% - 344px); } }

/* ── เบรคดาว ──────────────────────────────── */
.thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #000; flex: 0 0 auto; }
.shot .thumb { float: right; margin: 0 0 4px 8px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bd-bar { background: var(--card); border: 1.5px dashed var(--acc); border-radius: 12px; padding: 10px 12px; margin: 4px 0 8px; }
.bd-m + .bd-m { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.bd-hd { margin-bottom: 4px; }
.bd-chip { border: 1px dashed var(--line2); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; margin: 2px 0 8px; }
.bd-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.bd-row { display: flex; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); align-items: flex-start; }
.bd-row:first-child { border-top: 0; }
.bd-sc { font-family: var(--mono); font-weight: 700; min-width: 34px; }
.warn-box { background: var(--acc-bg); border: 1px solid rgba(255, 225, 53, .4); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; margin: 6px 0; }
.bd-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bd-pick { border: 2px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 4px; display: grid; gap: 4px; justify-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.bd-pick img { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; }
.bd-pick.on { border-color: var(--acc); color: var(--acc); }

/* ── หน้าเข้าสู่ระบบ ──────────────────────── */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.login-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 28px; padding: 40px 28px 30px; text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.login-card::before { content: ''; position: absolute; inset: 0; border-radius: 28px; padding: 3px; background: linear-gradient(180deg, var(--acc), rgba(255, 225, 53, 0)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.login-logo { width: 76px; height: 76px; border-radius: 20px; margin: 4px auto 22px; display: block; }
.login h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
.login .muted { margin: 0 0 26px; font-size: 16px; }
.gbtn { display: flex; justify-content: center; min-height: 44px; }
.login .join-row input { text-transform: uppercase; }
.login details .join-row { margin-top: 10px; }

/* ── หน้าตั้งค่า (ลิสต์แบบ iOS) ─────────────── */
.slist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 13px 14px; text-align: left; border-top: 1px solid var(--line); min-height: 56px; color: var(--text); font: inherit; }
.srow:first-child { border-top: 0; }
.srow:active { background: var(--card2); }
.srow .ic { width: 26px; text-align: center; font-size: 18px; }
.srow .lb { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; }
.srow .lb small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.srow .vl { color: var(--muted); font-size: 14px; white-space: nowrap; }
.srow .ch { color: var(--dim); font-size: 22px; line-height: 1; }
.srow.add .lb { color: var(--acc); }
.cam-bar { width: 8px; height: 34px; border-radius: 4px; flex: 0 0 auto; }
.cam-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.cam-row { display: flex; gap: 8px; margin: 2px 0 10px; overflow-x: auto; }
.cam-chip { border: 2px solid var(--line2); background: var(--card); border-radius: 12px; padding: 6px 14px; font-weight: 700; font-size: 18px; color: var(--muted); display: grid; justify-items: center; line-height: 1.1; min-width: 74px; }
.cam-chip small { font-size: 11px; font-weight: 500; color: var(--dim); }
.cam-chip.on { border-color: var(--cc); color: var(--cc); }
.sheet .body { padding: 10px 14px 60px; }
.color-box { background: var(--card); border-radius: 16px; overflow: hidden; }
.color-prev { height: 90px; }
.hue { -webkit-appearance: none; appearance: none; width: calc(100% - 28px); margin: 18px 14px 12px; height: 8px; border-radius: 4px; border: 0; padding: 0; min-height: 0;
  background: linear-gradient(90deg, hsl(0 100% 55%), hsl(60 100% 55%), hsl(120 100% 55%), hsl(180 100% 55%), hsl(240 100% 55%), hsl(300 100% 55%), hsl(360 100% 55%)); }
.hue::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 30px; border-radius: 15px; background: #fff; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); cursor: pointer; }
.hue:focus { outline: none; }
.color-box .seg { margin: 0 14px 14px; }
.llist { background: var(--card); border-radius: 16px; padding: 6px 10px; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.lrow:first-child { border-top: 0; }
.lrow input { background: #000; border: 0; font-size: 17px; }
.lrow .lx { border: 0; background: transparent; color: var(--text); font-size: 20px; width: 34px; min-height: 40px; }
.lrow .lh { color: var(--muted); font-size: 22px; padding: 0 6px; cursor: grab; touch-action: none; }
.logo-row { cursor: default; }
.logo-thumb { width: 64px; height: 40px; display: grid; place-items: center; background: #fff; border-radius: 8px; overflow: hidden; flex: 0 0 auto; font-size: 11px; }
.logo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-thumb .dim { color: #999; }
.kb .picks { display: flex; flex-wrap: wrap; gap: 7px; max-height: 38vh; overflow-y: auto; padding-bottom: 2px; }
.kb .picks button { border: 0; background: var(--card2); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 16px; min-height: 46px; flex: 1 1 auto; max-width: 100%; }
.kb .picks button.acc { background: var(--acc); color: var(--acc-ink); }
.kb .kb-ft { display: flex; gap: 6px; margin-top: 8px; }
.kb .kb-ft button { border: 0; background: var(--card); border-radius: 10px; padding: 8px 12px; font-weight: 600; min-height: 40px; color: var(--text); }
.kb .kb-ft button.rec { color: var(--rec); }
.tk .lp { font-size: 11px; font-weight: 700; background: rgba(255,255,255,.12); border-radius: 6px; padding: 1px 5px; }
.lrow.lens { align-items: flex-start; }
.lrow.lens .lx, .lrow.lens .lh { margin-top: 6px; }
.focals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.focals .fc { border: 0; background: var(--card2); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 14px; font-family: var(--mono); display: inline-flex; gap: 6px; align-items: center; }
.focals .fc span { color: var(--muted); font-size: 11px; }
.focals .fadd { width: 130px; min-height: 32px; padding: 4px 10px; font-size: 14px; border-radius: 999px; background: transparent; border: 1px dashed var(--line2); }
.sugg { display: grid; gap: 4px; margin-top: 6px; }
.sugg button { border: 1px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 7px 10px; text-align: left; font-weight: 600; color: var(--text); }
.sugg button small { display: block; color: var(--muted); font-weight: 500; font-family: var(--mono); font-size: 11px; }
.pickfield { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; text-align: left; color: var(--text); font: inherit; }
.pickfield span { color: var(--dim); font-size: 20px; }
.fmiss { border: 1px dashed var(--acc); background: transparent; color: var(--acc); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 13px; margin-top: 6px; }
.setbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.setbar::-webkit-scrollbar { display: none; }
.setchip { flex: 0 0 auto; border: 1px solid var(--line2); background: var(--card); border-radius: 12px; padding: 8px 12px; font-weight: 700; color: var(--text); display: grid; text-align: left; min-height: 48px; }
.setchip small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.setchip.add { border-style: dashed; border-color: var(--acc); color: var(--acc); align-content: center; }
.srow .ic.svg { display: grid; place-items: center; width: 30px; height: 30px; color: var(--text); }
.srow .ic.svg svg { width: 26px; height: 26px; display: block; }

/* ── ไทล์แบบแอปตัวอย่าง: กริด 24 คอลัมน์ · เตี้ยลง · ตัวเลขใหญ่ ── */
.editor .tiles { grid-template-columns: repeat(24, 1fr); gap: 6px; margin-bottom: 6px; }
.editor .tile { min-height: 60px; padding: 7px 8px 6px; border-radius: 11px; }
.editor .tile label { font-size: 11px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor .tile input { font-size: 20px; }
.editor .tile.nosub:not(.on) .sub { display: none; }
@media (min-width: 700px) { .editor .tile input { font-size: 24px; } .editor .tile label { font-size: 12.5px; } }
