.market-list-callout { margin: 22px 0; padding: 16px; border: 1px solid #bdd0ad; border-radius: 14px; background: #edf3e4; }
.market-list-callout strong { font-size: 1.08rem; }
.market-list-callout p { margin: 4px 0 12px; }
.market-list-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 22px; }
.market-list-editor > summary { cursor: pointer; min-height: 44px; align-content: center; color: var(--olive); font-weight: 800; }
.market-list-editor > summary:focus-visible { outline: 3px solid #a44e2e; outline-offset: 3px; }
.list-editor-body { padding-top: 16px; }
.market-list-preview .list-export-actions { margin-top: 0; }
.market-list-preview .list-export-help { margin-bottom: 18px; }
.market-list-shortcut { position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; display: flex; justify-content: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fffdf8; border-top: 1px solid var(--line); box-shadow: 0 -3px 16px #342f2814; }
.market-list-shortcut[hidden] { display: none; }
.market-list-shortcut .button { min-height: 48px; }
body.has-list-shortcut { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.has-list-shortcut .list-copy-toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 520px) { .market-list-shortcut { gap: 8px; padding-left: 12px; padding-right: 12px; } .market-list-shortcut .button { flex: 1; min-width: 0; padding: 10px 8px; font-size: .875rem; } }
.market-list-editor, .market-list-preview { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; }
.market-list-editor h3, .market-list-preview h3 { margin: 0; font-size: 1.28rem; line-height: 1.25; }
.list-editor-head p, .list-preview-head p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.market-list-editor h4 { margin: 0 0 8px; font-size: .92rem; color: var(--olive); }
.market-list-editor label { display: grid; gap: 5px; font-size: .85rem; font-weight: 800; }
.market-list-editor input, .market-list-editor textarea, .market-list-editor select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #b9b09c; border-radius: 9px; background: var(--cream); color: var(--ink); font: inherit; font-weight: 600; }
.market-list-editor textarea { resize: vertical; min-height: 84px; }
.market-list-editor input:focus-visible, .market-list-editor textarea:focus-visible, .market-list-editor select:focus-visible, .list-paper-item input:focus-visible { outline: 3px solid #a44e2e; outline-offset: 2px; }
.list-budget { max-width: 210px; margin: 17px 0 7px; }
.list-editor-stall { padding: 14px 0; border-top: 1px dashed var(--line); }
.list-editor-item { display: grid; gap: 5px; padding: 9px 0; border-bottom: 1px solid #eee7d8; font-size: .89rem; }
.list-editor-item:last-child { border-bottom: 0; }
.list-editor-item span { color: var(--muted); }
.list-editor-item span button { width: 38px; height: 38px; margin-left: 5px; border: 1px solid #9aa285; border-radius: 8px; background: var(--cream); color: var(--olive); font-weight: 900; }
.list-editor-item label { margin-top: 5px; }
.list-editor-item .list-remove { justify-self: start; padding: 4px 0; border: 0; background: transparent; color: #884a31; text-decoration: underline; }
.list-custom-form { margin: 10px 0 20px; padding: 15px; border: 1px dashed #b9aa90; border-radius: 13px; background: #fbf7ed; }
.list-custom-fields { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 8px; margin-bottom: 10px; }
.list-custom-form > label { margin-bottom: 11px; }
.list-general-note { margin-bottom: 8px; }
.list-local-note { font-size: .83rem; color: var(--muted); line-height: 1.5; }
.list-preview-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.list-view-switch { display: inline-flex; padding: 4px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: #eee9dd; }
.list-view-switch button { padding: 7px 9px; min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 850; }
.list-view-switch button[aria-pressed="true"] { background: var(--cream); color: var(--ink); box-shadow: 0 2px 4px #d4c5a5; }
.market-list-paper { padding: 18px; border: 1px solid #d9cbb3; border-radius: 17px; background: var(--cream); box-shadow: 0 5px 0 #e9ddc7; }
.list-paper-brand { color: var(--olive); font-size: .82rem; font-weight: 900; }
.market-list-paper h3 { margin: 7px 0 2px; font-size: 1.43rem; }
.list-paper-meta { color: var(--muted); font-size: .86rem; }
.list-paper-note { padding: 11px; margin: 13px 0; border: 1px solid #e7c491; border-radius: 10px; background: #fff0db; }
.list-paper-note strong { color: #8d4b2d; font-size: .82rem; }
.list-paper-note p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; }
.list-paper-stall { margin-top: 16px; }
.list-paper-stall h4 { margin: 0 0 8px; color: var(--olive); font-size: .88rem; }
.list-paper-item { display: flex; align-items: flex-start; gap: 9px; min-height: 44px; margin-bottom: 7px; cursor: pointer; }
.list-paper-item input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--olive); }
.list-paper-item strong { display: block; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.list-paper-item small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.list-paper-item input:checked + span { color: #817b70; text-decoration: line-through; }
.list-paper-home { display: grid; gap: 2px; margin-top: 13px; padding: 9px 11px; border-radius: 10px; background: #e8efdf; font-size: .82rem; }
.list-paper-fine { margin: 15px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.list-export-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.list-export-actions [data-list-action="copy"] { min-width: 13em; }
.list-export-help { margin: 9px 0 0; color: var(--muted); font-size: .78rem; }
.list-export-actions .is-copied { background: #315337; border-color: #315337; color: #fffdf8; animation: list-copy-pop 220ms ease-out; }
.list-export-actions [aria-busy="true"] { cursor: progress; }
.list-copy-toast { position: fixed; z-index: 1000; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 10px); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 14px 18px; border-radius: 14px; background: #3f5036; color: #fffdf8; box-shadow: 0 4px 20px #342f2833; font-size: 1rem; line-height: 1.45; font-weight: 600; opacity: 0; pointer-events: none; }
.list-copy-toast.is-visible { opacity: 1; transform: translate(-50%, 0); animation: list-copy-in 200ms ease-out; }
.list-copy-tick { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; font-weight: 900; }
.list-copy-manual { flex-basis: 100%; padding: 14px; border: 1px solid #c29161; border-radius: 12px; background: #fff0db; }
.list-copy-manual[hidden] { display: none; }
.list-copy-manual label { font-weight: 800; }
.list-copy-manual p { margin: 6px 0 10px; font-size: 1rem; }
.list-copy-manual textarea { display: block; width: 100%; margin-bottom: 10px; padding: 12px; border: 1px solid #9b927f; border-radius: 8px; background: #fffdf8; color: #342f28; font: inherit; font-size: 16px; line-height: 1.5; resize: vertical; user-select: text; -webkit-user-select: text; }
@keyframes list-copy-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes list-copy-pop { 50% { transform: scale(1.025); } }
@media (prefers-reduced-motion: reduce) { .list-copy-toast.is-visible, .list-export-actions .is-copied { animation: none; } }
@media (max-width: 850px) { .market-list-layout { grid-template-columns: 1fr; } .list-custom-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .market-list-editor, .market-list-preview { padding: 14px; } .list-custom-fields { grid-template-columns: 1fr; } .list-export-actions .button { width: 100%; } }
@media print {
  .market-list-shortcut { display: none !important; }
  body.has-list-shortcut { padding-bottom: 0; }
  .list-copy-toast, .list-copy-manual { display: none !important; }
  @page { size: A4; margin: 17mm; }
  body { background: #fff !important; color: #252525; }
  .masthead, .intro, #meal-controls, #scene, #basket, footer, .footnote, .market-list-editor, .list-preview-head, .list-export-actions, .list-export-help, .game-content > h2, .game-content > p { display: none !important; }
  .wrap, .game-grid { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; }
  .game, .game-content, .market-list-preview, .market-list-paper { display: block !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .market-list-layout { display: block !important; margin: 0 !important; }
  .list-paper-item { break-inside: avoid; }
  .list-paper-item input { appearance: none; border: 1px solid #333; border-radius: 2px; }
  .list-paper-item input:checked::after { content: '✓'; position: relative; top: -5px; font-size: 20px; }
  .list-paper-note, .list-paper-home { print-color-adjust: exact; }
}


.list-image-dialog { width: min(620px, calc(100% - 24px)); max-height: 90dvh; box-sizing: border-box; overflow: auto; padding: 20px; border: 1px solid #d9cbb3; border-radius: 20px; background: #fffdf6; color: #342f28; }
.list-image-dialog::backdrop { background: #342f2880; }
.list-image-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-image-heading h2 { margin: 0; font-size: 1.4rem; }
.list-image-dialog p { font-size: 1rem; line-height: 1.5; }
.list-image-dialog .button { white-space: normal; }
.list-image-dialog [hidden] { display: none !important; }
.list-image-preview { display: block; width: 100%; height: auto; margin: 18px 0; -webkit-touch-callout: default; user-select: auto; }
@media print { .list-image-dialog { display: none !important; } }
.list-image-dialog [data-image-share] { display: block; width: 100%; padding: 14px 18px; border: 1px solid #3f5036; border-radius: 12px; background: #3f5036; color: #fffdf6; font: 800 1rem Raleway, sans-serif; cursor: pointer; }
.list-image-dialog [data-image-share]:disabled { opacity: .65; cursor: progress; }
