/* ============================================================================
   MY PLACES — THE EDITORIAL ATLAS
   Design system for the six approved screens.
   Tokens, type scale and metrics are taken verbatim from
   reference/Editorial_Atlas_Design_Spec.md.
   ========================================================================= */

/* ── packaged fonts (SIL OFL 1.1; licence text in fonts/) ───────────────── */
@font-face{font-family:'Source Serif 4';src:url('fonts/SourceSerif4.ttf') format('truetype-variations');
  font-weight:200 900;font-style:normal;font-display:swap}
@font-face{font-family:'Source Serif 4';src:url('fonts/SourceSerif4-Italic.ttf') format('truetype-variations');
  font-weight:200 900;font-style:italic;font-display:swap}
@font-face{font-family:'Source Sans 3';src:url('fonts/SourceSans3.ttf') format('truetype-variations');
  font-weight:200 900;font-style:normal;font-display:swap}

:root{
  --ivory:#F5F0E7; --paper:#FAF6ED; --pine:#17322D; --deeppine:#102821;
  --muted:#53645A; --rule:#D8CDBB; --burgundy:#791E2B; --ochre:#AB711C;
  --palegold:#F1DCB4; --sage:#E3E8D8; --warmwhite:#FFFDF7; --blush:#FFD2CF;
  --serif:'Source Serif 4',Georgia,serif;
  --sans:'Source Sans 3',system-ui,-apple-system,'Segoe UI',sans-serif;
  --sp:4px;
  --shadow:0 1px 2px rgba(23,50,45,.05),0 8px 24px rgba(23,50,45,.05);
  --gutter:80px; --hdrh:64px;
}
@media (max-width:1099px){:root{--gutter:24px}}
@media (max-width:767px){:root{--gutter:16px;--hdrh:58px}}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--ivory);color:var(--pine);
  font-family:var(--sans);font-size:17px;line-height:24px;font-weight:400;
  font-variation-settings:'opsz' 20;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
figure{margin:0}
figcaption{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}
[hidden]{display:none!important}
h1,h2,h3,h4{margin:0;font-weight:inherit}
p{margin:0}
ul{margin:0;padding:0;list-style:none}
:focus-visible{outline:2px solid var(--pine);outline-offset:2px;border-radius:2px}
.on-dark :focus-visible,.hdr :focus-visible,.cover :focus-visible,.dock :focus-visible{outline-color:var(--palegold)}
.skip{position:absolute;left:-9999px}
.skip:focus{left:12px;top:12px;z-index:200;background:var(--paper);padding:8px 12px;border-radius:8px}

/* ── icons ─────────────────────────────────────────────────────────────── */
svg.i{width:20px;height:20px;flex:0 0 auto;fill:none;stroke:currentColor;
  stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
svg.i.s22{width:22px;height:22px}
svg.i.s16{width:16px;height:16px}
svg.i.filled{fill:currentColor;stroke:none}

/* ── type roles (spec § Typography) ────────────────────────────────────── */
.t-wordmark{font-family:var(--serif);font-style:italic;font-weight:600;font-size:30px;line-height:34px}
.t-home{font-family:var(--serif);font-style:italic;font-weight:550;font-size:64px;line-height:68px;letter-spacing:-.01em}
.t-city{font-family:var(--serif);font-style:italic;font-weight:550;font-size:66px;line-height:72px;letter-spacing:-.015em}
.t-place{font-family:var(--serif);font-style:italic;font-weight:550;font-size:63px;line-height:68px;letter-spacing:-.015em}
.t-card{font-family:var(--serif);font-style:italic;font-weight:600;font-size:30px;line-height:35px}
.t-section{font-family:var(--serif);font-style:italic;font-weight:400;font-size:28px;line-height:34px}
.t-row{font-family:var(--serif);font-weight:600;font-size:23px;line-height:28px}
.t-quote{font-family:var(--serif);font-style:italic;font-weight:500;font-size:36px;line-height:46px;letter-spacing:-.005em}
.t-body{font-size:17px;line-height:25px}
.eyebrow{font-size:14px;line-height:19px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.meta{font-size:14px;line-height:19px;color:var(--muted)}
.nav-t{font-size:16px;line-height:20px;font-weight:600}

@media (max-width:767px){
  .t-wordmark{font-size:25px;line-height:30px}
  .t-home{font-size:34px;line-height:40px}
  .t-city{font-size:48px;line-height:54px}
  .t-place{font-size:36px;line-height:42px}
  .t-card{font-size:24px;line-height:29px}
  .t-section{font-size:21px;line-height:28px;font-weight:500}
  .t-row{font-size:20px;line-height:24px}
  .t-quote{font-size:25px;line-height:33px}
  .t-body{font-size:15px;line-height:22px}
  .eyebrow{font-size:13px;line-height:18px}
  .meta{font-size:13px;line-height:18px}
  .nav-t{font-size:15px}
}

/* ── layout ────────────────────────────────────────────────────────────── */
.wrap{max-width:1440px;margin:0 auto;padding:0 var(--gutter)}
.sec{margin-top:40px}

/* ── header ────────────────────────────────────────────────────────────── */
.hdr{position:sticky;top:0;z-index:60;background:var(--deeppine);color:var(--warmwhite)}
.hdr-in{max-width:1440px;margin:0 auto;padding:0 var(--gutter);height:var(--hdrh);
  display:flex;align-items:center;gap:24px}
.wordmark{font-family:var(--serif);font-style:italic;font-weight:600;font-size:30px;line-height:34px;
  color:var(--warmwhite);white-space:nowrap}
.hnav{display:flex;align-items:center;gap:4px;margin-left:24px}
.hnav a{font-size:16px;line-height:20px;font-weight:600;color:rgba(255,253,247,.82);
  padding:8px 14px;border-radius:8px;position:relative}
.hnav a:hover{background:rgba(255,253,247,.09);color:var(--warmwhite)}
.hnav a[aria-current="page"]{color:var(--warmwhite)}
.hnav a[aria-current="page"]::after{content:"";position:absolute;left:14px;right:14px;bottom:1px;height:2px;background:var(--palegold)}
.hsearch{margin-left:auto;position:relative;display:flex;align-items:center;
  background:rgba(255,253,247,.10);border:1px solid rgba(255,253,247,.22);border-radius:999px;
  height:40px;width:296px;padding:0 12px;gap:8px}
.hsearch .i{color:rgba(255,253,247,.7);width:18px;height:18px}
.hsearch input{flex:1;min-width:0;background:none;border:0;outline:none;color:var(--warmwhite);font-size:15px}
.hsearch input::placeholder{color:rgba(255,253,247,.62)}
.hsearch:focus-within{border-color:var(--palegold);box-shadow:0 0 0 2px rgba(241,220,180,.35)}
.hsearch-clear{background:none;border:0;color:var(--warmwhite);font-size:20px;line-height:1;cursor:pointer;padding:0 2px}
.hadd{font-size:16px;font-weight:600;color:var(--warmwhite);white-space:nowrap;padding:8px 6px;border-radius:8px}
.hadd:hover{background:rgba(255,253,247,.09)}
.hadd span{color:var(--palegold)}
.hdr .phoneq{display:none}
@media (max-width:767px){.hdr .phoneq{display:inline-flex;margin-left:auto}}
.avatar{width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,253,247,.45);
  background:none;color:var(--warmwhite);font-weight:650;font-size:15px;cursor:pointer;flex:0 0 auto}
.avatar:hover{background:rgba(255,253,247,.12)}
.acctmenu{position:absolute;right:var(--gutter);top:calc(var(--hdrh) - 4px);z-index:80;min-width:248px;
  background:var(--paper);border:1px solid var(--rule);border-radius:12px;box-shadow:var(--shadow);padding:8px}
.acctmenu a,.acctmenu button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;
  padding:10px 12px;border-radius:8px;font-size:15px;font-weight:600;background:none;border:0;cursor:pointer}
.acctmenu a:hover,.acctmenu button:hover{background:var(--sage)}
.acctmenu hr{border:0;border-top:1px solid var(--rule);margin:6px 4px}
.acctmenu .who{padding:8px 12px 10px}
.acctmenu .who b{display:block;font-family:var(--serif);font-style:italic;font-weight:600;font-size:20px}
.acctmenu .who span{font-size:13px;color:var(--muted)}
/* Tablet band (768–1023): the desktop navigation must stay reachable. It used to be hidden
   from 900 px down while the phone tab bar only started at 768, which left 768–899 with no
   navigation at all. Tighten the header instead of dropping the nav. */
@media (max-width:1023px){
  .hdr-in{gap:12px}
  .hnav{gap:0;margin-left:8px}
  .hnav a{padding:8px 8px;font-size:15px}
  .hsearch{width:196px}
  .hadd{font-size:15px}
}
@media (max-width:767px){.hnav{display:none}}

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;
  padding:0 18px;border-radius:8px;border:1px solid transparent;font-size:16px;font-weight:600;
  background:var(--paper);color:var(--pine);cursor:pointer;white-space:nowrap;text-align:center}
.btn:hover{border-color:rgba(23,50,45,.45)}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--pine);color:var(--warmwhite);border-color:var(--pine)}
.btn.primary:hover{background:#1d4038;border-color:#1d4038;color:var(--warmwhite)}
.btn.outline{background:transparent;border-color:var(--rule);color:var(--pine)}
.btn.outline:hover{border-color:var(--pine);background:var(--sage)}
.btn.gold{background:var(--palegold);color:var(--deeppine);border-color:var(--palegold)}
.btn.gold:hover{border-color:var(--deeppine);background:#edd4a6}
.btn.ghost{background:none;border-color:transparent;padding:0 12px}
.btn.ghost:hover{background:var(--sage)}
.btn.sm{min-height:40px;padding:0 14px;font-size:15px}
.btn[aria-pressed="true"]{background:var(--pine);color:var(--warmwhite);border-color:var(--pine)}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.iconbtn{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px;border:1px solid transparent;background:none;color:inherit;cursor:pointer}
.iconbtn:hover{background:var(--sage)}
.on-dark .iconbtn:hover,.cover .iconbtn:hover,.dock .iconbtn:hover{background:rgba(255,253,247,.16)}

/* ── statuses ──────────────────────────────────────────────────────────── */
.st{display:inline-flex;align-items:center;gap:6px;font-size:15px;font-weight:600;line-height:20px;color:var(--muted)}
.st .i{width:18px;height:18px}
.st.tops{color:var(--deeppine)} .st.tops .i{color:var(--ochre);fill:currentColor;stroke:none}
.st.loved{color:var(--burgundy)} .st.loved .i{color:var(--burgundy);fill:currentColor;stroke:none}
.st.want{color:var(--deeppine)} .st.want .i{color:var(--ochre)}
.st.been{color:var(--pine)}
.st.lg{font-size:16px;gap:8px}
.st.lg .i{width:20px;height:20px}
.stbtn{min-height:44px;display:inline-flex;align-items:center;gap:8px;background:none;border:0;
  border-radius:8px;padding:0 10px;cursor:pointer;font-size:16px;font-weight:600;color:var(--muted)}
.stbtn:hover{background:var(--sage)}
.stbtn[aria-pressed="true"].been,.stbtn[aria-pressed="true"].been .i{color:var(--pine)}
.stbtn[aria-pressed="true"].loved,.stbtn[aria-pressed="true"].loved .i{color:var(--burgundy)}
.stbtn[aria-pressed="true"].tops{color:var(--deeppine)}
.stbtn[aria-pressed="true"].tops .i{color:var(--ochre)}
.stbtn[aria-pressed="true"].want{color:var(--deeppine)}
.stbtn[aria-pressed="true"].want .i{color:var(--ochre)}
.stbtn[aria-pressed="true"] .i.fillable{fill:currentColor;stroke:none}
.stbtn[aria-pressed="false"]{color:var(--muted)}
.stbtn[aria-pressed="false"]:hover{color:var(--pine);background:var(--sage)}

/* ── HOME ──────────────────────────────────────────────────────────────── */
.home-band{display:grid;grid-template-columns:464fr 816fr;align-items:start;margin-top:39px;gap:0}
.home-lede{padding-right:40px;display:flex;flex-direction:column;height:302px;justify-content:space-between}
.home-lede .sub{color:var(--muted);font-size:19px;line-height:26px;margin-top:14px}
.home-stats{display:flex;gap:40px;align-items:flex-end}
.stat b{display:block;font-family:var(--serif);font-weight:550;font-size:34px;line-height:38px}
.stat span{font-size:15px;color:var(--muted)}
.home-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.hero-img{aspect-ratio:816/302;border-radius:12px;overflow:hidden;background:var(--deeppine);position:relative}
.hero-img img{width:100%;height:100%;object-fit:cover;object-position:45% 50%}
.hero-img figcaption{position:absolute;right:10px;bottom:8px;font-size:11px;line-height:14px;color:rgba(255,253,247,.8);
  text-shadow:0 1px 2px rgba(0,0,0,.5)}
.credit-note{font-size:12px;line-height:16px;color:var(--muted);margin-top:6px}

.home-lower{display:grid;grid-template-columns:912fr 320fr;gap:48px;margin-top:43px;align-items:start}
.shelf-tabs{display:flex;gap:28px;border-bottom:1px solid var(--rule);padding-bottom:0}
.shelf-tabs button{background:none;border:0;padding:0 0 12px;cursor:pointer;font-size:16px;font-weight:600;
  color:var(--muted);position:relative}
.shelf-tabs button[aria-selected="true"]{color:var(--pine)}
.shelf-tabs button[aria-selected="true"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--ochre)}
.shelf{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:20px}
.card{position:relative;display:block;border-radius:10px;overflow:hidden;background:var(--deeppine);
  aspect-ratio:288/216}
.card img{width:100%;height:100%;object-fit:cover}
.card .grad{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(16,40,33,0) 23%,rgba(16,40,33,.86) 100%)}
.card .cin{position:absolute;left:16px;right:16px;bottom:14px;color:var(--warmwhite)}
.card .cname{font-family:var(--serif);font-style:italic;font-weight:600;font-size:30px;line-height:35px}
.card .cmeta{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin-top:2px}
.card .cmeta .h{display:inline-flex;align-items:center;gap:5px}
.card .pine-cover{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;
  padding:16px;background:linear-gradient(150deg,#12291f,#0d1f19)}
.card:hover{box-shadow:var(--shadow)}
.card:hover .cname{text-decoration:underline;text-underline-offset:3px}
.rail h3{font-family:var(--serif);font-style:italic;font-weight:400;font-size:26px;line-height:32px}
.rail-lab{font-size:14px;line-height:19px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.rail .mod b{font-family:var(--serif);font-style:italic;font-weight:600;font-size:26px;line-height:32px;display:block}
.rail .mod{border:1px solid var(--rule);border-radius:10px;background:var(--paper);padding:16px}
.rail .mod a{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:15px;margin-top:12px;
  min-height:24px}
.rail .mod a:hover{text-decoration:underline;text-underline-offset:3px}
.rail hr{border:0;border-top:1px solid var(--rule);margin:24px 0}
.railmod+.railmod{border-top:1px solid var(--rule);padding-top:24px}
.railmod.notes h3{margin-bottom:2px}
.rail blockquote{margin:10px 0 0;font-family:var(--serif);font-style:italic;font-weight:500;font-size:24px;line-height:32px}
.rail .attrib{font-size:14px;color:var(--muted);margin-top:8px}
.recent{margin-top:56px;border-top:1px solid var(--rule);padding-top:24px}
.recent .row{display:flex;justify-content:space-between;align-items:center;padding:16px 0;border-bottom:1px solid var(--rule)}
.recent .row b{font-family:var(--serif);font-weight:600;font-size:23px;line-height:28px}
.recent .row span{color:var(--muted);font-size:15px}
.mods2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}

/* ── destination (city) page ───────────────────────────────────────────── */
.cover{position:relative;border-radius:12px;overflow:hidden;background:var(--deeppine);margin-top:24px}
.cover.city{aspect-ratio:1280/206}
/* Per-asset focal point (spec § Photography). Paris moved down to 68 % so the cover shows the
   cityscape rather than sky, per the acceptance correction. */
.cover img{width:100%;height:100%;object-fit:cover;object-position:var(--focal,45% 50%)}
.cover .grad{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(16,40,33,0) 23%,rgba(16,40,33,.86) 100%)}
.cover .cin{position:absolute;left:32px;right:32px;bottom:22px;color:var(--warmwhite)}
.cover h1{font-family:var(--serif);font-style:italic;font-weight:550;font-size:66px;line-height:72px;letter-spacing:-.015em}
.cover .cmeta{display:flex;gap:20px;align-items:center;font-size:15px;margin-top:2px}
.cover.pine-only{display:flex;align-items:flex-end;min-height:206px}
.toolbar{display:flex;gap:12px;align-items:center;margin-top:24px;flex-wrap:nowrap}
.toolbar .scoped{flex:1 1 380px;min-width:0}
.scoped{position:relative;display:flex;align-items:center;background:var(--paper);border:1px solid var(--rule);
  border-radius:8px;height:44px;padding:0 14px}
.scoped input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:16px}
.scoped:focus-within{border-color:var(--pine);box-shadow:0 0 0 2px rgba(23,50,45,.14)}
.dropdown{position:relative}
.dropdown>button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:8px;
  border:1px solid var(--rule);background:var(--paper);cursor:pointer;font-size:15px;font-weight:600;white-space:nowrap}
.dropdown>button:hover{border-color:var(--pine)}
.dropdown>button .badge{background:var(--pine);color:var(--warmwhite);border-radius:999px;font-size:12px;
  min-width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px}
.dropdown .menu{position:absolute;z-index:50;top:calc(100% + 6px);left:0;min-width:250px;max-height:340px;overflow:auto;
  background:var(--paper);border:1px solid var(--rule);border-radius:10px;box-shadow:var(--shadow);padding:6px}
.dropdown .menu label{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:6px;cursor:pointer;font-size:15px}
.dropdown .menu label:hover{background:var(--sage)}
.dropdown .menu input{margin:0;width:17px;height:17px;accent-color:var(--pine)}
.dropdown .menu .ghead{padding:8px 10px 4px;font-size:13px;font-weight:650;letter-spacing:.06em;
  text-transform:uppercase;color:var(--muted)}
.viewswitch{display:inline-flex;border:1px solid var(--rule);border-radius:8px;overflow:hidden;background:var(--paper)}
.viewswitch button{min-height:44px;padding:0 18px;border:0;background:none;cursor:pointer;font-size:15px;font-weight:600;
  display:inline-flex;align-items:center;gap:7px;color:var(--pine)}
.viewswitch button[aria-pressed="true"]{background:var(--pine);color:var(--warmwhite)}
.viewswitch button+button{border-left:1px solid var(--rule)}
.grow{flex:1 1 auto}
.countline{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0 0}
.countline .n{font-size:15px;color:var(--muted);font-weight:600}
.activechips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.activechips:empty{display:none}
.chip{display:inline-flex;align-items:center;gap:6px;background:var(--sage);border:1px solid var(--rule);
  border-radius:999px;padding:5px 8px 5px 12px;font-size:14px;font-weight:600}
.chip button{background:none;border:0;cursor:pointer;color:var(--muted);display:inline-flex;width:20px;height:20px;
  align-items:center;justify-content:center;border-radius:50%}
.chip button:hover{background:rgba(23,50,45,.12);color:var(--pine)}
.rows{margin-top:8px;border-top:1px solid var(--rule)}
.prow{display:flex;align-items:center;gap:16px;width:100%;text-align:left;background:none;border:0;
  border-bottom:1px solid var(--rule);padding:0 12px;min-height:73px;cursor:pointer;border-radius:0}
.prow:hover{background:rgba(227,232,216,.5)}
.prow[aria-current="true"]{background:var(--sage)}
.prow .ic{width:22px;height:22px;color:var(--pine);flex:0 0 auto}
.prow .txt{flex:1;min-width:0}
.prow .txt b{display:block;font-family:var(--serif);font-weight:600;font-size:23px;line-height:28px;
  overflow-wrap:anywhere}
.prow .txt span{display:block;font-size:15px;color:var(--muted);margin-top:1px}
.prow .rhs{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.prow .chevr{color:var(--muted)}
.notice{border:1px solid var(--rule);background:var(--paper);border-radius:10px;padding:20px;margin-top:20px}
.notice h3{font-family:var(--serif);font-style:italic;font-weight:600;font-size:24px;line-height:30px;margin-bottom:6px}
.notice p{color:var(--muted);max-width:62ch}
.nearrow{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:14px}
.nearrow select{min-height:44px;border:1px solid var(--rule);border-radius:8px;background:var(--paper);
  padding:0 10px;font-size:15px;max-width:100%}
.skeleton{margin-top:16px}
.sk{height:73px;border-bottom:1px solid var(--rule);display:flex;align-items:center;gap:16px}
.sk i{display:block;background:linear-gradient(90deg,#e7dfd1,#f3ece0,#e7dfd1);background-size:200% 100%;
  animation:sh 1.4s linear infinite;border-radius:6px}
.sk .a{width:22px;height:22px}.sk .b{flex:1;max-width:280px;height:16px}.sk .c{width:64px;height:14px}
@keyframes sh{from{background-position:200% 0}to{background-position:-200% 0}}
.mapwrap{margin-top:16px;border:1px solid var(--rule);border-radius:10px;overflow:hidden;position:relative;
  height:min(62vh,560px);background:var(--sage)}
#map{position:absolute;inset:0}
.maptools{position:absolute;left:12px;bottom:12px;background:var(--paper);border:1px solid var(--rule);
  border-radius:8px;padding:8px 12px;font-size:13px;color:var(--muted);max-width:min(420px,70%)}
.pin{width:16px;height:16px;border-radius:50%;background:var(--pine);border:2px solid var(--warmwhite);
  box-shadow:0 1px 3px rgba(0,0,0,.35);cursor:pointer}
.pin.sel{background:var(--burgundy)}

/* ── place detail ──────────────────────────────────────────────────────── */
.detail{display:grid;grid-template-columns:394px minmax(0,1fr);column-gap:35px;margin-top:24px;align-items:start}
.resultcol{border:1px solid var(--rule);border-radius:10px;background:var(--paper);padding:14px;overflow:hidden}
.resultcol .back{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:15px;min-height:32px}
.resultcol .back:hover{text-decoration:underline;text-underline-offset:3px}
.resultcol .n{font-size:15px;color:var(--muted);font-weight:600;margin:8px 0 4px}
.resultcol .rows{border-top:0}
.resultcol .prow{min-height:62px;padding:0 8px}
.resultcol .prow .txt b{font-size:20px;line-height:24px}
.resultcol .prow .txt span{font-size:13px}
.reading{border-left:1px solid var(--rule);padding-left:45px;min-height:400px}
.reading .head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.reading .subline{color:var(--muted);font-size:19px;line-height:26px;margin-top:10px}
.notecard{border:1px solid var(--rule);border-left:3px solid var(--ochre);border-radius:10px;background:var(--paper);
  padding:14px 18px;margin-top:18px}
.notecard .lab{font-size:14px;font-weight:650;color:var(--muted);letter-spacing:.04em}
.notecard .q{font-family:var(--serif);font-style:italic;font-weight:500;font-size:36px;line-height:46px;
  color:var(--burgundy);margin-top:8px}
.notecard .ft{display:flex;justify-content:flex-end;margin-top:8px}
.notecard textarea{width:100%;min-height:120px;border:1px solid var(--rule);border-radius:8px;padding:12px;
  font-family:var(--serif);font-style:italic;font-size:22px;line-height:30px;background:var(--warmwhite);
  color:var(--burgundy);resize:vertical;margin-top:12px}
.editrow{display:flex;gap:10px;justify-content:flex-end;margin-top:10px}
.dactions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}
.dstatus{display:flex;gap:6px;flex-wrap:wrap;margin-top:22px;padding-top:18px;border-top:1px solid var(--rule)}
.dsec{border-top:1px solid var(--rule);padding-top:18px;margin-top:22px}
.dsec h3{font-size:15px;font-weight:650;margin-bottom:8px}
.dsec p,.dsec .val{font-size:17px;line-height:24px}
.dsec .val a{text-decoration:underline;text-underline-offset:3px}
.dsec button.disclose{display:flex;align-items:center;justify-content:space-between;width:100%;background:none;
  border:0;padding:0;cursor:pointer;font-size:15px;font-weight:650;min-height:32px}
.photofree{font-size:13px;color:var(--muted);margin-top:10px}
.back{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:15px;min-height:32px}
.back:hover{text-decoration:underline;text-underline-offset:3px}
/* The reading-area return link must stay hidden while the result column is on screen.
   `.sheetback{display:none}` alone lost to the later `.back{display:inline-flex}` at equal
   specificity, so the desktop detail showed the return link twice. */
.reading .sheetback{display:none}
/* Spec § Screen composition — the active Loved heart is the approved burgundy. */
.iconbtn#love{color:var(--pine)}
.iconbtn#love[aria-pressed="true"]{color:var(--burgundy)}
.iconbtn#love[aria-pressed="true"] .i{fill:currentColor;stroke:none}
/* Spec § Width rules — “Detail uses a sheet below 1024.” Under that the reading area stands
   alone behind a return link; the side-by-side split is the 1024+ composition. */
@media (max-width:1023px){
  .detail{grid-template-columns:1fr;column-gap:0}
  .resultcol{display:none}
  .reading{border-left:0;padding-left:0;margin-top:6px}
  .reading .sheetback{display:inline-flex;margin-bottom:14px}
}

/* ── phone ─────────────────────────────────────────────────────────────── */
.tabbar{display:none}
@media (max-width:767px){
  body{padding-bottom:calc(69px + env(safe-area-inset-bottom,0px))}
  .hdr .hsearch,.hdr .hadd,.hnav{display:none}
  .hdr-in{gap:12px}
  .avatar{display:none}
  .tabbar{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:70;
    background:var(--paper);border-top:1px solid var(--rule);
    padding-bottom:env(safe-area-inset-bottom,0px);
    min-height:calc(69px + env(safe-area-inset-bottom,0px))}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    font-size:12px;font-weight:600;color:var(--muted);padding:8px 4px 10px;min-height:48px}
  .tabbar a[aria-current="page"]{color:var(--pine)}
  .tabbar a[aria-current="page"] .i{color:var(--pine)}
  /* Spec § Home, mobile: the headline precedes the edge-to-edge cover, THEN the totals
     and Nearby. display:contents promotes the two lede blocks to band-level items so the
     cover can sit between them without duplicating the markup. */
  .home-band{display:flex;flex-direction:column;margin-top:12px;gap:0}
  .home-lede{display:contents}
  .home-lede>div:first-child{order:1}
  .home-band>figure{order:2}
  .home-lede>div:last-child{order:3}
  .home-lede .sub{font-size:15px;line-height:22px;margin-top:6px}
  .bk{display:none}
  .home-stats{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:0}
  .home-actions{margin-top:0}
  /* Phone, per the approved mobile board: the totals and the Nearby action share ONE row
     directly under the cover, and "Discover cities" is not in the phone composition. */
  .home-lede>div:last-child{display:flex;align-items:center;justify-content:space-between;
    gap:12px;margin-top:14px;flex-wrap:nowrap}
  .home-lede>div:last-child .stat b{font-size:26px;line-height:30px}
  .home-lede>div:last-child .home-stats{gap:20px}
  .discover{display:none}
  .hero-img{order:2;height:190px;align-self:stretch;aspect-ratio:auto;position:relative;overflow:hidden;
    border-radius:0;margin:14px calc(var(--gutter)*-1) 0;width:auto}
  .hero-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
  .home-lower{grid-template-columns:1fr;gap:0;margin-top:0}
  .shelf-tabs{margin-top:12px}
  .shelf{margin-top:8px;grid-template-columns:repeat(2,1fr);gap:16px}
  .shelf .card:nth-child(n+3){display:none}
  .card{border-radius:10px}
  .card .cname{font-size:24px;line-height:29px}
  .card .cin{left:12px;right:12px;bottom:10px}
  .rail{margin-top:26px;display:grid;grid-template-columns:1fr;gap:0}
  .railmod+.railmod{border-top:0;padding-top:0}
  .rail .mod{margin-top:0}
  .rail h3{font-size:19px}
  .rail blockquote{font-size:18px;line-height:25px}
  /* the two small private modules sit side by side on a phone, as the approved boards show */
  .rail{grid-template-columns:1fr 1fr;gap:16px;align-items:start}
  .rail .mod{padding:12px}
  .rail .rail-lab{font-size:12px;letter-spacing:.05em}
  .rail .mod b{font-size:20px;line-height:25px}
  .rail blockquote{font-size:18px;line-height:25px}
  /* the approved mobile board shows the two private modules as a matched pair of cards */
  .railmod.notes{border:1px solid var(--rule);border-radius:10px;background:var(--paper);padding:12px}
  .railmod.notes h3{font-size:19px}
  .rail .attrib{font-size:12px}
  .mods2{display:none;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
  /* the dock carries Directions and Add to list on a phone, so the inline pair would
     duplicate them and push the four statuses onto a second line. */
  .dactions{display:none}
  .dstatus{gap:6px;margin-top:20px}
  .stbtn{font-size:14px;padding:0 6px;gap:6px}
  .stbtn .i{width:16px;height:16px}
  .recent{margin-top:32px}
  .cover.city{aspect-ratio:auto;height:173px;border-radius:0;margin-top:0;margin-left:calc(var(--gutter)*-1);
    margin-right:calc(var(--gutter)*-1);width:auto}
  .cover .cin{left:var(--gutter);right:var(--gutter);bottom:14px}
  .cover h1{font-size:48px;line-height:54px}
  .toolbar{flex-wrap:wrap;gap:6px;margin-top:16px}
  .toolbar .scoped{flex:0 0 100%}
  .toolbar .grow{display:none}
  .dropdown>button{padding:0 10px;font-size:14px;gap:5px}
  .dropdown>button .i{width:16px;height:16px}
  .viewswitch button{padding:0 10px;font-size:14px;gap:5px}
  .viewswitch button .i{width:16px;height:16px}
  .countline{margin-top:14px}
  .prow{min-height:70px;padding:0 6px}
  .prow .txt b{font-size:20px;line-height:24px}
  .detail{grid-template-columns:1fr;column-gap:0}
  .resultcol{display:none}
  .reading{border-left:0;padding-left:0;margin-top:14px}
  .reading .subline{font-size:15px;line-height:22px}
  .notecard{padding:16px;margin-top:18px}
  .notecard .q{font-size:25px;line-height:33px}
  .mapwrap{height:min(56vh,460px)}
}

/* ── place-detail dock (phone) ─────────────────────────────────────────── */
.dock{display:none}
@media (max-width:767px){
  .detail{padding-bottom:96px}
  .dock{display:grid;grid-template-columns:1fr 1fr;gap:12px;position:fixed;left:0;right:0;
    bottom:calc(69px + env(safe-area-inset-bottom,0px));z-index:65;background:var(--paper);
    border-top:1px solid var(--rule);padding:12px var(--gutter) 14px;
    min-height:73px;align-items:center}
  .dock .btn{min-height:44px;width:100%}
  body.detail-open .tabbar{display:none}
  body.detail-open{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  body.detail-open .dock{bottom:0}
}

/* ── sheets ────────────────────────────────────────────────────────────── */
.sheet{position:fixed;inset:0;z-index:120;background:rgba(16,40,33,.42);display:flex;align-items:flex-end}
.sheet-in{background:var(--ivory);width:100%;max-height:90vh;border-radius:14px 14px 0 0;display:flex;
  flex-direction:column;overflow:hidden}
.sheet-hd{display:flex;align-items:center;justify-content:space-between;padding:14px var(--gutter);
  border-bottom:1px solid var(--rule)}
.sheet .filterbody,.sheet .searchbody{padding:16px var(--gutter);overflow:auto}
.sheet-ft{display:flex;gap:12px;padding:12px var(--gutter) calc(14px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--rule);background:var(--paper)}
.sheet-ft .btn{flex:1}
.hsearch.wide{width:auto;margin:16px var(--gutter) 0;padding:0 14px;height:40px}
.hsearch.wide input{color:var(--pine)}
.hsearch.wide input::placeholder{color:var(--muted)}
.hsearch.wide .i{color:var(--muted)}
.hsearch.wide{background:var(--paper);border-color:var(--rule)}
.searchbody .hit{display:flex;align-items:center;gap:14px;padding:12px 4px;border-bottom:1px solid var(--rule);
  width:100%;background:none;border:0;border-bottom:1px solid var(--rule);text-align:left;cursor:pointer}
.searchbody .hit b{font-family:var(--serif);font-weight:600;font-size:20px;line-height:25px;display:block}
.searchbody .hit span{font-size:14px;color:var(--muted)}
.searchbody .hit em{display:block;font-size:14px;color:var(--burgundy);font-style:italic;margin-top:3px}
.searchbody .hit:hover{background:var(--paper)}
.filterbody .fgroup{border-bottom:1px solid var(--rule);padding:14px 0}
.filterbody .fgroup:last-child{border-bottom:0}
.filterbody .fglab{font-size:14px;font-weight:650;margin-bottom:10px}
.filterbody .opts{display:flex;flex-wrap:wrap;gap:8px}
.filterbody .opts button{min-height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--rule);
  background:var(--paper);cursor:pointer;font-size:15px;font-weight:600}
.filterbody .opts button[aria-pressed="true"]{background:var(--pine);color:var(--warmwhite);border-color:var(--pine)}
.loadmore{display:flex;justify-content:center;padding:20px 0}

/* ── utility pages (Lists, Guides, Account) ────────────────────────────── */
.page-hd{padding:32px 0 8px;border-bottom:1px solid var(--rule)}
.page-hd p{color:var(--muted);margin-top:8px;max-width:70ch}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:24px}
.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-top:20px}
.listcard{border:1px solid var(--rule);border-radius:10px;background:var(--paper);padding:18px;display:flex;
  flex-direction:column;gap:8px;min-height:150px}
.listcard h3{font-family:var(--serif);font-style:italic;font-weight:600;font-size:24px;line-height:30px}
.listcard p{color:var(--muted);font-size:15px;line-height:22px}
.listcard .ft{margin-top:auto;display:flex;justify-content:space-between;align-items:center;font-size:14px;color:var(--muted)}
.strip{display:flex;gap:4px}
.strip img{width:56px;height:42px;object-fit:cover;border-radius:4px}
.medcard{border:1px solid var(--rule);border-radius:10px;overflow:hidden;background:var(--paper);display:block}
.medcard img{aspect-ratio:288/216;object-fit:cover;width:100%}
.medcard .b{padding:12px}
.medcard b{font-family:var(--serif);font-style:italic;font-weight:600;font-size:20px;display:block}
.medcard span{font-size:14px;color:var(--muted)}
@media (max-width:1099px){.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}.grid4{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:767px){.grid3,.grid4{grid-template-columns:1fr;gap:14px}}

/* ── live region, toast ─────────────────────────────────────────────────── */
.live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(90px + env(safe-area-inset-bottom,0px));
  z-index:150;background:var(--pine);color:var(--warmwhite);padding:12px 18px;border-radius:999px;
  font-size:15px;font-weight:600;box-shadow:var(--shadow);max-width:88vw}
@media (min-width:768px){.toast{bottom:32px}}

@media (max-width:767px){
  /* a dropdown opened on a phone must not run off the screen */
  .dropdown .menu{position:fixed;left:8px;right:8px;top:auto;
    bottom:calc(78px + env(safe-area-inset-bottom,0px));max-height:52vh}
  /* Spec § Width rules — “At 390 and 430 the row stays on one line.” The five controls
     must fit 358 px at 390, so below 431 px they tighten rather than wrap. */
}
@media (max-width:430px){
  .toolbar{gap:5px}
  .dropdown>button{padding:0 7px;font-size:13px;gap:4px}
  .dropdown>button .i{width:13px;height:13px}
  .viewswitch button{padding:0 7px;font-size:13px;gap:4px}
  .viewswitch button .i{width:13px;height:13px}
  .countline{margin-top:10px}
  .rows{margin-top:6px}
}
/* Spec § Width rules — “At 768–1099 keep a 24 px content gutter and allow the desktop toolbar
   to wrap.” This MUST sit after the `.toolbar` base rule: with equal specificity the later rule
   wins, and an earlier media block is silently discarded. Declared here so source order cannot
   undo it. Without the wrap the List/Map switch was compressed inside a fixed-width box at
   768 px — the document reported no overflow and the control was visually clipped. */
@media (max-width:1099px){
  .toolbar{flex-wrap:wrap}
  .viewswitch{flex:0 0 auto}
  .dropdown{flex:0 0 auto}
}
@media (max-width:389px){
  .toolbar{gap:4px}          /* spec: 4 px gaps at 320–389 */
  /* Compact status presentation where the phone width is constrained. Every status keeps its
     own shape, its full word (visually hidden nowhere) and its aria-pressed role — only the
     metrics tighten, so all four still fit one row at 320. */
  .dstatus{gap:3px}
  .stbtn{font-size:12.5px;padding:0 4px;gap:4px}
  .stbtn .i{width:15px;height:15px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:0s!important;transition-duration:0s!important}
  .sk i{animation:none}
}
