/* TheCustomROM — stylesheet ringan, tanpa framework */
:root {
    color-scheme: dark;
    --bg: #0a0c10;
    --bg-soft: #0e1117;
    --panel: #12161f;
    --panel-2: #161c27;
    --line: #242c3b;
    --line-soft: #1b2230;
    --text: #e9edf5;
    --muted: #99a3b7;
    --accent: #ff6a00;
    --accent-2: #ffb020;
    --green: #2fd17c;
    --blue: #5aa9ff;
    --radius: 14px;
    --radius-sm: 9px;
    --wrap: 1180px;
    --shadow: 0 20px 50px -24px rgba(0, 0, 0, .8);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(255, 106, 0, .10), transparent 65%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
code, .mono { font-family: var(--mono); font-size: .92em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 99;
    background: var(--accent); color: #0b0e14; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.muted { color: var(--muted); }
.eyebrow {
    display: inline-block;
    font: 600 11px/1 var(--mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.eyebrow-accent { color: var(--accent-2); }

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(10, 12, 16, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.03em; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text { font-size: 19px; }
.brand-text em { font-style: normal; color: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { font-size: 14.5px; color: var(--muted); padding: 6px 0; position: relative; }
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px;
}
.header-search {
    margin-left: auto; display: flex; align-items: center; gap: 4px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
    padding: 3px 4px 3px 14px; min-width: 240px;
}
.header-search input { background: none; border: 0; outline: 0; width: 100%; font-size: 13.5px; }
.header-search input::placeholder { color: #6d7689; }
.header-search button {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    border: 0; background: var(--panel-2); color: var(--muted); cursor: pointer;
}
.header-search button:hover { color: var(--accent-2); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 2px; }

/* -------------------------------------------------------------------- hero */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 30% 0%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 850; margin: 0 0 18px; }
.grad { background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text { color: var(--muted); font-size: 17px; max-width: 52ch; margin-bottom: 26px; }
.hero-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 6px 6px 18px; max-width: 560px; box-shadow: var(--shadow);
}
.hero-search svg { color: var(--muted); flex: none; }
.hero-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15px; padding: 10px 0; }
.hero-search input::placeholder { color: #6d7689; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.hero-stats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.hero-panel { position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.terminal {
    width: 100%; max-width: 430px; border: 1px solid var(--line); border-radius: var(--radius);
    background: linear-gradient(180deg, #10141c, #0c1016); box-shadow: var(--shadow); overflow: hidden;
    transform: rotate(1.5deg);
}
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); background: #0e1219; }
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2b3444; }
.terminal-bar i:first-child { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 8px; font: 11px var(--mono); color: var(--muted); }
.terminal pre { margin: 0; padding: 20px; font: 12.5px/1.85 var(--mono); color: #c9d2e3; overflow-x: auto; }
.c-muted { color: #5d6779; }
.c-accent { color: var(--accent-2); }
.c-green { color: var(--green); }
.c-cursor { animation: blink 1.1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.floating-card {
    position: absolute; right: -6px; bottom: 6px; display: grid; gap: 4px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 18px; box-shadow: var(--shadow); min-width: 190px;
    transform: rotate(-1.5deg);
}
.floating-card strong { font-size: 15px; }
.floating-card .muted { font-size: 12px; }

/* ------------------------------------------------------------------ section */
.section { padding: 40px 24px 14px; }
.section-sm { padding: 28px 0 6px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: 0; }
.section-head-tight { align-items: center; margin-bottom: 14px; }
.section-head-tight h2 { font-size: 1.25rem; }
.link-arrow { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.link-arrow span { display: inline-block; transition: transform .15s ease; color: var(--accent); }
.link-arrow:hover { color: var(--text); }
.link-arrow:hover span { transform: translateX(4px); }

/* ------------------------------------------------------------------- cards */
.grid { display: grid; gap: 18px; }
.grid-posts { grid-template-columns: repeat(3, 1fr); }
.grid-devices { grid-template-columns: repeat(4, 1fr); }
.card {
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
    overflow: hidden; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); border-color: #33405a; box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph {
    position: absolute; inset: 0; display: grid; place-items: center;
    background:
        radial-gradient(120% 120% at 80% 0%, rgba(255,106,0,.28), transparent 55%),
        linear-gradient(140deg, #1a2130, #10141c);
}
.thumb-ph span {
    font: 700 12px var(--mono); letter-spacing: .22em; text-transform: uppercase;
    color: rgba(255,255,255,.32); border: 1px solid rgba(255,255,255,.14);
    padding: 7px 14px; border-radius: 999px;
}
.thumb-ph-guide { background: radial-gradient(120% 120% at 20% 0%, rgba(90,169,255,.25), transparent 55%), linear-gradient(140deg, #182234, #10141c); }
.pill {
    position: absolute; left: 12px; top: 12px; z-index: 2;
    font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
    padding: 7px 9px; border-radius: 6px; background: rgba(10,12,16,.82); border: 1px solid var(--line);
}
.pill-news { color: var(--accent-2); }
.pill-guide { color: var(--blue); }
.card-body { padding: 16px 17px 18px; }
.card-meta { display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.card-title { font-size: 16.5px; line-height: 1.35; margin: 0 0 8px; }
.card-title a:hover { color: var(--accent-2); }
.card-text { font-size: 13.5px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.device-card { display: flex; flex-direction: column; }
.device-thumb {
    aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
    background:
        radial-gradient(90% 120% at 50% 0%, rgba(255,106,0,.16), transparent 60%),
        linear-gradient(160deg, #171d29, #0f131a);
}
.device-thumb img { width: 100%; height: 100%; object-fit: cover; }
.device-initial { font-size: 46px; font-weight: 850; color: rgba(255,255,255,.16); letter-spacing: -.04em; }
.brand-logo { width: 132px; height: 76px; display: grid; place-items: center; }
.brand-logo img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    opacity: .92; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .45));
    transition: opacity .18s ease;
}
.device-card:hover .brand-logo img { opacity: 1; }
.brand-logo-detail { width: 100%; height: 100%; }
.brand-logo-detail img { max-width: 78%; max-height: 52%; }
.device-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.device-body .eyebrow { font-size: 9.5px; margin: 0; }
.device-body h3 { font-size: 15.5px; margin: 0; }
.device-body > p { font-size: 11.5px; color: var(--muted); margin: 0; }
.device-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.device-foot .muted { font-size: 10.5px; text-align: right; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--panel); color: var(--muted); font-size: 12px; white-space: nowrap;
}
.chip span { color: #6d7689; font-size: 10.5px; }
.chip:hover { border-color: #3a465d; color: var(--text); }
.chip.is-active { background: rgba(255,106,0,.12); border-color: rgba(255,106,0,.45); color: var(--accent-2); }
.chip-accent { color: var(--accent-2); border-color: rgba(255,106,0,.35); background: rgba(255,106,0,.08); }

/* --------------------------------------------------------------------- rom */
.rom-list { display: grid; gap: 8px; }
.rom-row {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 15px 18px; border: 1px solid var(--line-soft); border-radius: 12px;
    background: var(--panel); transition: border-color .15s ease, background .15s ease;
}
.rom-row:hover { border-color: #34405a; background: var(--panel-2); }
.rom-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rom-main strong { font-size: 15px; }
.rom-main .muted { font-size: 12px; }
.rom-project { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.rom-side { display: flex; align-items: center; gap: 10px; flex: none; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.is-stable { color: var(--green); }
.status.is-stable i { background: var(--green); box-shadow: 0 0 8px rgba(47,209,124,.6); }
.status.is-beta { color: var(--accent-2); }
.status.is-beta i { background: var(--accent-2); }
.status.is-nightly { color: var(--blue); }
.status.is-nightly i { background: var(--blue); }
.rom-list-compact .rom-row { padding: 11px 14px; }

.panel-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 28px;
    padding: 34px 36px; border-radius: 18px; border: 1px solid var(--line);
    background:
        radial-gradient(120% 200% at 0% 0%, rgba(255,106,0,.16), transparent 55%),
        var(--panel);
}
.panel-cta h2 { font-size: 1.5rem; }
.panel-cta p { color: var(--muted); margin: 0; max-width: 60ch; }

.brand-strip { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 24px; }
.brand-strip a {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px;
    border: 1px dashed var(--line); border-radius: 9px; font-size: 12.5px; color: var(--muted);
}
.brand-strip a span { font: 10px var(--mono); color: #66708a; }
.brand-strip a:hover { color: var(--text); border-color: #3a465d; }

/* -------------------------------------------------------------------- page */
.page-head { padding: 44px 0 24px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 8px; }
.page-head-tight { padding-bottom: 12px; }
.page-sub { color: var(--muted); max-width: 68ch; font-size: 15px; }
.result-count { font-size: 12.5px; margin-bottom: 16px; }

.filter-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.filter-bar-wrap { flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.inline-search { display: flex; gap: 6px; }
.inline-search input {
    background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
    padding: 9px 13px; font-size: 13.5px; outline: 0; min-width: 210px;
}
.inline-search input:focus { border-color: var(--accent); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 9px; border: 1px solid transparent;
    font-size: 13.5px; font-weight: 650; cursor: pointer; transition: filter .15s ease, background .15s ease;
}
.btn-primary { background: linear-gradient(120deg, var(--accent), #ff8a1e); color: #14100b; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #3a465d; }
.btn-block { width: 100%; margin-top: 10px; }

.empty {
    text-align: center; padding: 56px 24px; border: 1px dashed var(--line);
    border-radius: 16px; background: rgba(18,22,31,.5);
}
.empty h1, .empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); }
.empty-lg { padding: 90px 24px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 28px 0 8px; }
.page-btn {
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
    font-size: 12.5px; color: var(--muted); background: var(--panel);
}
.page-btn:hover { border-color: #3a465d; color: var(--text); }
.page-btn.is-current { background: rgba(255,106,0,.14); border-color: rgba(255,106,0,.45); color: var(--accent-2); }
.page-gap { color: #5d6779; padding: 0 4px; }

/* ------------------------------------------------------------------ detail */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 22px 0 0; font-size: 12px; color: #6d7689; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-current] { color: var(--muted); }

.device-hero { display: flex; gap: 30px; align-items: center; padding: 30px 0 16px; }
.device-hero-thumb {
    width: 132px; height: 132px; flex: none; border-radius: 22px; overflow: hidden;
    display: grid; place-items: center; border: 1px solid var(--line);
    background:
        radial-gradient(90% 120% at 50% 0%, rgba(255,106,0,.22), transparent 62%),
        linear-gradient(160deg, #1a2130, #0f131a);
}
.device-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.device-hero-thumb span { font-size: 54px; font-weight: 850; color: rgba(255,255,255,.22); }
.device-hero-copy h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 0 0 12px; }
.device-hero-copy .muted { max-width: 70ch; margin: 12px 0 0; font-size: 14.5px; }
.device-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; padding: 18px 0 20px; }
.detail-main { display: grid; gap: 18px; align-content: start; }
.detail-side { align-self: start; }
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px 26px; }
.panel h2 { font-size: 1.2rem; }
.panel h3 { font-size: 1rem; }
.panel-sticky { position: sticky; top: 88px; }
.spec-list { margin: 0 0 14px; display: grid; gap: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.spec-list div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; text-align: right; }
.spec-list a { color: var(--accent-2); }
.fineprint { font-size: 11px; color: #6d7689; margin: 12px 0 0; }
.rom-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------- artikel */
.article { max-width: 780px; padding: 26px 0 10px; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0 0 14px; }
.article-excerpt { font-size: 17px; color: var(--muted); }
.article-media { margin: 24px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.article-media img { width: 100%; max-height: 460px; object-fit: cover; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.source-note { font-size: 12.5px; color: var(--muted); margin-top: 26px; }
.source-note a { color: var(--accent-2); }

.prose { font-size: 16px; color: #d4dae7; max-width: 72ch; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.45rem; margin: 1.6em 0 .5em; }
.prose h3, .prose h4 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.prose p { margin: 0 0 1.05em; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.05em; }
.prose li { margin-bottom: .35em; }
.prose blockquote {
    margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--accent);
    background: rgba(255,106,0,.06); border-radius: 0 8px 8px 0; color: #c8d0df;
}
.prose code { background: rgba(255,255,255,.06); border: 1px solid var(--line-soft); padding: 1px 5px; border-radius: 5px; }
.prose pre { background: #0b0f15; border: 1px solid var(--line); padding: 16px 18px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose img { border-radius: 10px; margin: 1.2em 0; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line-soft); background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-top: 44px; padding-bottom: 34px; }
.footer-grid h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 14px; }
.footer-grid a { display: block; font-size: 13.5px; color: #b6c0d2; padding: 4px 0; }
.footer-grid a:hover { color: var(--accent-2); }
.brand-footer { margin-bottom: 12px; }
.footer-note { font-size: 12.5px; max-width: 44ch; }
.footer-bottom {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    border-top: 1px solid var(--line-soft); padding-top: 18px; padding-bottom: 26px;
    font-size: 11.5px; color: #77819a;
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
    .header-search { display: none; }
    .grid-devices { grid-template-columns: repeat(3, 1fr); }
    .grid-posts { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; gap: 30px; }
    .hero-panel { display: none; }
    .detail-grid { grid-template-columns: 1fr; }
    .panel-sticky { position: static; }
}

@media (max-width: 860px) {
    .header-search { display: none; }
    .nav { display: none; }
    .nav-toggle { display: block; margin-left: auto; }
    .nav-open .nav {
        display: flex; flex-direction: column; gap: 2px;
        position: absolute; left: 0; right: 0; top: 68px;
        background: var(--bg-soft); border-bottom: 1px solid var(--line);
        padding: 12px 24px 18px;
    }
    .nav-open .nav a { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
    .grid-devices { grid-template-columns: repeat(2, 1fr); }
    .panel-cta { flex-direction: column; align-items: flex-start; padding: 26px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .device-hero { gap: 20px; }
    .device-hero-thumb { width: 96px; height: 96px; border-radius: 18px; }
    .device-hero-thumb span { font-size: 40px; }
}

@media (max-width: 620px) {
    .wrap { padding: 0 18px; }
    .hero { padding-top: 48px; }
    .hero-stats { gap: 22px; }
    .hero-stats strong { font-size: 21px; }
    .hero-search { flex-wrap: wrap; border-radius: 16px; padding: 12px; }
    .hero-search input { flex-basis: calc(100% - 30px); }
    .hero-search .btn { width: 100%; }
    .grid-posts { grid-template-columns: 1fr; }
    .grid-devices { grid-template-columns: 1fr; }
    .section { padding-left: 18px; padding-right: 18px; }
    .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
    .rom-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .rom-side { width: 100%; justify-content: space-between; }
    .filter-bar { flex-direction: column; }
    .inline-search { width: 100%; }
    .inline-search input { flex: 1; min-width: 0; }
    .article { padding-top: 12px; }
    .device-hero { flex-direction: column; align-items: flex-start; }
    .panel { padding: 18px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 6px; }
}

/* -------------------------------------------------------------- tools/mods */
.rom-date { font-size: 10.5px; }
.status.is-old { color: #8b93a5; }
.status.is-old i { background: #8b93a5; }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card {
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 22px; display: flex; flex-direction: column; gap: 8px;
}
.tool-card h2 { font-size: 1.1rem; margin: 6px 0 0; }
.tool-card p { font-size: 13.5px; color: var(--muted); margin: 0; }
.tool-card .btn { margin-top: auto; }
.tool-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tool-platform { font-size: 10.5px; text-align: right; }
.tool-code {
    margin: 0; padding: 20px; overflow-x: auto; border-radius: 10px;
    background: #0b0f15; border: 1px solid var(--line);
    font: 12.5px/1.9 var(--mono); color: #c9d2e3;
}

.mod-list { display: grid; gap: 8px; }
.mod-row {
    display: flex; gap: 18px; justify-content: space-between; align-items: flex-start;
    padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: 12px;
    background: var(--panel); transition: border-color .15s ease, background .15s ease;
}
.mod-row:hover { border-color: #34405a; background: var(--panel-2); }
.mod-main { min-width: 0; }
.mod-main p { margin: 4px 0 0; font-size: 13px; }
.mod-side { display: flex; align-items: center; gap: 10px; flex: none; }

/* ----------------------------------------------------------------- compare */
.compare-form {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 10px;
}
.compare-form .field { flex: 1 1 240px; margin: 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field select, .field input {
    width: 100%; background: var(--panel-2); border: 1px solid var(--line);
    border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 13.5px; outline: 0;
}
.field select:focus, .field input:focus { border-color: var(--accent); }
.compare-submit { flex: 0 0 auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
    text-align: left; font-size: 13.5px; vertical-align: top;
}
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table thead th { font-size: 14px; background: var(--panel-2); }
.compare-table thead th a { color: var(--accent-2); }
.compare-table tbody th { color: var(--muted); font-weight: 500; width: 190px; }
.compare-table .is-best { color: var(--green); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); }
.check-row input { width: auto; }
.hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

@media (max-width: 1040px) {
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .tool-grid { grid-template-columns: 1fr; }
    .compare-form { flex-direction: column; align-items: stretch; }
    .compare-submit .btn { width: 100%; }
    .mod-row { flex-direction: column; gap: 8px; }
}

/* --------------------------------------------------------------- os images */
.os-head { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.os-head-copy { min-width: 0; }
.os-head-art {
    width: min(320px, 34%); height: auto; flex: none;
    border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.rom-logo {
    width: 44px; height: 44px; flex: none; align-self: center;
    display: grid; place-items: center; overflow: hidden;
    border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.rom-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rom-logo-letter { font-size: 17px; font-weight: 800; color: var(--muted); }
.rom-logo-lg { width: 88px; height: 88px; border-radius: 20px; }
.rom-logo-lg .rom-logo-letter { font-size: 34px; }
.rom-head { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.rom-head > div { min-width: 0; }

.project-block { width: 100%; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.project-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel);
    transition: border-color .15s ease, background .15s ease;
}
.project-card:hover { border-color: #34405a; background: var(--panel-2); }
.project-card-copy { min-width: 0; }
.project-card strong { display: block; font-size: 14px; }
.project-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.os-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.os-card {
    display: flex; align-items: center; gap: 12px; padding: 10px;
    border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel);
    transition: border-color .15s ease, background .15s ease;
}
.os-card img {
    width: 78px; height: 54px; flex: none; object-fit: cover; object-position: left center;
    border: 1px solid var(--line); border-radius: 9px;
}
.os-card strong { display: block; font-size: 14px; }
.os-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.os-card:hover { border-color: #34405a; background: var(--panel-2); }
.os-card.is-active { border-color: rgba(255, 106, 0, .5); background: rgba(255, 106, 0, .08); }

@media (max-width: 1040px) {
    .os-grid { grid-template-columns: repeat(3, 1fr); }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .os-head-art { width: 280px; }
}

@media (max-width: 860px) {
    .os-grid { grid-template-columns: repeat(2, 1fr); }
    .os-head, .rom-head { flex-direction: column-reverse; align-items: flex-start; gap: 18px; }
    .os-head-art { width: 100%; max-width: 340px; }
    .rom-logo-lg { width: 72px; height: 72px; }
}

@media (max-width: 620px) {
    .os-grid, .project-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
