/* Shared ASCEND design and navigation; feature styles only describe their content. */

#workspace {
  min-height: 65vh;
}
#expeditionNav {
  z-index: 80;
  width: min(calc(100% - 24px), 540px);
  height: 72px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  padding: 5px 8px;
  background: #0b191eef;
  border: 1px solid #73808080;
  border-radius: 38px;
  box-shadow:
    0 8px 28px #0005,
    inset 0 1px 0 #ffffff08;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
#expeditionNav button {
  min-width: 0;
  height: 60px;
  border: 0;
  border-radius: 23px;
  background: none;
  color: #b3c0bf;
  font: 11px system-ui;
  padding: 5px 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  touch-action: manipulation;
}
#expeditionNav button > svg {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}
#expeditionNav button[aria-current="true"] {
  color: #dfad86;
  background: #c99a7620;
}
#expeditionNav #placesButton {
  padding: 0;
}
.compass-face {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dfad86, #b77e59);
  color: #142127;
  border: 1px solid #ebc4a2;
  box-shadow: 0 2px 8px #0005;
}
.compass-face svg {
  width: 31px;
  height: 31px;
}
#expeditionNav button:focus-visible {
  outline: 2px solid #edc7a4;
  outline-offset: 1px;
}
#placesDialog {
  background: #132329;
  color: #eee9df;
  border: 1px solid #577176;
  border-radius: 22px;
  width: min(92vw, 520px);
}
#placesDialog::backdrop {
  background: #0009;
}
.places-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.places-grid button,
#closePlaces,
.quick-actions button {
  padding: 14px;
  background: #1b3036;
  color: #eee9df;
  border: 1px solid #344b50;
  border-radius: 12px;
  text-align: left;
}
.expedition-today {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}
.expedition-today button {
  text-align: left;
  border: 1px solid #344b50;
  border-radius: 14px;
  background: #132329;
  color: #eee9df;
  padding: 14px;
}
.expedition-today strong,
.expedition-today span {
  display: block;
}
.expedition-today span {
  color: #a4b9bd;
  font-size: 13px;
  margin-top: 5px;
}
.training-feature .bottom-nav,
.training-feature .adventure-topbar,
.nutrition-feature > .nav,
.nutrition-feature > header,
.nutrition-feature > .modebar {
  display: none !important;
}
.training-feature .app-shell {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 24px;
}
.nutrition-feature #nutrition-content {
  max-width: 680px;
  margin: auto;
  padding: 12px 18px 24px;
}
.nutrition-feature .view.active::before {
  display: none;
}
.training-feature,
.nutrition-feature {
  --chapter-art: inherit;
}
input,
select,
textarea {
  font-size: 16px !important;
}
[hidden] {
  display: none !important;
}
.nutrition-feature .ov,
.training-feature .modal-backdrop {
  z-index: 150;
}
.nutrition-feature .sheet {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.landscape {
  height: 220px;
}
.hero-copy h1 {
  font-size: 36px;
}
.hero-copy {
  bottom: 22px;
}
.home-content {
  padding-top: 20px;
}
.expedition-today {
  margin-top: 18px;
}
.expedition-today button {
  padding: 12px;
}
.nutrition-feature .hero #ringGrad stop:first-child {
  stop-color: #c99a76;
}
.nutrition-feature .hero #ringGrad stop:last-child {
  stop-color: #dfb38f;
}
@media (min-width: 700px) {
  .landscape {
    height: 280px;
  }
}

.quick-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}
.quick-actions button {
  border-color: #c99a76;
  background: #c99a7622;
  color: #efc7a5;
}
.logbook-links { display:grid; gap:10px; margin:18px 0; }
.logbook-links button { width:100%; min-height:50px; }
.catalog-recipe { margin:12px 0; padding:14px; border:1px solid #344b50; border-radius:12px; }
.catalog-recipe > summary { cursor:pointer; font-size:17px; }
.place-symbol svg { width:36px; height:36px; display:block; }
.place-group summary:focus-visible,.place-row:focus-visible { outline:2px solid #e6bc96; outline-offset:-3px; }
#kitchenHeader { margin-bottom:20px; }
#kitchenHeader h2 { font:32px Georgia,serif; margin:6px 0; }
#kitchenHeader p { color:#b3c3c4; font-size:13px; }
.kitchen-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid #43595e; border-radius:14px; padding:4px; gap:4px; background:#0c1a20; }
.kitchen-tabs button { min-width:0; min-height:46px; border:0; border-radius:10px; background:none; color:#b3c3c4; font:14px system-ui; }
.kitchen-tabs button[aria-selected=true] { background:#c99a762b; color:#efc7a5; }

/* The dock is anchored to the viewport, independently of page content height. */
html { min-height:100%; }
body { min-height:100svh; }

body[data-screen="home"] #home { position:relative; isolation:isolate; }
body[data-screen="home"] .landscape { height:clamp(240px,34svh,380px); }
body[data-screen="home"] .hero-copy h1 { font-size:clamp(34px,6vw,52px); line-height:1.1; text-shadow:0 2px 24px #001014; }
body[data-screen="home"] .landscape::before { content:""; position:absolute; inset:0; background:radial-gradient(ellipse at 65% 25%,#d9ae7920,transparent 60%); pointer-events:none; }
body[data-screen="home"] .home-content { padding-top:4px; }
body[data-screen="home"] .route-card { min-height:104px; background:linear-gradient(110deg,#112329f5,#112329bb),var(--chapter-art) center 60%/cover; border-color:#98795888; box-shadow:0 10px 28px #0002; }
body[data-screen="home"] .route-card[data-open="nutrition"] { background-position:center 80%; }
body[data-screen="home"] .route-card strong + span { color:#e1bb99; font-size:13px; }
.expedition-status { text-align:center; color:#93aaaf; font-size:12px; line-height:1.6; margin:20px 8px; }
.feature-tools { max-width:680px; margin:0 auto; padding:8px 18px; }
.feature-tools button { border:1px solid #42575b; border-radius:12px; background:#14272d; color:#e0bd9d; padding:12px; min-height:44px; }
.nutrition-paths { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.nutrition-paths button[aria-current="true"] { background:#c99a762b; border-color:#c99a76; }
.feature-tools details { margin:12px 0 0; color:#b3c3c4; font-size:13px; }
.feature-tools summary { padding:10px 0; cursor:pointer; }
.nutrition-secondary { display:flex; gap:8px; flex-wrap:wrap; }
@media (prefers-reduced-motion:no-preference) { body[data-screen="home"] .hero-copy { animation:expedition-arrive .6s ease-out; } @keyframes expedition-arrive { from { opacity:0; translate:0 8px; } to { opacity:1; translate:0 0; } } }

/* Compact expedition HUD: content gets the screen, identity stays understated. */
.shell-head {
  position:absolute;
  top:calc(8px + env(safe-area-inset-top));
  right:max(14px, calc((100vw - 720px)/2 + 14px));
  padding:0;
  z-index:5;
}
.shell-head .wordmark { display:none; }
.shell-head .quiet { width:36px; height:36px; font-size:18px; }
.chapterbar {
  padding:calc(8px + env(safe-area-inset-top)) 60px 8px 18px;
  gap:6px;
  min-height:58px;
}
.chapterbar label { font-size:7px; letter-spacing:.12em; min-width:0; }
.chapterbar select { min-height:28px; padding:3px 0; font-size:13px !important; text-overflow:ellipsis; }
.chapterbar .info { width:28px; height:28px; font-size:19px; }
body[data-screen="home"] { padding-bottom:0; }
body[data-screen="home"] #home {
  height:calc(100svh - 58px - env(safe-area-inset-top));
  min-height:450px;
  max-width:720px;
  margin:auto;
  display:flex;
  flex-direction:column;
  padding-bottom:calc(90px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,#0b131700 0%,#0b131733 28%,#0b1317ee 70%),var(--chapter-art) center 40%/cover;
}
body[data-screen="home"] .landscape {
  flex:1 1 auto;
  min-height:120px;
  width:100%;
  height:auto;
  background:none;
}
body[data-screen="home"] .contour { padding:20px 22px; font-size:8px; }
body[data-screen="home"] .hero-copy { bottom:12px; left:22px; }
body[data-screen="home"] .hero-copy h1 { font-size:clamp(28px,4.5svh,42px); margin:8px 0; }
body[data-screen="home"] .hero-copy > p:first-child { display:none; }
body[data-screen="home"] .hero-copy > p:last-child { margin:8px 0 0; font-size:12px; }
body[data-screen="home"] .home-content { flex:0 0 auto; width:100%; padding:8px 18px 0; }
body[data-screen="home"] .section-line { display:none; }
body[data-screen="home"] .route-card { min-height:88px; padding:15px 14px; margin-bottom:10px; }
body[data-screen="home"] .route-card small { display:none; }
body[data-screen="home"] .route-card strong { font-size:24px; }
body[data-screen="home"] .expedition-status { margin:10px 4px 0; font-size:11px; }
body[data-screen="home"] .signoff { display:none; }
@media(max-height:680px) {
  body[data-screen="home"] .contour { display:none; }
  body[data-screen="home"] .route-card { min-height:78px; padding:12px; }
  body[data-screen="home"] .hero-copy > p:last-child { display:none; }
  body[data-screen="home"] .expedition-status { margin-top:6px; }
}

/* Safe areas belong to the shared shell, never to feature roots again. */
#nutrition-feature, #training-feature { padding:0; min-height:0; }
#progressIntro { padding:8px 18px 10px; }
#progressIntro h1 { margin:8px 0 12px; }
#progressIntro p { margin:8px 0; }
#progressAim { display:none; } /* The global chapter selector already names the stage. */
#achievements { margin-top:12px; }
.nutrition-feature #nutrition-content { padding-top:0; }
.nutrition-feature .page-heading { padding-top:0; margin:4px 0 12px; }
.nutrition-feature .page-heading h2 { margin:4px 0; }
#nutritionTools { padding-top:4px; padding-bottom:4px; }
#nutritionTools > .eyebrow { margin:4px 0 8px; }
#nutritionTools details { margin-top:4px; }
#trainingTools { padding-top:4px; padding-bottom:0; }
.training-feature .app-content:has(.adventure-home) { padding-top:6px; }
.training-feature .adventure-landscape { height:210px; min-height:0; }
.training-feature .adventure-level { padding:12px 18px 8px; }
.training-feature .adventure-map-nodes { inset:60px 16px 48px; display:flex; align-items:center; justify-content:space-around; gap:8px; }
.training-feature .adventure-map-nodes > svg { display:none; }
.training-feature .adventure-map-nodes .adventure-node { position:relative; top:auto; bottom:auto; left:auto; right:auto; flex:1; min-width:0; }
.training-feature .adventure-landscape-caption { bottom:30px; }
.training-feature .adventure-welcome { margin-top:-14px; padding:16px 14px; }
.training-feature .adventure-welcome h1 { font-size:27px; margin-bottom:10px; }
.training-feature .adventure-welcome .adventure-kicker { margin-bottom:8px; }
.training-feature .adventure-welcome > p:not(.adventure-kicker) { margin-bottom:12px; }
@media(max-height:680px) {
  .training-feature .adventure-landscape { height:150px; }
  .training-feature .adventure-map-nodes { inset:43px 14px 30px; }
  .training-feature .adventure-landscape-caption { display:none; }
  .training-feature .adventure-welcome > p:not(.adventure-kicker) { display:none; }
  .training-feature .adventure-welcome h1 { font-size:24px; }
}

/* One viewport layer keeps the dock independent of each screen's document height. */


.route-icon svg { display:block; width:32px; height:32px; }

/* Fixed edge navigation, with one safe-area allowance on every screen. */


body[data-screen="home"] #home { padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
body[data-screen="hutHome"] { padding-bottom:0; }
#hutHome { height:calc(100svh - 58px - env(safe-area-inset-top)); padding:12px 18px calc(80px + env(safe-area-inset-bottom)); }
#hutHome h1 { font-size:32px; margin:8px 0 12px; }
#hutHome > p { margin:6px 0; }
.hut-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.hut-actions button { min-height:64px; padding:12px; border:1px solid #42575b; border-radius:12px; background:#14272d; color:#eee9df; text-align:left; font-size:15px; }
.hut-actions span { display:block; font-size:11px; color:#a4b9bd; margin-top:5px; }
/* Only the training overview is a single screen; workouts and detail screens retain their content. */
body:has(#training-feature:not([hidden]) .adventure-landscape) { padding-bottom:0; }
.training-feature .adventure-home:has(.adventure-landscape) > .volt-journey-panel { display:none; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-landscape { height:140px; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-map-nodes { inset:40px 14px 20px; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-landscape-caption { display:none; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-welcome h1,
.training-feature .adventure-home:has(.adventure-landscape) .adventure-welcome > p { display:none; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-welcome { padding:10px; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-text { min-height:36px; padding:8px; margin:3px 0; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-secondary { min-height:44px; margin-top:8px; }
/* Independent rows, no competing filled tiles or overlapping flex children. */
.nutrition-feature .diary-actions { display:grid; gap:12px; margin:16px 0; padding:14px; border:1px solid #344b50; border-radius:16px; background:#102127; }
.nutrition-feature .diary-actions .btnrow { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:0; }
.nutrition-feature .diary-actions #addFood { grid-column:1/-1; }
.nutrition-feature .diary-actions .btn { width:100%; min-width:0; height:auto; min-height:46px; white-space:normal; margin:0; }
.nutrition-feature #completeDay { background:transparent; color:#dfb38f; border:1px solid #866b54; }
.nutrition-feature .sheet .btnrow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.nutrition-feature .sheet .btnrow > .btn { min-width:0; white-space:normal; height:auto; min-height:48px; }
.nutrition-feature .planned-entry { gap:12px; }
.nutrition-feature .planned-entry > div { min-width:0; overflow-wrap:anywhere; }
.nutrition-feature .planned-entry > button { flex-shrink:0; }
@media(max-height:680px) { .training-feature .adventure-home:has(.adventure-landscape) .adventure-landscape { height:112px; } #hutHome h1 { font-size:28px; } .hut-actions button { min-height:55px; padding:9px; } }


.training-feature .adventure-home:has(.adventure-landscape) ~ .adventure-signoff { display:none; }

/* All screens use the same document viewport as the working logbook.
   Never lock html/body overflow: iOS standalone offsets fixed UI in that mode. */

.training-feature .app-content:has(.adventure-landscape) { padding-bottom:0; }
.training-feature .app-shell:has(.adventure-landscape) { padding-bottom:calc(68px + env(safe-area-inset-bottom)); }
.training-feature .app-shell:has(.adventure-landscape) .adventure-signoff { display:none; }


/* Static expedition compass, with readable actions rather than radial hit targets. */
/* Lightweight action fan above the dock; native dialog keeps focus modal. */
#placesDialog { position:fixed; inset:auto 0 calc(12px + var(--dock-gesture-inset,env(safe-area-inset-bottom))) 0; margin:0 auto; width:min(420px,calc(100% - 24px)); max-height:calc(100dvh - 90px); overflow:auto; padding:20px 8px 16px; border:0; border-radius:0; background:transparent; box-shadow:none; color:#eee3cc; }
#placesDialog::backdrop {background:#05151a99;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#placesDialog .compass-heading {text-align:center;padding:0 8px;margin:0 0 34px;text-shadow:0 2px 12px #0008}
#placesDialog h2 {margin:0 0 7px;font:25px/1.2 Georgia,serif;color:#f3e7d1}
#placesDialog .compass-heading p {margin:0;font:12px/1.5 system-ui;color:#c7d2cb}
#placesDialog .quick-actions {display:flex;justify-content:center;align-items:flex-end;gap:8px;margin:0;padding:18px 0 20px}
#placesDialog .quick-actions button {flex:1 1 0;min-width:0;max-width:104px;display:flex;flex-direction:column;align-items:center;gap:10px;margin:0;padding:0 0 6px;border:0;background:none;box-shadow:none;color:#eee3cc;}
#placesDialog .quick-actions button:nth-child(2) {margin-bottom:20px}
#placesDialog:has(#substanceCompass:not([hidden])) .quick-actions button:nth-child(3) {margin-bottom:20px}
#placesDialog .compass-action-icon {display:grid;place-items:center;position:relative;width:72px;height:72px;box-sizing:border-box;padding:0;border:1px solid var(--badge-rim,#d3b47d);border-radius:50%;background:radial-gradient(circle at 32% 20%,#ffffff20,transparent 55%),linear-gradient(145deg,var(--badge-top,#375149),#0c252b);color:#f3d8a4;box-shadow:inset 0 0 0 4px #0b242bd9,inset 0 0 0 5px #d7ba7855,inset 0 -8px 14px #0004,0 6px 18px #0005,0 0 18px var(--badge-glow,#dab47016)}
#placesDialog .compass-action-icon svg {width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#placesDialog [data-open="training-select"] {--badge-top:#71523b;--badge-rim:#e2bd79;--badge-glow:#dc9d352a}
#placesDialog [data-open="add-meal"] {--badge-top:#3c624b;--badge-rim:#c1cca0;--badge-glow:#8ac99020}
#placesDialog [data-open="add-weight"] {--badge-top:#36596a;--badge-rim:#a7c5d1;--badge-glow:#86bdda20}
#placesDialog #substanceCompass {--badge-top:#574969;--badge-rim:#c4b0ce;--badge-glow:#b89bc820}
#placesDialog .compass-action-icon::after {content:"✦";position:absolute;bottom:-6px;left:calc(50% - 9px);width:18px;height:18px;display:grid;place-items:center;border:1px solid var(--badge-rim,#d3b47d);border-radius:50%;background:#132a2c;color:#e5ca94;font:11px/1 Georgia,serif}
#placesDialog #closePlaces:focus-visible {border-radius:50%;outline-offset:3px}
#placesDialog .compass-eyebrow {display:block;margin-bottom:10px;font:9px/1.4 system-ui;letter-spacing:.2em;color:#d4bb8c}
#placesDialog .compass-action-label {font:600 12px/1.3 system-ui;letter-spacing:.025em;color:#eee3cc;text-shadow:0 1px 6px #000}
#placesDialog #closePlaces {position:static;display:grid;place-items:center;margin:0 auto;width:44px;height:44px;padding:0;border:1px solid #c7b18c66;border-radius:50%;background:#173037;color:#e0c8a3;font:28px/1 system-ui;box-shadow:none}
#placesDialog button:focus-visible {outline:2px solid #ffe0ab;outline-offset:4px;border-radius:12px}
#placesDialog .quick-actions button:hover .compass-action-icon {border-color:#f1d2a0;background:#2b453f}
#placesDialog[open] .quick-actions button {animation:compass-unfold 180ms ease-out both!important}
@keyframes compass-unfold {from{opacity:0;transform:translateY(22px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce) {#placesDialog[open] .quick-actions button {animation:none!important}}
@media(max-width:350px) {#placesDialog .quick-actions {gap:4px}#placesDialog .compass-action-icon {width:60px;height:60px}#placesDialog .compass-action-label {font-size:11px}}

.nutrition-feature .recipe-diet-badge { display:block; width:fit-content; margin-top:8px; padding:4px 9px; border:1px solid #789c8766; border-radius:20px; color:#bddcc7; background:#183a2c66; font:11px/1.4 system-ui; }
.nutrition-feature .recipe-diet-badge[data-diet=pescatarian] { color:#bdd9e3; border-color:#7da7b366; background:#1b364366; }
.nutrition-feature .recipe-diet-badge[data-diet=omnivore],.nutrition-feature .recipe-diet-badge[data-diet=unknown] { color:#dfc5a4; border-color:#bba17d66; background:#48382955; }

.nutrition-feature .portion-actions { margin:14px 0; padding:14px; background:#172b30; border:1px solid #58675d; border-radius:12px; }
.nutrition-feature .portion-actions p,.nutrition-feature .portion-review p { font-size:13px; line-height:1.5; }
.nutrition-feature .portion-review section { border-top:1px solid #455859; padding:10px 0; }
.nutrition-feature .portion-review li { margin:8px 0; font-size:13px; }
.nutrition-feature .portion-warning { color:#efd0a3; padding:10px; border-left:3px solid #c9976a; background:#4c392b44; }
.nutrition-feature .porrow { flex-wrap:wrap; }
.nutrition-feature .porrow .entry-field { flex-basis:100%; }

/* iOS date controls have an intrinsic minimum width unless explicitly constrained. */
.nutrition-feature #sheet .entry-field {min-width:0;max-width:100%;box-sizing:border-box;}
.nutrition-feature #sheet input[type=date] {display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;margin-inline:auto;text-align:center;appearance:none;-webkit-appearance:none;}
.nutrition-feature #sheet input[type=date]::-webkit-date-and-time-value {text-align:center;min-width:0;}

.app-update { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; background:#233b40; color:#fff1db; font-size:13px; }
.app-update button { flex-shrink:0; padding:8px 12px; border:1px solid #c99a76; border-radius:8px; background:#102127; color:#fff1db; }
#placesDialog .compass-training-back {display:block;margin:0 auto 16px;padding:10px 14px;min-height:44px;border:1px solid #c7b18c66;border-radius:10px;background:#173037;color:#e0c8a3;font:13px system-ui}
#placesDialog .compass-training-list {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 8px;margin:12px 0 24px}
#placesDialog .compass-training-unit {min-width:0;display:flex;flex-direction:column;align-items:center;gap:9px;padding:5px 2px;border:0;background:none;color:#eee3cc}
#placesDialog .compass-training-unit strong {font:600 13px/1.3 system-ui;overflow-wrap:anywhere}
#placesDialog .compass-training-unit small {font:11px/1.3 system-ui;color:#bccbc5}

/* A quiet brass weighing instrument, framed by the selected world's artwork. */
.nutrition-feature #sheet:has(.weight-station){padding:0;width:min(460px,100%);background:#10232b;border:1px solid #b9a48266;border-radius:24px 24px 0 0;overflow-x:hidden}
.weight-station{color:#eee3cf}
.weight-station-header{padding:28px 24px 34px;background:linear-gradient(0deg,#10232b, #10232b88 70%),var(--chapter-art) center 42%/cover;min-height:160px;box-sizing:border-box}
.nutrition-feature .weight-station-header>span{font:9px/1.5 system-ui;letter-spacing:.18em;color:#e0c99f}
.nutrition-feature .weight-station h2{font:32px/1.15 Georgia,serif;color:#f6eddd;letter-spacing:-.025em;margin:17px 0 8px;text-transform:none}
.nutrition-feature .weight-station-header p{font:12px/1.5 system-ui;color:#d1dcd6;margin:0}
.weight-station-body{padding:0 22px calc(22px + env(safe-area-inset-bottom))}
.weight-instrument{position:relative;text-align:center;padding:18px 16px 13px;border:1px solid #b9a48270;border-radius:20px;background:radial-gradient(ellipse at top,#3b504a66,transparent 75%),#11282e;box-shadow:inset 0 0 0 5px #10232b,inset 0 0 0 6px #b9a48222,0 12px 30px #0003}
.weight-emblem{display:block;width:38px;height:38px;margin:0 auto 9px;color:#d5bc96}
.nutrition-feature .weight-instrument label{font:10px/1.5 system-ui;text-transform:uppercase;letter-spacing:.17em;color:#d8c6a7}
.weight-reading{display:flex;align-items:baseline;justify-content:center;gap:8px;margin:6px auto 12px;max-width:260px}
.nutrition-feature #sheet .weight-reading input{display:block;width:100%;min-width:0;min-height:72px;padding:0 4px;border:0;border-bottom:1px solid #c9b18a44;border-radius:0;background:transparent;color:#fff0d5;font:58px/1.2 Georgia,serif;font-size:58px!important;font-variant-numeric:tabular-nums;text-align:center;box-shadow:none}
.nutrition-feature #sheet .weight-reading input::placeholder{color:#a89579;opacity:1}
.weight-reading>span{font:16px/1 system-ui;color:#cbb893}
.weight-ruler{cursor:ew-resize;touch-action:pan-y;user-select:none;position:relative;height:48px;margin:0 7px;background:repeating-linear-gradient(90deg,#cbb89388 0 1px,transparent 1px 10px) center top/100% 9px no-repeat,repeating-linear-gradient(90deg,#cbb893aa 0 1px,transparent 1px 50px) center top/100% 17px no-repeat;mask-image:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent)}
.weight-ruler i{position:absolute;left:50%;top:0;width:2px;height:23px;background:#f4d19a;box-shadow:0 0 9px #e8c58c66}
.nutrition-feature .weight-instrument p{font:10px/1.5 system-ui;color:#aebfb6;margin:8px 0 0}
.nutrition-feature .weight-station .weight-date{margin:20px 0 14px;color:#d2dace;font:12px/1.5 system-ui}
.nutrition-feature #sheet .weight-date input{margin-top:7px;min-height:46px;border:1px solid #b9a48244;border-radius:10px;background:#0b1c24;color:#f0e6d4;font:16px system-ui;color-scheme:dark}
.nutrition-feature .weight-station .weight-note{text-align:center;color:#dbc5a1;font:italic 16px/1.5 Georgia,serif;margin:14px 0 6px}
.nutrition-feature .weight-station .hint{text-align:center;color:#a6bab2;font:11px/1.5 system-ui;margin:0}
.nutrition-feature .weight-station .btnrow{display:grid;grid-template-columns:1fr 1.6fr;gap:10px}
.nutrition-feature .weight-station .btn{min-height:48px;border:1px solid #b7a17e55;border-radius:11px;background:#213a3d;color:#eddfc5;font:12px/1.4 system-ui;padding:10px}
.nutrition-feature .weight-station .btn.solid{background:linear-gradient(135deg,#e4cda7,#c3a579);color:#15272b;font-weight:650}
.nutrition-feature .weight-station :is(input,button):focus-visible{outline:2px solid #f0c68a;outline-offset:4px}
@media(max-width:350px){.weight-station-body{padding-inline:16px}.weight-station-header{padding-inline:18px}.nutrition-feature .weight-station h2{font-size:28px}}

.weight-ruler:focus-visible{outline:2px solid #f4d19a;outline-offset:3px}

/* Fitness goals stay readable and keyboard-operable on compact screens. */
.fitness-goals{min-width:0;margin:14px 0;padding:0;border:0}
.fitness-goals legend{font-weight:700;font-size:1.05rem}
.fitness-goals p{font-size:.85rem;line-height:1.55;color:var(--muted,#adb7b5)}
.fitness-goal-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fitness-goal-options label{display:flex!important;align-items:center;gap:9px;padding:12px!important;margin:0!important;border:1px solid #ffffff26;border-radius:12px;background:#ffffff05;cursor:pointer;min-height:54px}
.fitness-goal-options label:has(:checked){border-color:#c9aa6c;background:#c9aa6c19}
.fitness-goal-options label:focus-within{outline:2px solid #e6c888;outline-offset:2px}
.fitness-goal-options input{width:18px!important;height:18px;flex:0 0 18px;margin:0!important;accent-color:#c9aa6c}
.fitness-goal-options span{font-size:.9rem;line-height:1.35;overflow-wrap:anywhere}
.profile-xp-button{display:block;width:100%;padding:8px 0!important;text-align:left;background:transparent!important;border:0!important;color:inherit;cursor:pointer}
.profile-xp-button .profile-xp{display:block}
.profile-xp-button small{display:block;margin-top:7px}
.profile-xp-button:focus-visible{outline:2px solid #c9aa6c;outline-offset:3px}
.character-card{max-width:650px}
.character-card-identity{display:flex;gap:18px;align-items:center}
.character-card-identity img{width:70px;height:100px;object-fit:contain}
.character-card progress{width:100%;accent-color:#c9aa6c}
.character-card section{margin-top:24px}
.character-card li{margin-bottom:10px;line-height:1.5}
.character-worlds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.character-worlds article{padding:12px;border:1px solid #ffffff26;border-radius:12px;min-width:0}
.character-worlds p{font-size:.85rem}
@media(max-width:360px){.fitness-goal-options,.character-worlds{grid-template-columns:1fr}}
.character-xp-help{margin:20px 0;border:1px solid #ffffff26;border-radius:12px;padding:12px}
.character-xp-help summary{cursor:pointer;font-weight:700;min-height:24px}
.character-card .personal-top{position:sticky;top:-16px;background:#10242a;z-index:1;padding:4px 0 8px}
