:root {
  --ink: #102c3b;
  --muted: #6f7f84;
  --line: #dfe6e4;
  --snow: #f5f6f2;
  --paper: #fffefa;
  --blue: #1d5873;
  --deep-blue: #123a51;
  --ice-blue: #dcebf0;
  --orange: #e97832;
  --orange-soft: #f8e4d4;
  --green: #41765d;
  --shadow: 0 16px 44px rgba(22, 54, 65, .09);
  --radius-lg: 26px;
  --radius-md: 18px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--snow); color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; z-index: 20; padding: 28px 20px 18px; color: #fff; overflow: hidden; background: var(--deep-blue); }
.sidebar::before { content: ""; position: absolute; width: 280px; height: 280px; left: -120px; top: -130px; border: 1px solid rgba(255,255,255,.1); border-radius: 46% 54% 61% 39%; transform: rotate(24deg); box-shadow: 0 0 0 32px rgba(255,255,255,.025), 0 0 0 68px rgba(255,255,255,.02); }
.brand { position: relative; display: flex; gap: 12px; align-items: center; min-height: 48px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; color: #fff; border-radius: 14px; background: var(--orange); box-shadow: 0 8px 20px rgba(233,120,50,.25); }
.brand-mark svg { width: 25px; height: 25px; stroke-width: 1.5; }
.brand strong { display: block; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 17px; letter-spacing: .06em; }
.brand small { display: block; margin-top: 4px; color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .18em; }
.side-nav { position: relative; display: grid; gap: 7px; margin-top: 54px; }
.side-nav a { display: flex; align-items: center; gap: 14px; padding: 13px 15px; color: rgba(255,255,255,.64); border: 1px solid transparent; border-radius: 13px; font-size: 14px; transition: .22s ease; }
.side-nav a svg { width: 20px; height: 20px; }
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.side-nav a.active { color: #fff; background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.08); box-shadow: inset 3px 0 var(--orange); }
.trail-note { position: relative; margin-top: auto; min-height: 170px; padding: 22px 17px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 19px; background: linear-gradient(155deg, rgba(255,255,255,.09), rgba(255,255,255,.025)); }
.trail-note span { display: block; color: #f5b189; font-size: 13px; letter-spacing: .1em; }
.trail-note strong { position: relative; display: block; z-index: 2; max-width: 140px; margin-top: 12px; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 18px; line-height: 1.65; font-weight: 600; }
.contour-lines { position: absolute; width: 155px; height: 100px; right: -35px; bottom: -22px; opacity: .18; border: 1px solid white; border-radius: 48% 52% 42% 58%; transform: rotate(-20deg); box-shadow: 0 0 0 13px transparent, 0 0 0 14px white, 0 0 0 28px transparent, 0 0 0 29px white, 0 0 0 43px transparent, 0 0 0 44px white; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: 18px 5px 0; color: rgba(255,255,255,.4); font-size: 12px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #6db18d; box-shadow: 0 0 0 4px rgba(109,177,141,.12); }

.main { min-height: 100vh; margin-left: var(--sidebar); padding: 0 46px 70px; }
.topbar { height: 108px; display: flex; align-items: center; justify-content: space-between; }
.page-heading p { margin: 0 0 6px; color: var(--muted); font-size: 13px; letter-spacing: .1em; }
.page-heading h1 { margin: 0; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 25px; font-weight: 700; letter-spacing: .04em; }
.mobile-brand { display: none; }
.admin-button { display: flex; gap: 8px; align-items: center; padding: 10px 15px; cursor: pointer; color: var(--deep-blue); border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); transition: .2s ease; }
.admin-button:hover { transform: translateY(-1px); background: white; box-shadow: 0 8px 24px rgba(22,54,65,.08); }
.admin-button.is-admin { color: var(--green); background: #eff7f1; border-color: #cadfd1; }
.admin-button svg { width: 17px; height: 17px; }

.setup-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -2px 0 24px; padding: 15px 17px; border: 1px solid #ecd0bb; border-radius: 17px; background: #fff9f3; box-shadow: 0 10px 30px rgba(125,82,53,.05); }
.setup-banner[hidden] { display: none; }
.setup-banner > div { display: flex; align-items: center; gap: 13px; }
.setup-banner strong, .setup-banner p { display: block; margin: 0; }
.setup-banner p { margin-top: 4px; color: #8b725f; font-size: 12px; }
.setup-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--orange); background: var(--orange-soft); }
.setup-icon svg { width: 18px; height: 18px; }

.page { display: none; animation: page-in .42s ease both; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; }
.trip-hero { position: relative; min-height: 332px; padding: 35px 37px; overflow: hidden; color: #fff; border-radius: var(--radius-lg); background: linear-gradient(125deg, #16445b 0%, #20617a 70%, #397d91 100%); box-shadow: var(--shadow); }
.trip-hero::after { content: ""; position: absolute; inset: 0; opacity: .09; background-image: radial-gradient(rgba(255,255,255,.8) .55px, transparent .55px); background-size: 5px 5px; mix-blend-mode: soft-light; }
.hero-copy { position: relative; z-index: 4; max-width: 480px; }
.section-kicker { color: #f7b68f; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.section-kicker.dark { color: var(--orange); }
.hero-copy h2 { max-width: 420px; margin: 14px 0 11px; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: clamp(27px, 3.2vw, 42px); font-weight: 600; line-height: 1.25; letter-spacing: .04em; }
.hero-copy p { max-width: 430px; margin: 0 0 24px; color: rgba(255,255,255,.67); font-size: 13px; line-height: 1.8; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; cursor: pointer; border: 0; border-radius: 12px; font-size: 13px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 15px; height: 15px; }
.button.light { color: var(--deep-blue); background: #fff; box-shadow: 0 8px 22px rgba(8,31,43,.18); }
.button.dark { color: #fff; background: var(--deep-blue); }
.button.accent { color: #fff; background: var(--orange); box-shadow: 0 10px 24px rgba(233,120,50,.2); }
.button.soft { color: var(--deep-blue); background: var(--ice-blue); }
.button.ghost-light { color: #fff; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.button.danger { color: #a33f32; background: #f9e4df; }
.button:disabled { cursor: not-allowed; opacity: .46; transform: none; box-shadow: none; }
.button.wide { width: 100%; }
.admin-only { display: none !important; }
body.is-admin .admin-only { display: inline-flex !important; }
.hero-stats { position: absolute; display: flex; z-index: 4; right: 32px; bottom: 28px; gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(7,33,46,.28); backdrop-filter: blur(8px); }
.hero-stats div { min-width: 91px; padding: 11px 14px; border-right: 1px solid rgba(255,255,255,.1); }
.hero-stats div:last-child { border: 0; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-family: Georgia, serif; font-size: 17px; }
.hero-stats span { margin-top: 3px; color: rgba(255,255,255,.5); font-size: 11px; }
.hero-sun { position: absolute; z-index: 1; width: 130px; height: 130px; right: 45px; top: 22px; border-radius: 50%; background: rgba(233,120,50,.88); box-shadow: 0 0 60px rgba(246,163,95,.18); }
.hero-mountain { position: absolute; right: -20px; bottom: -1px; width: 62%; height: 62%; clip-path: polygon(0 100%, 38% 18%, 48% 42%, 64% 4%, 100% 100%); background: #173d50; }
.hero-mountain.back { right: 12%; bottom: 0; opacity: .35; transform: scale(1.3); background: #7da7b4; }
.hero-mountain.front { z-index: 2; }

.readiness-card { display: flex; flex-direction: column; min-height: 332px; padding: 27px; border: 1px solid rgba(25,64,76,.07); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.card-heading h2 { margin: 7px 0 0; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 23px; }
.ring { --progress: 0deg; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: conic-gradient(var(--orange) var(--progress), #edf0ec 0); }
.ring::before { content: ""; grid-area: 1/1; width: 49px; height: 49px; border-radius: 50%; background: var(--paper); }
.ring b { grid-area: 1/1; z-index: 1; font-family: Georgia, serif; font-size: 14px; }
.readiness-list { display: grid; gap: 12px; margin: 28px 0 auto; }
.readiness-list > div { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; }
.readiness-list strong, .readiness-list small { display: block; }
.readiness-list strong { font-size: 13px; }
.readiness-list small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.readiness-list b { font-family: Georgia, serif; font-size: 19px; }
.mini-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; }
.mini-icon svg { width: 17px; height: 17px; }
.mini-icon.blue { color: var(--blue); background: var(--ice-blue); }
.mini-icon.orange { color: var(--orange); background: var(--orange-soft); }
.mini-icon.green { color: var(--green); background: #e2eee5; }
.text-button { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 0; cursor: pointer; color: var(--blue); border: 0; background: transparent; font-size: 13px; font-weight: 700; }
.text-button svg { width: 13px; height: 13px; transition: transform .2s; }
.text-button:hover svg { transform: translateX(3px); }

.section-title { display: flex; justify-content: space-between; align-items: end; margin: 42px 2px 20px; }
.section-title h2, .page-intro h2 { margin: 7px 0 4px; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 27px; }
.section-title p, .page-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.systems-grid { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: 13px; }
.system-card { position: relative; min-height: 157px; padding: 19px; overflow: hidden; cursor: pointer; border: 1px solid rgba(25,64,76,.07); border-radius: var(--radius-md); background: var(--paper); transition: .25s ease; animation: card-in .45s both; animation-delay: calc(var(--index) * 45ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.system-card::after { content: attr(data-index); position: absolute; right: 10px; bottom: -10px; color: rgba(18,58,81,.035); font: 700 64px/1 Georgia, serif; }
.system-card:hover { transform: translateY(-4px); border-color: rgba(29,88,115,.2); box-shadow: 0 15px 30px rgba(22,54,65,.08); }
.system-card .system-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--blue); border-radius: 12px; background: var(--ice-blue); font-family: Georgia, serif; font-size: 17px; font-weight: 700; }
.system-card:nth-child(3n+2) .system-icon { color: var(--orange); background: var(--orange-soft); }
.system-card:nth-child(3n) .system-icon { color: var(--green); background: #e2eee5; }
.system-card h3 { margin: 18px 0 5px; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 15px; }
.system-card p { position: relative; z-index: 2; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.system-meta { display: flex; gap: 8px; margin-top: 11px; color: #829096; font-size: 11px; }
.skeleton { border-radius: var(--radius-md); background: linear-gradient(100deg, #ebeeea 30%, #f7f8f5 50%, #ebeeea 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
.card-skeleton { min-height: 157px; }
@keyframes shimmer { to { background-position-x: -220%; } }

.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 18px 2px 28px; }
.toolbar { display: flex; justify-content: space-between; gap: 15px; padding: 13px; border: 1px solid rgba(25,64,76,.07); border-radius: 17px; background: var(--paper); }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 12px; }
.gear-result-count { display: flex; align-items: center; flex: none; padding: 0 8px; color: var(--muted); font-size: 12px; }
.view-switch { display: flex; padding: 3px; border-radius: 10px; background: var(--snow); }
.view-switch button { padding: 6px 12px; cursor: pointer; color: var(--muted); border: 0; border-radius: 8px; background: transparent; font-size: 13px; }
.view-switch button.selected { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(23,56,67,.07); }
.filter-chips { display: flex; gap: 8px; padding: 17px 0; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { flex: none; padding: 7px 13px; cursor: pointer; color: var(--muted); border: 1px solid var(--line); border-radius: 30px; background: transparent; font-size: 12px; }
.filter-chips button.selected { color: white; border-color: var(--deep-blue); background: var(--deep-blue); }
.gear-hierarchy { display: grid; gap: 15px; }
.gear-system-section { overflow: hidden; border: 1px solid rgba(25,64,76,.09); border-radius: 22px; background: rgba(255,255,255,.5); box-shadow: 0 8px 28px rgba(22,54,65,.035); }
.gear-system-toggle { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 18px; align-items: center; gap: 15px; width: 100%; padding: 18px 21px; cursor: pointer; text-align: left; border: 0; background: var(--paper); transition: .22s ease; }
.gear-system-toggle > svg, .gear-category-toggle > svg { width: 17px; height: 17px; color: var(--muted); transition: transform .2s ease; }
.gear-system-section.expanded > .gear-system-toggle { color: #fff; background: linear-gradient(115deg, var(--deep-blue), #1c5369); }
.gear-system-section.expanded > .gear-system-toggle > svg { color: rgba(255,255,255,.65); transform: rotate(90deg); }
.gear-hierarchy-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); border-radius: 15px; background: var(--ice-blue); font: 700 18px Georgia, serif; }
.gear-system-section.expanded .gear-hierarchy-icon { color: #fff; background: var(--orange); }
.gear-hierarchy-copy { min-width: 0; }
.gear-hierarchy-copy strong, .gear-hierarchy-copy small { display: block; }
.gear-hierarchy-copy strong { font: 600 20px "STZhongsong", "Noto Serif SC", serif; }
.gear-hierarchy-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.gear-system-section.expanded .gear-hierarchy-copy small { color: rgba(255,255,255,.62); }
.gear-system-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.gear-system-summary b { color: var(--blue); font: 700 17px Georgia, serif; }
.gear-system-section.expanded .gear-system-summary { color: rgba(255,255,255,.66); }
.gear-system-section.expanded .gear-system-summary b { color: #fff; }
.gear-system-body { display: grid; gap: 10px; padding: 13px; }
.gear-system-body[hidden], .gear-category-body[hidden] { display: none; }
.gear-category-section { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.gear-category-section.expanded { border-color: #cedbd9; box-shadow: 0 8px 24px rgba(22,54,65,.04); }
.gear-category-toggle { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 17px; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; cursor: pointer; text-align: left; border: 0; background: transparent; }
.gear-category-section.expanded > .gear-category-toggle { background: var(--snow); }
.gear-category-section.expanded > .gear-category-toggle > svg { color: var(--blue); transform: rotate(90deg); }
.gear-category-order { display: grid; place-items: center; width: 42px; height: 34px; color: var(--orange); border-radius: 10px; background: var(--orange-soft); font: 700 12px Georgia, serif; }
.gear-category-toggle strong, .gear-category-toggle small { display: block; }
.gear-category-toggle strong { font: 600 16px "STZhongsong", "Noto Serif SC", serif; }
.gear-category-toggle small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.gear-category-toggle > b { min-width: 48px; color: var(--blue); font-size: 12px; text-align: right; }
.gear-category-body { padding: 0 14px 14px; background: var(--snow); }
.gear-category-body .gear-grid { padding-top: 14px; }
.gear-category-empty { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 72px; padding: 15px 17px; color: var(--muted); border: 1px dashed #cdd9d7; border-radius: 12px; background: rgba(255,255,255,.56); font-size: 12px; }
.gear-category-empty .text-button { align-self: center; }
.gear-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gear-card { position: relative; min-height: 265px; padding: 21px; overflow: hidden; cursor: pointer; border: 1px solid rgba(25,64,76,.08); border-radius: var(--radius-md); background: var(--paper); box-shadow: 0 9px 28px rgba(22,54,65,.045); animation: card-in .35s both; animation-delay: calc(var(--index) * 35ms); }
.gear-card:hover { transform: translateY(-3px); border-color: rgba(29,88,115,.2); box-shadow: 0 15px 34px rgba(22,54,65,.08); }
.gear-card::after { content: attr(data-order); position: absolute; right: 10px; bottom: -10px; color: rgba(18,58,81,.035); font: 700 64px/1 Georgia, serif; }
.gear-card-image { position: relative; z-index: 1; height: 122px; margin: -21px -21px 18px; overflow: hidden; background: linear-gradient(145deg, var(--ice-blue), #edf2ee); }
.gear-card-image img { width: 100%; height: 100%; object-fit: cover; }
.gear-card-image span { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(29,88,115,.46); font: 600 32px "STZhongsong", serif; }
.gear-card-head, .gear-card-foot { position: relative; display: flex; align-items: center; justify-content: space-between; z-index: 1; gap: 10px; }
.gear-system-label { overflow: hidden; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.gear-status { flex: none; padding: 5px 8px; color: var(--green); border-radius: 20px; background: #e9f3ec; font-size: 11px; }
.gear-status.check { color: #9a622a; background: #fbeddc; }
.gear-status.repair { color: #a94b3b; background: #f9e4df; }
.gear-card h3 { position: relative; z-index: 1; margin: 25px 0 5px; font: 600 20px "STZhongsong", "Noto Serif SC", serif; }
.gear-subtitle { position: relative; z-index: 1; min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.gear-facts { position: relative; display: grid; grid-template-columns: 1fr 1fr; z-index: 1; gap: 10px; margin: 20px 0 17px; }
.gear-facts div { padding: 10px 11px; border-radius: 11px; background: var(--snow); }
.gear-facts span, .gear-facts strong { display: block; }
.gear-facts span { color: var(--muted); font-size: 11px; }
.gear-facts strong { margin-top: 4px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gear-note { position: relative; z-index: 1; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.gear-card-actions { display: none; align-items: center; gap: 6px; }
.gear-action { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; cursor: pointer; color: var(--blue); border: 0; border-radius: 9px; background: var(--ice-blue); }
.gear-action.delete { color: #a94b3b; background: #f9e4df; }
.gear-action svg { width: 14px; height: 14px; }
body.is-admin .gear-card-actions { display: flex; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; padding: 40px 20px; text-align: center; border: 1px dashed #ced9d8; border-radius: var(--radius-lg); background: rgba(255,255,255,.47); }
.empty-state.compact { min-height: 250px; }
.empty-state h3 { max-width: 480px; margin: 13px 0 8px; font-family: "STZhongsong", "Noto Serif SC", serif; font-size: 22px; }
.empty-state p { max-width: 520px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.empty-illustration { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 19px; color: var(--blue); border-radius: 24px 24px 20px 20px; background: var(--ice-blue); transform: rotate(-3deg); }
.empty-illustration svg { width: 35px; height: 35px; }
.empty-illustration.route { color: var(--orange); background: var(--orange-soft); }
.template-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 20px; }
.template-strip article { position: relative; min-height: 126px; padding: 19px; overflow: hidden; border-radius: var(--radius-md); background: var(--paper); border: 1px solid rgba(25,64,76,.07); }
.template-strip span { position: absolute; right: 11px; top: 7px; color: rgba(18,58,81,.05); font: 700 47px/1 Georgia, serif; }
.template-strip strong, .template-strip small { position: relative; display: block; }
.template-strip strong { margin-top: 35px; font: 600 16px "STZhongsong", "Noto Serif SC", serif; }
.template-strip small { margin-top: 7px; color: var(--muted); font-size: 12px; }
.template-strip article { cursor: pointer; transition: .22s ease; }
.template-strip article:hover { transform: translateY(-3px); border-color: rgba(29,88,115,.18); box-shadow: 0 12px 28px rgba(22,54,65,.07); }
.trip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.trip-card { position: relative; min-height: 220px; padding: 25px; overflow: hidden; cursor: pointer; color: #fff; border-radius: var(--radius-lg); background: linear-gradient(135deg, #153f54, #23657b); box-shadow: var(--shadow); transition: .25s ease; }
.trip-card:nth-child(3n+2) { background: linear-gradient(135deg, #365d4c, #548269); }
.trip-card:nth-child(3n) { background: linear-gradient(135deg, #7d4f32, #b36c3f); }
.trip-card:hover { transform: translateY(-3px); }
.trip-card::after { content: ""; position: absolute; width: 210px; height: 130px; right: -60px; bottom: -70px; opacity: .13; border: 1px solid white; border-radius: 48% 52% 43% 57%; box-shadow: 0 0 0 18px transparent, 0 0 0 19px white, 0 0 0 36px transparent, 0 0 0 37px white; transform: rotate(-12deg); }
.trip-card-top, .trip-card-stats, .trip-card-progress { position: relative; z-index: 1; }
.trip-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trip-card-top span { color: rgba(255,255,255,.65); font-size: 11px; letter-spacing: .1em; }
.trip-card h3 { position: relative; z-index: 1; margin: 23px 0 7px; font: 600 24px "STZhongsong", "Noto Serif SC", serif; }
.trip-card p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.6); font-size: 12px; }
.trip-card-progress { height: 5px; margin-top: 26px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.15); }
.trip-card-progress b { display: block; height: 100%; border-radius: inherit; background: #f4ad80; }
.trip-card-stats { display: flex; gap: 17px; margin-top: 10px; color: rgba(255,255,255,.62); font-size: 11px; }

.settings-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 15px; }
.settings-card { display: flex; align-items: flex-start; gap: 15px; min-height: 215px; padding: 27px; border: 1px solid rgba(25,64,76,.07); border-radius: var(--radius-lg); background: var(--paper); }
.settings-card.primary { color: #fff; border: 0; background: var(--deep-blue); }
.settings-card.primary .section-kicker { color: #f7b68f; }
.settings-card h3 { margin: 7px 0 9px; font: 600 20px "STZhongsong", "Noto Serif SC", serif; }
.settings-card p { min-height: 52px; margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.settings-card.primary p { color: rgba(255,255,255,.6); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.phase-tag { display: inline-flex; padding: 6px 9px; color: var(--blue); border-radius: 8px; background: var(--ice-blue); font-size: 11px; }
.about-card { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 22px 25px; border: 1px solid rgba(25,64,76,.07); border-radius: 20px; background: rgba(255,255,255,.6); }
.about-card > div { display: flex; align-items: center; gap: 15px; }
.brand-mark.large { width: 48px; height: 48px; }
.about-card strong { font-family: "STZhongsong", "Noto Serif SC", serif; }
.about-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.about-card > span { color: var(--muted); font: 12px Georgia, serif; letter-spacing: .08em; }

.bottom-nav { display: none; }
.auth-dialog { width: min(430px, calc(100% - 28px)); padding: 0; color: var(--ink); border: 0; border-radius: 25px; background: var(--paper); box-shadow: 0 28px 80px rgba(10,35,45,.26); }
.gear-dialog { width: min(650px, calc(100% - 28px)); max-height: min(88vh, 820px); }
.trip-dialog { width: min(610px, calc(100% - 28px)); }
.trip-detail-dialog { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; background: var(--snow); }
.category-dialog { width: min(560px, calc(100% - 28px)); }
.auth-dialog::backdrop { background: rgba(8,31,41,.55); backdrop-filter: blur(5px); }
.auth-dialog[open] { animation: dialog-in .25s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(15px) scale(.98); } }
.auth-dialog form { position: relative; padding: 36px; }
.dialog-close { position: absolute; right: 17px; top: 14px; width: 34px; height: 34px; cursor: pointer; color: var(--muted); border: 0; border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; }
.dialog-close:hover { background: var(--snow); }
.dialog-mark { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 23px; color: #fff; border-radius: 16px; background: var(--deep-blue); }
.dialog-mark svg { width: 29px; height: 29px; }
.auth-dialog h2 { margin: 8px 0; font: 600 27px "STZhongsong", "Noto Serif SC", serif; }
.auth-dialog form > p:not(.form-error) { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-dialog label span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.auth-dialog input, .auth-dialog select, .auth-dialog textarea { width: 100%; min-height: 48px; padding: 0 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; outline: none; background: white; }
.auth-dialog textarea { min-height: 78px; padding-block: 12px; resize: vertical; line-height: 1.6; }
.auth-dialog input:focus, .auth-dialog select:focus, .auth-dialog textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,88,115,.1); }
.gear-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 13px; max-height: 49vh; padding: 2px 2px 5px; overflow-y: auto; }
.gear-form-grid .full { grid-column: 1 / -1; }
.image-picker { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed #cad7d7; border-radius: 14px; background: var(--snow); }
.image-preview { display: grid; place-items: center; width: 74px; height: 62px; flex: none; overflow: hidden; color: var(--blue); border-radius: 11px; background: var(--ice-blue); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview svg { width: 24px; height: 24px; }
.image-picker strong, .image-picker small { display: block; }
.image-picker strong { font-size: 13px; }
.image-picker small { margin: 4px 0 7px; color: var(--muted); text-align: left; }
.image-picker input { min-height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; }
.trip-options { display: flex; align-items: center; gap: 18px; padding: 25px 4px 0; }
.trip-options label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.trip-options input { width: 17px; min-height: 17px; height: 17px; padding: 0; }
.trip-options label span { margin: 0; }
.trip-detail-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 100%; max-width: 1480px; height: 100dvh; margin: 0 auto; padding: 30px clamp(28px, 4vw, 64px) 24px; }
.trip-detail-head { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, .7fr); align-items: end; gap: 10px 38px; padding: 0 58px 22px 0; border-bottom: 1px solid var(--line); }
.trip-detail-heading { min-width: 0; }
.trip-detail-head h2 { margin: 8px 0 6px; font: 600 clamp(28px, 3vw, 42px) "STZhongsong", "Noto Serif SC", serif; }
.trip-detail-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.trip-progress { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; }
.trip-progress > i { display: block; height: 7px; overflow: hidden; border-radius: 10px; background: #e9eeeb; }
.trip-progress > i b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--orange); transition: width .3s ease; }
.trip-system-actions { display: flex; justify-content: flex-end; gap: 8px; grid-column: 2; }
.trip-system-actions button { padding: 7px 11px; cursor: pointer; color: var(--blue); border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.68); font-size: 12px; }
.trip-system-actions .trip-add-system { align-items: center; gap: 6px; color: #fff; border-color: var(--orange); background: var(--orange); font-weight: 700; }
.trip-add-system svg { width: 14px; height: 14px; }
.trip-checklist { display: grid; grid-auto-rows: max-content; align-content: start; gap: 12px; min-height: 0; margin: 18px 0; padding-right: 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.trip-system-group { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.68); }
.trip-system-group.expanded { border-color: #cbdad9; background: var(--paper); box-shadow: 0 10px 28px rgba(22,54,65,.055); }
.trip-system-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.trip-system-toggle { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 18px; align-items: center; gap: 13px; width: 100%; padding: 15px 17px; cursor: pointer; text-align: left; border: 0; background: transparent; }
.trip-system-toggle > svg { width: 17px; height: 17px; color: var(--muted); transition: transform .2s ease; }
.trip-system-group.expanded .trip-system-toggle > svg { transform: rotate(90deg); }
.trip-system-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--blue); border-radius: 13px; background: var(--ice-blue); font-family: Georgia, serif; font-size: 17px; font-weight: 700; }
.trip-system-copy strong, .trip-system-copy small { display: block; }
.trip-system-copy strong { font: 600 17px "STZhongsong", "Noto Serif SC", serif; }
.trip-system-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.trip-system-count { min-width: 46px; color: var(--blue); font: 700 14px Georgia, serif; text-align: right; }
.trip-system-admin { align-items: center; gap: 6px; padding-right: 14px; }
.trip-system-admin button, .trip-item-admin button { min-height: 30px; padding: 0 9px; cursor: pointer; color: var(--blue); border: 1px solid #d2dcda; border-radius: 8px; background: #fff; font-size: 11px; font-weight: 700; }
.trip-system-admin button.danger, .trip-item-admin button.danger { color: #a64839; border-color: #edcec6; background: #fff8f5; }
.trip-system-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 14px 14px; }
.trip-system-items[hidden] { display: none; }
.trip-check-item { display: grid; grid-template-columns: 74px minmax(150px, 1fr) 124px; grid-template-areas: "visual copy pack" "visual select quantity"; align-items: center; gap: 12px 14px; min-height: 138px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.trip-check-item.configured { border-color: #d5e2da; box-shadow: inset 3px 0 #79a18a; }
.trip-check-item.unconfigured { box-shadow: inset 3px 0 #e9a16f; }
.trip-item-visual { display: grid; grid-area: visual; place-items: center; align-self: stretch; width: 74px; min-height: 108px; overflow: hidden; color: var(--blue); border-radius: 12px; background: linear-gradient(145deg, var(--ice-blue), #edf2ee); }
.trip-item-visual img { width: 100%; height: 100%; object-fit: cover; }
.trip-item-visual span { font: 700 22px Georgia, serif; }
.trip-pack-toggle { display: inline-flex; grid-area: pack; align-items: center; justify-content: center; justify-self: end; gap: 6px; min-width: 88px; min-height: 36px; padding: 0 10px; cursor: pointer; color: var(--muted); border: 1px solid #ced9d7; border-radius: 10px; background: var(--snow); font-size: 12px; font-weight: 700; }
.trip-pack-toggle.packed { color: #fff; border-color: var(--green); background: var(--green); }
.trip-pack-toggle svg { width: 15px; height: 15px; }
.trip-check-copy strong, .trip-check-copy small { display: block; }
.trip-check-copy { min-width: 0; grid-area: copy; }
.trip-item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.trip-check-copy strong { font-size: 14px; }
.trip-check-copy small { margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.trip-check-copy p { margin: 5px 0 0; color: #82644f; font-size: 11px; line-height: 1.45; }
.trip-required-status { flex: none; padding: 4px 7px; color: var(--muted); border-radius: 20px; background: var(--snow); font-size: 10px; font-weight: 700; }
.trip-required-status.required { color: #a56231; background: #fbebdc; }
.trip-config-status { flex: none; padding: 4px 7px; color: #a56231; border-radius: 20px; background: #fbebdc; font-size: 11px; font-weight: 700; }
.trip-config-status.configured { color: var(--green); background: #e4f0e7; }
.trip-item-admin { align-items: center; gap: 5px; margin-left: auto; }
.trip-item-admin button { min-height: 26px; padding-inline: 7px; }
.trip-select-field { display: block; min-width: 0; grid-area: select; }
.trip-select-field > span, .trip-quantity-field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.trip-gear-select { width: 100%; min-height: 44px; padding: 0 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--snow); font-size: 12px; }
.trip-quantity-field { grid-area: quantity; align-self: end; }
.trip-quantity-stepper { display: grid; grid-template-columns: 34px 38px 34px; align-items: center; justify-content: end; min-height: 44px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--snow); }
.trip-quantity-stepper button { display: grid; place-items: center; height: 42px; padding: 0; cursor: pointer; color: var(--blue); border: 0; background: transparent; font-size: 20px; }
.trip-quantity-stepper button:hover:not(:disabled) { background: var(--ice-blue); }
.trip-quantity-stepper button:disabled { cursor: not-allowed; color: #b8c0c0; }
.trip-quantity-stepper strong { font-size: 14px; text-align: center; }
.trip-detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.trip-list-empty { display: grid; place-items: center; min-height: 280px; padding: 35px; text-align: center; border: 1px dashed #cbd8d6; border-radius: 18px; background: rgba(255,255,255,.55); }
.trip-list-empty span { font: 600 22px "STZhongsong", "Noto Serif SC", serif; }
.trip-list-empty p { margin: 8px 0 18px; color: var(--muted); font-size: 12px; }
.trip-structure-dialog { width: min(560px, calc(100% - 28px)); }
.trip-category-choice-list { display: grid; gap: 7px; max-height: 38vh; margin: 17px 0 4px; padding-right: 3px; overflow-y: auto; }
.trip-category-choice-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 5px; }
.trip-category-choice-head strong { font-size: 13px; }
.trip-category-choice-head span { color: var(--muted); font-size: 11px; }
.trip-category-choice-list label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 11px; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; background: var(--snow); }
.trip-category-choice-list label:has(input:checked) { border-color: #abc7ba; background: #f2f7f2; }
.trip-category-choice-list input { width: 18px; min-height: 18px; height: 18px; flex: none; padding: 0; accent-color: var(--green); }
.trip-category-choice-list label > span { display: flex; align-items: center; gap: 10px; margin: 0; }
.trip-category-choice-list label b { display: grid; place-items: center; width: 29px; height: 29px; color: var(--orange); border-radius: 9px; background: #fff0e6; font: 700 10px Georgia, serif; }
.trip-category-choice-list label strong { font-size: 13px; }
.trip-category-choice-empty { margin: 0; padding: 18px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.trip-item-system-name { margin: 16px 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--ice-blue); }
.trip-item-system-name span, .trip-item-system-name strong { display: block; }
.trip-item-system-name span { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.trip-item-system-name strong { color: var(--blue); font-size: 14px; }
.auth-dialog .trip-item-required { display: flex; align-items: center; gap: 9px; margin: 14px 0; cursor: pointer; }
.auth-dialog .trip-item-required input { width: 18px; min-height: 18px; height: 18px; flex: none; padding: 0; accent-color: var(--green); }
.auth-dialog .trip-item-required span { margin: 0; }
.category-add-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-top: 15px; }
.category-list { display: grid; gap: 7px; max-height: 36vh; margin-top: 10px; overflow-y: auto; }
.category-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--snow); }
.category-row span { font-size: 12px; }
.category-row button { padding: 5px 9px; cursor: pointer; color: var(--green); border: 0; border-radius: 8px; background: #e3efe6; font-size: 11px; }
.category-row.inactive { opacity: .58; }
.category-row.inactive button { color: var(--muted); background: #e5e9e6; }
.form-error { min-height: 18px; margin: 7px 0 3px; color: #b74736; font-size: 12px; }
.auth-dialog form > small { display: block; margin-top: 13px; color: #94a0a3; text-align: center; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; max-width: calc(100% - 30px); padding: 11px 16px; pointer-events: none; opacity: 0; color: white; border-radius: 10px; background: var(--deep-blue); box-shadow: 0 12px 30px rgba(13,42,54,.25); font-size: 13px; transform: translate(-50%, 12px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
  :root { --sidebar: 218px; }
  .main { padding-inline: 28px; }
  .systems-grid { grid-template-columns: repeat(3, 1fr); }
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .trip-grid { grid-template-columns: 1fr 1fr; }
  .settings-card.primary { grid-column: span 2; }
  .trip-system-items { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .sidebar { display: none; }
  .main { margin: 0; padding: 0 18px calc(95px + env(safe-area-inset-bottom)); }
  .topbar { height: 74px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; }
  .mobile-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .mobile-brand .brand-mark svg { width: 21px; height: 21px; }
  .mobile-brand strong { font: 600 16px "STZhongsong", "Noto Serif SC", serif; }
  .page-heading { display: none; }
  .admin-button { padding: 9px 12px; font-size: 13px; }
  .admin-button svg { width: 15px; height: 15px; }
  .bottom-nav { position: fixed; display: grid; grid-template-columns: repeat(4, 1fr); z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 7px; border: 1px solid rgba(255,255,255,.55); border-radius: 20px; background: rgba(255,254,250,.92); box-shadow: 0 15px 45px rgba(12,43,54,.18); backdrop-filter: blur(14px); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: #849196; border-radius: 13px; font-size: 11px; }
  .bottom-nav a svg { width: 20px; height: 20px; }
  .bottom-nav a.active { color: var(--deep-blue); background: var(--ice-blue); }
  .hero-grid { grid-template-columns: 1fr; }
  .trip-hero { min-height: 355px; padding: 30px 25px; }
  .hero-copy { max-width: 90%; }
  .hero-stats { left: 23px; right: auto; bottom: 23px; }
  .hero-mountain { width: 88%; height: 52%; }
  .readiness-card { min-height: 275px; }
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-card { min-height: 150px; }
  .page-intro { align-items: flex-start; margin-top: 10px; }
  .page-intro .button { flex: none; padding-inline: 12px; font-size: 0; }
  .page-intro .button svg { width: 18px; height: 18px; }
  .template-strip { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card.primary { grid-column: auto; }
  .trip-detail-shell { padding: 24px 20px 18px; }
  .trip-detail-head { grid-template-columns: 1fr; gap: 13px; padding: 0 40px 18px 0; }
  .trip-system-actions { grid-column: 1; justify-content: flex-start; }
  .trip-system-head { grid-template-columns: 1fr; }
  .trip-system-admin { justify-content: flex-end; padding: 0 14px 12px; }
  .trip-check-item { grid-template-columns: 62px minmax(0, 1fr) 112px; grid-template-areas: "visual copy pack" "select select quantity"; }
  .trip-item-visual { width: 62px; min-height: 62px; }
}

@media (max-width: 480px) {
  .main { padding-inline: 14px; }
  .setup-banner { align-items: flex-start; }
  .setup-banner p { display: none; }
  .setup-banner .button { flex: none; padding: 0 13px; font-size: 13px; }
  .trip-hero { min-height: 368px; border-radius: 23px; }
  .hero-copy h2 { font-size: 29px; }
  .hero-copy p { max-width: 260px; }
  .hero-stats { right: 18px; left: 18px; }
  .hero-stats div { flex: 1; min-width: 0; padding-inline: 10px; }
  .section-title { margin-top: 34px; }
  .section-title h2, .page-intro h2 { font-size: 24px; }
  .desktop-only { display: none; }
  .system-card { min-height: 145px; padding: 16px; }
  .system-card h3 { margin-top: 14px; font-size: 14px; }
  .system-card p { min-height: 26px; }
  .toolbar { padding: 10px; }
  .gear-system-toggle { grid-template-columns: 42px minmax(0, 1fr) 16px; gap: 10px; padding: 14px; }
  .gear-hierarchy-icon { width: 42px; height: 42px; border-radius: 13px; font-size: 17px; }
  .gear-hierarchy-copy strong { font-size: 18px; }
  .gear-system-summary { grid-column: 2 / -1; margin-top: -4px; white-space: normal; }
  .gear-system-toggle > svg { grid-column: 3; grid-row: 1; }
  .gear-system-body { gap: 8px; padding: 9px; }
  .gear-category-toggle { grid-template-columns: 36px minmax(0, 1fr) auto 15px; gap: 9px; padding: 12px 11px; }
  .gear-category-order { width: 36px; height: 32px; }
  .gear-category-toggle strong { font-size: 15px; }
  .gear-category-toggle > b { min-width: 40px; }
  .gear-category-body { padding: 0 9px 9px; }
  .gear-category-body .gear-grid { padding-top: 9px; }
  .gear-category-empty { align-items: flex-start; flex-direction: column; min-height: 0; padding: 13px; }
  .gear-grid { grid-template-columns: 1fr; }
  .view-switch { display: none; }
  .empty-state { min-height: 320px; }
  .template-strip { display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .template-strip article { min-width: 185px; }
  .about-card > span { display: none; }
  .auth-dialog form { padding: 30px 24px; }
  .gear-dialog form { padding: 28px 20px; }
  .gear-form-grid { grid-template-columns: 1fr; max-height: 52vh; }
  .gear-form-grid .full { grid-column: auto; }
  .trip-grid { grid-template-columns: 1fr; }
  .trip-card { min-height: 205px; }
  .trip-options { padding-top: 5px; }
  .trip-detail-shell { padding: 20px 14px 12px; }
  .trip-detail-head { gap: 11px; padding: 0 36px 15px 0; }
  .trip-detail-head h2 { font-size: 28px; }
  .trip-progress { grid-template-columns: 92px 1fr; }
  .trip-system-actions { flex-wrap: wrap; }
  .trip-checklist { margin: 12px 0; padding-right: 2px; }
  .trip-system-toggle { grid-template-columns: 38px minmax(0, 1fr) auto 16px; gap: 10px; padding: 13px 12px; }
  .trip-system-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
  .trip-system-copy strong { font-size: 16px; }
  .trip-system-copy small { font-size: 11px; line-height: 1.45; }
  .trip-system-count { min-width: 38px; font-size: 13px; }
  .trip-system-items { padding: 0 9px 9px; }
  .trip-check-item { grid-template-columns: 56px minmax(0, 1fr) 106px; gap: 12px 10px; min-height: 0; padding: 12px; }
  .trip-item-visual { width: 56px; min-height: 56px; }
  .trip-item-admin { width: 100%; margin-left: 0; }
  .trip-pack-toggle { min-width: 0; width: 100%; padding-inline: 7px; }
  .trip-quantity-stepper { grid-template-columns: 32px 40px 32px; }
  .trip-detail-actions { align-items: stretch; flex-direction: column-reverse; }
  .trip-detail-actions .button { width: 100%; }
  .category-add-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
