:root {
    --font-display: 'Caveat', cursive;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

    --bg: #fffdf9;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text: #2b2838;
    --text-secondary: #6b6678;
    --text-tertiary: #a5a1b2;
    --border: #f0edf5;

    --coral: #ff7b7b;
    --coral-dark: #ff5252;
    --coral-soft: #fff2f2;
    --mint: #5ee1d8;
    --mint-dark: #3bc4bb;
    --mint-soft: #ecfbfa;
    --gold: #ffd95e;
    --gold-soft: #fff9e0;
    --lavender: #d4b8ff;
    --lavender-soft: #f7f2ff;

    --shadow-xs: 0 1px 3px rgba(43, 40, 56, 0.04);
    --shadow-sm: 0 4px 12px rgba(43, 40, 56, 0.06);
    --shadow-md: 0 12px 32px rgba(43, 40, 56, 0.08);
    --shadow-lg: 0 24px 56px rgba(43, 40, 56, 0.12);
    --shadow-hover: 0 32px 72px rgba(43, 40, 56, 0.14);

    --radius-sm: 16px;
    --radius: 24px;
    --radius-lg: 32px;
    --radius-full: 999px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--coral-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--coral);
}

/* Ambient background */
.ambient-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

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

.shape-coral {
    width: 520px;
    height: 520px;
    background: var(--coral);
    top: -180px;
    right: -160px;
    animation-delay: 0s;
}

.shape-mint {
    width: 420px;
    height: 420px;
    background: var(--mint);
    bottom: -140px;
    left: -160px;
    animation-delay: -6s;
}

.shape-lavender {
    width: 360px;
    height: 360px;
    background: var(--lavender);
    top: 35%;
    right: 5%;
    animation-delay: -12s;
}

.shape-gold {
    width: 280px;
    height: 280px;
    background: var(--gold);
    bottom: 20%;
    right: 15%;
    animation-delay: -4s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.06); }
    50% { transform: translate(-20px, 25px) scale(0.96); }
    75% { transform: translate(15px, 20px) scale(1.03); }
}

/* Common */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 20px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--coral), #ff9e9e);
    border: none;
    color: #fff;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(255, 123, 123, 0.35);
    color: #fff;
}

.btn-danger {
    background: var(--coral-soft);
    color: var(--coral-dark);
}

.btn-danger:hover {
    background: var(--coral);
    color: #fff;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--coral-soft);
    border-color: rgba(255, 123, 123, 0.2);
    color: #d64545;
}

.alert-success {
    background: var(--mint-soft);
    border-color: rgba(94, 225, 216, 0.2);
    color: #2a9d8f;
}

/* Forms */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px var(--mint-soft);
}

.form-row small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.form-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Installer */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.check-list li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 0.95rem;
}

.check-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--mint);
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1;
}

.check-list li.fail {
    color: var(--coral-dark);
}

.check-list li.fail::before {
    color: var(--coral-dark);
}

/* App layout */
.app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px 40px;
}

.app-header {
    text-align: center;
    margin-bottom: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--coral), var(--gold));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(255, 123, 123, 0.3);
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    color: var(--text);
    letter-spacing: -0.01em;
}

.brand-tagline {
    color: var(--text-secondary);
    margin: 10px 0 0;
    font-size: 1rem;
    font-weight: 400;
}

/* User bar */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
    min-height: 40px;
}

.user-bar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    background: var(--bg);
}

.user-bar-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.user-bar-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.user-bar-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.user-bar-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    background: var(--surface);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.user-bar-login a {
    color: var(--coral-dark);
    font-weight: 600;
}

/* User profile card */
.user-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
    border: 1px solid rgba(255, 123, 123, 0.12);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(255, 123, 123, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-card:hover {
    box-shadow: 0 12px 32px rgba(255, 123, 123, 0.14);
    transform: translateY(-2px);
    border-color: rgba(255, 123, 123, 0.2);
}

.user-card-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: linear-gradient(135deg, var(--coral), var(--gold));
    box-shadow: 0 6px 16px rgba(255, 123, 123, 0.2);
    flex-shrink: 0;
}

.user-card-body {
    flex: 1;
    min-width: 0;
}

.user-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.user-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-card-name {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.user-card-group {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--coral), #ff9e9e);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(255, 123, 123, 0.2);
}

.user-card-status {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--mint-dark);
    background: var(--mint-soft);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.user-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.user-card-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 0;
}

.user-card-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.user-card-stat-label {
    font-size: 0.74rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.user-card-tip {
    margin: 10px 0 0;
    font-size: 0.75rem;
    color: var(--coral-dark);
    background: var(--coral-soft);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

@media (max-width: 640px) {
    .user-card {
        flex-direction: column;
        text-align: center;
        padding: 18px;
        gap: 14px;
    }

    .user-card-head {
        flex-direction: column;
        align-items: center;
        margin-bottom: 10px;
    }

    .user-card-title {
        justify-content: center;
    }

    .user-card-stats {
        width: 100%;
    }

    .user-card-stat {
        align-items: center;
        padding: 10px 6px;
    }
}

.app-main {
    width: 100%;
    max-width: 720px;
}

/* Search composer */
.search-composer {
    display: flex;
    gap: 14px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.search-composer:focus-within {
    box-shadow: var(--shadow-hover), 0 0 0 4px var(--mint-soft);
    transform: translateY(-3px);
    border-color: rgba(94, 225, 216, 0.25);
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 14px;
}

.search-field-icon {
    width: 22px;
    height: 22px;
    color: var(--text-tertiary);
    margin-right: 14px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.search-composer:focus-within .search-field-icon {
    color: var(--mint-dark);
}

.search-field-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    padding: 14px 0;
    font-size: 1.05rem;
    font-family: var(--font-body);
    outline: none;
}

.search-field-input::placeholder {
    color: var(--text-tertiary);
}

.search-action {
    border-radius: var(--radius-full);
    padding: 14px 34px;
    border: none;
    background: linear-gradient(135deg, var(--coral), #ff9e9e);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
}

.search-action:hover {
    box-shadow: 0 14px 34px rgba(255, 123, 123, 0.35);
    transform: translateY(-2px);
}

.search-action:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.search-action-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    margin-top: 48px;
    color: var(--text-secondary);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.empty-state.hidden {
    display: none;
}

.empty-art {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 28px;
}

.empty-art-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    animation: orbit 8s ease-in-out infinite;
}

.circle-coral {
    width: 72px;
    height: 72px;
    background: var(--coral);
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.circle-mint {
    width: 56px;
    height: 56px;
    background: var(--mint);
    top: 8px;
    right: 0;
    animation-delay: -2.5s;
}

.circle-lavender {
    width: 64px;
    height: 64px;
    background: var(--lavender);
    bottom: 0;
    left: 24px;
    animation-delay: -5s;
}

@keyframes orbit {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(6px, -8px) scale(1.08); }
}

.empty-art-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--surface);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.empty-art-icon svg {
    width: 52px;
    height: 52px;
    color: var(--mint-dark);
}

.empty-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--text);
    margin: 0 0 8px;
    font-weight: 700;
}

.empty-desc {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Result area */
.result-area {
    margin-top: 8px;
    animation: fadeInUp 0.5s ease;
}

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

.result-tabs {
    display: inline-flex;
    gap: 8px;
    background: var(--surface);
    padding: 6px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.result-tab {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.result-tab:hover {
    color: var(--text);
    background: var(--bg);
}

.result-tab.active {
    background: var(--coral);
    color: #fff;
    box-shadow: 0 6px 16px rgba(255, 123, 123, 0.25);
}

.result-panel {
    display: none;
}

.result-panel.active {
    display: block;
    animation: fadeInUp 0.35s ease;
}

/* Answer sheet */
.answer-sheet {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.answer-sheet-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.answer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mint), #8de9e2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(94, 225, 216, 0.3);
}

.answer-avatar svg {
    width: 23px;
    height: 23px;
}

.answer-sheet-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.answer-sheet-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.cache-pill {
    font-size: 0.72rem;
    color: #c79f1a;
    font-weight: 600;
    background: var(--gold-soft);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.answer-sheet-body {
    color: var(--text);
    line-height: 1.85;
    font-size: 1rem;
}

.answer-sheet-body p {
    margin: 0 0 16px;
}

.answer-sheet-body p:last-child {
    margin-bottom: 0;
}

.answer-sheet-body h1,
.answer-sheet-body h2,
.answer-sheet-body h3,
.answer-sheet-body h4 {
    margin: 28px 0 14px;
    color: var(--text);
    font-weight: 700;
}

.answer-sheet-body h1 { font-size: 1.5rem; }
.answer-sheet-body h2 { font-size: 1.3rem; color: var(--coral-dark); }
.answer-sheet-body h3 { font-size: 1.1rem; color: var(--mint-dark); }
.answer-sheet-body h4 { font-size: 1rem; }

.answer-sheet-body pre {
    background: #faf8fc;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 0 0 16px;
    border: 1px solid var(--border);
}

.answer-sheet-body code {
    background: #faf8fc;
    padding: 3px 7px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88em;
    color: #c44569;
}

.answer-sheet-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text);
}

.answer-sheet-body ul,
.answer-sheet-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.answer-sheet-body li {
    margin-bottom: 8px;
}

.answer-sheet-body li::marker {
    color: var(--coral);
}

.answer-sheet-body strong {
    color: var(--text);
    font-weight: 700;
}

.answer-sheet-body blockquote {
    margin: 0 0 16px;
    padding: 14px 18px;
    border-left: 4px solid var(--lavender);
    background: var(--lavender-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}

.answer-sheet-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.stream-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: var(--coral);
    vertical-align: text-bottom;
    margin-left: 4px;
    border-radius: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Sources */
.sources-list {
    display: grid;
    gap: 16px;
}

.source-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.4s ease both;
}

.source-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(94, 225, 216, 0.35);
}

.source-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.05rem;
}

.source-title a {
    color: inherit;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.source-title a:hover {
    color: var(--coral-dark);
    border-bottom-color: var(--coral-dark);
}

.source-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.source-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--lavender-soft);
    color: #9b7ed1;
    font-weight: 600;
    font-size: 0.72rem;
}

.source-summary {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.app-footer {
    margin-top: auto;
    padding-top: 48px;
}

.app-footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.app-footer-link:hover {
    color: var(--coral-dark);
    background: var(--coral-soft);
}

/* Admin */
.admin-page {
    min-height: 100vh;
    background: var(--bg);
}

.admin-header {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xs);
    gap: 16px;
}

.admin-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.admin-header .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.admin-header .brand-name {
    font-size: 2rem;
    font-weight: 700;
}

.admin-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 36px 20px;
}

.admin-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.admin-section h2 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.admin-section h2 + .form-row {
    margin-top: 0;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-coral { background: var(--coral); }
.dot-mint { background: var(--mint); }
.dot-gold { background: var(--gold); }
.dot-lavender { background: var(--lavender); }

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.log-table th,
.log-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.log-table th {
    color: var(--text-secondary);
    font-weight: 600;
}

.log-table td {
    color: var(--text);
}

.login-box {
    max-width: 440px;
    margin: 100px auto;
    text-align: center;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
}

.login-brand .brand-name {
    font-size: 2.4rem;
}

/* Notice modal */
.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.notice-modal[hidden] {
    display: none;
}

.notice-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43, 40, 56, 0.4);
    backdrop-filter: blur(6px);
}

.notice-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-hover);
    text-align: center;
    animation: scaleIn 0.35s ease;
}

.notice-badge {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: var(--coral-dark);
    background: var(--coral-soft);
    border-radius: 50%;
    padding: 15px;
}

.notice-title {
    font-size: 1.6rem;
    margin: 0 0 16px;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
}

.notice-body {
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
    margin-bottom: 28px;
    max-height: 45vh;
    overflow-y: auto;
}

.notice-body p {
    margin: 0 0 12px;
}

.notice-body p:last-child {
    margin-bottom: 0;
}

.notice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--coral), #ff9e9e);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.notice-btn:hover {
    box-shadow: 0 12px 30px rgba(255, 123, 123, 0.35);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
    .app {
        padding: 56px 16px 32px;
    }

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

    .search-composer {
        flex-direction: column;
        border-radius: var(--radius);
        padding: 12px;
    }

    .search-action {
        width: 100%;
    }

    .search-field {
        padding: 0 8px;
    }

    .answer-sheet {
        padding: 22px;
    }

    .source-card {
        padding: 18px;
    }

    .notice-card {
        padding: 28px;
    }

    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
