/* Style from the "EchoCoach Mobile" Claude Design prototype.
 Loads last. All widths (heading size stays phone-only). No new UI text. */
:root{--muted-d:#6f7d76;--chip:#f5f7f3;--chip-ink:#536a5c;--focus:#38bdf8;--danger:#bf5f50}


body{background:var(--paper)}

/* Eyebrows: small green caps, 12px, 1.3px spacing */
.eyebrow{font-size:12px;letter-spacing:1.3px;font-weight:700;color:var(--green)}

/* Darker muted text for contrast */
.muted,.subhead,.setting-hint,.chat-privacy,.demo-caption{color:var(--muted-d)}
.form-label{color:var(--ink)}

h1 em{font-weight:500;color:var(--green)}

/* Cards: 16px radius, soft shadow, 16px padding */
.card,.settings-section{border-radius:16px;border-color:var(--line);box-shadow:var(--shadow)}

/* Buttons: 9px radius, soft chip secondary, tall primary */
.button{border-radius:9px;min-height:44px;font-weight:700}
.button.primary{background:var(--green);color:#fff;box-shadow:0 4px 10px #366f5d25;min-height:52px;font-size:16px}
.button.primary:hover,.button.primary:active{background:var(--green-dark)}
.button.primary:active{transform:scale(.98)}
.button.subtle{background:var(--chip);color:var(--chip-ink);border-color:transparent}
.button.danger-outline{background:#fff;color:var(--danger);border:1.5px solid var(--danger)}
.button:hover{transform:none}

/* Inputs: 46px, 8px radius, sky focus ring */
.form-label input,.form-label select,.form-label textarea,
select,input[type=text],input[type=email],input[type=password],input[type=number]{
  min-height:46px;border:1px solid #dfe4dc;border-radius:8px;font-size:16px;color:var(--ink);background:#fff}
.form-label textarea{min-height:0}
.form-label input:focus,.form-label select:focus,.form-label textarea:focus,
select:focus,input:focus{outline:none;border-color:var(--focus);box-shadow:0 0 0 3px #38bdf833}

/* Segmented tabs (plans, journal modes) */
.billing-cycle{background:var(--chip);border-radius:10px;padding:3px}

/* Stat tiles: tinted, rounded 12px */
.stat-card{border-radius:12px}

/* Upload zone dashed outline */
.upload-zone-outline{border-color:#d4d9d2}

/* Bottom actions stay thumb-reachable */
.feedback-actions{gap:10px}

@media(max-width:760px){
h1{font-size:30px;line-height:1.2;letter-spacing:-.7px}
}


/* The prototype's compact app chrome, expanded to the available screen width. */
.mobile-brand,.mobile-tabs{display:none}
.brand-mark{border-radius:10px}
.content-wrap{max-width:none;width:100%;padding-inline:clamp(24px,3.2vw,56px)}
@media(max-width:760px){
  .topbar{position:sticky;top:0;z-index:9;height:62px;background:rgba(246,247,242,.96);padding:0 16px;gap:10px}
  .mobile-menu{flex:0 0 auto;color:var(--green);font-size:19px}
  .mobile-brand{display:flex;align-items:center;gap:8px;margin-right:auto;color:var(--ink);text-decoration:none;font:800 18px var(--display);letter-spacing:-.7px}
  .mobile-brand .brand-mark{width:32px;height:32px;font-size:19px}
  .breadcrumb{display:none}
  .topbar-right{gap:4px}
  .credit-balance{display:inline-flex;align-items:center;background:#fff;border:1px solid var(--line);border-radius:24px;padding:5px 8px;font-size:11px;white-space:nowrap}
  .credit-balance .coach-coin{width:20px;height:20px}
  .account-link{max-width:94px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px;font-size:11px;min-height:36px}
  .content-wrap{padding:22px 16px 32px}
  .welcome-row,.page-heading{margin-bottom:18px}
  .subhead{font-size:14px;line-height:1.5}
  .recorder-card,.settings-section{padding:16px}
  .recorder-card .button.primary{width:100%}
  .side-stack{grid-template-columns:1fr}
  .mobile-tab{min-width:0;min-height:48px;border:0;background:transparent;color:#738079;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;font-weight:700}
  .mobile-tab span:first-child{font-size:20px;line-height:1}
  .mobile-tab.active{color:var(--green);background:#edf4ef}
  .app-footer{padding-bottom:24px}
  .tour-dialog{bottom:18px}
}
@media(max-width:360px){.account-link{max-width:60px}.mobile-brand{font-size:16px}.topbar{gap:5px;padding-inline:10px}.credit-balance{padding-inline:5px}}

.recorder-card:not(:fullscreen) #end-btn{position:static;margin-bottom:12px}
.side-stack{align-content:start}
@media(max-width:760px){.topbar-right .account-link{display:inline-flex}.topbar-right{flex:0 0 auto}.mobile-brand{min-width:0}.recorder-card .card-heading{align-items:center}}

@media(max-width:760px){.sidebar.open{z-index:12}}

/* Use the prototype navigation on larger screens too, without a phone-sized frame. */
@media(min-width:761px){
 .sidebar{width:250px;transform:translateX(-105%);transition:transform .2s;box-shadow:10px 0 30px #25332d13;z-index:12}
 .sidebar.open{transform:none}
 .main-area{margin-left:0}
 .topbar{position:sticky;top:0;z-index:9;background:rgba(246,247,242,.97);gap:16px}
 .mobile-menu{display:block;color:var(--green);font-size:20px}
 .mobile-brand{display:flex;align-items:center;gap:10px;margin-right:auto;color:var(--ink);text-decoration:none;font:800 20px var(--display);letter-spacing:-.7px}
 .mobile-brand .brand-mark{width:34px;height:34px}
 .breadcrumb{display:none}
 .credit-balance{background:#fff;border:1px solid var(--line)}
 .content-wrap{padding-bottom:55px}
 .mobile-tab{min-width:0;min-height:52px;border:0;background:transparent;color:#738079;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:12px;font-weight:700}
 .mobile-tab span:first-child{font-size:20px;line-height:1}
 .mobile-tab.active{color:var(--green);background:#edf4ef}
 .app-footer{padding-bottom:24px}
 .tour-dialog{bottom:18px}
}


/* Reference screen treatment: stacked, generous cards across the available width. */
.welcome-row,.page-heading{align-items:flex-start;margin-bottom:22px}
.welcome-row h1,.page-heading h1{font-size:clamp(30px,3.5vw,42px);line-height:1.13}
.welcome-row .subhead,.page-heading .subhead{font-size:15px;line-height:1.5;max-width:46rem}
.practice-layout{grid-template-columns:minmax(0,1fr);gap:16px}
.recorder-card{padding:clamp(18px,2.5vw,28px);box-shadow:0 8px 28px #25332d09}
.recorder-card #end-btn:disabled{display:none}
.recorder-card .card-heading{align-items:center;margin-bottom:14px}
.recorder-card .live-label{text-transform:uppercase;letter-spacing:1px;font-size:12px}
#details-panel .form-label{margin:14px 0;gap:7px}
#details-panel .form-label input{min-height:48px}
.score-research{background:#f8faf6;border:1px solid #e9eee7;border-radius:12px;padding:12px 14px;margin:14px 0}
#details-save{min-width:140px}
.metro{border:0;border-top:1px solid #e8ede6;border-radius:0;margin-top:18px;padding:18px 0 4px;background:transparent}
.metro-check{display:flex;align-items:center;gap:12px;font-weight:700}
.metro-check input[type=checkbox]{accent-color:var(--green);width:20px;height:20px;flex:none}
.metro-row{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-top:12px}
.metro-field{min-width:100px;flex:1}
.metro-field input,.metro-field select{width:100%;min-height:46px}
.effort-control{border-top:1px solid #edf0eb;padding-top:14px;margin-top:18px}
.recorder-core{padding-top:30px}
.recording-orb{width:112px;height:112px;background:#e5f0e9;font-size:36px}
.recorder-actions .button{min-width:min(100%,300px)}
.side-stack{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));align-items:start}
.streak-card,.history-card{padding:20px}
.settings-card:has(.settings-section){background:transparent;border:0;box-shadow:none;padding:0;display:grid;gap:16px}
.settings-section{display:grid;grid-template-columns:1fr;gap:8px;background:#fff;border:1px solid var(--line);padding:22px;margin:0}
.settings-section h2{font-size:21px;margin:0 0 8px}
.settings-section .muted{font-size:14px;line-height:1.55}
.settings-section .account-actions{display:flex;flex-wrap:wrap;gap:8px}
.billing-cycle{display:flex;gap:4px;padding:4px;border-radius:10px;background:#f2f5f0}
.billing-cycle label{flex:1;text-align:center}
.billing-cycle label span{display:block;padding:10px;border-radius:8px}
.billing-cycle input:checked + span{background:#fff;box-shadow:0 1px 5px #25332d17;color:var(--ink)}
.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.stat-card{padding:20px;gap:10px;min-height:150px}
.stat-card strong{font-size:28px}
.progress-layout{grid-template-columns:1fr;gap:14px}
.chart-card,.metrics-card,.compare-card,.weekly-card{padding:22px}
.chat-header{padding:18px}.coach-avatar{border-radius:12px}
.chat-message>div{padding:14px 16px;border-radius:14px;background:#eff5f0}
.chat-message p{font-size:14px;line-height:1.6}
.calendar-card{padding:clamp(12px,2vw,24px)}
@media(max-width:760px){
 .recorder-card{padding:16px}
 .recorder-actions .button,#details-save{width:100%}
 .side-stack{grid-template-columns:1fr}
 .settings-section{padding:16px}
 .stat-card{padding:15px;min-height:132px}
 .stat-card strong{font-size:24px}
 .calendar-day{min-height:54px}
}

.chat-header #chat-new{margin-left:auto;white-space:nowrap}
@media(max-width:760px){.chat-aside{display:block;padding:12px}.chat-header{flex-wrap:wrap}.chat-header #chat-new{font-size:12px;padding:8px}.chat-header .fs-btn{margin-left:auto}}

/* Keep navigation on the left at every screen size. */
:root{--navigation-width:120px}
.mobile-tabs{position:fixed;z-index:11;inset:0 auto 0 0;width:var(--navigation-width);display:flex;flex-direction:column;gap:8px;overflow-y:auto;padding:80px 8px max(16px,env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-right:1px solid var(--line);box-shadow:3px 0 24px #25332d0b}
.mobile-tab{flex:0 0 auto;width:100%;min-height:76px;padding:12px 8px;gap:6px;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.mobile-tab span:first-child{display:grid;place-items:center;font-size:28px;line-height:1}
.mobile-tab svg{display:block;width:28px;height:28px}
.main-area{margin-left:var(--navigation-width);min-width:0}
#recording-replay{bottom:20px}
@media(max-width:760px){
 :root{--navigation-width:80px}
 .mobile-tabs{padding:76px 4px max(12px,env(safe-area-inset-bottom));gap:6px}
 .mobile-tab{min-height:64px;padding:10px 4px;font-size:11px;gap:5px}
 .mobile-tab span:first-child{font-size:26px}
 .mobile-tab svg{width:26px;height:26px}
 .topbar{padding-inline:10px;gap:8px}
 .mobile-brand{overflow:hidden;font-size:16px;gap:6px}
 .mobile-brand .brand-mark{flex:none}
 .tour-dialog{left:calc(var(--navigation-width) + 10px);right:10px}
}

/* Keep the focus-card copy inside its border, including narrow screens. */
.heat-card{min-width:0;max-width:100%;padding:22px;overflow-wrap:anywhere}
.heat-card>.eyebrow{display:block;line-height:1.5}
.heat-card>h2,.heat-card>.muted{max-width:100%;overflow-wrap:anywhere}
@media(max-width:760px){.heat-card{padding:16px}.heat-card.locked{padding-top:40px}}

/* Fit full translated labels on one line; JS sizes the shared left rail. */
.mobile-tab,.sidebar .nav-item{white-space:nowrap;word-break:normal;overflow-wrap:normal;flex-shrink:0}
.mobile-tab .navigation-label,.sidebar .nav-item .navigation-label,.journal-plan-label{display:block;flex:none;width:max-content;max-width:none;white-space:nowrap;word-break:normal;overflow-wrap:normal;text-overflow:clip}
.sidebar{width:var(--navigation-width)}
.sidebar .nav-item{flex-direction:column;justify-content:center;text-align:center;font-size:14px;line-height:1.3;padding:12px 8px;gap:6px}
.sidebar .brand{margin-left:0;max-width:100%;flex-wrap:wrap;justify-content:center}
.sidebar .side-label{text-align:center;padding-left:0}
.main-area{width:calc(100% - var(--navigation-width))}
.content-wrap,.view,.settings-layout,.settings-card,.settings-section,.practice-layout,.recorder-card{min-width:0}
.topbar:has(#upgrade-plan){height:auto;min-height:67px;flex-wrap:wrap;padding-block:10px;gap:10px}
.topbar:has(#upgrade-plan) .topbar-right{display:flex;flex-wrap:wrap;justify-content:flex-end;max-width:100%;min-width:0;gap:8px}
.topbar:has(#upgrade-plan) #upgrade-plan{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.topbar:has(#upgrade-plan) .credit-balance{max-width:100%;min-width:0}
.topbar:has(#upgrade-plan) .credit-balance>span{min-width:0}
@media(max-width:760px){
 .sidebar .nav-item{font-size:11px;padding:10px 4px;gap:5px}
 .sidebar{padding-inline:4px}
}
/* Avoid size containment here: pseudo-fullscreen children must stay fixed to the viewport. */
body.narrow-workspace .content-wrap{padding-inline:12px}
body.narrow-workspace .welcome-row,body.narrow-workspace .page-heading{flex-direction:column;gap:12px}
body.narrow-workspace .topbar:has(#upgrade-plan){padding-inline:10px}
body.narrow-workspace .topbar:has(#upgrade-plan) .topbar-right{display:grid;grid-template-columns:minmax(0,1fr);width:100%;flex:1 1 100%;justify-items:stretch;gap:6px}
body.narrow-workspace .topbar:has(#upgrade-plan) .credit-balance{width:100%;justify-content:center;padding-inline:5px;overflow-wrap:anywhere;white-space:normal}
body.narrow-workspace .topbar:has(#upgrade-plan) .credit-balance>span{white-space:normal;overflow:visible;text-overflow:clip}
body.narrow-workspace .topbar:has(#upgrade-plan) #upgrade-plan{width:100%;padding-inline:6px;line-height:1.4}
body.narrow-workspace .topbar:has(#upgrade-plan) .account-menu-wrap{width:100%;max-width:100%}
body.narrow-workspace .topbar:has(#upgrade-plan) .account-link{max-width:100%;width:100%;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;justify-content:center}
body.narrow-workspace .topbar:has(#upgrade-plan) .account-menu{right:0;min-width:0;width:100%}
body.narrow-workspace .card-heading,body.narrow-workspace .calendar-controls,body.narrow-workspace .range-select,body.narrow-workspace .feedback-tabs{flex-wrap:wrap;max-width:100%}
body.narrow-workspace .feedback-tabs button{min-width:0;max-width:100%;overflow-wrap:anywhere}
body.narrow-workspace .main-area .pricing-section .billing-cycle label span{white-space:normal;flex-wrap:wrap}
body.narrow-workspace .settings-section,body.narrow-workspace .recorder-card{padding-inline:12px}
body.narrow-workspace .settings-section{grid-template-columns:minmax(0,1fr)}
body.narrow-workspace .settings-section>*{min-width:0}
body.narrow-workspace .form-label input,body.narrow-workspace .form-label textarea,body.narrow-workspace .form-label select,body.narrow-workspace .lang-select,body.narrow-workspace #coach-effort{min-width:0;max-width:100%;width:100%}
body.narrow-workspace .button{min-width:0;max-width:100%;white-space:normal}
body.narrow-workspace #details-save{min-width:0}
body.narrow-workspace .today-chip{max-width:100%}
body.narrow-workspace .button,body.narrow-workspace .form-label,body.narrow-workspace .muted,body.narrow-workspace .subhead,body.narrow-workspace h1,body.narrow-workspace h2,body.narrow-workspace h3,body.narrow-workspace .setting-hint{overflow-wrap:anywhere}
body.narrow-workspace .calendar-controls b{min-width:0}
body.narrow-workspace .calendar-card{max-width:100%;overflow-x:auto}
body.narrow-workspace .stat-grid,body.narrow-workspace .badge-grid{grid-template-columns:minmax(0,1fr)}
body.narrow-workspace .app-footer{flex-wrap:wrap;padding-inline:12px}
/* Extremely narrow content can follow a wide translated navigation rail. */
body.narrow-workspace .voice-options,body.narrow-workspace .voice-option,body.narrow-workspace .voice-option>span{min-width:0;max-width:100%}
body.narrow-workspace .voice-option>span,body.narrow-workspace .eyebrow,body.narrow-workspace .field-label{overflow-wrap:anywhere;white-space:normal}
body.narrow-workspace .voice-option input{flex:none}
body.narrow-workspace .main-area .settings-section .plan-grid{grid-template-columns:minmax(0,1fr);min-width:0}
body.narrow-workspace .plan-item,body.narrow-workspace .coin-pack-label,body.narrow-workspace .coin-pack-label>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
body.narrow-workspace .main-area .pricing-section .plan-badge{position:static;align-self:flex-start;max-width:100%;white-space:normal}
body.narrow-workspace .main-area .pricing-section .plan-item[data-popular]>b{padding-inline-end:0}
body.narrow-workspace .main-area .pricing-section .billing-cycle{min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
body.narrow-workspace .main-area .pricing-section .billing-cycle label{min-width:0}
body.narrow-workspace select{min-width:0;max-width:100%}
body.narrow-workspace .recorder-card .recording-orb{max-width:100%;height:auto;aspect-ratio:1}
body.narrow-workspace .recorder-card .card-heading{gap:8px}
body.narrow-workspace .recorder-card .live-label{white-space:normal;overflow-wrap:anywhere}
body.narrow-workspace .practice-chart{max-width:100%;overflow-x:auto}
body.narrow-workspace .chart-card,body.narrow-workspace .metrics-card,body.narrow-workspace .compare-card,body.narrow-workspace .weekly-card{min-width:0;padding-inline:12px}
body.narrow-workspace .session-row{grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:8px}
body.narrow-workspace .session-row .session-art{display:none}
body.narrow-workspace .session-main b,body.narrow-workspace .session-main small{max-width:100%;overflow-wrap:anywhere}
body.narrow-workspace .metro-field,body.narrow-workspace .metro-field input,body.narrow-workspace .metro-field select{min-width:0;max-width:100%}
body.narrow-workspace .upload-zone-title,body.narrow-workspace .upload-zone-hint{min-width:0;max-width:100%;width:100%;overflow-wrap:anywhere;white-space:normal}
body.narrow-workspace .live-label,body.narrow-workspace .metro-check>span{min-width:0;overflow-wrap:anywhere}
body.narrow-workspace .metro-field>span,body.narrow-workspace .metro-hint,body.narrow-workspace .recording-status{max-width:100%;overflow-wrap:anywhere}
body.narrow-workspace .waveform{max-width:100%;overflow:hidden}
body.compact-workspace .content-wrap{padding-inline:8px}
body.compact-workspace .settings-section,body.compact-workspace .recorder-card,body.compact-workspace .heat-card{padding-inline:6px}
body.compact-workspace .button{padding-inline:3px}
body.compact-workspace .recorder-card .metro-row{grid-template-columns:minmax(0,1fr)}
body.compact-workspace .recorder-core{padding-inline:0}
body.compact-workspace .recording-clock{font-size:14px}
body.compact-workspace .main-area{overflow-wrap:anywhere}
body.compact-workspace .main-area .plan-item{padding:8px 4px}
body.compact-workspace .main-area .plan-item>b{font-size:14px}
body.compact-workspace .main-area .plan-item strong{font-size:20px}
body.compact-workspace .plan-features{padding-inline-start:12px}
body.compact-workspace .empty-state{min-width:0;max-width:100%;padding-inline:6px;overflow-wrap:anywhere}
body.compact-workspace .main-area .pricing-section .plan-features{padding-inline:0;font-size:13px}
body.compact-workspace .main-area .pricing-section .plan-features li{display:block}
body.compact-workspace .main-area .pricing-section .plan-features li::before{display:inline-block;width:16px;height:16px;margin-inline-end:4px;vertical-align:text-top}
body.narrow-workspace .page-heading>div,body.narrow-workspace .welcome-row>div{min-width:0;max-width:100%}
body.compact-workspace h1{font-size:24px}
body.compact-workspace .badge-item{flex-direction:column;align-items:flex-start;padding:8px 4px;gap:6px}
body.compact-workspace .badge-item>:not(.badge-medal){min-width:0;max-width:100%;overflow-wrap:anywhere}
body.compact-workspace .calendar-weekdays,body.compact-workspace .calendar-grid{min-width:280px}

/* Phone top bar (logo, Coach Coins, account) stays at the top of the page and scrolls away with it (owner's choice, 15 Nov). Desktop keeps it sticky. */
.topbar{position:-webkit-sticky;position:sticky;top:0}
@media(max-width:760px){
 .topbar{position:relative;background:var(--paper);padding-top:env(safe-area-inset-top,0px);height:calc(62px + env(safe-area-inset-top,0px))}
 .topbar:has(#upgrade-plan){height:auto;padding-top:calc(10px + env(safe-area-inset-top,0px))}
}

/* iOS draws some symbols (play, gear, sun, star...) as colour emoji; keep them as plain glyphs like the rest */
html,body,button,input,select,textarea{font-variant-emoji:text}
.button.chat-retry{background:#b42318;color:#fff;border-color:#b42318}.button.chat-retry:hover{background:#912018;border-color:#912018}
