:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-2: #eef4ef;
  --text: #1d2721;
  --muted: #627067;
  --border: #dce5dd;
  --primary: #2f6f4f;
  --primary-dark: #24573f;
  --accent: #d97c37;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(29, 39, 33, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 0.96rem;
  color: var(--muted);
  text-transform: uppercase;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 4vw, 44px);
  background: rgba(246, 248, 245, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
}

.nav {
  color: var(--muted);
  font-size: 0.95rem;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page.compact {
  width: min(900px, calc(100% - 32px));
}

.auth {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 70px);
  padding: 24px;
}

.panel,
.trip-card,
.progress-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(18px, 4vw, 34px);
}

.panel.narrow {
  width: min(560px, 100%);
}

.hero,
.trip-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding: clamp(24px, 5vw, 54px) 0;
}

.hero p,
.trip-header p,
.muted {
  color: var(--muted);
}

.hero p {
  max-width: 680px;
  font-size: 1.12rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 15px;
  font-weight: 750;
  cursor: pointer;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

.button.ghost {
  background: var(--surface-2);
}

.button.danger {
  border-color: #f2b8af;
  background: #fff0ed;
  color: var(--danger);
}

.button.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.span {
  grid-column: 1 / -1;
}

.stack {
  display: grid;
  gap: 18px;
}

.flash {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #e9f6ee;
  color: var(--primary-dark);
}

.flash.error {
  background: #fff0ed;
  color: var(--danger);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.trip-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.trip-card-cover,
.trip-cover {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #dfe7e1;
}

.trip-card-cover {
  aspect-ratio: 16 / 7;
}

.trip-cover {
  margin-bottom: 12px;
  aspect-ratio: 16 / 6;
}

.trip-title-hero {
  display: flex;
  align-items: end;
  min-height: 120px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background-color: #4c6254;
  background-position: center;
  background-size: cover;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.trip-title-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 19, 14, 0.2), rgba(12, 19, 14, 0.55));
}

.trip-title-hero h1 {
  position: relative;
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 4.8vw, 2.1rem);
  line-height: 1.12;
}

.trip-card-cover img,
.trip-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(29, 39, 33, 0.12);
}

.trip-card h3 {
  margin-bottom: 4px;
  color: var(--text);
  text-transform: none;
  font-size: 1.2rem;
}

.trip-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-row span,
.trip-meta span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 5px 9px;
}

.countdown-pill,
.countdown-box {
  border: 1px solid #b9d8c5;
  border-radius: var(--radius);
  background: #e4f3e9;
  color: var(--primary-dark);
}

.countdown-pill {
  display: grid;
  gap: 1px;
  padding: 10px 12px;
}

.countdown-pill strong,
.countdown-box strong {
  font-size: 1rem;
  line-height: 1.15;
}

.countdown-pill span,
.countdown-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.countdown-pill.today,
.countdown-box.today {
  border-color: var(--accent);
  background: #fff1d8;
  color: #8c4a16;
}

.countdown-pill.past,
.countdown-box.past {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e7ede8;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.empty {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.chip input {
  position: absolute;
  opacity: 0;
}

.chip span {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 12px;
  font-weight: 750;
}

.chip input:checked + span {
  border-color: var(--primary);
  background: #e5f3ea;
}

.chip.disabled span {
  background: #f4f7f4;
  color: var(--muted);
  opacity: 0.72;
}

.chip-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.participant-list {
  display: grid;
  gap: 10px;
}

.participant-row {
  display: grid;
  grid-template-columns: 1fr 180px 44px;
  gap: 10px;
}

.icon-button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
}

.progress-box {
  min-width: 250px;
  padding: 18px;
}

.progress-box strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.countdown-box {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.countdown-box strong {
  font-size: 1.15rem;
}

.toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
}

.trip-edit {
  margin-top: 14px;
}

.trip-edit > summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 820;
  list-style: none;
}

.trip-edit > summary::-webkit-details-marker {
  display: none;
}

.trip-edit-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.trip-delete-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #f2b8af;
  border-radius: var(--radius);
  background: #fffafa;
}

.augment-blocks {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.augment-blocks > summary,
.other-category-add > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  color: var(--primary-dark);
  font-weight: 820;
  font-size: 0.9rem;
}

.augment-blocks > summary::-webkit-details-marker,
.other-category-add > summary::-webkit-details-marker {
  display: none;
}

.augment-blocks > summary::before {
  content: none;
}

.augment-blocks > summary span,
.other-category-add > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e4f3e9;
  color: var(--primary-dark);
}

.augment-block-form {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.filters,
.add-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto 38px;
  gap: 7px;
  align-items: center;
}

.search-input {
  min-height: 36px;
}

.filters select {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.9rem;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
}

.packed-toggle {
  width: auto;
  min-width: 102px;
  padding: 0 10px;
  font-size: 0.76rem;
  letter-spacing: 0;
}

.icon-action:hover,
.icon-action.is-showing {
  border-color: var(--primary);
  background: #e4f3e9;
  color: var(--primary-dark);
}

.search-empty {
  margin-bottom: 4px;
}

.add-form {
  grid-template-columns: 2fr 0.7fr 1fr 1fr auto auto;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.calm-toggle {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.status-error {
  display: none;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #f2b8af;
  border-radius: var(--radius);
  background: #fff0ed;
  color: var(--danger);
  font-weight: 750;
}

.status-error.visible {
  display: block;
}

.packlist {
  display: grid;
  gap: 28px;
}

.sticky-current-bar {
  position: sticky;
  top: 76px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0 0 -14px;
  padding: 9px 12px;
  border: 1px solid #b9d8c5;
  border-radius: var(--radius);
  background: #e4f3e9;
  color: var(--primary-dark);
}

.sticky-current-bar strong::after {
  content: "·";
  margin-left: 8px;
  color: var(--muted);
}

.owner-group {
  display: grid;
  gap: 14px;
}

.owner-group > h2 {
  position: relative;
  margin: 10px 0 0;
  padding: 8px 0 2px;
  font-size: 1.55rem;
}

.category-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.category-group {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 26px rgba(29, 39, 33, 0.05);
  scroll-margin-top: 0;
}

.category-group > summary {
  position: relative;
  top: auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  border-radius: 7px 7px 0 0;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-weight: 820;
  transition: none;
}

.category-group.is-current {
  border-color: #b9d8c5;
}

.category-group.is-current > summary {
  border-color: #b9d8c5;
  background: #e4f3e9;
  color: var(--primary-dark);
}

.category-group > summary::-webkit-details-marker {
  display: none;
}

.category-group > summary::before {
  content: "▾";
  color: var(--muted);
  font-size: 0.9rem;
}

.category-group:not([open]) > summary::before {
  content: "▸";
}

.category-group > summary .sticky-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sticky-label strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-label strong::after {
  content: "·";
  margin-left: 8px;
  color: var(--muted);
  font-weight: 800;
}

.sticky-label span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-group > summary small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 2px 8px;
  font-size: 0.8rem;
}

.category-items {
  display: grid;
  gap: 1px;
  padding: 0 8px 8px;
}

.inline-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  padding: 5px 0 0;
}

.inline-add-form input[name="name"] {
  min-height: 34px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.78);
  padding: 6px 9px;
  font-size: 0.9rem;
}

.inline-add-form .button {
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  font-size: 1.05rem;
}

.other-category-add {
  margin-top: 4px;
  padding: 10px 8px 0;
}

.other-category-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 1fr auto;
  gap: 8px;
  padding-top: 8px;
}

.other-category-form select,
.other-category-form input,
.other-category-form .button {
  min-height: 40px;
}

.pack-item {
  display: grid;
  grid-template-columns: 44px 1fr 40px;
  gap: 4px;
  align-items: stretch;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--surface);
  overflow: visible;
  transition: opacity 180ms ease, background 180ms ease, border-color 180ms ease, max-height 240ms ease, margin 240ms ease, padding 240ms ease;
}

.pack-item.status-packed {
  background: #eef7f1;
  opacity: 0.76;
}

.pack-item.pending-hide {
  background: #e4f3e9;
  border-color: #bad9c4;
  opacity: 1;
}

.pack-item.collapsing {
  overflow: hidden;
  max-height: 0 !important;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.pack-item.status-staged {
  background: #fff7e8;
  border-color: #efd4a3;
}

.pack-item[hidden] {
  display: none;
}

.quick-status-form {
  margin: 0;
}

.status-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 6px;
  cursor: pointer;
}

.status-button:hover {
  background: rgba(47, 111, 79, 0.07);
}

.status-button[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.status-dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.status-staged .status-dot {
  border-color: var(--accent);
  background: #fff1d8;
  color: #9a531b;
}

.status-packed .status-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.item-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.item-main {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 7px 6px;
  text-align: left;
  cursor: pointer;
}

.item-main:hover {
  background: rgba(29, 39, 33, 0.04);
}

.item-name {
  font-weight: 780;
  overflow-wrap: anywhere;
}

.item-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.item-menu-button {
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 900;
}

.item-menu-button:hover,
.item-menu-button.is-open {
  background: rgba(29, 39, 33, 0.06);
}

.item-action-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin: 0 8px 8px 52px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(29, 39, 33, 0.1);
}

.item-action-panel[hidden] {
  display: none;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.auto-quantity-toggle {
  grid-column: 1 / -1;
}

.auto-quantity-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.edit-form input[readonly] {
  background: #f4f7f4;
  color: var(--muted);
}

.text-danger {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-weight: 750;
}

.packed-feedback {
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 780;
}

.completion-message {
  display: none;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #bad9c4;
  border-radius: var(--radius);
  background: #e4f3e9;
  color: var(--primary-dark);
  font-weight: 820;
}

.completion-message.visible {
  display: block;
}

.settings-form,
.settings-categories {
  display: grid;
  gap: 16px;
}

.settings-backup {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.backup-import-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.mode-form {
  display: grid;
  gap: 10px;
}

.mode-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.mode-option input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.mode-option span {
  display: grid;
  gap: 2px;
}

.mode-option small {
  color: var(--muted);
}

.settings-category {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.settings-category textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}

.settings-category textarea[readonly] {
  background: #f7faf7;
  color: var(--muted);
}

.block-overview-section {
  align-items: start;
}

.block-overview {
  display: grid;
  gap: 10px;
}

.block-overview-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.block-overview-card summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
}

.block-overview-card summary span {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.block-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 14px 14px;
  list-style: none;
}

.block-overview-card li {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.block-overview-card li small {
  color: var(--muted);
}

.category-delete-button {
  justify-self: start;
}

.category-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-actions form {
  margin: 0;
}

.print-page {
  background: #fff;
  color: #111;
  counter-reset: page;
}

.print-page main {
  width: min(900px, calc(100% - 40px));
  margin: 32px auto;
  padding-bottom: 44px;
}

.print-mode {
  margin-bottom: 14px;
  color: #444;
  font-size: 0.95rem;
}

.print-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.print-actions a {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 6px 10px;
  font-size: 0.86rem;
  color: #333;
}

.print-owner {
  margin: 0 0 16px;
}

.print-category {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-category h3 {
  margin-bottom: 8px;
  color: #222;
  text-transform: none;
  font-size: 1rem;
}

.print-list {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.print-list li {
  break-inside: avoid;
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.print-item-name {
  flex: 1;
}

.print-list li small {
  color: #444;
}

.print-list li.is-packed .print-item-name {
  text-decoration: line-through;
  color: #666;
}

.print-list li.is-packed .box {
  background: #111;
  color: #fff;
}

.print-list li.is-staged .box {
  color: #444;
}

.box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border: 1px solid #111;
  font-size: 10px;
  line-height: 1;
}

.print-footer {
  display: none;
}

@media (max-width: 800px) {
  .topbar,
  .hero,
  .trip-header,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .hero,
  .trip-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trip-cover {
    aspect-ratio: 16 / 8;
  }

  .trip-title-hero {
    min-height: 98px;
    padding: 10px 12px;
  }

  .nav {
    justify-content: space-between;
  }

  .form-grid,
  .add-form,
  .edit-form,
  .participant-row {
    grid-template-columns: 1fr;
  }

  .auto-quantity-fields {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr auto 36px;
  }

  .search-input {
    grid-column: auto;
  }

  .progress-box {
    min-width: 0;
  }

  .category-groups {
    grid-template-columns: 1fr;
  }

  .pack-item {
    grid-template-columns: 42px 1fr 38px;
    min-height: 52px;
  }

.item-menu-button {
    width: 38px;
    min-height: 52px;
  }

  .item-action-panel {
    margin: 0 5px 7px;
    padding: 8px;
  }

  .status-button,
  .item-main {
    min-height: 52px;
  }

  .status-dot {
    width: 34px;
    height: 34px;
  }

  .owner-group > h2 {
    padding: 6px 0 2px;
    font-size: 1.25rem;
  }

  .sticky-current-bar {
    top: 74px;
    min-height: 40px;
    padding: 8px 10px;
  }

  .category-group > summary {
    top: auto;
    min-height: 42px;
    padding: 9px 11px;
  }

  .category-group > summary .sticky-label {
    gap: 6px;
  }

  .sticky-label strong::after {
    margin-left: 6px;
  }

  .category-items {
    padding: 0 5px 5px;
  }

  .inline-add-form {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 5px;
    padding-top: 5px;
  }

  .inline-add-form input[name="name"],
  .inline-add-form .button {
    min-height: 34px;
  }

  .other-category-form {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .backup-import-form {
    grid-template-columns: 1fr;
  }

  .other-category-add {
    padding: 8px 5px 0;
  }

  .item-name {
    font-size: 0.96rem;
  }

  .item-meta,
  .packed-feedback {
    font-size: 0.8rem;
  }
}

@media (max-width: 430px) {
  .page {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
  }

  .toolbar {
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .filters {
    grid-template-columns: 1fr auto 36px;
  }

  .search-input {
    grid-column: auto;
  }

  .packed-toggle {
    min-height: 40px;
    min-width: 92px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .packlist {
    gap: 18px;
  }

  .sticky-current-bar {
    top: 72px;
    margin-bottom: -10px;
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.92rem;
  }

  .category-group > summary {
    top: auto;
  }
}

.import-debug {
  width: 100%;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7faf7;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media print {
  .topbar,
  .button,
  .print-actions {
    display: none !important;
  }

  body {
    background: #fff;
  }

  h1 {
    font-size: 30px;
  }

  .print-footer {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 6mm;
    text-align: center;
    font-size: 11px;
    color: #555;
  }

  .print-footer .page-num::after {
    content: counter(page);
  }

  .print-footer .page-total::after {
    content: counter(pages);
  }
}
