/* Best Beefs: onion-roll cream, roast beef red, James River orange, cheese gold. */
:root {
  --roll: #fbf4e8;
  --roll-2: #f4e8d3;
  --card: #fffaf2;
  --ink: #1b120d;
  --ink-2: #5b4a3f;
  --line: #e7d7bf;
  --beef: #7a1f12;
  --beef-2: #b5361b;
  --sauce: #d2561e;
  --cheese: #f2b33d;
  --gold: #e3a21a;
  --green: #2f7d4f;
  --display: "Bowlby One", "Arial Black", Impact, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --r: 18px;
  --shadow: 0 1px 0 rgba(27, 18, 13, .04), 0 10px 30px -12px rgba(122, 31, 18, .25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--roll); color: var(--ink); font: 16px/1.5 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--sauce); outline-offset: 2px; border-radius: 6px; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
main:focus, main:focus-visible { outline: none; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; outline: none; }

/* ---------- loader: a sandwich stacks itself ---------- */
#loader { position: fixed; inset: 0; z-index: 3000; background: var(--roll); display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .5s, visibility .5s; }
#loader.done { opacity: 0; visibility: hidden; }
#loader .stack { display: flex; flex-direction: column; align-items: center; width: 150px; }
#loader i { display: block; opacity: 0; transform: translateY(-60px); animation: drop .42s cubic-bezier(.3, 1.5, .5, 1) forwards; }
#loader .bun-bottom { width: 140px; height: 26px; border-radius: 0 0 26px 26px; background: #d9933c; animation-delay: .05s; order: 6; }
#loader .beef { width: 150px; height: 18px; border-radius: 10px; background: var(--beef); animation-delay: .2s; order: 5; margin-bottom: -4px; }
#loader .beef.b2 { background: var(--beef-2); animation-delay: .32s; order: 4; width: 144px; }
#loader .sauce { width: 146px; height: 10px; border-radius: 0 0 10px 10px; background: var(--sauce); animation-delay: .44s; order: 3; }
#loader .cheese { width: 152px; height: 12px; background: var(--cheese); clip-path: polygon(0 0, 100% 0, 96% 100%, 80% 40%, 62% 100%, 44% 40%, 26% 100%, 8% 40%, 2% 100%); animation-delay: .56s; order: 2; }
#loader .bun-top { width: 140px; height: 54px; border-radius: 70px 70px 10px 10px; background: radial-gradient(circle at 30% 35%, #fbf4e8 2px, transparent 3px) 0 0 / 24px 18px, #e8a54b; animation-delay: .7s; order: 1; }
#loader .loader-word { margin: 0; font: 30px var(--display); color: var(--beef); letter-spacing: .02em; opacity: 0; animation: fade .4s .9s forwards; }
@keyframes drop { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px max(20px, env(safe-area-inset-left)); background: rgba(251, 244, 232, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 22px/1 var(--display); color: var(--beef); }
.brand svg { width: 38px; height: 38px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--roll-2); }
.nav a.on { background: var(--ink); color: var(--roll); }
#account { display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--cheese); display: inline-grid; place-items: center; font-weight: 800; color: var(--beef); flex: none; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 700; }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 8px 12px; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { flex: 1; text-align: center; padding: 8px 6px; font-size: 15px; }
  #account { margin-left: auto; }
  .me-btn > span:not(.avatar) { display: none; }
  .me-btn { padding: 4px; }
}

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 800; text-decoration: none; background: var(--ink); color: var(--roll); transition: transform .15s, background .15s; min-height: 44px; }
.btn:hover { transform: translateY(-1px); }
.btn.beef { background: var(--beef); }
.btn.beef:hover { background: var(--beef-2); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.small { padding: 8px 14px; min-height: 36px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--roll-2); color: var(--ink-2); }
.chip.gold { background: #fdecc3; color: #7a5208; }
.chip.live { background: #fde4dc; color: var(--beef-2); }
.chip.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--beef-2); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.cup { width: 16px; height: 16px; color: var(--gold); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding: 44px 0 28px; }
.hero h1 { font: clamp(42px, 7vw, 86px)/.95 var(--display); margin: 14px 0 16px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--beef-2); }
.hero p.lede { font-size: 19px; color: var(--ink-2); max-width: 34ch; margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.clock { background: var(--ink); color: var(--roll); border-radius: 26px; padding: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.clock::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 179, 61, .35), transparent 70%); }
.clock h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--cheese); }
.clock .count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 16px; }
.clock .count div { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 10px 4px; text-align: center; }
.clock .count b { display: block; font: 30px/1 var(--display); }
.clock .count span { font-size: 12px; opacity: .7; }
.clock .stats { display: flex; justify-content: space-between; font-size: 14px; opacity: .85; }
.clock .yours { margin-top: 14px; padding: 12px; border-radius: 14px; background: rgba(242, 179, 61, .15); font-weight: 700; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 26px; } }

/* ---------- the board (live race) ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.section-head h2 { font: 30px/1 var(--display); margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { font: inherit; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; min-height: 40px; }
.filters input { width: 210px; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow: hidden; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.row .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(242, 179, 61, .28), rgba(210, 86, 30, .14)); transition: width .9s cubic-bezier(.2, .8, .2, 1); z-index: 0; }
.row > *:not(.bar) { position: relative; z-index: 1; }
.row .rank { font: 22px/1 var(--display); color: var(--ink-2); text-align: center; }
.row:nth-child(1) .rank { color: var(--gold); }
.row .who a { font-weight: 800; font-size: 17px; text-decoration: none; }
.row .who a:hover { text-decoration: underline; }
.row .meta { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 14px; flex-wrap: wrap; margin-top: 2px; }
.row .right { display: flex; align-items: center; gap: 12px; }
.row .votes { text-align: right; min-width: 64px; }
.row .votes b { display: block; font: 22px/1 var(--display); }
.row .votes span { font-size: 12px; color: var(--ink-2); }
.row.mine { border-color: var(--sauce); box-shadow: 0 0 0 2px rgba(210, 86, 30, .25); }
@media (max-width: 600px) {
  .row { grid-template-columns: 30px 1fr; }
  .row .right { grid-column: 1 / -1; justify-content: space-between; }
  .row .votes { text-align: left; }
}

/* ---------- last week's champ banner ---------- */
.champ { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r); background: linear-gradient(120deg, #fdecc3, #fbd9a8); border: 1px solid #f0c77a; margin-top: 8px; }
.champ svg { width: 44px; height: 44px; color: var(--gold); flex: none; }
.champ b { font-family: var(--display); font-weight: 400; }

/* ---------- spot page ---------- */
.spot-hero { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding: 34px 0 10px; align-items: start; }
.spot-hero h1 { font: clamp(34px, 5vw, 58px)/1 var(--display); margin: 10px 0; }
.spot-hero .addr { color: var(--ink-2); font-size: 17px; margin: 0 0 14px; }
.spot-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.spot-card .big { font: 54px/1 var(--display); }
.trophy-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.minimap { height: 220px; border-radius: 16px; overflow: hidden; margin-top: 14px; border: 1px solid var(--line); }
@media (max-width: 860px) { .spot-hero { grid-template-columns: 1fr; } }

/* ---------- comments ---------- */
.comments { max-width: 760px; }
.composer { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.composer textarea { font: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 88px; resize: vertical; background: #fff; }
.composer .row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment .head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.comment .head b { font-weight: 800; }
.comment .head time { color: var(--ink-2); font-size: 13px; }
.comment p { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .tools { display: flex; gap: 12px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 13px; font-weight: 700; text-decoration: underline; }
.empty { color: var(--ink-2); padding: 18px 0; }

/* ---------- map ---------- */
.map-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-top: 10px; }
#map, .minimap { position: relative; z-index: 0; isolation: isolate; }   /* keep Leaflet's z-indexes inside the map */
#map { height: min(70vh, 640px); border-radius: 24px; border: 1px solid var(--line); overflow: hidden; }
.map-list { max-height: min(70vh, 640px); overflow: auto; display: grid; gap: 8px; align-content: start; padding-right: 4px; }
.map-item { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.map-item b { display: block; }
.map-item span { color: var(--ink-2); font-size: 14px; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--beef); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); display: grid; place-items: center; }
.pin i { transform: rotate(45deg); color: #fff; font: 12px var(--display); font-style: normal; }
.pin.top { background: var(--gold); }
.leaflet-popup-content { font: 14px/1.4 var(--body); }
@media (max-width: 860px) { .map-wrap { grid-template-columns: 1fr; } #map { height: 55vh; } .map-list { max-height: none; } }

/* ---------- trophy room ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.trophy { text-align: center; background: linear-gradient(180deg, var(--card), #fdf1dc); border: 1px solid var(--line); border-radius: 22px; padding: 22px 14px 16px; position: relative; }
.trophy svg { width: 70px; height: 70px; color: var(--gold); filter: drop-shadow(0 6px 10px rgba(227, 162, 26, .35)); }
.trophy .wk { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.trophy h3 { font: 20px/1.1 var(--display); margin: 8px 0 4px; }
.trophy h3 a { text-decoration: none; }
.trophy .plinth { margin-top: 12px; height: 10px; border-radius: 6px; background: var(--beef); }
.trophy.none svg { color: #cdbda4; filter: none; }
.hall { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hall li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.hall .cups { margin-left: auto; display: flex; gap: 2px; }

/* ---------- prose pages ---------- */
.prose { max-width: 720px; padding: 30px 0; }
.prose h1 { font: 40px/1.05 var(--display); }
.prose h2 { font: 22px/1.2 var(--display); margin-top: 28px; }
.prose li { margin: 6px 0; }

/* ---------- modal, toast ---------- */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(440px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(27, 18, 13, .35); }
dialog::backdrop { background: rgba(27, 18, 13, .5); backdrop-filter: blur(3px); }
.modal-body { padding: 24px; display: grid; gap: 14px; }
.modal-body h2 { font: 26px/1.05 var(--display); margin: 0; }
.modal-body p { margin: 0; color: var(--ink-2); }
.modal-body input { font: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
#gbtn { min-height: 44px; display: flex; justify-content: center; }
#toast:empty { display: none; }
#toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 40px)); background: var(--ink); color: var(--roll); padding: 12px 18px; border-radius: 999px; font-weight: 700; z-index: 60; transition: transform .35s cubic-bezier(.2, .8, .2, 1); max-width: calc(100% - 32px); text-align: center; }
#toast.show { transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #e9dcc8; padding: 40px 20px 24px; margin-top: 40px; }
.foot-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.foot .brand { color: var(--cheese); }
.foot p { color: #c9b9a3; max-width: 44ch; }
.foot h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--cheese); }
.foot-grid a:not(.brand) { display: block; text-decoration: none; padding: 4px 0; }
.foot-grid a:hover { text-decoration: underline; }
.foot .foot-small { max-width: 1180px; margin: 26px auto 0; font-size: 13px; color: #a8977f; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- vote celebration ---------- */
.slice { position: fixed; top: -40px; z-index: 70; width: 26px; height: 12px; border-radius: 6px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(var(--spin)); } }
.reveal { opacity: 0; transform: translateY(14px); animation: rise .5s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- closest beef ---------- */
.near { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: center; margin-top: 18px; padding: 20px; border-radius: 24px; background: var(--card); border: 1px dashed var(--sauce); }
.near h2 { font: 24px/1.05 var(--display); margin: 0 0 4px; }
.near p { margin: 0; color: var(--ink-2); }
.near-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.near-card { display: grid; gap: 2px; align-content: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.near-card .mi { font: 22px/1 var(--display); color: var(--sauce); }
.near-card a b { font-size: 16px; }
.near-card .town { color: var(--ink-2); font-size: 14px; }
.near-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .near { grid-template-columns: 1fr; } .near-grid { grid-template-columns: 1fr; } }

/* ---------- the Beef Exchange: a stock board ---------- */
.exchange { margin-top: 22px; background: #15100c; color: #f3e9da; border-radius: 28px; padding: 22px; box-shadow: var(--shadow); }
.ex-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.ex-head h2 { font: 32px/1 var(--display); margin: 6px 0 4px; color: #fff; }
.ex-head p { margin: 0; color: #b9a990; }
.ex-live { display: inline-flex; align-items: center; gap: 6px; font: 800 12px/1 var(--body); letter-spacing: .14em; color: #4fd18b; }
.ex-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4fd18b; animation: pulse 1.4s infinite; }
.ex-total { text-align: right; }
.ex-total b { display: block; font: 40px/1 var(--display); color: var(--cheese); }
.ex-total span { font-size: 13px; color: #b9a990; }
.ex-chart { margin-top: 14px; background: #1d1611; border: 1px solid #2e241c; border-radius: 18px; padding: 8px; }
.ex-chart svg { width: 100%; height: auto; display: block; }
.ex-chart .grid line { stroke: #2e241c; stroke-dasharray: 3 5; }
.ex-chart .grid text, .ex-chart .xl { fill: #8f806b; font: 12px var(--body); }
.ex-chart .line path { fill: none; stroke: var(--c); stroke-width: 3; stroke-linejoin: round; transition: opacity .2s; }
.ex-chart .line circle { fill: var(--c); stroke: #15100c; stroke-width: 2; }
.ex-chart .line text { fill: var(--c); font: 800 12px var(--body); letter-spacing: .04em; }
.ex-chart.focus .line { opacity: .15; }
.ex-chart.focus .line.on { opacity: 1; }
.ex-chart.focus .line.on path { stroke-width: 4.5; }
.ex-empty { color: #b9a990; text-align: center; padding: 60px 10px; margin: 0; }
.tickers { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.tk { display: grid; grid-template-columns: 26px 74px 1fr 120px 54px 82px auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #1d1611; border: 1px solid #2e241c; }
.tk:hover { border-color: var(--c); }
.tk-rank { font: 18px var(--display); color: #8f806b; text-align: center; }
.tk-sym { font: 800 13px/1 var(--body); letter-spacing: .06em; color: #15100c; background: var(--c); border-radius: 6px; padding: 6px 7px; text-align: center; }
.tk-name { color: #fff; text-decoration: none; font-weight: 800; min-width: 0; }
.tk-name small { display: block; color: #8f806b; font-weight: 500; font-size: 13px; }
.tk-spark { width: 120px; height: 32px; }
.tk-spark path { fill: none; stroke: var(--c); stroke-width: 2; }
.tk-votes { font: 22px/1 var(--display); text-align: right; }
.tk-ch { font: 800 14px/1.1 var(--body); text-align: right; }
.tk-ch small { display: block; font-weight: 500; font-size: 11px; color: #8f806b; }
.tk-ch.up { color: #4fd18b; } .tk-ch.down { color: #ff6b4a; } .tk-ch.flat { color: #8f806b; }
.tk-act { display: flex; gap: 6px; justify-content: flex-end; }
.exchange .btn.ghost { color: #f3e9da; box-shadow: inset 0 0 0 2px #4a3b2e; }
.exchange .chip.gold { background: #3a2c12; color: var(--cheese); }
@media (max-width: 860px) {
  .exchange { padding: 16px; border-radius: 22px; }
  .tk { grid-template-columns: 22px 64px 1fr 48px; grid-template-areas: "r s n v" "r ch ch sp" "a a a a"; row-gap: 8px; }
  .tk-rank { grid-area: r; } .tk-sym { grid-area: s; } .tk-name { grid-area: n; } .tk-votes { grid-area: v; }
  .tk-ch { grid-area: ch; text-align: left; } .tk-spark { grid-area: sp; justify-self: end; } .tk-act { grid-area: a; justify-content: flex-start; }
}
.ex-chart.narrow .line text { font-size: 18px; }
.ex-chart.narrow .grid text, .ex-chart.narrow .xl { font-size: 16px; }
.ex-chart.narrow .line path { stroke-width: 4; }

/* ---------- profiles ---------- */
.profile { padding: 34px 0 10px; display: grid; gap: 18px; max-width: 760px; }
.pf-card { display: flex; gap: 22px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: var(--shadow); }
.pf-photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex: none; background: var(--cheese); display: grid; place-items: center; border: 4px solid #fff; box-shadow: 0 6px 20px rgba(122, 31, 18, .25); }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pf-photo span { font: 48px var(--display); color: var(--beef); }
.pf-photo.small { width: 72px; height: 72px; border-width: 3px; }
.pf-photo.small span { font-size: 28px; }
.pf-main h1 { font: clamp(30px, 5vw, 44px)/1 var(--display); margin: 0 0 6px; overflow-wrap: anywhere; }
.pf-meta { margin: 0; color: var(--ink-2); }
.pf-fav { display: inline-grid; margin-top: 12px; text-decoration: none; background: linear-gradient(120deg, #fdecc3, #fbd9a8); border: 1px solid #f0c77a; border-radius: 16px; padding: 10px 14px; }
.pf-fav small { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7a5208; }
.pf-fav b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.pf-fav span { color: var(--ink-2); font-size: 14px; }
.pf-edit { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.pf-edit h2 { font: 22px/1 var(--display); margin: 0 0 6px; }
.pf-edit label:not(.btn) { font-weight: 800; margin-top: 8px; }
.pf-edit input, .pf-edit select { font: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; min-height: 46px; }
.pf-row { display: flex; gap: 16px; align-items: center; }
.pf-row label.btn { cursor: pointer; }
.pf-hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.pf-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--ink-2); }
.pf-actions p { margin: 0; flex: 1 1 260px; }
.pf-comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pf-comment time { color: var(--ink-2); font-size: 13px; margin-left: 8px; }
.pf-comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cname { font-weight: 800; text-decoration: none; }
.cname:hover { text-decoration: underline; }
.chip.fav { font-size: 12px; padding: 2px 8px; background: #fde4dc; color: var(--beef); }
@media (max-width: 600px) { .pf-card { flex-direction: column; text-align: center; } .pf-photo { width: 104px; height: 104px; } }

/* ---------- add to home screen ---------- */
#homebar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--roll); border-radius: 20px; padding: 10px 10px 10px 12px; box-shadow: 0 16px 40px rgba(27, 18, 13, .4); animation: rise .45s cubic-bezier(.2, .8, .2, 1); }
#homebar img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
#homebar div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
#homebar b { font-size: 14px; }
#homebar span { font-size: 12px; color: #c9b9a3; }
#homebar .x { background: none; border: 0; color: #c9b9a3; font-size: 24px; line-height: 1; padding: 4px 6px; }
.steps { display: grid; gap: 10px; padding-left: 22px; margin: 0; }
.steps li { line-height: 1.45; }
.share-ic { width: 20px; height: 20px; vertical-align: -4px; color: #2f7bf6; }
