/* ikunoku.com — single stylesheet. Japanese portal layout (header info strip, sticky global nav,
   boxed sections, right rail). Local assets only (CSP), system Japanese fonts, no build step. */
:root {
  color-scheme: light;
  --bg: #f0f0f0;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --ink: #222222;
  --ink-soft: #595959;
  --line: #dddddd;
  --line-soft: #e8e8e8;
  --link: #0b4ea2;
  --link-visited: #5b3a9e;
  --brand: #8e1b1b;          /* 臙脂（えんじ） */
  --brand-dark: #6d1414;
  --accent: #e8820c;         /* 橙のアクセント線 */
  --focus: #1a73e8;
  --ikuno: #a82020;  --ikuno-hi: #c8463a;  --ikuno-soft: #fdeceb;
  --osaka: #9c4209;  --osaka-hi: #b45309;  --osaka-soft: #fdf0e3;
  --japan: #24467f;  --japan-hi: #3a64a8;  --japan-soft: #e9eff9;
  --hot:   #9c4209;  --hot-hi:   #c25400;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 56px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.6;
  word-break: normal; overflow-wrap: anywhere; line-break: strict;
}
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.main-col:focus { outline: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--link); padding: 8px 12px; z-index: 100; border: 2px solid var(--focus); }
.skip-link:focus { left: 8px; top: 8px; }

/* ============================================================ header */
.site-header { background: var(--surface); }
.utility-bar { background: var(--surface-alt); border-bottom: 1px solid var(--line); font-size: 12px; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 30px; }
.utility-tagline { margin: 0; color: var(--ink-soft); }
.utility-links { display: flex; align-items: center; gap: 4px 14px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.utility-links a, .utility-links a:visited { color: var(--link); }
.nav-user { color: var(--ink); font-weight: 700; }
.nav-cta, .nav-cta:visited { color: #fff !important; background: var(--brand); padding: 2px 10px; border-radius: 2px; }
.nav-cta:hover { background: var(--brand-dark); text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

.header-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 10px; padding-bottom: 10px; }
.site-logo, .site-logo:visited { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.site-logo:hover { text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 4px; background: linear-gradient(135deg, var(--ikuno-hi), var(--brand)); color: #fff; font-weight: 700; font-size: 26px; font-family: var(--font-serif); }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text strong { font-size: 24px; letter-spacing: .06em; color: var(--brand); }
.logo-domain { font-size: 12px; letter-spacing: 0; color: var(--ink-soft); font-weight: 400; margin-left: 8px; }
.logo-text small { font-size: 12px; color: var(--ink-soft); }

/* compact info strip: date / weather / sunrise-sunset */
.info-strip { display: flex; flex-wrap: wrap; border: 1px solid var(--line); background: var(--surface-alt); font-size: 12px; }
.info-item { display: flex; flex-direction: column; justify-content: center; padding: 4px 12px; min-width: 0; line-height: 1.45; }
.info-item + .info-item { border-left: 1px solid var(--line); }
.info-label { font-size: 11px; color: var(--ink-soft); }
.info-value { font-size: 13px; }
.info-date .info-value { font-size: 14px; font-weight: 700; color: var(--brand); }
.info-sub { color: var(--ink-soft); }
.temp-now { font-weight: 700; font-size: 15px; margin-left: 4px; }
.temp-max { color: #b3261e; }
.temp-min { color: #1f57a8; }
.weather-emoji { font-size: 15px; }
.info-weather.is-unavailable .info-value { color: var(--ink-soft); }

/* ============================================================ global nav (sticky) */
.global-nav { position: sticky; top: 0; z-index: 50; background: linear-gradient(#a32323, var(--brand-dark)); border-bottom: 3px solid var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.global-nav .wrap { padding: 0 16px; }
@media (max-width: 959.98px) { .global-nav .wrap { padding: 0; } }
.global-nav-list { display: flex; list-style: none; margin: 0; padding: 0; }
.global-nav-list li { flex: 1 1 auto; }
.global-nav-list a, .global-nav-list a:visited { display: block; color: #fff; font-weight: 700; font-size: 14px; text-align: center; padding: 10px 14px; border-right: 1px solid rgba(255, 255, 255, .18); white-space: nowrap; }
.global-nav-list li:first-child a { border-left: 1px solid rgba(255, 255, 255, .18); }
.global-nav-list a:hover { background: rgba(0, 0, 0, .22); text-decoration: none; }
.global-nav-list a.is-active { background: #fff; color: var(--brand); }
.global-nav-list a:focus-visible { outline-color: #ffd166; outline-offset: -3px; }

/* ============================================================ page layout */
.page { padding-top: 12px; padding-bottom: 28px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

.breadcrumb { font-size: 12px; margin: 0 0 10px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { color: var(--ink-soft); }
.breadcrumb li + li::before { content: "›"; content: "›" / ""; margin: 0 8px; color: #999; }
.breadcrumb li[aria-current] { color: var(--ink); max-width: 36em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================ boxes (sections) */
.box { background: var(--surface); border: 1px solid var(--line); margin: 0 0 16px; }
.box-head { --c: var(--brand); --c-hi: #b03030;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 6px 12px;
  background: linear-gradient(90deg, var(--c-hi), var(--c)); color: #fff; border-bottom: 2px solid var(--accent); }
.box-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.box-sub { font-size: 12px; color: #fff; }
.box-more, .box-more:visited { margin-left: auto; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; padding: 2px 0; }
.box-ikuno > .box-head { --c: var(--ikuno); --c-hi: var(--ikuno-hi); }
.box-osaka > .box-head { --c: var(--osaka); --c-hi: var(--osaka-hi); }
.box-japan > .box-head { --c: var(--japan); --c-hi: var(--japan-hi); border-bottom-color: #6f95cf; }
.box-hot > .box-head   { --c: var(--hot); --c-hi: var(--hot-hi); }
.box-inner { padding: 12px; }
.box-foot { margin: 0; padding: 6px 12px 10px; text-align: right; font-size: 13px; }
.box:target .box-foot { display: none; }
.empty { color: var(--ink-soft); background: var(--surface-alt); border: 1px dashed var(--line); padding: 14px; margin: 12px; }

/* 新着/人気 tabs — CSS-only (radio + label), works without JS; without CSS both lists show */
.tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 4px; padding: 8px 12px 0; }
.tab-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tab { order: 0; display: inline-block; padding: 5px 18px; min-height: 32px; font-size: 13px; font-weight: 700; color: var(--ink-soft); background: #ececec; border: 1px solid var(--line); border-bottom: 0; cursor: pointer; user-select: none; }
.tab:hover { color: var(--ink); background: #f5f5f5; }
.tab-radio:checked + .tab { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: inset 0 3px 0 var(--accent); }
.box-ikuno .tab-radio:checked + .tab { box-shadow: inset 0 3px 0 var(--ikuno); }
.box-osaka .tab-radio:checked + .tab { box-shadow: inset 0 3px 0 var(--osaka); }
.box-japan .tab-radio:checked + .tab { box-shadow: inset 0 3px 0 var(--japan); }
.tab-radio:focus-visible + .tab { outline: 3px solid var(--focus); outline-offset: 1px; }
.panel { order: 1; flex: 0 0 100%; display: none; border-top: 1px solid var(--line); }
.tab-radio:nth-of-type(1):checked ~ .panel-1,
.tab-radio:nth-of-type(2):checked ~ .panel-2 { display: block; }

/* list rows */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dotted #c8c8c8; }
.news-row:last-child { border-bottom: 0; }
.news-row.is-extra { display: none; }
.box:target .news-row.is-extra { display: flex; }
.news-row.is-hidden, .featured.is-hidden, .article.is-hidden, .comment.is-hidden { opacity: .65; }
.news-thumb { flex: 0 0 96px; }
.news-body { flex: 1 1 auto; min-width: 0; }
.news-title { font-size: 15px; font-weight: 700; margin: 0 0 2px; line-height: 1.45; }
.news-summary { margin: 0; font-size: 13px; color: #444; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 3px 0 0; font-size: 12px; color: var(--ink-soft); }
.news-meta .stats { display: inline-flex; gap: 8px; }
.news-meta .stats a, .news-meta .stats a:visited { color: var(--ink-soft); }
.source { color: var(--ink-soft); }

/* thumbnails + local placeholder tiles (category-colored SVG) */
.thumb { position: relative; display: block; width: 96px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line-soft);
  background: #999 center / cover no-repeat; }
.thumb-lg { width: 100%; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.thumb img.is-broken, .article-image img.is-broken { display: none; }   /* site.js marks images that fail to load; the tile shows through */
.ph-ikuno { background-color: var(--ikuno); background-image: url("../img/placeholder-ikuno.svg"); }
.ph-osaka { background-color: var(--osaka); background-image: url("../img/placeholder-osaka.svg"); }
.ph-japan { background-color: var(--japan); background-image: url("../img/placeholder-japan.svg"); }
.ph-label { position: absolute; left: 6px; bottom: 3px; color: #fff; font-weight: 700; font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.thumb-lg .ph-label { left: 12px; bottom: 8px; font-size: 22px; letter-spacing: .1em; }

/* category chips + badges */
.chip { display: inline-block; font-size: 11px; line-height: 1.6; padding: 0 6px; border-radius: 2px; color: #fff; background: #666; white-space: nowrap; font-weight: 700; }
.chip-ikuno { background: var(--ikuno); }
.chip-osaka { background: var(--osaka); }
.chip-japan { background: var(--japan); }
.badge { display: inline-block; font-size: 11px; line-height: 1.6; padding: 0 6px; border-radius: 2px; border: 1px solid currentColor; white-space: nowrap; }
.badge-digest { color: var(--ink-soft); }
.badge-hidden { color: #6b5400; background: #fff6cc; border-color: #e5cf6a; }
.badge-admin { color: var(--brand); margin-left: 4px; }

/* rank badges: 1 red, 2 vermilion, 3 orange-brown, others grey */
.rank-badge { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 4px; margin-right: 6px; border-radius: 2px; background: #6b6b6b; color: #fff; font-weight: 700; font-size: 12px; line-height: 1; vertical-align: 2px; }
.rank-badge.rank-1 { background: #c4001a; }
.rank-badge.rank-2 { background: #c43e00; }
.rank-badge.rank-3 { background: #a65200; }

/* top news (featured) */
.box-top > .box-head { --c: var(--brand); --c-hi: #b03030; }
.featured { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px; }
@media (min-width: 640px) { .featured { grid-template-columns: 56% 1fr; } }
.featured-title { font-size: 20px; line-height: 1.45; margin: 4px 0 6px; }
.featured-summary { font-size: 14px; color: #333; margin-bottom: 8px; }
.featured-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-soft); margin: 0; }
.featured-stats a, .featured-stats a:visited { color: var(--ink-soft); }
.featured-stats .featured-more, .featured-stats .featured-more:visited { color: var(--link); font-weight: 700; margin-left: auto; }
.headline-list { list-style: none; margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px 20px; }
@media (min-width: 640px) { .headline-list { grid-template-columns: 1fr 1fr; } }
.headline-list li { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; border-bottom: 1px dotted #d6d6d6; min-width: 0; }
.headline-list a { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hl-count { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }

/* ============================================================ right rail widgets */
.side-rail { min-width: 0; }
.widget { background: var(--surface); border: 1px solid var(--line); margin: 0 0 16px; }
.widget-title { --c: var(--brand); --c-hi: #b03030;
  margin: 0; padding: 6px 10px; font-size: 14px; color: #fff; letter-spacing: .04em;
  background: linear-gradient(90deg, var(--c-hi), var(--c)); border-bottom: 2px solid var(--accent); }
.widget-ranking .widget-title { --c: var(--ikuno); --c-hi: var(--ikuno-hi); }
.widget-proverb .widget-title { --c: var(--osaka); --c-hi: var(--osaka-hi); }
.widget-kanji .widget-title { --c: #6d1414; --c-hi: #8e1b1b; }
.widget-comments .widget-title { --c: var(--japan); --c-hi: var(--japan-hi); border-bottom-color: #6f95cf; }
.widget-links .widget-title { --c: #3d3d3d; --c-hi: #555; border-bottom-color: #999; }
.widget-join .widget-title { --c: var(--hot); --c-hi: var(--hot-hi); }
.widget-body { padding: 10px; font-size: 13px; }
.widget-body > :last-child { margin-bottom: 0; }
.widget-empty { color: var(--ink-soft); margin: 0; }
.widget-more { text-align: right; font-size: 12px; margin: 6px 0 0; }
.widget-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item { display: flex; align-items: flex-start; gap: 2px; padding: 7px 0; border-bottom: 1px dotted #c8c8c8; }
.rank-item:first-child { padding-top: 0; }
.rank-body { min-width: 0; display: flex; flex-direction: column; }
.rank-title { font-weight: 700; line-height: 1.45; }
.rank-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.widget-proverb .proverb-text { font-family: var(--font-serif); font-size: 19px; font-weight: 700; margin: 0; line-height: 1.5; color: var(--ink); }
.widget-proverb .reading { color: var(--ink-soft); font-size: 12px; margin: 0 0 6px; }
.proverb-meaning { margin: 0; }
.mini-label { display: inline-block; font-size: 11px; color: #fff; background: var(--osaka); padding: 0 5px; margin-right: 6px; border-radius: 2px; }

.kanji-body { display: flex; gap: 12px; align-items: flex-start; }
.kanji-char { flex: 0 0 auto; display: grid; place-items: center; width: 84px; height: 84px; font-size: 60px; line-height: 1; font-weight: 700; color: var(--ink); font-family: var(--font-serif);
  border: 2px solid var(--brand); background:
    linear-gradient(90deg, transparent calc(50% - .5px), #f2c4c4 calc(50% - .5px), #f2c4c4 calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(0deg, transparent calc(50% - .5px), #f2c4c4 calc(50% - .5px), #f2c4c4 calc(50% + .5px), transparent calc(50% + .5px)),
    #fffdf8; }
.kanji-info { margin: 0; min-width: 0; line-height: 1.5; }
.kanji-info div { display: flex; gap: 6px; }
.kanji-info dt { flex: 0 0 auto; font-size: 11px; color: var(--ink-soft); min-width: 3.4em; padding-top: 1px; }
.kanji-info dd { margin: 0; }

.recent-comments { list-style: none; margin: 0; padding: 0; }
.recent-comments li { padding: 7px 0; border-bottom: 1px dotted #c8c8c8; }
.recent-comments li:first-child { padding-top: 0; }
.rc-link { display: block; }
.rc-body { display: block; color: var(--ink); }
.rc-link:hover .rc-body { text-decoration: underline; }
.rc-article { display: block; font-size: 12px; font-weight: 700; }
.rc-meta { display: block; font-size: 11px; color: var(--ink-soft); }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 5px 0 5px 14px; border-bottom: 1px dotted #c8c8c8; position: relative; }
.link-list li:last-child { border-bottom: 0; }
.link-list li::before { content: ""; content: "" / ""; position: absolute; left: 2px; top: 12px; border: 4px solid transparent; border-left-color: var(--brand); }
.link-list a { font-weight: 700; }
.link-list small { display: block; color: var(--ink-soft); font-size: 11px; }
.ext { font-size: 11px; margin-left: 2px; }

/* ============================================================ buttons & forms */
.btn, .btn:visited { display: inline-block; border-radius: 3px; padding: 8px 18px; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; min-height: 40px; line-height: 22px; text-align: center; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: 5px 12px; min-height: 34px; font-size: 13px; }
.btn-primary, .btn-primary:visited { background: linear-gradient(var(--ikuno-hi), var(--brand)); border-color: var(--brand-dark); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost, .btn-ghost:visited { background: linear-gradient(#fff, #efefef); border-color: #bbb; color: var(--ink); }
.btn-ghost:hover { background: #e9e9e9; }
.btn-block { display: block; width: 100%; }
.vote-form { display: inline; margin: 0; }
.vote-btn, .vote-btn:visited { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 3px; border: 1px solid #bbb; background: linear-gradient(#fff, #f0f0f0); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; min-height: 34px; }
.vote-btn:hover { border-color: var(--ikuno); text-decoration: none; }
.vote-btn.is-on { background: var(--ikuno-soft); border-color: var(--ikuno); color: var(--ikuno); font-weight: 700; }
.vote-btn[disabled] { opacity: .6; cursor: progress; }
.vote-count { font-variant-numeric: tabular-nums; font-weight: 700; }
.admin-btn { font: inherit; font-size: 12px; padding: 2px 10px; border-radius: 3px; border: 1px solid #c9a227; background: #fffbea; color: #6b5400; cursor: pointer; }
.admin-bar { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

textarea, input[type="text"], input[type="password"] {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid #b5b5b5; border-radius: 3px; padding: 8px 10px; }
textarea { resize: vertical; min-height: 4.5em; }
textarea:focus, input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(26, 115, 232, .25); }
.form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.form-hint, .field-hint { color: var(--ink-soft); font-size: 12px; }
.form-error, .form-errors { color: #a1260d; background: #fdecea; border: 1px solid #f3b9ae; border-left: 4px solid #c62828; padding: 8px 12px; margin: 0 0 12px; }
.form-errors { padding-left: 28px; }
.notice { font-size: 12px; color: #5c4a00; background: #fff8e1; border: 1px solid #f0d58a; padding: 8px 10px; margin: 10px 0 0; }

.auth-card { max-width: 520px; }
.auth-card > h1 { margin: 0; padding: 7px 14px; font-size: 16px; color: #fff; background: linear-gradient(90deg, #b03030, var(--brand)); border-bottom: 2px solid var(--accent); }
.auth-card > :not(h1) { margin-left: 16px; margin-right: 16px; }
.auth-card > .form-error, .auth-card > .form-errors, .auth-card > .lead, .auth-card > p:first-of-type { margin-top: 14px; }
.lead { color: var(--ink-soft); font-size: 13px; }
.stack-form { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.stack-form label { font-weight: 700; font-size: 13px; margin-top: 10px; }
.stack-form .btn { margin-top: 14px; }
.auth-switch { text-align: center; font-size: 13px; margin: 14px 16px 16px; padding-top: 12px; border-top: 1px dotted var(--line); }

/* ============================================================ article page */
.article { padding: 0 0 16px; border-top: 4px solid var(--brand); }
.article.box-ikuno { border-top-color: var(--ikuno); }
.article.box-osaka { border-top-color: var(--osaka); }
.article.box-japan { border-top-color: var(--japan); }
.article-header { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; background: var(--surface-alt); }
.article-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.article-title { font-size: 22px; line-height: 1.45; margin-bottom: 6px; }
@media (min-width: 720px) { .article-title { font-size: 24px; } }
.article-meta { color: var(--ink-soft); font-size: 12px; margin: 0; }
.article > :not(.article-header) { margin-left: 16px; margin-right: 16px; }
@media (min-width: 720px) { .article > :not(.article-header) { margin-left: 28px; margin-right: 28px; } }
.article-image { margin-top: 0; margin-bottom: 14px; }
.article-image img { width: 100%; max-height: 440px; object-fit: cover; border: 1px solid var(--line); }
.article-summary { font-weight: 700; font-size: 15px; background: var(--surface-alt); border-left: 4px solid var(--accent); padding: 8px 12px; }
.article-body { font-size: 15px; line-height: 1.9; max-width: 42em; }
.article-body h3 { font-size: 17px; margin-top: 1.5em; padding: 2px 0 2px 10px; border-left: 4px solid var(--brand); }
.article-body h4 { font-size: 15px; margin-top: 1.2em; }
.article-body blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--line); color: var(--ink-soft); background: var(--surface-alt); }
.article-source { font-size: 13px; margin-top: 18px; padding-top: 10px; border-top: 1px dotted var(--line); }
.article-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.article-actions .vote-btn { font-size: 14px; padding: 6px 18px; min-height: 42px; }

/* ============================================================ comments */
.comments .count { font-size: 13px; font-weight: 400; color: #fff; }
.top-comment { background: #fff8e1; border: 1px solid #f0c36d; border-left: 4px solid var(--accent); padding: 10px 12px; margin-bottom: 14px; }
.top-comment-title { font-size: 13px; margin: 0 0 4px; color: #8a4b00; }
.top-comment-body { font-size: 14px; margin: 0 0 6px; white-space: pre-wrap; }
.top-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--ink-soft); margin: 0; }
.top-comment-meta a { margin-left: auto; font-weight: 700; }
.comment-form { background: var(--surface-alt); border: 1px solid var(--line); padding: 10px; margin-bottom: 14px; }
.login-prompt { background: var(--surface-alt); border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 14px; }
.login-prompt p { margin: 0 0 8px; }
.login-prompt p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.comment-list, .replies { list-style: none; margin: 0; padding: 0; }
.comment { border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.comment-list > .comment:last-child { border-bottom: 0; }
.comment:target { background: #fffbe6; box-shadow: -8px 0 0 #fffbe6, 8px 0 0 #fffbe6; }
.replies { margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line); }
@media (min-width: 720px) { .replies { margin-left: 34px; } }
.comment.is-reply { border-bottom: 0; padding: 6px 0 4px; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; }
.comment-author { font-size: 13px; }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ikuno-soft); color: var(--ikuno); font-weight: 700; font-size: 12px; border: 1px solid #f2c4c4; }
.comment-time, .comment-time:visited { color: var(--ink-soft); font-size: 12px; }
.comment-body { margin: 4px 0 6px; white-space: pre-wrap; font-size: 14px; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.reply-box { margin-top: 6px; }
.reply-box summary { cursor: pointer; color: var(--link); font-size: 12px; font-weight: 700; list-style: none; padding: 4px 0; min-height: 28px; }
.reply-box summary::-webkit-details-marker { display: none; }
.reply-box summary::before { content: "▶ "; content: "▶ " / ""; font-size: 10px; }
.reply-box[open] summary::before { content: "▼ "; content: "▼ " / ""; }
.reply-box .comment-form { margin: 6px 0 0; }

/* ============================================================ prose / error */
.page-title { margin: 0; padding: 8px 14px; font-size: 18px; color: #fff; background: linear-gradient(90deg, #b03030, var(--brand)); border-bottom: 2px solid var(--accent); }
.prose .box-inner { padding: 14px 18px 18px; font-size: 14px; line-height: 1.85; }
.prose h2 { font-size: 16px; margin: 1.6em 0 .6em; padding: 5px 10px; background: var(--surface-alt); border-left: 5px solid var(--brand); border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 15px; margin: 1.2em 0 .4em; padding-bottom: 3px; border-bottom: 1px dotted var(--brand); }
.prose ul { padding-left: 1.4em; }
.toc { background: var(--surface-alt); border: 1px solid var(--line); padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.toc ul { margin: 0; padding-left: 1.2em; columns: 2 14em; }
.error-page { text-align: center; padding: 32px 16px; }
.error-code { font-size: 56px; font-weight: 700; color: var(--brand); margin: 0; line-height: 1; }

/* ============================================================ footer */
.site-footer { margin-top: 8px; color: #ddd; font-size: 13px; background: #333; }
.pagetop-bar { background: var(--bg); border-top: 1px solid var(--line); }
.pagetop-bar .wrap { text-align: right; }
.pagetop, .pagetop:visited { display: inline-block; padding: 6px 14px; font-size: 12px; background: #555; color: #fff; }
.pagetop:hover { background: #333; text-decoration: none; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding-top: 20px; padding-bottom: 20px; }
@media (min-width: 720px) { .footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-col h2 { font-size: 13px; color: #fff; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid #5a5a5a; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 3px 0; }
.footer-col a, .footer-col a:visited { color: #ddd; }
.footer-col a:hover { color: #fff; }
.footer-bottom { background: #222; padding: 10px 0; text-align: center; font-size: 12px; color: #bbb; }
.footer-bottom p { margin: 2px 0; }
.footer-note { font-size: 11px; }

/* ============================================================ narrow screens (< 960px) */
@media (max-width: 959.98px) {
  .utility-tagline { display: none; }
  .header-main { padding-top: 8px; padding-bottom: 8px; }
  .info-strip { width: 100%; }
  .info-item { flex: 1 1 auto; }
  /* global nav → horizontally scrollable chip bar */
  .global-nav-list { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: thin; gap: 6px; padding: 7px 12px; }
  .global-nav-list li { flex: 0 0 auto; scroll-snap-align: start; }
  .global-nav-list a, .global-nav-list a:visited, .global-nav-list li:first-child a { border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: 7px 16px; min-height: 40px; line-height: 24px; font-size: 14px; background: rgba(255, 255, 255, .08); }
  .global-nav-list li a.is-active, .global-nav-list li:first-child a.is-active { background: #fff; color: var(--brand); border-color: #fff; }
  .side-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 16px; }
}
@media (max-width: 600px) {
  .logo-mark { width: 40px; height: 40px; font-size: 22px; }
  .logo-text strong { font-size: 20px; }
  .info-item { padding: 4px 8px; }
  .info-item + .info-item { border-left: 0; border-top: 1px solid var(--line); }
  .info-strip { flex-direction: column; }
  .info-item { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .news-thumb { flex-basis: 80px; }
  .thumb { width: 80px; }
  .thumb-lg { width: 100%; }
  .news-title { font-size: 15px; }
  .box-head { padding: 6px 10px; }
  .tab { padding: 6px 16px; min-height: 36px; }
  .breadcrumb li[aria-current] { max-width: 16em; }
}
@media print {
  .global-nav, .side-rail, .utility-bar, .pagetop-bar, .comment-form, .reply-box { display: none; }
  .layout { display: block; }
}
