:root{
  --bg:#0d0f12;
  --bg-2:#14181e;
  --panel:#171c22;
  --panel-2:#202733;
  --panel-3:#11161d;
  --text:#f6f8fb;
  --muted:#b7c0cc;
  --soft:#8f9baa;
  --line:rgba(255,255,255,.10);
  --line-2:rgba(255,255,255,.06);
  --accent:#d6bc8a;
  --accent-2:#edd8ae;
  --green:#54d67f;
  --red:#ff7272;
  --tan:#c6a97a;
  --shadow:0 24px 80px rgba(0,0,0,.28);
  --radius:24px;
  --radius-sm:16px;
  --headerH:72px;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  background:linear-gradient(180deg,#0a0d11,#0e1318 45%,#0b0f13);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}

body{
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
body.modal-open{overflow:hidden}

.boot-screen{min-height:100dvh;display:grid;place-items:center;gap:12px}
.boot-mark{font-size:42px;color:var(--accent)}
.boot-text{color:var(--muted)}

.shell{
  min-height:100dvh;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  display:flex;
  flex-direction:column;
}

.topbar{
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter:blur(18px);
  background:rgba(13,15,18,.72);
  border-bottom:1px solid var(--line);
}

.topbar-inner{
  max-width:1400px;
  margin:0 auto;
  padding:16px 18px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:16px;
  align-items:center;
}

.brand{display:flex;align-items:center;gap:12px}

.brand-mark{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:radial-gradient(circle at 30% 30%, #f4e7c7, #b38a54 72%, #72552e);
  color:#111;
  font-weight:800;
  box-shadow:var(--shadow);
}

.brand-copy strong{display:block;font-size:15px}
.brand-copy span{display:block;color:var(--soft);font-size:12px}
.top-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}

.icon-btn,.pill-btn,.segmented button,.chip-btn,.filter-chip,.mini-btn{
  border:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
  color:var(--text);
  border-radius:999px;
  padding:10px 14px;
  transition:.18s transform ease,.18s background ease,.18s border-color ease,.18s opacity ease;
}

.icon-btn:hover,.pill-btn:hover,.segmented button:hover,.chip-btn:hover,.filter-chip:hover,.mini-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.18);
}

.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:42px;
  min-height:42px;
  padding:10px 12px;
  max-width:100%;
}

.icon-btn span,.action-row .icon-btn span{font-size:17px}
.icon-btn.is-active,.filter-chip.is-active,.segmented button.is-active{background:rgba(214,188,138,.18);border-color:rgba(214,188,138,.45)}
.pill-btn{font-weight:600}
.pill-btn.primary{background:linear-gradient(180deg,#f1e1bf,#c9a46b);color:#17120b;border-color:transparent}
.pill-btn.secondary{background:rgba(255,255,255,.06)}
.mini-btn{padding:8px 12px;border-radius:12px;max-width:100%}
.filter-chip,.tag{max-width:100%}
button[disabled],a[aria-disabled="true"]{opacity:.45;pointer-events:none}

.compact-btn{
  padding:8px 10px;
  min-height:36px;
  gap:6px;
  font-size:13px;
  line-height:1;
}

.compact-btn span:first-child{
  font-size:15px;
  line-height:1;
}

.compact-btn span:last-child{
  font-size:12px;
  font-weight:600;
  line-height:1;
}

.action-row-main{
  gap:8px;
}

.action-row-main .compact-btn{
  flex:0 0 auto;
}

.main{
  flex:1;
  max-width:1600px;
  width:100%;
  margin:0 auto;
  padding:18px;
  display:grid;
  gap:18px;
  min-width:0;
}

.hero-panel,.card-stage,.panel,.page-panel,.list-panel,.map-panel,.card-shell,.editor-card,.modal-card{
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  max-width:100%;
  min-width:0;
}

.hero-panel{padding:18px;display:grid;gap:16px}
.hero-copy h1{margin:0;font-size:clamp(30px,5vw,54px);line-height:.95}
.hero-copy p{margin:10px 0 0;color:var(--muted);max-width:70ch}
.hero-stats{display:flex;flex-wrap:wrap;gap:10px}
.stat-chip{border:1px solid var(--line);border-radius:999px;padding:10px 14px;color:var(--muted);background:rgba(255,255,255,.03)}

.search-panel{
  display:grid;
  gap:12px;
  min-width:0;
}

.search-row{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) auto auto;
  gap:12px;
  align-items:center;
  min-width:0;
}

.search-input{
  width:100%;
  min-width:0;
  padding:15px 18px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}

.select-wrap{
  min-width:0;
}

.select-wrap select{
  width:100%;
  min-width:0;
  padding:15px 16px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
}

.filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  min-width:0;
}

.filter-chip{font-size:13px;background:rgba(255,255,255,.03)}
.filter-chip small{opacity:.8}
.filter-chip.open-now.is-on{background:rgba(84,214,127,.18);border-color:rgba(84,214,127,.45)}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}

.section-title h2,.section-title h3{margin:0;font-size:20px}
.section-title .sub{color:var(--soft);font-size:13px}

.home-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(320px, 1fr));
  gap:18px;
  align-items:start;
  min-width:0;
}

.left-stack,
.right-stack{
  display:contents;
}

.deck-wrap{
  padding:14px;
  overflow:hidden;
  height:calc(100dvh - 170px);
  min-height:700px;
  max-height:900px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:10px;
  min-width:0;
}

.deck-area{
  position:relative;
  height:100%;
  min-height:0;
  overflow:hidden;
  isolation:isolate;
  min-width:0;
  width:100%;
  max-width:100%;
}

.deck-underlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:stretch;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  z-index:1;
  transition:opacity .18s ease, transform .18s ease;
}

.deck-underlay.left{
  transform:translateX(-40px) scale(.96);
}

.deck-underlay.right{
  transform:translateX(40px) scale(.96);
}

.deck-card{
  position:absolute;
  inset:0;
  margin:auto;
  width:100%;
  max-width:100%;
  height:100%;
  display:flex;
  align-items:stretch;
  justify-content:center;
  transition:transform .28s ease, opacity .28s ease, filter .28s ease;
  touch-action:none;
  min-width:0;
}

.deck-card.under{
  position:relative;
  inset:auto;
  margin:auto;
  z-index:1;
  pointer-events:none;
}

.deck-card.active{
  z-index:5;
  pointer-events:auto;
}

.deck-card .card-shell{
  width:100%;
  max-width:100%;
  height:100%;
  max-height:100%;
  min-width:0;
}

.deck-card .card-shell-inner,
.deck-card .card-face{
  height:100%;
  min-height:0;
  min-width:0;
}

.deck-area .card-shell{
  border-radius:20px;
}

.deck-area .card-content{
  overflow:auto;
}

.card-shell{
  overflow:hidden;
  position:relative;
  height:100%;
  min-width:0;
}

.card-shell-inner{
  position:relative;
  transform-style:preserve-3d;
  transition:transform .55s ease;
  min-height:100%;
  height:100%;
  min-width:0;
}

.card-shell.is-flipped .card-shell-inner{transform:rotateY(180deg)}

.card-face{
  backface-visibility:hidden;
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  min-height:100%;
  min-width:0;
}

.card-back{
  position:absolute;
  inset:0;
  transform:rotateY(180deg);
  padding:18px;
  display:grid;
  gap:14px;
  align-content:start;
  overflow:auto;
}

.card-back .quote-box{
  padding:16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.04);
  min-height:160px;
  color:var(--muted);
}

.card-back .quote-box.is-empty{font-style:italic;color:var(--soft)}

.card-top{
  padding:14px 14px 0;
  min-height:0;
}

.media-frame{
  position:relative;
  border-radius:22px;
  overflow:hidden;
  background:#0d0d0d;
  border:1px solid rgba(255,255,255,.08);
  max-width:100%;
}

.media-frame.square{aspect-ratio:1/1}
.media-frame.native{min-height:260px}

.media-stage{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.media-asset{
  max-width:none;
  max-height:none;
  transform-origin:center center;
  user-select:none;
  -webkit-user-drag:none;
  touch-action:none;
}

.media-frame.native .media-stage{position:relative;min-height:260px;padding:0}
.media-frame.native .media-asset{width:100%;height:auto;object-fit:contain;transform:none !important;touch-action:auto}

.media-placeholder{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:var(--soft);
  padding:24px;
  text-align:center;
  background:rgba(255,255,255,.02);
}

.card-content{
  padding:14px 18px 18px;
  display:grid;
  gap:12px;
  min-height:0;
  overflow:auto;
  min-width:0;
}

.card-header{display:grid;gap:6px}
.title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.title-stack{min-width:0}
.title-stack h3{margin:0;font-size:clamp(22px,3vw,30px);line-height:1.02;word-break:break-word}
.emoji-line{font-size:24px;line-height:1.1}
.one-liner{font-size:15px;color:#f6ebd3;font-weight:600;word-break:break-word}

.hours-pill{
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  border:1px solid transparent;
  white-space:nowrap;
  max-width:100%;
}

.hours-pill.open{background:rgba(84,214,127,.16);color:var(--green);border-color:rgba(84,214,127,.34)}
.hours-pill.closed{background:rgba(255,114,114,.16);color:var(--red);border-color:rgba(255,114,114,.34)}
.hours-pill.unknown{background:rgba(255,255,255,.06);color:var(--muted);border-color:var(--line)}

.action-row,.link-row,.nav-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  min-width:0;
  max-width:100%;
}

.text-blurb-wrap{display:grid;gap:10px}

.text-blurb{
  color:var(--muted);
  line-height:1.5;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.text-blurb.is-expanded{-webkit-line-clamp:unset}

.tags-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
  max-width:100%;
}

.tag{
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
}

.flip-note{color:var(--soft);font-size:12px;word-break:break-word}

.page-panel{padding:18px;display:grid;gap:18px;min-width:0}
.page-grid{display:grid;grid-template-columns:minmax(340px,.95fr) minmax(0,1.05fr);gap:18px;min-width:0}
.page-copy{display:grid;gap:14px;align-content:start;min-width:0}
.page-copy h1{margin:0;font-size:clamp(32px,6vw,58px);line-height:.94;word-break:break-word}
.page-copy .one-liner{font-size:18px}
.page-block{border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.03);padding:16px;min-width:0}
.page-block h3{margin:0 0 10px;font-size:15px;color:#f0dfbc}
.page-block p{margin:0;color:var(--muted);line-height:1.55;white-space:pre-wrap;word-break:break-word}
.page-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.detail-item{border:1px solid var(--line-2);border-radius:16px;padding:12px;background:rgba(255,255,255,.02);min-width:0}
.detail-item span{display:block;color:var(--soft);font-size:12px;margin-bottom:6px}
.detail-item strong{display:block;font-size:14px;word-break:break-word}

.side-by-side{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;min-width:0}

.list-panel{
  padding:16px;
  height:calc(100dvh - 170px);
  min-height:700px;
  max-height:900px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:12px;
  min-width:0;
  max-width:100%;
}

.results-list{
  display:grid;
  gap:12px;
  overflow:auto;
  min-height:0;
  padding-right:4px;
  max-height:none;
  min-width:0;
}

.list-item{
  padding:14px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  display:grid;
  gap:10px;
  min-width:0;
}

.list-item-header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;min-width:0}
.list-item-title{font-weight:700;word-break:break-word}
.list-item-sub{color:var(--muted);font-size:14px;word-break:break-word}
.list-item-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
  max-width:100%;
}

.map-panel{
  padding:16px;
  height:calc(100dvh - 170px);
  min-height:700px;
  max-height:900px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:12px;
  min-width:0;
  max-width:100%;
}

.map-box{
  position:relative;
  height:100%;
  min-height:0;
  border-radius:20px;
  overflow:hidden;
  border:1px solid var(--line);
  max-width:100%;
}

.map-box.small{height:520px}
#home-map,#map-only{height:100%;width:100%}

.map-overlay{
  position:absolute;
  left:12px;
  bottom:12px;
  z-index:500;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  max-width:min(100%,560px);
}

.map-legend{
  padding:9px 12px;
  border-radius:999px;
  background:rgba(9,11,14,.82);
  backdrop-filter:blur(8px);
  border:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
}

.dot-legend{display:inline-flex;align-items:center;gap:8px}
.dot-legend i{display:inline-block;width:10px;height:10px;border-radius:999px}

.empty-state{
  min-height:220px;
  border:1px dashed var(--line);
  border-radius:20px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--soft);
  padding:20px;
}

.modal{
  position:fixed;
  inset:0;
  z-index:2000;
  background:rgba(4,6,8,.7);
  backdrop-filter:blur(8px);
  display:none;
  align-items:flex-end;
  justify-content:center;
  padding:18px;
}

.modal.open{display:flex}

.modal-card{
  width:min(1200px,100%);
  max-height:min(92dvh,980px);
  overflow:auto;
  padding:18px;
  display:grid;
  gap:16px;
  background:linear-gradient(180deg,#151920,#0f1318);
}

.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.modal-head h2{margin:0;font-size:24px}
.editor-grid{display:grid;grid-template-columns:minmax(320px,.95fr) minmax(0,1.05fr);gap:18px;min-width:0}
.editor-card{padding:14px;display:grid;gap:14px;align-content:start;min-width:0}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.field{display:grid;gap:7px;min-width:0}
.field.full{grid-column:1/-1}
.field label{font-size:12px;color:var(--soft)}

.field input,.field textarea,.field select{
  width:100%;
  min-width:0;
  padding:12px 13px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}

.field textarea{min-height:96px;resize:vertical}
.editor-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.media-editor-wrap{display:grid;gap:12px;min-width:0}

.media-editor-stage{
  position:relative;
  aspect-ratio:1/1;
  border-radius:22px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#0c0e12;
  max-width:100%;
}

.media-editor-stage .media-stage{touch-action:none}
.media-hint{color:var(--soft);font-size:12px;line-height:1.45}
.range-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;min-width:0}
.range-row input[type="range"]{width:100%}

.toast-wrap{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:2100;
  display:grid;
  gap:10px;
}

.toast{
  padding:12px 14px;
  border-radius:16px;
  background:#10151c;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  min-width:240px;
  color:var(--text);
}

.toast.good{border-color:rgba(84,214,127,.45)}
.toast.bad{border-color:rgba(255,114,114,.45)}

.inline-note{color:var(--soft);font-size:12px}
.hidden{display:none !important}

img,
video,
canvas{
  max-width:100%;
}

@media (max-width:1080px){
  .home-grid{
    grid-template-columns:1fr;
    width:100%;
    max-width:100%;
  }

  .page-grid,
  .editor-grid,
  .side-by-side{
    grid-template-columns:1fr;
    width:100%;
    max-width:100%;
  }

  .deck-wrap,
  .list-panel,
  .map-panel{
    height:auto;
    min-height:auto;
    max-height:none;
  }

  .deck-area{
    height:82dvh;
    min-height:82dvh;
    max-height:none;
  }

  .map-box{
    height:82dvh;
    min-height:82dvh;
  }

  .results-list{
    max-height:none;
    overflow:visible;
  }
}

@media (max-width:720px){
  .topbar-inner{
    grid-template-columns:1fr;
  }

  .top-actions{
    width:100%;
    justify-content:flex-start;
  }

  .search-row{
    grid-template-columns:1fr;
  }

  .form-grid{
    grid-template-columns:1fr;
  }

  .main{
    padding:12px;
  }

  .home-grid,
  .page-grid,
  .editor-grid,
  .side-by-side{
    grid-template-columns:1fr;
    width:100%;
    max-width:100%;
  }

  .hero-panel,
  .deck-wrap,
  .list-panel,
  .map-panel,
  .page-panel,
  .panel,
  .card-stage{
    width:100%;
    max-width:100%;
  }

  .deck-area{
    width:100%;
    height:78dvh;
    min-height:78dvh;
    max-height:none;
  }

  .deck-card{
    width:100%;
    max-width:100%;
  }

  .map-box{
    width:100%;
    height:78dvh;
    min-height:78dvh;
    max-height:100%;
  }

  .page-detail-grid{
    grid-template-columns:1fr;
  }

  .icon-btn{
    min-height:40px;
  }

  .filter-row,
  .action-row,
  .link-row,
  .nav-row,
  .tags-row,
  .list-item-actions{
    max-width:100%;
  }

  .action-row > *,
  .link-row > *,
  .nav-row > *,
  .filter-row > *,
  .tags-row > *{
    min-width:0;
  }
}

@media (min-width:721px){
  .deck-area .card-face{
    grid-template-rows:auto auto 1fr;
  }

  .deck-area .card-top{
    padding:12px 12px 0;
    display:flex;
    justify-content:center;
    align-items:flex-start;
  }

  .deck-area .media-frame.square{
    aspect-ratio:1/1;
    width:min(100%, 430px);
    max-width:100%;
    max-height:none;
    margin:0 auto;
  }

  .deck-area .card-content{
    padding:12px 16px 16px;
    gap:10px;
  }

  .deck-area .card-header{
    gap:8px;
  }

  .deck-area .title-stack h3{
    font-size:clamp(20px,2.2vw,28px);
    line-height:1.02;
  }

  .deck-area .emoji-line{
    font-size:21px;
  }

  .deck-area .one-liner{
    font-size:14px;
    line-height:1.3;
  }
}

@media (max-width:720px){
  .compact-btn{
    padding:8px 10px;
    min-height:38px;
  }

  .compact-btn span:last-child{
    font-size:11px;
  }
}

.media-stage-square-full{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  padding:0;
}

.media-asset-square-full{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center center;
  transform:none !important;
  touch-action:auto;
}

.hours-row{
  display:flex;
  justify-content:flex-start;
  align-items:center;
}

.hours-pill{
  line-height:1.25;
}

.list-item .hours-row{
  margin-top:-2px;
}

.card-top .media-frame.square{
  background:#0d0d0d;
}

.card-top .media-frame.square .media-stage{
  position:absolute;
  inset:0;
}

.more-panel{
  display:grid;
  gap:10px;
  padding-top:4px;
}

.qr-wrap{
  display:grid;
  place-items:start;
  padding-top:4px;
}

.page-utility-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
}

.media-editor-stage{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255,255,255,.04);
}

.media-editor-canvas{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.media-editor-asset{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(0px, 0px) scale(1);
  transform-origin: center center;
  will-change: transform;
}

@media (max-width:720px){
  .page-utility-grid{
    grid-template-columns:1fr;
  }
}