/**
 * DC Inside 風格覆寫（日間）
 * 套用於 html.fate-theme-dci 或 body.fate-theme-dci
 */

html.fate-theme-dci,
body.fate-theme-dci {
    --dci-topbar: #3b4890;
    --dci-topbar-fg: #fff;
    --dci-topbar-link: #dce4ff;
    --dci-border: #ccc;
    --dci-border-soft: #ddd;
    --dci-link: #0066cc;
    --dci-link-hover: #004499;
    --dci-btn-bg: #f5f5f5;
    --dci-btn-border: #bbb;
    --bg: #ececec;
    --bg2: #f5f5f5;
    --fg: #333;
    --muted: #666;
    --accent: #0066cc;
    --accent2: #3b4890;
    --ok: #22863a;
    --line: #ccc;
    --card: #fff;
    --radius: 4px;
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.04);
    --shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.06);
}

html.fate-theme-dci body,
body.fate-theme-dci.forum-body {
    background: var(--bg);
    color: var(--fg);
    letter-spacing: 0;
    -webkit-font-smoothing: auto;
}

/* ── 頂欄 ── */
html.fate-theme-dci .topbar,
body.fate-theme-dci .topbar {
    background: var(--dci-topbar);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    backdrop-filter: none;
}

html.fate-theme-dci .topbar-inner,
body.fate-theme-dci .topbar-inner {
    max-width: 1100px;
    padding: 0.55rem 0.85rem;
    gap: 0.45rem 0.75rem;
}

html.fate-theme-dci .brand,
body.fate-theme-dci .brand {
    color: var(--dci-topbar-fg);
    letter-spacing: 0.06em;
    font-size: 0.92rem;
}

html.fate-theme-dci .brand span,
body.fate-theme-dci .brand span {
    color: #a8b8ff;
    font-weight: 600;
}

html.fate-theme-dci .topbar nav,
body.fate-theme-dci .topbar nav {
    font-size: 0.84rem;
    margin-left: auto;
}

html.fate-theme-dci .topbar nav a,
body.fate-theme-dci .topbar nav a {
    color: var(--dci-topbar-link);
    text-decoration: none;
}

html.fate-theme-dci .topbar nav a:hover,
body.fate-theme-dci .topbar nav a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── 版型 ── */
html.fate-theme-dci,
body.fate-theme-dci {
    --fate-topbar-sticky-offset: 2.35rem;
}

html.fate-theme-dci .layout-shell,
body.fate-theme-dci .layout-shell {
    max-width: 1100px;
    padding: 0 0.85rem;
}

html.fate-theme-dci .layout,
body.fate-theme-dci .layout {
    gap: 0.85rem;
}

/* ── 卡片／面板 ── */
html.fate-theme-dci .sidebar-card,
html.fate-theme-dci .hero,
html.fate-theme-dci .store-panel,
html.fate-theme-dci .store-card-fate,
html.fate-theme-dci .fate-weekly-hero,
html.fate-theme-dci .card,
html.fate-theme-dci .member-profile-panel,
body.fate-theme-dci .sidebar-card {
    background: var(--card);
    border: 1px solid var(--dci-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

html.fate-theme-dci .card {
    overflow: hidden;
}

html.fate-theme-dci .card:hover {
    border-color: var(--accent);
}

html.fate-theme-dci .card-body h2 a:hover {
    color: var(--accent);
}

html.fate-theme-dci .card-foot a {
    color: var(--dci-link);
}

html.fate-theme-dci .fate-weekly-hero {
    margin-bottom: 0.85rem;
}

html.fate-theme-dci .fate-weekly-hero__badge,
html.fate-theme-dci .fate-weekly-hero__rank {
    border-radius: 3px;
}

html.fate-theme-dci .toolbar {
    background: var(--card);
    border: 1px solid var(--dci-border);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.85rem;
}

html.fate-theme-dci .grid {
    gap: 0.65rem;
}

@media (max-width: 767px) {
    html.fate-theme-dci .grid {
        gap: 0.5rem;
    }
}

html.fate-theme-dci .hero {
    padding: 1rem 1.05rem;
    margin-bottom: 0.85rem;
    overflow: visible;
}

html.fate-theme-dci .hero p.lead {
    color: var(--muted);
    font-size: 0.88rem;
}

html.fate-theme-dci .fate-search-summary {
    border: 1px solid var(--dci-border-soft);
    border-radius: var(--radius);
    background: var(--bg2);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
}
html.fate-theme-dci .fate-search-summary--fuzzy {
    border-color: rgba(180, 120, 0, 0.45);
    background: rgba(255, 193, 7, 0.1);
}
html.fate-theme-dci .fate-search-summary--fuzzy .fate-search-summary__title,
html.fate-theme-dci .fate-search-summary__badge {
    color: #8a5a00;
}
html.fate-theme-dci .fate-search-fuzzy-label strong {
    color: #8a5a00;
}
html.fate-theme-dci .text-accent-link,
html.fate-theme-dci a:not([class]) {
    color: var(--dci-link);
}

html.fate-theme-dci .text-accent-link:hover {
    color: var(--dci-link-hover);
}

/* 側欄 */
html.fate-theme-dci .sidebar-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--fg);
    border-bottom: 1px solid var(--dci-border-soft);
    padding-bottom: 0.45rem;
    margin-bottom: 0.65rem;
}

html.fate-theme-dci .sidebar-btn {
    background: var(--dci-btn-bg);
    border: 1px solid var(--dci-btn-border);
    color: var(--fg);
    border-radius: 3px;
    font-weight: 500;
}

html.fate-theme-dci .sidebar-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

html.fate-theme-dci .sidebar-btn--ghost {
    background: transparent;
}

html.fate-theme-dci .sidebar-search,
html.fate-theme-dci select,
html.fate-theme-dci input[type="search"],
html.fate-theme-dci input[type="text"],
html.fate-theme-dci input[type="email"],
html.fate-theme-dci input[type="password"],
html.fate-theme-dci input[type="number"],
html.fate-theme-dci textarea {
    background: var(--card);
    border: 1px solid var(--dci-border);
    color: var(--fg);
    border-radius: 3px;
}

html.fate-theme-dci .sidebar-submit,
html.fate-theme-dci .btn-link,
html.fate-theme-dci .store-toolbar .btn-link {
    background: var(--dci-btn-bg);
    border: 1px solid var(--dci-btn-border);
    color: var(--fg);
    border-radius: 3px;
}

html.fate-theme-dci .sidebar-submit:hover,
html.fate-theme-dci .btn-link:hover {
    background: #e0e0e0;
    border-color: #999;
}

/* 週榜 */
html.fate-theme-dci .fate-weekly-hero__nav {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.35);
}

html.fate-theme-dci .fate-weekly-hero__dot {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 店家詳情 */
html.fate-theme-dci .store-card-fate {
    border-radius: var(--radius);
}

html.fate-theme-dci .store-card-fate__cover--empty {
    background: var(--bg2);
    color: var(--muted);
}

html.fate-theme-dci .masseur-tabs__btn {
    border-radius: 3px 3px 0 0;
    border: 1px solid var(--dci-border);
    border-bottom: none;
    background: var(--bg2);
    color: var(--muted);
}

html.fate-theme-dci .masseur-tabs__btn.is-active {
    background: var(--card);
    color: var(--fg);
    font-weight: 600;
    border-bottom: 1px solid var(--card);
    margin-bottom: -1px;
}

html.fate-theme-dci .masseur-card {
    border: 1px solid var(--dci-border-soft);
    border-radius: var(--radius);
    background: var(--card);
}

html.fate-theme-dci .crowd-report-tag {
    border-radius: 3px;
}

/* 會員頁（我的帳號）可讀性 */
html.fate-theme-dci code.inline {
    background: rgba(0, 0, 0, 0.06);
    color: var(--fg);
}

html.fate-theme-dci .store-bc {
    color: #555;
}

html.fate-theme-dci .member-profile-head .sub,
html.fate-theme-dci .member-profile-hint,
html.fate-theme-dci .member-profile-hint.sub {
    color: #444;
}

html.fate-theme-dci .member-profile-meta,
html.fate-theme-dci .member-profile-meta-block,
html.fate-theme-dci .member-profile-meta-inline,
html.fate-theme-dci .member-profile-ncoin__label,
html.fate-theme-dci .member-profile-transfer-meta,
html.fate-theme-dci .member-profile-ncoin-range,
html.fate-theme-dci .member-profile-empty,
html.fate-theme-dci .member-profile-label,
html.fate-theme-dci .member-profile-crop-hint,
html.fate-theme-dci .member-profile-ncoin-hist th,
html.fate-theme-dci .member-profile-ncoin-hist__when,
html.fate-theme-dci .member-profile-ncoin-hist__note,
html.fate-theme-dci .member-profile-ncoin-pager__gap,
html.fate-theme-dci .member-profile-avatar--empty {
    color: #444;
}

html.fate-theme-dci .member-profile-msg--warn {
    color: #7a5200;
    background: #fff8e6;
    border-color: #d4a72c;
}

html.fate-theme-dci .member-profile-msg--ok {
    color: #1a5c28;
    background: #eafbea;
    border-color: rgba(34, 134, 58, 0.35);
}

html.fate-theme-dci .member-profile-msg--bad {
    color: #b91c1c;
    background: #fef2f2;
    border-color: rgba(185, 28, 28, 0.35);
}

html.fate-theme-dci .member-profile-email-block--warn,
html.fate-theme-dci .member-profile-card--warn {
    background: #fff8e6;
    border-color: #d4a72c;
    color: #444;
}

html.fate-theme-dci .member-profile-transfer-warn {
    background: #fef2f2;
    color: #991b1b;
    border-color: #f87171;
}

html.fate-theme-dci .member-profile-tabs__btn {
    border: 1px solid var(--dci-border);
    border-radius: 3px;
    background: var(--bg2);
    color: #444;
}

html.fate-theme-dci .member-profile-tabs__btn:hover {
    color: var(--fg);
    background: #eee;
}

html.fate-theme-dci .member-profile-tabs__btn.is-active {
    background: var(--card);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
}

html.fate-theme-dci .member-profile-tabs__badge {
    background: rgba(0, 102, 204, 0.12);
    color: var(--dci-link);
}

html.fate-theme-dci .member-profile-stores-kind {
    background: #e8e8e8;
    color: #444;
}

html.fate-theme-dci .member-profile-stores-kind--mobile {
    background: rgba(0, 102, 204, 0.12);
    color: #004488;
}

html.fate-theme-dci .member-profile-stores-kind--plain {
    color: #555;
}

html.fate-theme-dci .member-profile-crop-panel {
    background: var(--card);
    border-color: var(--dci-border);
}

html.fate-theme-dci .member-profile-input {
    background: var(--card);
    border-color: var(--dci-border);
    color: var(--fg);
}

html.fate-theme-dci .member-profile-btn {
    background: var(--dci-btn-bg);
    border: 1px solid var(--dci-btn-border);
    color: var(--fg);
}

html.fate-theme-dci .member-profile-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

html.fate-theme-dci .member-profile-btn--primary {
    background: var(--dci-link);
    border-color: var(--dci-link);
    color: #fff;
}

html.fate-theme-dci .member-profile-btn--primary:hover {
    background: var(--dci-link-hover);
    border-color: var(--dci-link-hover);
}

html.fate-theme-dci .member-profile-btn--ghost {
    background: transparent;
}

html.fate-theme-dci .member-profile-ncoin-hist__amt--debit,
html.fate-theme-dci .member-profile-ncoin-hist__reverted,
html.fate-theme-dci .member-profile-transfer-lookup-result--bad {
    color: #c0392b;
}

html.fate-theme-dci .member-thread-fav-card__thread,
html.fate-theme-dci .member-thread-fav-card__meta,
html.fate-theme-dci .member-thread-fav-card__type,
html.fate-theme-dci .member-thread-fav-unfav-btn {
    color: #444;
}

html.fate-theme-dci .member-fav-card,
html.fate-theme-dci .member-thread-fav-card {
    background: var(--card);
    border-color: var(--dci-border);
}

html.fate-theme-dci .member-fav-card__meta,
html.fate-theme-dci .member-fav-public-link {
    color: #555;
}

html.fate-theme-dci .member-fav-card__tags {
    border-top-color: var(--dci-border-soft);
}

html.fate-theme-dci .member-fav-exp-btn {
    background: var(--dci-btn-bg);
    border-color: var(--dci-btn-border);
    color: #444;
}

html.fate-theme-dci .member-fav-exp-btn.is-done {
    background: #eafbea;
    border-color: rgba(34, 134, 58, 0.35);
    color: var(--ok);
}

html.fate-theme-dci .member-thread-fav-unfav-btn {
    background: var(--dci-btn-bg);
    border-color: var(--dci-btn-border);
}

html.fate-theme-dci .member-thread-fav-unfav-btn:hover {
    border-color: #f87171;
    color: #c0392b;
}

@media (max-width: 767px) {
    html.fate-theme-dci .member-profile-tabs__btn {
        border-radius: 999px;
    }

    html.fate-theme-dci .member-profile-tabs__btn.is-active {
        background: rgba(0, 102, 204, 0.1);
        border-color: rgba(0, 102, 204, 0.35);
        color: var(--dci-link);
    }

    html.fate-theme-dci .member-profile-stores-table tr,
    html.fate-theme-dci .member-profile-ncoin-hist tr {
        background: var(--card);
        border-color: var(--dci-border);
    }

    html.fate-theme-dci .member-profile-stores-table td::before,
    html.fate-theme-dci .member-profile-ncoin-hist td::before {
        color: #555;
    }
}

html.fate-theme-dci .home-listing-nav,
body.fate-theme-dci .home-listing-nav {
    gap: 0;
    margin: 0 0 0.85rem;
    padding: 0;
    border-bottom: 1px solid var(--dci-border);
}

html.fate-theme-dci .layout--home .layout-main > .home-listing-nav:first-child,
body.fate-theme-dci .layout--home .layout-main > .home-listing-nav:first-child {
    margin-top: 0.85rem;
}

html.fate-theme-dci .home-listing-nav__btn,
body.fate-theme-dci .home-listing-nav__btn {
    flex: 1 1 50%;
    justify-content: center;
    padding: 0.62rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 3px 3px 0 0;
    border-bottom: none;
    background: var(--bg2);
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: -1px;
}

html.fate-theme-dci .home-listing-nav__btn:hover,
body.fate-theme-dci .home-listing-nav__btn:hover {
    color: var(--fg);
    background: #eee;
    border-color: transparent;
}

html.fate-theme-dci .home-listing-nav__btn.is-active,
body.fate-theme-dci .home-listing-nav__btn.is-active {
    background: var(--card);
    color: var(--dci-link, #0066cc);
    border-color: var(--dci-border);
    border-bottom: 1px solid var(--card);
    font-weight: 700;
}

html.fate-theme-dci .badge-rating,
body.fate-theme-dci .badge-rating {
    background: #fff;
    color: #222;
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

html.fate-theme-dci .card-rating-row__score,
body.fate-theme-dci .card-rating-row__score {
    color: #222;
}

html.fate-theme-dci .card-rating-row__brand,
body.fate-theme-dci .card-rating-row__brand {
    color: #1a73e8;
    border-color: rgba(26, 115, 232, 0.35);
    background: rgba(26, 115, 232, 0.08);
}

html.fate-theme-dci .card-rating-row__cnt,
body.fate-theme-dci .card-rating-row__cnt {
    color: #777;
}

/* 頁腳 */
html.fate-theme-dci .fate-site-footer,
body.fate-theme-dci .fate-site-footer {
    background: var(--bg2);
    border-top-color: var(--dci-border);
    color: var(--muted);
}

html.fate-theme-dci .fate-site-footer a,
body.fate-theme-dci .fate-site-footer a {
    color: var(--dci-link);
}

/* 廣告位 */
html.fate-theme-dci .fate-ad-slot {
    border: 1px solid var(--dci-border-soft);
    border-radius: var(--radius);
    background: var(--card);
}

html.fate-theme-dci .fate-ad-slot__placeholder {
    background: var(--bg2);
    color: var(--muted);
}

/* 分頁 */
html.fate-theme-dci .pager a,
html.fate-theme-dci .store-pager a {
    border: 1px solid var(--dci-border);
    background: var(--card);
    color: var(--dci-link);
    border-radius: 3px;
}

html.fate-theme-dci .pager a:hover {
    background: var(--bg2);
}

/* ── 手機版 ── */
@media (max-width: 720px) {
    html.fate-theme-dci,
    body.fate-theme-dci {
        --fate-topbar-sticky-offset: 4.65rem;
    }

    html.fate-theme-dci .topbar-inner,
    body.fate-theme-dci .topbar-inner {
        padding: 0.45rem 0.65rem;
    }

    html.fate-theme-dci .brand,
    body.fate-theme-dci .brand {
        font-size: 0.85rem;
        flex: 1 1 auto;
        min-width: 0;
    }

    html.fate-theme-dci .topbar nav,
    body.fate-theme-dci .topbar nav {
        order: 3;
        flex: 1 0 100%;
        margin-left: 0;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        gap: 0.35rem 0.65rem;
        justify-content: flex-start;
    }

    html.fate-theme-dci .layout-shell,
    body.fate-theme-dci .layout-shell {
        padding: 0 0.55rem;
    }

    html.fate-theme-dci .card-visual {
        min-height: 120px;
    }
}

@media (max-width: 480px) {
    html.fate-theme-dci .topbar nav a,
    body.fate-theme-dci .topbar nav a {
        font-size: 0.8rem;
    }
}
