/* 대시보드 테마: html[data-theme]는 dashboard-theme.js가 정한다(기본 다크). */
:root {
    --page-glow: rgba(135, 206, 235, 0.45);
    --bar-bg: rgba(245, 248, 253, 0.8);
    --ghost-bg: rgba(255, 255, 255, 0.6);
    --card-hover-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 60px -30px rgba(16, 60, 160, 0.4);
    --toast-bg: #0a1530;
    --toast-fg: #ffffff;
}
:root[data-theme='dark'] {
    color-scheme: dark;
    --void: #06080f;
    --ink: #0e121c;
    --panel: #0a0d15;
    --raise: #171c29;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    --hover: rgba(255, 255, 255, 0.05);
    --star: #eef2fa;
    --star-soft: #aab4c8;
    --haze: #7d879d;
    --signal: #7aa5ff;
    --verdict: #ff6b86;
    --caution: #f2b35a;
    --clear: #4ad49a;
    --btn-bg: #ffffff;
    --btn-fg: #06080f;
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -34px rgba(0, 0, 0, 0.8);
    --page-glow: rgba(42, 111, 240, 0.2);
    --bar-bg: rgba(6, 8, 15, 0.78);
    --ghost-bg: rgba(255, 255, 255, 0.04);
    --card-hover-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.9);
    --toast-bg: #eef2fa;
    --toast-fg: #06080f;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 80% 420px at 50% -120px, var(--page-glow), transparent 70%),
        var(--void);
}
.bar {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 40;
    background: var(--bar-bg);
    backdrop-filter: blur(16px) saturate(170%);
    border-bottom: 1px solid var(--line);
}
.btn-ghost {
    background: var(--ghost-bg);
}
.toast {
    background: var(--toast-bg);
    color: var(--toast-fg);
}
.theme-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--ghost-bg);
    color: var(--star-soft);
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s;
}
.theme-toggle:hover {
    color: var(--star);
    border-color: var(--signal);
}
.theme-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.theme-toggle .icon-moon,
:root[data-theme='dark'] .theme-toggle .icon-sun {
    display: block;
}
.theme-toggle .icon-sun,
:root[data-theme='dark'] .theme-toggle .icon-moon {
    display: none;
}
:root[data-theme='dark'] .shead {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 40px 100px -50px rgba(16, 60, 160, 0.6);
}
.bar-in {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px;
}
.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 14px;
    color: var(--haze);
}
.crumbs::before {
    content: '/';
    color: var(--line-strong);
    font-size: 18px;
    font-weight: 300;
}
.crumbs a,
.crumbs button,
.crumbs span {
    white-space: nowrap;
}
.crumbs a,
.crumbs button {
    border: 0;
    background: none;
    color: var(--star-soft);
    font: inherit;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
}
.crumbs a:hover,
.crumbs button:hover {
    color: var(--star);
    background: var(--hover);
}
.crumbs span {
    color: var(--star);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crumbs .sep {
    color: var(--line-strong);
}
.who {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--ink);
    font-size: 13px;
    color: var(--star-soft);
    white-space: nowrap;
}
.avatar {
    width: 26px;
    height: 26px;
    flex: none;
    overflow: hidden;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #9ccbff, #2a6ff0);
    color: #fff;
    font: 600 12px var(--f-mono);
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user .nm {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.who-skeleton {
    width: 150px;
    height: 34px;
    border-radius: 999px;
    background: var(--raise);
}
.demo-badge {
    font-family: var(--f-mono);
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--signal);
    border: 1px solid rgba(42, 111, 240, 0.3);
    background: rgba(42, 111, 240, 0.06);
}
@media (max-width: 640px) {
    .user .nm,
    .demo-badge,
    .who-skeleton {
        display: none;
    }
    .crumbs a,
    .crumbs button,
    .crumbs .sep {
        display: none;
    }
}
@media (max-width: 420px) {
    .bar .brand {
        font-size: 0;
        gap: 0;
    }
}

main {
    flex: 1;
    padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px);
}
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}
.page-head h1 {
    font-size: clamp(28px, 3.6vw, 42px);
    margin-top: 14px;
}
.page-head p {
    margin-top: 8px;
    color: var(--star-soft);
}
.kicker {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--haze);
    text-transform: uppercase;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.metric {
    padding: 20px 22px;
    background: var(--ink);
}
.metric span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--star-soft);
}
.metric span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--haze);
}
.metric.good span i {
    background: var(--clear);
}
.metric.warn span i {
    background: var(--caution);
}
.metric strong {
    display: block;
    margin-top: 10px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.metric strong small {
    display: inline;
    margin: 0;
    font-size: 16px;
    color: var(--haze);
    font-weight: 500;
}
.metric small {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--haze);
}
@media (max-width: 640px) {
    .metrics {
        grid-template-columns: 1fr;
    }
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 32px 0 16px;
}
.seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.seg button {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--haze);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
}
.seg button small {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--haze);
}
.seg button[aria-pressed='true'] {
    background: var(--ink);
    color: var(--star);
    box-shadow:
        0 0 0 1px var(--line-strong),
        0 6px 14px -10px rgba(16, 42, 94, 0.4);
}
.search {
    position: relative;
    flex: 0 1 280px;
}
.search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--star);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.search input:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 3px rgba(42, 111, 240, 0.12);
}
.search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    stroke: var(--haze);
    fill: none;
    stroke-width: 2;
}
@media (max-width: 640px) {
    .search {
        flex: 1 1 100%;
    }
}

.guilds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.guild {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 16px;
    background: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition:
        border-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}
.guild:hover {
    border-color: rgba(42, 111, 240, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}
.guild-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gicon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, #7fb6ff, #2a6ff0 55%, #0b3278);
    border: 0;
    box-shadow: 0 8px 20px -10px rgba(42, 111, 240, 0.7);
}
.gicon.lg {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    font-size: 22px;
}
.gicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.gicon:has(img) {
    background: var(--raise);
}
.state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--haze);
    white-space: nowrap;
}
.state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.state.good {
    color: var(--clear);
    border-color: rgba(15, 155, 102, 0.25);
    background: rgba(15, 155, 102, 0.07);
}
.state.warn {
    color: var(--caution);
    border-color: rgba(196, 122, 8, 0.28);
    background: rgba(196, 122, 8, 0.07);
}
.state.bad {
    color: var(--verdict);
    border-color: rgba(224, 67, 92, 0.28);
    background: rgba(224, 67, 92, 0.07);
}
.guild h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
}
.gmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--haze);
}
.gmeta b {
    font-weight: 500;
    color: var(--caution);
}
.guild-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.guild-foot p {
    font-size: 12.5px;
    color: var(--haze);
}
.empty {
    background: var(--ink);
    padding: 48px 24px;
    text-align: center;
    border-radius: 14px;
    border: 1px dashed var(--line-strong);
    color: var(--star-soft);
}
.empty strong {
    display: block;
    color: var(--star);
    font-size: 16px;
    margin-bottom: 6px;
}
.empty p {
    max-width: 520px;
    margin-inline: auto;
}
.empty-acts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.empty-acts .btn,
.empty .empty-acts .btn {
    margin-top: 0;
}
.empty[role='alert'] {
    outline: none;
    border-color: rgba(224, 67, 92, 0.35);
}
.empty .btn {
    margin-top: 16px;
}
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 72px 24px;
    color: var(--haze);
    font-size: 14px;
}
.spin {
    width: 12px;
    height: 12px;
    flex: none;
    border: 1.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* server view */
.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: none;
    color: var(--haze);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
}
.back:hover {
    color: var(--star);
}
.shead {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 36px) clamp(56px, 7vw, 72px);
    border-radius: 22px;
    background: #02040c;
    box-shadow: 0 40px 100px -50px rgba(16, 60, 160, 0.6);
}
.shead::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        radial-gradient(1px 1px at 12% 22%, #fff, transparent),
        radial-gradient(1px 1px at 34% 70%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.2px 1.2px at 58% 18%, #fff, transparent),
        radial-gradient(1px 1px at 76% 46%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.3px 1.3px at 91% 20%, #fff, transparent);
}
.shead::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: -2340px;
    width: 2400px;
    height: 2400px;
    border-radius: 50%;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse 20% 4% at 50% 1%, rgba(255, 255, 255, 0.45), transparent 70%),
        linear-gradient(180deg, #4a9af0 0%, #1a5bbf 1.5%, #0b3278 6%, #061c48 14%);
    box-shadow:
        0 0 0 2px rgba(190, 230, 255, 0.8),
        0 0 36px 6px rgba(120, 200, 255, 0.6),
        0 0 120px 30px rgba(60, 140, 255, 0.3);
}
.sid {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}
.sid h1 {
    font-size: clamp(24px, 3vw, 34px);
    margin-top: 4px;
}
.sid p {
    font-size: 13.5px;
    color: var(--haze);
    margin-top: 4px;
}
.verified {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--star-soft);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
}
.verified i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--clear);
    box-shadow: 0 0 8px var(--clear);
}

.block {
    margin-top: 40px;
}
.block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.block-head h2 {
    font-size: 22px;
    margin-top: 10px;
    letter-spacing: -0.035em;
}
.block-head p {
    margin-top: 4px;
    font-size: 14px;
    color: var(--haze);
}

.prots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.prot {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 14px;
    align-items: center;
    text-align: left;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--star);
    font: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition:
        border-color 0.2s,
        transform 0.2s;
}
.prot:hover {
    border-color: rgba(42, 111, 240, 0.35);
    transform: translateY(-2px);
}
.prot .ico {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--raise);
    border: 1px solid var(--line-strong);
}
.prot .ico svg {
    width: 19px;
    height: 19px;
    stroke: var(--star-soft);
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.prot.on .ico {
    background: linear-gradient(135deg, #7fb6ff, #2a6ff0);
    border-color: transparent;
    box-shadow: 0 8px 18px -10px rgba(42, 111, 240, 0.8);
}
.prot.on .ico svg {
    stroke: #fff;
}
.prot strong {
    font-size: 15px;
    font-weight: 600;
}
.prot small {
    font-size: 12.5px;
    color: var(--haze);
}
.prot .state {
    position: absolute;
    top: 18px;
    right: 18px;
}
@media (max-width: 860px) {
    .prots {
        grid-template-columns: 1fr;
    }
}

.attn {
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--ink);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.attn-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.attn-head strong {
    font-size: 14.5px;
    font-weight: 600;
}
.attn-head .count {
    margin-left: auto;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--haze);
}
.attn-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.attn-item:last-child {
    border-bottom: 0;
}
.attn-item i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.attn-item.critical i {
    background: var(--verdict);
    box-shadow: 0 0 10px var(--verdict);
}
.attn-item.attention i {
    background: var(--caution);
}
.attn-item.suggestion i {
    background: var(--signal);
}
.attn-item strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
}
.attn-item p {
    font-size: 13px;
    color: var(--haze);
}
.attn-clear {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}
.attn-clear i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(15, 155, 102, 0.1);
    color: var(--clear);
    font-style: normal;
    font-size: 13px;
}
.attn-clear p {
    font-size: 13px;
    color: var(--haze);
}
.link-btn {
    border: 1px solid var(--line-strong);
    background: var(--raise);
    color: var(--star-soft);
    font: inherit;
    font-size: 12.5px;
    height: 30px;
    padding: 0 12px;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
}
.link-btn:hover {
    color: var(--signal);
    border-color: var(--signal);
}

.shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--ink);
    overflow: hidden;
    margin-top: 12px;
    box-shadow: var(--shadow-card);
}
.side {
    padding: 18px 12px;
    border-right: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.side-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 8px;
}
.side-head strong {
    font-size: 14px;
    font-weight: 600;
}
.side-head small {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--haze);
}
.side .search {
    flex: none;
}
.side .search input {
    height: 36px;
    font-size: 13px;
}
.cats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--star-soft);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.cat:hover {
    background: var(--hover);
    color: var(--star);
}
.cat[aria-current='true'] {
    background: var(--ink);
    color: var(--star);
    box-shadow:
        inset 0 0 0 1px var(--line),
        0 6px 14px -10px rgba(16, 42, 94, 0.4);
}
.cat[aria-current='true'] em {
    color: var(--signal);
}
.cat em {
    width: 20px;
    font-style: normal;
    font-family: var(--f-mono);
    font-size: 13px;
    color: var(--haze);
    text-align: center;
}
.cat small {
    margin-left: auto;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--haze);
}
.side-help {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding: 12px 10px 2px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--haze);
}
.side-help i {
    width: 6px;
    height: 6px;
    margin-top: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--clear);
}
.panel {
    min-width: 0;
    padding: 24px clamp(18px, 3vw, 32px) 28px;
}
.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.panel-head h3 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-top: 8px;
    outline: none;
}
.panel-head p {
    font-size: 14px;
    color: var(--haze);
    margin-top: 2px;
}
.panel-head .count {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--haze);
}
.policy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 18px 0 6px;
    font-size: 12.5px;
    color: var(--haze);
}
.policy span {
    display: flex;
    align-items: center;
    gap: 7px;
}
.policy i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--clear);
}
.policy i.w {
    background: var(--caution);
}
/* Discord 요청 제한으로 멈춘 저장: 다시 시도 또는 변경 버리기 */
.rate-pause {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: 14px 0 6px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--verdict) 40%, transparent);
    background: color-mix(in srgb, var(--verdict) 8%, transparent);
    font-size: 13px;
    color: var(--star);
}
.rate-pause p {
    flex: 1 1 260px;
    margin: 0;
}
.rate-pause-acts {
    display: flex;
    gap: 8px;
}
@media (max-width: 860px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .side {
        min-width: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .cats {
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .cat {
        flex: none;
    }
    .cat small {
        margin-left: 4px;
    }
    .side-help {
        display: none;
    }
}

.row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 16px 32px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}
.row:last-child {
    border-bottom: 0;
}
.row.off {
    opacity: 0.9;
}
.row-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.row-label h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.cat-chip {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--raise);
    color: var(--star-soft);
}
.risk {
    font-family: var(--f-mono);
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--caution);
    border: 1px solid rgba(196, 122, 8, 0.3);
    background: rgba(196, 122, 8, 0.05);
}
.row-desc {
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--star-soft);
}
.row-note {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--caution);
}
.row-note.info {
    color: var(--haze);
}
.ctl {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.ctl .status,
.req-ctl .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--haze);
    text-align: right;
}
.ctl .status .spin,
.req-ctl .status .spin {
    width: 10px;
    height: 10px;
}
.ctl .status.saving,
.req-ctl .status.saving {
    color: var(--signal);
}
.ctl .status.saved,
.req-ctl .status.saved {
    color: var(--clear);
}
.ctl .status.error,
.req-ctl .status.error {
    color: var(--verdict);
}
/* 안전하게 비활성화된 기능 행 안에서 빠진 필수 설정을 바로 지정하는 묶음 */
.req {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px dashed rgba(196, 122, 8, 0.4);
    border-radius: 10px;
    background: rgba(196, 122, 8, 0.05);
}
.req-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--caution);
}
.req-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    align-items: center;
    gap: 6px 14px;
}
.req-item.wide {
    grid-template-columns: minmax(0, 1fr);
}
.req-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--star-soft);
}
.req-ctl {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.req-ctl .status {
    text-align: left;
}
.req .chips {
    justify-content: flex-start;
}
@media (max-width: 640px) {
    .row {
        grid-template-columns: 1fr;
    }
    .ctl {
        align-items: flex-start;
    }
    .ctl .status {
        text-align: left;
    }
    .req-item {
        grid-template-columns: minmax(0, 1fr);
    }
}

.switch {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--raise);
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
    padding: 0;
}
.switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 42, 94, 0.35);
    transition:
        transform 0.2s cubic-bezier(0.3, 0.7, 0.3, 1),
        background 0.2s;
}
.switch[aria-checked='true'] {
    background: var(--signal);
    border-color: var(--signal);
}
.switch[aria-checked='true']::after {
    transform: translateX(20px);
}
.switch:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
/* 저장 중에도 다시 바꿀 수 있다. 최신 변경만 저장 결과로 반영한다. */
.switch[aria-busy='true'] {
    opacity: 0.7;
}
.sel select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: var(--panel);
}
.chips[aria-disabled='true'] button,
.chips button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.color input[type='color']:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.sel {
    position: relative;
    width: 100%;
}
.sel select {
    appearance: none;
    width: 100%;
    height: 38px;
    padding: 0 34px 0 12px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    color: var(--star);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
    outline: none;
}
.sel select:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 3px rgba(42, 111, 240, 0.12);
}
.sel::after {
    content: '';
    position: absolute;
    right: 13px;
    top: 15px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--haze);
    border-bottom: 1.5px solid var(--haze);
    transform: rotate(45deg);
    pointer-events: none;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.chips button {
    height: 30px;
    padding: 0 11px;
    border-radius: 7px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    color: var(--haze);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s;
}
.chips button[aria-pressed='true'] {
    background: rgba(42, 111, 240, 0.08);
    border-color: rgba(42, 111, 240, 0.45);
    color: var(--signal);
}
.chips button[aria-pressed='true']::before {
    content: '✓ ';
    font-size: 11px;
}
@media (max-width: 640px) {
    .chips {
        justify-content: flex-start;
    }
}
.color {
    display: flex;
    align-items: center;
    gap: 10px;
}
.color input[type='color'] {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: none;
    cursor: pointer;
}
.color input[type='color']::-webkit-color-swatch-wrapper {
    padding: 4px;
}
.color input[type='color']::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
}
.color code {
    font-family: var(--f-mono);
    font-size: 13px;
    color: var(--star-soft);
}
.ro {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}
.ro strong {
    font-size: 14px;
    font-weight: 500;
}
.ro code {
    font-family: var(--f-mono);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--raise);
    border: 1px solid var(--line);
    color: var(--star-soft);
}
@media (max-width: 640px) {
    .ro {
        align-items: flex-start;
        text-align: left;
    }
}

dialog {
    width: min(440px, calc(100% - 32px));
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    color: var(--star);
    box-shadow: 0 40px 120px -20px rgba(10, 21, 48, 0.45);
}
dialog::backdrop {
    background: rgba(10, 21, 48, 0.4);
    backdrop-filter: blur(4px);
}
.dlg {
    padding: 24px;
}
.dlg .ic {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(196, 122, 8, 0.1);
    color: var(--caution);
    font-weight: 700;
}
.dlg h2 {
    font-size: 19px;
    margin-top: 16px;
    letter-spacing: -0.03em;
}
.dlg p {
    margin-top: 8px;
    font-size: 14px;
    color: var(--star-soft);
    white-space: pre-line;
}
.dlg-acts {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
}
.dlg-acts .btn {
    height: 38px;
}
.dash-foot {
    border-top: 1px solid var(--line);
    padding-block: 20px;
    font-size: 13px;
    color: var(--haze);
}
.dash-foot .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}
.dash-foot a:hover {
    color: var(--star);
}
.empty.spaced {
    margin-top: 16px;
}
.toast.error {
    background: var(--verdict);
}
@media (max-width: 640px) {
    .shead {
        padding-bottom: 84px;
    }
    .guilds {
        grid-template-columns: 1fr;
    }
}
