/* The "Stamp" look: two colours, poster capitals for anything that shouts, hard corners.
   Oat-on-espresso is kept for one meaning: no extra charge. */
:root {
  --esp: #3f2616;
  --tan: #e8d3b0;
  --pale: #fffaf0;
  --wash: #f1e2c6;
  --line: #eadfca;
  --bar-h: 60px;
  --add-h: 64px;
  --r: 6px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shout: 'Anton', Impact, 'Arial Narrow', sans-serif; /* only the F#$K THE label and big figures */
  --caps: 'Hanken Grotesk', 'Archivo', system-ui, sans-serif; /* capitals everywhere else, weight 800 */
  /* Riso print: two inks on one paper. The crema drum is printed slightly out of register,
     and the same grain runs through the brown and the oat, so they read as one printed sheet. */
  --crema: #c1884f;
  --mx: -2px; --my: -3px;
  --miss: var(--mx) var(--my) 0 0 var(--crema);
  --grain-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .98 0 0 0 0 .94 0 1.32 0 0 -.814'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .15 0 0 0 0 .08 1.1 0 0 0 -.66'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-oat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .98 0 0 0 0 .94 0 .92 0 0 -.57'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .15 0 0 0 0 .08 .77 0 0 0 -.46'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Archivo, system-ui, -apple-system, sans-serif; font-size: 15px; color: var(--esp); background: var(--tan); overflow: hidden; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--esp); outline-offset: 2px; }
#card :focus-visible { outline-color: var(--tan); }

/* The name: brand lettering, leaning forward. */
.mk { font-family: 'Modak', system-ui, sans-serif; letter-spacing: -0.03em; line-height: 1; display: inline-block; transform: skewX(-11.3deg); transform-origin: left bottom; text-decoration: none; }
/* The small label slapped on the name. */
.tag { font-family: var(--shout); text-transform: uppercase; line-height: 1; white-space: nowrap; letter-spacing: .04em; background: var(--esp); color: var(--tan); border-radius: 3px; transform: rotate(-4deg); flex: none; position: relative; z-index: 1; box-shadow: var(--miss); }

#app { position: fixed; inset: 0; overflow: hidden; background: var(--grain-oat), var(--tan); }
/* The grain is printed over the map too (it never sits over our own small type). */
#map::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: var(--grain-ink); }
#map { position: absolute; inset: var(--bar-h) 0 calc(var(--add-h) + var(--safe-b)) 0; background: var(--pale); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* The visitor's own dot: a quiet ring pulsing outward from it. */
.me-pulse { width: 18px; height: 18px; pointer-events: none; }
.me-pulse i { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--esp); animation: me-pulse 2.6s ease-out infinite; }
@keyframes me-pulse { 0% { transform: scale(1); opacity: .35; } 70%, 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .me-pulse { display: none; } }

/* No mylk tax / Prices: a small two-way switch floating on the map. */
.viewtog { position: absolute; left: 12px; top: calc(var(--bar-h) + 10px); z-index: 4; display: flex; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); box-shadow: var(--miss); overflow: hidden; }
.viewtog button { font: 800 12px/1 var(--caps); letter-spacing: .02em; text-transform: uppercase; padding: 8px 10px; color: var(--esp); }
.viewtog button[aria-pressed="true"] { background: var(--esp); color: var(--tan); }
#searchBox:not([hidden]) ~ .viewtog, #add:not([hidden]) ~ .viewtog { display: none; }

/* Surcharge sliders (add a cafe, corrections, "they charged me extra"). */
.prices { display: flex; flex-direction: column; gap: 8px; }
.phint { margin: -4px 0 2px; font-size: 13px; opacity: .8; }
.prow { display: grid; grid-template-columns: auto 1fr 7.2em; align-items: center; gap: 10px; }
.prow:not(:has(.chip)) { grid-template-columns: 1fr 7.2em; }
.prow input[type=range] { width: 100%; accent-color: var(--esp); }
.prow input[type=range]:disabled { opacity: .35; }
.prow .pval { font-size: 13.5px; font-weight: 700; text-align: right; white-space: nowrap; }
.prow.charged .pval { color: #8a5a2e; }
.prow:not(.on) .pval { opacity: .55; font-weight: 600; }
#aNote, .nin { width: 100%; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); padding: 11px 12px; font-size: 15px; }

/* On the card: the extra charges, and visitors' notes. */
.charges { margin: 10px 0 0; font-size: 14px; font-weight: 600; opacity: .9; }
.stamp.charge { background: transparent; color: var(--tan); box-shadow: inset 0 0 0 2px var(--tan), var(--miss); }
.cnotes { margin-top: 6px; }
.cnotes .nlbl { font: 800 11.5px/1 var(--caps); letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin: 10px 0 6px; }
.cnotes .note1 { margin: 0 0 6px; font-size: 14px; line-height: 1.35; }
.cnotes .note1 small { opacity: .7; }
.cnotes .quiet { padding: 6px 0; }
.cnotes .nin { display: block; width: 100%; margin-top: 2px; color: var(--esp); resize: none; font: 500 16px/1.4 Archivo, system-ui, sans-serif; border-color: var(--tan); }
.cnotes .nin:focus { outline: none; box-shadow: var(--miss); }
.cnotes .nmeta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12.5px; opacity: .8; }
.cnotes .nrow { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.cnotes .nrow .quiet { margin: 0; flex: none; padding: 10px 8px; }
.cnotes .nrow .primary { flex: 1; }
/* While writing a note, the card shows only its name and the note. */
#card.noting .addr, #card.noting .facts, #card.noting .charges, #card.noting .vline, #card.noting .when, #card.noting .ask { display: none; }
#card.noting .cnotes .nlbl { margin-top: 14px; }

/* ---------- top bar (phone) ---------- */
#bar { position: absolute; left: 0; right: 0; top: 0; height: var(--bar-h); z-index: 5; background: var(--grain-oat), var(--tan); padding: 0 4px 0 16px; display: flex; align-items: center; gap: 2px; }
.bar-brand { display: flex; flex-direction: column; align-items: flex-start; margin-right: auto; }
.bar-tag { font-size: 11px; padding: 2px 5px 3px; margin: 0 0 -1px 0; }
.bar-mk { font-size: 30px; margin-left: -2px; }
.ic { width: 40px; height: 40px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex: none; }
.ic.on { background: var(--esp); color: var(--tan); }
.ic svg { width: 22px; height: 22px; }


#searchBox { position: absolute; left: 10px; right: 10px; top: calc(var(--bar-h) + 8px); z-index: 7; }
#searchBox input { width: 100%; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); padding: 12px 14px; font-size: 16px; box-shadow: 0 6px 18px rgba(60, 30, 10, .2); }
.results { margin-top: 6px; background: var(--pale); border-radius: var(--r); overflow: hidden; box-shadow: 0 6px 18px rgba(60, 30, 10, .2); }
.results:empty { display: none; }
.results .grp { font: 800 12px/1 var(--caps); letter-spacing: .06em; text-transform: uppercase; padding: 12px 14px 6px; background: var(--wash); }
.results button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.results small { display: block; font-size: 13px; font-weight: 500; opacity: .72; }
.addtag { font: 400 14px/1 var(--shout); font-style: normal; letter-spacing: .06em; text-transform: uppercase; background: var(--esp); color: var(--tan); padding: 5px 8px 6px; border-radius: 3px; flex: none; }

.menu { position: absolute; right: 46px; top: calc(var(--bar-h) - 2px); z-index: 7; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); box-shadow: 0 6px 18px rgba(60, 30, 10, .25); overflow: hidden; min-width: 190px; }
.menu button { display: flex; justify-content: space-between; width: 100%; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 15px; text-align: left; }
.menu button.cur { font-weight: 700; }
.menu button.sep { border-top: 6px solid var(--wash); }

/* ---------- buttons and controls ---------- */
.primary { background: var(--esp); color: var(--tan); border-radius: var(--r); min-height: 58px; padding: 10px 16px; font-weight: 700; font-size: 17px; text-align: center; width: 100%; }
.primary[disabled] { opacity: .35; cursor: default; }
.ghost { display: block; width: 100%; border-radius: var(--r); padding: 13px; font-weight: 700; font-size: 15px; text-align: center; text-decoration: none; border: 2px solid var(--esp); margin-top: 8px; }
a.primary { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.quiet { display: block; margin: 8px auto 0; padding: 10px 6px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; opacity: .85; text-align: center; }
.quiet.left { margin-left: 0; padding-left: 0; text-align: left; }
/* Add a cafe: a bar that is part of the page, docked to its bottom edge. */
.bigadd { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; width: auto; height: calc(var(--add-h) + var(--safe-b)); min-height: 0; padding: 0 16px var(--safe-b); border-radius: 0; background: var(--grain-ink), var(--esp); box-shadow: var(--miss); font: 800 20.5px/1 var(--caps); letter-spacing: -.01em; text-transform: uppercase; }
.loc { box-shadow: var(--miss); position: absolute; right: 12px; bottom: calc(var(--add-h) + 40px + var(--safe-b)); z-index: 5; width: 46px; height: 46px; border-radius: var(--r); background: var(--pale); border: 2px solid var(--esp); font-size: 20px; font-weight: 700; }
.loc.on { background: var(--esp); color: var(--tan); }
#notice { position: absolute; left: 12px; right: 12px; top: calc(var(--bar-h) + 10px); z-index: 11; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); padding: 10px 12px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 6px 18px rgba(60, 30, 10, .2); }
#noticeBtn { background: var(--esp); color: var(--tan); border-radius: var(--r); padding: 8px 14px; font-weight: 700; flex: none; }
#noticeBtn:empty { display: none; }
#emptyHint { position: absolute; left: 12px; right: 70px; bottom: calc(var(--add-h) + 40px + var(--safe-b)); z-index: 5; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); padding: 11px 13px; font-weight: 600; font-size: 14px; text-align: left; line-height: 1.35; }
#toast { position: absolute; left: 12px; right: 12px; top: calc(var(--bar-h) + 10px); z-index: 12; background: var(--esp); color: var(--tan); border-radius: var(--r); padding: 12px 14px; font-weight: 600; display: none; }
#toast.show { display: block; }

/* ---------- sheets ---------- */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; background: var(--pale); padding: 20px 20px calc(16px + var(--safe-b)); box-shadow: 0 -6px 20px rgba(60, 30, 10, .18); transform: translateY(105%); transition: transform .22s ease; visibility: hidden; }
.sheet.show { transform: none; visibility: visible; }
.grab { display: none; }
.head { display: flex; align-items: flex-start; gap: 8px; }
.head h2, .head h3 { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; font: 800 24.6px/1.05 var(--caps); letter-spacing: -.01em; text-transform: uppercase; }
.head h3 { font-size: 24px; }
.acts { display: flex; flex: none; margin: -8px -11px 0 0; }
.abtn { width: 40px; height: 40px; border-radius: var(--r); color: inherit; display: flex; align-items: center; justify-content: center; flex: none; }
.abtn svg { width: 21px; height: 21px; }

/* The cafe card is the one espresso surface: it says "no extra charge". */
#card { background: var(--grain-ink), var(--esp); color: var(--tan); }
#card .head h2 { font-size: 36px; line-height: 1.02; }
.addr { display: inline-block; margin: 8px 0 0; font-size: 14.5px; opacity: .85; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.facts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 11px; margin-top: 20px; }
.stamp { background: var(--grain-oat), var(--tan); color: var(--esp); font: 400 21px/1 var(--shout); letter-spacing: .03em; text-transform: uppercase; padding: 5px 9px 6px; border-radius: 3px; transform: rotate(-3deg); flex: none; box-shadow: var(--miss); }
.say { font-weight: 600; font-size: 16px; line-height: 1.3; }
.vline, .when { margin: 12px 0 0; font-size: 13.5px; opacity: .72; }
.vline + .when { margin-top: 8px; }
.when.old { opacity: 1; background: var(--wash); color: var(--esp); border-radius: var(--r); padding: 8px 10px; }
.ask { margin-top: 20px; min-height: 164px; }
.ask .done { margin-top: 8px; }
#card .ghost { border-color: var(--tan); }
#card .primary { background: var(--grain-oat), var(--tan); color: var(--esp); box-shadow: var(--miss); }
.done { background: var(--wash); border-radius: var(--r); padding: 11px 12px; font-weight: 600; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#card .done { background: rgba(232, 211, 176, .16); }
.undo { text-decoration: underline; font-weight: 600; flex: none; }

/* "Something's different": one fixed size through every step */
#diff { height: 430px; display: flex; flex-direction: column; }
.dhead { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; min-height: 40px; margin: -8px -11px 0; }
#dTitle { font-weight: 700; font-size: 15px; line-height: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbody { flex: 1; padding-top: 18px; overflow: auto; }
.dbody h3 { font: 800 19.7px/1.1 var(--caps); letter-spacing: -.01em; text-transform: uppercase; margin: 0 0 14px; }
.dbody p { margin: 0; }
.dfoot { min-height: 58px; display: flex; align-items: flex-end; }
.rows { background: var(--wash); border-radius: var(--r); overflow: hidden; }
.rows button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px; font-size: 15px; font-weight: 600; text-align: left; border-bottom: 1.5px solid var(--pale); }
.rows button span { opacity: .6; font-size: 18px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--esp); border-radius: var(--r); min-height: 40px; padding: 0 15px; font-size: 15px; font-weight: 700; background: transparent; }
.chip.on { background: var(--esp); color: var(--tan); }
/* Milk chips are tick boxes, and look like it. */
#aChips .chip, .dbody .chip { padding: 0 14px 0 11px; }
#aChips .chip::before, .dbody .chip::before { content: ''; width: 17px; height: 17px; flex: none; border: 2px solid currentColor; border-radius: 3px; }
#aChips .chip.on::before, .dbody .chip.on::before { border-color: var(--tan); background: var(--tan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.3l2.9 2.9 5.9-6.4' fill='none' stroke='%233f2616' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px 15px no-repeat; }
.vegrow { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding: 10px 0; text-align: left; }
.vegrow .box { width: 22px; height: 22px; border: 2px solid var(--esp); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex: none; }
.vegrow.on .box { background: var(--esp); color: var(--tan); }
.vegrow.on .box::after { content: '✓'; }
.dbody .vegrow { margin-top: 14px; padding-top: 14px; border-top: 1.5px solid var(--line); width: 100%; }

/* nearest list */
.rowi { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; text-align: left; gap: 12px; }
.rowi b { display: block; }
.rowi i { font-style: normal; font-size: 12.5px; opacity: .75; }
.rowi small { opacity: .7; flex: none; }
#nBody { margin-top: 10px; }
#nBody p { margin: 6px 0 12px; line-height: 1.45; }

/* explainer */
.why { margin: 12px 0 0; line-height: 1.45; }
#help .primary { margin-top: 16px; }

/* ---------- add a cafe: the form takes the map's place under the same header ---------- */
#add { position: absolute; inset: var(--bar-h) 0 0 0; z-index: 10; background: var(--grain-oat), var(--tan); padding: 16px 16px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.add-top { display: flex; align-items: center; gap: 4px; }
.add-top h2 { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; font: 800 25.4px/1.05 var(--caps); letter-spacing: -.01em; text-transform: uppercase; }
.add-top #aClose { margin-right: -11px; align-self: flex-start; }
.add-top #aBack { margin-left: -11px; align-self: flex-start; }
#aNone:empty { display: none; }
#aNone { display: flex; flex-direction: column; gap: 10px; }
#aNone .quiet { margin: 0; padding: 4px 0; }
#aNone .none { margin: 0; font-weight: 600; }
#aNone .ghost { background: var(--pale); }
#aSuggest { display: flex; flex-direction: column; gap: 10px; }
#aSuggest .chosen { margin: -6px 0 2px; }
.chosen { margin: -6px 0 6px; font-size: 14.5px; opacity: .8; }
#aConfirm { display: flex; flex-direction: column; gap: 10px; flex: 1; }
#aPick { display: flex; flex-direction: column; gap: 10px; }
.useloc { width: 100%; border: 2px solid var(--esp); border-radius: var(--r); padding: 13px; text-align: center; font-weight: 700; font-size: 16px; background: var(--pale); }
.whyloc { font-size: 12.5px; opacity: .8; text-align: center; margin-top: 6px; }
.note { background: var(--wash); border-radius: var(--r); padding: 11px 12px; font-size: 13.5px; line-height: 1.4; }
.lbl { font-size: 13px; font-weight: 700; margin: 4px 0 2px; }
#aLoc .lbl { font: 800 12.5px/1 var(--caps); letter-spacing: .06em; text-transform: uppercase; margin: 4px 0 8px; }
.list { background: var(--pale); border-radius: var(--r); overflow: hidden; }
.list:empty { display: none; }
.list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 9px 14px; border-bottom: 1px solid var(--wash); font-size: 16px; font-weight: 700; text-align: left; }
.list button.pick { background: var(--esp); color: var(--tan); }
.list small { opacity: .72; font-size: 13px; font-weight: 500; flex: none; }
.list span small { display: block; }
#add input[type=search], #add input[type=text] { width: 100%; background: var(--pale); border: 2px solid var(--esp); border-radius: var(--r); padding: 13px 14px; font-size: 16px; }
#aTrap { position: absolute !important; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }
#add #aSubmit { margin-top: 14px; font: 800 18px/1 var(--caps); letter-spacing: -.01em; text-transform: uppercase; flex: none; }
#add .quiet { margin-top: 0; }

/* ---------- side panel (wide only) ---------- */
#side { display: none; }

/* ---------- loading screen ---------- */
#loader { position: fixed; inset: 0; z-index: 100; background: var(--esp); color: var(--tan); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 30px; clip-path: inset(0 0 0 0); }
#loader.exit { transition: clip-path .4s cubic-bezier(.7, 0, .2, 1); clip-path: inset(0 0 100% 0); }
.ld-inner { display: block; }
.ld-label { display: block; width: max-content; position: relative; z-index: 3; font-family: 'Anton', Impact, sans-serif; text-transform: uppercase; font-size: 50px; line-height: 1; white-space: nowrap; letter-spacing: .02em; background: var(--tan); color: var(--esp); padding: 7px 16px 9px; border-radius: 6px; margin: 0 0 18px 2px; transform: rotate(-4deg); }
.ld-sym { display: inline-block; width: .6em; text-align: center; }
.ld-mk { font-family: 'Modak', system-ui, sans-serif; font-size: min(142px, 36vw); line-height: 1; letter-spacing: -0.03em; display: block; width: max-content; position: relative; z-index: 1; margin-top: -.2em; transform: skewX(-11.3deg); transform-origin: left top; }
.ld-mk:first-of-type { margin-top: 0; }
.ld-st { opacity: 0; }
#loader.still .ld-st { opacity: 1; }
.ld-mk.in { animation: ld-stamp .12s cubic-bezier(.6, 0, 1, 1) forwards; }
.ld-label.in { animation: ld-stamp-tilt .12s cubic-bezier(.6, 0, 1, 1) forwards; }
/* If the scripts never run, the loading screen must not trap the visitor. */
#loader { animation: ld-failsafe 0s linear 8s forwards; }
@keyframes ld-failsafe { to { visibility: hidden; pointer-events: none; } }
.no-loader #loader { display: none; }
@keyframes ld-stamp { 0% { opacity: 0; transform: skewX(-11.3deg) scale(1.22); } 60% { opacity: 1; } 100% { opacity: 1; transform: skewX(-11.3deg); } }
@keyframes ld-stamp-tilt { 0% { opacity: 0; transform: rotate(-4deg) scale(1.35); } 60% { opacity: 1; } 100% { opacity: 1; transform: rotate(-4deg); } }
.ld-inner.jolt { animation: ld-jolt .14s linear; }
@keyframes ld-jolt { 0% { transform: translate(0, -4px); } 40% { transform: translate(3px, 3px); } 70% { transform: translate(-2px, -1px); } 100% { transform: none; } }
/* after the loader leaves, the Add button springs up */
body.arriving .bigadd { animation: rise .35s cubic-bezier(.2, 1.3, .4, 1) .15s both; }
body.arriving .loc { animation: rise .35s cubic-bezier(.2, 1.3, .4, 1) .25s both; }
@keyframes rise { from { transform: translateY(140px); } to { transform: none; } }

/* ---------- wide screens ---------- */
@media (min-width: 820px) {
  #bar, .bigadd { display: none; }
  #side { display: flex; flex-direction: column; gap: 16px; position: absolute; left: 0; top: 0; bottom: 0; width: 340px; background: var(--grain-oat), var(--tan); padding: 30px 24px 22px; z-index: 6; overflow: hidden; }
  .side-tag { font-size: 28px; padding: 5px 11px 7px; border-radius: 4px; align-self: flex-start; margin: 0 0 -19px 4px; box-shadow: 0 0 0 4px var(--tan); }
  .side-mk { font-size: 108px; line-height: .78; margin: 0 0 0 -8px; align-self: flex-start; }
  .side-line { margin: 2px 0 4px; font: 800 20.5px/1.18 var(--caps); letter-spacing: -.01em; text-transform: uppercase; }
  #side .primary { font: 800 18px/1 var(--caps); letter-spacing: -.01em; text-transform: uppercase; flex: none; }
  #side .chips { gap: 8px; }
  #side .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .side-links { margin-top: auto; display: flex; gap: 18px; font-size: 13px; }
  .side-links a { text-underline-offset: 3px; }
  #map { inset: 0 0 0 340px; }
  /* On a wide screen every panel starts just under the name and fills the rest of the column, so it covers the line, button and chips cleanly instead of cutting one in half. */
  .sheet { left: 0; right: auto; width: 340px; top: 238px; padding: 24px 24px 22px; box-shadow: none; z-index: 8; }
  #diff { height: auto; }
  #card .head h2 { font-size: 30px; }
  .loc { bottom: 40px; right: 16px; }
  #toast { left: 356px; right: auto; top: 16px; max-width: 420px; }
  #notice { left: 356px; right: auto; top: 76px; max-width: 420px; }
  #emptyHint { left: 356px; right: auto; bottom: 40px; max-width: 320px; }
  #searchBox { left: 356px; right: auto; top: 16px; width: 380px; display: block !important; }
  .viewtog { left: 752px; top: 18px; }
  #searchBox:not([hidden]) ~ .viewtog { display: flex; }
  .menu { display: none !important; }
  #add { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 400px; max-height: 86%; border-radius: var(--r); box-shadow: 0 20px 60px rgba(40, 20, 8, .45); }
  #loader { align-items: center; }
  body.arriving .loc { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet, #loader.exit { transition: none; }
  body.arriving .bigadd, body.arriving .loc { animation: none; }
}
