.lists-page { max-width: 780px; margin: 0 auto; color: var(--st-ink); }
.lists-page h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); overflow-wrap: anywhere; }
.lists-page h2 { font-size: 1.2rem; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .5rem 0 1rem; }
.list-heading .btn { flex-shrink: 0; }
.list-heading-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.list-type { color: var(--st-muted); font-size: .85rem; }
.list-panel, .list-composer { padding: 1rem; border: 1px solid var(--st-line); background: var(--st-paper); border-radius: .8rem; margin: 1rem 0; }
.list-overview { display: grid; gap: .75rem; }
.list-overview .list-panel { margin: 0; }
.list-link { display: grid; grid-template-columns: 1fr auto; gap: .4rem; text-decoration: none; color: inherit; }
.list-link strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.list-link .list-type { grid-column: 1 / -1; }
.lists-page input { width: 100%; min-height: 48px; border: 1px solid var(--st-input-line); background: var(--st-paper); color: var(--st-ink); border-radius: .5rem; padding: .6rem .7rem; font-size: 16px; }
.lists-page label { font-weight: 650; margin-bottom: .3rem; }
.lists-page label span { font-weight: normal; }
.list-create, .list-rename { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.list-create label, .list-rename label { width: 100%; }
.list-create input, .list-rename input { flex: 1; min-width: 160px; }
.list-composer form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: end; }
.list-name-field { grid-column: 1 / -1; position: relative; }
.list-quantity-field { min-width: 0; }
.list-composer .btn { min-height: 48px; }
.list-entry-status { grid-column: 1 / -1; margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.list-entry-status:empty { display: none; }
.list-suggestions { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; padding: .2rem; margin: .2rem 0 0; list-style: none; background: var(--st-paper); border: 1px solid var(--st-input-line); border-radius: .5rem; max-height: 210px; overflow-y: auto; box-shadow: 0 6px 20px #0002; }
.list-suggestions li { min-height: 48px; padding: .55rem .7rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .5rem; cursor: pointer; }
.list-suggestions small { color: var(--st-muted); }
.list-suggestions li[aria-selected="true"], .list-suggestions li:hover { background: var(--st-bg); outline: 2px solid var(--st-primary); outline-offset: -2px; border-radius: .3rem; }
.list-notice { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .6rem .8rem; border-radius: .6rem; border: 1px solid var(--st-line); background: var(--st-paper); margin-bottom: .8rem; }
.list-section { margin: 1.5rem 0 .65rem; }
.shopping-items { display: grid; gap: .5rem; }
.shopping-row { position: relative; overflow: hidden; border-radius: .65rem; border: 1px solid var(--st-line); background: #a52929; touch-action: pan-y; }
.row-face { position: relative; display: flex; background: var(--st-paper); transition: transform .15s ease; }
.swiped .row-face { transform: translateX(-88px); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; padding: .8rem 1rem; border: 0; background: transparent; color: var(--st-ink); min-height: 64px; overflow-wrap: anywhere; }
.row-body span { color: var(--st-muted); font-size: .95rem; }
.row-complete { flex-shrink: 0; width: 64px; min-height: 64px; background: transparent; border: 0; border-left: 1px solid var(--st-line); color: var(--st-primary); font-size: 2rem; }
.row-delete { position: absolute; right: 0; top: 0; bottom: 0; width: 88px; min-height: 44px; border: 0; color: white; background: #a52929; font-weight: 650; }
.completed .row-body strong { text-decoration: line-through; color: var(--st-muted); }
.list-completed { margin-top: 1.4rem; }
.list-completed summary { cursor: pointer; min-height: 48px; padding: .75rem .2rem; font-weight: 650; }
.list-editor { color: var(--st-ink); background: var(--st-paper); border: 1px solid var(--st-line); border-radius: .8rem; width: min(94vw, 480px); padding: 1.2rem; max-height: 90dvh; overflow-y: auto; }
.list-editor::backdrop { background: #0007; }
.list-editor form { display: grid; gap: .5rem; }
.list-editor-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.list-editor [role="alert"]:empty { display: none; }
.lists-page button:focus-visible, .lists-page a:focus-visible, .lists-page input:focus-visible, .list-completed summary:focus-visible { outline: 3px solid var(--st-primary); outline-offset: 2px; }
@media (max-width: 370px) { .list-composer form { grid-template-columns: 1fr; } .list-name-field, .list-entry-status { grid-column: 1; } .list-heading { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .row-face { transition: none; } }
.page:has(.shopping-mode) .sidebar, .page:has(.shopping-mode) .top-row { display: none; }
.page:has(.shopping-mode) article.content { padding: 1rem !important; }
.shopping-mode { max-width: 520px; }
.shopping-mode .list-heading { align-items: flex-start; }
.shopping-mode h1 { font-size: 1.65rem; margin-bottom: 0; }
.shopping-help { padding: .8rem; background: var(--st-paper); border: 1px solid var(--st-line); border-radius: .6rem; }
.shopping-help p { margin: 0; }
.shopping-store { color: var(--st-muted); font-size: .85rem; margin-top: .5rem !important; }
.shopping-status { margin: .75rem 0; font-size: .9rem; }
.shopping-status:empty, .shopping-last-search:empty { display: none; }
.shopping-last-search { color: var(--st-muted); font-size: .85rem; margin-bottom: .5rem; }
.shopping-recovery:not([hidden]) { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .75rem 0; }
.shopping-recovery code { display: block; width: 100%; overflow-wrap: anywhere; color: var(--st-ink); }
.shopping-mode .row-body { text-decoration: none; }
.shopping-mode .row-body:hover { background: var(--st-paper); }
.shopping-mode .row-body.disabled { pointer-events: none; opacity: .6; }
.shopping-external { font-size: .9em; font-weight: normal; }
@media (max-width: 370px) { .list-heading-actions { justify-content: flex-start; } }
