/* Readable, compact community layout across desktop and mobile. */
:root {
  --max: 1480px;
  --sidebar: 180px;
  --right: 248px;
  --text: #303844;
  --muted: #697586;
  --accent: #4164bd;
  --line: #dce2ea;
  --line2: #edf0f5;
}
html { scroll-padding-top: 90px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif; font-size: 16px; letter-spacing: -.025em; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 12px 18px; background: #fff; color: var(--accent); border: 2px solid var(--accent); border-radius: 6px; z-index: 500; }
.skip-link:focus { top: 10px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
.topbar-inner { gap: 22px; }
.topnav { gap: 22px; font-size: 14px; white-space: nowrap; }
.global-search { width: 250px; height: 38px; flex-shrink: 0; }
.global-search input, .global-search button, .login-btn { font-size: 14px; }
.global-search button { width: 52px; }
.login-btn { height: 38px; padding: 0 12px; flex-shrink: 0; }
body .login-btn.logged-in { max-width: 215px; }
.page-shell { gap: 22px; }
.sidebar { max-height: calc(100dvh - 106px); overflow-y: auto; }
.side-label { font-size: 12px; color: #737f8e; }
.side-nav a, .side-group.minor a { min-height: 42px; height: auto; padding: 10px 12px; font-size: 14px; }
.community-head { gap: 16px; margin-bottom: 18px; }
.community-head h1 { font-size: 27px; letter-spacing: -.04em; }
.community-head p { font-size: 14px; line-height: 1.6; color: #697586; }
.eyebrow { font-size: 12px; }
.write-btn, .secondary-btn, .series-start-btn { font-size: 14px; padding: 10px 15px; min-height: 40px; border-radius: 6px; white-space: nowrap; }
.write-btn { background: var(--accent); border-color: var(--accent); }
.write-btn:hover { background: #3455a6; }
.secondary-btn { color: #566377; }
.secondary-btn:hover:not(:disabled) { background: #f2f5fa; border-color: #b6c3d8; }
.hot-item a { font-size: 14px; }
.hot-item .hot-kicker { font-size: 12px; }
.notice-strip { font-size: 14px; min-height: 44px; background: #f0f4fd; border-radius: 6px 6px 0 0; }
.board-box { border-top-color: #5b729b; border-radius: 0 0 6px 6px; overflow: hidden; }
.board-tools { min-height: 54px; height: auto; padding: 9px 12px; gap: 8px; }
.board-tabs button { font-size: 14px; min-height: 36px; padding: 7px 12px; }
.sort-tools { color: #737f8e; font-size: 12px; }
.sort-tools select { min-height: 34px; font-size: 14px; }
.post-row { grid-template-columns: 42px minmax(0,1fr) 110px 38px 44px 60px; min-height: 50px; gap: 6px; padding: 0 12px; }
.post-header { min-height: 38px; color: #758090; font-size: 12px; }
.post-title a { font-size: 15px; line-height: 1.6; color: #303844; }
.post-author, .post-meta, .post-no, .post-vote, .comment-count { font-size: 12px; }
.post-author, .post-meta, .post-no { color: #727d8d; }
.post-title .board-tag, .art-mini-tag { font-size: 11px; border-radius: 4px; padding: 2px 5px; }
.board-tag[data-category=error] { color: #256277; background: #eaf5f8; }
.board-tag[data-category=prompt] { color: #6b4ca2; background: #f3effa; }
.board-tag[data-category=pixel] { color: #a55c30; background: #fbf1e9; }
.board-tag[data-category=recruit] { color: #39725a; background: #edf6f0; }
.board-tag[data-category=notice] { color: #4162b2; background: #edf2fc; }
.board-footer { min-height: 66px; }
.pagination { flex-wrap: wrap; justify-content: center; padding: 10px 110px; }
.pagination button { width: 36px; height: 36px; font-size: 14px; }
.empty { padding: 44px 20px; color: #737f8e; font-size: 14px; line-height: 1.8; }
.empty .secondary-btn { margin-top: 14px; }
.list-recovery { padding: 0 20px 22px; text-align: center; }
.search-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line2); background: #f7f9fd; font-size: 14px; overflow-wrap: anywhere; }
.text-btn { background: transparent; border: 0; padding: 7px; font-size: 13px; color: var(--accent); white-space: nowrap; }
.rank-list a, .quick-links b, .right-title strong, .account-card>strong { font-size: 14px; }
.right-title { min-height: 46px; }
.right-title span { font-size: 11px; }
.rank-list li { min-height: 39px; }
.rank-empty { font-size: 13px; color: #737f8e; }
.quick-links span, .account-card p, .level-help, .profile-edit { font-size: 12px; color: #6c788a; }
.account-card { padding: 20px 16px; }
.account-card p { line-height: 1.7; }
.account-card>.write-btn { height: 40px; font-size: 14px; }
.level-help { width: 100%; text-align: center; padding: 6px 0 12px; }
.profile-edit { min-height: 30px; }
.level-badge, .operator-badge { font-size: 11px; }
.mini-title strong { font-size: 14px; }
.mini-panel a { font-size: 13px; padding: 5px 0; color: #647186; }
.mini-title span { font-size: 11px; }
.footer { font-size: 12px; color: #758090; gap: 14px; }
.series-showcase { margin-top: 24px; padding: 18px; scroll-margin-top: 90px; }
.series-head { gap: 12px; align-items: flex-start; }
.series-head h2 { font-size: 20px; }
.series-head p { font-size: 14px; color: #697586; line-height: 1.6; max-width: 510px; }
.series-card { padding: 15px 0; grid-template-columns: 100px minmax(0,1fr); }
.series-thumb { height: 82px; background: #edf2fa; }
.series-chip { font-size: 12px; color: #566b89; }
.series-card h3 { font-size: 16px; line-height: 1.5; }
.series-card p { font-size: 14px; color: #737f8e; line-height: 1.7; }
.series-card-foot { font-size: 12px; gap: 14px; flex-wrap: wrap; color: #737f8e; }
.support-status { display: flex; align-items: center; gap: 8px; padding: 12px 14px; margin: 14px 0 0; border: 1px solid #e3e8f0; border-radius: 6px; background: #f7f9fc; color: #697586; font-size: 14px; line-height: 1.7; }
.status-label { flex-shrink: 0; padding: 1px 6px; border-radius: 4px; background: #e9edf4; color: #657289; font-size: 12px; font-weight: 600; }
.series-cover { height: 88px; background: linear-gradient(125deg, #4466bd, #708aca); }
.series-modal { width: min(780px,100%); max-height: 90dvh; }
.series-modal-body { padding: 26px; }
.series-meta { font-size: 13px; line-height: 1.6; }
.series-modal-body h2 { font-size: 26px; line-height: 1.5; overflow-wrap: anywhere; }
.series-summary { font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.series-stats { font-size: 14px; margin: 18px 0; }
.series-actions { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.episode-title { font-size: 16px; margin-top: 24px; padding-top: 18px; }
.episode { grid-template-columns: 45px minmax(0,1fr) auto; gap: 10px; padding: 14px 0; }
.episode a { font-size: 15px; overflow-wrap: anywhere; }
.episode-no, .episode span { font-size: 12px; }
.episode-navigation { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 26px; border-top: 1px solid var(--line); }
#episodePosition { font-size: 13px; color: #758090; }
.episode-support { padding: 0 26px 24px; }
.episode-support .support-status { margin: 0; }
.modal-backdrop { padding: 24px; overscroll-behavior: contain; }
.modal, .post-modal, body .auth-modal, .age-gate-card { max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; border-radius: 10px; }
.modal { padding: 26px; }
.modal-head h2 { font-size: 21px; }
.close-btn { width: 38px; height: 38px; font-size: 27px; line-height: 1; border-radius: 5px; }
.close-btn:hover { background: #f0f3f7; }
.series-close:hover { background: #ffffff20; }
.modal label, body .auth-form label { font-size: 14px; color: #59677b; margin-top: 16px; }
.modal input, .modal select, .modal textarea, body .auth-form input { font-size: 16px; padding: 11px 12px; line-height: 1.5; }
.modal input, .modal select, body .auth-form input { min-height: 44px; height: auto; }
.modal textarea { min-height: 130px; }
.modal-actions { gap: 8px; margin-top: 22px; }
.post-view-head { padding: 26px; }
.post-view-head>span, .post-view-meta { font-size: 13px; color: #737f8e; line-height: 1.7; }
.post-view-head h2 { font-size: 25px; margin-right: 34px; overflow-wrap: anywhere; }
.post-view-body { font-size: 16px; line-height: 1.9; padding: 30px 26px; min-height: 180px; }
.post-actions { flex-wrap: wrap; gap: 8px; padding: 14px; }
.post-actions button { font-size: 14px; min-height: 40px; }
.comments-section { padding: 24px 26px; }
.comments-section h3 { font-size: 16px; }
.comment-head { font-size: 14px; flex-wrap: wrap; gap: 8px; }
.comment-head time { font-size: 12px; }
.comment p, #commentBody { font-size: 16px; line-height: 1.8; }
.comment-compose-footer { gap: 8px; flex-wrap: wrap; }
.emoji-picker button { min-width: 34px; min-height: 38px; }
.profile-form p, .info-body { font-size: 15px; }
.profile-rule, .support-field-hint, .series-policy-box { font-size: 14px!important; }
.series-policy-box { padding: 14px; }
.series-policy-box b { font-size: 15px; }
.support-copy { font-size: 16px; }
.channel-subtabs button { font-size: 14px!important; min-height: 36px; }
.art-write-hint { font-size: 12px; }
body .auth-modal { padding: 26px; width: min(450px,100%); }
body .auth-tabs button { font-size: 14px; min-height: 38px; }
body .auth-submit { font-size: 15px; padding: 12px; }
body .auth-help { font-size: 13px; color: #737f8e; }
body .auth-message { font-size: 14px; line-height: 1.6; }
body .auth-divider { font-size: 12px; margin: 18px 0 10px; }
body .google-login-loading, body #googleLoginRetry { font-size: 14px; line-height: 1.6; height: auto; min-height: 44px; padding: 8px 12px; }
.age-gate-card h2 { font-size: 21px; }
.age-gate-card p, .age-gate-rules { font-size: 14px; line-height: 1.8; }
.age-gate-confirm { font-size: 14px; min-height: 40px; }
@media (min-width: 1051px) and (max-width: 1280px) {
  :root { --sidebar: 160px; --right: 220px; }
  .page-shell { gap: 16px; }
  .topbar-inner { gap: 16px; }
  .topnav { gap: 16px; }
  .global-search { width: 205px; }
  .post-row { grid-template-columns: 34px minmax(0,1fr) 88px 34px 38px 54px; }
}
@media (max-width: 1050px) {
  .topnav { display: none; }
  .page-shell { grid-template-columns: 166px minmax(0,1fr); gap: 18px; }
  .global-search { width: min(38vw,300px); }
}
@media (max-width: 760px) {
  .page-shell { grid-template-columns: 142px minmax(0,1fr); gap: 14px; }
  .post-row { grid-template-columns: minmax(0,1fr) auto auto; gap: 7px; padding: 12px; }
  .post-header, .post-row>.post-no { display: none; }
  .post-row>.post-title { grid-column: 1/-1; }
  .post-title { align-items: baseline; }
  .post-title a { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
  .post-row>.post-author { display: block!important; grid-column: 1; grid-row: 2; font-size: 12px; }
  .post-row>.post-vote { display: block!important; grid-column: 2; grid-row: 2; font-size: 12px; text-align: right; }
  .post-vote:before { content: '추천 '; font-weight: 400; color: #758090; }
  .post-row>.post-meta:nth-child(5) { display: none!important; }
  .post-row>.post-meta:nth-child(6) { display: block!important; grid-column: 3; grid-row: 2; font-size: 12px; }
  .board-tag { display: inline-block; }
  .series-head p { display: block; font-size: 13px; }
  .series-card { grid-template-columns: 78px minmax(0,1fr); }
  .series-card h3 { font-size: 15px; }
  .series-card-foot { gap: 8px; font-size: 12px; }
  .pagination { padding: 12px; }
  .board-footer>.write-btn { display: none; }
  .bottom-panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 118px; }
  .topbar { height: 108px; }
  .topbar-inner { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; grid-template-rows: 46px 38px; gap: 4px 8px; padding: 8px 0; width: calc(100% - 24px); }
  .brand strong { font-size: 19px; }
  .global-search { grid-row: 2; grid-column: 1/-1; width: 100%; margin: 0; height: 38px; }
  .global-search input { font-size: 16px; border-radius: 6px 0 0 6px; border-right: 0; padding: 0 12px; }
  .global-search button { display: block; border-radius: 0 6px 6px 0; }
  .login-btn { font-size: 12px; max-width: 145px!important; height: 36px; padding: 0 10px; }
  .page-shell { display: block; width: calc(100% - 24px); margin-top: 20px; }
  .sidebar { top: 108px; width: 230px; max-height: calc(100dvh - 108px); padding: 12px; }
  .side-nav a { min-height: 46px; }
  .overlay { inset: 108px 0 0; }
  .community-head { margin-bottom: 16px; }
  .community-head h1 { font-size: 25px; }
  .community-head .write-btn { padding: 8px 12px; }
  .notice-strip { font-size: 13px; padding: 10px 12px; }
  .board-tools { padding: 8px; }
  .board-tabs button { padding: 6px 10px; font-size: 13px; }
  .sort-tools select { font-size: 13px; }
  .series-showcase { padding: 14px; scroll-margin-top: 120px; }
  .series-head h2 { font-size: 18px; }
  .series-head p { display: none; }
  .series-start-btn { font-size: 13px; padding: 8px 10px; }
  .series-card p { font-size: 13px; }
  .series-card-foot b { display: none; }
  .support-status { font-size: 13px; padding: 10px 11px; }
  .mini-panel a { font-size: 13px; }
  .search-summary { align-items: flex-start; font-size: 13px; }
  .modal-backdrop { padding: 10px; }
  .modal, .post-modal, body .auth-modal, .age-gate-card { max-height: calc(100dvh - 20px); }
  .modal, body .auth-modal { padding: 20px; }
  .post-view-head, .post-view-body, .comments-section, .series-modal-body { padding: 20px; }
  .post-view-head h2, .series-modal-body h2 { font-size: 22px; }
  .post-view-meta { font-size: 12px; }
  .episode { grid-template-columns: 32px minmax(0,1fr); gap: 8px; }
  .episode span { grid-column: 2; }
  .episode-navigation { padding: 18px 20px; }
  .episode-support { padding: 0 20px 20px; }
  .series-cover { height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto!important; transition: none!important; animation: none!important; }
}

/* Show the first published series photo as its cover. */
.series-thumb.has-image{padding:0;overflow:hidden;background:#edf2fa}
.series-thumb-image,.series-cover img{display:block;width:100%;height:100%;object-fit:cover}
.series-cover{overflow:hidden}

.side-nav a > .nav-brand-icon { width:22px; height:22px; flex:none; display:block; object-fit:contain; }
.quick-links .quick-brand-icon { width:17px; height:17px; display:inline-block; vertical-align:-3px; margin-right:6px; object-fit:contain; }
#addEpisodeButton.write-btn { background:#4264c4; border:1px solid #4264c4; color:#fff; opacity:1; }
#addEpisodeButton.write-btn:hover { background:#3455a6; border-color:#3455a6; }

/* Regular posts, then notice and HOT stories. */
.board-box{border-radius:6px;border-top:1px solid var(--line)}
.notice-strip{margin-top:18px;border:1px solid var(--line);border-radius:6px}
#hotStrip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 22px}
#hotStrip[hidden]{display:none}
.hot-section-head{grid-column:1/-1;display:flex;align-items:center;gap:9px;font-size:14px}
.hot-section-head strong,.hot-kicker b{color:#d84c35}
.hot-item{background:#fff;border:1px solid var(--line);border-radius:6px;padding:12px;min-width:0}
.hot-kicker{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:7px}
.hot-kicker span{font-size:11px;color:var(--muted)}
.hot-item a{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.hot-empty{grid-column:1/-1;margin:0;padding:14px;background:#fff;border:1px solid var(--line);border-radius:6px;font-size:13px;color:var(--muted)}
@media(max-width:760px){#hotStrip{grid-template-columns:1fr}.hot-item{padding:11px 12px}}

/* Coupang sidebar banner below the popular posts. */
.sidebar-ad{padding:10px 8px 12px}
.sidebar-ad-slot{display:flex;justify-content:center;width:100%;min-width:0;min-height:600px}
.sidebar-ad-slot iframe{display:block;flex:0 0 200px;width:200px;height:600px;border:0}

/* Keep the single Coupang banner available when the desktop rail collapses. */
@media (max-width:1050px){
  .rightbar{display:flex;position:static;grid-column:2;width:220px;max-width:100%;margin:20px auto 0}
  .rightbar>.right-card:not(.sidebar-ad){display:none}
  .rightbar>.sidebar-ad{width:100%}
}

/* All three ranked stories remain visible in the stacked mobile section. */
#hotStrip .hot-item{display:block}
