:root {
  --ink: #1e3025;
  --green: #234e3f;
  --green-light: #e2ead6;
  --paper: #f5f7f0;
  --white: #ffffff;
  --muted: #58664f;
  --line: #c7d1bf;
  --amber: #80581c;
  --sidebar: #e9edde;
  --sidebar-glass: #e9eddef5;
  --panel: #e7eedc;
  --subtle-bg: #f0f4e8;
  --input-bg: #fcfdf9;
  --kit-bg: #f7faf2;
  --hover-bg: #dfe8d2;
  --selected-bg: #d8e4c9;
  --selected-count: #bed2a8;
  --accent-text: #486438;
  --control-border: #9baa8b;
  --focus: #587e46;
  --focus-halo: #e0ead5;
  --primary-bg: #234e3f;
  --primary-hover: #173d30;
  --on-primary: #ffffff;
  --success-bg: #dceacb;
  --success-text: #3f642b;
  --progress: #71984e;
  --progress-track: #d7e2cb;
  --warning-bg: #f0e9d6;
  --warning-text: #76591d;
  --error-bg: #f8e8df;
  --error-text: #943d2c;
  --danger-bg: #a34834;
  --danger-hover: #883925;
  --on-danger: #ffffff;
  --backdrop: #253b3270;
  --shadow: #20372b33;
  --card-shadow: #304c2910;
  --tone-green-bg: #e0eac4;
  --tone-green-text: #4b652b;
  --tone-tan-bg: #eee2c8;
  --tone-tan-text: #7b5c24;
  --tone-blue-bg: #dce9e5;
  --tone-blue-text: #37675c;
  --tone-purple-bg: #e5dfed;
  --tone-purple-text: #66527b;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
:root[data-theme="dark"] {
  --ink: #edf2e8;
  --green: #b2d29d;
  --green-light: #303f2b;
  --paper: #151c17;
  --white: #222c24;
  --muted: #afbea5;
  --line: #46563e;
  --amber: #f0c47c;
  --sidebar: #1a231d;
  --sidebar-glass: #1a231df5;
  --panel: #2a3727;
  --subtle-bg: #273227;
  --input-bg: #1b251e;
  --kit-bg: #1e2921;
  --hover-bg: #35472e;
  --selected-bg: #3c5131;
  --selected-count: #506c3d;
  --accent-text: #bad4a5;
  --control-border: #6a7e5e;
  --focus: #b4d69b;
  --focus-halo: #354b2c;
  --primary-bg: #b2d29d;
  --primary-hover: #c7e3b5;
  --on-primary: #162316;
  --success-bg: #344d2a;
  --success-text: #bddfa1;
  --progress: #a6cc86;
  --progress-track: #465d37;
  --warning-bg: #443b27;
  --warning-text: #f0cd88;
  --error-bg: #492c29;
  --error-text: #ffb8a5;
  --danger-bg: #a34834;
  --danger-hover: #883925;
  --on-danger: #ffffff;
  --backdrop: #030905b0;
  --shadow: #00000066;
  --card-shadow: #00000033;
  --tone-green-bg: #3a4a2a;
  --tone-green-text: #d0e9a7;
  --tone-tan-bg: #4a3f2b;
  --tone-tan-text: #edd29a;
  --tone-blue-bg: #29443d;
  --tone-blue-text: #a7d7cb;
  --tone-purple-bg: #403348;
  --tone-purple-text: #d8bce9;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--focus); }
.icon { width: 21px; height: 21px; flex: 0 0 auto; display: block; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 238px; flex: 0 0 238px; padding: 36px 23px 26px; border-right: 1px solid var(--line); background: var(--sidebar); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 0 55px 4px; }
.brand > span:last-child { font-size: 37px; font-weight: 750; letter-spacing: -2px; line-height: 1; }
.brand-dot { color: var(--progress); }
.brand small { display: block; font-size: 9px; font-weight: 500; letter-spacing: .2px; margin-top: 8px; color: var(--muted); }
.brand-icon { display: grid; place-items: center; width: 42px; height: 46px; color: var(--green); }
.brand-icon .icon { width: 43px; height: 43px; stroke-width: 1.5; }
.nav-label, .eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.7px; color: var(--muted); }
.nav-label { padding-left: 14px; margin-bottom: 16px; font-size: 9px; letter-spacing: 1.5px; }
nav { display: grid; gap: 6px; }
nav a { display: flex; align-items: center; gap: 11px; padding: 14px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); transition: background .15s; }
nav a:hover { background: var(--hover-bg); }
nav a.active { background: var(--selected-bg); font-weight: 650; color: var(--green); }
nav .icon { width: 20px; height: 20px; }
.nav-count { margin-left: auto; font-size: 11px; background: var(--subtle-bg); min-width: 21px; padding: 3px 5px; text-align: center; border-radius: 5px; }
nav a.active .nav-count { background: var(--selected-count); }
.sidebar-footer { margin-top:auto; padding-top:26px; }
.sync-status { margin-top:24px; padding:0 4px; font-size:12px; color:var(--muted); }
.sync-status strong { display:flex; align-items:center; gap:9px; font-size:12px; color:var(--ink); }
.sync-status strong::before { content:""; width:7px; height:7px; flex-shrink:0; border-radius:50%; background:var(--danger-bg); }
.sync-status[data-synced="true"] strong::before { background:var(--progress); }
.sync-status p { margin:12px 0 0; line-height:1.6; }
@media (max-width:900px) { .sync-status { display:none; } }
.profile-row { display:flex; align-items:center; gap:6px; min-width:0; }
.profile-button { display: flex; align-items: center; gap: 9px; margin: 0; padding: 10px 4px; border: 0; background: transparent; color: var(--accent-text); font-size: 12px; text-align: left; flex:1; min-width:0; }
.profile-button #profile-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-button .icon { width: 17px; height: 17px; }
.profile-button:hover { color: var(--green); }
#profile-auth { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; }
.profile-via { font-size:9px; font-weight:400; color:var(--muted); }
.google-login, .google-provider { width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; padding:4px; }
.google-icon { width:18px; height:18px; }
.profile-editor .modal-footer { flex-wrap:wrap; }
main { margin-left: 238px; padding: 49px 48px 50px; width: calc(100% - 238px); max-width: 1560px; }
main:focus { outline: none; }
.loading { padding: 80px 0; color: var(--muted); }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.eyebrow { margin-bottom: 11px; }
h1 { font-size: clamp(25px, 2.7vw, 35px); font-weight: 650; letter-spacing: -1px; margin: 0; line-height: 1.22; overflow-wrap: anywhere; }
.page-header p { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 10px 0 0; max-width: 720px; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 11px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; line-height: 1.35; min-height: 41px; white-space: nowrap; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button .icon { width: 17px; height: 17px; }
.primary { background: var(--primary-bg); color: var(--on-primary); }
.primary:hover { background: var(--primary-hover); }
.secondary { border-color: var(--line); background: var(--white); color: var(--accent-text); }
.secondary:hover { background: var(--subtle-bg); }
.text-button { border: 0; background: transparent; padding: 4px 0; color: var(--accent-text); display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.text-button:hover { color: var(--green); text-decoration: underline; }
.icon-button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.icon-button .icon { width: 16px; height: 16px; }
.icon-button:hover { color: var(--green); background: var(--subtle-bg); }
.bordered { background: var(--white); border: 1px solid var(--line); width: 41px; height: 41px; }
.danger:hover { color: var(--error-text); background: var(--error-bg); }
.hero { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; min-height: 264px; display: flex; overflow: hidden; position: relative; margin-bottom: 38px; }
.hero-copy { position: relative; z-index: 1; padding: 30px 34px; width: 60%; }
.hero-tag { font-size: 9px; font-weight: 700; letter-spacing: 1.65px; color: var(--accent-text); }
.hero h2 { font-size: clamp(20px, 2.05vw, 29px); line-height: 1.33; margin: 13px 0 10px; font-weight: 600; letter-spacing: -.65px; }
.hero p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0 0 20px; }
.hero-button { color: var(--accent-text); background: var(--subtle-bg); border-color: var(--line); font-size: 11px; min-height: 35px; padding: 8px 12px; flex-direction: row-reverse; gap: 13px; }
.hero-button:hover { background: var(--white); }
.landscape { position: absolute; right: 0; bottom: 0; height: 100%; width: 53%; object-fit: cover; opacity: .95; mask-image: linear-gradient(to right, transparent 0%, black 22%); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -.3px; margin: 0; display: flex; align-items: center; gap: 10px; }
.muted-count { color: var(--muted); background: var(--subtle-bg); font-size: 11px; min-width: 23px; padding: 3px 6px; border-radius: 5px; text-align: center; }
.search { border: 1px solid var(--line); border-radius: 7px; background: var(--white); padding: 10px 12px; display: flex; align-items: center; gap: 9px; min-width: 210px; }
.search .icon { width: 16px; height: 16px; color: var(--muted); }
.search input { width: 100%; min-width: 0; border: 0; padding: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px var(--focus-halo); }
input::placeholder, textarea::placeholder { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 19px; }
.trip-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 23px; transition: border-color .15s, box-shadow .15s; }
.trip-card:hover { border-color: var(--control-border); box-shadow: 0 5px 22px var(--card-shadow); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-symbol { display: grid; place-items: center; border-radius: 9px; height: 40px; width: 40px; background: var(--panel); color: var(--accent-text); }
.badge { font-size: 9px; font-weight: 600; padding: 5px 8px; border-radius: 5px; }
.neutral { background: var(--warning-bg); color: var(--warning-text); }
.green { background: var(--success-bg); color: var(--success-text); }
.trip-card h3, .preset-card h3 { font-size: 19px; margin: 0 0 9px; letter-spacing: -.5px; font-weight: 600; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin: 0 0 24px; flex-wrap: wrap; }
.card-meta .icon { width: 14px; height: 14px; }
.card-progress-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.card-progress-label strong { color: var(--accent-text); font-weight: 600; }
.progress-track { height: 5px; border-radius: 5px; background: var(--subtle-bg); overflow: hidden; }
.progress-track > span { display: block; background: var(--progress); height: 100%; border-radius: inherit; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.card-footer > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card-footer .icon { width: 14px; height: 14px; }
.card-footer > span:last-child { white-space: nowrap; }
.empty-state { text-align: center; border: 1px dashed var(--line); border-radius: 11px; padding: 42px 24px; background: var(--subtle-bg); }
.empty-icon { color: var(--accent-text); background: var(--subtle-bg); border: 1px solid var(--line); height: 58px; width: 58px; border-radius: 15px; display: grid; place-items: center; margin: 0 auto 18px; transform: rotate(-6deg); }
.empty-icon .icon { height: 28px; width: 28px; transform: rotate(6deg); }
.empty-state h2 { font-size: 18px; font-weight: 600; letter-spacing: -.4px; margin: 0 0 10px; }
.empty-state p { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 0 auto 21px; max-width: 430px; }
.empty-state .button { font-size: 11px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.toolbar-note { font-size: 11px; color: var(--muted); }
.toolbar .search { width: 280px; }
.inventory-summary { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 23px 27px; margin-bottom: 28px; display: flex; gap: 20px; align-items: center; }
.summary-mark { width: 46px; height: 46px; color: var(--accent-text); display: grid; place-items: center; }
.summary-mark .icon { width: 34px; height: 34px; }
.inventory-summary strong { font-size: 25px; font-weight: 600; letter-spacing: -.7px; display: block; }
.inventory-summary span { font-size: 10px; color: var(--muted); display: block; margin-top: 5px; }
.summary-divider { height: 42px; width: 1px; background: var(--line); margin: 0 10px; }
.info-strip { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 15px 18px; margin-bottom: 29px; color: var(--muted); }
.info-strip .icon { width: 18px; height: 18px; margin-top: 2px; }
.info-strip p { font-size: 12px; line-height: 1.65; margin: 0; }
.preset-card { border-radius: 10px; background: var(--white); border: 1px solid var(--line); overflow: hidden; }
.preset-art { background: var(--panel); padding: 24px; position: relative; height: 120px; display: flex; align-items: center; justify-content: center; }
.preset-art::before, .preset-art::after { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; border: 1px solid var(--line); transform: rotate(-20deg) scaleY(.45); }
.preset-art::after { width: 300px; height: 300px; }
.preset-art > .icon { width: 72px; height: 72px; stroke-width: 1; color: var(--accent-text); position: relative; z-index: 1; }
.preset-art > span { position: absolute; top: 13px; right: 13px; background: var(--subtle-bg); border: 1px solid var(--line); color: var(--accent-text); border-radius: 5px; padding: 4px 7px; font-size: 10px; }
.preset-content { padding: 24px; }
.card-title-link:hover { color: var(--accent-text); }
.preset-description { font-size: 12px; line-height: 1.7; color: var(--muted); min-height: 60px; margin: 0 0 20px; }
.preset-stats { display: flex; gap: 14px; justify-content: space-between; font-size: 10px; color: var(--muted); }
.preset-stats > span { display: flex; align-items: center; gap: 6px; }
.preset-stats .icon { width: 14px; height: 14px; }
.preset-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 19px; border-top: 1px solid var(--line); }
.preset-actions .button { flex: 1; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); margin-bottom: 25px; }
.back-link:hover { color: var(--green); }
.back-link .icon { width: 15px; height: 15px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.inventory-actions { flex-wrap:wrap; }
.shared-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); background: var(--subtle-bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 11px; }
.shared-badge .icon { width: 14px; height: 14px; }
.preset-content > .shared-badge { margin-top: 10px; }
#share-link { font-size: 12px; }
.public-list .gear-row { grid-template-columns: 24px minmax(90px, 1fr) 50px; }
.public-list .component-row { grid-template-columns: 21px minmax(70px, 1fr) 85px 50px; }
.trip-summary { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; padding: 26px 29px; gap: 24px; margin-bottom: 23px; }
.trip-progress { display: flex; align-items: center; gap: 20px; margin-right: auto; }
.progress-circle { height: 72px; width: 72px; flex: 0 0 72px; border-radius: 50%; background: conic-gradient(var(--progress) var(--progress), var(--progress-track) 0); position: relative; display: grid; place-items: center; }
.progress-circle::before { content: ""; position: absolute; inset: 6px; background: var(--panel); border-radius: 50%; }
.progress-circle strong { position: relative; font-size: 23px; font-weight: 600; letter-spacing: -.8px; }
.progress-circle small { font-size: 12px; margin-left: 1px; }
.trip-progress h2 { font-size: 18px; font-weight: 600; letter-spacing: -.3px; margin: 0 0 7px; }
.trip-progress p { font-size: 11px; color: var(--muted); margin: 0; }
.trip-stat { padding-left: 25px; border-left: 1px solid var(--line); }
.trip-stat strong { display: block; font-size: 27px; font-weight: 600; letter-spacing: -.8px; }
.trip-stat small { font-size: 15px; font-weight: 400; color: var(--muted); }
.trip-stat > span { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); }
.participants { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.participants > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.participants > span > .icon { width: 16px; height: 16px; }
.participant-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.person-chip { display: flex; align-items: center; gap: 6px; font-size: 10px; padding: 4px 8px 4px 4px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); }
.avatar { height: 23px; width: 23px; display: grid; place-items: center; border-radius: 4px; font-size: 10px; font-weight: 600; }
.tone-0 { background: var(--tone-green-bg); color: var(--tone-green-text); }
.tone-1 { background: var(--tone-tan-bg); color: var(--tone-tan-text); }
.tone-2 { background: var(--tone-blue-bg); color: var(--tone-blue-text); }
.tone-3 { background: var(--tone-purple-bg); color: var(--tone-purple-text); }
.participants .text-button { font-size: 10px; }
.muted { font-size: 11px; color: var(--muted); }
.list-heading { margin-bottom: 20px; }
.detail-toolbar { gap: 20px; flex-wrap: wrap; }
.detail-toolbar .search { width: 230px; flex: 0 0 230px; }
.filters { display: flex; gap: 3px; flex-wrap: wrap; }
.filter { border: 0; padding: 8px 10px; background: transparent; font-size: 10px; color: var(--muted); border-radius: 6px; }
.filter:hover { background: var(--panel); }
.filter.active { background: var(--selected-bg); color: var(--accent-text); font-weight: 600; }
.gear-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.gear-group + .gear-group { border-top: 1px solid var(--line); }
.group-heading { background: var(--subtle-bg); padding: 13px 22px; display: flex; align-items: center; gap: 10px; }
.group-heading h2 { font-size: 11px; color: var(--accent-text); font-weight: 650; margin: 0; }
.group-heading > span { font-size: 9px; color: var(--muted); }
.gear-row { padding: 15px 20px; min-height: 65px; display: grid; grid-template-columns: 24px minmax(130px, 1fr) 50px 150px 155px 34px; gap: 14px; align-items: center; }
.gear-row + .gear-row { border-top: 1px solid var(--line); }
.gear-entry + .gear-entry { border-top: 1px solid var(--line); }
.kit-details { margin: 0 20px 15px 58px; border: 1px solid var(--line); border-radius: 7px; background: var(--kit-bg); }
.kit-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; cursor: pointer; color: var(--accent-text); font-size: 11px; list-style: none; }
.kit-details summary::-webkit-details-marker { display: none; }
.kit-details summary > span { display: flex; align-items: center; gap: 7px; }
.kit-details summary > span::before { content: '›'; font-size: 19px; line-height: 12px; transition: transform .15s; }
.kit-details[open] summary > span::before { transform: rotate(90deg); }
.kit-details summary .icon { width: 14px; height: 14px; }
.kit-details summary small { font-size: 10px; color: var(--muted); text-align: right; }
.kit-content { border-top: 1px solid var(--line); }
.component-row { display: grid; grid-template-columns: 21px minmax(100px, 1fr) 85px 50px 150px 30px; align-items: center; gap: 12px; padding: 12px; }
.component-row + .component-row { border-top: 1px solid var(--subtle-bg); }
.component-row .gear-name strong { font-size: 11px; }
.component-row .gear-name small { font-size: 10px; }
.component-row .assignee { padding: 7px 9px; }
.component-weight { color: var(--accent-text); font-size: 10px; text-align: right; }
.component-warning { color: var(--warning-text) !important; }
.component-add { padding: 12px; display: flex; gap: 5px; align-items: center; font-size: 11px; }
.component-add .icon { width: 14px; height: 14px; }
.kit-empty, .form-hint { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 14px 12px 0; }
.inventory-list .component-row, .preset-list .component-row { grid-template-columns: 21px minmax(100px, 1fr) 85px 50px 30px; }
.gear-name { min-width: 0; }
.gear-name strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.gear-name > small { font-size: 10px; color: var(--muted); display: block; margin-top: 5px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.gear-name > .trait-label { color: var(--accent-text); font-size: 9px; }
.gear-choice { display: flex; align-items: center; gap: 6px; margin-top: 8px; max-width: 390px; color: var(--accent-text); }
.gear-choice .icon { width: 13px; height: 13px; }
.gear-choice select { width: 100%; min-width: 0; border: 1px solid var(--control-border); border-radius: 5px; padding: 6px 7px; background: var(--subtle-bg); color: var(--accent-text); font-size: 10px; cursor: pointer; text-overflow: ellipsis; }
.gear-choice select:disabled { cursor: default; opacity: .7; }
.scope-selector { display:inline-flex; gap:4px; border:1px solid var(--line); border-radius:10px; background:var(--subtle-bg); padding:4px; margin:0 0 10px; }
.scope-tab { display:flex; align-items:center; gap:9px; padding:11px 16px; border:0; border-radius:7px; background:transparent; color:var(--muted); font-size:13px; font-weight:550; }
.scope-tab .icon { width:18px; height:18px; }
.scope-tab .muted-count { font-size:10px; }
.scope-tab:hover { background:var(--hover-bg); color:var(--ink); }
.scope-tab[aria-selected="true"] { background:var(--white); color:var(--green); box-shadow:0 1px 3px var(--card-shadow); }
.scope-tab[aria-selected="true"] .muted-count { background:var(--selected-bg); color:var(--accent-text); }
.scope-description { margin:0 0 17px; color:var(--muted); font-size:11px; line-height:1.6; }
.scope-panel { border-radius:8px; }
.personal-carrier { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.me-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-text); font-size: 11px; font-weight: 550; }
.me-tag .icon { width: 13px; height: 13px; }
.personal-carrier small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.personal-override { border: 0; background: transparent; padding: 2px 0; color: var(--muted); font-size: 9px; cursor: pointer; }
.personal-override:hover { color: var(--green); text-decoration: underline; }
[hidden] { display: none !important; }
.is-packed { background: var(--kit-bg); }
.is-packed .gear-name strong { color: var(--accent-text); }
.pack-toggle { position: relative; height: 21px; width: 21px; cursor: pointer; }
.pack-toggle > input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 21px; height: 21px; cursor: pointer; }
.pack-toggle > span { display: grid; place-items: center; border: 1px solid var(--control-border); background: var(--white); border-radius: 5px; width: 21px; height: 21px; pointer-events: none; }
.pack-toggle .icon { width: 15px; height: 15px; visibility: hidden; }
.pack-toggle input:checked + span { color: var(--on-primary); border-color: var(--accent-text); background: var(--primary-bg); }
.pack-toggle input:checked + span .icon { visibility: visible; }
.pack-toggle input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.quantity { font-size: 10px; color: var(--accent-text); white-space: nowrap; text-align: right; }
.availability { display: flex; align-items: center; gap: 5px; font-size: 9px; white-space: nowrap; }
.available { color: var(--accent-text); }
.availability .icon { width: 12px; height: 12px; }
.missing { color: var(--amber); }
.tiny-dot { height: 4px; width: 4px; border-radius: 50%; background: var(--warning-text); }
.assignee { display: flex; align-items: center; gap: 5px; border: 1px dashed var(--control-border); border-radius: 6px; padding: 7px 8px; min-width: 0; color: var(--muted); }
.assignee .icon { width: 13px; height: 13px; }
.assignee select { border: 0; background: transparent; font-size: 10px; min-width: 0; width: 100%; color: inherit; cursor: pointer; padding: 0; }
.assignee select:focus { outline: none; }
.assignee:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.assignee.has-person { background: var(--subtle-bg); border: 1px solid var(--control-border); color: var(--accent-text); }
.gear-row > .icon-button { padding: 8px; }
.mobile-availability { display: none; }
.inventory-row { grid-template-columns: 24px minmax(120px, 1fr) 130px 70px 34px; }
.preset-list .gear-row { grid-template-columns: 24px minmax(120px, 1fr) 50px 155px 34px; }
.item-symbol { color: var(--muted); }
.item-symbol .icon { width: 19px; height: 19px; }
.weight { color: var(--accent-text); font-size: 10px; text-align: right; }
.list-footnote { color: var(--muted); font-size: 10px; line-height: 1.7; margin: 17px 4px 0; }
dialog { background:var(--white); width: min(540px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 13px; padding: 28px; color: var(--ink); box-shadow: 0 20px 100px var(--shadow); max-height: calc(100dvh - 40px); }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.modal-heading h2 { font-size: 22px; letter-spacing: -.5px; font-weight: 600; margin: 0 0 8px; }
.modal-heading p { font-size: 12px; line-height: 1.6; margin: 0; color: var(--muted); }
.modal-heading > .icon-button { margin: -7px -8px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wide { grid-column: 1 / -1; }
.form-field > span { font-size: 11px; font-weight: 600; color: var(--accent-text); }
.form-field input, .form-field select, .form-field textarea { font-size: 12px; border: 1px solid var(--control-border); border-radius: 6px; padding: 11px 12px; min-height: 40px; width: 100%; color: var(--ink); background: var(--input-bg); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--focus); outline: 2px solid var(--focus-halo); outline-offset: 0; }
.form-field textarea { resize: vertical; line-height: 1.6; }
.form-field > small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.optional { font-weight: 400; font-size: 10px; color: var(--muted); margin-left: 5px; }
.modal-footer { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding-top: 20px; margin-top: 22px; }
.footer-spacer { flex: 1; }
.form-error { color: var(--error-text); background: var(--error-bg); font-size: 12px; border-radius: 5px; line-height: 1.7; padding: 10px; margin: 18px 0 0; }
.form-error:empty { display: none; }
.delete-submit { background: var(--danger-bg); color:var(--on-danger); }
.delete-submit:hover { background: var(--danger-hover); }
#toast { position: fixed; bottom: 25px; left: calc(50% + 100px); transform: translate(-50%, 15px); background: var(--primary-bg); color: var(--on-primary); padding: 13px 20px; font-size: 12px; border-radius: 8px; box-shadow: 0 7px 25px var(--shadow); z-index: 10; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; max-width: min(550px, 90vw); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--danger-bg); color:var(--on-danger); }
@media (min-width: 1700px) { main { padding-left: 65px; padding-right: 65px; } }
@media (max-width: 1220px) {
  main { padding: 39px 30px; }
  .sidebar { width: 210px; flex-basis: 210px; padding-left: 17px; padding-right: 17px; }
  main { margin-left: 210px; width: calc(100% - 210px); }
  .hero-copy { padding-left: 25px; width: 65%; }
  .hero h2 { font-size: 25px; }
  .landscape { width: 47%; }
  .gear-row { grid-template-columns: 21px minmax(105px, 1fr) 40px 135px 34px; gap: 12px; padding: 14px 16px; }
  .desktop-availability { display: none; }
  .mobile-availability { display: block; margin-top: 6px; }
  .inventory-row { grid-template-columns: 21px minmax(110px, 1fr) 110px 50px 34px; }
  .preset-list .gear-row { grid-template-columns: 21px minmax(110px, 1fr) 50px 34px; }
  .header-actions .button { font-size: 0; width: 41px; padding: 10px; gap: 0; }
  .header-actions .button .icon { width: 18px; height: 18px; }
  .trip-summary { padding: 22px; gap: 20px; }
  .trip-progress { gap: 14px; }
  .trip-progress h2 { font-size: 16px; }
  .trip-stat { padding-left: 20px; }
}
@media (max-width: 900px) {
  .sidebar { width: 78px; flex-basis: 78px; padding: 28px 12px; }
  .brand { margin: 0 0 40px; justify-content: center; }
  .brand > span:last-child, .nav-label { display: none; }
  .brand-icon { width: 40px; }
  nav a { font-size: 0; justify-content: center; gap: 0; padding: 15px 0; }
  .nav-count { display: none; }
  .profile-row { flex-direction:column; gap:0; }
  .profile-button { justify-content: center; }
  .profile-via { display:none; }
  .profile-button #profile-label { display: none; }
  nav .icon { height: 22px; width: 22px; }
  main { margin-left: 78px; width: calc(100% - 78px); padding: 35px 26px; }
  .hero h2 { font-size: 24px; }
  .hero-copy { width: 68%; }
  .landscape { width: 43%; }
  .page-header p { font-size: 12px; }
  .trip-summary { gap: 16px; }
  .trip-stat > span { max-width: 100px; line-height: 1.5; }
}
@media (max-width: 640px) {
  .kit-details { margin: 0 14px 14px; }
  .kit-details summary { flex-wrap: wrap; gap: 4px; }
  .kit-details summary small { margin-left: 25px; }
  .component-row, .inventory-list .component-row, .preset-list .component-row { grid-template-columns: 21px minmax(70px, 1fr) 38px 28px; gap: 9px; padding: 12px 10px; }
  .component-row .gear-name { grid-column: 2; grid-row: 1; }
  .component-row .quantity { grid-column: 3; grid-row: 1; font-size: 10px; }
  .component-row > .icon-button { grid-column: 4; grid-row: 1; }
  .component-row .component-weight { grid-column: 2 / 4; grid-row: 2; text-align: left; }
  .component-row .assignee { grid-column: 2 / 5; grid-row: 3; max-width: 220px; }
  .app-shell { flex-direction: column; }
  .sidebar { position: sticky; top: 0; width: 100%; height: 67px; flex: 0 0 67px; z-index: 3; padding: 11px 17px; flex-direction: row; justify-content: space-between; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); background: var(--sidebar-glass); backdrop-filter: blur(8px); }
  .brand { margin: 0; gap: 5px; }
  .brand > span:last-child { display: block; font-size: 27px; }
  .brand small { display: none; }
  .brand-icon, .brand-icon .icon { height: 31px; width: 31px; }
  nav { display: flex; gap: 4px; }
  nav a { padding: 12px 13px; }
  nav .icon { height: 21px; width: 21px; }
  .sidebar-footer { position:fixed; inset:auto 0 0; display:flex; align-items:center; gap:16px; padding:10px 18px; background:var(--sidebar); border-top:1px solid var(--line); }
  .profile-row { flex:1; min-width:0; flex-direction:row; gap:6px; }
  .profile-button { padding:8px 0; }
  .profile-button #profile-label, .profile-via { display:inline; }
  main { width: 100%; margin-left: 0; padding: 29px 18px 100px; }
  .page-header { margin-bottom: 23px; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
  h1 { font-size: 29px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
  .page-header > .button { padding: 9px 11px; font-size: 11px; min-height: 36px; }
  .page-header p { font-size: 11px; margin-top: 8px; }
  .hero { min-height: 255px; margin-bottom: 27px; }
  .hero-copy { padding: 26px 21px; width: 100%; }
  .hero-tag { font-size: 7px; letter-spacing: 1.15px; }
  .hero h2 { font-size: 23px; max-width: 320px; }
  .hero p { font-size: 11px; max-width: 245px; }
  .landscape { width: 68%; height: 70%; opacity: .3; mask-image: linear-gradient(to right, transparent, black); }
  .hero-button { background: var(--subtle-bg); }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .section-heading { margin-bottom: 16px; flex-wrap: wrap; }
  .section-heading h2 { font-size: 16px; }
  .section-heading .search { width: 100%; }
  .empty-state { padding: 34px 20px; }
  .empty-state h2 { font-size: 17px; }
  .empty-state p { font-size: 11px; }
  .inventory-summary { padding: 19px 16px; gap: 13px; margin-bottom: 22px; }
  .inventory-summary strong { font-size: 23px; }
  .inventory-summary span { font-size: 9px; }
  .summary-mark { display: none; }
  .summary-divider { margin: 0 5px; }
  .toolbar { margin-bottom: 17px; }
  .toolbar .search { min-width: 0; width: 100%; }
  .toolbar-note { white-space: nowrap; font-size: 10px; }
  .info-strip { margin-bottom: 23px; padding: 13px; }
  .info-strip p { font-size: 11px; }
  .back-link { margin-bottom: 21px; }
  .header-actions { width: 100%; }
  .header-actions .button { font-size: 11px; width: auto; gap: 7px; }
  .header-actions > .bordered:first-of-type { margin-left: auto; }
  .trip-summary { padding: 19px 17px; gap: 18px; display: grid; grid-template-columns: 1fr 1fr; }
  .trip-progress { grid-column: 1 / -1; }
  .trip-progress h2 { font-size: 17px; }
  .progress-circle { height: 62px; width: 62px; flex-basis: 62px; }
  .trip-stat { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .trip-stat strong { font-size: 23px; }
  .trip-stat > span { max-width: none; }
  .participants { gap: 10px; margin-bottom: 27px; }
  .participant-chips { gap: 6px; }
  .list-heading .button { padding: 9px 11px; font-size: 10px; min-height: 35px; }
  .detail-toolbar { gap: 11px; }
  .detail-toolbar .search { flex-basis: 100%; }
  .filters { gap: 2px; }
  .filter { padding: 8px 9px; font-size: 9px; }
  .group-heading { padding: 12px 15px; }
  .gear-row { padding: 14px 14px; grid-template-columns: 21px minmax(80px, 1fr) 40px 30px; gap: 9px 11px; }
  .gear-name strong { font-size: 12px; }
  .gear-row .assignee { grid-column: 2 / 4; grid-row: 2; max-width: 210px; padding: 7px 9px; }
  .gear-row .personal-carrier { grid-column: 2 / 4; grid-row: 2; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .assignee select { font-size: 11px; }
  .gear-row .icon-button { grid-column: 4; grid-row: 1; }
  .gear-row .quantity { grid-column: 3; grid-row: 1; }
  .inventory-row { grid-template-columns: 21px minmax(90px, 1fr) 45px 30px; }
  .inventory-row .weight { grid-column: 2; grid-row: 2; text-align: left; margin-top: -4px; }
  .preset-list .gear-row { grid-template-columns: 21px minmax(90px, 1fr) 45px 30px; }
  .availability { font-size: 8px; }
  .list-footnote { font-size: 9px; }
  dialog { padding: 23px 20px; }
  .modal-heading h2 { font-size: 21px; }
  .modal-heading p { font-size: 11px; }
  .form-grid { gap: 16px 12px; }
  .form-field input, .form-field select, .form-field textarea { font-size: 14px; padding: 10px; }
  .form-field > span { font-size: 10px; }
  #toast { left: 50%; bottom: 19px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.preferences { display:flex; align-items:center; gap:8px; margin:12px 0 0; }
.language-control, .theme-control { display:grid; place-items:center; width:36px; height:36px; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--white); color:var(--ink); }
.language-control { font-size:12px; font-weight:650; }
.theme-control .icon { width:18px; height:18px; }
:root[data-theme="dark"] .landscape { filter:brightness(.58) saturate(.7); }
@media (max-width: 900px) {
  .preferences { flex-direction:column; margin:12px 0 0; }
}
@media (max-width: 640px) {
  .preferences { flex-direction:row; gap:5px; margin:0; }
  .language-control, .theme-control { width:32px; padding:6px; }
  nav a { padding:12px 9px; }
}
@media (max-width: 360px) { .brand > span:last-child { display:none; } }

@media (max-width: 640px) {
  .scope-selector { display:flex; width:100%; }
  .scope-tab { flex:1; justify-content:center; gap:7px; padding:10px 8px; font-size:12px; }
  .scope-tab .icon { width:16px; height:16px; }
  .scope-tab .muted-count { min-width:20px; padding:3px 5px; }
  .scope-description { font-size:10px; margin-bottom:14px; }
}
#account-options .text-button { display:block; margin:8px 0; }
#account-options select { width:100%; }

.sidebar { overflow-y:auto; }
.sidebar > * { flex-shrink:0; }
@media (max-width:640px) {
 .sidebar { overflow:visible; backdrop-filter:none; }
 #toast { bottom:76px; }
}
