:root {
  color-scheme: light;
  --bg: #edf1f5;
  --surface: #ffffff;
  --surface-soft: #f5f7f9;
  --surface-raised: #ffffff;
  --ink: #1f252b;
  --muted: #66717c;
  --line: #cbd3dc;
  --line-strong: #8c98a5;
  --accent: #b95f21;
  --accent-strong: #8f4315;
  --accent-soft: #f7e1d1;
  --encumbered: #a23d57;
  --encumbered-soft: #f4dce3;
  --danger: #b12635;
  --success: #337549;
  --shadow: 0 14px 35px rgba(31, 37, 43, 0.12);
  --shadow-soft: 0 6px 18px rgba(31, 37, 43, 0.08);
  --radius: 16px;
  --armaments: #b9531f;
  --armaments-soft: #f7dfd2;
  --implements: #927116;
  --implements-soft: #f6ebbd;
  --tools: #3472a8;
  --tools-soft: #d9e9f7;
  --provisions: #3f7b4e;
  --provisions-soft: #dcecdf;
  --supplies: #7452a5;
  --supplies-soft: #e8def6;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14181d;
  --surface: #20262d;
  --surface-soft: #262e36;
  --surface-raised: #2b343d;
  --ink: #eef2f5;
  --muted: #aab4be;
  --line: #3d4853;
  --line-strong: #697684;
  --accent: #e07b38;
  --accent-strong: #f39a5b;
  --accent-soft: #4b2c1c;
  --encumbered: #e27b97;
  --encumbered-soft: #4a2630;
  --danger: #ff8390;
  --success: #8ac99a;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.24);
  --armaments: #ef8b52;
  --armaments-soft: #4a2a1e;
  --implements: #e3c057;
  --implements-soft: #43391f;
  --tools: #74afe0;
  --tools-soft: #243b4e;
  --provisions: #83c293;
  --provisions-soft: #294132;
  --supplies: #b596e2;
  --supplies-soft: #3b304c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 0;
}

.subtitle,
.zone-note {
  color: var(--muted);
}

.subtitle {
  margin-bottom: 0;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 44px) 18px;
}


.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
  min-width: 0;
  flex: 1 1 auto;
}

.header-copy {
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(240px, 22vw, 340px);
  max-width: 42vw;
  height: auto;
  margin: 0;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
.icon-button,
.item-chip button,
.menu button,
.menu-file,
.coin-stepper button {
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, opacity 120ms ease;
}

.button:hover,
.icon-button:hover,
.item-chip button:hover,
.menu button:hover,
.menu-file:hover,
.coin-stepper button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
.item-chip button:focus-visible,
select:focus-visible,
input:focus-visible,
.menu button:focus-visible,
.menu-file:focus-within,
.coin-stepper button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 14px;
}

.button-primary {
  background: var(--accent);
  color: white;
}

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

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button-danger {
  background: var(--danger);
  color: white;
}

.button-add {
  min-height: 36px;
  padding: 7px 11px;
  background: var(--ink);
  color: var(--surface);
  white-space: nowrap;
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.menu button,
.menu-file {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  background: transparent;
  text-align: left;
}

.menu-file input {
  display: none;
}

.danger-text {
  color: var(--danger) !important;
}

.app-shell {
  display: grid;
  gap: 18px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 44px) 52px;
}

.panel {
  padding: clamp(15px, 1.8vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.compact-heading {
  align-items: center;
}

.zone-heading>div:first-child {
  min-width: 0;
}

.summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-actions .autosave-status {
  margin: 0;
}

.container-zones {
  display: grid;
  gap: 18px;
}

.container-zone-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.container-zone-actions .button {
  min-height: 36px;
  padding: 7px 11px;
}

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

.container-stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.container-stat>span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.container-stat strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 1.55rem;
  line-height: 1;
}

.container-stat small {
  color: var(--muted);
  font-size: 0.88rem;
}

.container-stat p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.autosave-status,
.zone-note {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.autosave-status::before {
  content: "●";
  margin-right: 7px;
  color: var(--success);
}

.autosave-status.is-error {
  color: var(--danger);
}

.autosave-status.is-error::before {
  color: var(--danger);
}

.coin-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: min(100%, 760px);
  text-align: right;
}

.coin-total strong {
  font-size: 1.35rem;
  white-space: nowrap;
}

.coin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.coin-list {
  display: grid;
  gap: 8px;
}

.coin-row {
  --coin-color: var(--line-strong);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--coin-color);
  border-radius: 12px;
  background: var(--surface-soft);
}

.coin-bc {
  --coin-color: #988149;
}

.coin-cc {
  --coin-color: #c26027;
}

.coin-sc {
  --coin-color: #7f9bb8;
}

.coin-gc {
  --coin-color: #d39a22;
}

.coin-pc {
  --coin-color: #aeb7c0;
}

.coin-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.coin-code {
  min-width: 2.5rem;
  color: var(--coin-color);
  font-size: 1.05rem;
  font-weight: 900;
}

.coin-name {
  color: var(--muted);
  font-size: 0.88rem;
}

.coin-stepper {
  display: grid;
  grid-template-columns: 36px minmax(86px, 130px) 36px;
  gap: 6px;
  align-items: center;
}

.coin-stepper button {
  width: 36px;
  height: 36px;
  border-color: var(--line);
  background: var(--surface);
  font-size: 1.15rem;
}

.coin-stepper input {
  width: 100%;
  height: 36px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-weight: 800;
}

.coin-actions-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.coin-actions-card p {
  color: var(--muted);
}

.coin-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.coin-status {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 0.86rem;
}

.coin-status.is-success {
  color: var(--success);
}

.coin-status.is-error {
  color: var(--danger);
}

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

.stat-card {
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.stat-card>span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-card strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 1.75rem;
  line-height: 1;
}

.stat-card small {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stat-encumbered {
  border-top: 4px solid var(--encumbered);
}

.stat-card.is-active {
  background: var(--encumbered-soft);
  border-color: var(--encumbered);
}

.category-readout {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.category-stat {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.category-stat>span:first-child {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.category-stat strong {
  display: inline-flex;
  align-items: baseline;
  margin-top: 5px;
  font-size: 1.3rem;
  line-height: 1;
  white-space: nowrap;
}

.category-stat strong span {
  display: inline;
  color: inherit;
  font: inherit;
}

.category-stat.category-armaments {
  border-left: 4px solid var(--armaments);
}

.category-stat.category-implements {
  border-left: 4px solid var(--implements);
}

.category-stat.category-tools {
  border-left: 4px solid var(--tools);
}

.category-stat.category-provisions {
  border-left: 4px solid var(--provisions);
}

.category-stat.category-supplies {
  border-left: 4px solid var(--supplies);
}

.capacity-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.legend-title {
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.category-chip {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.category-armaments {
  background: var(--armaments-soft);
  color: var(--armaments);
}

.category-implements {
  background: var(--implements-soft);
  color: var(--implements);
}

.category-tools {
  background: var(--tools-soft);
  color: var(--tools);
}

.category-provisions {
  background: var(--provisions-soft);
  color: var(--provisions);
}

.category-supplies {
  background: var(--supplies-soft);
  color: var(--supplies);
}

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

.slot-card {
  --category-color: var(--line-strong);
  --category-soft: var(--surface-soft);
  position: relative;
  display: grid;
  grid-template-columns: minmax(132px, 0.7fr) minmax(180px, 3fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--category-color);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.slot-card.is-unassigned {
  border-left-color: var(--line);
  background: var(--surface-soft);
}

.slot-card.is-unassigned .slot-items {
  display: none;
}

.slot-card.is-unassigned .slot-settings {
  grid-column: 2 / 4;
  justify-content: flex-end;
}

.slot-card.is-unassigned .slot-category-label {
  width: min(100%, 360px);
}

.slot-card[data-category="armaments"] {
  --category-color: var(--armaments);
  --category-soft: var(--armaments-soft);
}

.slot-card[data-category="implements"] {
  --category-color: var(--implements);
  --category-soft: var(--implements-soft);
}

.slot-card[data-category="tools"] {
  --category-color: var(--tools);
  --category-soft: var(--tools-soft);
}

.slot-card[data-category="provisions"] {
  --category-color: var(--provisions);
  --category-soft: var(--provisions-soft);
}

.slot-card[data-category="supplies"] {
  --category-color: var(--supplies);
  --category-soft: var(--supplies-soft);
}

.slot-card.is-occupied {
  box-shadow: 0 7px 18px color-mix(in srgb, var(--category-color) 12%, transparent);
}

.slot-card.is-drop-target {
  border-color: var(--category-color);
  background: color-mix(in srgb, var(--category-soft) 62%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--category-color) 18%, transparent);
}

.slot-card.is-drop-invalid {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent);
}

.slot-identity {
  min-width: 0;
}

.slot-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.slot-name-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.slot-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--category-soft);
  color: var(--category-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.is-unassigned .slot-number {
  background: var(--surface);
  color: var(--muted);
}

.slot-title {
  font-size: 0.98rem;
}

.slot-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.slot-settings {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.slot-category-label {
  width: min(100%, 250px);
}

.slot-category {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

.slot-count {
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--category-soft);
  color: var(--category-color);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.capacity-bar {
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.capacity-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--category-color);
  transition: width 180ms ease;
}

.item-chip {
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--category-color) 45%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--category-soft) 68%, var(--surface));
  cursor: grab;
}

.item-chip:active {
  cursor: grabbing;
}

.item-chip.is-dragging {
  opacity: 0.42;
}

.item-chip button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.item-main {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
}

.item-main:hover {
  background: color-mix(in srgb, var(--category-color) 10%, transparent);
}

.item-quantity {
  flex: none;
  color: var(--category-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.item-name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}

.item-stepper {
  display: grid;
  grid-template-columns: 27px 27px;
  border-left: 1px solid color-mix(in srgb, var(--category-color) 32%, var(--line));
}

.item-stepper button,
.item-icon {
  width: 27px;
  min-width: 27px;
  padding: 0;
  font-size: 0.82rem;
}

.item-stepper button+button,
.item-icon {
  border-left: 1px solid color-mix(in srgb, var(--category-color) 25%, var(--line));
}

.item-icon {
  border-left: 1px solid color-mix(in srgb, var(--category-color) 25%, var(--line)) !important;
}

.app-dialog {
  width: min(94vw, 520px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.app-dialog-small {
  width: min(94vw, 430px);
}

.app-dialog::backdrop {
  background: rgba(8, 12, 16, 0.68);
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-body {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
}

.dialog-body label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.dialog-body input,
.dialog-body select {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px 20px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-color: var(--line);
  background: var(--surface);
  font-size: 1.45rem;
  line-height: 1;
}

.dialog-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.84rem;
}

.form-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 750;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1040px) {
  .category-readout {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .coin-layout {
    grid-template-columns: minmax(300px, 1fr) minmax(240px, 0.72fr);
  }
}

@media (max-width: 760px) {

  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding-top: 22px;
  }

  .header-brand {
    width: 100%;
  }

  .brand-logo {
    width: clamp(220px, 38vw, 310px);
    max-width: 46%;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-actions .button {
    flex: 1 1 auto;
  }

  .menu {
    left: 0;
    right: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .compact-heading {
    align-items: flex-start;
  }

  .summary-actions {
    width: 100%;
    justify-content: space-between;
  }

  .coin-total {
    justify-content: flex-start;
    text-align: left;
  }

  .coin-layout {
    grid-template-columns: 1fr;
  }

  .zone-readout {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .container-readout {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .slot-card {
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: start;
  }

  .slot-identity {
    grid-row: 1 / span 2;
    padding-top: 4px;
  }

  .slot-items {
    grid-column: 2;
  }

  .slot-settings {
    grid-column: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .slot-card.is-unassigned .slot-identity {
    grid-row: 1;
  }

  .slot-card.is-unassigned .slot-settings {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-content: flex-end;
  }
}

@media (max-width: 560px) {

  .panel {
    padding: 13px;
  }

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

  .coin-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .coin-stepper {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .coin-stepper button {
    width: 40px;
  }

  .slot-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .slot-identity {
    grid-row: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .slot-kicker {
    margin: 0;
    order: 2;
  }

  .slot-items,
  .slot-settings,
  .slot-card.is-unassigned .slot-settings {
    grid-column: 1;
    grid-row: auto;
  }

  .slot-settings {
    justify-content: stretch;
  }

  .slot-category-label,
  .slot-card.is-unassigned .slot-category-label {
    width: 100%;
  }

  .slot-count {
    flex: 1;
  }

  .button-add {
    flex: 1;
  }

  .item-name {
    max-width: 120px;
  }

  .summary-actions {
    align-items: stretch;
  }

  .summary-actions .button {
    flex: 1;
  }
}


@page {
  size: letter portrait;
  margin: 0.35in;
}

@media print {

  html,
  html[data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f4f4f4;
    --surface-raised: #ffffff;
    --ink: #111111;
    --muted: #555555;
    --line: #b7b7b7;
    --line-strong: #777777;
    --shadow: none;
    --shadow-soft: none;
  }

  body {
    min-width: 0;
    background: #ffffff !important;
    font-size: 9pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .app-header {
    max-width: none;
    padding: 0 0 12px;
  }

  .brand-logo {
    width: 300px;
    margin-bottom: 8px;
  }

  .header-actions,
  .coin-actions-card,
  .autosave-status,
  .summary-actions .button,
  .container-zone-actions,
  .button-add,
  .slot-category-label,
  .item-stepper,
  .item-icon,
  dialog {
    display: none !important;
  }

  .app-shell {
    max-width: none;
    padding: 0;
    gap: 12px;
  }

  .panel {
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    break-inside: avoid;
  }

  .section-heading {
    margin-bottom: 10px;
  }

  .coin-layout {
    grid-template-columns: 1fr;
  }

  .coin-row {
    padding: 5px 8px;
    background: #ffffff;
  }

  .coin-stepper {
    grid-template-columns: minmax(70px, 110px);
  }

  .coin-stepper button {
    display: none;
  }

  .coin-stepper input {
    border: 0;
    background: transparent;
    text-align: left;
  }

  .slot-list {
    gap: 5px;
  }

  .slot-card {
    min-height: 48px;
    padding: 7px 8px 9px;
    border-radius: 7px;
    box-shadow: none;
    break-inside: avoid;
  }

  .item-chip {
    cursor: default;
  }

  .item-main {
    padding: 4px 6px;
  }

  .capacity-legend {
    gap: 4px;
  }

  .category-chip {
    padding: 3px 6px;
  }
}

.slot-assignment {
  display: flex;
  justify-content: flex-end;
}

.slot-assignment select {
  margin-left: auto;
}
.home-logo-link{display:inline-flex;color:inherit;text-decoration:none}
.home-logo-link:focus-visible{outline:2px solid currentColor;outline-offset:4px;border-radius:4px}
