:root {
    --gold-primary: #D4AF37;
    --gold-light: #F7E7CE;
    --white-pearl: #F5EDE3;
    --black-text: #2C2C2C;
    --gray-text: #666666;
    --danger-red: #C84646;
    --warning-orange: #E67E22;
    --safe-blue: #3498DB;
    --line-green: #06C755;
    --font-serif: 'Noto Serif JP', 'Zen Old Mincho', serif;
    --font-english: 'Cinzel', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #F0E8DC;
    font-family: var(--font-serif);
    color: var(--black-text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    max-height: 900px;
    background: var(--white-pearl);
    position: relative;
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.4);
    border: 3px solid #888888;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Scrollable Content Area */
.content-wrapper.scrollable {
    overflow-y: auto;
    padding-bottom: 4rem;
    height: 100%;
    display: block;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.content-wrapper.scrollable::-webkit-scrollbar {
    display: none;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    padding: 2rem;
    background: radial-gradient(circle at top right, #FAF3E8, #F5EDE3);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* Typography & Common */
.brand-text {
    font-family: var(--font-english);
    color: var(--gold-primary);
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: center;
}

.main-title {
    font-size: 2.2rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

.block {
    display: block;
}

.highlight {
    border-bottom: 3px solid var(--gold-primary);
}

.sub-text {
    font-size: 1rem;
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 3.5rem;
    line-height: 1.8;
}

/* Buttons */
.cta-button {
    background: linear-gradient(135deg, #111, #333);
    color: #fff;
    border: none;
    padding: 1.2rem 2rem;
    font-family: var(--font-serif);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-button.secondary {
    background: #fff;
    color: var(--black-text);
    border: 1px solid var(--gold-primary);
}

.line-color {
    background: var(--line-green);
    color: #fff;
    box-shadow: 0 10px 20px rgba(6, 199, 85, 0.3);
}

.shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        left: 200%;
    }
}

/* Section 2: Scanning */
.scan-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-title {
    color: var(--gold-primary);
    font-family: var(--font-english);
    margin-bottom: 0.5rem;
}

.step-desc {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

.face-frame {
    width: 260px;
    height: 360px;
    border: 1px solid var(--gold-primary);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 130px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.scan-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: grayscale(100%);
}

.scan-line {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-primary);
    opacity: 0;
}

.scan-line.scanning {
    opacity: 1;
    animation: scanMove 2s infinite;
}

@keyframes scanMove {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

.status-box {
    text-align: center;
    width: 100%;
    height: 50px;
}

.status-box.hidden {
    opacity: 0;
}

.progress-bar {
    width: 180px;
    height: 2px;
    background: #eee;
    margin: 0 auto;
    position: relative;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--gold-primary);
    transition: width 0.1s;
}

/* Section 3: Result */
.result-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--gray-text);
    font-family: var(--font-english);
    letter-spacing: 0.2em;
}

.score-card,
.metrics-card,
.future-simulation,
.details-card {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #f8f8f8;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    width: 100%;
}

.score-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
}

.number {
    font-size: 3.5rem;
    font-weight: 500;
}

.unit {
    font-size: 1rem;
    margin-left: 5px;
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
    margin-bottom: 1rem;
}

.chart-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-text);
}

.metrics-list {
    list-style: none;
    padding: 0;
}

.metrics-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.metric-name {
    color: var(--black-text);
    font-weight: 500;
}

.metric-val {
    font-family: monospace;
}

.metric-val.danger {
    color: var(--danger-red);
    font-weight: bold;
}

.metric-val.warning {
    color: var(--warning-orange);
    font-weight: bold;
}

.metric-val.safe {
    color: var(--safe-blue);
}

.simulation-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--black-text);
}

.offer-limit {
    text-align: center;
    color: var(--danger-red);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Information Lockout UI */
.locked-section {
    position: relative;
    overflow: hidden;
}

/* Radar chart: blur content directly */
.metrics-card.locked-section h3,
.metrics-card.locked-section .chart-container,
.metrics-card.locked-section .chart-caption {
    -webkit-filter: blur(10px);
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 8px;
}

.lock-overlay.lock-overlay-bottom {
    top: auto;
    bottom: 0;
    height: 75%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 0.95) 100%);
    justify-content: flex-end;
    padding-bottom: 1.5rem;
}

/* Warning: blur text directly */
.future-simulation.locked-section .simulation-text {
    -webkit-filter: blur(5px);
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.warning-fade-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    z-index: 4;
    pointer-events: none;
}

.future-simulation.locked-section {
    min-height: 180px;
}

.lock-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.lock-text {
    font-size: 0.9rem;
    color: var(--black-text);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.locked-metrics-msg {
    text-align: center;
    padding: 1rem 0 0.5rem;
    color: var(--gray-text);
    font-size: 0.85rem;
    border-top: 1px dashed #ddd;
    margin-top: 0.5rem;
}

/* Metrics: blur items 4-12 directly */
ul.metrics-list li.locked-item {
    -webkit-filter: blur(6px) !important;
    filter: blur(6px) !important;
    pointer-events: none !important;
    user-select: none !important;
}