/* ==========================================================================
   FiimeROM — ROM 资源中心（Fastboot / 沸米计划 / SGSI / 工厂包）
   视觉语言与个人中心（user/css/uc.css）保持一致：
   暖金强调色 + 纸感浅色 / 深墨色双主题，适配 PC 与移动端。
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. 设计变量
   -------------------------------------------------------------------------- */

body.rom-ui {
    --rom-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --rom-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    --rom-maxw: 1320px;
    --rom-gutter: clamp(16px, 3vw, 40px);

    --rom-accent: #eba744;
    --rom-accent-2: #d98f2a;
    --rom-accent-deep: #8f5c0d;
    --rom-accent-soft: rgba(235, 167, 68, 0.16);
    --rom-accent-line: rgba(235, 167, 68, 0.38);
    --rom-accent-ink: #2b1c05;

    --rom-bg: #f4f1ea;
    --rom-bg-glow: rgba(235, 167, 68, 0.16);
    --rom-paper: #ffffff;
    --rom-paper-2: #fbfaf6;
    --rom-paper-3: #f3efe6;
    --rom-line: #e7e2d8;
    --rom-line-strong: #d8d1c3;

    --rom-ink: #23252f;
    --rom-ink-soft: #4a4d5c;
    --rom-muted: #6e6b7a;
    --rom-faint: #938e9c;

    --rom-success: #2f9268;
    --rom-danger: #cf4a4a;
    --rom-info: #3b61dd;
    --rom-warning: #b57b12;

    --rom-radius: 24px;
    --rom-radius-sm: 14px;
    --rom-radius-xs: 10px;

    --rom-shadow: 0 26px 60px -44px rgba(28, 30, 43, 0.5), 0 2px 6px rgba(28, 30, 43, 0.04);
    --rom-shadow-soft: 0 12px 32px -26px rgba(28, 30, 43, 0.45);

    --rom-header-bg: rgba(255, 255, 255, 0.84);
    --rom-header-line: rgba(35, 37, 47, 0.08);

    --rom-hero: linear-gradient(148deg, #272a3b 0%, #1d1f2c 52%, #16171f 100%);
    --rom-hero-line: rgba(255, 255, 255, 0.1);
    --rom-hero-text: #f7f4ec;
    --rom-hero-muted: #b9b6c6;
}

html[data-theme="dark"] body.rom-ui {
    --rom-accent: #f0b45c;
    --rom-accent-2: #e2a33f;
    --rom-accent-deep: #f6cd8d;
    --rom-accent-soft: rgba(240, 180, 92, 0.16);
    --rom-accent-line: rgba(240, 180, 92, 0.34);
    --rom-accent-ink: #25190a;

    --rom-bg: #101117;
    --rom-bg-glow: rgba(240, 180, 92, 0.1);
    --rom-paper: #1a1c25;
    --rom-paper-2: #20222e;
    --rom-paper-3: #262936;
    --rom-line: #2b2e3c;
    --rom-line-strong: #3b3f52;

    --rom-ink: #f4f1e9;
    --rom-ink-soft: #cfccd8;
    --rom-muted: #a6a1b1;
    --rom-faint: #847f91;

    --rom-success: #59c295;
    --rom-danger: #f07b7b;
    --rom-info: #8aa6ff;
    --rom-warning: #e6b45c;

    --rom-shadow: 0 30px 70px -44px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.3);
    --rom-shadow-soft: 0 14px 34px -26px rgba(0, 0, 0, 0.85);

    --rom-header-bg: rgba(16, 17, 23, 0.82);
    --rom-header-line: rgba(255, 255, 255, 0.08);

    --rom-hero: linear-gradient(148deg, #242838 0%, #1a1c27 55%, #14151d 100%);
    --rom-hero-line: rgba(255, 255, 255, 0.09);
}

/* --------------------------------------------------------------------------
   02. 基础
   -------------------------------------------------------------------------- */

body.rom-ui {
    margin: 0;
    min-height: 100vh;
    color: var(--rom-ink);
    background:
        radial-gradient(900px 520px at 4% -8%, var(--rom-bg-glow), transparent 62%),
        radial-gradient(760px 460px at 100% 0%, rgba(59, 97, 221, 0.05), transparent 58%),
        var(--rom-bg);
    font-family: var(--rom-font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-theme="dark"] body.rom-ui.fiime-page {
    background:
        radial-gradient(900px 520px at 4% -8%, var(--rom-bg-glow), transparent 62%),
        radial-gradient(760px 460px at 100% 0%, rgba(59, 97, 221, 0.08), transparent 58%),
        var(--rom-bg) !important;
    color: var(--rom-ink) !important;
}

body.rom-ui *,
body.rom-ui *::before,
body.rom-ui *::after {
    box-sizing: border-box;
}

body.rom-ui a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

body.rom-ui img {
    max-width: 100%;
}

body.rom-ui ::selection {
    background: var(--rom-accent-soft);
}

body.rom-ui a:focus-visible,
body.rom-ui button:focus-visible,
body.rom-ui input:focus-visible,
body.rom-ui select:focus-visible,
body.rom-ui textarea:focus-visible,
body.rom-ui summary:focus-visible {
    outline: 2px solid var(--rom-accent);
    outline-offset: 2px;
}

body.rom-ui .rom-sprite {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.rom-ico {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -3px;
}

.rom-ico--sm { width: 15px; height: 15px; }
.rom-ico--lg { width: 22px; height: 22px; }

body.rom-ui h1,
body.rom-ui h2,
body.rom-ui h3,
body.rom-ui h4,
body.rom-ui h5 {
    margin: 0;
    color: inherit;
    font-family: var(--rom-font);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

body.rom-ui p { margin: 0; }

.rom-main {
    position: relative;
    padding-top: 64px;
    min-height: 60vh;
}

.rom-shell {
    width: 100%;
    max-width: var(--rom-maxw);
    margin: 0 auto;
    padding: 0 var(--rom-gutter);
}

.rom-mono {
    font-family: var(--rom-mono);
    font-size: 0.92em;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   03. 顶部导航（复用站点 header，仅在本组页面重绘）
   -------------------------------------------------------------------------- */

body.rom-ui .knsl-top-bar {
    height: 64px !important;
    background: var(--rom-header-bg) !important;
    border-bottom: 1px solid var(--rom-header-line);
    border-radius: 0 !important;
    box-shadow: 0 10px 30px -26px rgba(28, 30, 43, 0.45) !important;
    -webkit-backdrop-filter: saturate(150%) blur(16px);
    backdrop-filter: saturate(150%) blur(16px);
}

body.rom-ui .knsl-top-bar > .container {
    height: 64px !important;
    max-width: var(--rom-maxw);
    margin: 0 auto;
    padding-left: var(--rom-gutter) !important;
    padding-right: var(--rom-gutter) !important;
    gap: 12px;
}

body.rom-ui .knsl-top-bar .knsl-left-side {
    height: 64px !important;
    margin-left: 0 !important;
}

body.rom-ui .knsl-top-bar .knsl-left-side .knsl-logo-frame { height: 64px !important; }

body.rom-ui .knsl-top-bar .knsl-left-side .knsl-logo-frame img {
    width: 104px !important;
    max-height: 34px;
    filter: none;
}

html[data-theme="dark"] body.rom-ui .knsl-top-bar .knsl-logo-frame img {
    filter: brightness(0) invert(1);
}

body.rom-ui .knsl-top-bar .knsl-right-side {
    height: 64px !important;
    margin: 0 0 0 auto !important;
    background: transparent !important;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul { gap: 2px; }

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li { height: 64px !important; }

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a,
body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a {
    height: 38px !important;
    padding: 0 11px !important;
    border-radius: 999px;
    color: var(--rom-ink-soft) !important;
    font-size: 14px;
    font-weight: 600;
    transition: background-color .18s ease, color .18s ease;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a:hover,
body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a:hover,
body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li:focus-within > a {
    color: var(--rom-accent-deep) !important;
    background: var(--rom-accent-soft) !important;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a.is-current {
    color: var(--rom-accent-deep) !important;
    background: var(--rom-accent-soft) !important;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > ul {
    background: var(--rom-paper) !important;
    border: 1px solid var(--rom-line) !important;
    border-radius: var(--rom-radius-sm) !important;
    box-shadow: var(--rom-shadow) !important;
}

html[data-theme="dark"] body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > ul {
    background: var(--rom-paper-2) !important;
    border-color: var(--rom-line) !important;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > ul li > a {
    color: var(--rom-ink-soft) !important;
    border-radius: 8px;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > ul li > a:hover {
    color: var(--rom-accent-deep) !important;
    background: var(--rom-accent-soft) !important;
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a[href*="login"] {
    background: linear-gradient(135deg, var(--rom-accent), var(--rom-accent-2)) !important;
    color: var(--rom-accent-ink) !important;
    box-shadow: 0 8px 18px -12px rgba(235, 167, 68, 0.9);
}

body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a[href*="login"]:hover {
    filter: brightness(1.04);
}

body.rom-ui .knsl-top-bar .knsl-menu-btn {
    background: var(--rom-paper-3) !important;
}

body.rom-ui .knsl-top-bar .knsl-menu-btn span,
body.rom-ui .knsl-top-bar .knsl-menu-btn span::before,
body.rom-ui .knsl-top-bar .knsl-menu-btn span::after {
    background: var(--rom-ink) !important;
}

body.rom-ui .fiime-prefs {
    display: none;
    margin-left: 10px;
}

body.rom-ui.fiime-page .fiime-prefs { display: flex !important; }

body.rom-ui .fiime-pref {
    height: 34px;
    border: 1px solid var(--rom-line) !important;
    border-radius: 999px !important;
    background: var(--rom-paper-2) !important;
    color: var(--rom-ink-soft) !important;
}

body.rom-ui .fiime-pref:hover {
    border-color: var(--rom-accent-line) !important;
    background: var(--rom-accent-soft) !important;
    color: var(--rom-accent-deep) !important;
}

body.rom-ui .fiime-lang-toggle { width: 60px; }

html[data-lang="zh"] body.rom-ui .fiime-lang-toggle .fiime-lang-zh,
html[data-lang="en"] body.rom-ui .fiime-lang-toggle .fiime-lang-en {
    color: var(--rom-accent-deep) !important;
    background: var(--rom-paper) !important;
    box-shadow: 0 1px 4px rgba(28, 30, 43, 0.12) !important;
}

html[data-theme="dark"] body.rom-ui .fiime-lang-toggle span {
    background: transparent !important;
    color: var(--rom-muted) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.rom-ui .fiime-lang-toggle .fiime-lang-zh,
html[data-theme="dark"] body.rom-ui .fiime-lang-toggle .fiime-lang-en {
    color: var(--rom-accent) !important;
}

@media (max-width: 992px) {
    body.rom-ui .knsl-top-bar {
        height: 64px !important;
        padding: 0 var(--rom-gutter) !important;
    }
    body.rom-ui .knsl-top-bar > .container { height: 64px !important; padding: 0 !important; }
    body.rom-ui .knsl-top-bar .knsl-right-side {
        top: 64px !important;
        height: auto !important;
        max-height: calc(100dvh - 64px) !important;
        background: var(--rom-paper) !important;
        border-radius: 0 0 20px 20px !important;
        box-shadow: var(--rom-shadow) !important;
    }
    html[data-theme="dark"] body.rom-ui.fiime-page .knsl-top-bar .knsl-right-side {
        background: var(--rom-paper-2) !important;
    }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li { border-bottom-color: var(--rom-line) !important; }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a,
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a {
        color: var(--rom-ink) !important;
    }
    html[data-theme="dark"] body.rom-ui.fiime-page .knsl-top-bar .knsl-menu nav > ul > li > a {
        color: var(--rom-ink) !important;
    }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > ul {
        background: var(--rom-paper-3) !important;
    }
    html[data-theme="dark"] body.rom-ui.fiime-page .knsl-top-bar .knsl-menu nav > ul > li > ul {
        background: var(--rom-paper-3) !important;
    }

    /* 与 common/head.html 的移动端菜单保持同一套：48px 行高、左对齐 */
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li { height: auto !important; }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a,
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a {
        height: 48px !important;
        padding: 0 48px 0 6px !important;
        border-radius: 0;
        font-size: 15px;
    }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a {
        height: 36px !important;
        padding: 0 12px !important;
        border-radius: 9px;
        font-size: 13px;
    }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > a[href*="login"] {
        height: 44px !important;
        margin: 10px 0 4px;
        padding: 0 16px !important;
        border-radius: 10px;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   04. Hero
   -------------------------------------------------------------------------- */

.rom-hero {
    padding: clamp(18px, 3vw, 34px) 0 0;
}

.rom-hero__card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--rom-hero-line);
    border-radius: clamp(20px, 2.6vw, 32px);
    padding: clamp(26px, 4vw, 56px);
    color: var(--rom-hero-text);
    background: var(--rom-hero);
    box-shadow: 0 30px 70px -50px rgba(22, 24, 38, 0.9), 0 2px 6px rgba(22, 24, 38, 0.08);
}

.rom-hero__card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(120% 90% at 80% 0%, #000 0%, transparent 65%);
    mask-image: radial-gradient(120% 90% at 80% 0%, #000 0%, transparent 65%);
}

.rom-hero__orbs {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.rom-hero__orbs i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(46px);
    opacity: 0.55;
    animation: rom-float 12s ease-in-out infinite alternate;
}

.rom-hero__orbs i:nth-child(1) {
    width: 320px;
    height: 320px;
    top: -130px;
    right: -60px;
    background: rgba(235, 167, 68, 0.42);
}

.rom-hero__orbs i:nth-child(2) {
    width: 260px;
    height: 260px;
    bottom: -150px;
    left: 12%;
    background: rgba(59, 97, 221, 0.3);
    animation-delay: -4s;
}

.rom-hero__orbs i:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 20%;
    left: 46%;
    background: rgba(240, 180, 92, 0.22);
    animation-delay: -7s;
}

@keyframes rom-float {
    from { transform: translate3d(-12px, -8px, 0) scale(1); }
    to { transform: translate3d(18px, 16px, 0) scale(1.08); }
}

.rom-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: clamp(18px, 3vw, 30px);
    color: var(--rom-hero-muted);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.rom-crumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    transition: background-color .18s ease, color .18s ease;
}

.rom-crumb a:hover {
    color: var(--rom-hero-text);
    background: rgba(255, 255, 255, 0.08);
}

.rom-crumb__sep { opacity: 0.45; }

.rom-crumb [aria-current="page"] { color: var(--rom-hero-text); }

.rom-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
    align-items: end;
    gap: clamp(20px, 4vw, 48px);
}

.rom-hero__copy > * {
    animation: rom-rise .7s cubic-bezier(.22, .68, 0, 1) both;
}
.rom-hero__copy > *:nth-child(1) { animation-delay: .04s; }
.rom-hero__copy > *:nth-child(2) { animation-delay: .1s; }
.rom-hero__copy > *:nth-child(3) { animation-delay: .16s; }
.rom-hero__copy > *:nth-child(4) { animation-delay: .22s; }
.rom-hero__copy > *:nth-child(5) { animation-delay: .28s; }

@keyframes rom-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.rom-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--rom-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rom-eyebrow .rom-ico { width: 16px; height: 16px; }

.rom-title {
    font-size: clamp(32px, 5.4vw, 60px);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.06;
    color: var(--rom-hero-text);
}

.rom-title em {
    font-style: normal;
    color: var(--rom-accent);
}

.rom-lede {
    max-width: 62ch;
    margin-top: 18px;
    color: var(--rom-hero-muted);
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.8;
}

.rom-lede b,
.rom-lede strong { color: var(--rom-hero-text); font-weight: 700; }

.rom-lede font[color="red"] { color: #ff9b8f !important; }

.rom-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.rom-hero__aside {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--rom-hero-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.rom-hero__metric {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.rom-hero__metric strong {
    color: var(--rom-accent);
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}

.rom-hero__metric span {
    color: var(--rom-hero-muted);
    font-size: 13px;
}

.rom-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--rom-hero-line);
}

.rom-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--rom-hero-muted);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.rom-hero__aside--action .rom-btn { width: 100%; justify-content: center; }

.rom-hero__aside--action > small {
    color: var(--rom-hero-muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rom-hero__aside--action > strong {
    color: var(--rom-hero-text);
    font-size: 20px;
    font-weight: 800;
}

/* 详情页 hero 紧凑模式 */
.rom-hero--compact .rom-title { font-size: clamp(28px, 4.2vw, 46px); }
.rom-hero--compact .rom-lede { margin-top: 12px; }
.rom-hero--compact .rom-crumb { margin-bottom: 18px; }

.rom-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
}

.rom-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    min-height: 27px;
    padding: 4px 10px;
    border: 1px solid var(--rom-line);
    border-radius: 999px;
    background: var(--rom-paper-2);
    color: var(--rom-ink-soft);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rom-chip--gold {
    border-color: var(--rom-accent-line);
    background: var(--rom-accent-soft);
    color: var(--rom-accent-deep);
}

.rom-chip--warn {
    border-color: rgba(181, 123, 18, 0.28);
    background: rgba(181, 123, 18, 0.1);
    color: var(--rom-warning);
}

.rom-chip--ok {
    border-color: rgba(47, 146, 104, 0.28);
    background: rgba(47, 146, 104, 0.1);
    color: var(--rom-success);
}

.rom-chip--danger {
    border-color: rgba(207, 74, 74, 0.28);
    background: rgba(207, 74, 74, 0.1);
    color: var(--rom-danger);
}

.rom-hero .rom-chip {
    border-color: var(--rom-hero-line);
    background: rgba(255, 255, 255, 0.07);
    color: var(--rom-hero-text);
}

.rom-hero .rom-chip--gold {
    border-color: var(--rom-accent-line);
    background: rgba(235, 167, 68, 0.16);
    color: var(--rom-accent);
}

/* --------------------------------------------------------------------------
   05. 按钮 / 搜索
   -------------------------------------------------------------------------- */

.rom-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--rom-ink);
    background: var(--rom-paper);
    font-family: var(--rom-font);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

.rom-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: skewX(-18deg);
    transition: left .55s ease;
}

.rom-btn:hover::after { left: 125%; }

.rom-btn:hover { transform: translateY(-1px); }

.rom-btn:active { transform: translateY(0) scale(.99); }

.rom-btn .rom-ico { width: 16px; height: 16px; }

.rom-btn--lg { min-height: 48px; padding: 0 24px; font-size: 14.5px; }

.rom-btn--accent {
    color: var(--rom-accent-ink);
    background: linear-gradient(135deg, #f2b757 0%, var(--rom-accent) 42%, var(--rom-accent-2) 100%);
    box-shadow: 0 12px 26px -18px rgba(217, 143, 42, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rom-btn--accent:hover { box-shadow: 0 16px 30px -16px rgba(217, 143, 42, 0.9); }

.rom-btn--ghost {
    border-color: var(--rom-line-strong);
    background: var(--rom-paper);
    color: var(--rom-ink-soft);
}

.rom-btn--ghost:hover {
    border-color: var(--rom-accent-line);
    background: var(--rom-accent-soft);
    color: var(--rom-accent-deep);
}

.rom-btn--glass {
    border-color: var(--rom-hero-line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--rom-hero-text);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.rom-btn--glass:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 26px -22px rgba(0, 0, 0, 0.8);
}

.rom-btn--icon {
    width: 42px;
    min-width: 42px;
    padding: 0;
}

.rom-btn--quiet {
    border-color: transparent;
    background: transparent;
    color: var(--rom-muted);
}

.rom-btn--quiet:hover { background: var(--rom-paper-3); color: var(--rom-ink); }

.rom-btn[disabled],
.rom-btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.rom-search-section {
    display: flow-root;
    padding: 0;
}

/* 搜索区紧接的资源列表：收紧顶部留白，避免搜索框下方出现大片空白 */
.rom-search-section + .rom-section {
    padding-top: clamp(24px, 3vw, 36px);
}

.rom-search {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 18px auto 0;
    padding: 9px;
    border: 1px solid var(--rom-line);
    border-radius: 999px;
    background: var(--rom-paper);
    box-shadow: var(--rom-shadow);
}

.rom-search__field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.rom-search__field .rom-ico {
    position: absolute;
    left: 14px;
    color: var(--rom-faint);
    pointer-events: none;
}

.rom-search__field input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 42px;
    border: 0;
    border-radius: 999px;
    background: var(--rom-paper-2);
    color: var(--rom-ink);
    font-family: var(--rom-font);
    font-size: 14.5px;
    outline: none;
    transition: background-color .18s ease, box-shadow .18s ease;
}

.rom-search__field input::placeholder { color: var(--rom-faint); }

.rom-search__field input:focus {
    background: var(--rom-paper);
    box-shadow: inset 0 0 0 2px var(--rom-accent-line);
}

.rom-search .rom-btn { min-height: 46px; padding: 0 26px; }

/* --------------------------------------------------------------------------
   06. 区块与标题
   -------------------------------------------------------------------------- */

.rom-section {
    padding: clamp(34px, 5vw, 64px) 0;
}

.rom-section--tight { padding-top: clamp(24px, 3vw, 34px); }

.rom-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: clamp(18px, 2.6vw, 28px);
}

.rom-section__head h2 {
    font-size: clamp(22px, 2.6vw, 30px);
    letter-spacing: -0.03em;
}

.rom-kicker {
    margin-bottom: 6px;
    color: var(--rom-accent-deep);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rom-section__note {
    max-width: 56ch;
    color: var(--rom-muted);
    font-size: 13px;
}

.rom-section__count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--rom-line);
    border-radius: 999px;
    background: var(--rom-paper);
    color: var(--rom-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.rom-section__count strong { color: var(--rom-ink); font-weight: 800; }

/* --------------------------------------------------------------------------
   07. 资源卡片
   -------------------------------------------------------------------------- */

.rom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: clamp(14px, 2vw, 22px);
}

.rom-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--rom-line);
    border-radius: 22px;
    background: var(--rom-paper);
    box-shadow: var(--rom-shadow-soft);
    overflow: hidden;
    transition: transform .28s cubic-bezier(.2, .7, .2, 1), box-shadow .28s ease, border-color .28s ease;
}

.rom-card:hover {
    transform: translateY(-6px);
    border-color: var(--rom-accent-line);
    box-shadow: var(--rom-shadow);
}

.rom-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(235, 167, 68, 0.28), transparent 60%),
        linear-gradient(145deg, var(--rom-paper-3), var(--rom-paper-2));
}

.rom-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}

.rom-card:hover .rom-card__cover img { transform: scale(1.06); }

.rom-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 17, 23, 0) 52%, rgba(16, 17, 23, 0.42) 100%);
    pointer-events: none;
}

.rom-card__cover--glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 8;
}

.rom-card__cover--glyph .rom-ico {
    width: 58px;
    height: 58px;
    color: var(--rom-accent);
    stroke-width: 1.2;
    opacity: 0.9;
}

.rom-card__cover--glyph::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px dashed var(--rom-accent-line);
    border-radius: 14px;
    pointer-events: none;
}

.rom-card__cover--glyph .rom-card__glyph-label {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--rom-accent-deep);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.rom-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(16, 17, 23, 0.56);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.rom-badge--gold {
    border-color: rgba(235, 167, 68, 0.5);
    background: rgba(235, 167, 68, 0.9);
    color: #2b1c05;
}

.rom-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 13px;
    padding: 18px;
}

.rom-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--rom-ink);
    font-size: 16.5px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.42;
    transition: color .18s ease;
}

.rom-card__title:hover { color: var(--rom-accent-deep); }

.rom-card__sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -6px;
    color: var(--rom-faint);
    font-size: 12px;
}

.rom-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
    padding: 0;
}

.rom-specs > div {
    min-width: 0;
    margin: 0;
}

.rom-specs dt {
    margin: 0 0 2px;
    color: var(--rom-faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rom-specs dd {
    margin: 0;
    color: var(--rom-ink-soft);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rom-specs dd.rom-mono { font-size: 11.5px; }

.rom-card__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--rom-line);
}

.rom-card__foot .rom-btn { flex: 0 0 auto; }
.rom-card__foot .rom-btn--grow { flex: 1 1 auto; }

.rom-fav {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--rom-faint);
    font-family: var(--rom-font);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.rom-fav:hover { color: var(--rom-accent-deep); background: var(--rom-accent-soft); }
.rom-fav.is-active { color: var(--rom-accent-deep); }
.rom-fav .rom-ico { width: 15px; height: 15px; }

.rom-card__note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px dashed var(--rom-line-strong);
    border-radius: var(--rom-radius-xs);
    color: var(--rom-muted);
    font-size: 12px;
    line-height: 1.5;
}

.rom-card__note a {
    color: var(--rom-danger);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rom-empty {
    padding: 42px 20px;
    border: 1px dashed var(--rom-line-strong);
    border-radius: var(--rom-radius);
    color: var(--rom-muted);
    text-align: center;
}

/* --------------------------------------------------------------------------
   08. 分页
   -------------------------------------------------------------------------- */

.rom-pager-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(22px, 3vw, 34px);
    color: var(--rom-muted);
    font-size: 12.5px;
}

.rom-pager-wrap strong { color: var(--rom-ink); }

.rom-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rom-pager li { list-style: none; }

.rom-pager a,
.rom-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--rom-line);
    border-radius: 999px;
    background: var(--rom-paper);
    color: var(--rom-ink-soft);
    font-size: 12.5px;
    font-weight: 700;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.rom-pager a:hover {
    border-color: var(--rom-accent-line);
    background: var(--rom-accent-soft);
    color: var(--rom-accent-deep);
}

.rom-pager .active a,
.rom-pager .active span {
    border-color: transparent;
    background: linear-gradient(135deg, var(--rom-accent), var(--rom-accent-2));
    color: var(--rom-accent-ink);
}

.rom-pager .disabled a {
    opacity: 0.4;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   09. 详情页布局
   -------------------------------------------------------------------------- */

.rom-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    align-items: start;
    gap: clamp(18px, 2.6vw, 28px);
}

.rom-detail__main { min-width: 0; }

.rom-panel {
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius);
    background: var(--rom-paper);
    box-shadow: var(--rom-shadow-soft);
    padding: clamp(18px, 2.6vw, 28px);
}

.rom-panel[id],
.rom-section[id] {
    scroll-margin-top: 84px;
}

.rom-panel + .rom-panel,
.rom-panel + section,
.rom-detail__main > section + .rom-panel {
    margin-top: clamp(16px, 2vw, 22px);
}

.rom-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.rom-panel__head h2,
.rom-panel__head h3 {
    font-size: clamp(18px, 2vw, 22px);
    letter-spacing: -0.025em;
}

.rom-panel__head p { color: var(--rom-muted); font-size: 12.5px; }

.rom-panel__head .rom-chip { font-size: 11px; }

.rom-media {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(190px, 1fr);
    gap: clamp(16px, 2.4vw, 26px);
    align-items: stretch;
}

.rom-media__img {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--rom-paper-3);
}

.rom-media__img img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 210px;
    max-height: 360px;
    object-fit: cover;
}

.rom-media__side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.rom-media__badge {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rom-line);
}

.rom-media__badge > span {
    color: var(--rom-faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rom-media__badge > strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--rom-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.rom-media__list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0;
}

.rom-media__list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--rom-line);
}

.rom-media__list dt {
    color: var(--rom-faint);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.rom-media__list dd {
    margin: 0;
    color: var(--rom-ink-soft);
    font-size: 12.5px;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.rom-media__qrc {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
}

.rom-media__qrc > div {
    background: transparent !important;
    display: flex;
    align-items: center;
}

body.rom-ui #popopop {
    float: none !important;
    margin: 0 !important;
    max-width: 74px !important;
    padding: 6px;
    border: 1px solid var(--rom-line);
    border-radius: 12px;
    background: var(--rom-paper);
}

.rom-media__hits {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--rom-muted);
    font-size: 12px;
    font-weight: 600;
}

.rom-media__hits .rom-ico { color: var(--rom-accent-deep); }

.rom-specs--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 18px;
}

.rom-specs--grid > div {
    padding: 12px 14px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
}

.rom-specs--grid dd { white-space: normal; font-size: 13.5px; }

.rom-specs--grid .rom-spec--wide { grid-column: 1 / -1; }

/* 下载面板 */
.rom-download {
    position: relative;
    overflow: hidden;
    border-color: var(--rom-accent-line);
    background:
        radial-gradient(420px 240px at 100% 0%, var(--rom-accent-soft), transparent 70%),
        var(--rom-paper);
}

.rom-download::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--rom-accent), transparent);
}

.rom-download__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 16px;
}

.rom-download__actions form { margin: 0; }

.rom-download__actions .rom-btn small {
    color: inherit;
    font-size: 11.5px;
    font-weight: 600;
    opacity: 0.8;
}

.rom-download__actions .rom-btn b {
    font-size: 12.5px;
    font-weight: 800;
}

.rom-download__actions svg.icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.rom-download__hint {
    color: var(--rom-muted);
    font-size: 12.5px;
    line-height: 1.7;
}

.rom-notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(181, 123, 18, 0.3);
    border-radius: var(--rom-radius-sm);
    background: rgba(181, 123, 18, 0.08);
    color: var(--rom-ink-soft);
    font-size: 12.5px;
    line-height: 1.7;
}

.rom-notice .rom-ico {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--rom-warning);
}

.rom-notice strong {
    display: block;
    margin-bottom: 2px;
    color: var(--rom-ink);
    font-size: 13px;
}

.rom-notice a { color: var(--rom-info); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.rom-alert {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-3);
    color: var(--rom-ink-soft);
    font-size: 13px;
    line-height: 1.75;
}

.rom-alert--success { background: rgba(47, 146, 104, 0.1); color: var(--rom-ink-soft); }
.rom-alert--danger { background: rgba(207, 74, 74, 0.1); }
.rom-alert strong { color: var(--rom-ink); }

/* 正文 */
.rom-prose {
    color: var(--rom-ink-soft);
    font-size: 14px;
    line-height: 1.9;
    word-break: break-word;
}

.rom-prose > * + * { margin-top: 12px; }

.rom-prose h3,
.rom-prose h4 {
    color: var(--rom-ink);
    font-size: 15.5px;
}

.rom-prose a {
    color: var(--rom-accent-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rom-prose code {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid var(--rom-line);
    border-radius: 7px;
    background: var(--rom-paper-3);
    color: var(--rom-accent-deep);
    font-family: var(--rom-mono);
    font-size: 12.5px;
}

.rom-prose pre {
    padding: 14px 16px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-3);
    color: var(--rom-ink-soft);
    font-family: var(--rom-mono);
    font-size: 12.5px;
    line-height: 1.8;
    overflow-x: auto;
}

.rom-prose blockquote {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--rom-line);
    border-left: 4px solid var(--rom-accent);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
    color: var(--rom-ink-soft);
    font-size: 13.5px;
    font-style: normal;
    text-align: left;
}

.rom-prose blockquote a { color: var(--rom-danger); }

.rom-prose font[color="red"],
.rom-alert font[color="red"],
.rom-notice font[color="red"] { color: var(--rom-danger) !important; }
.rom-prose font[color="blue"] { color: var(--rom-info) !important; }

.rom-steps {
    display: grid;
    gap: 12px;
    counter-reset: rom-step;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rom-steps li {
    position: relative;
    padding: 12px 14px 12px 52px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
    color: var(--rom-ink-soft);
    font-size: 13px;
    line-height: 1.8;
}

.rom-steps li::before {
    counter-increment: rom-step;
    content: counter(rom-step, decimal-leading-zero);
    position: absolute;
    top: 12px;
    left: 14px;
    color: var(--rom-accent-deep);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.rom-steps code {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 7px;
    background: var(--rom-paper-3);
    font-family: var(--rom-mono);
    font-size: 12px;
}

.rom-gallery .knsl-about-slider1 {
    width: 100%;
    max-width: 100%;
    border-radius: var(--rom-radius-sm);
    overflow: hidden;
}

.rom-gallery > p.knsl-mb-40 { display: none; }

.rom-gallery .swiper-wrapper { display: flex; }

.rom-gallery .swiper-slide {
    height: auto;
}

/* 恢复原 Swiper 左右切换 + 分页控件 */
.rom-gallery .knsl-slider-nav-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.rom-gallery .col-lg-12 { padding: 0; width: 100%; }

.rom-gallery .knsl-image-frame {
    position: relative;
    overflow: hidden;
    height: auto;
    padding-bottom: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.rom-gallery .knsl-image-frame > a {
    display: block;
    width: 100%;
}

.rom-gallery .knsl-image-frame img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: initial;
    object-position: center;
}

.rom-gallery .knsl-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(16, 17, 23, 0.55);
    color: #fff;
}

.rom-gallery .knsl-about-slider-nav {
    position: static;
    display: flex;
    gap: 8px;
    background: transparent;
    box-shadow: none;
}

.rom-gallery .knsl-about-slider-1-prev,
.rom-gallery .knsl-about-slider-1-next {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border: 1px solid var(--rom-line);
    border-radius: 50%;
    background: var(--rom-paper);
    color: var(--rom-ink-soft);
    cursor: pointer;
}

.rom-gallery .knsl-about-slider-1-pagination {
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: var(--rom-muted);
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   10. 侧栏
   -------------------------------------------------------------------------- */

.rom-side { min-width: 0; }

.rom-side__inner {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rom-side-card {
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius);
    background: var(--rom-paper);
    box-shadow: var(--rom-shadow-soft);
    padding: 18px;
}

.rom-side-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.rom-side-card__head h2,
.rom-side-card__head h3 {
    font-size: 15.5px;
    letter-spacing: -0.02em;
}

.rom-side-card__head span {
    color: var(--rom-faint);
    font-size: 11px;
}

.rom-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rom-topic {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 92px;
    padding: 10px;
    border-radius: var(--rom-radius-sm);
    background-color: var(--rom-paper-3);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    isolation: isolate;
}

.rom-topic::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(16, 17, 23, 0.05), rgba(16, 17, 23, 0.78));
}

.rom-topic strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
}

.rom-topic > span {
    display: block;
    width: 100%;
    min-width: 0;
}

.rom-topic small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
}

.rom-related {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rom-related__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: var(--rom-radius-xs);
    transition: background-color .18s ease;
}

.rom-related__item:hover { background: var(--rom-paper-2); }

.rom-related__thumb {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--rom-paper-3);
}

.rom-related__thumb img { width: 100%; height: 100%; object-fit: cover; }

.rom-related__thumb--glyph {
    display: grid;
    place-items: center;
    color: var(--rom-accent-deep);
}

.rom-related__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.rom-related__body strong {
    overflow: hidden;
    color: var(--rom-ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rom-related__body small {
    overflow: hidden;
    color: var(--rom-faint);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rom-related__item > .rom-ico {
    flex: 0 0 auto;
    color: var(--rom-faint);
}

.rom-side-empty {
    padding: 14px 6px;
    color: var(--rom-faint);
    font-size: 12px;
    text-align: center;
}

.rom-points {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rom-points__value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rom-points__value strong {
    color: var(--rom-accent-deep);
    font-size: clamp(30px, 3.4vw, 38px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.rom-points__value span { color: var(--rom-muted); font-size: 11.5px; }

.rom-points__value b { color: var(--rom-accent-deep); font-weight: 700; }

.rom-points__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--rom-muted);
    font-size: 11.5px;
}

.rom-points__meta b { color: var(--rom-info); }

.rom-points__note {
    padding-top: 10px;
    border-top: 1px dashed var(--rom-line);
    color: var(--rom-faint);
    font-size: 11px;
    line-height: 1.75;
}

.rom-pack {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
}

.rom-pack + .rom-pack { margin-top: 8px; }

.rom-pack__icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--rom-accent-soft);
    color: var(--rom-accent-deep);
}

.rom-pack__body { flex: 1 1 auto; min-width: 0; }

.rom-pack__body strong {
    display: block;
    color: var(--rom-ink);
    font-size: 12.5px;
    font-weight: 700;
}

.rom-pack__body small {
    display: block;
    color: var(--rom-faint);
    font-size: 11px;
}

.rom-pack__body b { color: var(--rom-danger); font-weight: 800; }

.rom-pack .rom-btn { min-height: 34px; padding: 0 12px; font-size: 12px; }

.rom-subscribe {
    display: flex;
    gap: 12px;
    align-items: center;
}

.rom-subscribe img {
    flex: 0 0 92px;
    width: 92px;
    border-radius: 10px;
    border: 1px solid var(--rom-line);
}

.rom-subscribe p { color: var(--rom-muted); font-size: 11.5px; line-height: 1.75; }

.rom-side-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rom-side-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 8px;
    border-radius: var(--rom-radius-xs);
    color: var(--rom-ink-soft);
    font-size: 12.5px;
    font-weight: 600;
    transition: background-color .18s ease, color .18s ease;
}

.rom-side-link:hover { background: var(--rom-paper-2); color: var(--rom-accent-deep); }
.rom-side-link .rom-ico { color: var(--rom-faint); }

.rom-side-article {
    display: block;
    padding: 10px 2px;
    border-bottom: 1px dashed var(--rom-line);
}

.rom-side-article:last-child { border-bottom: 0; }

.rom-side-article strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--rom-ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.55;
}

.rom-side-article:hover strong { color: var(--rom-accent-deep); }

.rom-side-article small {
    display: block;
    margin-top: 4px;
    color: var(--rom-faint);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* FAQ */
.rom-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rom-faq details {
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
    overflow: hidden;
}

.rom-faq summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 38px 12px 13px;
    color: var(--rom-ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.55;
    cursor: pointer;
    list-style: none;
}

.rom-faq summary::-webkit-details-marker { display: none; }

.rom-faq summary::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--rom-faint);
    border-bottom: 2px solid var(--rom-faint);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
}

.rom-faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.rom-faq .rom-faq__body {
    padding: 0 13px 13px;
    color: var(--rom-muted);
    font-size: 12px;
    line-height: 1.8;
}

.rom-faq .rom-faq__body a {
    color: var(--rom-accent-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   11. 表单（提交页）
   -------------------------------------------------------------------------- */

.rom-form-card {
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius);
    background: var(--rom-paper);
    box-shadow: var(--rom-shadow);
    padding: clamp(20px, 3vw, 36px);
}

.rom-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px 14px;
}

.rom-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.rom-field--3 { grid-column: span 3; }
.rom-field--4 { grid-column: span 4; }
.rom-field--6 { grid-column: span 6; }
.rom-field--8 { grid-column: span 8; }
.rom-field--12 { grid-column: 1 / -1; }

.rom-field label {
    color: var(--rom-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.rom-field label b { color: var(--rom-danger); }

.rom-field input,
.rom-field select,
.rom-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-xs);
    background: var(--rom-paper-2);
    color: var(--rom-ink);
    font-family: var(--rom-font);
    font-size: 13.5px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.rom-field input::placeholder,
.rom-field textarea::placeholder { color: var(--rom-faint); }

.rom-field input:focus,
.rom-field select:focus,
.rom-field textarea:focus {
    border-color: var(--rom-accent-line);
    background: var(--rom-paper);
    box-shadow: 0 0 0 3px var(--rom-accent-soft);
}

.rom-field textarea { min-height: 180px; resize: vertical; line-height: 1.8; }

.rom-field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--rom-muted) 50%),
        linear-gradient(135deg, var(--rom-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.rom-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px dashed var(--rom-line-strong);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
}

.rom-upload input[type="file"] { padding: 8px; background: transparent; min-height: 0; }

.rom-upload .view_img img {
    max-height: 84px;
    border-radius: 10px;
    border: 1px solid var(--rom-line);
}

.rom-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--rom-line);
}

.rom-form-actions p { color: var(--rom-faint); font-size: 11.5px; line-height: 1.7; }

.rom-form-actions a { color: var(--rom-accent-deep); text-decoration: underline; text-underline-offset: 3px; }

.rom-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rom-feature {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper);
}

.rom-feature img { width: 34px; height: 34px; object-fit: contain; }

.rom-feature h3 { font-size: 13.5px; margin-bottom: 3px; }
.rom-feature p { color: var(--rom-muted); font-size: 12px; line-height: 1.7; }

/* CKEditor 5 适配 */
body.rom-ui .ck.ck-editor__main > .ck-editor__editable,
body.rom-ui .ck.ck-editor__top .ck-sticky-panel .ck-toolbar {
    border-color: var(--rom-line) !important;
    background: var(--rom-paper-2) !important;
    color: var(--rom-ink) !important;
}

body.rom-ui .ck.ck-editor__main > .ck-editor__editable {
    border-radius: 0 0 var(--rom-radius-sm) var(--rom-radius-sm) !important;
    min-height: 180px;
}

body.rom-ui .ck.ck-editor__top .ck-sticky-panel .ck-toolbar {
    border-radius: var(--rom-radius-sm) var(--rom-radius-sm) 0 0 !important;
}

body.rom-ui .ck.ck-button,
body.rom-ui .ck.ck-button .ck-icon { color: var(--rom-ink-soft) !important; }

/* CKEditor 4（提交移植页） */
body.rom-ui .cke_chrome {
    border-color: var(--rom-line) !important;
    border-radius: var(--rom-radius-sm) !important;
    overflow: hidden;
}

body.rom-ui .cke_inner,
body.rom-ui .cke_contents { background: var(--rom-paper-2) !important; }

body.rom-ui .cke_top {
    border-bottom-color: var(--rom-line) !important;
    background: var(--rom-paper-3) !important;
}

body.rom-ui .cke_bottom {
    border-top-color: var(--rom-line) !important;
    background: var(--rom-paper-3) !important;
}

/* --------------------------------------------------------------------------
   12. 评论组件（兼容旧模板结构）
   -------------------------------------------------------------------------- */

/* 旧评论模板依赖 knsl 滚动动画脚本加 .knsl-active-el 才显示；
   rom-ui 页面没有加载该脚本，评论标题、卡片和表单会一直 opacity:0，这里直接常显 */
body.rom-ui .knsl-scroll-animation {
    opacity: 1 !important;
    transform: none !important;
    -webkit-transform: none !important;
}

.rom-comments { margin-top: clamp(16px, 2vw, 22px); }

.rom-comments .knsl-review-card {
    height: auto;
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
    box-shadow: none;
}

.rom-comments .knsl-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.rom-comments .knsl-name-and-photo { display: flex; gap: 10px; align-items: flex-start; }

.rom-comments .knsl-avatar-frame {
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
    overflow: hidden;
    border-radius: 50%;
    background: var(--rom-paper-3);
}

/* 评论头像外层还有 <a>，必须撑满圆框，否则 img 的百分比宽高失效会被压扁 */
.rom-comments .knsl-avatar-frame > a {
    display: block;
    width: 100%;
    height: 100%;
}

.rom-comments .knsl-avatar-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.rom-comments .knsl-card-header h5 {
    color: var(--rom-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.rom-comments .knsl-card-header h5 small { font-weight: 400; }

.rom-comments .knsl-card-header span {
    color: var(--rom-faint);
    font-size: 11px;
}

.rom-comments blockquote {
    margin: 8px 0 0;
    padding: 12px 14px;
    border: 0;
    border-radius: var(--rom-radius-xs);
    background: var(--rom-paper);
    color: var(--rom-ink-soft);
    font-size: 13px;
    font-style: normal;
    line-height: 1.8;
    text-align: left;
    overflow-wrap: anywhere;
}

.rom-comments blockquote img { max-width: 100%; border-radius: 8px; }

.rom-comments #btnat,
.rom-comments #btnpost {
    float: none !important;
    margin: 10px 8px 0 0 !important;
    padding: 6px 12px;
    border: 1px solid var(--rom-line) !important;
    border-radius: 999px;
    background: var(--rom-paper) !important;
    color: var(--rom-muted) !important;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}

.rom-comments #btnat:hover,
.rom-comments #btnpost:hover {
    border-color: var(--rom-accent-line) !important;
    color: var(--rom-accent-deep) !important;
}

.rom-comments #xx_xx { padding-top: 0 !important; margin-bottom: 0 !important; }

.rom-comments form textarea {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius-sm);
    background: var(--rom-paper-2);
    color: var(--rom-ink);
    font-family: var(--rom-font);
    font-size: 13.5px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
}

.rom-comments form textarea:focus {
    border-color: var(--rom-accent-line);
    box-shadow: 0 0 0 3px var(--rom-accent-soft);
}

.rom-comments .btn-primary,
.rom-comments .btn.btn-primary {
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--rom-accent), var(--rom-accent-2)) !important;
    color: var(--rom-accent-ink) !important;
    font-weight: 700;
    box-shadow: 0 12px 24px -18px rgba(217, 143, 42, 0.9);
}

.rom-comments .knsl-form-submit-frame { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.rom-comments .knsl-text-sm { color: var(--rom-faint) !important; font-size: 11px !important; }

/* --------------------------------------------------------------------------
   13. Bootstrap 模态框 / 折叠面板适配
   -------------------------------------------------------------------------- */

body.rom-ui .modal-content {
    border: 1px solid var(--rom-line);
    border-radius: var(--rom-radius);
    background: var(--rom-paper);
    color: var(--rom-ink);
    box-shadow: var(--rom-shadow);
    overflow: hidden;
}

body.rom-ui .modal-header,
body.rom-ui .modal-footer { border-color: var(--rom-line); }

body.rom-ui .modal-header .modal-title { font-size: 16px; font-weight: 800; }

body.rom-ui .modal-body { color: var(--rom-ink-soft); font-size: 13px; line-height: 1.8; }

body.rom-ui .modal-body font[color="red"] { color: var(--rom-danger) !important; }

body.rom-ui .modal-footer { flex-wrap: wrap; gap: 8px; }

body.rom-ui .modal-backdrop.in { opacity: 0.55; }

body.rom-ui .btn-secondary {
    border: 0;
    border-radius: 999px;
    font-weight: 700;
}

body.rom-ui .close { color: var(--rom-ink); opacity: 0.6; text-shadow: none; }
body.rom-ui .close:hover { opacity: 1; }

body.rom-ui .panel {
    border-color: var(--rom-line);
    background: var(--rom-paper-2);
    box-shadow: none;
}

body.rom-ui .panel-heading { background: transparent; border-color: var(--rom-line); }
body.rom-ui .panel-title { color: var(--rom-ink); font-weight: 700; }
body.rom-ui .panel-body { color: var(--rom-muted); }

/* --------------------------------------------------------------------------
   14. 页脚
   -------------------------------------------------------------------------- */

body.rom-ui .knsl-footer {
    margin-top: clamp(30px, 5vw, 60px);
    background: var(--rom-paper-2) !important;
    border-top: 1px solid var(--rom-line);
}

body.rom-ui .knsl-copyright {
    padding: 22px 0;
    background: transparent !important;
    color: var(--rom-muted) !important;
}

body.rom-ui .knsl-copyright .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

body.rom-ui .knsl-copyright a { color: var(--rom-ink-soft) !important; }
body.rom-ui .knsl-copyright a:hover { color: var(--rom-accent-deep) !important; }

/* --------------------------------------------------------------------------
   15. 动效 / 进度条 / 悬浮操作
   -------------------------------------------------------------------------- */

.rom-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--rom-accent), var(--rom-accent-2));
    box-shadow: 0 0 12px var(--rom-accent-line);
    pointer-events: none;
    transition: width .12s linear;
}

.rom-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s cubic-bezier(.22, .68, 0, 1), transform .55s cubic-bezier(.22, .68, 0, 1);
    transition-delay: var(--rom-delay, 0s);
    will-change: opacity, transform;
}

.rom-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

.rom-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 10001;
    max-width: min(92vw, 520px);
    padding: 11px 18px;
    border: 1px solid var(--rom-hero-line);
    border-radius: 999px;
    background: rgba(20, 21, 29, 0.94);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translate(-50%, 14px);
    pointer-events: none;
    transition: opacity .24s ease, transform .24s ease;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.rom-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.rom-toast.is-ok { border-color: rgba(89, 194, 149, 0.5); }
.rom-toast.is-err { border-color: rgba(240, 123, 123, 0.5); }

.rom-top {
    position: fixed;
    right: 18px;
    bottom: 92px;
    z-index: 9998;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--rom-line);
    border-radius: 50%;
    background: var(--rom-paper);
    color: var(--rom-ink-soft);
    box-shadow: var(--rom-shadow-soft);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.rom-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.rom-top:hover { color: var(--rom-accent-deep); border-color: var(--rom-accent-line); }

/* --------------------------------------------------------------------------
   16. 响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
    .rom-detail__grid { grid-template-columns: minmax(0, 1fr) 300px; }
    .rom-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

@media (max-width: 1080px) {
    .rom-detail__grid { grid-template-columns: minmax(0, 1fr); }
    .rom-side__inner { position: static; }
    .rom-side { display: block; }
    .rom-side__inner {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
    .rom-side-card { height: 100%; }
}

@media (max-width: 900px) {
    .rom-hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .rom-hero__aside {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .rom-hero__aside--action { justify-content: flex-start; }
    .rom-hero__aside--action .rom-btn { width: auto; }
    .rom-hero__metric strong { font-size: 32px; }
    .rom-media { grid-template-columns: minmax(0, 1fr); }
    .rom-media__img img { max-height: 300px; }
    .rom-specs--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rom-feature-grid { grid-template-columns: minmax(0, 1fr); }
    .rom-field--3 { grid-column: span 6; }
    .rom-field--4 { grid-column: span 6; }
}

@media (max-width: 640px) {
    body.rom-ui { font-size: 14px; }
    .rom-main { padding-top: 62px; }
    body.rom-ui .knsl-top-bar,
    body.rom-ui .knsl-top-bar > .container,
    body.rom-ui .knsl-top-bar .knsl-left-side { height: 62px !important; }
    body.rom-ui .knsl-top-bar .knsl-left-side .knsl-logo-frame { height: 62px !important; }
    body.rom-ui .knsl-top-bar .knsl-left-side .knsl-logo-frame img { width: 88px !important; }
    body.rom-ui .knsl-top-bar .knsl-right-side { top: 62px !important; max-height: calc(100dvh - 62px) !important; }

    .rom-hero { padding-top: 12px; }
    .rom-hero__card { border-radius: 22px; padding: 22px 18px; }
    .rom-title { font-size: clamp(28px, 8.4vw, 38px); }
    .rom-lede { margin-top: 14px; font-size: 13.5px; }
    .rom-hero__actions { margin-top: 20px; }
    .rom-hero__actions .rom-btn { flex: 1 1 auto; }
    .rom-hero__aside { padding: 14px; border-radius: 16px; }
    .rom-hero__meta span { font-size: 11px; }

    .rom-search {
        position: relative;
        flex-direction: column;
        gap: 8px;
        margin-top: -24px;
        padding: 8px;
        border-radius: 22px;
    }
    .rom-search__field { width: 100%; }
    .rom-search .rom-btn { width: 100%; border-radius: 16px; }

    .rom-section { padding: 30px 0; }
    .rom-section__head { align-items: flex-start; }
    .rom-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .rom-card { border-radius: 18px; }
    .rom-card__cover { aspect-ratio: 16 / 9; }
    .rom-card__body { padding: 16px; }

    .rom-panel { padding: 16px; border-radius: 18px; }
    .rom-panel__head { align-items: flex-start; }
    .rom-specs--grid { grid-template-columns: minmax(0, 1fr); }
    .rom-download__actions .rom-btn { flex: 1 1 auto; }
    .rom-media__img img { min-height: 180px; }

    .rom-side__inner { grid-template-columns: minmax(0, 1fr); }
    .rom-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .rom-pager-wrap { justify-content: center; }
    .rom-pager { flex-wrap: wrap; justify-content: center; }

    .rom-form-grid { gap: 13px; }
    .rom-field--3,
    .rom-field--4,
    .rom-field--6,
    .rom-field--8 { grid-column: 1 / -1; }

    .rom-form-actions { flex-direction: column; align-items: stretch; }
    .rom-form-actions .rom-btn { width: 100%; }

    .rom-top { right: 14px; bottom: 86px; }
    .rom-toast { bottom: 18px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    body.rom-ui *,
    body.rom-ui *::before,
    body.rom-ui *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .rom-reveal { opacity: 1; transform: none; }
}

/* mobile menu quick links / account menu color alignment */
@media (max-width: 992px) {
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a {
        background: var(--rom-paper-3) !important;
        color: var(--rom-ink) !important;
        border: 1px solid var(--rom-line);
    }
    html[data-theme="dark"] body.rom-ui.fiime-page .knsl-top-bar .knsl-menu nav > ul > li.menu-item-has-children1 > a {
        background: var(--rom-paper-3) !important;
        color: var(--rom-ink) !important;
        border-color: var(--rom-line);
    }
    body.rom-ui .knsl-top-bar .knsl-menu nav > ul > li > ul.fiime-account-menu > li:last-child > a {
        background: var(--rom-paper) !important;
        border-color: var(--rom-line) !important;
    }
}

/* keep sticky sidebar working inside the legacy .knsl-app wrapper */
body.rom-ui .knsl-app { overflow: visible; overflow-x: clip; }

/* legacy comment grid uses bootstrap gutters; align it with panel padding */
.rom-comments .row { margin-left: 0; margin-right: 0; }
.rom-comments [class*="col-"] { padding-left: 0; padding-right: 0; }
