:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #687287;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --line: #e5eaf2;
    --panel: rgba(255, 255, 255, .86);
}

* { box-sizing: border-box; }

body.admin-body {
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", "Noto Sans SC", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 12%, rgba(191, 219, 254, .85), transparent 28rem),
        radial-gradient(circle at 90% 90%, rgba(224, 231, 255, .8), transparent 26rem),
        #f6f8fc;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 420px);
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(30, 64, 175, .12);
    backdrop-filter: blur(20px);
}

.login-card h1, .editor-card h1 { margin: 0 0 10px; letter-spacing: -.03em; }
.subtitle { margin: 0 0 30px; color: var(--muted); line-height: 1.7; }

.field { display: grid; gap: 9px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 650; }
.field input, .field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,.9);
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}
.field textarea { min-height: 190px; resize: vertical; line-height: 1.7; }

.primary-button, .quiet-button {
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.primary-button { width: 100%; border: 1px solid rgba(71,111,137,.1); color: #174661; background: #b3e1fa; box-shadow: 0 2px 5px rgba(33,57,73,.16); }
.primary-button:hover { background: #a5dbf8; box-shadow: 0 3px 7px rgba(33,57,73,.18); }
.primary-button:active { background:#95d3f4; box-shadow:none; }
.primary-button:focus-visible { outline:3px solid #6caccd; outline-offset:3px; }
.primary-button:disabled { color:#8b99a2; background:#e5ebef; box-shadow:none; opacity:1; cursor:wait; }
.quiet-button { color: #475569; background: #eef2f7; }

.message { min-height: 22px; margin: 16px 0 0; color: #dc2626; font-size: 14px; }
.message.success { color: #15803d; }

.dashboard {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}
.dashboard aside { padding: 34px 24px; border-right: 1px solid rgba(226,232,240,.9); background: rgba(255,255,255,.68); backdrop-filter: blur(18px); }
.dashboard aside h2 { margin: 10px 0 36px; font-size: 20px; }
.nav-pill { padding: 12px 14px; border-radius: 12px; background: #eaf2ff; color: var(--blue); font-weight: 700; }
.dashboard main { padding: 54px clamp(24px, 6vw, 88px); }
.editor-card { max-width: 820px; padding: clamp(26px, 5vw, 52px); border: 1px solid rgba(255,255,255,.9); border-radius: 28px; background: var(--panel); box-shadow: 0 24px 70px rgba(30,64,175,.1); }
.editor-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 32px; }
.counter-row { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.actions .primary-button { width: auto; min-width: 126px; }
.actions .message { margin: 0; }

@media (max-width: 720px) {
    .dashboard { grid-template-columns: 1fr; }
    .dashboard aside { padding: 18px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
    .dashboard aside h2 { display: inline-block; margin: 0 20px 0 0; }
    .nav-pill { display: inline-block; }
    .dashboard main { padding: 24px 16px; }
    .editor-head { display: block; }
    .editor-head .quiet-button { margin-top: 16px; }
    .login-card { padding: 30px 24px; }
}
