:root {
    --teal-deep: #24515b;
    --teal-mid: #287c8f;
    --teal-light: #40a0ad;
    --teal-pale: #e8f0f1;
    --bg: #f8f9fa;
    --orange: #ffa25e;
    --orange-soft: #ffe4d0;
    --ink: #0f2a30;
    --ink-soft: #4a6770;
    --ink-faint: #8aa0a8;
    --line: #d9e4e6;
    --white: #ffffff;
    --green: #287c8f;
    --red: #c7544d;
    --shadow-sm: 0 1px 2px rgba(36, 81, 91, 0.04);
    --shadow-md: 0 8px 24px rgba(36, 81, 91, 0.08);
    --shadow-lg: 0 24px 60px rgba(36, 81, 91, 0.12);
    --font: "Sora", -apple-system, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-weight: 400;
}

.app {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 40px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo {
    height: 32px;
    flex-shrink: 0;
}
.brand-text {
    font-size: 19px;
    font-weight: 400;
    color: var(--teal-deep);
    letter-spacing: -0.01em;
}
.brand-text strong {
    font-weight: 700;
}
.header-meta {
    font-size: 12px;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Progress */
.progress {
    margin-bottom: 36px;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ink-faint);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.progress-bar {
    height: 3px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-light), var(--teal-deep));
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card */
.card {
    background: var(--teal-pale);
    border-radius: 24px;
    padding: 48px 48px 40px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at top right, rgba(64, 160, 173, 0.08), transparent 70%);
    pointer-events: none;
}

.question-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal-deep);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.block-marker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal-mid);
    position: relative;
    z-index: 1;
}
.block-marker::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--teal-mid);
}
.question-title {
    font-weight: 700;
    font-size: 30px;
    line-height: 1.18;
    color: var(--teal-deep);
    letter-spacing: -0.015em;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.question-sub {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: 36px;
    line-height: 1.6;
    max-width: 540px;
    position: relative;
    z-index: 1;
}
.q-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Marker highlight */
.marker {
    position: relative;
    display: inline-block;
}
.marker::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4%;
    height: 35%;
    background: var(--orange);
    z-index: -1;
    opacity: 0.7;
}

/* Slider */
.slider-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}
.slider-side {
    display: flex;
    flex-direction: column;
}
.slider-side.right {
    align-items: flex-end;
}
.slider-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--teal-deep);
    line-height: 1;
    letter-spacing: -0.02em;
    transition:
        color 0.2s,
        opacity 0.2s;
}
.slider-value.muted {
    color: var(--ink-faint);
    opacity: 0.6;
}
.slider-label {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.slider-track {
    position: relative;
    height: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 28px 0 12px;
}
.slider-fill {
    position: absolute;
    top: -1px;
    left: -1px;
    height: 8px;
    background: linear-gradient(90deg, var(--teal-light), var(--teal-deep));
    border-radius: 8px;
    pointer-events: none;
}
.slider-input {
    position: absolute;
    top: -10px;
    width: 100%;
    height: 28px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    margin: 0;
}
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--teal-deep);
    box-shadow: var(--shadow-md);
    cursor: grab;
    transition: transform 0.15s;
}
.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}
.slider-input::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}
.slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--teal-deep);
    box-shadow: var(--shadow-md);
    cursor: grab;
}
.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 8px;
    font-weight: 500;
}

/* Points distribution */
.points-header {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}
.points-remaining {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}
.points-remaining-num {
    font-weight: 700;
    color: var(--teal-deep);
    font-size: 15px;
}
.points-remaining.complete .points-remaining-num {
    color: var(--green);
}
.points-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.points-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.points-bar {
    width: 4px;
    height: 180px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
}
.points-bar-fill {
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 4px;
    background: linear-gradient(180deg, var(--teal-light), var(--teal-deep));
    border-radius: 4px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.points-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--teal-deep);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.points-name {
    font-size: 12px;
    color: var(--ink-soft);
    text-align: center;
    margin-bottom: 12px;
    min-height: 32px;
    line-height: 1.3;
    font-weight: 500;
}
.points-controls {
    display: flex;
    gap: 6px;
}
.points-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--teal-deep);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: var(--font);
}
.points-btn:hover:not(:disabled) {
    background: var(--teal-deep);
    color: var(--white);
    border-color: var(--teal-deep);
}
.points-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Importance 1-10 */
.importance-value {
    text-align: center;
    margin-top: 28px;
}
.importance-num {
    font-size: 64px;
    font-weight: 700;
    color: var(--teal-deep);
    line-height: 1;
    letter-spacing: -0.04em;
}
.importance-num-total {
    font-size: 22px;
    color: var(--ink-faint);
    font-weight: 500;
}

/* Fast-fire (F6) */
.ff-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ff-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: all 0.15s;
}
.ff-row:hover {
    border-color: var(--teal-light);
}
.ff-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--teal-deep);
    flex: 1;
}
.ff-options {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--line);
}
.ff-option {
    padding: 7px 14px;
    border-radius: 7px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.ff-option:hover {
    color: var(--teal-deep);
}
.ff-option.active {
    background: var(--teal-deep);
    color: var(--white);
}

/* Volume slider */
.volume-display {
    text-align: center;
    margin-bottom: 32px;
}
.volume-num {
    font-size: 38px;
    font-weight: 700;
    color: var(--teal-deep);
    line-height: 1;
    letter-spacing: -0.025em;
    display: inline-block;
}
.volume-label {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Channels (F8) */
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.channel-row {
    display: grid;
    grid-template-columns: 110px 1fr 110px;
    gap: 14px;
    align-items: center;
}
.channel-position {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.channel-position.optional {
    text-transform: none;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0;
}
.channel-select,
.system-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--teal-deep);
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2324515B' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    font-weight: 500;
    transition: border-color 0.15s;
}
.channel-select:focus,
.system-select:focus {
    outline: none;
    border-color: var(--teal-light);
}
.channel-percent {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 14px;
}
.channel-percent input {
    width: 50px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: var(--teal-deep);
    font-family: var(--font);
    text-align: right;
    padding: 8px 0;
}
.channel-percent input:focus {
    outline: none;
}
.channel-percent-suffix {
    font-size: 14px;
    color: var(--ink-faint);
    font-weight: 500;
}
.channel-sum {
    margin-top: 22px;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    color: var(--ink-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.channel-sum-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--teal-deep);
}
.channel-sum-num.complete {
    color: var(--green);
}
.channel-sum-num.over {
    color: var(--red);
}
.channel-sum-hint {
    color: var(--ink-faint);
    font-size: 12px;
    font-style: italic;
}

/* Systems (F9) */
.system-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.system-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.system-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-deep);
    margin-bottom: 2px;
    letter-spacing: 0.01em;
}
.system-other {
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid var(--teal-light);
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font);
    width: 100%;
    background: var(--white);
    color: var(--teal-deep);
}
.system-other:focus {
    outline: none;
    border-color: var(--teal-deep);
}
.system-hint {
    font-size: 12px;
    color: var(--ink-faint);
    margin-top: 4px;
    font-style: italic;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}
.btn {
    padding: 14px 26px;
    border-radius: 999px;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--orange);
    color: var(--ink);
}
.btn-primary:hover {
    background: #ff8f3d;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-secondary {
    background: transparent;
    color: var(--ink-soft);
    padding: 14px 16px;
}
.btn-secondary:hover {
    color: var(--teal-deep);
}
.btn-secondary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.btn-outline {
    background: var(--white);
    color: var(--teal-deep);
    border: 1px solid var(--teal-deep);
}
.btn-outline:hover {
    background: var(--teal-deep);
    color: var(--white);
}

/* Summary */
.summary-card {
    background: var(--white);
    border-radius: 24px;
    padding: 48px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}
.summary-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal-mid);
    margin-bottom: 14px;
}
.summary-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--teal-deep);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.summary-subtitle {
    color: var(--ink-soft);
    margin-bottom: 36px;
    font-size: 14px;
    max-width: 540px;
    line-height: 1.6;
}
.summary-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.summary-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}
.summary-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal-mid);
    margin-bottom: 14px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    gap: 16px;
}
.summary-item-label {
    color: var(--ink-soft);
    font-weight: 500;
    flex-shrink: 0;
}
.summary-item-value {
    color: var(--teal-deep);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}
.summary-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.json-block {
    background: var(--teal-deep);
    color: var(--teal-pale);
    padding: 22px;
    border-radius: 14px;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    overflow-x: auto;
    margin-top: 18px;
    line-height: 1.6;
    display: none;
    white-space: pre;
}
.json-block.visible {
    display: block;
}

@media (max-width: 720px) {
    .app {
        padding: 24px 16px 64px;
    }
    .card,
    .summary-card {
        padding: 32px 24px;
    }
    .question-title,
    .summary-title {
        font-size: 24px;
    }
    .points-grid {
        gap: 6px;
    }
    .points-bar {
        height: 130px;
    }
    .points-name {
        font-size: 11px;
    }
    .points-value {
        font-size: 22px;
    }
    .points-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .channel-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .channel-position {
        font-size: 11px;
    }
    .ff-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ff-options {
        width: 100%;
    }
    .ff-option {
        flex: 1;
        text-align: center;
    }
    .summary-item {
        flex-direction: column;
        gap: 4px;
    }
    .summary-item-value {
        text-align: left;
        max-width: 100%;
    }
}
