/* =====================================================================
   NewsPortal themes (v1.2)
   body classes: theme-{preset} hdr-{header} home-{layout} art-{layout} ftr-{footer}
   Parts can be mixed, so part styles only use the colour variables.
   ===================================================================== */

/* ---------- 1. Colour palettes ---------- */
body { --accent2: var(--accent); --head-bg: var(--card); --head-ink: var(--ink); --foot-bg: var(--card); --foot-ink: var(--muted);
       --radius: 6px; --title-font: var(--serif); }

body.theme-newspaper {
  --ink: #111; --muted: #5b5750; --line: #cfc8b8; --bg: #f4f1ea; --card: #fbf9f4; --accent: #9b1c1c; --accent2: #111;
  --head-bg: #f4f1ea; --foot-bg: #ece7db; --radius: 0px;
  --font: "Noto Serif", "Noto Serif Devanagari", Georgia, "Times New Roman", serif;
}
body.theme-night {
  --ink: #e6edf3; --muted: #8b949e; --line: #30363d; --bg: #0d1117; --card: #161b22; --accent: #ff4d6d; --accent2: #7c5cff;
  --head-bg: #010409; --head-ink: #e6edf3; --foot-bg: #010409; --radius: 10px; --accent-ink: #fff;
}
body.theme-saffron {
  --ink: #2a1a0a; --muted: #7a6450; --line: #f1dcc4; --bg: #fff8ef; --card: #ffffff; --accent: #e86a10; --accent2: #138808;
  --head-bg: #ffffff; --foot-bg: #2a1a0a; --foot-ink: #f5e6d3; --radius: 12px; --accent-ink: #fff;
}
body.theme-minimal {
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #ffffff; --card: #ffffff; --accent: #2563eb; --accent2: #0f172a;
  --head-bg: #ffffff; --foot-bg: #f8fafc; --radius: 14px; --accent-ink: #fff;
  --title-font: "Inter", "Noto Sans", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
}
body { background: var(--bg); color: var(--ink); }
.card, .hero, .box, .switch-card { border-radius: var(--radius); }
.hero h2, .card h3, .story h1, .section-title { font-family: var(--title-font); }

.preview-bar { background: #111; color: #fff; text-align: center; padding: 8px 12px; font-size: 14px; }
.preview-bar a { color: #ffd166; margin-left: 10px; }

/* ---------- 2. Headers ---------- */
.masthead { background: var(--head-bg); color: var(--head-ink); }
.tagline { color: var(--muted); font-size: 14px; }

/* centred newspaper masthead */
.hdr-centered .masthead { border-bottom: 0; }
.hdr-centered .topline { border-bottom: 1px solid var(--line); font-size: 13px; }
.hdr-centered .topline .wrap { display: flex; align-items: center; gap: 14px; padding-top: 6px; padding-bottom: 6px; }
.hdr-centered .topline .search { margin-left: auto; padding: 0; }
.hdr-centered .mast-center { text-align: center; padding-top: 18px; padding-bottom: 14px; display: grid; gap: 4px; }
.hdr-centered .mast-center .brand { font: 900 clamp(34px, 6vw, 64px)/1 var(--serif); letter-spacing: -1px; }
.hdr-centered .cats { border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.hdr-centered .cats .wrap { justify-content: center; }
.hdr-centered .cats a { text-transform: uppercase; font-size: 13px; letter-spacing: .6px; }

/* compact sticky bar */
.hdr-darkbar .masthead { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.hdr-darkbar .bar, .hdr-minimal .bar { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.hdr-darkbar .brand { font: 800 22px var(--title-font); white-space: nowrap; color: var(--head-ink); }
.hdr-darkbar .cats, .hdr-minimal .cats { border: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.hdr-darkbar .cats a { padding: 6px 10px; border-radius: 999px; border: 0; margin: 0; color: var(--head-ink); opacity: .8; }
.hdr-darkbar .cats a.on, .hdr-darkbar .cats a:hover { background: var(--accent); color: #fff; opacity: 1; }
.hdr-darkbar .search { margin: 0; padding: 0; }
.hdr-darkbar .search input { width: 150px; }

/* breaking-news ticker */
.ticker { background: var(--accent); color: var(--accent-ink, #fff); font-size: 14px; }
.ticker .wrap { display: flex; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.ticker b { background: var(--accent2); padding: 2px 10px; border-radius: 4px; white-space: nowrap; }
.ticker-win { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: flex; gap: 40px; width: max-content; animation: np-ticker 45s linear infinite; }
.ticker-move a { color: inherit; text-decoration: none; white-space: nowrap; }
.ticker-move a::before { content: "● "; opacity: .6; }
.ticker-win:hover .ticker-move { animation-play-state: paused; }
@keyframes np-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-move { animation: none; } .ticker-win { overflow-x: auto; } }
.hdr-ticker .top { gap: 14px; }
.hdr-ticker .brand { color: var(--accent); }
.cats.pills { border-top: 0; background: var(--bg); }
.cats.pills .wrap { padding-top: 8px; padding-bottom: 8px; gap: 6px; }
.cats.pills a { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; background: var(--card); margin: 0; }
.cats.pills a.on, .cats.pills a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* minimal one-line */
.hdr-minimal .masthead { border-bottom: 1px solid var(--line); }
.hdr-minimal .brand { font: 800 22px var(--title-font); letter-spacing: -.5px; white-space: nowrap; }
.hdr-minimal .cats a { border: 0; padding: 6px 10px; margin: 0; color: var(--muted); font-weight: 500; }
.hdr-minimal .cats a.on, .hdr-minimal .cats a:hover { color: var(--accent); }
.hdr-minimal .langs { margin-left: 0; }
.hdr-minimal .search-row { padding-bottom: 12px; }
.hdr-minimal .search-row .search { margin: 0; padding: 0; }
.hdr-minimal .search-row input { width: 100%; max-width: 420px; border-radius: 10px; }

@media (max-width: 760px) {
  .hdr-darkbar .bar, .hdr-minimal .bar { flex-wrap: wrap; }
  .hdr-darkbar .cats, .hdr-minimal .cats { order: 5; flex-basis: 100%; }
  .hdr-darkbar .search input { width: 110px; }
  .hdr-centered .topline .date { display: none; }
}

/* ---------- 3. Home layouts ---------- */
/* newspaper columns */
.np-front { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 3px double var(--ink); }
.np-front:not(:has(.np-latest)) { grid-template-columns: 1fr; }
.np-hero { display: block; border: 0; background: none; margin: 0; }
.np-hero .hero-img img { max-height: 380px; width: 100%; object-fit: cover; }
.np-hero .hero-text { padding: 14px 0 0; }
.np-hero h2 { font-size: clamp(28px, 4vw, 42px); }
.np-latest { border-left: 1px solid var(--line); padding-left: 22px; }
.np-latest h2 { font: 700 15px var(--font); text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin: 0 0 6px; }
.np-latest article { padding: 10px 0; border-bottom: 1px solid var(--line); }
.np-latest h3 { font: 700 17px/1.35 var(--title-font); margin: 2px 0 4px; }
.np-latest h3 a { text-decoration: none; }
.home-newspaper .grid { gap: 0; }
.home-newspaper .grid .card { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; padding-bottom: 18px; margin-bottom: 18px; }
.home-newspaper .grid .card .thumb img { filter: grayscale(.35); }

/* magazine photo hero */
.mag-top { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 26px; }
.mag-top:not(:has(.mag-sub)) { grid-template-columns: 1fr; }
.mag-sub { display: grid; gap: 16px; }
.overlay { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 220px; background: var(--card); }
.overlay.ov-main { min-height: 420px; }
.ov-img, .ov-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ov-noimg { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.85)); pointer-events: none; }
.ov-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 1; color: #fff; }
.ov-text h2 { margin: 4px 0 6px; font: 800 20px/1.25 var(--title-font); }
.ov-main .ov-text h2 { font-size: clamp(24px, 3.4vw, 38px); }
.ov-text a { color: #fff; text-decoration: none; }
.ov-text .meta { color: rgba(255,255,255,.75); }
.ov-text .kicker { background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; }
.overlay:hover img { transform: scale(1.03); transition: transform .4s; }

/* list + sidebar */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.side-col { display: grid; gap: 20px; position: sticky; top: 16px; }
.list-hero { margin-bottom: 18px; }
.story-list { display: grid; gap: 14px; }
.story-list .row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.story-list .row:not(:has(.row-img)) { grid-template-columns: 1fr; padding-left: 16px; }
.story-list .row > div { padding: 12px 14px 12px 0; }
.row-img img { width: 100%; height: 100%; min-height: 140px; object-fit: cover; }
.story-list h3 { margin: 4px 0 6px; font: 700 19px/1.35 var(--title-font); }
.story-list h3 a { text-decoration: none; }
.story-list p { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.box { background: var(--card); border: 1px solid var(--line); padding: 16px 18px; }
.box h2 { margin: 0 0 10px; font: 700 17px var(--title-font); color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.most-read ol { margin: 0; padding: 0; list-style: none; counter-reset: mr; }
.most-read li { counter-increment: mr; display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.most-read li:last-child { border-bottom: 0; }
.most-read li::before { content: counter(mr); font: 800 24px/1 var(--title-font); color: var(--accent2); opacity: .8; }
.most-read a { text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.4; }
.most-read a:hover, .cat-box a:hover { color: var(--accent); }
.cat-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.cat-box a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; }

/* equal cards */
.grid.cards3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cards3 .card { border: 0; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06); transition: transform .2s, box-shadow .2s; }
.cards3 .card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,23,42,.08), 0 14px 32px rgba(15,23,42,.1); }
.cards3 .card-wide { grid-column: span 2; position: relative; padding-left: 54%; min-height: 340px; }
.cards3 .card-wide .thumb { position: absolute; inset: 0 auto 0 0; width: 52%; }
.cards3 .card-wide .thumb img { aspect-ratio: auto; height: 100%; margin: 0; }
.cards3 .card-wide h3 { font-size: 26px; }
.cards3 .card-wide .kicker { margin-top: 18px; }

@media (max-width: 900px) {
  .np-front, .mag-top, .with-side { grid-template-columns: 1fr; }
  .np-latest { border-left: 0; padding-left: 0; }
  .side-col { position: static; }
  .grid.cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid.cards3 { grid-template-columns: 1fr; }
  .cards3 .card-wide { grid-column: auto; padding-left: 0; min-height: 0; }
  .cards3 .card-wide .thumb { position: static; width: auto; }
  .cards3 .card-wide .thumb img { aspect-ratio: 16/9; }
  .story-list .row { grid-template-columns: 110px 1fr; gap: 10px; }
  .story-list p { display: none; }
  .overlay.ov-main { min-height: 300px; }
}

/* ---------- 4. Story page layouts ---------- */
.with-side .story { max-width: none; margin-top: 28px; }
.with-side .side-col { margin-top: 28px; }

/* newspaper: drop cap, narrow column, ruled meta */
.story-newspaper { max-width: 680px; text-align: left; }
.story-newspaper h1 { text-align: center; font-size: clamp(30px, 4.5vw, 46px); }
.story-newspaper > .kicker { display: block; text-align: center; }
.story-newspaper .meta { text-align: center; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 6px 0; }
.story-newspaper .body > p:first-of-type::first-letter { float: left; font: 900 64px/.85 var(--serif); padding: 6px 8px 0 0; color: var(--accent); }
.story-newspaper .lead { font-style: italic; font-weight: 400; }

/* wide: full-width photo with the headline on it */
.story-banner { position: relative; margin: 0 calc(50% - 50vw); min-height: 420px; max-height: 560px; overflow: hidden; display: flex; align-items: flex-end; }
.story-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.85)); }
.banner-text { position: relative; z-index: 1; color: #fff; max-width: 792px; margin: 0 auto; padding: 30px 16px; width: 100%; }
.banner-text h1 { font: 800 clamp(28px, 4.6vw, 52px)/1.15 var(--title-font); margin: 8px 0; }
.banner-text .meta { color: rgba(255,255,255,.8); }
.banner-text .kicker { background: var(--accent); color: #fff; padding: 2px 10px; border-radius: 4px; }
body.art-wide { overflow-x: clip; }
.story-wide { max-width: 760px; }

/* minimal: big, airy */
.story-minimal { max-width: 720px; margin-top: 48px; }
.story-minimal h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -1px; line-height: 1.12; }
.story-minimal .lead { font-size: 1.3em; font-weight: 400; color: var(--muted); }
.story-minimal .body { font-family: var(--font); font-size: 1.15em; line-height: 1.85; }
.story-minimal figure img { border-radius: var(--radius); }

/* ---------- 5. Footers ---------- */
.foot { background: var(--foot-bg); color: var(--foot-ink); }
.foot a { color: inherit; }
.foot h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink); }
.foot-brand { font: 800 22px var(--title-font); color: var(--ink); }
.foot-copy { font-size: 13px; }

.ftr-columns .foot { border-top: 3px double var(--ink); }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-bottom: 20px; }
.foot-cats { list-style: none; margin: 0; padding: 0; columns: 2; }
.foot-cats a { text-decoration: none; line-height: 2; }
.ftr-columns .foot-copy { border-top: 1px solid var(--line); padding-top: 14px; }
.foot .langs { margin-left: 0; display: inline-flex; }

.ftr-dark .foot { background: #0b0c0f; color: #9aa0aa; border-top: 3px solid var(--accent); }
.ftr-dark .foot-brand { color: #fff; }
.foot-dark { display: grid; gap: 14px; justify-items: start; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-nav a { text-decoration: none; color: #d6d9de; }
.foot-nav a:hover { color: var(--accent); }

.ftr-big .foot { padding: 0; }
.foot-big { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 30px; padding-top: 34px; padding-bottom: 26px; }
.ftr-big .foot-brand, .ftr-big .foot h3 { color: inherit; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.foot-grid a { text-decoration: none; opacity: .85; }
.foot-grid a:hover { opacity: 1; color: var(--accent); }
.ftr-big .box { background: transparent; border-color: rgba(127,127,127,.3); color: inherit; }
.ftr-big .box h2 { color: var(--accent); }
.ftr-big .foot-copy { background: rgba(0,0,0,.25); padding: 12px 0; }
.ftr-big .langs { border-color: rgba(127,127,127,.4); }

.foot-min { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.foot-min a { text-decoration: none; color: var(--accent); }
.ftr-minimal .foot { border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .foot-cols, .foot-big { grid-template-columns: 1fr; }
}

/* ---------- 6. Theme finishing touches ---------- */
.theme-newspaper .masthead, .theme-newspaper .card, .theme-newspaper .hero { box-shadow: none; }
.theme-newspaper .section-title { border-left: 0; padding-left: 0; text-transform: uppercase; letter-spacing: 1px; font-size: 18px; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.theme-newspaper .kicker { color: var(--accent); }
.theme-newspaper .langs a.on { background: var(--ink); }

.theme-night .masthead { border-bottom-color: var(--line); }
.theme-night .card, .theme-night .hero { border-color: var(--line); }
.theme-night .search input { background: var(--card); border-color: var(--line); color: var(--ink); }
.theme-night .section-title { border-left-color: var(--accent); }
.theme-night .langs { border-color: var(--line); }

.theme-saffron .masthead { border-bottom: 0; box-shadow: 0 2px 0 var(--accent2); }
.theme-saffron .section-title { border-left-color: var(--accent2); }
.theme-saffron .kicker { color: var(--accent2); }
.theme-saffron .card { box-shadow: 0 6px 18px rgba(232,106,16,.08); }

.theme-minimal .masthead { border-bottom-width: 1px; border-bottom-color: var(--line); }
.theme-minimal .section-title { border-left: 0; padding-left: 0; font-size: 28px; letter-spacing: -.5px; }
.theme-minimal .kicker { text-transform: none; letter-spacing: 0; font-weight: 600; }
.theme-minimal .langs a.on { background: var(--ink); }
.theme-minimal .source-link a, .theme-minimal .btn { border-radius: 999px; }

/* =====================================================================
   Admin panel themes: atheme-{name} + layout-top | layout-side
   ===================================================================== */
body.atheme-ocean    { --bg: #f3f7fb; --card: #ffffff; --ink: #10233a; --muted: #5a6b80; --line: #dbe5f0; --accent: #1d6fd8; --side-bg: #0f2a4a; --side-ink: #cfe0f5; }
body.atheme-midnight { --bg: #0f1419; --card: #171d24; --ink: #e5e9ee; --muted: #8b96a3; --line: #2a323c; --accent: #f5a524; --accent-ink: #111; --side-bg: #0a0d11; --side-ink: #c2cad3; }
body.atheme-forest   { --bg: #f4f8f3; --card: #ffffff; --ink: #14281d; --muted: #5c6f63; --line: #d6e4d9; --accent: #1f7a4a; }
body.atheme-royal    { --bg: #f7f5fc; --card: #ffffff; --ink: #1e1533; --muted: #6b6280; --line: #e4def3; --accent: #6d28d9; --side-bg: #2a1758; --side-ink: #ddd3f7; }
body.admin { background: var(--bg); color: var(--ink); }
body.atheme-midnight input, body.atheme-midnight select, body.atheme-midnight textarea { background: #0f1419; color: var(--ink); border-color: var(--line); }
body.atheme-midnight .btn { color: #111; }

/* sidebar layout */
@media (min-width: 900px) {
  .layout-side .admin-bar { position: fixed; inset: 0 auto 0 0; width: 230px; flex-direction: column; align-items: stretch;
    gap: 6px; padding: 20px 14px; overflow-y: auto; background: var(--side-bg, var(--card)); border-bottom: 0;
    border-right: 1px solid var(--line); z-index: 30; }
  .layout-side .admin-bar .brand { color: #fff; padding: 0 8px 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .layout-side .admin-bar .brand small { color: var(--side-ink); }
  .layout-side .admin-bar nav { flex-direction: column; gap: 2px; }
  .layout-side .admin-bar nav a { color: var(--side-ink); padding: 9px 12px; border-radius: 8px; }
  .layout-side .admin-bar nav a.on, .layout-side .admin-bar nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
  .layout-side .admin-bar nav a.on { box-shadow: inset 3px 0 0 var(--accent); }
  .layout-side .admin-bar form { margin: auto 0 0; flex-direction: column; align-items: flex-start; padding: 12px 8px 0;
    border-top: 1px solid rgba(255,255,255,.12); }
  .layout-side .admin-bar .muted { color: var(--side-ink); }
  .layout-side .admin-main { margin-left: 230px; max-width: none; padding: 0 32px; }
}
@media (max-width: 899px) {
  .layout-side .admin-bar { background: var(--side-bg, var(--card)); }
  .layout-side .admin-bar, .layout-side .admin-bar a, .layout-side .admin-bar .brand { color: var(--side-ink, var(--ink)); }
}
.layout-top .admin-bar { border-bottom-color: var(--accent); }
.atheme-forest .admin-bar { background: #14281d; }
.atheme-forest .admin-bar a, .atheme-forest .admin-bar .brand, .atheme-forest .admin-bar .muted { color: #e3efe6; }
.atheme-forest .admin-bar nav a.on, .atheme-forest .admin-bar nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.atheme-forest .admin-bar button.link { color: #9fe0b8; }
.layout-side .admin-bar button.link { color: var(--accent); }

/* theme picker cards (admin) */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.theme-card { position: relative; display: grid; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; font-weight: 400; }
.theme-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.theme-card input[type=radio] { position: absolute; top: 12px; right: 12px; width: auto; }
.theme-card b { font-size: 16px; }
.theme-card .muted { font-size: 13px; }
.mini { display: grid; gap: 4px; padding: 8px; border-radius: 6px; height: 96px; border: 1px solid rgba(0,0,0,.08); }
.mini i { display: block; border-radius: 3px; }
.mini .m-head { height: 14px; }
.mini .m-body { display: grid; grid-template-columns: 2fr 1fr; gap: 4px; }
.mini .m-body i { height: 44px; opacity: .85; }
.mini .m-foot { height: 8px; opacity: .6; }
.mini-admin { display: grid; grid-template-columns: 1fr 3fr; gap: 4px; height: 70px; padding: 6px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }
.mini-admin.top { grid-template-columns: 1fr; grid-template-rows: 12px 1fr; }
.mini-admin i { display: block; border-radius: 3px; height: 100%; min-height: 10px; }
.theme-card .preview-link { font-size: 13px; }
/* mini previews (no inline styles allowed by the CSP, so colours live here) */
.mini.t-classic   { background: #fbfaf7; } .t-classic .m-head { background: #c8102e; } .t-classic .m-body i:first-child { background: #16181d; } .t-classic .m-body i:last-child { background: #e4e2dc; } .t-classic .m-foot { background: #e4e2dc; }
.mini.t-newspaper { background: #f4f1ea; } .t-newspaper .m-head { background: #111; } .t-newspaper .m-body i:first-child { background: #9b1c1c; } .t-newspaper .m-body i:last-child { background: #cfc8b8; } .t-newspaper .m-foot { background: #111; }
.mini.t-night     { background: #0d1117; } .t-night .m-head { background: #010409; border: 1px solid #30363d; } .t-night .m-body i:first-child { background: #ff4d6d; } .t-night .m-body i:last-child { background: #7c5cff; } .t-night .m-foot { background: #30363d; }
.mini.t-saffron   { background: #fff8ef; } .t-saffron .m-head { background: #e86a10; } .t-saffron .m-body i:first-child { background: #f1dcc4; } .t-saffron .m-body i:last-child { background: #138808; } .t-saffron .m-foot { background: #2a1a0a; }
.mini.t-minimal   { background: #ffffff; } .t-minimal .m-head { background: #0f172a; } .t-minimal .m-body i:first-child { background: #2563eb; } .t-minimal .m-body i:last-child { background: #e2e8f0; } .t-minimal .m-foot { background: #e2e8f0; }
.mini-admin.a-classic  { background: #fbfaf7; } .a-classic i:first-child { background: #c8102e; } .a-classic i:last-child { background: #fff; border: 1px solid #e4e2dc; }
.mini-admin.a-ocean    { background: #f3f7fb; } .a-ocean i:first-child { background: #0f2a4a; } .a-ocean i:last-child { background: #fff; border-top: 3px solid #1d6fd8; }
.mini-admin.a-midnight { background: #0f1419; } .a-midnight i:first-child { background: #0a0d11; border-right: 2px solid #f5a524; } .a-midnight i:last-child { background: #171d24; }
.mini-admin.a-forest   { background: #f4f8f3; } .a-forest i:first-child { background: #14281d; } .a-forest i:last-child { background: #fff; border-top: 3px solid #1f7a4a; }
.mini-admin.a-royal    { background: #f7f5fc; } .a-royal i:first-child { background: #2a1758; } .a-royal i:last-child { background: #fff; border-top: 3px solid #6d28d9; }

/* ---------- v1.3: customizer output helpers (public site) ---------- */
.brand.has-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo { height: var(--logo-h, 48px); width: auto; max-width: min(70vw, 420px); object-fit: contain; }
.hdr-centered .mast-center .brand.has-logo { justify-content: center; }
@media (max-width: 900px) { .brand-logo { height: min(var(--logo-h, 48px), 44px); } }
.foot-extra { border-top: 1px solid rgba(127,127,127,.25); padding: 14px 0; font-size: 14px; }
.foot-extra .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }
.foot-links, .foot-social { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a { color: inherit; text-decoration: none; }
.foot-links a:hover { opacity: 1; color: var(--accent); }
.foot-social a { text-decoration: none; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(127,127,127,.35); color: inherit; font-weight: 600; font-size: 13px; }
.foot-social a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }

/* ---------- v1.3: customizer page (admin) ---------- */
.customize .switch-card h2 { margin: 0; font-size: 18px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.color-field { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; position: relative; }
.color-field input[type=color] { width: 46px; height: 38px; padding: 2px; border-radius: 6px; flex: none; cursor: pointer; }
.color-field span { display: grid; line-height: 1.3; }
.color-field small { color: var(--muted); font-size: 12px; }
.color-field .changed { position: absolute; top: 4px; right: 8px; font-size: 11px; font-style: normal; color: var(--accent); font-weight: 700; }
.checks-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.logo-prev img { height: 48px; width: auto; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.fav-prev img { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
input[type=range] { padding: 0; }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0;
  background: linear-gradient(transparent, var(--bg) 30%); }
