/* ========== IndiePick base styles ========== */
:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #f0eef8;
  --text: #1d1b2c;
  --muted: #6c6985;
  --border: #e4e1f0;
  --primary: #6a4cff;
  --primary-ink: #ffffff;
  --primary-soft: #ece8ff;
  --secondary: #ff5a87;
  --secondary-soft: #ffe8ef;
  --ok: #17a673;
  --danger: #e0445a;
  --warn: #f5a524;
  --star: #ffb400;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(30, 20, 80, .05), 0 4px 16px rgba(30, 20, 80, .06);
  --shadow-hover: 0 4px 10px rgba(30, 20, 80, .08), 0 12px 28px rgba(30, 20, 80, .10);
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121019;
    --surface: #1c1926;
    --surface-2: #26222f;
    --text: #ecebf3;
    --muted: #9e9ab3;
    --border: #312c3e;
    --primary: #8b73ff;
    --primary-soft: #2a2448;
    --secondary: #ff6f97;
    --secondary-soft: #3a1f2a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --shadow-hover: 0 4px 10px rgba(0,0,0,.35), 0 12px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.7;
  color: var(--text); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; }
h1, .h1 { font-size: 1.6rem; }
h2, .h2 { font-size: 1.3rem; }
.h3 { font-size: 1.05rem; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.05rem; color: var(--muted); }
.accent { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }
.site-main { flex: 1; padding: 24px 0 56px; }
.center-block { text-align: center; margin: 32px auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--primary); display: flex; }
.header-search { flex: 1; max-width: 420px; }
.header-search input {
  width: 100%; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 999px; padding: 8px 16px; font: inherit; color: var(--text);
}
.header-nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-link { color: var(--text); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.pt-badge { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 1px 8px; font-size: .78rem; margin-left: 2px; }
.nav-user { display: flex; }

/* ---------- avatar ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.8rem; }
.avatar-letter { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 700; font-size: .92rem; line-height: 1.2;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; text-decoration: none !important;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 3px 10px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-store { background: var(--text); color: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.btn-link.muted { color: var(--muted); }

/* ---------- card / layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.section { margin: 36px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.link-more { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.two-col .section { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.empty { background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }
.breadcrumb { color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  margin-top: -24px; padding: 48px 0 40px;
  background:
    radial-gradient(900px 300px at 10% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
    radial-gradient(700px 300px at 95% 30%, color-mix(in srgb, var(--secondary) 16%, transparent), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 900; letter-spacing: -.01em; }
.hero-search { display: flex; gap: 8px; margin-top: 20px; max-width: 540px; }
.hero-search input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 999px; padding: 12px 20px; font: inherit; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.hero-stats { margin-top: 12px; }
.hero-cta { margin: 0; }
.hero-cta-title { font-weight: 800; margin-bottom: 4px; }

/* ---------- app card ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.app-list { display: flex; flex-direction: column; gap: 10px; }
.app-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.app-scroller > * { scroll-snap-align: start; }
.app-card {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.app-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.app-card.is-boosted { border-color: color-mix(in srgb, var(--secondary) 45%, var(--border)); }
.app-card-icon { width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.app-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.app-card-body { min-width: 0; flex: 1; }
.app-card-title { font-weight: 800; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.app-card-meta { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; flex-wrap: wrap; }
.app-card-catch { font-size: .82rem; color: var(--muted); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.app-card-hot { font-size: .8rem; color: var(--secondary); font-weight: 700; margin-top: 2px; }
.rating-sm { font-size: .8rem; color: var(--star); font-weight: 700; }
.boost-badge { position: absolute; top: 8px; right: 8px; font-size: .66rem; font-weight: 800; letter-spacing: .05em; color: var(--secondary); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; line-height: 1.5; }
.boost-badge.inline { position: static; display: inline-block; }
.rank-badge { position: absolute; top: -8px; left: -8px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .85rem; background: var(--surface-2); color: var(--muted); border: 2px solid var(--surface); z-index: 1; }
.rank-1 { background: #ffc531; color: #5a3d00; }
.rank-2 { background: #c9ced8; color: #333a47; }
.rank-3 { background: #e2a36b; color: #4a2508; }
.app-list .app-card { margin-left: 8px; }
.app-list.compact .app-card { margin-left: 0; box-shadow: none; padding: 10px; }
.app-list.compact .app-card-icon { width: 48px; height: 48px; border-radius: 12px; }

/* ---------- chips / tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }
.chip a { color: inherit; }
.chip-sm { padding: 1px 8px; font-size: .74rem; }
a.chip:hover { text-decoration: none; filter: brightness(.97); }
.chip-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0 0 2px; opacity: .6; }
.chip-x:hover { opacity: 1; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-form { display: flex; gap: 8px; margin-top: 14px; }
.tag-form input { flex: 1; min-width: 0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.category-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-weight: 700; color: var(--text); text-align: center; }
.category-tile:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ---------- forms ---------- */
input[type=text], input[type=url], input[type=number], input[type=search], input[type=email], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 0; border-color: var(--primary); }
textarea { resize: vertical; }
input[type=file] { font: inherit; font-size: .88rem; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field small { display: block; margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; min-width: 0; }
.req { font-style: normal; font-size: .7rem; background: var(--secondary); color: #fff; border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.inline-form { display: inline; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filter-bar.card { padding: 12px; }
.filter-bar input[type=search] { flex: 1; min-width: 180px; width: auto; }
.filter-bar select { width: auto; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; margin-bottom: 6px; }
.thumb-row { display: flex; gap: 10px; margin-bottom: 8px; }
.thumb-item { text-align: center; }

/* ---------- flash ---------- */
.flashes { margin-bottom: 16px; }
.flash { position: relative; border-radius: var(--radius-sm); padding: 12px 40px 12px 16px; margin-bottom: 10px; font-size: .92rem; border: 1px solid; }
.flash-success { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.flash-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.flash-info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.flash-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); }

/* ---------- app detail ---------- */
.app-hero { display: grid; grid-template-columns: 120px 1fr auto; gap: 22px; align-items: start; }
.app-hero-icon { width: 120px; height: 120px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.app-hero-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-hero-icon .icon-fallback { font-size: 3rem; }
.app-hero h1 { margin-bottom: 4px; }
.catch { font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.dev-link { font-weight: 700; }
.app-hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ratings { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.rating-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 12px; }
.store-label { font-size: .72rem; font-weight: 700; color: var(--muted); }
.rating-num { font-weight: 900; font-size: 1.2rem; }
.stars { position: relative; display: inline-block; font-size: .95rem; letter-spacing: 1px; color: var(--border); line-height: 1; }
.stars::before { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--pct); overflow: hidden; color: var(--star); white-space: nowrap; }
.store-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.screenshots { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; }
.shot { flex: 0 0 auto; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.shot img { display: block; height: 380px; width: auto; max-width: 80vw; object-fit: cover; }
.prose { overflow-wrap: anywhere; }
.prose ul { padding-left: 1.3em; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 200; display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; max-width: 92vw; border-radius: 12px; }
.dev-profile { display: flex; gap: 20px; align-items: center; }
.dev-profile h1 { margin: 0; }

/* ---------- threads / posts ---------- */
.thread-list { list-style: none; padding: 0; margin: 0; }
.thread-list li + li { border-top: 1px solid var(--border); }
.thread-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px; color: var(--text); }
.thread-list a:hover { background: var(--surface-2); text-decoration: none; }
.thread-list.compact a { padding: 8px 2px; font-size: .9rem; }
.thread-title { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.thread-meta { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.count-pill { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 0 9px; font-size: .78rem; font-weight: 800; min-width: 28px; text-align: center; }
.thread-head .prose { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.posts { margin-bottom: 20px; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; scroll-margin-top: 80px; }
.post:target { outline: 2px solid var(--primary); }
.post.is-deleted { opacity: .6; }
.post-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.post-no { font-weight: 800; color: var(--primary); }
.post-name { font-weight: 700; color: var(--ok); }
.post-name.is-user { color: var(--primary); }
.post-id { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; }
.post-report { margin-left: auto; font-size: .78rem; }
.post-body { overflow-wrap: anywhere; }
.post-body .anchor { font-weight: 600; }
.admin-peek { margin-top: 6px; padding: 6px 10px; background: var(--surface-2); border-radius: 6px; }
.post-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.app-mini { display: flex; gap: 12px; align-items: center; color: var(--text); }
.app-mini:hover { text-decoration: none; border-color: var(--primary); }
.app-mini img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.anchor-popup { position: absolute; z-index: 90; max-width: 480px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-hover); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .9rem; }

/* ---------- login / mypage ---------- */
.login-card { text-align: center; padding: 32px; }
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; max-width: 340px; margin: 24px auto; }
.btn-oauth { padding: 13px 18px; font-size: .95rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn-oauth:hover { background: var(--surface-2); }
.btn-oauth-x { background: #000; color: #fff; border-color: #000; }
.btn-oauth-discord { background: #5865f2; color: #fff; border-color: #5865f2; }
.btn-oauth-github { background: #24292f; color: #fff; border-color: #24292f; }
.dev-login { border-top: 1px dashed var(--border); margin: 20px 0; padding-top: 20px; }
.dev-login-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.profile-row { display: flex; gap: 16px; align-items: center; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.link-list li > span:first-child { flex: 1; font-weight: 700; }

/* ---------- console ---------- */
.console-top { display: grid; grid-template-columns: 240px 1fr 1fr; gap: 16px; }
.console-top .card { margin: 0; }
.points-card { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--secondary))); color: #fff; border: 0; }
.points-card .muted { color: rgba(255,255,255,.8); }
.points-label { font-weight: 700; font-size: .9rem; opacity: .9; }
.points-value { font-size: 2.6rem; font-weight: 900; line-height: 1.2; }
.points-value small { font-size: 1rem; margin-left: 4px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--secondary), var(--primary)); transition: width .4s; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.ad-overlay { position: fixed; inset: 0; background: rgba(10, 8, 20, .88); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ad-overlay[hidden] { display: none; }
.ad-stage { width: min(640px, 100%); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.ad-slot { min-height: 320px; display: flex; align-items: center; justify-content: center; background: #000; color: #fff; }
.ad-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 12px; }
.dummy-ad { text-align: center; padding: 24px; }
.dummy-ad .big { font-size: 3rem; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: .78rem; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: 4px; }
.table-app { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.table-app img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.row-deleted { opacity: .55; background: color-mix(in srgb, var(--danger) 5%, transparent); }
.status { display: inline-block; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; background: var(--surface-2); color: var(--muted); }
.status-ok, .status-resolved { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.status-ng, .status-open { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.status-boost { background: var(--secondary-soft); color: var(--secondary); }

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.admin-nav a { padding: 8px 14px; color: var(--muted); font-weight: 700; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-nav a:hover { text-decoration: none; color: var(--text); }
.badge-count { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { margin: 0; text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 900; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 5px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .85rem; font-weight: 600; }
.tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pt-adjust input { width: 70px; padding: 4px 6px; }
.cat-form { display: flex; gap: 8px; }
.cat-form input[name=sort_order] { width: 90px; }
.table select { width: auto; padding: 4px 8px; }

/* ---------- pager / dialog / misc ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 28px 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 13px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-hover); }
.dialog::backdrop { background: rgba(10, 8, 20, .55); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.error-code { font-size: 5rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 999px; z-index: 400; font-size: .9rem; box-shadow: var(--shadow-hover); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { font-weight: 900; font-size: 1.1rem; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; }
.footer-nav a { color: var(--muted); }
.copyright { margin-top: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .detail-grid, .hero-inner, .two-col { grid-template-columns: 1fr; }
  .console-top { grid-template-columns: 1fr 1fr; }
  .console-top .points-card { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .header-inner { gap: 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .logo-text { font-size: 1.05rem; }
  .header-nav { gap: 10px; }
  .nav-link { font-size: .82rem; }
  .section-head h2 { font-size: 1.08rem; }
  .hero { padding: 28px 0 24px; }
  .hero-search { display: none; }
  .hero-cta { display: none; }
  .mobile-5 > .app-card:nth-child(n+6) { display: none; }
  .app-hero { grid-template-columns: 80px 1fr; gap: 14px; }
  .app-hero-icon { width: 80px; height: 80px; border-radius: 20px; }
  .app-hero-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .app-hero-body { grid-column: 1 / -1; }
  .shot img { height: 300px; }
  .console-top { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .app-grid { grid-template-columns: 1fr; }
  .cat-form { flex-wrap: wrap; }
}
