/* DC Viewer v2 — m.dcinside.com look-alike (read-only) */
:root {
  --blue: #3b4890;
  --blue-dk: #29367c;
  --blue-lt: #afbdff;
  --bg: #ebecf1;
  --card: #fff;
  --soft: #f9fafc;
  --line: #dfe1ee;
  --line2: #eeeff4;
  --text: #000;
  --text2: #333;
  --text3: #555;
  --muted: #999;
  --red: #d31900;
  --red2: #d22227;
  --visited: #6d459e;
  --up: #0080ff;
  --chip: #f1f4f8;
  --overlay: rgba(0, 0, 0, .45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", Helvetica, sans-serif;
  color-scheme: light;
}
body.dark {
  --blue: #333d77;
  --blue-dk: #232a55;
  --blue-lt: #a6add1;
  --bg: #121212;
  --card: #1e1e1e;
  --soft: #252525;
  --line: #353535;
  --line2: #2b2b2b;
  --text: #eee;
  --text2: #ddd;
  --text3: #bbb;
  --muted: #888;
  --red: #ff6b5b;
  --red2: #ff6b6b;
  --visited: #a993cf;
  --up: #5aa9ff;
  --chip: #2a2a2a;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  touch-action: pan-x pan-y;
  letter-spacing: -.02em;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font-size: 16px; } /* iOS: no focus zoom */
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
img { border: 0; }
.blind { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 720px; margin: 0 auto; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }

/* ---------------- progress bar ---------------- */
#progress { position: fixed; left: 0; top: 0; height: 2px; width: 0; background: #ffd400; z-index: 100; transition: width .25s ease, opacity .3s ease; opacity: 0; pointer-events: none; }
#progress.on { opacity: 1; }

/* ---------------- header ---------------- */
.hd { background: var(--blue-dk); padding-top: var(--safe-top); position: relative; z-index: 20; }
.hd-top { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 8px 0 6px; }
.logo { flex: 0 0 auto; width: 38px; height: 38px; display: block; border-radius: 3px; overflow: hidden; }
.logo img { width: 100%; height: 100%; display: block; }
.schbox { flex: 1; min-width: 0; display: flex; align-items: center; height: 38px; background: #fff; border-radius: 2px; }
body.dark .schbox { background: #2a2a2a; }
.schbox .btn-menu, .schbox .btn-sch { width: 38px; height: 38px; display: grid; place-items: center; color: #555; font-size: 20px; flex: 0 0 auto; }
body.dark .schbox .btn-menu, body.dark .schbox .btn-sch { color: #bbb; }
.schbox .btn-menu { border-right: 1px solid #e5e5e5; width: 36px; }
body.dark .schbox .btn-menu { border-color: #3a3a3a; }
.schbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 38px; padding: 0 8px; font-size: 16px; color: var(--text); }
.schbox input::placeholder { color: #999; }
.schbox .btn-sch { color: var(--blue); font-size: 21px; }
body.dark .schbox .btn-sch { color: #a6add1; }
.schbox .btn-recent { flex: 0 0 auto; height: 26px; padding: 0 9px; margin-right: 6px; border-left: 1px solid #e5e5e5; font-size: 14px; font-weight: 700; color: #333; letter-spacing: -1px; white-space: nowrap; }
body.dark .schbox .btn-recent { color: #ddd; border-color: #3a3a3a; }
.gnb { background: var(--blue); height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.gnb::-webkit-scrollbar { display: none; }
.gnb a { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -1px; white-space: nowrap; padding: 0 2px; line-height: 40px; }
.gnb a.on { color: #ffd400; }

/* ---------------- layout blocks ---------------- */
.grid { background: var(--card); margin-bottom: 6px; }
.grid.flush { margin-bottom: 0; }
.md-tit-box { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px 9px; border-bottom: 1px solid var(--line); }
.md-tit { font-size: 16px; font-weight: 700; letter-spacing: -1px; color: var(--text); }
.md-tit .count { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 5px; }
.md-tit-box .rt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text3); }
.empty-box { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid #c5c7d5; color: var(--text3); font-size: 13px; font-weight: 700; background: var(--card); letter-spacing: -1px; }
body.dark .btn-line { border-color: #444; }
.btn-line.blue { border-color: var(--blue); color: var(--blue); }
body.dark .btn-line.blue { border-color: #5c5bb1; color: #a6add1; }

/* ---------------- gallery title ---------------- */
.gall-tit-box { display: flex; align-items: center; padding: 0 6px 0 12px; background: var(--card); min-height: 48px; border-bottom: 1px solid var(--line2); }
.gall-tit-box .tit { display: flex; align-items: center; min-width: 0; flex: 1; gap: 4px; }
.gall-tit-box .tit a { font-size: 17px; font-weight: 700; letter-spacing: -1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 10px 0 8px; }
.gall-tit-box .count { font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: 2px; }
.gall-tit-box .rt { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.gall-tit-box .rt .lnk { display: inline-flex; align-items: center; height: 30px; padding: 0 7px; font-size: 13px; color: var(--text3); position: relative; }
.gall-tit-box .rt .lnk + .lnk::before { content: ""; position: absolute; left: 0; top: 10px; width: 1px; height: 10px; background: var(--line); }
.gall-tit-box .rt .btn-fav { font-size: 19px; color: #c5c7d5; padding: 0 6px; height: 30px; }
.gall-tit-box .rt .btn-fav.on { color: #ffb400; }
.gtype { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 3px; font-size: 11px; font-weight: 800; color: #fff; flex: 0 0 auto; font-style: normal; letter-spacing: 0; line-height: 1; }
.gtype.m { background: #2a5bd7; }
.gtype.mi { background: #8d58d6; }
.gtype.p { background: #3cae7d; }

/* ---------------- tabs ---------------- */
.tab-lst { display: flex; align-items: stretch; background: var(--card); border-bottom: 1px solid var(--line); }
.tab-lst li { flex: 1; text-align: center; position: relative; }
.tab-lst li + li::before { content: ""; position: absolute; left: 0; top: 14px; width: 1px; height: 14px; background: var(--line); }
.tab-lst a, .tab-lst button { display: block; width: 100%; height: 44px; line-height: 44px; font-size: 16px; font-weight: 700; color: var(--text2); letter-spacing: -1px; }
.tab-lst li.on a, .tab-lst li.on button { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
body.dark .tab-lst li.on a, body.dark .tab-lst li.on button { color: #a6add1; box-shadow: inset 0 -3px 0 #5c5bb1; }
.tab-lst li.sel { flex: 0 0 auto; padding: 0 10px; }
.tab-lst select { height: 44px; border: 0; background: transparent; color: var(--text3); font-size: 15px; outline: 0; }

/* 말머리 */
.mal-wrap { background: var(--card); border-bottom: 1px solid var(--line); }
.mal-lst { display: flex; gap: 6px; overflow-x: auto; padding: 9px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mal-lst::-webkit-scrollbar { display: none; }
.mal-lst a { flex: 0 0 auto; display: inline-block; height: 28px; line-height: 26px; padding: 0 11px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; color: var(--text3); white-space: nowrap; background: var(--card); }
.mal-lst a.on { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 700; }

/* ---------------- notice rows ---------------- */
.detail-top-lst li { border-bottom: 1px solid var(--line2); }
.detail-top-lnk { display: flex; align-items: center; min-height: 44px; }
.detail-top-lnk .lt { flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.detail-top-lnk .rt { flex: 0 0 52px; text-align: center; font-size: 12px; color: var(--red2); align-self: stretch; display: grid; place-items: center; background: var(--soft); border-left: 1px solid var(--line2); }
.round { display: inline-block; font-size: 11px; border-radius: 10px; padding: 2px 7px 1px 6px; letter-spacing: -1px; font-weight: 700; text-align: center; line-height: 1.3; margin-right: 6px; min-width: 35px; vertical-align: 1px; }
.ntc-line-orange { border: 1px solid #ff7e00; color: #ff7e00; }
.ntc-line-blue { border: 1px solid var(--blue); color: var(--blue); }
body.dark .ntc-line-blue { border-color: #a6add1; color: #a6add1; }
.ntc-line-red { border: 1px solid #d31900; color: #d31900; }
.ntc-more { display: block; width: 100%; height: 34px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--card); }

/* ---------------- post list (m style) ---------------- */
.gall-detail-lst > li { border-bottom: 1px solid var(--line2); background: var(--card); }
.gall-detail-lst > li.on { background: var(--soft); }
.gall-detail-lnktb { display: flex; align-items: stretch; }
.gall-detail-lnktb .lt { flex: 1; min-width: 0; padding: 9px 4px 8px 12px; display: flex; gap: 10px; align-items: center; }
.gall-detail-lnktb .lt .txtbox { flex: 1; min-width: 0; }
.subject-add { display: flex; align-items: center; min-width: 0; }
.subjectin { flex: 0 1 auto; min-width: 0; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.03em; line-height: 1.45; }
.subjectin b { font-weight: 700; }
.gall-detail-lst li.read .subjectin, .gall-detail-lst .lt:visited .subjectin { color: var(--visited); }
.gall-detail-lst li.best .subjectin { font-weight: 700; }
.lsticon { flex: 0 0 auto; width: 16px; height: 16px; margin-right: 5px; display: inline-grid; place-items: center; }
.lsticon svg { width: 16px; height: 16px; display: block; }
.ginfo { display: flex; flex-wrap: nowrap; align-items: center; margin-top: 3px; overflow: hidden; white-space: nowrap; }
.ginfo li { font-size: 12px; line-height: 18px; color: var(--muted); display: flex; align-items: center; flex: 0 0 auto; }
.ginfo li + li::before { content: ""; display: inline-block; width: 1px; height: 9px; background: var(--line); margin: 0 7px; }
.ginfo li.list-nick { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.ginfo li.list-nick .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text3); }
.ginfo li.head { color: var(--text3); }
.ginfo .up span { color: var(--up); }
.ip { color: var(--muted); font-size: 11px; margin-left: 1px; }
.gall-detail-lnktb .rt { flex: 0 0 48px; display: grid; place-items: center; background: var(--soft); border-left: 1px solid var(--line2); }
.gall-detail-lnktb .rt .ct { color: var(--red2); font-size: 12px; }
.gall-detail-lnktb .rt .ct.zero { color: var(--red2); opacity: .9; }
.thum-img { flex: 0 0 auto; width: 72px; height: 54px; border-radius: 2px; overflow: hidden; background: var(--chip); }
.thum-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-more { display: block; width: 100%; height: 44px; font-size: 14px; color: var(--text3); background: var(--card); border-bottom: 1px solid var(--line); }
.list-sentinel { height: 1px; }

/* nick icons */
.nkicon { display: inline-block; width: 12px; height: 12px; margin-left: 3px; border-radius: 2px; flex: 0 0 auto; position: relative; }
.nkicon.gonick { background: #3a9d4a; }
.nkicon.nogonick { background: #a9aec4; }
.nkicon.sub-gonick, .nkicon.m-gonick { background: #e6a700; }
.nkicon.sub-nogonick, .nkicon.m-nogonick { background: #d6c27a; }
.nkicon::after { content: ""; position: absolute; left: 3px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9; }
.nicknum { color: var(--muted); font-size: 11px; margin-left: 2px; }

/* ---------------- paging ---------------- */
.paging { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.paging .pg-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text3); font-size: 16px; background: var(--card); }
.paging .pg-btn.dis { opacity: .35; pointer-events: none; }
.paging .pg-inner { flex: 1; display: flex; justify-content: space-around; padding: 0 6px; }
.paging .pg-inner a { min-width: 32px; text-align: center; font-size: 15px; color: var(--text3); line-height: 30px; }
.paging .pg-inner a.on { color: var(--blue); font-weight: 800; }
body.dark .paging .pg-inner a.on { color: #a6add1; }
.paging .pg-jump { margin-left: 8px; }

/* buttons row */
.btn-justify-area { display: flex; gap: 8px; padding: 12px; background: var(--card); }
.btn-jus { flex: 1; height: 38px; border: 1px solid #c5c7d5; font-size: 14px; font-weight: 700; color: var(--text3); letter-spacing: -1px; background: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
body.dark .btn-jus { border-color: #444; }
.btn-jus.inblue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-jus.dis { opacity: .4; pointer-events: none; }

/* search box (list) */
.con-search-box { background: var(--soft); padding: 12px; }
.con-search-inner { display: flex; align-items: center; height: 42px; border: 2px solid var(--blue); background: var(--card); }
body.dark .con-search-inner { border-color: #5c5bb1; }
.con-search-inner select { height: 38px; border: 0; background: transparent; padding: 0 6px 0 10px; font-size: 15px; font-weight: 700; color: var(--text3); outline: 0; max-width: 110px; }
.con-search-inner input { flex: 1; min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; padding: 0 6px; }
.con-search-inner button { width: 42px; height: 38px; color: var(--blue); font-size: 21px; display: grid; place-items: center; }
body.dark .con-search-inner button { color: #a6add1; }
.sch-info { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 13px; color: var(--text3); background: var(--card); border-bottom: 1px solid var(--line); }
.sch-info b { color: var(--blue); }
body.dark .sch-info b { color: #a6add1; }

/* ---------------- post view ---------------- */
.gallview-tit-box { padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.gallview-tit-box .tit { display: block; font-size: 17px; font-weight: 700; line-height: 1.45; word-break: break-all; letter-spacing: -.04em; }
.gallview-tit-box .btm { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ginfo2 { display: flex; align-items: center; flex-wrap: wrap; }
.ginfo2 li { font-size: 12px; line-height: 1.5; color: var(--text3); display: flex; align-items: center; }
.ginfo2 li + li::before { content: ""; display: inline-block; width: 1px; height: 9px; background: var(--line); margin: 0 7px; }
.ginfo2 .nick { font-weight: 700; color: var(--text2); }
.ginfo2 .up-add span { color: var(--up); margin-left: 3px; }
.ginfo2 .point-red { color: var(--red2); margin-left: 3px; }
.gall-thum-btm { background: var(--card); }
.gall-thum-btm-inner > .ginfo2 { padding: 9px 12px; border-bottom: 1px solid var(--line2); }
.thum-txtin { padding: 14px 12px 6px; font-size: 15px; line-height: 1.6; word-wrap: break-word; word-break: break-all; color: var(--text); overflow-x: hidden; -webkit-user-select: text; user-select: text; min-height: 60px; }
.thum-txtin * { max-width: 100% !important; }
.thum-txtin p { margin: 0; }
.thum-txtin img { height: auto !important; display: inline-block; vertical-align: top; }
.thum-txtin img.bimg { display: block; margin: 6px auto; min-height: 80px; background: var(--chip); cursor: zoom-in; }
.thum-txtin img.bimg.ok { min-height: 0; background: none; }
.thum-txtin img.fail { min-height: 40px; min-width: 120px; opacity: .5; }
.thum-txtin img.written_dccon, .thum-txtin img.dccon { width: 100px; height: 100px !important; object-fit: contain; display: inline-block; margin: 2px; min-height: 0; }
.thum-txtin a { color: #2a5bd7; text-decoration: underline; word-break: break-all; }
body.dark .thum-txtin a { color: #7aa8ff; }
.thum-txtin table { display: block; overflow-x: auto; border-collapse: collapse; }
.thum-txtin td, .thum-txtin th { border: 1px solid var(--line); padding: 4px; }
.thum-txtin iframe { width: 100% !important; aspect-ratio: 16 / 9; height: auto !important; border: 0; display: block; margin: 6px 0; }
.thum-txtin video { width: 100%; max-height: 70vh; background: #000; display: block; margin: 6px 0; }
.thum-txtin pre, .thum-txtin code { white-space: pre-wrap; font-size: 13px; }
.thum-txtin [style*="color"] { /* respect authors' colors mostly */ }
body.dark .thum-txtin [style*="color:#000"], body.dark .thum-txtin [style*="color: rgb(0, 0, 0)"] { color: var(--text) !important; }
body.dark .thum-txtin [style*="background"] { background: transparent !important; }
.vid-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; aspect-ratio: 16/9; background: #111 center/cover no-repeat; color: #fff; border-radius: 2px; margin: 6px 0; font-size: 13px; position: relative; }
.vid-ph .play { width: 58px; height: 58px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; font-size: 26px; border: 2px solid rgba(255,255,255,.8); }
.vid-ph .msg { background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 10px; }

.reco-area { padding: 18px 12px 16px; border-top: 1px solid var(--line2); display: flex; justify-content: center; gap: 26px; }
.reco-box { display: flex; align-items: center; gap: 10px; }
.reco-circle { width: 58px; height: 58px; border-radius: 50%; border: 2px solid; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.reco-up .reco-circle { border-color: #d31900; color: #d31900; }
.reco-down .reco-circle { border-color: #8a8fa8; color: #8a8fa8; }
.reco-box .ct { font-size: 20px; font-weight: 800; color: var(--red2); line-height: 1.1; }
.reco-down .ct { color: var(--text3); }
.reco-box .go-ct { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; }

.pn-box { display: flex; border-top: 1px solid var(--line); background: var(--card); }
.pn-box a, .pn-box span.pn { flex: 1; min-width: 0; padding: 10px 12px; font-size: 13px; color: var(--text2); display: flex; flex-direction: column; gap: 1px; }
.pn-box a + a, .pn-box a + span, .pn-box span + a { border-left: 1px solid var(--line); }
.pn-box .lbl { font-size: 11px; color: var(--muted); font-weight: 700; }
.pn-box .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-box .dis { opacity: .4; }
.pn-box .nx { text-align: right; align-items: flex-end; }

/* ---------------- comments ---------------- */
.all-comment { background: var(--card); border-top: 6px solid var(--bg); }
.all-comment-tit { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; height: 46px; border-bottom: 1px solid var(--line); }
.all-comment-tit .tit { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.all-comment-tit .tit .ct { color: var(--red2); }
.all-comment-tit .tit .rl { font-size: 15px; color: var(--muted); margin-left: 3px; }
.all-comment-tit .rt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); }
.all-comment-tit select { border: 1px solid var(--line); background: var(--card); height: 28px; font-size: 13px; padding: 0 4px; color: var(--text3); }
.all-comment-lst > li { padding: 9px 12px 8px; border-bottom: 1px solid var(--line2); position: relative; }
.all-comment-lst > li.comment-add { padding-left: 34px; background: var(--soft); }
.all-comment-lst > li.comment-add::before { content: ""; position: absolute; left: 17px; top: 13px; width: 8px; height: 8px; border-left: 1px solid #b9bccb; border-bottom: 1px solid #b9bccb; }
.all-comment-lst .ginfo-area { display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
.all-comment-lst .nick { font-size: 13px; font-weight: 700; color: var(--text2); }
.all-comment-lst .writer-tag { font-size: 10px; font-weight: 700; color: var(--blue); border: 1px solid var(--blue); border-radius: 8px; padding: 0 4px; margin-left: 4px; line-height: 1.4; }
body.dark .all-comment-lst .writer-tag { color: #a6add1; border-color: #a6add1; }
.all-comment-lst .txt { font-size: 14px; line-height: 1.5; margin-top: 3px; word-break: break-all; color: var(--text); white-space: normal; }
.all-comment-lst .txt img { max-width: 100%; }
.all-comment-lst .txt img.written_dccon, .all-comment-lst .txt img.dccon { width: 100px; height: 100px; object-fit: contain; display: inline-block; vertical-align: bottom; background: var(--chip); border-radius: 2px; }
.all-comment-lst .txt img.written_dccon.ok, .all-comment-lst .txt img.dccon.ok { background: none; }
.all-comment-lst .txt a { color: #2a5bd7; }
.all-comment-lst .date { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.all-comment-lst .del .txt { color: var(--muted); }
.cmt-paging { display: flex; align-items: center; justify-content: center; gap: 14px; height: 50px; border-bottom: 1px solid var(--line); }
.cmt-paging button { width: 32px; height: 32px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 16px; color: var(--text3); background: var(--card); }
.cmt-paging button:disabled { opacity: .35; }
.cmt-paging .pgnum { font-size: 14px; color: var(--text3); min-width: 60px; text-align: center; }
.cmt-paging .pgnum strong { color: var(--blue); }
body.dark .cmt-paging .pgnum strong { color: #a6add1; }
.cmt-state { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------------- home ---------------- */
.home-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; }
.home-chips a { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 15px; background: var(--chip); font-size: 13px; color: var(--text2); max-width: 100%; }
.home-chips a span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-chips .x { margin-left: 2px; color: var(--muted); font-size: 12px; padding: 4px 0 4px 4px; }
.lb-tab { display: flex; align-items: center; gap: 12px; }
.lb-tab button { font-size: 17px; font-weight: 800; color: var(--muted); letter-spacing: -1px; }
.lb-tab button.on { color: var(--text); }
.lb-tab button.on::after { content: "✓"; color: #d31900; margin-left: 2px; font-weight: 900; }
.lb-tab button.light.on::after { color: #ff9e00; }
.pg-mini { display: flex; align-items: center; gap: 0; }
.pg-mini .pgnum { font-size: 13px; color: var(--text3); margin-right: 8px; }
.pg-mini button { width: 28px; height: 28px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 15px; }
.pg-mini button + button { margin-left: 1px; }
.pg-mini button:disabled { opacity: .5; }
.thum-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 12px 4px; }
.thum-top a { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--chip); border-radius: 2px; }
.thum-top img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thum-top .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.best-lst li a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
.best-lst .thum-img { width: 60px; height: 45px; }
.best-lst .tx { flex: 1; min-width: 0; }
.best-lst .t { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.best-lst .t .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.best-lst .t .n { color: var(--red2); font-size: 13px; flex: 0 0 auto; }
.best-lst .sub { font-size: 12px; color: var(--muted); display: flex; gap: 0; }
.best-lst .sub span + span::before { content: ""; display: inline-block; width: 1px; height: 9px; background: var(--line); margin: 0 7px; }
.rank-tabs { display: flex; border-bottom: 1px solid var(--line); }
.rank-tabs button { flex: 1; height: 38px; font-size: 14px; font-weight: 700; color: var(--muted); background: var(--soft); }
.rank-tabs button.on { color: var(--text); background: var(--card); box-shadow: inset 0 -2px 0 var(--blue); }
.rank-lst { display: grid; grid-template-columns: 1fr 1fr; }
.rank-lst li a { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line2); font-size: 14px; min-width: 0; }
.rank-lst li:nth-child(odd) a { border-right: 1px solid var(--line2); }
.rank-lst .num { color: var(--blue); font-weight: 800; flex: 0 0 22px; font-size: 13px; }
body.dark .rank-lst .num { color: #a6add1; }
.rank-lst .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-lst .ud { font-size: 11px; flex: 0 0 auto; }
.rank-lst .ud.up { color: #d31900; }
.rank-lst .ud.down { color: #2a5bd7; }
.rank-lst .ud.new { color: #ff7e00; font-weight: 700; }
.recent-posts li a { display: block; padding: 9px 12px; border-bottom: 1px solid var(--line2); }
.recent-posts .t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-posts .sub { font-size: 12px; color: var(--muted); }
.flex-gall-lst li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--line2); }
.flex-gall-lst .lt { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 15px; }
.flex-gall-lst .lt .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-gall-lst .lt strong { color: var(--blue); }
body.dark .flex-gall-lst .lt strong { color: #a6add1; }
.flex-gall-lst .ltsub { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.sch-type { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.sch-type button { height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; color: var(--text3); white-space: nowrap; }
.sch-type button.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }

/* ---------------- footer ---------------- */
.ft { background: var(--blue); color: #fff; text-align: center; padding: 14px 12px calc(18px + var(--safe-bottom)); font-size: 13px; }
.ft .lnks { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; }
.ft .lnks button, .ft .lnks a { color: #fff; padding: 2px 0; }
.ft .lnks > * + *::before { content: ""; display: inline-block; width: 1px; height: 10px; background: rgba(255,255,255,.4); margin: 0 10px; }
.ft .note { margin-top: 10px; font-size: 11px; color: rgba(255,255,255,.6); line-height: 1.5; }

/* ---------------- state / error ---------------- */
.state { padding: 50px 16px; text-align: center; color: var(--muted); background: var(--card); }
.state .spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state.err h3 { color: var(--red); font-size: 15px; margin-bottom: 6px; }
.state.err p { font-size: 13px; word-break: break-all; }
.state .btn-line { margin-top: 14px; }
.skel li { padding: 11px 12px; border-bottom: 1px solid var(--line2); }
.skel .b { height: 14px; background: var(--chip); border-radius: 3px; margin-bottom: 7px; width: 80%; animation: pulse 1.2s ease-in-out infinite; }
.skel .b.s { width: 45%; height: 10px; margin: 0; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------------- side menu / layers ---------------- */
.dim { position: fixed; inset: 0; background: var(--overlay); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.dim.on { opacity: 1; pointer-events: auto; }
.side { position: fixed; top: 0; bottom: 0; left: 0; width: min(82vw, 320px); background: var(--card); z-index: 61; transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
.side.on { transform: none; }
.side-hd { background: var(--blue-dk); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 14px 14px; }
.side-hd b { font-size: 17px; letter-spacing: -1px; }
.side-hd button { color: #fff; font-size: 22px; }
.side-sec { border-bottom: 6px solid var(--bg); }
.side-sec h4 { font-size: 13px; color: var(--muted); padding: 12px 14px 4px; font-weight: 700; }
.side-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; font-size: 15px; border-bottom: 1px solid var(--line2); text-align: left; }
.side-row .v { font-size: 13px; color: var(--muted); }
.switch { width: 44px; height: 26px; border-radius: 13px; background: #c5c7d5; position: relative; transition: background .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--blue); }
body.dark .switch.on { background: #5c5bb1; }
.switch.on::after { transform: translateX(18px); }

.sch-layer { position: absolute; left: 0; right: 0; top: calc(50px + var(--safe-top)); background: var(--card); z-index: 62; box-shadow: 0 8px 20px rgba(0,0,0,.18); max-height: 70vh; overflow-y: auto; display: none; border-top: 1px solid var(--line); }
.sch-layer.on { display: block; }
.sch-layer .direct { display: flex; align-items: center; gap: 6px; padding: 11px 12px; border-bottom: 1px solid var(--line2); font-size: 14px; color: var(--blue); width: 100%; text-align: left; }
body.dark .sch-layer .direct { color: #a6add1; }
.sch-layer .btm { display: flex; justify-content: flex-end; padding: 6px 8px; }
.sch-layer .btm button { font-size: 13px; color: var(--text3); padding: 6px 8px; }

/* floating buttons */
.fab { position: fixed; right: 12px; bottom: calc(14px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 30; transition: opacity .2s, transform .2s; }
.fab.hide { opacity: 0; transform: translateY(16px); pointer-events: none; }
.fab button { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.95); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.15); color: var(--blue); font-size: 18px; display: grid; place-items: center; }
body.dark .fab button { background: rgba(40,40,40,.95); color: #a6add1; }

/* pull to refresh */
#ptr { position: fixed; left: 50%; top: calc(var(--safe-top) - 44px); width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 10px rgba(0,0,0,.2); display: grid; place-items: center; z-index: 70; color: var(--blue); font-size: 18px; transition: transform .2s; pointer-events: none; }
#ptr.spin svg { animation: spin .8s linear infinite; }
body.dark #ptr { color: #a6add1; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(70px + var(--safe-bottom)); transform: translateX(-50%) translateY(10px); background: rgba(0,0,0,.8); color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 13px; z-index: 90; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
#toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------------- fullscreen image viewer ---------------- */
.viewer { position: fixed; inset: 0; background: #000; z-index: 80; display: none; flex-direction: column; touch-action: pan-x pan-y; }
.viewer.on { display: flex; }
.viewer .vw-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(8px + var(--safe-top)) 10px 8px; display: flex; align-items: center; justify-content: space-between; color: #fff; z-index: 2; background: linear-gradient(rgba(0,0,0,.6), transparent); transition: opacity .2s; }
.viewer.ui-off .vw-top { opacity: 0; pointer-events: none; }
.viewer .vw-top button, .viewer .vw-top a { color: #fff; font-size: 14px; padding: 8px 10px; }
.viewer .vw-top .close { font-size: 24px; line-height: 1; }
.viewer .vw-cnt { font-size: 15px; font-weight: 700; }
.vw-track { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vw-track::-webkit-scrollbar { display: none; }
.vw-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; overflow: auto; display: flex; align-items: center; justify-content: center; }
.vw-slide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; -webkit-user-select: none; user-select: none; -webkit-touch-callout: default; }
.vw-slide.zoom { display: block; }
.vw-slide.zoom img { max-width: none; max-height: none; width: 220%; }
.vw-slide .ld { color: #888; font-size: 13px; }

@media (min-width: 721px) {
  body { background: var(--bg); }
  .wrap { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------- skin hooks (neutral-only elements are hidden in the dc skin) ---------------- */
.vote, .av, .byline, .acts, .ginfo li.cm, .ch-icon, .ch-id, .logo .wm, .p-author, .reco-circle svg { display: none; }
.reco-circle em { font-style: normal; }
.side-sec h4 svg.i { vertical-align: -2px; margin-right: 2px; }
.skin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 14px 14px; }
.skin-opt { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; text-align: left; background: var(--card); min-width: 0; }
.skin-opt .sw { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.skin-opt .tx { display: flex; flex-direction: column; min-width: 0; }
.skin-opt b { font-size: 14px; }
.skin-opt small { font-size: 10.5px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin-opt.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
body.dark .skin-opt.on { border-color: #a6add1; box-shadow: inset 0 0 0 1px #a6add1; }
.pn-box .t { max-width: 100%; }
