:root {
    color-scheme: light;

    --page-background: #f7f8fa;
    --surface: #ffffff;
    --surface-soft: #f2f4f6;
    --surface-hover: #ebedf0;
    --text-primary: #191f28;
    --text-secondary: #6b7684;
    --text-tertiary: #8b95a1;
    --border: #e5e8eb;
    --accent: #0064ff;
    --accent-soft: #e8f3ff;
    --success: #00a86b;
    --success-soft: #e6f7f1;
    --warning: #f59f00;
    --warning-soft: #fff4d6;
    --danger: #e5484d;
    --danger-soft: #ffebec;
    --shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 14px 38px rgba(0, 0, 0, 0.06);
    --header-background: rgba(247, 248, 250, 0.86);
}

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

    --page-background: #0f1114;
    --surface: #191c20;
    --surface-soft: #22262b;
    --surface-hover: #2a2f35;
    --text-primary: #f2f4f6;
    --text-secondary: #a5adb8;
    --text-tertiary: #7d8793;
    --border: #30363d;
    --accent: #6aa8ff;
    --accent-soft: rgba(68, 138, 255, 0.15);
    --success: #52d69a;
    --success-soft: rgba(82, 214, 154, 0.14);
    --warning: #ffc65c;
    --warning-soft: rgba(255, 198, 92, 0.14);
    --danger: #ff7b81;
    --danger-soft: rgba(255, 123, 129, 0.14);
    --shadow: none;
    --header-background: rgba(15, 17, 20, 0.86);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-background);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
    background: var(--page-background);
    font-family:
        Pretendard,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans KR",
        sans-serif;
    line-height: 1.5;
    transition:
        color 160ms ease,
        background-color 160ms ease;
}

button,
a {
    font: inherit;
}

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

svg {
    display: block;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    background: var(--header-background);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.top-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-symbol {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #ffffff;
    background: var(--accent);
    font-size: 0.92rem;
}

.brand-name {
    font-size: 1rem;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-button,
.theme-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 0;
    border-radius: 13px;
    color: var(--text-secondary);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
    cursor: pointer;
}

.home-button {
    padding: 0 15px;
    font-size: 0.86rem;
    font-weight: 700;
}

.theme-button {
    width: 40px;
}

.home-button:hover,
.theme-button:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.theme-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-moon {
    display: none;
}

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

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

.page-container {
    width: min(1160px, calc(100% - 32px));
    min-height: calc(100vh - 180px);
    margin: 0 auto;
}

.page-heading {
    padding: 54px 0 28px;
}

.back-link {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
}

.back-link:hover {
    color: var(--accent);
}

.page-eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.2rem);
    letter-spacing: -0.065em;
}

.page-description {
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.88rem;
}

.notice-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 50px 20px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 1.5rem;
    font-weight: 900;
}

.empty-state h2 {
    margin: 18px 0 0;
    font-size: 1.25rem;
}

.empty-state p {
    margin: 8px 0 0;
    color: var(--text-secondary);
}

.data-source {
    margin: 22px 0 0;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    text-align: right;
}

.site-footer {
    padding: 46px 20px 38px;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    text-align: center;
}

.site-footer p {
    margin: 2px 0;
}

.footer-brand {
    font-weight: 800;
}

@media (max-width: 700px) {
    .top-header-inner,
    .page-container {
        width: min(100% - 20px, 1160px);
    }

    .top-header-inner {
        height: 60px;
    }

    .brand-name {
        display: none;
    }

    .brand-symbol {
        width: 32px;
        height: 32px;
    }

    .page-heading {
        padding: 34px 2px 22px;
    }

    .back-link {
        margin-bottom: 22px;
    }

    .data-source {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* 지금 울산 브랜드 */

:root {
    --brand-ulsan: #0097a0;
    --brand-ulsan-soft: #e6f5f6;
    --brand-now: #000000;
}

html[data-theme="dark"] {
    --brand-ulsan: #0097a0;
    --brand-ulsan-soft: rgba(0, 151, 160, 0.17);
    --brand-now: #ffffff;
}

.brand-symbol {
    color: #ffffff;
    background: var(--brand-ulsan);
}

.brand-symbol svg {
    width: 27px;
    height: 27px;
}

.brand-whale {
    overflow: visible;
}

.brand-whale path:first-child {
    fill: currentColor;
    stroke: none;
}

.brand-whale path:nth-child(2) {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

.brand-whale-eye {
    fill: var(--brand-ulsan);
}

.brand-ulsan,
.heading-ulsan {
    color: var(--brand-ulsan);
}

.heading-now {
    color: var(--brand-now);
}

.brand-heading .heading-ulsan {
    margin: 0 0.06em;
}


/* 새로고침할 때 변경되는 울산 고래 아이콘 */

.brand-symbol.brand-symbol-emoji {
    color: inherit;
    background: var(--brand-ulsan-soft);
    box-shadow:
        inset 0 0 0 1px rgba(0, 151, 160, 0.18);
}

.brand-random-icon {
    display: block;
    font-family:
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Noto Color Emoji",
        sans-serif;
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(1px);
    user-select: none;
}

html[data-theme="dark"]
.brand-symbol.brand-symbol-emoji {
    background: rgba(0, 151, 160, 0.17);
    box-shadow:
        inset 0 0 0 1px rgba(0, 151, 160, 0.28);
}

@media (max-width: 520px) {
    .brand-random-icon {
        font-size: 1.3rem;
    }
}
