:root {
    --bg-base: #07111f;
    --bg-panel: rgba(8, 25, 45, 0.72);
    --bg-panel-strong: rgba(6, 18, 34, 0.88);
    --line-soft: rgba(164, 198, 255, 0.18);
    --text-main: #f4f7fb;
    --text-muted: #b9c7d9;
    --accent: #41d6c3;
    --accent-strong: #7ef5df;
    --danger: #ff726b;
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(65, 214, 195, 0.18), transparent 30%),
        radial-gradient(circle at right center, rgba(100, 130, 255, 0.22), transparent 28%),
        linear-gradient(135deg, #07111f 0%, #0b1930 55%, #03060f 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.3;
    pointer-events: none;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(150, 188, 255, 0.18);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--text-main);
    background: rgba(4, 14, 28, 0.86);
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(126, 245, 223, 0.72);
    box-shadow: 0 0 0 3px rgba(126, 245, 223, 0.15);
}

textarea {
    resize: vertical;
}

.primary-button,
.ghost-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #04212b;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 18px 36px rgba(65, 214, 195, 0.22);
}

.ghost-button {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.danger-button {
    color: #ffe1df;
    background: rgba(255, 114, 107, 0.12);
    border-color: rgba(255, 114, 107, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover {
    transform: translateY(-1px);
}

.glass-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(10, 29, 52, 0.92), rgba(7, 18, 34, 0.8));
    box-shadow: var(--shadow);
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 40%);
    pointer-events: none;
}

.eyebrow,
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-strong);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.24em;
}

.section-tag {
    margin-bottom: 12px;
}

.inline-message,
.muted-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.query-body,
.login-body {
    padding: 28px;
}

.query-shell {
    min-height: calc(100vh - 56px);
    border-radius: 32px;
    padding: 28px;
    background:
        linear-gradient(rgba(3, 10, 20, 0.38), rgba(3, 10, 20, 0.78)),
        linear-gradient(140deg, rgba(8, 18, 33, 0.78), rgba(6, 18, 34, 0.85));
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.topbar,
.query-grid,
.hero-meta,
.login-shell,
.feature-points {
    display: grid;
    gap: 20px;
}

.topbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    margin-bottom: 28px;
}

.topbar .ghost-button {
    justify-self: end;
}

.topbar h1,
.login-side h1 {
    font-size: clamp(42px, 5vw, 72px);
    line-height: 0.96;
}

.query-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    align-items: start;
}

.hero-card,
.notice-card,
.result-card,
.login-card {
    padding: 28px;
}

.hero-card h2,
.login-card h2 {
    margin-bottom: 14px;
    font-size: clamp(28px, 3vw, 46px);
}

.hero-copy {
    max-width: 720px;
    color: var(--text-muted);
    line-height: 1.8;
}

.query-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    margin: 24px 0 18px;
}

.hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.meta-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

.meta-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.meta-card strong {
    font-size: 16px;
}

.side-stack {
    display: grid;
    gap: 20px;
}

.notice-card h3,
.result-card h3 {
    margin-bottom: 12px;
    font-size: 32px;
}

.notice-card p,
.result-card p {
    line-height: 1.8;
    color: var(--text-muted);
}

.result-card {
    min-height: 320px;
}

.result-success {
    border-color: rgba(126, 245, 223, 0.4);
}

.result-miss {
    border-color: rgba(255, 192, 112, 0.34);
}

.result-empty {
    border-color: rgba(164, 198, 255, 0.18);
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.detail-list div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.detail-list dt {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.detail-list dd {
    margin: 0;
    word-break: break-word;
}

.login-shell {
    min-height: calc(100vh - 56px);
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 0.8fr);
    align-items: center;
}

.login-side {
    padding: 12px;
}

.login-side p {
    max-width: 620px;
    color: var(--text-muted);
    line-height: 1.8;
}

.feature-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 24px 0;
}

.feature-pill {
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.panel-form {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.panel-form label,
.permission-box {
    display: grid;
    gap: 10px;
}

.panel-form span,
.permission-box legend {
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 980px) {
    .query-grid,
    .login-shell,
    .topbar,
    .feature-points,
    .hero-meta,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .topbar .ghost-button {
        justify-self: start;
    }

    .query-form {
        grid-template-columns: 1fr;
    }
}
