/* Shopinator v1.2 — WebDeske dark / Inter / blue / flat. */
:root {
  color-scheme: dark;
  --bg: #0b111d;
  --surface: #151f30;
  --surface-raised: #1d2a3e;
  --ink: #f4f7fd;
  --muted: #b2c1d5;
  --subtle: #91a6c0;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-bright: #93c5fd;
  --red: #ff405b;
  --good: #93c5fd;
  --radius: 11px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .55; cursor: not-allowed; }
:where(button,input,select):focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; }
button:active:not(:disabled) { transform: translateY(1px); }
.hidden { display: none !important; }

/* Shell and header */
.app { width: 100%; max-width: 960px; margin-inline: auto; padding: max(22px,env(safe-area-inset-top)) 26px max(48px,env(safe-area-inset-bottom)); }
.brandbar { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.brandmark { background: var(--blue); color: #fff; width: 45px; height: 45px; border-radius: 10px; position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 30px; font-weight: 850; line-height: 1; letter-spacing: -4px; }
.mark-s { transform: translateX(-2px); }
.mark-dot { position: absolute; right: 9px; top: 9px; width: 6px; height: 6px; background: #dbeafe; border-radius: 50%; }
.brandtext { display: flex; flex-direction: column; gap: 4px; }
.brandname { font-size: 21px; letter-spacing: -.85px; font-weight: 800; line-height: 1; }
.brandnote { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 1.4px; }
.icon-button { width: 43px; height: 43px; display: grid; place-items: center; background: var(--surface); color: var(--ink); border: 0; border-radius: 9px; }
.icon-button:hover, .small-button:hover, .setting-action:hover { background: var(--surface-raised); }
.top-settings { margin-left: auto; }
.heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 39px 0 31px; }
.eyebrow { display: inline-block; margin: 0; font-size: 11px; letter-spacing: 1.55px; font-weight: 760; color: var(--muted); }
.heading h1 { margin: 9px 0 10px; font-weight: 810; letter-spacing: -1.9px; font-size: clamp(32px, 5.3vw, 49px); line-height: 1.06; }
.subline { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.status { font-size: 12px; font-weight: 660; color: var(--good); white-space: nowrap; padding: 0 2px 4px; }
.status-dot { display: inline-block; vertical-align: 2px; width: 7px; height: 7px; background: var(--good); border-radius: 50%; margin-right: 6px; }

/* Store selector and progress */
.store-section { margin-bottom: 20px; }
.section-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.text-button { background: transparent; border: 0; color: var(--blue-bright); padding: 9px 0; font-size: 13px; font-weight: 720; }
.text-button:hover { color: #fff; }
.store-tabs { display: flex; flex-wrap: wrap; gap: 9px; }
.store-button { color: var(--ink); background: var(--surface); border: 0; padding: 13px 19px; min-height: 46px; border-radius: 8px; white-space: nowrap; font-size: 13px; font-weight: 700; }
.store-button.active { background: var(--blue); color: white; }
.store-button:not(.active):hover { background: var(--surface-raised); }
.overview { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 25px 18px; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; }
.overview strong { font-size: 23px; display: block; font-weight: 760; letter-spacing: -.75px; margin-top: 8px; }
.progress-count { text-align: right; }
.progress-count strong { font-size: 25px; margin: 0; font-variant-numeric: tabular-nums; }
.progress-count span { color: var(--muted); font-size: 12px; }
.progress-track { background: var(--surface-raised); height: 5px; margin-bottom: 25px; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.progress-fill { height: 100%; background: #60a5fa; transition: width .2s ease; }

/* Navigation and content */
.view-tabs { display: flex; align-items: center; gap: 24px; margin: 0 0 25px; overflow-x: auto; scrollbar-width: none; }
.view-tabs::-webkit-scrollbar, .store-tabs::-webkit-scrollbar { display: none; }
.view-tab { flex: 0 0 auto; padding: 11px 0 13px; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; font-size: 14px; font-weight: 670; white-space: nowrap; }
.view-tab.active { color: #fff; border-bottom-color: var(--blue-bright); }
.view-tab:hover:not(.active) { color: #fff; }
.tab-count { color: #fff; background: var(--surface-raised); padding: 3px 7px; margin-left: 3px; border-radius: 5px; font-size: 11px; font-variant-numeric: tabular-nums; }
.view-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.view-header h2 { font-size: 23px; font-weight: 750; margin: 0; letter-spacing: -.65px; }
.view-header p { font-size: 13px; margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.primary-button { border: 0; background: var(--blue); color: #fff; min-height: 43px; border-radius: 8px; padding: 11px 17px; font-size: 13px; font-weight: 730; white-space: nowrap; }
.primary-button:hover, .large-action:hover { background: var(--blue-hover); }
.large-action { display: block; width: 100%; margin-top: 14px; background: var(--blue); color: white; border: 0; border-radius: 9px; padding: 18px 14px; font-size: 14px; font-weight: 740; text-align: center; }
.plus-icon { font-size: 20px; margin-right: 8px; line-height: 0; position: relative; top: 1px; }
.empty { background: var(--surface); border-radius: var(--radius); padding: 36px 22px; text-align: center; }
.empty strong { display: block; font-size: 17px; font-weight: 720; margin: 0 0 8px; }
.empty p { max-width: 350px; margin: auto; color: var(--muted); font-size: 13px; line-height: 1.6; }
.item-list { display: flex; flex-direction: column; gap: 9px; }
.item { display: flex; align-items: center; gap: 14px; min-height: 72px; border-radius: 9px; padding: 13px 16px; background: var(--surface); }
.item.done { background: var(--surface); opacity: .8; }
.tick { flex: 0 0 auto; display: grid; place-items: center; width: 27px; height: 27px; border: 2px solid #a7b8ce; color: #fff; background: var(--surface); border-radius: 6px; font-size: 16px; font-weight: 800; padding: 0; }
.tick.checked { background: var(--blue); border-color: var(--blue); }
.item-body { flex: 1; min-width: 0; }
.item-name { display: block; overflow-wrap: anywhere; font-size: 14px; font-weight: 720; }
.done .item-name { text-decoration: line-through; color: var(--muted); }
.item-detail { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.item-detail .location { color: var(--blue-bright); font-weight: 730; }
.item-actions { display: flex; gap: 6px; align-items: center; }
.small-button { border: 0; border-radius: 6px; padding: 9px 11px; background: var(--surface-raised); color: #cfe2ff; font-size: 12px; font-weight: 690; }
.small-button.remove { color: #ffb4be; }
.search-wrap { display: flex; align-items: center; gap: 10px; border-radius: 9px; color: var(--muted); background: var(--surface); padding: 0 16px; margin-bottom: 15px; }
.search-wrap:focus-within { outline: 2px solid var(--blue-bright); }
.search-wrap input { width: 100%; min-width: 0; height: 50px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }
.search-wrap input:focus-visible { outline: 0; }
input::placeholder { color: #a2b4cb; opacity: 1; }
.help-note { color: var(--muted); line-height: 1.65; font-size: 13px; }
.banner { padding: 13px 15px; margin: -4px 0 18px; background: var(--surface-raised); color: #e0ecff; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; color: var(--muted); font-size: 11px; letter-spacing: .65px; font-weight: 650; }

/* Store maps and photos */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo-card { background: var(--surface); border-radius: 9px; overflow: hidden; }
.photo-card img { width: 100%; height: 165px; object-fit: cover; cursor: zoom-in; display: block; }
.photo-caption { padding: 12px; font-size: 12px; font-weight: 710; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.photo-caption button { background: transparent; color: #ffb4be; font-size: 12px; padding: 5px; border: 0; }
.map-controls { display: flex; flex-direction: column; gap: 9px; background: var(--surface); border-radius: 9px; margin: 15px 0; padding: 16px; }
.map-controls label { color: var(--muted); font-weight: 710; font-size: 12px; }
.map-controls select, .dialog select { width: 100%; min-width: 0; padding: 12px 13px; border: 0; border-radius: 7px; color: var(--ink); background: var(--surface-raised); font-size: 14px; }
.map-frame { position: relative; width: 100%; overflow: hidden; background: var(--surface-raised); border-radius: 10px; cursor: crosshair; line-height: 0; touch-action: manipulation; }
.map-frame img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; pointer-events: none; }
.map-pins { position: absolute; inset: 0; pointer-events: none; }
.map-pin { position: absolute; transform: translate(-50%, -50%); background: var(--red); color: #fff; border: 2px solid #fff; width: 20px; height: 20px; border-radius: 50%; padding: 0; pointer-events: auto; isolation: isolate; z-index: 2; line-height: 1; }
.map-pin::before, .map-pin::after { content: ''; position: absolute; inset: -7px; border: 2px solid var(--red); border-radius: 50%; z-index: -1; animation: beampin 2.2s ease-out infinite; opacity: .8; }
.map-pin::after { animation-delay: 1.1s; }
.map-pin.active { background: #ed1a42; width: 26px; height: 26px; z-index: 3; }
.map-pin.active::before, .map-pin.active::after { animation-duration: 1.15s; }
.map-pin.active::after { animation-delay: .55s; }
.map-pin.done { background: #8291a9; opacity: .55; }
.map-pin.done::before, .map-pin.done::after { display: none; }
.map-pin-label { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; background: #0e1828; color: #fff; border-radius: 5px; padding: 6px 8px; font-size: 11px; font-weight: 730; pointer-events: none; line-height: 1.3; }
@keyframes beampin { 0% { opacity: .88; transform: scale(.55); } 85%,100% { opacity: 0; transform: scale(2.1); } }
.map-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 13px 0; }
.map-toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.map-toggle input { accent-color: var(--blue); }

/* Dialogs, inputs and backup controls */
.dialog { width: min(94vw, 490px); max-height: min(88dvh, 760px); padding: 0; color: var(--ink); background: var(--surface); border: 0; border-radius: 13px; }
.dialog::backdrop { background: rgb(0 0 0 / .75); }
.dialog-body { display: flex; flex-direction: column; gap: 17px; max-height: 86dvh; overflow: auto; padding: 25px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 22px; letter-spacing: -.65px; }
.close-button { background: var(--surface-raised); color: var(--ink); border: 0; border-radius: 7px; width: 34px; height: 34px; font-size: 23px; line-height: 1; }
.dialog label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 710; color: #f0f5ff; }
.dialog input:not([type=file]) { width: 100%; min-height: 46px; padding: 12px 13px; outline: 0; border: 0; border-radius: 7px; background: var(--surface-raised); color: #fff; font-size: 15px; }
.dialog input[type=file] { font-size: 12px; background: var(--surface-raised); border-radius: 7px; padding: 13px; color: var(--ink); }
.dialog input:focus, .dialog select:focus, .map-controls select:focus { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.form-context { color: var(--muted); font-weight: 680; font-size: 13px; margin: 0; }
.input-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 14px; align-items: center; margin-top: 6px; }
.danger-button { background: transparent; border: 0; color: #ffb4be; font-size: 13px; font-weight: 720; margin-right: auto; padding: 11px 0; }
.dialog-copy { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.store-edit-row { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.store-edit-row input { flex: 1; min-width: 0; }
.store-edit-row button { border: 0; background: var(--surface-raised); color: #ffb4be; padding: 12px; border-radius: 7px; }
.setting-action { display: flex; justify-content: space-between; align-items: center; text-align: left; border: 0; border-radius: 8px; background: var(--surface-raised); color: var(--ink); font-size: 14px; font-weight: 700; padding: 16px; }
.setting-action span { color: var(--blue-bright); font-size: 20px; }
.version { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 11px; }

/* Mobile */
@media (max-width: 600px) {
  .app { padding-left: 17px; padding-right: 17px; }
  .heading { margin-top: 28px; margin-bottom: 27px; }
  .heading h1 { letter-spacing: -1.45px; }
  .status { display: none; }
  .store-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .store-button { padding: 12px 15px; }
  .overview { padding: 20px 17px 16px; }
  .view-tabs { gap: 19px; }
  .view-tab { font-size: 13px; }
  .item { padding: 13px; gap: 10px; }
  .small-button { padding: 8px; }
  .view-header h2 { font-size: 21px; }
  .photo-card img { height: 125px; }
  .map-bottom { align-items: flex-start; flex-direction: column; }
  .footer { flex-direction: column; gap: 6px; }
}
@media (max-width: 360px) {
  .input-grid { grid-template-columns: 1fr; }
  .heading h1 { font-size: 31px; }
  .view-tabs { gap: 16px; }
  .view-header { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
