/* ── Tokens ── */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --blue-950: #031729;
    --blue-900: #062d5c;
    --blue-800: #0a4590;
    --blue-700: #125aab;
    --blue-600: #1a6fc8;
    --blue-200: #c8daf0;
    --blue-100: #e4eef9;
    --blue-50:  #f2f6fb;

    --red-800: #7a0818;
    --red-700: #9b0c24;
    --red-600: #c8102e;
    --red-500: #dc2238;

    --gold-700: #9a7720;
    --gold-600: #b8922a;
    --gold-500: #c9a227;
    --gold-400: #dbb84a;
    --gold-100: #faf3dc;

    --ink:         #0f1f2e;
    --ink-secondary:#3d5368;
    --ink-muted:   #647d94;
    --ink-faint:   #94a8ba;
    --line:        #dce5ef;
    --line-soft:   #ecf1f7;
    --surface:     #ffffff;
    --surface-2:   #f7fafd;

    --wrap: 700px;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 10px;

    --shadow-xs: 0 1px 2px rgba(3, 23, 41, 0.04);
    --shadow-sm: 0 2px 8px rgba(3, 23, 41, 0.06), 0 1px 2px rgba(3, 23, 41, 0.04);
    --shadow-md: 0 8px 24px rgba(3, 23, 41, 0.08), 0 2px 6px rgba(3, 23, 41, 0.04);
    --shadow-lg: 0 16px 48px rgba(3, 23, 41, 0.10), 0 4px 12px rgba(3, 23, 41, 0.05);
    --shadow-notice: 0 12px 40px rgba(3, 23, 41, 0.12), 0 0 0 1px rgba(255,255,255,0.8) inset;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
    --font-sans:  "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--blue-50);
    overflow-x: hidden;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ── Background ── */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 60% at 50% -20%, rgba(18, 90, 171, 0.11) 0%, transparent 55%),
        linear-gradient(180deg, #e8f0f8 0%, #f4f8fc 50%, #eef3f8 100%);
}

.page-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(10, 69, 144, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 69, 144, 0.022) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-orb--1 {
    width: 500px; height: 500px;
    top: -180px; right: -160px;
    background: rgba(18, 90, 171, 0.08);
}

.bg-orb--2 {
    width: 360px; height: 360px;
    bottom: 5%; left: -100px;
    background: rgba(200, 16, 46, 0.035);
}

.bg-arc {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 280px;
    background: radial-gradient(ellipse at center top, rgba(10, 69, 144, 0.06) 0%, transparent 65%);
}

/* ── Top bar ── */
.top-bar {
    position: relative;
    z-index: 3;
    background: var(--blue-950);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-bar__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.08em;
}

.top-bar__dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--gold-500);
    opacity: 0.7;
}

.top-bar__sub {
    opacity: 0.35;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.top-bar__date {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.04em;
}

/* ── Header ── */
.gov-header {
    position: relative;
    z-index: 2;
    background: linear-gradient(155deg, var(--blue-950) 0%, var(--blue-900) 42%, var(--blue-800) 78%, var(--blue-700) 100%);
    color: #fff;
    overflow: hidden;
    padding-bottom: 28px;
}

.header-shine {
    position: absolute;
    top: -50%; left: -20%;
    width: 60%; height: 200%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
    pointer-events: none;
}

.header-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L40 20L20 40L0 20Z' fill='none' stroke='%23fff' stroke-width='0.4'/%3E%3C/svg%3E");
    background-size: 20px 20px;
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 32px;
    padding-bottom: 8px;
}

.emblem-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.national-emblem {
    display: block;
    width: 72px;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.28));
}

.header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title__prefix {
    font-family: var(--font-serif);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: 0.38em;
    color: #b0081a;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
}

.site-title__suffix {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 1.2;
    color: #000000;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.25);
    margin-bottom: 4px;
}

.header-en {
    font-size: 0.65rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.header-accent {
    display: flex;
    height: 3px;
    position: absolute;
    bottom: 0; left: 0; right: 0;
}

.accent-seg { flex: 1; }
.accent-seg--red  { background: var(--red-600); }
.accent-seg--gold {
    flex: 0.55;
    background: linear-gradient(90deg, var(--gold-700), var(--gold-400) 50%, var(--gold-700));
}

/* ── Notice board ── */
.notice-board {
    position: relative;
    z-index: 4;
    margin-top: -22px;
    margin-bottom: 8px;
}

.notice-board__card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-notice);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.9);
    animation: rise-in 0.65s var(--ease) 0.1s both;
}

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

.notice-board__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    margin: 0 16px;
}

/* 公告 / 通知 区块 */
.notice-block {
    display: flex;
    align-items: stretch;
}

.notice-block--announce {
    min-height: 120px;
}

.notice-block--notify {
    min-height: 64px;
}

.notice-block__label {
    flex-shrink: 0;
    width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--red-700) 0%, var(--red-800) 100%);
    color: #fff;
    position: relative;
}

.notice-block--announce .notice-block__label {
    width: 80px;
    background: linear-gradient(180deg, var(--red-600) 0%, var(--red-800) 100%);
}

.notice-block__label--notify {
    background: linear-gradient(180deg, var(--blue-800) 0%, var(--blue-900) 100%);
}

.notice-block__label::after {
    content: "";
    position: absolute;
    top: 14px; bottom: 14px; right: 0;
    width: 1px;
    background: rgba(255,255,255,0.12);
}

.notice-block__label-text {
    font-family: var(--font-serif);
    font-weight: 700;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.35em;
}

.notice-block--announce .notice-block__label-text {
    font-size: 1.15rem;
}

.notice-block--notify .notice-block__label-text {
    font-size: 0.88rem;
    opacity: 0.92;
}

.notice-block__body {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, rgba(200,16,46,0.025) 0%, transparent 6%), var(--surface);
}

.notice-block--notify .notice-block__body {
    padding: 10px 20px;
    background: linear-gradient(90deg, rgba(10,69,144,0.025) 0%, transparent 6%), var(--surface);
}

.notice-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.notice-list:empty { display: none; }

.notice-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    transition: background 0.2s var(--ease);
}

.notice-item--announce {
    padding: 12px 0;
    border-bottom: 1px dashed var(--line-soft);
}

.notice-item--announce:last-child { border-bottom: none; }

.notice-item--announce .notice-item__date {
    font-size: 0.82rem;
    min-width: 80px;
}

.notice-item--announce .notice-item__text {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.65;
    white-space: normal;
}

.notice-item--notify {
    padding: 7px 0;
    border-bottom: 1px dashed var(--line-soft);
}

.notice-item--notify:last-child { border-bottom: none; }

.notice-item--notify .notice-item__date {
    font-size: 0.72rem;
    min-width: 72px;
}

.notice-item--notify .notice-item__text {
    font-size: 0.84rem;
    color: var(--ink-secondary);
    line-height: 1.55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-item__date {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
    letter-spacing: 0.02em;
}

.notice-item:hover {
    background: rgba(10, 69, 144, 0.02);
    margin: 0 -6px;
    padding-left: 6px;
    padding-right: 6px;
    border-radius: var(--radius-sm);
}

.notice-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.notice-placeholder--compact {
    min-height: 44px;
}

.notice-placeholder.is-hidden { display: none; }

.notice-placeholder__text {
    font-size: 0.88rem;
    color: var(--ink-muted);
    letter-spacing: 0.08em;
}

.notice-placeholder--compact .notice-placeholder__text {
    font-size: 0.8rem;
}

/* ── Main panel ── */
.container {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 20px 0 48px;
}

.main-panel {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 22px 22px;
    box-shadow: var(--shadow-lg);
    animation: rise-in 0.7s var(--ease) 0.2s both;
}

.panel-frame {
    position: absolute;
    inset: 8px;
    pointer-events: none;
}

.frame-corner {
    position: absolute;
    width: 14px; height: 14px;
    border-color: var(--blue-800);
    border-style: solid;
    opacity: 0.22;
}

.frame-corner--tl { top: 0; left: 0;  border-width: 1.5px 0 0 1.5px; }
.frame-corner--tr { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.frame-corner--bl { bottom: 0; left: 0;  border-width: 0 0 1.5px 1.5px; }
.frame-corner--br { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-header__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.panel-header__label {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--blue-800);
    white-space: nowrap;
}

/* ── Features（紧凑） ── */
.feature-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.feature-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px 8px;
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    transition: border-color 0.25s var(--ease);
}

.feature-item::before { display: none; }

.feature-item:hover {
    border-color: var(--blue-200);
    transform: none;
    box-shadow: none;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--blue-800) 0%, var(--blue-600) 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(10, 69, 144, 0.22);
    margin-bottom: 0;
}

.feature-icon svg { width: 14px; height: 14px; }

.feature-label {
    font-family: var(--font-serif);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--ink-secondary);
}

.panel-note {
    text-align: center;
    font-size: 0.88rem;
    color: var(--ink-secondary);
    line-height: 1.7;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--surface-2);
    border-left: 3px solid var(--blue-700);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── Download（突出） ── */
.download-section {
    margin-bottom: 14px;
}

.download-section__title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--ink-muted);
    text-align: center;
    margin-bottom: 10px;
}

.download-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: #fff;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn--android {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.38);
}

.download-btn--android:hover {
    box-shadow: 0 8px 28px rgba(22, 163, 74, 0.45);
}

.download-btn--ios {
    background: linear-gradient(135deg, #374151 0%, #1f2937 50%, #111827 100%);
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.32);
}

.download-btn--ios:hover {
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.4);
}

.download-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.download-btn__icon svg {
    width: 24px;
    height: 24px;
}

.download-btn__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.download-btn__label {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.download-btn__sub {
    font-size: 0.72rem;
    opacity: 0.82;
    letter-spacing: 0.06em;
}

.download-btn__arrow {
    display: flex;
    width: 22px;
    height: 22px;
    opacity: 0.85;
    flex-shrink: 0;
}

.download-btn__arrow svg {
    width: 100%;
    height: 100%;
}

/* ── Footer ── */
.gov-footer {
    position: relative;
    z-index: 1;
    padding-bottom: 28px;
}

.footer-inner { text-align: center; }

.footer-ornament {
    height: 1px;
    max-width: 200px;
    margin: 0 auto 16px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
    opacity: 0.4;
}

.footer-text {
    font-size: 0.73rem;
    color: var(--ink-faint);
    line-height: 1.65;
    margin-bottom: 5px;
}

.footer-copy {
    font-size: 0.66rem;
    color: var(--ink-faint);
    opacity: 0.65;
    letter-spacing: 0.06em;
}

/* ── Admin ── */
.admin-link {
    position: fixed;
    bottom: 8px; right: 8px;
    z-index: 10;
    opacity: 0.1;
    transition: opacity 0.3s;
}

.admin-link:hover { opacity: 1; }

#admin-link {
    color: var(--ink-faint);
    text-decoration: none;
    font-size: 0.7rem;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .header-inner {
        padding-top: 24px;
        gap: 16px;
    }

    .emblem-wrap { width: auto; height: auto; }
    .national-emblem { width: 56px; }

    .site-title__prefix {
        font-size: 0.95rem;
        letter-spacing: 0.22em;
        margin-bottom: 6px;
    }

    .site-title__suffix {
        font-size: 1.35rem;
        letter-spacing: 0.12em;
    }

    .header-en { display: none; }
    .top-bar__sub { display: none; }

    .notice-board { margin-top: -16px; }

    .notice-block--announce { min-height: 100px; }
    .notice-block--announce .notice-block__label { width: 56px; }
    .notice-block--announce .notice-block__label-text { font-size: 1rem; }
    .notice-block--notify .notice-block__label { width: 56px; }
    .notice-block__body { padding: 12px 14px; }
    .notice-block--notify .notice-block__body { padding: 8px 14px; }

    .notice-item--announce .notice-item__text {
        font-size: 0.88rem;
        white-space: normal;
    }

    .notice-item--notify .notice-item__text {
        white-space: normal;
        font-size: 0.8rem;
    }

    .notice-board__card { min-height: unset; }

    .main-panel { padding: 20px 14px 18px; }

    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .feature-item { padding: 8px 2px 6px; }
    .feature-icon { width: 24px; height: 24px; }
    .feature-icon svg { width: 12px; height: 12px; }
    .feature-label { font-size: 0.72rem; }

    .download-btn { padding: 14px 16px; }
    .download-btn__label { font-size: 0.98rem; }
}

@media (prefers-reduced-motion: reduce) {
    .notice-board__card,
    .main-panel { animation: none; }

    .download-btn,
    .notice-item { transition: none; }
}
