:root {
    --ink: #1c1c1c;
    --muted: #6a6a6a;
    --accent: #f4b33a;
    --accent-2: #5a7d7c;
    --bg: #f6f3ef;
    --gt-panel: #ffffff;
    --shadow: 0 18px 40px rgba(20, 20, 20, 0.12);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, #fff2d9 0%, #f6f3ef 42%, #efe8df 100%);
    min-height: 100vh;
}

.app-shell {
    display: block;
    min-height: 100vh;
}

.side-nav {
    background: linear-gradient(160deg, #1e2a2f, #2f3e45);
    color: #f3efe8;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
}

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

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent);
    color: #1e2a2f;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 20px;
}

.brand-title {
    font-size: 18px;
    font-weight: 600;
}

.brand-sub {
    font-size: 13px;
    opacity: 0.7;
}

.nav-gt-link {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    color: #f3efe8;
    text-decoration: none;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-gt-link i {
    margin-right: 8px;
}

.nav-gt-link:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.user-box {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.logout {
    color: #f3efe8;
    text-decoration: underline;
    font-size: 13px;
}

.content {
    padding: 32px 40px 48px;
    position: relative;
    margin-left: 260px;
}

.content::before {
    content: "";
    position: absolute;
    right: 40px;
    top: 20px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(244, 179, 58, 0.25), transparent 70%);
    z-index: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.gt-page-icon {
    margin-right: 8px;
    color: var(--accent-2);
}

.gt-page-sub {
    font-size: 14px;
}

.gt-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    position: relative;
    z-index: 1;
}

.gt-card {
    background: var(--gt-panel);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeUp 0.5s ease both;
}

.gt-card.compact {
    box-shadow: 0 10px 24px rgba(20, 20, 20, 0.08);
}

.gt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gt-card-desc {
    color: var(--muted);
    margin: 0;
}

.gt-badge {
    background: #e4ecec;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--accent-2);
    font-weight: 600;
}

.gt-metric-label {
    color: var(--muted);
    font-size: 12px;
}

.gt-metric-value {
    font-size: 20px;
    font-weight: 700;
}

.gt-metric-value.large {
    font-size: 24px;
}

.gt-card-metrics {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.gt-card-footer {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.analysis-grid {
    display: grid;
    gap: 20px;
}

.gt-analysis-columns {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 20px;
}

.gt-analysis-left,
.gt-analysis-right {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.gt-dual-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 20px;
}

.gt-chart-box {
    display: grid;
    place-items: center;
    min-height: 240px;
}

.gt-panel {
    min-width: 0;
}

.gt-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gt-card-grid--stacked {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .gt-card-grid--stacked {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .gt-card-grid--stacked {
        grid-template-columns: 1fr;
    }
}


.gt-analysis-tabs {
    margin-bottom: 20px;
    gap: 10px;
}

.gt-analysis-tabs .nav-link {
    border-radius: 999px;
    font-weight: 600;
    color: var(--accent-2);
}

.gt-analysis-tabs .nav-link.active {
    background: var(--accent);
    color: #1e2a2f;
}

.map-panel .map-canvas {
    width: 100%;
    height: 420px;
    border-radius: 18px;
    overflow: hidden;
}

.gt-summary-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(244, 179, 58, 0.2);
    display: grid;
    place-items: center;
    color: #b57a1a;
    font-size: 16px;
}

.gt-summary-card {
    border: 1px solid rgba(30, 42, 47, 0.08);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    text-align: left;
}

.gt-summary-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.gt-summary-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.gt-summary-value {
    font-size: 22px;
    font-weight: 700;
}

.gt-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.gt-section-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    margin: 0 0 8px;
}

.gt-section-title--compact {
    font-size: 20px;
}

.gt-info-btn {
    border: none;
    background: rgba(90, 125, 124, 0.15);
    color: var(--accent-2);
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    cursor: pointer;
}

.gt-area-compare {
    display: grid;
    gap: 12px;
}

.gt-area-row {
    display: grid;
    gap: 8px;
}

.gt-area-title {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.gt-area-meta {
    font-weight: 600;
    color: var(--ink);
}

.area-color {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    margin-right: 8px;
    vertical-align: middle;
}

.gt-panel {
    background: var(--gt-panel);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.5s ease both;
}

.slider {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
}

.slide {
    flex: 0 0 200px;
    background: #fdf7ed;
    border-radius: 14px;
    padding: 16px;
    scroll-snap-align: start;
}

.slide-date {
    font-size: 13px;
    color: var(--muted);
}

.slide-volume {
    font-size: 22px;
    font-weight: 700;
    margin: 12px 0;
}

.heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.heatmap-cell {
    background: rgba(90, 125, 124, 0.1);
    border-radius: 14px;
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.heatmap-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(244, 179, 58, calc(var(--heat) / 200)), rgba(90, 125, 124, calc(var(--heat) / 160)));
    opacity: 0.8;
    z-index: 0;
}

.heatmap-day,
.heatmap-value {
    position: relative;
    z-index: 1;
}

.filters .form-select {
    min-width: 220px;
}

.gt-filters {
    margin-left: auto;
}

.gt-filters .form-select {
    min-width: 160px;
    width: auto;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, rgba(244, 179, 58, 0.2), transparent 55%);
}

.login-card {
    background: white;
    padding: 32px;
    border-radius: 24px;
    width: min(420px, 90vw);
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0;
}

.login-sub {
    color: var(--muted);
    margin-top: 4px;
}

.gt-link {
    color: var(--accent-2);
    text-decoration: none;
    font-size: 13px;
}

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

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .side-nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
    }

    .content {
        padding: 24px;
        margin-left: 0;
    }

    .gt-analysis-columns {
        grid-template-columns: 1fr;
    }

    .gt-dual-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .side-nav nav {
        width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
}
