:root{
  --surface-page:#F5F0E6;
  --surface-card:#FAF8F4;
  --surface-raised:#FFFFFF;
  --surface-subtle:#EAE5DC;
  --text-primary:#2E2E2E;
  --text-secondary:#6E675E;
  --text-muted:#8D8376;
  --border-soft:#DCD6CC;
  --icon-default:#8D8376;
  --icon-active:#255D3A;
  --accent-strong:#255D3A;
  --success:#2E6B45;
  --warning:#A96435;
  --destructive:#8B3F3F;
  --input-bg:#FFFFFF;
  --overlay-bg:rgba(31,36,34,.72);
}

html[data-theme="light"]{
  --page:#F5F0E6;--card:#FAF8F4;--raised:#FFFFFF;--subtle:#EAE5DC;--divider:#DCD6CC;--accent:#255D3A;--stone:#8D8376;--charcoal:#2E2E2E;
  --surface-page:#F5F0E6;--surface-card:#FAF8F4;--surface-raised:#FFFFFF;--surface-subtle:#EAE5DC;--text-primary:#2E2E2E;--text-secondary:#6E675E;--text-muted:#8D8376;--border-soft:#DCD6CC;--icon-default:#8D8376;--icon-active:#255D3A;--accent-strong:#255D3A;--input-bg:#FFFFFF;
  --shadow-soft:0 12px 34px rgba(46,46,46,.08);
}

html[data-theme="dark"]{
  --page:#303634;--card:#25342E;--raised:#1F2422;--subtle:#34463D;--divider:#56635D;--accent:#91AE88;--stone:#B5AA9B;--charcoal:#F1ECE3;
  --surface-page:#303634;--surface-card:#25342E;--surface-raised:#1F2422;--surface-subtle:#34463D;--text-primary:#F1ECE3;--text-secondary:#D8D1C4;--text-muted:#B5AA9B;--border-soft:#56635D;--icon-default:#B5AA9B;--icon-active:#A8C39E;--accent-strong:#A8C39E;--input-bg:#1F2422;
  --success:#9CC09B;--warning:#E0A06D;--destructive:#E28E8E;--shadow-soft:0 14px 36px rgba(0,0,0,.24);
}

@media (prefers-color-scheme:dark){
  html[data-theme="system"]{
    --surface-page:#303634;--surface-card:#25342E;--surface-raised:#1F2422;--surface-subtle:#34463D;--text-primary:#F1ECE3;--text-secondary:#D8D1C4;--text-muted:#B5AA9B;--border-soft:#56635D;--icon-default:#B5AA9B;--icon-active:#A8C39E;--accent-strong:#A8C39E;--input-bg:#1F2422;
  }
}

.bottom-nav.stage16-six-tabs{grid-template-columns:repeat(6,minmax(0,1fr));padding-left:4px;padding-right:4px}
.bottom-nav.stage16-six-tabs .nav-item{min-width:0;padding-inline:2px;font-size:9px}
.bottom-nav.stage16-six-tabs .nav-item>span:first-child{font-size:18px}
.bottom-nav [data-stage16-more]>span:first-child{font-size:15px;letter-spacing:-1px}

.stage16-page{width:min(100%,760px);margin:0 auto}
.stage16-group{margin-top:24px;border:1px solid var(--divider);border-radius:22px;background:var(--card);overflow:hidden;box-shadow:var(--shadow-soft)}
.stage16-group__head{padding:13px 18px 8px;color:var(--stone);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.stage16-destination{appearance:none;width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) auto 18px;align-items:center;gap:12px;padding:15px 18px;border:0;border-top:1px solid var(--divider);background:transparent;color:inherit;text-align:left;cursor:pointer}
.stage16-destination:first-of-type{border-top:0}
.stage16-destination__icon{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:var(--subtle);color:var(--accent);font-size:18px;font-weight:800}
.stage16-destination__body{display:flex;flex-direction:column;gap:3px;min-width:0}
.stage16-destination__body strong{font-size:15px;line-height:1.2}
.stage16-destination__body small{color:var(--stone);font-size:12px;line-height:1.35}
.stage16-destination__meta{color:var(--stone);font-size:11px}
.stage16-destination__chevron{color:var(--stone);font-size:22px;font-weight:300}

.stage16-settings-card{margin-top:18px;padding:18px;border:1px solid var(--divider);border-radius:20px;background:var(--card);box-shadow:var(--shadow-soft)}
.stage16-settings-card__head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.stage16-settings-card__head span{font-family:var(--display);font-size:20px;font-weight:600}
.stage16-settings-card__head p{margin:4px 0 0;color:var(--stone);font-size:13px;line-height:1.45}
.stage16-calm-status{font-family:var(--sans)!important;font-size:11px!important;color:var(--accent)!important;padding:5px 8px;border-radius:999px;background:var(--subtle);white-space:nowrap}
.stage16-segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:5px;border-radius:15px;background:var(--subtle)}
.stage16-segmented__option{appearance:none;border:0;border-radius:11px;background:transparent;color:var(--stone);min-height:42px;font:inherit;font-size:13px;font-weight:750;cursor:pointer}
.stage16-segmented__option.is-selected{background:var(--raised);color:var(--accent);box-shadow:0 3px 10px rgba(0,0,0,.08)}
.stage16-inline-link{appearance:none;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0 0;border:0;border-top:1px solid var(--divider);background:transparent;color:var(--accent);font:inherit;font-size:13px;font-weight:750;text-align:left;cursor:pointer}
.stage16-inline-link span{font-size:19px;color:var(--stone)}
.stage16-field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stage16-field-grid .field-label small{display:block;margin-top:4px;color:var(--stone);font-size:11px}
.stage16-action-row,.stage16-data-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}
.stage16-data-actions .primary-action,.stage16-data-actions .secondary-action{flex:1 1 180px}
.stage16-text-action{appearance:none;border:0;background:transparent;padding:8px 4px;color:var(--accent);font:inherit;font-size:13px;font-weight:750;cursor:pointer}
.stage16-text-action--destructive{color:var(--destructive)}
.stage16-file-action{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:12px 14px;border:1px solid var(--divider);border-radius:14px;background:var(--raised);font-size:13px;font-weight:700;cursor:pointer}
.stage16-file-action input{max-width:45%;font-size:11px;color:var(--stone)}
.stage16-restore-report{display:grid;gap:8px;margin-top:12px;padding:12px;border-radius:14px;background:var(--subtle)}
.stage16-restore-report span{color:var(--stone);font-size:12px}

.stage16-create-grid{display:grid;gap:14px}
.stage16-create-card{appearance:none;display:grid;grid-template-columns:auto 1fr;column-gap:14px;row-gap:4px;width:100%;padding:19px;border:1px solid var(--divider);border-radius:20px;background:var(--card);color:inherit;text-align:left;box-shadow:var(--shadow-soft);cursor:pointer}
.stage16-create-card>span{grid-row:1/4;display:grid;place-items:center;align-self:start;width:40px;height:40px;border-radius:13px;background:var(--subtle);color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.08em}
.stage16-create-card strong{font-family:var(--display);font-size:21px;font-weight:600}
.stage16-create-card p{margin:0;color:var(--stone);font-size:13px;line-height:1.45}
.stage16-create-card em{margin-top:5px;color:var(--accent);font-style:normal;font-size:13px;font-weight:750}
.stage16-info-list{margin:0;border:1px solid var(--divider);border-radius:20px;background:var(--card);overflow:hidden;box-shadow:var(--shadow-soft)}
.stage16-info-list>div{display:grid;grid-template-columns:minmax(90px,.75fr) 1.6fr;gap:16px;padding:14px 18px;border-top:1px solid var(--divider)}
.stage16-info-list>div:first-child{border-top:0}
.stage16-info-list dt{color:var(--stone);font-size:12px;font-weight:800}
.stage16-info-list dd{margin:0;font-size:13px;overflow-wrap:anywhere}

html[data-theme="dark"] .text-control,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] .stage16-file-action{background:var(--input-bg);color:var(--text-primary);border-color:var(--border-soft)}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:var(--text-muted);opacity:.82}
html[data-theme="dark"] .trail-card__fixture-label{background:rgba(18,22,20,.82);color:#fff}
html[data-theme="dark"] .stage15-offline-card{background:var(--raised)}

.stage15-offline-library__toggle{min-height:54px;padding:.7rem .9rem}
.stage15-offline-library__summary{display:flex!important;flex-direction:row!important;align-items:center!important;gap:.55rem!important}
.stage15-offline-library__summary strong{font-family:var(--sans)!important;font-size:.93rem!important;font-weight:780!important;white-space:nowrap}
.stage15-offline-library__summary .stage15-offline-library__count{display:inline-flex;align-items:center;min-height:25px;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,var(--accent) 11%,var(--card));color:var(--accent);font-size:.68rem;font-weight:800;letter-spacing:.01em;white-space:nowrap}
.stage15-offline-library__icon{width:34px;height:34px;border-radius:11px;font-size:.95rem}
.stage15-offline-library__chevron{font-size:1.1rem}
.stage15-offline-library__copy{font-size:.78rem;margin:.7rem 0 .85rem}

@media(max-width:520px){
  .bottom-nav.stage16-six-tabs .nav-item{font-size:8.5px;gap:2px}
  .bottom-nav.stage16-six-tabs .nav-item>span:first-child{font-size:17px}
  .stage16-destination{grid-template-columns:38px minmax(0,1fr) 16px;padding:14px}.stage16-destination__meta{display:none}.stage16-destination__icon{width:36px;height:36px}
  .stage16-field-grid{grid-template-columns:1fr}
  .stage16-file-action{align-items:flex-start;flex-direction:column}.stage16-file-action input{max-width:100%}
  .stage15-offline-library__summary{gap:.42rem!important}.stage15-offline-library__summary strong{font-size:.9rem!important}.stage15-offline-library__summary .stage15-offline-library__count{font-size:.64rem;padding:3px 7px}
}

@media(prefers-reduced-motion:reduce){.stage16-segmented__option,.stage16-destination,.stage16-create-card{transition:none}}
