/* =========================================================
   YYCX · YY channel lookup
   Vanilla CSS, no external assets or fonts.
   ========================================================= */

:root {
    color-scheme: dark;

    --bg: #060a12;
    --bg-soft: #0a111d;
    --panel: rgba(15, 25, 42, 0.82);
    --panel-solid: #0e1828;
    --panel-raised: #111d30;
    --text: #e9f2ff;
    --muted: #90a6c2;
    --muted-strong: #b6c7dd;
    --faint: #6d819b;
    --line: rgba(148, 180, 220, 0.14);
    --line-strong: rgba(148, 180, 220, 0.26);

    --accent: #22d3ee;
    --accent-2: #3b82f6;
    --accent-3: #818cf8;
    --accent-soft: rgba(34, 211, 238, 0.11);
    --accent-glow: rgba(34, 211, 238, 0.24);

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.12);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.12);

    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow-card: 0 28px 70px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.18);
    --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f2f6fb;
    --bg-soft: #e9f0f8;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-solid: #ffffff;
    --panel-raised: #f6f9fd;
    --text: #0d1b2d;
    --muted: #5b708a;
    --muted-strong: #334a63;
    --faint: #7d90a7;
    --line: rgba(18, 43, 70, 0.1);
    --line-strong: rgba(18, 43, 70, 0.2);

    --accent: #0891b2;
    --accent-2: #2563eb;
    --accent-3: #6366f1;
    --accent-soft: rgba(8, 145, 178, 0.09);
    --accent-glow: rgba(8, 145, 178, 0.18);

    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.1);
    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.09);
    --warn: #b45309;
    --warn-soft: rgba(180, 83, 9, 0.1);

    --shadow-card: 0 24px 60px rgba(28, 52, 80, 0.12);
    --shadow-soft: 0 10px 26px rgba(28, 52, 80, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(1000px 600px at 12% -10%, rgba(34, 211, 238, 0.13), transparent 58%),
        radial-gradient(800px 520px at 90% 4%, rgba(59, 130, 246, 0.13), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 58%, var(--bg) 100%);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 180, 220, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 180, 220, 0.045) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
}

html[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(18, 43, 70, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 43, 70, 0.045) 1px, transparent 1px);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    opacity: 0.45;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.6px, transparent 0.6px);
    background-size: 7px 7px;
}

html[data-theme="light"] body::after {
    opacity: 0.5;
    background-image: radial-gradient(rgba(15, 40, 70, 0.07) 0.6px, transparent 0.6px);
}

::selection {
    background: rgba(34, 211, 238, 0.26);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

img,
svg {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------- ambient ---------- */

.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.42;
    animation: drift 18s ease-in-out infinite alternate;
}

.ambient-orb-a {
    width: 460px;
    height: 460px;
    top: -160px;
    left: -120px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 66%);
}

.ambient-orb-b {
    width: 520px;
    height: 520px;
    top: 120px;
    right: -220px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.36), transparent 66%);
    animation-delay: -6s;
}

html[data-theme="light"] .ambient-orb {
    opacity: 0.24;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(36px, 28px, 0) scale(1.08); }
}

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: rgba(6, 10, 18, 0.62);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

html[data-theme="light"] .site-header {
    background: rgba(242, 246, 251, 0.74);
}

.header-inner {
    width: min(1160px, 100%);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(140deg, #22d3ee 0%, #3b82f6 55%, #6366f1 100%);
    box-shadow:
        0 10px 24px rgba(34, 211, 238, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.brand-mark::after {
    content: "";
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fbbf24;
    border: 2px solid var(--bg);
}

.brand-mark span {
    color: #041018;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.06em;
    transform: translateX(-0.5px);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--faint);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

html[data-theme="light"] .status-pill {
    background: rgba(255, 255, 255, 0.55);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--faint);
    box-shadow: 0 0 0 3px rgba(109, 129, 155, 0.12);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.status-pill.is-online .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft), 0 0 12px var(--success);
}

.status-pill.is-online {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.26);
}

.status-pill.is-degraded .status-dot {
    background: var(--warn);
    box-shadow: 0 0 0 3px var(--warn-soft);
}

.status-pill.is-degraded {
    color: var(--warn);
    border-color: rgba(251, 191, 36, 0.26);
}

.status-pill.is-offline .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

.status-pill.is-offline {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.26);
}

.icon-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

html[data-theme="light"] .icon-button {
    background: rgba(255, 255, 255, 0.58);
}

.icon-button:hover {
    border-color: var(--line-strong);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.icon-button:active {
    transform: translateY(0);
}

.icon-button .icon {
    width: 19px;
    height: 19px;
    color: var(--muted-strong);
}

html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }

/* ---------- hero ---------- */

.hero {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 70px 24px 28px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.eyebrow span {
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5.6vw, 4.25rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.gradient-text {
    background: linear-gradient(100deg, #22d3ee 0%, #60a5fa 48%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html[data-theme="light"] .gradient-text {
    background: linear-gradient(100deg, #0891b2 0%, #2563eb 52%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.lead {
    max-width: 620px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

/* ---------- search ---------- */

.search-form {
    max-width: 720px;
    margin: 34px auto 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 7px 7px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 19px;
    background: var(--panel);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.search-box:focus-within {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow:
        0 0 0 4px rgba(34, 211, 238, 0.09),
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.search-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    color: var(--faint);
}

.search-box input {
    min-width: 0;
    flex: 1;
    height: 50px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    letter-spacing: 0.01em;
}

.search-box input::placeholder {
    color: var(--faint);
    opacity: 1;
}

.search-button {
    position: relative;
    height: 50px;
    min-width: 142px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(120deg, #22d3ee 0%, #3b82f6 58%, #6366f1 100%);
    color: #03121a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(34, 211, 238, 0.3);
    filter: saturate(112%);
}

.search-button:active:not(:disabled) {
    transform: translateY(0);
}

.search-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.search-arrow {
    width: 17px;
    height: 17px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(3, 18, 26, 0.28);
    border-top-color: #03121a;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-hint {
    margin: 12px 2px 0;
    color: var(--faint);
    font-size: 12px;
}

.recent-wrap {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.recent-label {
    color: var(--faint);
    font-size: 12px;
}

.recent-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.recent-chip {
    max-width: 240px;
    padding: 5px 11px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.recent-chip:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------- layout ---------- */

.container {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 16px 24px 48px;
}

/* ---------- empty ---------- */

.empty-card {
    max-width: 760px;
    margin: 18px auto 0;
    padding: 44px 30px 40px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.07), transparent 46%),
        var(--panel);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-visual {
    width: 220px;
    margin: 0 auto 4px;
}

.empty-card h2 {
    margin: 4px 0 8px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.empty-card > p {
    margin: 0 auto;
    max-width: 460px;
    color: var(--muted);
    font-size: 14px;
}

.feature-chips {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.feature-chips span {
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 11px;
}

/* ---------- loading ---------- */

.loading-card {
    max-width: 980px;
    margin: 18px auto 0;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.skeleton-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.skeleton {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(148, 180, 220, 0.1);
}

html[data-theme="light"] .skeleton {
    background: rgba(18, 43, 70, 0.08);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

.skeleton-avatar {
    width: 92px;
    height: 92px;
    flex: 0 0 auto;
    border-radius: 26px;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 13px;
    border-radius: 6px;
}

.w-80 { width: 80%; }
.w-60 { width: 60%; }
.w-40 { width: 40%; }

.skeleton-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.skeleton-block {
    height: 86px;
    border-radius: 14px;
}

/* ---------- alert ---------- */

.alert-card {
    max-width: 760px;
    margin: 18px auto 0;
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid rgba(251, 113, 133, 0.34);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.15), rgba(15, 25, 42, 0.9));
    animation: rise 0.3s ease both;
}

html[data-theme="light"] .alert-card {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.08), rgba(255, 255, 255, 0.92));
}

.alert-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(251, 113, 133, 0.14);
    color: var(--danger);
}

.alert-icon svg {
    width: 21px;
    height: 21px;
}

.alert-content h3 {
    margin: 1px 0 3px;
    color: var(--text);
    font-size: 15px;
}

.alert-content p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 13px;
}

.alert-hint {
    margin-top: 6px !important;
    color: var(--muted) !important;
    font-size: 12px !important;
}

.text-button {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.text-button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- result ---------- */

.result {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    scroll-margin-top: 88px;
    animation: rise 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.profile-card,
.assessment-card,
.logs-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.profile-card {
    position: sticky;
    top: 92px;
    padding: 30px 26px 24px;
    border-radius: var(--radius-xl);
    text-align: center;
}

.avatar-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    margin: 0 auto 18px;
}

.avatar-wrap::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 34px;
    background: conic-gradient(from 150deg, rgba(34, 211, 238, 0.8), rgba(59, 130, 246, 0.2), rgba(129, 140, 248, 0.7), rgba(34, 211, 238, 0.8));
    opacity: 0.55;
    filter: blur(0.4px);
}

.avatar-wrap img {
    position: relative;
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 28px;
    border: 3px solid var(--panel-solid);
    background: var(--panel-raised);
}

.live-chip {
    position: absolute;
    right: -6px;
    bottom: 2px;
    z-index: 2;
    padding: 3px 8px;
    border: 2px solid var(--panel-solid);
    border-radius: 999px;
    background: linear-gradient(120deg, #fb7185, #f43f5e);
    color: #fff;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.34);
}

.channel-name {
    margin: 0 auto;
    max-width: 100%;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 750;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 27px;
    margin-top: 10px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.badge::before,
.mini-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.tone-success {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.3);
    background: var(--success-soft);
}

.tone-danger {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.3);
    background: var(--danger-soft);
}

.tone-warn {
    color: var(--warn);
    border-color: rgba(251, 191, 36, 0.3);
    background: var(--warn-soft);
}

.tone-neutral {
    color: var(--muted-strong);
    border-color: var(--line-strong);
    background: rgba(148, 180, 220, 0.07);
}

.channel-type {
    min-height: 22px;
    margin: 10px 0 0;
    color: var(--faint);
    font-size: 12px;
}

.id-list {
    margin-top: 20px;
    border-top: 1px solid var(--line);
}

.id-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.id-label {
    width: 62px;
    flex: 0 0 auto;
    color: var(--faint);
    font-size: 12px;
}

.id-value {
    min-width: 0;
    flex: 1;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-button {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--faint);
    font-size: 10px;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.copy-button:hover {
    color: var(--accent);
    border-color: rgba(34, 211, 238, 0.35);
    background: var(--accent-soft);
}

.copy-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.copy-button.is-copied {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.35);
    background: var(--success-soft);
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0 -10px;
    padding: 16px 0 6px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 10px;
}

.profile-stat + .profile-stat {
    border-left: 1px solid var(--line);
}

.stat-value {
    display: block;
    color: var(--text);
    font-family: var(--mono);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.stat-value:hover {
    color: var(--accent);
}

.stat-label {
    color: var(--faint);
    font-size: 10px;
    letter-spacing: 0.06em;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 650;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.button svg {
    width: 15px;
    height: 15px;
}

.button.full {
    width: 100%;
    margin-top: 16px;
}

.button.ghost {
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted-strong);
}

html[data-theme="light"] .button.ghost {
    background: rgba(255, 255, 255, 0.6);
}

.button.ghost:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: var(--accent-soft);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ---------- detail ---------- */

.detail-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.assessment-card {
    padding: 26px 28px 24px;
    border-radius: var(--radius-xl);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.card-kicker {
    margin: 0 0 3px;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.card-heading h3 {
    margin: 0;
    font-size: 19px;
    letter-spacing: -0.02em;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.assessment-message {
    margin: 16px 0 0;
    color: var(--muted-strong);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.score-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.score-stat {
    padding: 14px 14px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.022);
}

html[data-theme="light"] .score-stat {
    background: rgba(255, 255, 255, 0.56);
}

.score-value {
    display: block;
    color: var(--text);
    font-family: var(--mono);
    font-size: clamp(20px, 2.3vw, 27px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.score-value.is-pass {
    color: var(--success);
}

.score-value.is-missing {
    color: var(--muted);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0;
}

.score-label {
    display: block;
    margin-top: 3px;
    color: var(--faint);
    font-size: 10px;
}

.progress {
    position: relative;
    height: 9px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 180, 220, 0.12);
}

html[data-theme="light"] .progress {
    background: rgba(18, 43, 70, 0.09);
}

.progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22d3ee, #3b82f6 65%, #818cf8);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease;
}

.progress-bar.is-success {
    background: linear-gradient(90deg, #34d399, #22d3ee);
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.45);
}

.progress-bar.is-danger {
    background: linear-gradient(90deg, #fb7185, #f59e0b);
    box-shadow: 0 0 18px rgba(251, 113, 133, 0.35);
}

.progress-bar.is-warn {
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    color: var(--faint);
    font-size: 10px;
}

.score-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.hint-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(148, 180, 220, 0.045);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.hint-box svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--accent);
}

.products {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.products-title {
    margin: 0 0 8px;
    color: var(--faint);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-list li {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 10px;
}

.product-list strong {
    color: var(--accent);
    font-family: var(--mono);
    font-weight: 650;
}

/* ---------- logs ---------- */

.logs-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.logs-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 20px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.logs-card summary::-webkit-details-marker {
    display: none;
}

.logs-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 650;
}

.logs-title::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 9px var(--accent);
}

.logs-meta {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    white-space: nowrap;
}

.log-list {
    margin: 0;
    padding: 0 20px 14px;
    list-style: none;
}

.log-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 11px;
}

.log-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--faint);
}

.log-dot.is-ok {
    background: var(--success);
    box-shadow: 0 0 7px rgba(52, 211, 153, 0.6);
}

.log-dot.is-warn {
    background: var(--warn);
    box-shadow: 0 0 7px rgba(251, 191, 36, 0.5);
}

.log-dot.is-error {
    background: var(--danger);
    box-shadow: 0 0 7px rgba(251, 113, 133, 0.5);
}

.log-label {
    color: var(--muted-strong);
    font-weight: 600;
}

.log-note {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--faint);
}

.log-ms {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    text-align: right;
}

.disclaimer {
    margin: 0;
    padding: 0 4px;
    color: var(--faint);
    font-size: 10px;
    line-height: 1.7;
}

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(6, 10, 18, 0.32);
}

html[data-theme="light"] .site-footer {
    background: rgba(255, 255, 255, 0.38);
}

.footer-inner {
    width: min(1160px, 100%);
    margin: 0 auto;
    padding: 20px 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--faint);
    font-size: 11px;
}

.footer-inner p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}

.footer-mark {
    color: var(--muted-strong);
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.footer-dot {
    opacity: 0.5;
}

.footer-inner a:hover {
    color: var(--accent);
}

.noscript-banner {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100;
    transform: translateX(-50%);
    padding: 12px 18px;
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: 12px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
    .result {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-card {
        position: static;
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        column-gap: 22px;
        text-align: left;
    }

    .avatar-wrap {
        grid-row: 1 / span 4;
        margin: 0;
    }

    .channel-name,
    .badge,
    .channel-type {
        grid-column: 2;
    }

    .channel-name {
        margin: 0;
        align-self: end;
    }

    .badge {
        justify-self: start;
        margin-top: 7px;
    }

    .channel-type {
        margin-top: 7px;
    }

    .id-list,
    .profile-stats,
    .profile-card .button {
        grid-column: 1 / -1;
    }

    .profile-stats {
        margin-top: 4px;
    }
}

@media (max-width: 720px) {
    .header-inner {
        padding: 13px 16px;
    }

    .status-pill {
        height: 32px;
        padding: 0 9px;
    }

    #service-status-text {
        display: none;
    }

    .status-pill {
        width: 32px;
        justify-content: center;
    }

    .hero {
        padding: 48px 18px 22px;
    }

    .hero h1 {
        font-size: clamp(2.1rem, 9vw, 3rem);
    }

    .lead {
        font-size: 14px;
    }

    .container {
        padding: 12px 16px 38px;
    }

    .empty-card {
        padding: 32px 20px 30px;
    }

    .search-box {
        flex-wrap: wrap;
        padding: 8px;
        border-radius: 18px;
    }

    .search-icon {
        margin-left: 8px;
    }

    .search-box input {
        height: 48px;
        width: calc(100% - 44px);
        flex: 1 1 calc(100% - 44px);
    }

    .search-button {
        width: 100%;
        height: 48px;
        margin-top: 2px;
    }

    .form-hint {
        text-align: left;
        padding-left: 4px;
    }

    .profile-card {
        grid-template-columns: 84px minmax(0, 1fr);
        column-gap: 16px;
        padding: 22px 18px 20px;
    }

    .avatar-wrap,
    .avatar-wrap img {
        width: 84px;
        height: 84px;
        border-radius: 22px;
    }

    .avatar-wrap::before {
        border-radius: 27px;
    }

    .channel-name {
        font-size: 20px;
    }

    .assessment-card {
        padding: 21px 18px 20px;
    }

    .score-stats {
        gap: 7px;
    }

    .score-stat {
        padding: 11px 10px 9px;
    }

    .score-value {
        font-size: 20px;
    }

    .logs-card summary {
        padding: 13px 16px;
    }

    .log-list {
        padding: 0 16px 12px;
    }

    .log-item {
        grid-template-columns: 8px minmax(0, 1fr) auto;
    }

    .log-ms {
        display: none;
    }

    .footer-inner {
        padding: 18px 16px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .skeleton-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .brand-copy small {
        display: none;
    }

    .score-stats {
        grid-template-columns: 1fr;
    }

    .score-stat {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    .score-label {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
