.wh { max-width: 1240px; margin: 0 auto; padding: 20px; color: #193a36; }
.wi { max-width: 780px; }
.wi fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.wi-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wi textarea { box-sizing: border-box; width: 100%; resize: vertical; border: 1px solid #b8c9c1; border-radius: 6px; padding: 12px; font: inherit; }
.wi fieldset > label { margin-top: 16px; }
.wi-photo { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin: 14px 0; object-fit: contain; }
.wi-photo-input { padding: 12px; background: #f1f7f4; border-radius: 8px; }
.wi-help, .wi-totals { color: #536864; font-size: 13px; }
.wi-success:not(:empty) { padding: 14px; background: #e2f7e9; border: 1px solid #8fc9a1; border-radius: 8px; font-weight: 700; }
.wi-check { display: flex !important; align-items: center; gap: 8px; }
.wi-entry { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid #d9e4df; padding: 16px 0; }
.wi-entry > img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.wi-entry > div { flex: 1 1 190px; min-width: 0; overflow-wrap: anywhere; }
.wi-entry p { margin: 5px 0; font-size: 13px; white-space: pre-wrap; }
@media (max-width: 600px) { .wi-fields { grid-template-columns: 1fr; } .wi [data-intake-form] > .wh-toolbar > button { width: 100%; min-height: 48px; } }
.wh-head, .wh-card-top, .wh-toolbar, .wh-tabs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wh-head, .wh-card-top { justify-content: space-between; }
.wh-head h2 { margin: 0; font-size: 24px; }
.wh-head p { color: #536864; }
.wh-tabs { margin: 20px 0; }
.wh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.wh-card { padding: 20px; border: 1px solid #d9e4df; border-radius: 12px; background: #fff; margin: 12px 0; min-width: 0; overflow-wrap: anywhere; }
.wh-card h3 { margin: 0 0 10px; font-size: 18px; }
.wh-card p { line-height: 1.5; }
.wh dl { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.wh dt { color: #61736b; font-size: 12px; }
.wh dd { margin: 5px 0 0; font-size: 23px; font-weight: 700; }
.wh label { display: grid; gap: 6px; min-width: 0; }
.wh label > span { font-size: 13px; color: #51675e; }
.wh input, .wh select { min-width: 0; max-width: 100%; width: 100%; border: 1px solid #b8c9c1; padding: 11px; border-radius: 6px; font: inherit; box-sizing: border-box; background: #fff; color: #193a36; }
.wh input[type=checkbox] { width: auto; }
.wh-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wh-form h3, .wh-form .wh-toolbar { grid-column: 1 / -1; }
.wh-pack-lines { display: grid; gap: 12px; margin: 18px 0; }
.wh-pack-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: #f4f7f5; border-radius: 8px; padding: 15px; }
.wh-pack-row > strong, .wh-pack-row > span { grid-column: 1 / -1; }
.wh-stock-line { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid #e5ece8; padding: 12px 0; }
.wh-error { color: #a02b20; white-space: pre-line; }
.wh-error:empty { display: none; }
.wh-warning { background: #fff2d7; color: #714b11; padding: 12px; border-radius: 6px; }
.wh form > .button, .wh form > label { margin-top: 12px; }
.wh summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.wh-prep-material { border-top: 1px solid #b8c9c1; padding: 10px 0; }
.wh-prep-material summary > span { margin-right: 12px; }
.wh-prep-material summary > strong { display: inline-block; }
.wh-prep-material summary > small { display: block; font-weight: 400; margin-top: 5px; }
.wh-prep-variant { padding: 8px 0 0 18px; }
.wh-prep-variant ul { margin: 6px 0; padding-left: 18px; }
.wh-prep-variant li { padding: 3px 0; }
@media (max-width: 600px) {
  .wh { padding: 12px 8px 90px; }
  .wh-head h2 { font-size: 21px; }
  .wh-card { padding: 15px; }
  .wh-toolbar > label { flex: 1 1 130px; }
  .wh-tabs { gap: 6px; }
  .wh-tabs .button { flex: 1 1 auto; min-height: 44px; }
  .wh-pack-row, .wh-form { grid-template-columns: minmax(0, 1fr); }
  .wh .button { white-space: normal; }
}

/* Pair foreground and surface colors: global dark text must not land on white cards. */
html[data-app-theme="dark"] .wh { color: #eaf3f6; }
html[data-app-theme="dark"] .wh :is(.wh-card,.wh-pack-row,.wi-photo-input) { background: #142b38; border-color: #466170; }
html[data-app-theme="dark"] .wh :is(h2,h3,strong,label > span,summary,dd) { color: #edf6f8; }
html[data-app-theme="dark"] .wh :is(p,dt,.wi-help,.wi-totals) { color: #bdd0d9; }
html[data-app-theme="dark"] .wh a { color: #83e2db; }
html[data-app-theme="dark"] .wh .wi-success { color: #d7ffe7; background: #164532; border-color: #56846a; }
html[data-app-theme="dark"] .wh .wh-warning { color: #ffe2aa; background: #493713; }
html[data-app-theme="dark"] .wh .wh-error { color: #ffbcb4; }
html[data-app-theme="dark"] .wh :is(input,textarea,select) { color: #edf6f8; background: #0e202c; border-color: #466170; }
html[data-app-theme="dark"] .wh .button.primary { color: #fff; }

.christmas-storage-house { grid-column: 1 / -1; min-width: 0; margin: 0; }
.christmas-storage-house > a > img { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; }
.christmas-storage-house figcaption { font-size: 12px; margin: 6px 0; color: #445c68; }
html[data-app-theme="dark"] .christmas-storage-relabel { color: #edf6f8; }
html[data-app-theme="dark"] .christmas-storage-relabel :is(.christmas-storage-relabel-summary,.christmas-storage-relabel-active,.christmas-storage-review-detail,.christmas-storage-relabel-upcoming,.christmas-storage-relabel-upcoming-row,.christmas-storage-relabel-loading,.christmas-storage-relabel-load-error,.christmas-storage-relabel-blocked,.christmas-storage-relabel-complete) { background: #142b38; border-color: #466170; }
html[data-app-theme="dark"] .christmas-storage-relabel :is(.christmas-storage-contents,.christmas-storage-review-reason,.christmas-storage-relabel-upcoming > header) { background: #1b3643; border-color: #466170; }
html[data-app-theme="dark"] .christmas-storage-relabel :is(.christmas-storage-relabel-review,.christmas-storage-review-next,.christmas-storage-relabel-confirm) { background: #493713; border-color: #8c7645; }
html[data-app-theme="dark"] .christmas-storage-relabel :is(strong,b,h3,h4,label,span,p,em,small,figcaption) { color: #e5f0f4; }
html[data-app-theme="dark"] .christmas-storage-relabel .button.primary { color: #fff; }
html[data-app-theme="dark"] .christmas-storage-relabel-upcoming-row:hover { background: #204451; }

@media (max-width: 600px) {
  .christmas-storage-relabel-head { grid-template-columns: minmax(0, 1fr); }
  .christmas-storage-relabel-head-actions { justify-content: flex-start; }
  .christmas-storage-relabel-head a[data-storage-intake-link] { width: auto; min-width: 0; padding: 10px 12px; }
}
