:root{--bg:#f4f7f9;--navy:#102a43;--blue:#2c779b;--text:#1c3447;--sub:#61778b;--line:#dce5eb;--white:#fff;--gold:#eeac45;--radius:20px;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP",sans-serif;color:var(--text)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);min-height:100dvh}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #93bddd;outline-offset:3px}
.app-shell{display:flex;flex-direction:column;min-height:100dvh}.header{display:flex;align-items:center;justify-content:space-between;padding:15px 34px;background:var(--navy);color:white}.brand-mark{font-size:15px;font-weight:800;letter-spacing:.08em}.brand-mark b{font-weight:400;font-size:11px;opacity:.65;margin-left:8px}.brand-dot{display:inline-block;width:11px;height:11px;background:#6ac4b4;border-radius:50%;margin-right:7px}.header-right{display:flex;align-items:center;gap:16px;font-weight:600}.pilot{font-size:11px;font-weight:700;letter-spacing:.05em;border:1px solid #557083;padding:5px 9px;border-radius:6px}.content{width:min(100%,1260px);padding:28px 34px 22px;margin:0 auto;flex:1}.stage{display:none}.stage.stage-active{display:block}.intro{margin-bottom:25px}.eyebrow{color:#3e88a0;font-weight:800;font-size:12px;letter-spacing:.15em}.intro h1{font-size:clamp(25px,3.2vw,35px);margin:7px 0 4px;letter-spacing:-.04em}.intro p{color:var(--sub);margin:0;font-size:15px;line-height:1.7}.split{display:grid;grid-template-columns:1.17fr 1fr;gap:22px}.panel{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 30px rgba(20,43,63,.04)}.voice-panel{padding:22px;display:flex;flex-direction:column;align-items:center;min-height:410px}.panel-kicker{width:100%;font-size:11px;font-weight:900;letter-spacing:.09em;color:#4d8aa4;text-transform:uppercase}.panel-kicker span{font-weight:500;letter-spacing:0;margin-left:5px}.voice-prompt{text-align:center;font-size:clamp(18px,2.2vw,24px);font-weight:750;line-height:1.65;margin:16px 0 10px}.record-button{position:relative;display:grid;place-items:center;border:0;background:none;width:170px;height:170px;margin:2px 0}.record-ring{position:absolute;inset:0;border:10px solid #e2edf4;border-radius:50%}.record-inner{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;background:linear-gradient(150deg,#4f9abc,#1d658c);color:#fff;border-radius:50%;width:145px;height:145px;box-shadow:0 11px 22px #1d658c35;transition:transform .18s}.record-button:active .record-inner{transform:scale(.97)}.record-button:disabled{cursor:default}.record-button:disabled .record-inner{filter:grayscale(.8);opacity:.55}#record-center{font-size:53px;line-height:1.1}#record-label{font-weight:700;font-size:13px}.waveform{width:320px;max-width:100%;height:52px;margin-top:6px}.record-message{color:var(--sub);font-size:13px;text-align:center;margin:4px 0}.guide-panel{padding:25px 27px;display:flex;flex-direction:column}.guide-row{display:flex;gap:14px;border-bottom:1px solid #e8eef2;padding:16px 0}.guide-row:last-of-type{border-bottom:0}.guide-num{color:#6b9caf;font-size:20px;font-weight:800}.guide-row b{font-size:15px}.guide-row p{font-size:13px;color:var(--sub);margin:5px 0 0;line-height:1.65}.consent{margin-top:auto;background:#f2f7f9;border-radius:12px;padding:13px 14px}.consent label{display:flex;align-items:flex-start;gap:9px;font-size:14px;font-weight:800}.consent input{width:20px;height:20px;accent-color:var(--blue);flex:0 0 auto;margin:0}.consent p{font-size:11px;color:var(--sub);line-height:1.6;margin:8px 0 0}.survey-grid,.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.survey-card{padding:25px 24px}.survey-card h2{font-size:22px;line-height:1.6;margin:12px 0 0;min-height:72px}.hint{color:var(--sub);font-size:13px;margin:2px 0 24px}.choice-grid{display:grid;gap:6px}.choice-grid.nine{grid-template-columns:repeat(9,minmax(0,1fr))}.choice-grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}.choice-grid button{height:62px;border:1px solid #d9e5eb;border-radius:10px;background:#f5f8fa;color:var(--text);font-size:22px;font-weight:800}.choice-grid button.selected{background:var(--blue);border-color:var(--blue);color:white;box-shadow:0 2px 12px #2c779b50}.endpoints{display:flex;justify-content:space-between;gap:10px;color:#738595;font-size:10.5px;margin-top:10px}.choice-note{color:var(--sub);font-size:13px;margin-top:18px}.phase-label{font-size:13px;font-weight:700;margin:28px 0 10px}.phases{display:flex;gap:8px}.phases button{border:1px solid var(--line);background:#f5f8fa;border-radius:9px;padding:11px 13px;font-weight:700;font-size:13px;flex:1}.phases button.selected{color:white;background:var(--navy)}.bottom-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:22px}.button{border:none;border-radius:13px;padding:16px 24px;font-size:16px;font-weight:800;min-height:58px}.button.primary{background:var(--navy);color:white;min-width:245px}.button.secondary{color:var(--navy);background:#e4edf3}.button:disabled{opacity:.38;cursor:default}.centered{text-align:center;margin:100px auto}.centered h2{font-size:28px}.centered p{color:var(--sub)}.loader{margin:auto;border:7px solid #dce9ef;border-top-color:#2685a5;width:88px;height:88px;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.result-panel{padding:28px}.result-head{display:flex;gap:14px;align-items:center;margin-bottom:22px}.result-head h2{font-size:24px;margin:0}.result-head p{color:var(--sub);font-size:12px;margin:5px 0}.icon-circle{font-size:29px;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#e4f0f5;color:#227296}.heart-icon{color:#b15a7c;background:#fbebf1}.risk-badge{font-size:36px;font-weight:900;background:#eaf0f2;color:#4b6472;padding:19px 20px;text-align:center;border-radius:16px}.risk-badge.low{background:#e4eeff;color:#2058bc}.risk-badge.mid{background:#fff3ce;color:#876000}.risk-badge.high{background:#ffe5e8;color:#be2a42}.heart-big{display:flex;align-items:baseline;justify-content:center;gap:9px;color:#b15a7c;font-weight:900}.heart-big span{font-size:62px}.heart-big small{font-size:16px;color:var(--sub)}.result-big-caption{font-size:12px;text-align:center;color:var(--sub);margin:12px 0 20px}.metric-list{display:grid;gap:10px}.metric-row{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:9px 0;font-size:14px;gap:12px}.metric-row span{color:var(--sub)}.small-note{font-size:11px;color:var(--sub);line-height:1.7}.result-footnote{background:#edf4f8;border-left:4px solid var(--blue);border-radius:8px;padding:14px 18px;margin-top:16px;font-size:13px;color:#365467}footer{display:flex;justify-content:space-between;gap:12px;color:#7b8ea0;font-size:11px;padding:15px 34px;border-top:1px solid var(--line)}
@media(max-width:820px){.header{padding:14px 20px}.content{padding:20px}.split,.survey-grid,.result-grid{grid-template-columns:1fr}.voice-panel{min-height:0}.guide-panel{padding:20px}.guide-row{padding:11px 0}.survey-card h2{min-height:0}.bottom-actions{justify-content:stretch}.button{flex:1}}@media(max-width:570px){.header-right .pilot{display:none}.header-right{font-size:12px}.content{padding:16px}.intro h1{font-size:24px}.voice-prompt{font-size:18px}.choice-grid.nine{gap:3px}.choice-grid button{height:45px;font-size:17px}.endpoints{font-size:9px}.bottom-actions{flex-direction:column}.button.primary{min-width:0}.panel{border-radius:15px}footer{flex-direction:column}}


/* HABATAXI PRE-CONSENTED KIOSK UI */

#stage-record .intro {
    text-align: center;
}

#stage-record .split {
    grid-template-columns: minmax(0, 1fr);
    max-width: 860px;
    margin: 0 auto;
}

#stage-record .voice-panel {
    min-height: 0;
    padding: 28px 36px;
}

#stage-record .voice-prompt {
    font-size: clamp(22px, 3vw, 32px);
    margin: 18px 0 8px;
}

#stage-record .record-instruction {
    color: var(--sub);
    font-size: 14px;
    text-align: center;
    margin: 0 0 20px;
}

#stage-record .record-button {
    width: 210px;
    height: 210px;
    margin: 8px 0;
}

#stage-record .record-inner {
    width: 184px;
    height: 184px;
}

#stage-record .waveform {
    width: 420px;
    max-width: 100%;
}

#stage-record .record-message {
    margin-top: 10px;
}

@media (max-width: 600px) {
    #stage-record .voice-panel {
        padding: 20px 16px;
    }
}


/* HABATAXI LARGE TEXT UI V1 */

:root {
    font-size: 20px;
    --text: #142f43;
    --sub: #40596b;
    --blue: #236787;
}

body {
    font-size: 20px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.header {
    padding: 12px 24px;
}

.brand-mark {
    font-size: 20px;
}

.brand-mark b {
    font-size: 15px;
    opacity: .9;
}

.header-right {
    font-size: 20px;
}

.pilot {
    font-size: 15px;
}

.content {
    width: min(100%, 1400px);
    padding: 18px 24px;
}

.intro {
    margin-bottom: 18px;
}

.eyebrow {
    font-size: 15px;
    color: #28667f;
}

.intro h1 {
    font-size: clamp(30px, 3.4vw, 40px);
    line-height: 1.3;
    letter-spacing: 0;
    margin: 4px 0 8px;
}

.intro p {
    font-size: 20px;
    line-height: 1.5;
}

.panel-kicker {
    font-size: 18px;
    color: #28667f;
}

/* Recording screen */

#stage-record .intro {
    text-align: center;
}

#stage-record .split {
    grid-template-columns: minmax(0, 1fr);
    max-width: 960px;
    margin: 0 auto;
}

#stage-record .voice-panel {
    padding: 24px;
    min-height: 0;
}

#stage-record .voice-prompt {
    font-size: clamp(28px, 3.1vw, 36px);
    line-height: 1.6;
    margin: 16px 0 10px;
}

#stage-record .record-button {
    width: 240px;
    height: 240px;
}

#stage-record .record-inner {
    width: 210px;
    height: 210px;
    background: #236787;
}

#record-center {
    font-size: 66px;
}

#record-label {
    font-size: 23px;
    font-weight: 800;
}

#stage-record .record-message {
    font-size: 22px;
    color: var(--text);
}

#stage-record .waveform {
    width: 440px;
    max-width: 100%;
}

/* Survey screen */

.survey-grid,
.result-grid {
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.survey-card {
    padding: 20px;
}

.survey-card h2 {
    font-size: 26px;
    line-height: 1.45;
    min-height: 0;
}

.hint {
    font-size: 18px;
    margin: 8px 0 18px;
}

.choice-grid button {
    min-height: 68px;
    font-size: 30px;
    font-weight: 800;
    border: 2px solid #b8cbd6;
}

.choice-grid button.selected {
    background: #236787;
    border-color: #236787;
}

.endpoints {
    font-size: 17px;
    line-height: 1.5;
    color: var(--sub);
}

.choice-note,
.phase-label {
    font-size: 20px;
}

.phases button {
    font-size: 20px;
    min-height: 64px;
    padding: 10px 6px;
}

.bottom-actions {
    margin-top: 16px;
    gap: 12px;
}

.button {
    font-size: 26px;
    min-height: 76px;
    padding: 12px 20px;
}

#stage-survey .bottom-actions .button {
    flex: 1;
    min-width: 0;
}

/* Loading screen */

.centered h2 {
    font-size: 34px;
}

.centered p {
    font-size: 22px;
}

/* Result screen */

#stage-result .intro {
    margin-bottom: 14px;
}

#stage-result .eyebrow {
    display: none;
}

.result-panel {
    padding: 18px;
    min-width: 0;
}

.result-head {
    gap: 12px;
    margin-bottom: 12px;
}

.result-head h2 {
    font-size: 30px;
    line-height: 1.2;
}

.result-head p {
    font-size: 18px;
    line-height: 1.4;
    margin: 4px 0 0;
}

.icon-circle {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.risk-badge {
    font-size: 46px;
    padding: 8px 14px;
    line-height: 1.4;
}

.heart-big {
    min-height: 80px;
    align-items: baseline;
    color: #a43d64;
    line-height: 1.2;
}

.heart-big span {
    font-size: 72px;
}

.heart-big small {
    font-size: 23px;
}

.result-big-caption {
    font-size: 18px;
    line-height: 1.4;
    margin: 6px 0 12px;
}

.metric-list {
    gap: 0;
}

.metric-row {
    font-size: 22px;
    line-height: 1.4;
    padding: 7px 0;
    align-items: baseline;
}

.metric-row span {
    font-weight: 600;
    color: var(--text);
    min-width: 0;
}

.metric-row b {
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
    text-align: right;
}

.small-note {
    font-size: 17px;
    line-height: 1.45;
    margin: 10px 0 0;
}

.result-footnote {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    padding: 10px 16px;
    margin-top: 12px;
}

/* Large full-width return button */

#stage-result .bottom-actions {
    display: block;
    margin-top: 14px;
}

#retry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 88px;
    gap: 2px;
    line-height: 1.3;
    padding: 10px 20px;
    border-radius: 14px;
}

.return-main {
    font-size: 30px;
    font-weight: 800;
}

.return-sub {
    font-size: 19px;
    font-weight: 600;
    color: #e5edf5;
}

footer {
    font-size: 15px;
    color: var(--sub);
    padding: 10px 24px;
}

button:focus-visible {
    outline: 4px solid #236787;
    outline-offset: 4px;
}

/* Small screens and portrait orientation */

@media (max-width: 820px) {
    .survey-grid,
    .result-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .content {
        padding: 16px;
    }

    .choice-grid.nine {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 570px) {
    .header-right {
        font-size: 18px;
    }

    .brand-mark b {
        display: none;
    }

    #stage-record .voice-panel {
        padding: 18px 12px;
    }

    #stage-record .voice-prompt {
        font-size: 26px;
    }

    .metric-row {
        font-size: 19px;
    }

    .metric-row b {
        font-size: 21px;
    }

    .return-main {
        font-size: 26px;
    }
}

/* HABATAXI SURVEY FIRST V3 */
    :root {font-size:20px;--text:#142f43;--sub:#40596b;--blue:#236787;}
    body {font-size:20px;line-height:1.45;-webkit-text-size-adjust:100%;}
    .content {width:min(100%,1400px);padding:16px 22px;}
    .intro {margin-bottom:14px;}
    .intro h1 {font-size:clamp(30px,3.4vw,40px);line-height:1.3;letter-spacing:0;}
    .intro p {font-size:20px;line-height:1.4;}
    .eyebrow,.panel-kicker {font-size:17px;color:#28667f;}
    #stage-record .split {grid-template-columns:1fr;max-width:960px;margin:auto;}
    #stage-record .voice-panel {min-height:0;padding:18px;}
    #stage-record .voice-prompt {font-size:clamp(28px,3.1vw,36px);margin:10px 0;}
    #stage-record .record-button {width:220px;height:220px;}
    #stage-record .record-inner {width:194px;height:194px;}
    #record-label {font-size:24px;} #record-center {font-size:64px;}
    #stage-record .record-message {font-size:22px;}
    #stage-record .bottom-actions {justify-content:center;}
    #record-back {width:min(100%,600px);}
    .survey-card {padding:18px;} .survey-card h2 {font-size:26px;min-height:0;line-height:1.4;}
    .hint,.endpoints {font-size:18px;color:var(--sub);}
    .choice-grid.nine {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
    .choice-grid button {min-height:64px;font-size:30px;}
    .choice-note,.phase-label {font-size:20px;}
    .phases button {font-size:20px;min-height:60px;padding:8px 4px;}
    .button {font-size:26px;min-height:76px;}
    #stage-survey .bottom-actions .button {flex:1;min-width:0;}
    .centered h2 {font-size:34px;} .centered p {font-size:22px;}
    #stage-result .eyebrow {display:none;}
    .result-grid,.survey-grid {gap:14px;grid-template-columns:repeat(2,minmax(0,1fr));}
    .result-panel {padding:16px;min-width:0;}
    .result-head {margin-bottom:8px;gap:10px;}
    .result-head h2 {font-size:30px;line-height:1.2;}
    .result-head p {font-size:18px;margin:2px 0;line-height:1.4;}
    .icon-circle {flex-shrink:0;width:48px;height:48px;}
    #sleepy-badge {font-size:40px;padding:5px 12px;line-height:1.3;}
    .result-big-caption {font-size:18px;margin:4px 0 8px;}
    .metric-list {gap:0;}
    .metric-row {font-size:22px;padding:5px 0;align-items:center;line-height:1.35;gap:8px;}
    .metric-row span {color:var(--text);font-weight:600;min-width:0;}
    .metric-row b {font-size:23px;font-weight:800;flex-shrink:0;text-align:right;}
    .level-tag {padding:3px 12px;border-radius:8px;min-width:88px;text-align:center!important;}
    .level-tag.low {background:#e4eeff;color:#2058bc;}
    .level-tag.mid {background:#fff3ce;color:#765000;}
    .level-tag.high {background:#ffe5e8;color:#a51f35;}
    .subjective-block {margin-top:10px;border-top:2px solid #dce5eb;padding-top:8px;}
    .subjective-block p {font-weight:700;font-size:21px;margin:0 0 5px;}
    #subjective-badge {font-size:29px;padding:4px 10px;line-height:1.3;}
    .stress-title {font-size:25px;font-weight:800;text-align:center;margin:16px 0 0;}
    .heart-big {color:#a43d64;min-height:0;line-height:1.2;}
    .heart-big span {font-size:76px;} .heart-big small {font-size:24px;}
    .stress-gauge {display:block;width:100%;height:22px;margin:14px 0 24px;accent-color:#a43d64;}
    .stress-gauge[hidden] {display:none;}
    .stress-gauge::-webkit-progress-bar {background:#eee5ea;border-radius:12px;}
    .stress-gauge::-webkit-progress-value {background:#a43d64;border-radius:12px;}
    .small-note {font-size:17px;line-height:1.45;margin:8px 0 0;color:var(--sub);}
    .result-footnote {font-size:18px;font-weight:600;line-height:1.4;padding:10px 14px;margin-top:10px;}
    #stage-result .bottom-actions {display:block;margin-top:10px;}
    #retry {display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:84px;gap:2px;padding:8px 16px;line-height:1.3;}
    .return-main {font-size:30px;font-weight:800;} .return-sub {font-size:19px;color:#e5edf5;}
    footer {font-size:15px;color:var(--sub);padding:8px 22px;}
    @media(max-width:820px) {.survey-grid,.result-grid {grid-template-columns:1fr;} .content {padding:14px;} .metric-row {font-size:20px;} .return-main {font-size:26px;}}
    
/* HABATAXI TENSION UI V3.1 */
.stress-title {font-size:clamp(27px,3vw,36px);font-weight:800;line-height:1.3;color:#142f43;}
.tension-caption {text-align:center;font-size:18px;font-weight:600;color:#40596b;margin:4px 0 0;}
.heart-big {justify-content:center;}
.stress-gauge {margin:10px 0 18px;}

/* HABATAXI DESIGN REFRESH V4 */
:root{--bg:#f2f6f8;--navy:#122d42;--blue:#187d87;--text:#122d42;--sub:#40596b;--line:#d6e0e6;--radius:22px;font-size:20px}
body{font-size:20px;line-height:1.45}
.header{padding:15px 28px;min-height:62px}.brand-mark{font-size:23px}.brand-mark b{font-size:14px;opacity:.85}.header-right{font-size:24px}
.content{max-width:1400px;width:100%;padding:14px 28px 10px}.panel{box-shadow:0 4px 20px #122d4209;border-radius:22px}
.step-flow{display:flex;justify-content:center;align-items:center;gap:14px;margin:0 0 12px;font-size:18px;font-weight:750;color:#40596b}
.step-item{padding:6px 12px;border-radius:30px;white-space:nowrap}.step-item.current{background:#187d87;color:#fff}.step-item.done{color:#187d87}.step-item.done::before{content:"✓ "}
.intro{margin:0 0 12px;text-align:center}.intro h1{font-size:clamp(29px,3.3vw,40px);margin:4px 0;line-height:1.3}.intro p:empty,.eyebrow,.survey-card .panel-kicker{display:none}
#stage-survey .survey-grid,#stage-result .result-grid{gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}
.survey-card{padding:20px;min-width:0}.survey-card h2{font-size:clamp(25px,2.6vw,32px);margin:0;min-height:0}.hint{font-size:20px;margin:7px 0 16px}
.choice-grid.nine{grid-template-columns:repeat(9,minmax(0,1fr));gap:5px}.choice-grid.five{gap:8px}.choice-grid button{height:78px;min-height:64px;font-size:32px;border:2px solid #aebfc9;background:#f3f7f8;border-radius:12px}
.choice-grid button.selected,.phases button.selected{background:#187d87;border-color:#187d87;color:#fff;box-shadow:none}
.endpoints{font-size:18px;font-weight:650;line-height:1.4;color:var(--sub)}.choice-note{font-size:21px;min-height:31px;margin-top:12px}.phase-label{font-size:19px;margin:14px 0 7px}.phases button{min-height:54px;font-size:19px;border:2px solid #b7c8d1;border-radius:12px;padding:7px 4px}
.bottom-actions{margin-top:14px;gap:12px}.button{min-height:72px;font-size:25px;border-radius:16px;padding:10px 18px}.button.secondary{background:#e4edf1;color:#122d42}.button:disabled{opacity:.55}
#stage-survey .bottom-actions #survey-back{flex:0 1 30%}#stage-survey .bottom-actions #survey-submit{flex:1}
#stage-record .split{max-width:980px;grid-template-columns:1fr;margin:0 auto}#stage-record .voice-panel{padding:18px 24px;min-height:0}
#stage-record .panel-kicker{text-align:center;font-size:19px;color:var(--sub);letter-spacing:0}
#stage-record .voice-prompt{font-size:clamp(30px,3.5vw,42px);line-height:1.55;margin:8px 0 10px}
#stage-record .record-button{width:230px;height:230px;margin:0}#stage-record .record-inner{width:204px;height:204px;background:#187d87;box-shadow:0 7px 24px #187d8730}
#stage-record .record-button:disabled .record-inner{filter:none;opacity:1}#record-center{font-size:66px}#record-label{font-size:25px}
#stage-record .waveform{height:45px;width:440px;max-width:100%;margin:2px 0}#stage-record .record-message{font-size:20px;margin:2px 0}#record-back{min-height:52px;font-size:20px;width:min(100%,420px)}
.centered{margin:0 auto}.centered .loader{margin:90px auto 25px;border-top-color:#187d87}.centered h2{font-size:36px}.centered p{font-size:24px}
#stage-result .intro{display:flex;justify-content:space-between;align-items:center;text-align:left;gap:12px}#result-time{font-size:18px}
.result-panel{padding:18px;min-width:0}.result-head{margin:0 0 12px;gap:10px}.result-head>div{flex:1;display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:4px 8px}
.result-head h2{font-size:clamp(25px,2.5vw,32px);line-height:1.25}.result-head p{font-size:18px;color:var(--sub);margin:0}.icon-circle{width:46px;height:46px}
#sleepy-badge,.result-panel #sleepy-badge + .result-big-caption{display:none}
#sleepy-details .metric-row:first-child{border:1px solid #c8d7e0;background:#edf3f6}.metric-list{gap:6px}.metric-row{background:#f3f6f8;border:0;border-radius:11px;min-height:53px;padding:6px 10px;gap:6px;font-size:23px;line-height:1.35}.metric-row span{font-weight:650}.metric-row b{font-size:24px;white-space:nowrap}
.level-tag{min-width:125px;padding:7px 10px;border-radius:10px}.level-tag::before{content:"● ";font-size:.55em;vertical-align:middle}
.subjective-block{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding:10px 0 0;margin:12px 0 0}.subjective-block p{font-size:22px;margin:0;line-height:1.35}#subjective-badge{min-width:125px;font-size:24px;padding:9px 10px}
.tension-meter{position:relative;height:155px;display:grid;place-items:center;margin:0 0 8px}.tension-meter .stress-gauge{width:270px;max-width:100%;height:auto;margin:0;position:absolute;inset:auto auto 0}.stress-gauge svg{display:block;width:100%;height:auto}.stress-gauge[hidden]{display:none}
.arc-bg,.arc-value{fill:none;stroke-width:17;stroke-linecap:round}.arc-bg{stroke:#e7dfe5}.arc-value{stroke:#a43d64}.arc-value.zero{visibility:hidden}.stress-gauge text{font-size:16px;fill:#40596b}
.tension-meter .heart-big{position:relative;display:flex;flex-direction:column;align-items:center;gap:0;line-height:1;pointer-events:none;padding-top:24px}.heart-big span{font-size:68px}.heart-big small{font-size:20px}
#heart-details .metric-row{min-height:46px}
#stage-result .bottom-actions{display:block;margin:12px 0 0}#retry{width:100%;min-height:76px;font-size:clamp(23px,2.5vw,30px);line-height:1.3;border-radius:16px;padding:12px}
.result-notes{margin-top:8px}.thanks{font-size:18px;font-weight:700;margin:4px 0;color:#187d87}.result-footnote{font-size:18px;line-height:1.45;margin:4px 0;padding:7px 10px;background:#e8f0f3;border-left:4px solid #187d87}.small-note{font-size:16px;line-height:1.4;margin:3px 0;color:var(--sub)}
footer{padding:9px 28px;font-size:16px;color:var(--sub)}
button:focus-visible{outline:4px solid #187d87;outline-offset:3px}
@media(min-width:821px) and (max-height:790px){.header{min-height:52px;padding:10px 24px}.content{padding-top:9px}.step-flow{margin-bottom:6px}.intro{margin-bottom:8px}.survey-card,.result-panel{padding:14px}.choice-grid button{height:68px}.metric-row{min-height:46px}.tension-meter{height:142px}.tension-meter .stress-gauge{width:245px}#stage-record .record-button{width:200px;height:200px}#stage-record .record-inner{width:178px;height:178px}#stage-record .voice-prompt{margin:4px 0;font-size:35px}#stage-record .voice-panel{padding:12px}#retry{min-height:66px}.result-footnote{font-size:16px}}
@media(max-width:960px){.choice-grid.nine{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.content{padding:14px}.header{padding:12px 16px}.header-right{font-size:20px}.brand-mark{font-size:20px}.brand-mark b{display:none}#stage-survey .survey-grid,#stage-result .result-grid{grid-template-columns:1fr}.step-flow{gap:2px;font-size:15px}.step-item{padding:6px 8px}#stage-result .intro{display:block}.metric-row{font-size:20px}.metric-row b{font-size:21px}.subjective-block p{font-size:20px}footer{padding:9px 14px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0.01ms!important;transition-duration:0.01ms!important}.loader{animation:none!important}}

/* HABATAXI AV V0.5 */
.av-result{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:2px 0}
#av-plot{width:100%;max-width:550px;height:auto;max-height:300px;display:block;overflow:visible}
#av-plot[hidden]{display:none}
.av-axes{stroke:#91a6b3;stroke-width:1.5;fill:none}
.av-axis-label{font-size:17px;font-weight:700;fill:#40596b}
.av-region-label{font-size:20px;font-weight:750;fill:#122d42}
.av-message{font-size:20px;font-weight:700;line-height:1.4;color:#122d42;text-align:center;margin:4px 0}
@media(min-width:1000px) and (max-height:800px){#av-plot{max-height:265px}.av-message{font-size:18px}}
@media(max-width:600px){.av-region-label{font-size:19px}.av-message{font-size:18px}}

/* HABATAXI IPAD RESULT FIT V0.5.1 */

@media (min-width: 821px) and (orientation: landscape) {

    body:has(#stage-result.stage-active) .header {
        min-height: 48px;
        padding: 8px 26px;
    }

    body:has(#stage-result.stage-active) .content {
        padding: 6px 26px 4px;
    }

    #stage-result .step-flow {
        margin-bottom: 5px;
        gap: 12px;
        font-size: 17px;
    }

    #stage-result .step-item {
        padding: 5px 12px;
    }

    #stage-result .intro {
        margin-bottom: 8px;
    }

    #stage-result .intro h1 {
        font-size: clamp(29px, 3vw, 36px);
        line-height: 1.2;
        margin: 0;
    }

    #stage-result #result-time {
        font-size: 17px;
    }

    #stage-result .result-grid {
        gap: 14px;
    }

    #stage-result .result-panel {
        padding: 12px 16px;
        border-radius: 20px;
    }

    #stage-result .result-head {
        margin-bottom: 8px;
    }

    #stage-result .result-head h2 {
        font-size: clamp(24px, 2.4vw, 28px);
    }

    #stage-result .icon-circle {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    #stage-result .metric-list {
        gap: 5px;
    }

    #stage-result .metric-row {
        min-height: 46px;
        padding: 4px 10px;
    }

    #stage-result .level-tag {
        padding: 5px 10px;
    }

    #stage-result .subjective-block {
        padding-top: 8px;
        margin-top: 8px;
    }

    #stage-result #subjective-badge {
        padding: 6px 10px;
    }

    #stage-result .av-result {
        padding: 0;
    }

    #stage-result #av-plot {
        width: 100%;
        height: 260px;
        height: clamp(220px,
                      calc(100dvh - 470px),
                      260px);
        max-height: none;
    }

    #stage-result .av-region-label {
        font-size: 22px;
    }

    #stage-result .av-axis-label {
        font-size: 19px;
    }

    #stage-result .av-message {
        font-size: 18px;
        line-height: 1.25;
        margin: 2px 0;
    }

    #stage-result .bottom-actions {
        margin-top: 8px;
    }

    #stage-result #retry {
        min-height: 64px;
        padding: 8px 12px;
        font-size: clamp(23px, 2.5vw, 29px);
    }

    #stage-result .result-notes {
        margin-top: 4px;
    }

    #stage-result .thanks {
        font-size: 17px;
        line-height: 1.3;
        margin: 3px 0;
    }

    #stage-result .result-footnote {
        font-size: 16px;
        line-height: 1.3;
        margin: 3px 0;
        padding: 5px 9px;
    }

    #stage-result .small-note {
        font-size: 16px;
        line-height: 1.3;
        margin: 2px 0;
    }

    body:has(#stage-result.stage-active) footer {
        padding: 5px 26px;
        font-size: 15px;
        line-height: 1.3;
    }
}

/* HABATAXI DRIVER ID V0.6 */
.driver-picker{display:flex;align-items:center;justify-content:center;gap:16px;padding:9px 16px;margin:0 0 12px;background:#fff;border:1px solid #d6e0e6;border-radius:16px}
.driver-picker label{font-size:24px;font-weight:750;color:#122d42;white-space:nowrap}
.driver-picker select{min-height:60px;width:min(100%,480px);font:inherit;font-size:25px;font-weight:700;color:#122d42;background:#f2f6f8;border:2px solid #aebfc9;border-radius:12px;padding:8px 14px}
.driver-picker select:valid{border-color:#187d87;background:#e4f2f1}
.driver-picker select:focus-visible{outline:3px solid #187d87;outline-offset:3px}
#stage-record .record-driver{font-size:21px;font-weight:700;color:#187d87;margin:0}
@media(min-width:821px) and (max-height:820px){#stage-survey .intro{margin-bottom:6px}#stage-survey .driver-picker{padding:5px 10px;margin-bottom:8px}#stage-survey .driver-picker select{min-height:52px}#stage-survey .survey-card{padding:12px 15px}#stage-survey .hint{margin:4px 0 8px}#stage-survey .choice-grid button{min-height:55px;height:58px}#stage-survey .bottom-actions{margin-top:8px}#stage-survey .bottom-actions .button{min-height:62px}}
@media(max-width:600px){.driver-picker{flex-direction:column;align-items:stretch;gap:5px}.driver-picker select{width:100%}}

/* HABATAXI DRIVER HOME V0.6.1 */
#stage-home .driver-home-intro{text-align:center;margin:0 0 14px}
#stage-home .driver-home-intro h1{font-size:clamp(25px,3vw,36px);line-height:1.25;margin:0 0 5px;color:#122d42;font-weight:800}
#stage-home .driver-home-intro p{font-size:clamp(20px,2.2vw,26px);font-weight:700;line-height:1.3;margin:0;color:#40596b}
#stage-home .driver-number-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}
#stage-home .driver-number,#stage-home .driver-other{font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-variant-numeric:tabular-nums}
#stage-home .driver-number{height:clamp(60px,calc((100vh - 320px)/5),90px);height:clamp(60px,calc((100dvh - 320px)/5),90px);min-width:0;padding:0;border:1.5px solid #c4d4df;border-radius:13px;background:#fff;color:#122d42;font-size:clamp(32px,3.5vw,42px);font-weight:800;line-height:1;box-shadow:0 2px 5px #122d4208}
#stage-home .driver-other{width:100%;min-height:62px;margin-top:12px;display:flex;align-items:center;justify-content:center;gap:16px;background:#e3ebf0;color:#122d42;border:1.5px solid #b5c8d3;border-radius:14px;font-size:clamp(18px,2vw,25px);font-weight:700;padding:8px 12px;line-height:1.2}
#stage-home .driver-other strong{font-size:36px;line-height:1}
#stage-home button:active{background:#187d87;color:white;border-color:#187d87}
#stage-home button:focus-visible{outline:3px solid #187d87;outline-offset:2px}
#stage-survey .driver-confirm{display:flex;justify-content:center;margin:0 0 9px}
#stage-survey .driver-confirm strong{background:#dceeed;border:1px solid #bdd7d6;border-radius:12px;color:#122d42;font-size:27px;font-weight:800;line-height:1.25;padding:5px 24px}
@media(min-width:821px) and (orientation:landscape){
  body:has(#stage-home.stage-active) .header{min-height:52px;padding:8px 26px}
  body:has(#stage-home.stage-active) .content{padding:10px 26px 8px}
  body:has(#stage-home.stage-active) footer{padding:5px 26px;font-size:15px;line-height:1.3}
  #stage-home .driver-home-intro{margin-bottom:10px}
  #stage-home .driver-number-grid{gap:8px}
  #stage-home .driver-other{margin-top:10px}
}
@media(max-width:820px){#stage-home .driver-number-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}#stage-home .driver-number{height:64px;font-size:32px}#stage-home .driver-other{gap:9px}}
@media(prefers-reduced-motion:reduce){#stage-home button{transition:none}}
