/* Leisewelle – Abendmeer. Ruhig, tief, weiche Kanten. */
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../fonts/instrument.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../fonts/instrument-italic.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
:root {
  --bg: #111A2B; --bg2: #172338; --sea: #7FD1C7; --sea2: #5BB5AB; --lav: #B6A8F0; --sand: #F2C48D; --coral: #F08A7E;
  --ink: #E8EEF4; --ink2: #AEBBCB; --ink3: #8593A6; --line: rgba(190, 210, 235, .13); --card: rgba(26, 38, 60, .66); --card2: rgba(34, 50, 78, .7);
  --r: 20px; --fs: 16px; --serif: 'Instrument Serif', Georgia, serif; --sans: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
html.fs-1 { --fs: 18px; } html.fs-2 { --fs: 20px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { font: 400 var(--fs)/1.5 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; background: radial-gradient(120% 55% at 50% -12%, #213456 0%, var(--bg) 60%) fixed, var(--bg); overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--sea); }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 10px; }
h1:focus { outline: none; }
.screen { max-width: 620px; margin: 0 auto; padding: calc(var(--sat) + 8px) calc(20px + var(--sar)) 40px calc(20px + var(--sal)); }
.screen.has-tabs { padding-bottom: calc(100px + var(--sab)); }
h1 { font: 400 2.05em/1.1 var(--serif); letter-spacing: -.005em; margin: .15em 0 .45em; color: #F4F1EA; }
h1 em { color: var(--sea); }
h2 { font: 650 1em/1.3 var(--sans); margin: 0 0 .7em; display: flex; align-items: baseline; gap: 8px; }
h2 small { color: var(--ink3); font-weight: 500; margin-left: auto; font-size: .85em; }
h2.dayh { margin: 22px 0 8px; color: var(--ink2); font-size: .88em; text-transform: uppercase; letter-spacing: .08em; }
h3 { font: 650 1.02em/1.3 var(--sans); margin: 0 0 .35em; }
p { margin: 0 0 .7em; }
.center { text-align: center; }
.lead { font-size: 1.12em; color: var(--ink2); line-height: 1.5; }
.lead.sm { font-size: 1.02em; }
.eyebrow { font-size: .74em; letter-spacing: .14em; text-transform: uppercase; color: var(--sea); margin: 14px 0 0; font-weight: 700; }
.label { display: block; font-size: .84em; color: var(--ink2); font-weight: 650; margin: 18px 0 8px; }
.card .label:first-child, .card > .label { margin-top: 0; }
.fine { font-size: .84em; color: var(--ink3); }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.flip { transform: rotate(180deg); color: var(--ink3); }

.topbar { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font: 400 1.4em var(--serif); color: #F4F1EA; }
.brand .ic { color: var(--sea); width: 1.2em; height: 1.2em; }
.tb-mid { flex: 1; min-width: 0; }
.tb-title { font-weight: 650; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); display: grid; place-items: center; cursor: pointer; color: var(--ink2); flex: none; }
.sosbtn { min-width: 58px; height: 40px; padding: 0 14px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; letter-spacing: .08em; font-size: .85em; text-decoration: none; color: #2B1210; background: var(--coral); box-shadow: 0 6px 22px -8px rgba(240, 138, 126, .8); flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); cursor: pointer; font-weight: 650; text-decoration: none; transition: transform .15s ease, background .2s; color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(180deg, #96E0D6, #6CC4B9); color: #0E2224; border-color: transparent; box-shadow: 0 8px 28px -10px rgba(127, 209, 199, .6); }
.btn.primary:disabled { opacity: .35; box-shadow: none; cursor: not-allowed; }
.btn.big { min-height: 56px; width: 100%; font-size: 1.05em; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn.sm { min-height: 42px; padding: 0 16px; font-size: .92em; }
.btn.danger { color: var(--coral); }
.btn.primary.danger { background: linear-gradient(180deg, #F6A398, #EC8578); color: #2B1210; }
.linkbtn { background: none; border: 0; color: var(--sea); text-decoration: underline; cursor: pointer; padding: 0; font-size: .9em; display: inline-block; }
.cta { margin: 26px 0 12px; display: flex; flex-direction: column; gap: 10px; }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.row2 .btn { flex: 1 1 140px; }

.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 14px 0; color: inherit; text-decoration: none; }
.card.soft { background: rgba(255, 255, 255, .03); }
.card.highlight { border-color: rgba(127, 209, 199, .4); background: linear-gradient(160deg, rgba(127, 209, 199, .14), rgba(26, 38, 60, .6)); }
.card.know { background: linear-gradient(160deg, rgba(182, 168, 240, .14), rgba(26, 38, 60, .6)); }
.card.locked { border-style: dashed; }
.card.result { border-color: rgba(182, 168, 240, .35); }
.card p:last-child { margin-bottom: 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72em; font-weight: 700; color: var(--sand); border: 1px solid rgba(242, 196, 141, .4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; margin-bottom: 8px; }
.tag .ic { width: 1em; height: 1em; }

.ticks { list-style: none; padding: 0; margin: 14px 0; }
.ticks li { position: relative; padding: 0 0 8px 28px; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--sea); border-bottom: 2px solid var(--sea); transform: rotate(-45deg); }

.dots { display: flex; gap: 6px; justify-content: center; margin: 8px 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .3s; }
.dots i.on { width: 22px; background: var(--sea); }
.hero-wave { margin: 18px -6px 0; }
.wv { animation: drift 7s ease-in-out infinite alternate; }
.wv1 { animation-duration: 9s; } .wv2 { animation-duration: 11s; } .wv3 { animation-duration: 13s; }
@keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(0); } }

.check { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 4px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--sea); flex: none; margin: 2px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); cursor: pointer; font-size: .92em; color: var(--ink2); }
.chip.on { background: rgba(127, 209, 199, .18); border-color: var(--sea); color: #E9FBF8; font-weight: 650; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); border-radius: 16px; padding: 4px; }
.seg button { flex: 1 1 auto; min-height: 40px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; color: var(--ink2); font-size: .9em; padding: 0 10px; }
.seg button.on { background: var(--card2); color: #fff; font-weight: 650; box-shadow: inset 0 0 0 1px rgba(127, 209, 199, .45); }
.q { margin: 18px 0; } .q p { margin-bottom: 8px; }

input[type=range] { width: 100%; accent-color: var(--sea); height: 32px; }
.sl { margin: 14px 0; } .sl-top { display: flex; justify-content: space-between; align-items: baseline; } .sl-top .label { margin: 0; }
.sl-val { font: 400 1.7em/1 var(--serif); color: var(--sea); }
.sl-ends { display: flex; justify-content: space-between; font-size: .78em; color: var(--ink3); }
textarea, .inp { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); padding: 12px 14px; resize: vertical; }
.inp { min-height: 48px; }
textarea.script { line-height: 1.55; min-height: 220px; margin: 6px 0 12px; }

.sos-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); text-decoration: none; color: var(--ink); background: linear-gradient(135deg, rgba(240, 138, 126, .22), rgba(182, 168, 240, .14)); border: 1px solid rgba(240, 138, 126, .35); margin: 16px 0; }
.sos-card div { flex: 1; } .sos-card b { display: block; font-size: 1.05em; } .sos-card span { color: var(--ink2); font-size: .9em; }
.sos-pill { flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: #2B1210 !important; font-weight: 800; letter-spacing: .06em; box-shadow: 0 0 0 8px rgba(240, 138, 126, .15); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 10px; }
.wd { text-align: center; font-size: .78em; color: var(--ink3); }
.wd i { display: grid; place-items: center; height: 36px; border-radius: 12px; border: 1px dashed var(--line); margin-bottom: 4px; color: var(--sand); }
.wd i svg { width: 20px; height: 20px; }
.wd.on i { border-style: solid; background: rgba(242, 196, 141, .12); border-color: rgba(242, 196, 141, .4); }
.wd.today span { color: var(--sea); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); min-height: 108px; }
.tile .ic { color: var(--sea); margin-bottom: 6px; } .tile span { font-size: .82em; color: var(--ink3); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; gap: 2px; padding: 8px calc(8px + var(--sar)) calc(8px + var(--sab)) calc(8px + var(--sal)); background: rgba(14, 21, 35, .92); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tabs a { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; text-decoration: none; color: var(--ink3); font-size: .72em; font-weight: 600; min-height: 52px; justify-content: center; }
.tabs a.on { color: var(--sea); background: rgba(127, 209, 199, .1); }
.tabs .ic { width: 1.5em; height: 1.5em; }
.foot { margin: 34px 0 8px; text-align: center; font-size: .78em; color: var(--ink3); }
.foot p { margin: 0 0 4px; } .foot a { color: var(--ink2); }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--sab)); transform: translate(-50%, 20px); opacity: 0; background: #E9F7F4; color: #0E2224; padding: 10px 18px; border-radius: 999px; font-weight: 650; font-size: .92em; transition: .3s; pointer-events: none; z-index: 20; max-width: calc(100% - 40px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* SOS */
.s-sos h1 { font-size: 1.9em; margin-top: 4px; }
.sound-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sound-top .label { margin: 0; }
.vol { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.meter { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; margin: 2px 0 10px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sea), var(--lav)); transition: width .12s; }
.tabs-sos { margin: 16px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabs-sos button { padding: 0 2px; font-size: .84em; min-width: 0; }
.tool { min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.breath { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.b-ring { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(127, 209, 199, .1), transparent 70%); border: 1px solid rgba(127, 209, 199, .25); }
.b-core { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #A8EDE4, #4E9FAE 70%); transform: scale(.55); transition: transform 4s cubic-bezier(.4, 0, .4, 1); box-shadow: 0 0 60px -10px rgba(127, 209, 199, .7); }
.breath:not(.out) .b-core { transform: scale(1); }
.breath.out .b-core { transform: scale(.55); transition-duration: 6s; }
.breath.rm .b-core, html.rm .b-core { transition: none; transform: scale(.8) !important; }
.b-txt { font: 400 1.6em var(--serif); margin: 0; }
.ground, .exit { text-align: center; }
.g-n { font: 400 4em/1 var(--serif); color: var(--sand); margin: 0 0 6px; }
.exit-line { font: 400 1.55em/1.3 var(--serif); color: #F4F1EA; margin: 4px 0 16px; }
.help-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.help-row:last-child { border-bottom: 0; }
.help-row .ic { color: var(--sea); } .help-row span { flex: 1; min-width: 0; } .help-row b { display: block; font-size: .95em; } .help-row small { color: var(--ink3); }
.help-row em { font-style: normal; font-weight: 750; color: var(--sea); white-space: nowrap; }

/* Tagebuch */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 16px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.stats b { display: block; font: 400 1.7em/1.1 var(--serif); color: #F4F1EA; } .stats span { font-size: .74em; color: var(--ink3); }
.entry { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 8px 0; }
.e-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.e-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); margin-bottom: 8px; overflow: hidden; }
.e-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--sand), var(--coral)); border-radius: 4px; }
.e-bar i.after { background: var(--sea); height: 4px; top: 2px; }
.e-note { font-size: .92em; color: var(--ink2); border-left: 2px solid var(--line); padding-left: 10px; }
.entry .del { color: var(--ink3); font-size: .8em; }
.empty h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4em; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(84px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: .9em; }
.hb-l { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--sea2), var(--sea)); }
.hb b { min-width: 2.2em; text-align: right; }
.cols { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 120px; align-items: end; }
.col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.col i { display: block; background: linear-gradient(180deg, var(--lav), var(--sea2)); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.col span { font-size: .6em; color: var(--ink3); margin-top: 4px; }

/* Training */
.ladder { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 10px; }
.step { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.step:disabled { opacity: .45; cursor: not-allowed; }
.step i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 750; border: 1px solid var(--line); color: var(--ink2); }
.step span { flex: 1; min-width: 0; } .step b { display: block; } .step small { color: var(--ink3); font-size: .82em; }
.step.cur { border-color: var(--sea); background: rgba(127, 209, 199, .1); } .step.cur i { background: var(--sea); color: #0E2224; border-color: transparent; }
.step.done i { color: var(--sea); border-color: rgba(127, 209, 199, .4); }
.step .tag { margin: 0; }
.orb { position: relative; width: 220px; height: 220px; margin: 18px auto 8px; }
.orb svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.orb .trk { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 4; }
.orb .prog { fill: none; stroke: var(--sea); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.orb-in { position: absolute; inset: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(182, 168, 240, .5), rgba(78, 159, 174, .25) 60%, transparent 75%); }
.orb.run .orb-in { animation: swell 8s ease-in-out infinite; }
.orb.rm .orb-in, html.rm .orb-in, html.rm .wv { animation: none !important; }
@keyframes swell { 50% { transform: scale(1.08); opacity: .8; } }
.timer { font: 400 2.4em/1 var(--serif); margin: 6px 0 12px; }
.bell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 190px; height: 190px; margin: 18px auto; border-radius: 50%; border: 1px solid rgba(242, 196, 141, .45); background: radial-gradient(circle, rgba(242, 196, 141, .25), rgba(26, 38, 60, .6)); color: var(--sand); font-weight: 750; cursor: pointer; font-size: 1.05em; transition: transform .15s, box-shadow .3s; }
.bell .ic { width: 2.4em; height: 2.4em; }
.bell.hit { box-shadow: 0 0 0 14px rgba(127, 209, 199, .3); transform: scale(1.04); }
.bell.miss { box-shadow: 0 0 0 10px rgba(240, 138, 126, .2); }
.bigscore { text-align: center; font: 400 5.5em/1 var(--serif); color: var(--sea); margin: 10px 0; } .bigscore small { font-size: .4em; }

.list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); min-height: 56px; }
.li span { min-width: 0; } .li small { display: block; color: var(--ink3); font-size: .78em; } .li .tag { margin: 0; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bdg { border: 1px dashed var(--line); border-radius: 16px; padding: 12px; text-align: center; opacity: .72; }
.bdg.on { opacity: 1; border-style: solid; border-color: rgba(242, 196, 141, .4); background: rgba(242, 196, 141, .07); }
.bdg i { display: grid; place-items: center; height: 34px; color: var(--sand); } .bdg i svg { width: 28px; height: 28px; }
.bdg b { display: block; font-size: .88em; } .bdg small { font-size: .74em; color: var(--ink3); }

.plans { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 0; }
.plan { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.plan.on { border-color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); }
.plan small { display: block; color: var(--ink3); font-size: .8em; } .plan .pr { text-align: right; }
.plan em { position: absolute; top: -9px; right: 14px; background: var(--sand); color: #2A1C0B; font-style: normal; font-weight: 750; font-size: .72em; padding: 2px 8px; border-radius: 999px; }

@media (min-width: 700px) { h1 { font-size: 2.4em; } }
@media (prefers-reduced-motion: reduce) { .wv, .orb-in { animation: none !important; } .b-core { transition-duration: 1s !important; } }
