/* ========== Variables - 赤×オレンジテーマ(主張薄め) ========== */
:root {
    /* Primary: 落ち着いた赤×オレンジ */
    --primary: #e55a3c;          /* くすんだ赤オレンジ */
    --primary-dark: #c94a2e;
    --primary-light: #f5c6b8;
    --secondary: #d97757;        /* テラコッタ */
    --accent: #e8915a;           /* 柔らかいオレンジ */

    --danger: #dc2626;
    --success: #059669;
    --warning: #d97706;
    --info: #0891b2;

    --bg: #fdfaf7;               /* 暖かみのあるオフホワイト */
    --bg-card: #ffffff;
    --bg-soft: #f7f1ec;          /* 薄いベージュ */
    --border: #ead9cf;           /* 暖色系の薄ボーダー */
    --border-soft: #f0e3d9;
    --text: #2c2420;             /* 暖色寄りのダーク */
    --text-soft: #6b5d56;
    --text-muted: #a89991;

    --shadow-sm: 0 1px 2px rgba(180,90,60,0.05);
    --shadow: 0 4px 12px rgba(180,90,60,0.07);
    --shadow-lg: 0 10px 30px rgba(180,90,60,0.10);
    --shadow-xl: 0 20px 50px rgba(180,90,60,0.13);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* グラデーション(主張薄め - 落ち着いたトーン) */
    --gradient-primary: linear-gradient(135deg, #e55a3c 0%, #e8915a 100%);
    --gradient-soft: linear-gradient(135deg, #fef0e9 0%, #fdf4ec 100%);
    --gradient-warm: linear-gradient(135deg, #f4a578 0%, #e55a3c 100%);
    --gradient-bg: linear-gradient(180deg, #fdfaf7 0%, #fbf3ec 100%);
}

/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ========== Auth Screen (会員制) ========== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--gradient-soft);
}
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-soft);
}
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo i {
    font-size: 40px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-logo h1 {
    font-size: 22px;
    font-weight: 800;
    margin-top: 8px;
    letter-spacing: -0.01em;
}
.auth-logo .subtitle {
    color: var(--text-soft);
    font-size: 13px;
    margin-top: 4px;
}
.auth-card h2 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 24px;
    font-weight: 700;
}
.auth-tabs {
    display: flex;
    background: var(--bg-soft);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-soft);
    transition: all 0.2s;
}
.auth-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.auth-error.show { display: block; }
.auth-success {
    background: #f0fdf4;
    color: var(--success);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.auth-success.show { display: block; }
.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ========== App Container (ログイン後) ========== */
.app-container { display: none; }
.app-container.active { display: block; }

/* ========== Header ========== */
.main-header {
    background: rgba(255,253,250,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo i {
    font-size: 26px;
    color: var(--primary);
}
.logo h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.logo h1 small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
.logo-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.main-nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.active {
    background: var(--gradient-primary);
    color: white;
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    margin-left: 4px;
}
.user-menu .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.btn-logout {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-soft);
    background: var(--bg-soft);
    transition: all 0.2s;
    font-weight: 500;
}
.btn-logout:hover { background: var(--border); color: var(--danger); }

/* ========== Page System ========== */
.page { display: none; min-height: calc(100vh - 140px); padding: 40px 0; }
.page.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-header { text-align: center; margin-bottom: 36px; }
.page-header h2 { font-size: 30px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.page-header p { color: var(--text-soft); }

/* ========== Hero ========== */
.hero {
    background: var(--gradient-soft);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(229,90,60,0.08), transparent 70%);
    border-radius: 50%;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-text { max-width: 720px; margin: 0 auto; }
.hero-buttons { justify-content: center; }
.hero-description { margin-left: auto; margin-right: auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}
.hero-text h2 {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--text);
}
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-description {
    font-size: 16px;
    color: var(--text-soft);
    margin-bottom: 28px;
    max-width: 520px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.posture-illustration {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.posture-figure {
    aspect-ratio: 3/4;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid var(--border-soft);
}
.posture-figure:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.posture-figure::before {
    content: '';
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 60%;
    background: var(--gradient-primary);
    opacity: 0.85;
    border-radius: 28px 28px 6px 6px;
}
.posture-figure.kyphosis::before { transform: translateX(-50%) rotate(-3deg) skewX(-5deg); }
.posture-figure.lordosis::before { transform: translateX(-50%) skewX(3deg); }
.posture-figure.flat::before { opacity: 0.6; }
.figure-label {
    position: relative;
    background: rgba(0,0,0,0.65);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.btn-large { padding: 13px 26px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 3px 10px rgba(229,90,60,0.22);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(229,90,60,0.28);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
    background: white;
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--primary-light); }
.btn-text { color: var(--text-soft); padding: 11px 14px; }
.btn-text:hover { color: var(--primary); }
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #b91c1c; }
.btn-outline-danger {
    background: white;
    color: var(--danger);
    border-color: #fecaca;
}
.btn-outline-danger:hover { background: #fef2f2; }

/* ========== Section Title ========== */
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin: 56px 0 36px;
    letter-spacing: -0.02em;
}

/* ========== Features ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--bg-card);
    padding: 28px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}
.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-soft);
    color: var(--primary);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid var(--border-soft);
}
.feature-card h4 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { color: var(--text-soft); font-size: 13px; }

/* ========== Type Cards ========== */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 70px;
}
.type-card {
    background: var(--bg-card);
    padding: 24px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    text-align: center;
    transition: all 0.3s;
}
.type-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}
.type-card .type-icon { font-size: 32px; margin-bottom: 10px; }
.type-card[data-type="ideal"] .type-icon { color: var(--success); }
.type-card[data-type="kyphosis"] .type-icon { color: var(--accent); }
.type-card[data-type="lordosis"] .type-icon { color: var(--danger); }
.type-card[data-type="swayback"] .type-icon { color: #a855f7; }
.type-card[data-type="flat"] .type-icon { color: var(--info); }
.type-card h4 { font-size: 15px; margin-bottom: 6px; }
.type-card p { font-size: 12px; color: var(--text-soft); }

/* ========== Step Indicator ========== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s;
}
.step-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.step.active .step-number {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.08);
}
.step.active .step-label { color: var(--text); font-weight: 600; }
.step.completed .step-number { background: var(--success); color: white; }
.step-connector {
    width: 50px;
    height: 2px;
    background: var(--border);
}

/* ========== Step Content ========== */
.step-content { display: none; }
.step-content.active { display: block; animation: fadeIn 0.4s; }

/* ========== Form Card ========== */
.form-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 720px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
}
.form-card h3 { font-size: 20px; margin-bottom: 22px; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.form-row .form-group { margin-bottom: 0; }
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229,90,60,0.12);
}
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    margin-bottom: 0;
    font-weight: 400;
}
.checkbox-item:hover { border-color: var(--primary-light); background: var(--bg-soft); }
.checkbox-item input { accent-color: var(--primary); }

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* ========== Upload Cards ========== */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.upload-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    transition: all 0.3s;
}
.upload-card.has-image { border-color: var(--success); }
.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.upload-header h4 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.upload-header h4 i { color: var(--primary); }
.upload-required {
    background: #fef0e9;
    color: var(--primary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.upload-guide {
    background: var(--bg-soft);
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 14px;
}
.upload-guide p { margin: 0; }
.upload-area {
    aspect-ratio: 3/4;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    transition: all 0.2s;
}
.upload-area:hover { border-color: var(--primary); background: #fef0e9; }
.upload-area.drag-over { border-color: var(--primary); background: #fef0e9; transform: scale(1.01); }
.upload-area.has-image { border-style: solid; border-color: var(--success); cursor: default; }
.upload-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 18px;
}
.upload-placeholder p { font-size: 13px; margin-top: 10px; }
.silhouette {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}
.preview-image {
    display: none;
    width: 100%;
    height: 100%;
    /* カメラ起動時の<video>と画角を統一(cover + 3:4枠) */
    object-fit: cover;
    background: #1a1410;
}
.upload-area.has-image .preview-image { display: block; }
.upload-area.has-image .upload-placeholder { display: none; }

/* 撮影ガイド(点線オーバーレイ): 顔・重心・全身の目安 */
.capture-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.25s ease;
}
.upload-area.has-image .capture-guide {
    opacity: 0.55;
}
.upload-area:hover .capture-guide {
    opacity: 1;
}
.analysis-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
}
.upload-area.has-analysis .analysis-canvas { display: block; }
.file-input { display: none; }
.upload-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ========== Info Box ========== */
.info-box {
    background: var(--gradient-soft);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
    border: 1px solid var(--border-soft);
}
.info-box > i {
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.info-box strong { display: block; margin-bottom: 5px; font-size: 14px; }
.info-box ul { padding-left: 20px; font-size: 13px; color: var(--text-soft); }
.info-box li { margin-bottom: 2px; }

/* ========== Analyzing ========== */
.analyzing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 56px 36px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    max-width: 580px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
}
.scanner {
    width: 150px;
    height: 190px;
    margin: 0 auto 28px;
    position: relative;
    background: var(--bg-soft);
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--primary-light);
}
.scan-figure {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    color: var(--primary);
}
.scan-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 10px var(--primary);
    animation: scan 2s ease-in-out infinite;
}
@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: calc(100% - 3px); }
}
.analyzing-card h3 { font-size: 20px; margin-bottom: 8px; }
.analyzing-card > p { color: var(--text-soft); margin-bottom: 22px; }
.progress-bar {
    height: 8px;
    background: var(--bg-soft);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 22px;
}
.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.4s;
    border-radius: 4px;
}
.analyzing-steps {
    list-style: none;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}
.analyzing-steps li {
    padding: 7px 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    transition: color 0.3s;
}
.analyzing-steps li.done { color: var(--success); }
.analyzing-steps li.active { color: var(--primary); font-weight: 600; }

/* ========== Results ========== */
.result-hero {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 26px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.result-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.result-score-large {
    font-size: 88px;
    font-weight: 900;
    line-height: 1;
    margin: 14px 0;
    text-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.result-score-large small { font-size: 28px; opacity: 0.7; }
.result-grade {
    display: inline-block;
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(10px);
    padding: 6px 18px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 14px;
    font-size: 14px;
}
.result-type-badge {
    display: inline-block;
    background: white;
    color: var(--text);
    padding: 9px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow-lg);
}
.result-type-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}
.frontal-primary-badge {
    background: white;
    color: var(--primary-dark, #c2410c) !important;
}
.frontal-primary-badge i {
    color: var(--primary, #e55a3c);
    margin-right: 4px;
}
.frontal-tags-hero {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.frontal-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.frontal-tag.good {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}
.frontal-tag.warn {
    background: rgba(254, 215, 170, 0.95);
    color: #9a3412;
    border-color: rgba(154, 52, 18, 0.25);
}
@media (max-width: 640px) {
    .frontal-tag { font-size: 11.5px; padding: 4px 11px; }
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 26px;
}
.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}
.result-card h3 {
    font-size: 17px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.result-card h3 i { color: var(--primary); }
.result-card.full-width { grid-column: 1 / -1; }

.score-breakdown { display: flex; flex-direction: column; gap: 14px; }
.score-row-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}
.score-row-bar {
    height: 9px;
    background: var(--bg-soft);
    border-radius: 5px;
    overflow: hidden;
}
.score-row-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-out;
}

.metric-list { list-style: none; }
.metric-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.metric-list li:last-child { border-bottom: none; }
.metric-name { font-size: 13px; color: var(--text-soft); }
.metric-value { font-weight: 700; font-size: 15px; }
.metric-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
}
.metric-status.normal { background: #d1fae5; color: var(--success); }
.metric-status.warning { background: #fed7aa; color: var(--warning); }
.metric-status.danger { background: #fee2e2; color: var(--danger); }

/* ========== Captured Images with Ideal Line Overlay ========== */
.captured-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.captured-item {
    background: var(--bg-soft);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-soft);
}
.captured-item-label {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 10px;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}
.captured-item-image-wrap {
    aspect-ratio: 3/4;
    position: relative;
    overflow: hidden;
    background: #1a1410;
}
.captured-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.captured-item canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}
/* 凡例(あなたのライン/理想のライン)は非表示化 */
.captured-item-legend { display: none; }
.legend-item { display: none; }
.legend-line { display: none; }

/* 診断根拠(ランドマーク評価)も非表示化 */
.classification-reasons,
.diagnosis-reasons,
.classification-reason-card { display: none !important; }

/* ホームの姿勢サンプル(.posture-types)も非表示化(保険) */
.posture-types { display: none !important; }

/* ========== 4-perspective Recommendations ========== */
.advice-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 14px;
}
.advice-tab {
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text-soft);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.advice-tab:hover { background: white; border-color: var(--border); }
.advice-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}
.advice-content { display: none; }
.advice-content.active { display: block; animation: fadeIn 0.3s; }

/* ===== 新アドバイスカード(部位×メカニズム×未来ビジョン) ===== */
.advice-vision-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}
.advice-vision-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.advice-vision-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-soft);
}
.advice-vision-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-sm);
}
.advice-vision-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.advice-vision-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.45;
    margin: 0;
}
.advice-vision-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.advice-block {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.advice-block-future {
    background: linear-gradient(135deg, #fff7ed, #fef0e9);
    border-left: 3px solid var(--primary);
}
.advice-block-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.advice-block-future .advice-block-label { color: var(--primary); }
.advice-block-text {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.7;
}
.advice-equipment {
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 6px;
    border-top: 1px dashed var(--border-soft);
}
.advice-equipment strong { color: var(--text-soft); }

/* ===== 前回比較セクション ===== */
.compare-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}
.compare-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.compare-card h3 i { color: var(--primary); }
.compare-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.compare-cell {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
}
.compare-cell-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.compare-cell-values {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.compare-cell-values .arrow { color: var(--text-muted); }
.compare-cell-values .cur-value {
    color: var(--text);
    font-weight: 700;
}
.compare-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.compare-trend.up {
    background: #dcfce7;
    color: #166534;
}
.compare-trend.down {
    background: #fee2e2;
    color: #991b1b;
}
.compare-trend.flat {
    background: var(--bg-soft);
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .compare-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .compare-grid { grid-template-columns: 1fr; }
}

.advice-intro {
    background: var(--gradient-soft);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 18px;
    border-left: 3px solid var(--primary);
    font-size: 13px;
    color: var(--text-soft);
}
.advice-intro strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 14px; }

.recommendations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.recommendation-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 18px;
    transition: all 0.2s;
    background: white;
}
.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}
.recommendation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}
.recommendation-card h4 { font-size: 15px; }
.recommendation-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    background: #fef0e9;
    color: var(--primary);
    white-space: nowrap;
}
.recommendation-tag.training { background: #fed7aa; color: #9a3412; }
.recommendation-tag.stretch { background: #d1fae5; color: var(--success); }
.recommendation-tag.pilates { background: #dbeafe; color: #1e40af; }
.recommendation-tag.mindful { background: #ede9fe; color: #6d28d9; }
.recommendation-card .target {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.recommendation-card .description {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 10px;
}
.recommendation-card .meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.recommendation-card .meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== About Page ========== */
.about-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}
.about-section h3 { font-size: 20px; margin-bottom: 14px; }
.about-section > p { color: var(--text-soft); margin-bottom: 18px; font-size: 14px; }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.metric-card {
    background: var(--bg-soft);
    padding: 18px;
    border-radius: var(--radius);
    text-align: center;
}
.metric-card i {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 8px;
}
.metric-card h4 { font-size: 14px; margin-bottom: 5px; }
.metric-card p { font-size: 12px; color: var(--text-soft); }

.type-detail-list { display: flex; flex-direction: column; gap: 14px; }
.type-detail {
    padding: 18px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}
.type-detail h4 { font-size: 16px; margin-bottom: 6px; }
.type-detail p { font-size: 13px; color: var(--text-soft); }
.text-green { color: var(--success); }
.text-orange { color: var(--accent); }
.text-red { color: var(--danger); }
.text-purple { color: #a855f7; }
.text-blue { color: var(--info); }

.score-table {
    width: 100%;
    border-collapse: collapse;
}
.score-table th, .score-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
}
.score-table th { background: var(--bg-soft); font-weight: 600; }
.score-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}
.score-badge.excellent { background: #d1fae5; color: var(--success); }
.score-badge.good { background: #cffafe; color: var(--info); }
.score-badge.fair { background: #fed7aa; color: var(--warning); }
.score-badge.poor { background: #fecaca; color: #b91c1c; }
.score-badge.bad { background: #fee2e2; color: var(--danger); }

.disclaimer {
    background: #fff7ed;
    border-left: 4px solid var(--warning);
    padding: 14px 18px;
    border-radius: var(--radius);
    display: flex;
    gap: 12px;
}
.disclaimer i { color: var(--warning); font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.disclaimer p { font-size: 13px; }

/* ========== Webcam Modal ========== */
.webcam-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
}
.webcam-modal.active {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}
.webcam-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 10, 0.78);
    backdrop-filter: blur(4px);
}
.webcam-modal-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 560px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 22px 20px 18px;
    z-index: 1;
    animation: modalSlideUp 0.25s ease;
}
.webcam-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-soft);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}
.webcam-modal-close:hover {
    background: var(--primary);
    color: white;
}
.webcam-modal-header {
    text-align: center;
    margin-bottom: 14px;
    padding-right: 40px;
}
.webcam-modal-header h3 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.webcam-guide-text {
    font-size: 12px;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.5;
}
.webcam-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #0a0807;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
}
#webcam-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
/* 前面カメラ時は鏡像 + 少しズームアウトして全身が入りやすく */
#webcam-video.front-facing {
    transform: scaleX(-1) scale(0.72);
    background: #000;
}

/* 5秒タイマーカウントダウン表示 */
.webcam-countdown {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}
.webcam-countdown span {
    font-size: 140px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    animation: countdownPulse 1s ease-in-out infinite;
    line-height: 1;
}
@keyframes countdownPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.9; }
}
/* タイマー実行中のボタン抑制 */
.webcam-actions.counting #webcam-capture-btn,
.webcam-actions.counting #webcam-switch-btn {
    opacity: 0.5;
    pointer-events: none;
}
#webcam-timer-btn.counting {
    background: var(--danger);
    color: #fff;
}
.webcam-guide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    /* 黒背景上で見えやすくするため緑をやや明るく */
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.6));
}
.webcam-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #fecaca;
}
.webcam-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.webcam-actions .btn-large {
    padding: 12px 28px;
    font-size: 15px;
}

/* ========== History Detail Modal ========== */
.history-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.history-modal.active {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.history-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 32, 0.55);
    backdrop-filter: blur(4px);
}
.history-modal-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(180,90,60,0.25);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 26px 22px;
    z-index: 1;
    animation: modalSlideUp 0.25s ease;
}
@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.history-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-soft);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.history-modal-close:hover {
    background: var(--primary);
    color: white;
}
.history-detail-hero {
    text-align: center;
    background: var(--gradient-primary);
    color: white;
    padding: 24px 20px 22px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.history-detail-grade {
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}
.history-detail-score {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}
.history-detail-score small {
    font-size: 18px;
    opacity: 0.85;
    font-weight: 600;
}
.history-detail-message {
    font-size: 13px;
    opacity: 0.92;
    margin-bottom: 14px;
}
.history-detail-type {
    background: white;
    color: var(--primary-dark);
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}
.history-detail-date {
    font-size: 12px;
    opacity: 0.85;
}
.history-detail-section {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
}
.history-detail-section:last-of-type {
    border-bottom: none;
}
.history-detail-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
}
.history-rec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.history-rec-list li {
    padding: 8px 12px;
    background: var(--bg-soft);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.history-rec-list li i {
    color: var(--success);
    flex-shrink: 0;
}
.metric-range {
    font-size: 11px;
    color: var(--text-muted);
}
.history-detail-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 6px;
}
.history-detail-delete {
    color: var(--danger) !important;
}
.history-view-btn {
    color: var(--primary) !important;
}
.history-card[role="button"] {
    cursor: pointer;
}
.history-card[role="button"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========== History ========== */
.history-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 18px;
    align-items: center;
    transition: all 0.2s;
}
.history-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.history-score-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    flex-shrink: 0;
}
.history-info h4 { font-size: 15px; margin-bottom: 4px; }
.history-info .meta {
    color: var(--text-soft);
    font-size: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 50px; margin-bottom: 14px; color: var(--border); }
.empty-state h3 { font-weight: 600; margin-bottom: 8px; }

/* ========== Account / Settings ========== */
.account-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 640px;
    margin: 0 auto 20px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}
.account-card h3 {
    font-size: 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.account-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
}
.account-info-row:last-child { border-bottom: none; }
.account-info-row .label { color: var(--text-soft); }
.account-info-row .value { font-weight: 600; }
.danger-zone {
    background: #fef2f2;
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #fecaca;
}
.danger-zone h4 {
    color: var(--danger);
    margin-bottom: 8px;
    font-size: 15px;
}
.danger-zone p {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 14px;
}

/* ========== Footer ========== */
.main-footer {
    background: #2c2420;
    color: rgba(255,255,255,0.6);
    padding: 22px 0;
    text-align: center;
    margin-top: 50px;
    font-size: 12px;
}

/* ========== Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(44,36,32,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s; }
.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-xl);
}
.modal-card h3 { font-size: 18px; margin-bottom: 12px; }
.modal-card p { color: var(--text-soft); font-size: 14px; margin-bottom: 18px; }
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; gap: 36px; }
    .hero-text h2 { font-size: 32px; }
    .result-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .step-connector { width: 26px; }
    .captured-images-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .header-inner { padding: 12px 16px; }
    .main-nav { gap: 0; flex-wrap: wrap; }
    .nav-link { padding: 7px 9px; font-size: 12px; }
    .user-menu { padding-left: 8px; margin-left: 2px; }
    .user-menu .user-name { display: none; }
    .hero-text h2 { font-size: 26px; }
    .section-title { font-size: 22px; }
    .form-card, .auth-card, .account-card { padding: 22px 18px; }
    .step-label { font-size: 10px; }
    .step-connector { width: 14px; }
    .history-card { grid-template-columns: auto 1fr; gap: 10px; }
    .history-card > .btn, .history-card > .score-badge { grid-column: 1 / -1; }
    .captured-images-grid { grid-template-columns: 1fr; }
    .result-score-large { font-size: 56px; }
    .analyzing-card { padding: 36px 18px; }
    .advice-tab { font-size: 12px; padding: 7px 12px; }
}
