:root {
    --bg: #f4efe4;
    --surface: #fffaf0;
    --ink: #1f1d1a;
    --muted: #6c655b;
    --line: #ded3bf;
    --brand: #0f6d60;
    --accent: #c86b2d;
    --success: #126b39;
    --error: #8a1f2b;
    --shadow: 0 18px 50px rgba(49, 39, 22, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Hiragino Sans GB", "Noto Sans JP", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(200, 107, 45, 0.12), transparent 28rem),
        linear-gradient(180deg, #f5efe2 0%, #f2ead9 100%);
    color: var(--ink);
}

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

.shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid rgba(108, 101, 91, 0.15);
    backdrop-filter: blur(18px);
    background: rgba(255, 250, 240, 0.72);
    position: sticky;
    top: 0;
}

.site-header .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.brand { font-weight: 800; letter-spacing: 0.04em; }
.nav { display: flex; align-items: center; gap: 18px; }
.link-button, button, input { font: inherit; }
.link-button { padding: 0; background: none; border: 0; cursor: pointer; }

.hero, .auth-wrap, .dashboard-head { padding: 56px 0 24px; }

.hero {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    align-items: start;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1, h2 { margin: 0 0 16px; line-height: 1.05; }
h1 { font-size: clamp(2.1rem, 5vw, 4.4rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }

.lead, .muted { color: var(--muted); line-height: 1.7; }
.actions { display: flex; gap: 12px; margin-top: 28px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
}

.button-primary { background: var(--brand); color: white; }
.button-secondary {
    background: transparent;
    color: var(--brand);
    border-color: rgba(15, 109, 96, 0.25);
}

.panel, .auth-card, .stat-card, .flash {
    border: 1px solid var(--line);
    background: rgba(255, 250, 240, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.panel, .auth-card { padding: 28px; }
.subpanel {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}
.subpanel:first-of-type {
    padding-top: 0;
    border-top: 0;
}
.feature-list { margin: 0; padding-left: 20px; line-height: 1.9; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card { width: min(480px, 100%); }
.form-stack { display: grid; gap: 16px; }
.form-page { display: grid; gap: 18px; padding-bottom: 48px; }
.form-grid,
.split-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field-full {
    grid-column: 1 / -1;
}
.field { display: grid; gap: 8px; }
.field span { font-size: 0.95rem; font-weight: 700; }

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    padding: 12px 14px;
}

.choice-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.flash-stack { display: grid; gap: 10px; padding-top: 20px; }
.flash { padding: 14px 18px; }
.flash-success { border-color: rgba(18, 107, 57, 0.25); color: var(--success); }
.flash-error { border-color: rgba(138, 31, 43, 0.25); color: var(--error); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 10px 0 28px;
}

.stat-card { padding: 22px; }
.stat-card span { display: block; color: var(--muted); margin-bottom: 10px; }
.stat-card strong { font-size: 2rem; }
.stat-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack-list {
    display: grid;
    gap: 14px;
}

.list-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    padding: 18px;
}

.list-card-vertical {
    display: block;
}

.meta-pills,
.tag-groups {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 109, 96, 0.15);
    padding: 6px 10px;
    color: var(--brand);
    font-size: 0.85rem;
    white-space: nowrap;
}

.pill-success {
    border-color: rgba(18, 107, 57, 0.2);
    color: var(--success);
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    color: var(--muted);
    font-size: 0.9rem;
}

.prose-panel p {
    white-space: pre-line;
    line-height: 1.8;
}

.actions-sticky {
    position: sticky;
    bottom: 18px;
}

@media (max-width: 880px) {
    .hero, .stat-grid, .stat-grid-three, .form-grid, .split-grid, .choice-grid { grid-template-columns: 1fr; }
    .list-card {
        display: block;
    }
}
