* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f8fc;
    --panel: rgba(255, 255, 255, 0.82);
    --border: rgba(15, 23, 42, 0.08);
    --text: #1f2937;
    --muted: #6b7280;
    --orange: #ff8a00;
    --orange2: #ffb347;
    --green: #22c55e;
    --blue: #60a5fa;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

html, body {
    margin: 0;
    padding: 0;
    background:
        linear-gradient(135deg, #f7f9fc 0%, #eef3f9 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Meiryo, sans-serif;
}

body {
    min-height: 100vh;
    position: relative;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

.orb1 {
    width: 280px;
    height: 280px;
    background: #ffb347;
    top: 40px;
    left: 40px;
}

.orb2 {
    width: 320px;
    height: 320px;
    background: #8ec5ff;
    right: 40px;
    bottom: 40px;
}

.page {
    position: relative;
    z-index: 1;
    padding: 28px 16px 40px;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.86rem;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.15;
}

.hero-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    max-width: 760px;
}

.hero-chip {
    flex-shrink: 0;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.85);
    box-shadow: var(--shadow);
    font-weight: 800;
}

.layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 22px;
}

.side-column {
    display: grid;
    gap: 22px;
}

.panel {
    background: var(--panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-head h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.panel-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
}

.status-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f4f6f8;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    font-weight: 800;
    color: #4b5563;
}

.meter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.meter-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(246,248,252,0.95));
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 24px;
    padding: 20px;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.accent-download {
    background: linear-gradient(180deg, rgba(255,246,232,0.96), rgba(255,250,243,0.96));
}

.accent-upload {
    background: linear-gradient(180deg, rgba(237,250,242,0.96), rgba(246,252,248,0.96));
}

.meter-title {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.meter-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.meter-unit {
    margin-top: 8px;
    color: var(--muted);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-primary,
.btn-secondary {
    appearance: none;
    border: none;
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.18s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--orange), var(--orange2));
    color: white;
    box-shadow: 0 12px 24px rgba(255, 138, 0, 0.22);
}

.btn-secondary {
    background: rgba(255,255,255,0.9);
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.progress-wrap {
    margin-bottom: 18px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #e8edf4;
}

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), var(--orange2));
    transition: width 0.25s ease;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.step {
    border-radius: 16px;
    padding: 14px 12px;
    background: #f8fafc;
    border: 1px solid #e9eef5;
    text-align: center;
    color: #6b7280;
    font-weight: 800;
}

.step.active {
    background: #fff7ed;
    border-color: #ffd6ad;
    color: #c76a00;
}

.step.done {
    background: #ecfdf5;
    border-color: #b7ebcb;
    color: #117a46;
}

.log-box {
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    border-radius: 18px;
    padding: 16px;
    background: #0f172a;
    color: #e5edf7;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
    line-height: 1.8;
    white-space: pre-line;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.log-box::-webkit-scrollbar {
    width: 10px;
}

.log-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.log-box::-webkit-scrollbar-thumb {
    background: rgba(255, 179, 71, 0.45);
    border-radius: 999px;
}

.log-box::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 179, 71, 0.7);
}

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

.info-item {
    background: rgba(250,250,250,0.9);
    border: 1px solid #eceff3;
    border-radius: 18px;
    padding: 16px;
}

.info-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.info-value {
    line-height: 1.65;
    word-break: break-word;
    font-size: 1rem;
}

.info-value.small {
    font-size: 0.92rem;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .meter-grid,
    .step-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 18px 10px 28px;
    }

    .panel {
        padding: 18px;
        border-radius: 22px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}