/* Local OFL fonts; provenance, licenses and subset recipe: fonts/README.md. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000, U+0020-007E, U+00A0-00AC, U+00AE-00FF, U+011E-011F, U+0130-0131, U+015E-015F, U+2002, U+2009, U+200B, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2191, U+2193-2194, U+2197, U+2199, U+2212, U+FEFF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323;
}
@font-face {
  font-family: Gelasio;
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("fonts/gelasio-latin.woff2") format("woff2");
  unicode-range: U+000D, U+0020-007E, U+00A0-00AC, U+00AE-00FF, U+011E-011F, U+0130-0131, U+015E-015F, U+2002, U+2009, U+200B, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2191, U+2193-2194, U+2197, U+2199, U+2212, U+2215;
}
@font-face {
  font-family: Gelasio;
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("fonts/gelasio-latin-ext.woff2") format("woff2");
  unicode-range: U+0102, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329;
}
/* Match x-height and vertical metrics to the bundled faces. optional prevents
   late swaps on slow connections; preloads give the Latin faces an early start. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 105.2731%;
  ascent-override: 92.0226%;
  descent-override: 22.9129%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Gelasio Fallback";
  src: local("Georgia");
  size-adjust: 100%;
  ascent-override: 92.7734%;
  descent-override: 34.1797%;
  line-gap-override: 0%;
}
/* Saminido product family v1. Product accents and composition remain local. */
:root {
  --family-paper: #faf6ee;
  --family-ink: #22372e;
  --family-muted: #536057;
  --family-sans: Inter, "Inter Fallback", system-ui, sans-serif;
  --family-serif: Gelasio, "Gelasio Fallback", Georgia, serif;
  --family-body: 17px;
  --family-support: 14px;
  --family-caption: 12px;
  --family-control: 44px;
}

/* END SAMINIDO PRODUCT FAMILY V1 */
:root {
  --paper: var(--family-paper); --table: #e9e6da; --ink: #303b2b;
  --muted: #59604f; --olive: #69754e; --coral: #b96043; --line: #d0d2c2;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--family-sans); }
button, input, select { font: inherit; color: inherit; }
button, label, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
input, select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #aeb69e; border-radius: 6px; background: #fffdf6; font-size: 16px; }
input::placeholder { color: #68705e; }
:focus-visible { outline: 3px solid #ae4c2b; outline-offset: 3px; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 99; top: 12px; left: 12px; padding: 12px; background: white; }
.topbar, main { max-width: 1600px; margin: auto; padding-left: 4%; padding-right: 4%; }
.topbar { display: flex; align-items: center; gap: 24px; padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font: 700 25px/1.2 var(--family-serif); letter-spacing: -.7px; }
.brand-mark { width: 32px; height: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-8deg); flex-shrink: 0; }
.brand-mark i { background: var(--olive); border: 1px solid #52603a; border-radius: 4px; }
.brand-mark i:first-child { grid-row: span 2; background: var(--ink); }
.brand-mark i:last-child { background: var(--coral); border-color: var(--coral); }
.catalog-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-underline-offset: 4px; white-space: nowrap; }
.file-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.button:hover { background: #dce2cf; }
.button--quiet, .button--text { background: transparent; }
.button--outline { border: 1px solid #a0a78f; background: transparent; }
.button--primary, .button--dark { background: var(--ink); color: var(--paper); }
.button--primary:hover, .button--dark:hover { background: #485337; }
.button--wide { width: 100%; justify-content: space-between; }
.button[hidden] { display: none; }
.button--danger { color: #80422f; }
.import-label { position: relative; cursor: pointer; }
.import-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.import-label:focus-within { outline: 3px solid #ae4c2b; outline-offset: 3px; }
.intro { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 24px 0; }
.intro h2 { font: 400 clamp(25px, 2.4vw, 34px)/1.2 var(--family-serif); letter-spacing: -.7px; }
.intro h2 em { color: var(--olive); }
.intro p { font-size: 14px; color: var(--muted); }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px; }
.packing { min-width: 0; padding: 20px; border: 1px solid #deddd0; border-radius: 12px; background: var(--table) radial-gradient(#bdbead45 .65px, transparent .65px); background-size: 5px 5px; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.table-heading h2 { font: 400 26px/1.2 var(--family-serif); letter-spacing: -.5px; }
.table-tools { margin: 16px 0 20px; }
.table-tools p { margin-top: 10px; font-size: 14px; color: var(--muted); }
.table-tools strong { font-weight: 600; }
.filters { display: flex; gap: 10px; }
.search-field { flex: 1; min-width: 0; }
.filters > label:last-child { width: 145px; }
.filters select { font-size: 14px; }
.bag-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px 18px; }
.bag-card { --bag: #717b56; --bag-dark: #525d3d; --lining: #cbd0b7; min-width: 0; position: relative; padding-top: 16px; }
.bag-card:nth-child(3n+2) { --bag: #a8684e; --bag-dark: #815039; --lining: #e6cbb5; }
.bag-card:nth-child(3n) { --bag: #627b7a; --bag-dark: #435a5d; --lining: #c3d4d0; }
.bag-handle { position: absolute; top: 0; left: calc(50% - 35px); width: 70px; height: 22px; border: 7px solid var(--bag-dark); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: inset 1px 1px 2px #0003; }
.bag-card__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; padding: 16px 14px 19px; border: 1px solid var(--bag-dark); border-radius: 23px 23px 7px 7px; background: var(--bag-dark); color: #fffdf3; box-shadow: inset 0 0 0 5px #ffffff16, 0 5px 6px #343e291c; }
.bag-card__header::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 7px; border-bottom: 1px dashed #ffffff65; pointer-events: none; }
.bag-card__title-wrap { min-width: 0; }
.bag-card__title { font: 400 27px/1.15 var(--family-serif); letter-spacing: -.5px; overflow-wrap: anywhere; }
.bag-card__meta { margin-top: 6px; font-size: 14px; }
.bag-card__header .button { color: #fffdf3; flex: 0 0 48px; padding: 4px; font-size: 14px; }
.bag-card__header .button:hover { background: #0002; }
.bag-card__items { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; margin-top: 7px; padding: 14px 10px; border: 8px solid var(--bag); border-radius: 8px 8px 23px 23px; background: var(--lining); box-shadow: inset 0 0 0 2px var(--bag-dark), inset 0 0 0 5px #ffffff30, 4px 8px 14px #38412720, 1px 3px 0 var(--bag-dark); }
.bag-card__items::before { content: ''; pointer-events: none; position: absolute; inset: 8px; border: 1px dashed var(--bag-dark); border-radius: 4px 4px 12px 12px; opacity: .35; }
.bag-card--drop .bag-card__items { outline: 3px solid #c76c40; outline-offset: 5px; }
.bag-card__footer { margin: 12px 5px 0; font-size: 14px; color: var(--muted); }
.bag-card--empty .bag-card__footer { display: none; }
.item-card { display: grid; grid-template-columns: 60px minmax(0, 1fr); position: relative; min-width: 0; border: 1px solid #a3a98b; border-radius: 8px; background: #f9f6eb; box-shadow: 2px 3px 0 #48523819; cursor: grab; }
.item-card--dragging { opacity: .4; }
.item-card__art { display: flex; align-items: center; justify-content: center; padding: 6px; background: #edeadf; border-radius: 7px 0 0 0; }
.item-card__art svg { width: 52px; height: 60px; filter: drop-shadow(2px 3px 1px #343e291b); transform: rotate(-5deg); }
.item-card:nth-child(even) .item-card__art svg { transform: rotate(5deg); }
.item-card__top { min-width: 0; padding: 12px 10px 8px; }
.item-card__name { font-size: 16px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.item-card__weight { margin-top: 5px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.item-card__controls { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 4px 8px; grid-column: 1 / -1; padding: 4px 10px 10px; }
.check-control { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.check-control input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; padding: 0; margin: 0; accent-color: var(--olive); cursor: pointer; }
.remove-item { grid-column: 2; grid-row: 1; min-width: 44px; padding: 0; font-size: 25px; font-weight: 400; }
.move-control { position: relative; min-width: 0; grid-column: 1 / -1; grid-row: 2; }
.move-icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); pointer-events: none; }
.move-control select { min-height: 44px; padding: 8px 24px 8px 36px; font-size: 14px; background: #f0efe5; }
.item-card--packed .item-card__art { background: #dce4cd; }
.empty-scene { display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 10px 8px; }
.empty-scene svg { width: 160px; max-width: 100%; height: 100px; filter: drop-shadow(3px 5px 2px #32392315); }
.empty-state { max-width: 260px; font-size: 16px; color: #404b32; }
.empty-add { margin-top: 8px; }
.packing-slip { position: relative; padding: 24px; background: #fffdf6; border-top: 4px solid var(--ink); box-shadow: 3px 5px 14px #363b2920; transform: rotate(.4deg); }
.packing-slip::after { content: ''; position: absolute; bottom: -8px; left: 0; right: 0; height: 8px; background: linear-gradient(135deg, #fffdf6 25%, transparent 25%) -8px 0, linear-gradient(225deg, #fffdf6 25%, transparent 25%) -8px 0; background-size: 16px 16px; }
.slip-header { display: flex; align-items: center; justify-content: space-between; }
.slip-header > span:last-child { font-size: 28px; }
.eyebrow { font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: 1px; }
.weight-readout { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.weight-readout strong { font: 400 44px/1.1 var(--family-serif); letter-spacing: -1.5px; }
.weight-readout > span { margin-left: auto; font-size: 14px; color: var(--muted); }
.slip-stats { display: flex; gap: 20px; margin-top: 10px; font-size: 14px; }
.trip-details { margin-top: 20px; }
.weight-distribution { display: flex; gap: 3px; height: 8px; margin-top: 20px; border-radius: 3px; overflow: hidden; background: #e4e5d9; }
.weight-segment { height: 100%; min-width: 0; background: var(--olive); }
.weight-segment:nth-child(3n+2) { background: #a8684e; }
.weight-segment:nth-child(3n) { background: #627b7a; }
.weight-legend { display: grid; gap: 8px; margin: 12px 0 0; font-size: 14px; }
.weight-legend > div { display: flex; align-items: baseline; gap: 8px; }
.weight-legend > div::before { content: ''; width: 8px; height: 8px; flex-shrink: 0; background: var(--olive); }
.weight-legend > div:nth-child(3n+2)::before { background: #a8684e; }
.weight-legend > div:nth-child(3n)::before { background: #627b7a; }
.weight-legend dt { overflow-wrap: anywhere; min-width: 0; }
.weight-legend dd { margin: 0 0 0 auto; white-space: nowrap; font-weight: 400; }
.packed-line { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; font-size: 14px; }
progress { appearance: none; display: block; width: 100%; height: 5px; margin-top: 8px; border: 0; background: #e4e5d9; }
progress::-webkit-progress-bar { background: #e4e5d9; }
progress::-webkit-progress-value { background: var(--olive); }
progress::-moz-progress-bar { background: var(--olive); }
.item-entry, .bag-entry { border-top: 1px dashed #b5bba6; margin-top: 24px; padding-top: 22px; }
.item-entry h2, .bag-entry h2 { font: 400 27px/1.2 var(--family-serif); letter-spacing: -.4px; margin: 8px 0 18px; }
.item-entry .eyebrow { display: none; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; }
.field-row { display: grid; grid-template-columns: .75fr 1fr; gap: 12px; }
.bag-entry h2 { font-size: 23px; margin-top: 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.privacy-note { font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 24px; }
footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px 0; margin-top: 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-brand { font: italic 24px var(--family-serif); color: var(--ink); }
.toast { margin-top: 18px; padding: 12px 14px; border-radius: 6px; background: #dce2cf; font-size: 14px; }
.toast:empty { display: none; }
.toast--error { background: #f1dbce; color: #773822; }
.mobile-dock { display: none; }
#item-name, #packing-heading { scroll-margin-top: 24px; }
@media (max-width: 1200px) {
  .workbench { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
  .packing { padding: 16px; }
  .bag-board { grid-template-columns: 1fr; }
  .item-card { grid-template-columns: 64px minmax(0, 1fr); }
  .item-card__controls { grid-template-columns: auto minmax(0, 1fr) 44px; }
  .move-control { grid-column: 2; grid-row: 1; }
  .remove-item { grid-column: 3; }
  .intro p { display: none; }
}
@media (max-width: 850px) {
  body { padding-bottom: 80px; }
  .topbar { flex-wrap: wrap; gap: 8px 16px; }
  .brand { flex: 1; }
  .file-actions { margin-left: 0; }
  .workbench { display: flex; flex-direction: column; gap: 0; }
  .packing-slip, .summary { display: contents; }
  .packing-slip::after { display: none; }
  .slip-header { order: 2; width: 100%; margin-top: 24px; padding: 16px 20px 0; border-top: 3px solid var(--ink); background: #fffdf6; }
  .trip-overview { order: 0; width: 100%; padding: 12px 16px 16px; margin-bottom: 16px; background: #fffdf6; border-top: 3px solid var(--ink); }
  .trip-details { order: 3; width: 100%; padding: 0 20px 20px; margin-top: 0; background: #fffdf6; }
  .weight-readout { margin-top: 4px; }
  .weight-readout strong { font-size: 36px; }
  .weight-distribution { margin-top: 14px; }
  .weight-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
  .packed-line { margin-top: 10px; }
  .packing { order: 1; width: 100%; }
  .item-entry { order: 4; }
  .bag-entry { order: 5; }
  .privacy-note { order: 6; }
  .item-entry, .bag-entry, .privacy-note { width: 100%; padding: 22px; background: #fffdf6; }
  .item-entry { margin-top: 0; }
  .bag-entry { margin-top: 0; }
  .privacy-note { margin-top: 0; border-bottom: 1px dashed #b5bba6; }
  .mobile-dock { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; padding: 10px 4% max(10px, env(safe-area-inset-bottom)); border-top: 1px solid #bdc5ae; background: #f8f6ee; box-shadow: 0 -4px 15px #303b2b12; }
  .mobile-dock > a:first-child { display: flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
}
@media (max-width: 540px) {
  .topbar, main { padding-left: 16px; padding-right: 16px; }
  .brand h1 { font-size: 23px; }
  .brand-mark { width: 26px; height: 28px; }
  .brand { gap: 8px; }
  .topbar .catalog-link { font-size: 14px; }
  .file-actions { width: 100%; gap: 12px; }
  .file-actions .button { flex: 1; }
  .intro { display: none; }
  .workbench { margin-top: 16px; }
  .slip-header { padding: 12px 16px 0; }
  .weight-legend { grid-template-columns: 1fr; }
  .packing { padding: 14px 10px; }
  .table-heading { gap: 10px; }
  .table-heading h2 { font-size: 25px; }
  .table-heading .button { padding-left: 10px; padding-right: 10px; }
  .table-tools { margin: 12px 0 14px; }
  .filters { gap: 8px; }
  .filters > label:last-child { width: 125px; }
  .filters input { padding-left: 10px; }
  .bag-card__header { padding-left: 12px; padding-right: 12px; }
  .bag-card__items { padding: 12px 8px; border-width: 7px; }
  .bag-card__title { font-size: 26px; }
  .item-card__controls { grid-template-columns: minmax(0, 1fr) 44px; gap: 4px 8px; }
  .move-control { grid-column: 1 / -1; grid-row: 2; }
  .remove-item { grid-column: 2; }
  .item-card__top { padding-left: 8px; }
  .empty-scene svg { height: 84px; width: 140px; }
  .item-entry, .bag-entry, .privacy-note { padding: 20px; }
  footer { margin-top: 28px; }
}
@media (max-width: 360px) {
  .brand-mark { display: none; }
  .brand h1 { font-size: 22px; }
  .topbar { column-gap: 8px; }
  .weight-readout { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.storage-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; padding: 12px 14px; border: 1px solid #b5bea5; border-radius: 6px; background: #e5ebda; font-size: 14px; }
.storage-notice p { flex: 1 1 220px; }
.storage-notice--error { background: #f1dbce; border-color: #ad765e; color: #653321; }

/* Allow longer translated labels to wrap without shrinking the touch targets. */
.topbar { flex-wrap: wrap; }
.button { overflow-wrap: anywhere; }
#language-button { flex-shrink: 0; }
.filters > label:last-child { width: 155px; flex-shrink: 0; }
.check-control { white-space: normal; }
.bag-card__header .button { flex-basis: 76px; overflow-wrap: normal; }
@media (max-width: 540px) {
  .topbar { gap: 8px 12px; }
  .topbar .catalog-link { order: 2; }
  .file-actions { order: 3; flex-wrap: wrap; }
  .file-actions .button { min-width: 0; }
  .filters > label:last-child { width: 145px; }
}
