/* A · 맑은 수면. Shared visual tokens; behavior remains in component styles. */
:root{--brand:#0d5b63;--brand-hover:#094951;--accent:#237f85;--ink:#193d44;--muted:#587177;--paper:#fafaf7;--surface:#fff;--tint:#e6f4f2;--line:#d9e5e3;--blue:var(--brand);color:var(--ink);background:var(--paper)}
body,body.info-page:has(.account-nav){background:var(--paper);color:var(--ink)}
body>header{background:var(--paper);border-color:var(--line);backdrop-filter:none}
.brand{display:inline-flex;align-items:center;gap:9px;color:var(--brand);font-weight:800;letter-spacing:-1px}
.brand::before{content:"";width:25px;height:25px;flex:none;background:url('/brand-mark.svg') center/contain no-repeat}
body>header{gap:12px;flex-wrap:wrap}
body>header .brand{font-size:27px;line-height:1.2;letter-spacing:-.8px;white-space:nowrap}
body>header a:not(.brand),body>header .header-actions button{font-size:16px;font-weight:600;line-height:1.4;text-decoration:none;color:var(--brand)}
body>header>a:not(.brand){min-height:44px;display:inline-flex;align-items:center}
body>header a.header-account{flex-direction:column;justify-content:center;align-items:flex-start;font-size:17px;gap:2px;margin-left:auto;margin-right:0}
body>header .header-private{display:block;font-size:13px;font-weight:500;line-height:1.4;letter-spacing:0;color:var(--muted)}
body>header>.settings-link{margin-left:0}
@media(max-width:400px){body>header{padding-left:16px;padding-right:16px;gap:10px}body>header .brand{font-size:26px;gap:6px}.landing header{column-gap:10px}}
.page-preparing{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:180px;margin:0;padding:28px 20px;text-align:center;color:var(--muted);font-size:14px;line-height:1.6}
.page-preparing strong{font-size:17px;font-weight:650;color:var(--ink)}
.page-preparing::before,.page-transition::before{content:"";width:22px;height:22px;flex:none;border:2px solid var(--line);border-top-color:var(--brand);border-radius:50%;animation:page-turn 1s linear infinite}
.page-transition{position:fixed;z-index:100;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100% - 32px);padding:12px 18px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--brand);box-shadow:0 4px 20px #193d4414;font-size:15px;font-weight:600;pointer-events:none}
.page-transition::before{width:17px;height:17px}
@keyframes page-turn{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.page-preparing::before,.page-transition::before{animation:none}}
h1,h2,.hero h1,.measuring .hero h1,.card h2{color:var(--ink);letter-spacing:-.7px}
.hero p,.muted,small,.auth-remember,.auth-policy{color:var(--muted)}
.card{background:var(--surface);border-color:var(--line);border-radius:18px;box-shadow:none}
button,.button{border-radius:11px;background:#edf3f2;color:var(--brand);font-weight:650}
button.primary,.button.primary,.touch{background:var(--brand);color:white}
button.primary:hover,.button.primary:hover,.touch:hover{background:var(--brand-hover)}
.outline{background:var(--surface);border-color:var(--line)}
.danger{color:#a93238;background:#fff1f0}
.card input,.card select,.card textarea,input,select,textarea{border-color:#b9cecb;border-radius:10px;background:var(--surface);color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:2px}
button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.pill,.tag,.trial-badge{background:var(--tint);color:var(--brand)}
.settings-link{background:transparent;color:var(--brand)}
.tabs button.active,.bottom-nav button.active{color:var(--brand)}
.tabs button.active{box-shadow:inset 0 -3px var(--brand)}
.bottom-nav{background:var(--surface);border-color:var(--line)}
.stat strong,.stats .stat strong,.timer,.result-card strong{color:var(--brand)}
.arrival,.rank{background:var(--tint);color:var(--brand)}
.touch.running{background:var(--brand-hover);color:#fff}
.add-place{background:var(--tint);color:var(--brand)}
.pool-name{background:transparent;color:var(--ink)}
.class-tile{background:#f1f7f6;border:1px solid var(--line);border-radius:12px}
.class-result{background:#f1f7f6;color:var(--brand)}
.auth-card{max-width:520px;margin:24px auto;padding:30px}
.auth-card h1{font-size:30px}.auth-card .primary{min-height:52px}
.auth-links button{background:transparent;color:var(--brand)}
.utility-footer{color:var(--muted)}

/* Photograph is decoration: controls work before it downloads. */
.landing header{max-width:1100px;width:100%;margin:0 auto;border:0;padding:16px 28px}
.landing main{max-width:1100px;padding:12px 28px 24px;justify-content:center}
.landing .calm-hero{position:relative;isolation:isolate;overflow:hidden;padding:0;border:1px solid var(--line);border-radius:26px;background:var(--tint);min-height:490px}
.landing-water{position:absolute;inset:0 0 0 38%;z-index:-1}
.landing-water img{display:block;width:100%;height:100%;object-fit:cover;object-position:70% 50%}
.landing-copy{width:65%;min-height:490px;padding:48px;background:linear-gradient(90deg,var(--paper) 65%,#fafaf7e8 85%,#fafaf700)}
.landing-label{color:var(--brand);font-size:12px;letter-spacing:1.2px;font-weight:750}
.landing .landing-hero h1{color:var(--brand);font-size:clamp(32px,4.5vw,48px);line-height:1.28;letter-spacing:-1.8px;margin:20px 0 16px}
.landing .landing-hero p{color:var(--muted);line-height:1.7;font-size:15px}
.landing .entry-grid{max-width:390px;margin:28px 0 0;gap:10px}
.landing .entry-card{min-height:70px;padding:14px 18px;gap:12px;border-radius:12px;border:1px solid #b5d0cd;background:var(--paper);color:var(--brand)}
.landing .swimmer.entry-card{background:var(--brand);color:white;border-color:var(--brand)}
.landing .entry-copy strong,.landing .swimmer .entry-copy strong{font-size:18px;line-height:1.35;color:inherit}
.landing .entry-copy>span{font-size:12px;color:var(--muted)}
.landing .swimmer .entry-copy>span{color:#d9efec}
.landing .entry-icon,.landing .teacher .entry-icon{width:34px;height:34px;background:transparent;color:inherit}
.landing .entry-icon svg{width:27px;height:27px}
.landing .entry-card>span:last-child{margin-left:auto}
.landing .landing-note{font-size:12px;margin:22px 0 0;color:var(--brand)}
.landing .header-login{color:var(--brand)}

/* Preserve square media, swipe behavior and private account navigation. */
body:has(.account-nav)>header{max-width:720px;margin:auto}
#app.info-main{max-width:640px;padding-top:18px}
#home.card,#compose.card,#profile.card{background:var(--paper)}
#home>.journal-heading{font-size:29px;margin-top:12px;margin-bottom:8px}
#home>p{font-size:13px;color:var(--muted)}
.journal-heading>button{border-radius:50%;background:var(--brand);color:white;width:44px;height:44px;padding:0}
#compose>.compose-heading{background:var(--paper)}
.journal-heading>.compose-done{background:transparent;color:var(--brand)}
#home .account-record{padding-bottom:20px;margin-bottom:12px}
.journal-gallery{background:#edf3f1}.journal-dot.active span{background:var(--brand)}
#home .account-record>p{font-size:16px;line-height:1.7}
#home .account-record>.journal-text{font-size:18px;line-height:1.8;letter-spacing:-.15px;color:var(--ink)}
#home .account-record>.journal-source{font-size:14px;font-weight:600;color:var(--muted)}
#home .account-record>h3{font-size:18px;line-height:1.5}
#compose .field{font-size:16px;line-height:1.6}
#compose textarea,#compose .journal-caption textarea{font-family:inherit;font-size:18px;line-height:1.75;letter-spacing:-.15px}
#compose input:not([type=checkbox]):not([type=file]),#compose select{font-size:17px}
.journal-location-label,.journal-place-tools,.journal-place-feedback{font-size:14px}
.account-nav{background:var(--surface);border-color:var(--line)}
.account-nav a{color:var(--muted)}.account-nav a.active{color:var(--brand);background:var(--tint)}
.journal-menu{border:1px solid var(--line)}
.journal-picker-none[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--brand);color:var(--brand)}
@media(min-width:701px){#home .journal-gallery{border-radius:14px}#home .account-record{padding-left:16px;padding-right:16px}}
@media(max-width:700px){
 .landing header{padding:10px 18px;gap:12px;min-height:64px}
 .landing main{padding:6px 14px 14px}.landing .calm-hero{border-radius:20px;min-height:0}
 .landing-water{inset:0}.landing-water img{object-position:52% 65%}
 .landing-copy{width:100%;min-height:0;padding:26px 22px;background:linear-gradient(180deg,#fafaf7fa 0%,#fafaf7f2 35%,#fafaf7b5 100%)}
 .landing .landing-hero h1{font-size:clamp(29px,8.5vw,38px);margin:16px 0 12px}
 .landing .landing-hero p{font-size:14px;margin:0}.landing .entry-grid{margin-top:22px;max-width:none}
 .landing .entry-card{min-height:66px;padding:12px 14px}
 .landing .entry-copy strong,.landing .swimmer .entry-copy strong{font-size:17px}
 .landing .landing-note{margin-top:18px;font-size:11px}.landing .utility-footer{padding-top:0}
 .card{border-radius:16px}.auth-card{margin-top:12px;padding:24px 20px}
}
@media(max-height:650px) and (max-width:700px){.landing-copy{padding:20px}.landing .landing-hero h1{margin:12px 0 8px;font-size:30px}.landing .entry-grid{margin-top:16px}.landing .landing-note{margin-top:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.import-record-options{border:1px solid var(--line,#d6e3df);border-radius:12px;padding:12px;max-height:360px;overflow:auto}
.import-record-options label{display:flex;align-items:center;gap:12px;padding:12px 4px;line-height:1.5;cursor:pointer}
.import-record-options input[type=checkbox]{width:22px;height:22px;flex:0 0 22px;accent-color:#126168}
/* Member measurements: compact hierarchy and shared date/time chart. */
#records>h2{display:flex;align-items:center;justify-content:space-between;gap:12px}
.record-help{font-size:13px;font-weight:500;color:var(--muted,#657b7b);white-space:nowrap}
#records>p:empty,#connections>p:empty{display:none}
.measurement-card{padding:20px 0;border-bottom:1px solid #e0e9e6}
.measurement-card:last-child{border-bottom:0}
.measurement-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.distance-tag{font-size:15px;font-weight:700;background:#eaf5f2;border-radius:8px;padding:5px 9px}
.distance-tag.distance-50{background:#fff1e6}
.measurement-date{font-size:14px;color:#657b7b;font-variant-numeric:tabular-nums}
.measurement-metric{display:flex;gap:6px;align-items:baseline;margin:10px 0}
.measurement-metric strong{font-size:36px;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.measurement-metric span{font-size:16px;color:#657b7b}
.measurement-card .measurement-pool{margin:0;font-size:17px;font-weight:600}
.measurement-card .measurement-class{margin:5px 0 0;font-size:15px;color:#657b7b}
.connection-coming{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.connection-coming h2{font-size:18px;margin:0}.connection-coming>p{font-size:14px;margin:0!important;background:#edf2f0;border-radius:20px;padding:7px 12px}
.trend-toolbar{display:flex;justify-content:flex-end;margin-bottom:18px}.trend-toolbar label{display:flex;align-items:center;gap:8px;font-size:14px}.trend-toolbar select{width:auto;min-height:40px}
.trend-legend{display:grid;grid-template-columns:1fr 1fr;gap:10px}.trend-key{display:flex;flex-direction:column;gap:5px;padding:12px;background:#f1f7f5;border-radius:12px}.trend-key span{font-size:14px}.trend-key strong{font-size:21px;font-variant-numeric:tabular-nums}.trend-key.distance-50{background:#fff6ed}
.distance-25{color:#126b72}.distance-50{color:#af591d}
.record-trend{display:block;width:100%;height:auto;margin-top:18px;overflow:visible}.chart-grid{stroke:#e4ece9;stroke-width:1}.chart-axis-label{font:12px sans-serif;fill:#627674}.chart-line{stroke-width:2.5;stroke-linejoin:round}.chart-line.distance-25{stroke:#126b72}.chart-line.distance-50{stroke:#c87331}.chart-point.distance-25{fill:#126b72}.chart-point.distance-50{fill:#c87331}
.trend-table{font-size:14px}.trend-table summary{padding:12px 0;color:#56716e}.trend-table table{font-size:14px}.trend-empty-note{font-size:14px;color:#657b7b;text-align:center;margin:0 0 12px}
.certificate-template-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.certificate-template-picker button{padding:6px;border-radius:12px;min-width:0;background:#fff;border:2px solid transparent;display:flex;flex-direction:column;gap:7px}
.certificate-template-picker button[aria-pressed=true]{border-color:#126b72;background:#edf8f4}
.certificate-template-picker img{width:100%;height:auto;aspect-ratio:4/5;border-radius:7px;object-fit:cover}
.certificate-template-picker span{font-size:12px;line-height:1.4;font-weight:600;text-align:center;width:100%}
.member-certificate-dialog{width:min(900px,calc(100vw - 24px));max-height:92vh;overflow:auto;border:0;border-radius:20px;padding:22px;background:#f9fbf8;color:#194a4e}
.member-certificate-dialog::backdrop{background:#163d4566}.member-certificate-dialog>button:first-child{float:right}.member-certificate-dialog>h2{margin:6px 0 22px}
.member-certificate-preview{max-width:460px;margin:20px auto}.member-certificate-preview canvas{width:100%;height:auto;display:block;border-radius:10px}
.member-certificate-dialog .account-actions{position:sticky;bottom:0;background:#f9fbf8;padding:12px 0;display:flex;gap:8px;flex-wrap:wrap}
.measurement-card>button{margin-top:12px}
@media(max-width:600px){.certificate-template-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.member-certificate-dialog{padding:16px}.member-certificate-dialog .certificate-template-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.certificate-template-picker span{font-size:12px}}

.crop-frame.modern-certificate-crop{aspect-ratio:790/170}
