:root {
  color-scheme: light;
  --navy: #08345f;
  --navy-2: #0a2442;
  --ink: #10273d;
  --muted: #587086;
  --line: rgba(18, 93, 135, .2);
  --paper: #f6fbff;
  --white: #fff;
  --aqua: #00bcd4;
  --aqua-dark: #007da8;
  --blueberry: #2678e6;
  --grape: #8352cb;
  --tangerine: #ff8a1e;
  --lime: #73bd25;
  --strawberry: #e9477d;
  --yellow: #ffd84d;
  --shadow: 0 16px 42px rgba(8, 52, 95, .14), 0 3px 10px rgba(8, 52, 95, .1);
  --shadow-soft: 0 8px 20px rgba(8, 52, 95, .1);
  --radius: 24px;
  --radius-sm: 16px;
  --sidebar: 258px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eaf7ff; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 188, 212, .16), transparent 35%),
    radial-gradient(circle at 94% 12%, rgba(131, 82, 203, .12), transparent 28%),
    linear-gradient(180deg, #f8fdff 0%, #edf8ff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 4px solid rgba(255, 138, 30, .45);
  outline-offset: 3px;
}
.skip-link { position: fixed; z-index: 9999; top: 8px; left: 8px; padding: 12px 18px; border-radius: 12px; background: var(--navy); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); padding: 20px 14px;
  color: white; background:
    linear-gradient(145deg, rgba(255,255,255,.13), transparent 30%),
    linear-gradient(180deg, #0e6391 0%, #084b78 48%, #072f57 100%);
  border-right: 1px solid rgba(255,255,255,.28); box-shadow: 8px 0 30px rgba(8,52,95,.14);
  display: flex; flex-direction: column;
}
.sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(255,255,255,.12), transparent 18%, transparent 78%, rgba(0,0,0,.08)); }
.brand { position: relative; z-index: 1; width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: white; text-align: left; padding: 4px 8px 18px; }
.brand img { width: 52px; height: 52px; border-radius: 17px; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 19px; letter-spacing: -.3px; }
.brand small { margin-top: 2px; opacity: .77; font-size: 12px; text-transform: uppercase; letter-spacing: .13em; }
.nav-list { position: relative; z-index: 1; display: grid; gap: 6px; }
.nav-item { min-height: 50px; border: 1px solid transparent; border-radius: 15px; background: transparent; color: rgba(255,255,255,.82); display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 9px 12px; text-align: left; font-weight: 700; }
.nav-item:hover { background: rgba(255,255,255,.1); color: white; }
.nav-item.active { color: var(--navy); background: linear-gradient(#fff, #cceeff); border-color: white; box-shadow: inset 0 1px rgba(255,255,255,.9), 0 5px 12px rgba(0,0,0,.18); }
.nav-icon { font-size: 24px; text-align: center; }
.nav-badge { min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--tangerine); color: white; font-size: 12px; }
.sidebar-footer { position: relative; z-index: 1; margin-top: auto; display: grid; gap: 8px; }
.storage-chip { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: rgba(0,0,0,.15); border: 1px solid rgba(255,255,255,.18); border-radius: 15px; }
.storage-chip strong, .storage-chip small { display: block; }
.storage-chip strong { font-size: 12px; }
.storage-chip small { margin-top: 3px; font-size: 11px; opacity: .72; }
.status-dot { width: 10px; height: 10px; flex: 0 0 auto; margin-top: 3px; border-radius: 50%; background: #8dea34; box-shadow: 0 0 0 4px rgba(141,234,52,.15), 0 0 10px rgba(141,234,52,.7); }
.quiet-button { min-height: 42px; border-radius: 13px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.09); color: inherit; padding: 10px 14px; font-weight: 700; }
.quiet-button:hover { background: rgba(255,255,255,.17); }
.file-button { display: grid; place-items: center; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

main { margin-left: var(--sidebar); padding: 34px clamp(24px, 4vw, 58px) 70px; min-height: 100vh; }
.view { display: none; max-width: 1420px; margin: 0 auto; }
.view.active { display: block; animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.mobile-header, .bottom-nav { display: none; }
.eyebrow { display: block; color: var(--aqua-dark); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: var(--navy); font-size: clamp(32px, 4vw, 50px); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; color: var(--navy); font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -.035em; }
h3 { color: var(--navy); font-size: 20px; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.55; }

.aqua-panel {
  position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.9); border-radius: 32px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.98), rgba(255,255,255,.18) 28%, transparent 29%),
    linear-gradient(135deg, rgba(219,250,255,.95), rgba(150,232,255,.78) 42%, rgba(147,197,255,.82));
  box-shadow: var(--shadow), inset 0 2px 1px rgba(255,255,255,.9), inset 0 -2px 6px rgba(0,97,145,.12);
}
.hero { min-height: 330px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); align-items: center; gap: 28px; padding: clamp(28px, 5vw, 58px); }
.hero::after { content: ""; position: absolute; width: 350px; height: 350px; right: -100px; bottom: -180px; border-radius: 50%; background: rgba(131,82,203,.17); filter: blur(1px); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy p { max-width: 690px; color: #315d76; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.candy-button { min-height: 50px; border: 2px solid rgba(8,52,95,.45); border-radius: 999px; padding: 12px 24px; font-weight: 900; color: white; letter-spacing: -.01em; box-shadow: inset 0 2px 1px rgba(255,255,255,.78), inset 0 -5px 9px rgba(0,44,90,.18), 0 7px 16px rgba(8,52,95,.18); text-shadow: 0 1px rgba(0,0,0,.18); transition: transform .16s ease, filter .16s ease; }
.candy-button:hover { filter: saturate(1.1) brightness(1.04); transform: translateY(-1px); }
.candy-button:active { transform: translateY(1px); box-shadow: inset 0 3px 7px rgba(0,0,0,.18); }
.candy-button.primary { background: linear-gradient(#74ecff 0%, #00c5eb 36%, #0878d9 100%); }
.candy-button.secondary { background: linear-gradient(#bda4ff 0%, #8b62e8 40%, #6130b0 100%); }
.candy-button:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .48; transform: none; }
.mascot-card { position: relative; z-index: 2; align-self: stretch; min-height: 245px; border: 1px solid rgba(255,255,255,.84); border-radius: 26px; background: rgba(255,255,255,.36); box-shadow: inset 0 1px rgba(255,255,255,.9), 0 12px 30px rgba(8,52,95,.12); overflow: hidden; padding: 0; color: var(--navy); }
.mascot-card img { width: 100%; height: 245px; object-fit: cover; object-position: center 30%; display: block; }
.mascot-card span { position: absolute; left: 14px; right: 14px; bottom: 13px; padding: 11px 15px; border-radius: 16px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); text-align: left; box-shadow: 0 5px 14px rgba(8,52,95,.14); }
.mascot-card strong, .mascot-card small { display: block; }
.mascot-card small { margin-top: 3px; color: var(--muted); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 42px 0 17px; }
.section-heading h2 { margin-bottom: 0; }
.task-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.task-card { position: relative; min-height: 155px; grid-column: span 2; display: grid; grid-template-columns: 50px 1fr 20px; align-items: start; gap: 13px; border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius); color: white; text-align: left; padding: 22px; box-shadow: var(--shadow-soft), inset 0 2px rgba(255,255,255,.55), inset 0 -5px 10px rgba(0,0,0,.12); text-shadow: 0 1px rgba(0,0,0,.16); overflow: hidden; }
.task-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,.36), transparent 35%); pointer-events: none; }
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.task-card strong, .task-card small { position: relative; z-index: 1; display: block; }
.task-card strong { font-size: 18px; line-height: 1.15; }
.task-card small { margin-top: 8px; color: rgba(255,255,255,.88); line-height: 1.35; font-size: 13px; }
.task-symbol { position: relative; z-index: 1; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.24); box-shadow: inset 0 1px rgba(255,255,255,.55); font-size: 27px; }
.task-card .arrow { position: relative; z-index: 1; font-size: 30px; line-height: 1; }
.blueberry { background: linear-gradient(145deg, #66bdff, #2678e6 55%, #1552b6); }
.tangerine { background: linear-gradient(145deg, #ffc14d, #ff8a1e 55%, #e25e0c); }
.grape { background: linear-gradient(145deg, #c299ff, #8352cb 55%, #5f2ca6); }
.lime { background: linear-gradient(145deg, #b9ef55, #73bd25 55%, #428e16); }
.strawberry { background: linear-gradient(145deg, #ff91b9, #e9477d 55%, #b92359); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.glass-card { border: 1px solid rgba(17,100,147,.18); border-radius: var(--radius); background: rgba(255,255,255,.78); backdrop-filter: blur(18px); box-shadow: var(--shadow-soft), inset 0 1px rgba(255,255,255,.9); }
.dashboard-grid .glass-card { padding: 24px; }
.card-title { display: flex; justify-content: space-between; align-items: start; }
.card-title h3 { margin-bottom: 4px; }
.orb-icon { width: 44px; height: 44px; display: grid; place-items: center; color: white; font-size: 22px; border-radius: 50%; background: linear-gradient(#8df4ff, #069fce 70%); border: 2px solid white; box-shadow: 0 5px 12px rgba(8,52,95,.2), inset 0 2px rgba(255,255,255,.7); }
.lime-orb { background: linear-gradient(#c9ff72, #68ad20 70%); }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-row div { padding-right: 12px; border-right: 1px solid var(--line); }
.metric-row div:last-child { border: 0; }
.metric-row strong, .metric-row span { display: block; }
.metric-row strong { color: var(--navy); font-size: 29px; }
.metric-row span { color: var(--muted); font-size: 12px; line-height: 1.25; }
.progress-track { height: 12px; overflow: hidden; border-radius: 999px; background: #d9eaf3; box-shadow: inset 0 2px 4px rgba(8,52,95,.13); }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #83da31, #d5f95b); box-shadow: inset 0 1px rgba(255,255,255,.7); transition: width .25s ease; }
.text-link { padding: 12px 0 0; border: 0; background: transparent; color: var(--aqua-dark); font-weight: 900; }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.page-header p { margin: 0; max-width: 780px; }
.page-header h1 { font-size: clamp(32px, 4vw, 46px); }
.toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) 220px 210px; gap: 14px; padding: 16px; }
label > span, .search-field > span:first-child, .select-field > span { display: block; margin-bottom: 7px; color: var(--navy); font-size: 12px; font-weight: 900; }
input, select { width: 100%; min-height: 48px; border: 1px solid rgba(9,93,142,.3); border-radius: 14px; background: rgba(255,255,255,.92); color: var(--ink); padding: 11px 13px; box-shadow: inset 0 2px 4px rgba(8,52,95,.07); }
.search-field { position: relative; }
.search-field input { padding-right: 46px; }
.search-glyph { position: absolute; right: 15px; bottom: 12px; color: var(--aqua-dark); font-size: 23px; }
.result-summary { min-height: 24px; margin: 16px 4px 9px; color: var(--muted); font-size: 13px; }
.product-list { display: grid; gap: 9px; }
.product-row { display: grid; grid-template-columns: 90px minmax(220px, 1.4fr) minmax(140px, .7fr) minmax(160px, .8fr) minmax(130px, .65fr) 90px 44px; align-items: center; gap: 13px; min-height: 70px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.84); box-shadow: 0 4px 12px rgba(8,52,95,.06); }
.product-row:hover { border-color: rgba(0,164,200,.5); box-shadow: 0 7px 18px rgba(8,52,95,.1); }
.product-id { color: var(--aqua-dark); font-weight: 900; }
.product-name strong, .product-name small { display: block; }
.product-name small, .product-meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.price { color: var(--navy); font-weight: 900; }
.warning-pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 7px; border-radius: 999px; color: #8b2a0c; background: #ffe2c8; font-size: 11px; font-weight: 800; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(#fff, #dff3ff); color: var(--navy); font-size: 23px; font-weight: 800; }
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state > span { display: block; font-size: 55px; color: var(--aqua); }

.safety-badge, .autosave-badge { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 10px 14px; color: #286b14; background: #eafbd9; border: 1px solid #b5df86; border-radius: 999px; font-weight: 800; font-size: 13px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: var(--shadow-soft); margin-bottom: 18px; }
.segmented button { min-height: 42px; border: 0; border-radius: 14px; padding: 8px 18px; background: transparent; color: var(--muted); font-weight: 900; }
.segmented button.active { color: white; background: linear-gradient(#9befff, #00a9d1 55%, #0878b7); box-shadow: inset 0 2px rgba(255,255,255,.75), 0 4px 9px rgba(8,52,95,.2); }
.print-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.print-controls { padding: 24px; }
.print-controls h2 { font-size: 25px; }
.picker-list { max-height: 520px; overflow: auto; display: grid; gap: 8px; margin-top: 16px; padding-right: 5px; }
.picker-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: #f9fdff; }
.picker-item strong, .picker-item small { display: block; }
.picker-item small { margin-top: 3px; color: var(--muted); }
.picker-item button { min-width: 78px; min-height: 40px; border: 1px solid #58b7d1; border-radius: 999px; background: linear-gradient(#fff, #cdefff); color: var(--aqua-dark); font-weight: 900; }
.picker-item button.selected { color: white; background: linear-gradient(#abf264, #66af1e); border-color: #4f8f15; }
.print-summary { position: sticky; top: 24px; padding: 27px; }
.print-summary h2 { font-size: 28px; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid rgba(8,94,145,.18); color: var(--navy); font-size: 12px; font-weight: 800; }
.chip button { border: 0; background: transparent; color: var(--muted); font-size: 16px; padding: 0; }
.print-button { width: 100%; min-height: 62px; background: linear-gradient(#fff09a 0%, #ffc336 35%, #ff851b 100%); border-color: #b75508; font-size: 18px; }
.button-note { display: block; margin-top: 9px; color: #315d76; text-align: center; line-height: 1.35; }
.print-sheet { display: none; }

.count-setup { display: grid; grid-template-columns: 190px minmax(220px, 1fr) auto; gap: 14px; align-items: end; padding: 17px; }
.count-location { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: #edf7fc; }
.count-location button { min-height: 44px; border: 0; border-radius: 12px; padding: 8px 15px; color: var(--muted); background: transparent; font-weight: 900; }
.count-location button.active { color: white; background: linear-gradient(#c7a7ff, #8050cb); box-shadow: inset 0 2px rgba(255,255,255,.6), 0 4px 8px rgba(8,52,95,.15); }
.count-progress { padding: 16px 20px; margin: 14px 0; }
.count-progress > div:first-child { display: flex; justify-content: space-between; color: var(--navy); font-weight: 800; margin-bottom: 9px; }
.shelf-jump { display: flex; overflow-x: auto; gap: 8px; padding: 2px 1px 12px; }
.shelf-jump button { flex: 0 0 auto; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: rgba(255,255,255,.86); color: var(--navy); font-weight: 800; }
.count-list { display: grid; gap: 16px; }
.shelf-group { scroll-margin-top: 20px; }
.shelf-heading { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 16px 16px 0 0; color: white; background: linear-gradient(100deg, #0d6a98, #00a6c6); box-shadow: inset 0 2px rgba(255,255,255,.35); }
.shelf-heading h2 { margin: 0; color: white; font-size: 20px; }
.shelf-heading span { font-size: 12px; opacity: .9; }
.count-item { display: grid; grid-template-columns: 90px minmax(220px, 1fr) 180px; align-items: center; gap: 14px; padding: 11px 16px; border: 1px solid var(--line); border-top: 0; background: rgba(255,255,255,.87); }
.count-item:last-child { border-radius: 0 0 16px 16px; }
.count-item strong, .count-item small { display: block; }
.count-item small { margin-top: 3px; color: var(--muted); }
.count-input-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.count-input-wrap input { min-height: 46px; background: #fff8c9; font-weight: 900; text-align: center; }
.clear-count { width: 38px; height: 38px; border: 0; border-radius: 12px; background: #edf5f9; color: var(--muted); }

.reconcile-summary { display: grid; grid-template-columns: repeat(3, minmax(140px, 220px)); gap: 12px; margin-bottom: 18px; }
.mini-stat { position: relative; overflow: hidden; padding: 16px 19px; border-radius: 19px; color: white; box-shadow: var(--shadow-soft), inset 0 2px rgba(255,255,255,.45); }
.mini-stat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(140deg, rgba(255,255,255,.34), transparent 45%); }
.mini-stat span, .mini-stat strong { position: relative; z-index: 1; display: block; }
.mini-stat span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.mini-stat strong { margin-top: 3px; font-size: 30px; }
.mini-stat.matched { background: linear-gradient(135deg, #9de552, #56a91e); }
.mini-stat.attention { background: linear-gradient(135deg, #ffbd55, #ee7218); }
.mini-stat.open { background: linear-gradient(135deg, #b491ff, #7141bc); }
.reconcile-search { max-width: 620px; margin-bottom: 14px; }
.reconcile-list { display: grid; gap: 8px; }
.reconcile-row { display: grid; grid-template-columns: 78px minmax(220px, 1fr) 110px 130px 100px 150px; align-items: center; gap: 12px; min-height: 68px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.85); }
.reconcile-row strong, .reconcile-row small { display: block; }
.reconcile-row small { color: var(--muted); margin-top: 2px; }
.reconcile-row input { min-height: 44px; background: #fff8c9; text-align: center; font-weight: 900; }
.status-pill { display: inline-flex; justify-content: center; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.status-pill.matched { color: #2f7215; background: #e1f7d2; }
.status-pill.difference { color: #9a360b; background: #ffe1ca; }
.status-pill.open { color: #5d3e80; background: #eee4ff; }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(5,34,62,.54); backdrop-filter: blur(7px); }
.aqua-dialog { width: min(700px, calc(100vw - 28px)); border-radius: 28px; background: #f6fcff; box-shadow: 0 30px 80px rgba(0,25,55,.35), inset 0 2px white; }
.aqua-dialog form { padding: 26px; }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; }
.dialog-header h2 { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dialog-actions .quiet-button { color: var(--navy); border-color: var(--line); background: white; }
.pip-dialog { width: min(860px, calc(100vw - 24px)); max-height: min(860px, calc(100vh - 30px)); overflow: auto; border-radius: 30px; background: #f9fdff; box-shadow: 0 35px 90px rgba(0,25,55,.4); }
.pip-story-hero { position: relative; height: 330px; overflow: hidden; background: #09bad0; }
.pip-story-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 31%; }
.pip-story-hero .icon-button { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.9); }
.pip-story-copy { padding: 28px; }
.pip-story-copy h2 { font-size: 36px; }
.story-moral { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin: 23px 0; padding: 17px; border-radius: 18px; background: linear-gradient(135deg, #fff4c9, #ffd686); border: 1px solid #ffbc3c; }
.story-moral > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(#ffe974, #ff941f); font-size: 22px; box-shadow: inset 0 2px rgba(255,255,255,.65); }
.story-moral p { margin: 0; color: #704b13; }
.comic-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comic-teaser div { min-height: 120px; padding: 14px; border-radius: 17px; color: white; background: linear-gradient(145deg, #36d3df, #5c45c9); box-shadow: inset 0 2px rgba(255,255,255,.45); }
.comic-teaser div:nth-child(2) { background: linear-gradient(145deg, #ffae38, #ee4d82); }
.comic-teaser div:nth-child(3) { background: linear-gradient(145deg, #92db38, #00a7c7); }
.comic-teaser span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.22); font-weight: 900; }
.comic-teaser strong { display: block; margin-top: 18px; line-height: 1.2; }
.coming-soon { margin: 11px 0 0; font-size: 13px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 26px; transform: translate(-50%, 160%); opacity: 0; padding: 12px 18px; border-radius: 999px; color: white; background: rgba(8,52,95,.96); box-shadow: var(--shadow); font-weight: 800; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1100px) {
  .task-card { grid-column: span 3; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar .search-field { grid-column: 1 / -1; }
  .product-row { grid-template-columns: 75px minmax(220px, 1fr) 140px 44px; }
  .product-row .hide-tablet { display: none; }
  .print-layout { grid-template-columns: 1fr 330px; }
  .reconcile-row { grid-template-columns: 70px minmax(200px, 1fr) 95px 115px 130px; }
  .reconcile-row .part-column { display: none; }
}

@media (max-width: 820px) {
  body { padding-bottom: 82px; }
  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 8px 14px; color: white; background: linear-gradient(180deg, rgba(11,100,145,.97), rgba(5,66,109,.97)); backdrop-filter: blur(18px); box-shadow: 0 5px 20px rgba(8,52,95,.15); }
  .brand.compact { width: auto; padding: 0; }
  .brand.compact img { width: 46px; height: 46px; border-radius: 15px; }
  .brand.compact strong { font-size: 16px; }
  .brand.compact small { font-size: 9px; }
  .pip-peek { width: 47px; height: 47px; border: 2px solid rgba(255,255,255,.8); border-radius: 16px; padding: 0; overflow: hidden; background: white; }
  .pip-peek img { width: 100%; height: 100%; object-fit: cover; }
  main { margin: 0; padding: 20px 14px 30px; }
  .bottom-nav { position: fixed; z-index: 25; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px; border: 1px solid rgba(255,255,255,.75); border-radius: 23px; color: white; background: rgba(7,67,110,.94); backdrop-filter: blur(20px); box-shadow: 0 8px 28px rgba(0,25,55,.32), inset 0 1px rgba(255,255,255,.25); }
  .bottom-nav button { min-width: 0; min-height: 56px; border: 0; border-radius: 17px; background: transparent; color: rgba(255,255,255,.72); display: grid; place-content: center; gap: 2px; }
  .bottom-nav button.active { color: var(--navy); background: linear-gradient(#fff, #bfeeff); box-shadow: inset 0 1px white, 0 4px 10px rgba(0,0,0,.2); }
  .bottom-nav span { font-size: 22px; line-height: 1; }
  .bottom-nav small { font-size: 10px; font-weight: 800; }
  .view, .hero, .hero-copy, .task-grid, .task-card, .dashboard-grid { min-width: 0; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 25px; }
  .hero h1 { font-size: 38px; }
  .mascot-card { min-height: 210px; }
  .mascot-card img { height: 245px; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card { grid-column: auto; min-height: 128px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar .search-field { grid-column: auto; }
  .product-row { grid-template-columns: 65px 1fr 42px; align-items: start; }
  .product-row .mobile-detail { grid-column: 2; }
  .product-row .hide-mobile { display: none; }
  .print-layout { grid-template-columns: 1fr; }
  .print-summary { position: static; }
  .count-setup { grid-template-columns: 1fr; }
  .count-location { display: grid; grid-template-columns: 1fr 1fr; }
  .count-item { grid-template-columns: 68px 1fr; }
  .count-input-wrap { grid-column: 2; width: min(230px, 100%); }
  .reconcile-summary { grid-template-columns: repeat(3, 1fr); }
  .reconcile-row { grid-template-columns: 65px 1fr 100px; }
  .reconcile-row .part-column, .reconcile-row .counted-column { display: none; }
  .reconcile-row .status-pill { grid-column: 2 / -1; justify-self: start; }
  .comic-teaser { grid-template-columns: 1fr; }
  .pip-story-hero { height: 260px; }
}

@media (max-width: 480px) {
  .hero-actions { display: grid; }
  .candy-button { width: 100%; }
  .metric-row { gap: 8px; }
  .metric-row strong { font-size: 23px; }
  .reconcile-summary { gap: 7px; }
  .mini-stat { padding: 12px; }
  .mini-stat span { font-size: 9px; }
  .mini-stat strong { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
}

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

@media print {
  @page { margin: .5in; }
  body { background: white; padding: 0; }
  body * { visibility: hidden !important; }
  #print-sheet, #print-sheet * { visibility: visible !important; }
  #print-sheet { display: grid !important; position: absolute; inset: 0; width: 100%; color: black; background: white; }
  .print-sheet.shelf-mode { grid-template-columns: repeat(2, 1fr); gap: .15in; }
  .print-sheet.upc-mode { grid-template-columns: repeat(3, 1fr); grid-auto-rows: .95in; gap: 0 .12in; }
  .label-card { break-inside: avoid; display: grid; align-content: center; text-align: center; border: 1px solid #bbb; padding: .12in; }
  .label-card strong { font-size: 13pt; }
  .label-card .barcode { font-family: monospace; font-size: 18pt; letter-spacing: -2px; transform: scaleY(1.35); margin: .08in 0; }
  .label-card small { font-size: 9pt; }
  .shelf-mode .label-card { min-height: 1.35in; }
}
