/* ===== Chin-Yi & Sixuan — pixel wedding site ===== */
:root {
  --wood: #b77a3e;
  --wood-hi: #d9a062;
  --wood-dark: #5a3418;
  --ink: #3b2414;
  --parch: #fbecc8;
  --parch-2: #f4dca6;
  --pink: #f08f87;
  --pink-hi: #ffb3a8;
  --pink-dark: #b8534d;
  --sky-1: #6f6ad6;
  --sky-2: #c58fd8;
  --sky-3: #f6b0a6;
  --grass: #7cbf4a;
  --px: 4px;
  --font: "Pixelify Sans", "VT323", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 100%) fixed;
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: none;
  image-rendering: pixelated;
}
/* blurred artwork behind sub-screens */
body::before {
  content: "";
  position: fixed; inset: -20px;
  background: url("assets/background.png") center / cover no-repeat;
  filter: blur(8px) brightness(.75) saturate(1.1);
  z-index: -1;
  opacity: 0;
  transition: opacity .4s;
}
body::before { opacity: 1; }

a { color: var(--pink-dark); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
kbd { font-family: inherit; background: var(--parch); border: 2px solid var(--wood-dark); padding: 0 6px; }

/* ---------- pixel frame helpers ---------- */
.panel {
  position: relative;
  background: var(--wood);
  color: var(--parch);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--wood-dark),
    0 var(--px) 0 0 var(--wood-dark),
    calc(var(--px) * -1) 0 0 0 var(--wood-dark),
    var(--px) 0 0 0 var(--wood-dark),
    inset 0 var(--px) 0 0 var(--wood-hi),
    inset 0 calc(var(--px) * -1) 0 0 rgba(0,0,0,.2),
    0 calc(var(--px) * 3) 0 0 rgba(0,0,0,.25);
  margin: var(--px);
}
.parchment {
  background: var(--parch);
  color: var(--ink);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--wood-dark),
    0 var(--px) 0 0 var(--wood-dark),
    calc(var(--px) * -1) 0 0 0 var(--wood-dark),
    var(--px) 0 0 0 var(--wood-dark),
    inset 0 0 0 var(--px) var(--wood),
    inset 0 0 0 calc(var(--px) * 2) var(--wood-hi),
    0 calc(var(--px) * 3) 0 0 rgba(0,0,0,.25);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 20px/1 var(--font);
  color: var(--ink);
  background: var(--parch-2);
  border: 0;
  padding: 14px 22px;
  cursor: var(--cur-click);
  text-decoration: none;
  box-shadow:
    0 -4px 0 0 var(--wood-dark), 0 4px 0 0 var(--wood-dark),
    -4px 0 0 0 var(--wood-dark), 4px 0 0 0 var(--wood-dark),
    inset 0 -4px 0 0 #d8b578, inset 0 4px 0 0 #fff6dc,
    0 8px 0 0 rgba(0,0,0,.3);
  margin: 4px;
  transition: transform .08s;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow:
    0 -4px 0 0 var(--wood-dark), 0 4px 0 0 var(--wood-dark),
    -4px 0 0 0 var(--wood-dark), 4px 0 0 0 var(--wood-dark),
    inset 0 4px 0 0 #d8b578; }
.btn-pink { background: var(--pink); color: #fff; text-shadow: 2px 2px 0 var(--pink-dark);
  box-shadow:
    0 -4px 0 0 var(--pink-dark), 0 4px 0 0 var(--pink-dark),
    -4px 0 0 0 var(--pink-dark), 4px 0 0 0 var(--pink-dark),
    inset 0 -4px 0 0 #d4706a, inset 0 4px 0 0 var(--pink-hi),
    0 8px 0 0 rgba(0,0,0,.3); }
.btn.wide { width: calc(100% - 8px); margin-top: 18px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px dashed #fff; outline-offset: 6px;
}

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(50,25,70,.78), rgba(20,10,30,.94));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; text-align: center; padding: 16px;
  transition: opacity .5s;
}
.boot.gone { opacity: 0; pointer-events: none; }
.boot-heart { font-size: 56px; color: var(--pink); animation: beat 1s steps(2) infinite; text-shadow: 4px 4px 0 var(--pink-dark); }
.boot-title { font-size: clamp(36px, 8vw, 76px); margin: 8px 0 0; text-shadow: 4px 4px 0 var(--wood-dark), 8px 8px 0 rgba(0,0,0,.35); letter-spacing: 1px; }
.boot-sub { font-size: 24px; margin: 4px 0 28px; color: var(--parch); }
.boot-hint { opacity: .75; margin-top: 18px; font-size: 16px; }
@keyframes beat { 50% { transform: scale(1.15); } }
.blink-soft { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

/* ---------- HUD ---------- */
.hud { position: fixed; right: 12px; bottom: 12px; z-index: 60; }
.hud-btn {
  font: 600 16px var(--font); color: var(--parch); background: rgba(59,36,20,.85);
  border: 3px solid var(--wood-dark); padding: 6px 10px; cursor: var(--cur-click);
}

/* ---------- top nav (sub-screens) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  padding: 12px 12px 14px;
  background: linear-gradient(var(--wood-dark), #452712);
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
body:not(.sub) .topnav { display: none; }
.topnav a {
  font: 600 18px var(--font); color: var(--parch); text-decoration: none;
  padding: 8px 14px; background: var(--wood);
  box-shadow: inset 0 3px 0 var(--wood-hi), inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 3px #2c170a;
  margin: 3px;
}
.topnav a .ico { margin-right: 6px; }
.topnav a.active { background: var(--pink); color: #fff; box-shadow: inset 0 3px 0 var(--pink-hi), inset 0 -3px 0 var(--pink-dark), 0 0 0 3px #2c170a; }

/* ---------- screens ---------- */
.screen { max-width: 1080px; margin: 0 auto; padding: 24px 16px 80px; animation: screenIn .35s steps(6); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } }
.screen-home { max-width: none; padding: 0 0 60px; }

/* ---------- home / title screen ---------- */
/* desktop: artwork fits the screen; menu, board and buttons float on top */
.hero-wrap { width: 100%; }
.hero {
  container-type: inline-size; position: relative; margin: 0 auto;
  width: min(100%, calc(100svh * 1.7747)); aspect-ratio: 1670 / 941;
  box-shadow: 0 0 40px rgba(0,0,0,.45);
}
.hero-art { position: absolute; inset: 0; overflow: hidden; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hot {
  position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h);
  display: block; border: 0; background: transparent; padding: 0; cursor: var(--cur-click);
}
.hot:hover::after, .hot:focus-visible::after { content: "!"; position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  font: 700 22px var(--font); color: #fff; background: var(--pink); padding: 0 8px; box-shadow: 0 0 0 3px var(--pink-dark); }
.hot:focus-visible { outline: 3px dashed #fff; outline-offset: 2px; }

.speech {
  position: absolute; left: 50%; top: 66%; transform: translate(-10%, -100%) scale(.8);
  background: #fff; color: var(--ink); font: 600 clamp(12px, 1.4cqw, 22px) var(--font);
  padding: .5em .9em; box-shadow: 0 0 0 4px var(--ink); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; white-space: nowrap;
}
.speech.show { opacity: 1; transform: translate(-10%, -100%) scale(1); }

/* wood plank look shared by signs and buttons */
.plank, .cta-btn {
  display: flex; align-items: center; gap: .55em; text-decoration: none; font-family: var(--font); font-weight: 600;
  color: #fff3d6; text-shadow: 2px 2px 0 #4a2a12;
  background: linear-gradient(#c98a4b, #a86a33);
  white-space: nowrap;
  box-shadow: 0 0 0 3px #4a2a12, inset 0 4px 0 #e0a868, inset 0 -4px 0 #7c4a20, 0 6px 0 3px rgba(0,0,0,.3);
  transition: transform .1s, filter .1s;
}
.plank:hover, .plank:focus-visible { transform: translateX(4px) scale(1.03); filter: brightness(1.1); }
.ico { font-size: 1.1em; line-height: 1; }

/* signpost (left) */
.signpost {
  position: absolute; left: 2.2cqw; top: 25%; width: 15.5cqw;
  display: flex; flex-direction: column; gap: 1.25cqw;
  font-size: clamp(13px, 1.55cqw, 28px);
}
.signpost::before { /* the post */
  content: ""; position: absolute; left: 22%; top: -2cqw; bottom: -10cqw; width: 1.4cqw; z-index: -1;
  background: linear-gradient(90deg, #6b3f1c, #9a6131 45%, #6b3f1c); box-shadow: 0 0 0 3px #3d220d;
}
.plank { padding: .6em .9em; }
.plank.is-home { background: linear-gradient(#ffe2a6, #f3c477); color: var(--ink); text-shadow: none;
  box-shadow: 0 0 0 3px #4a2a12, inset 0 4px 0 #fff3cf, inset 0 -4px 0 #d39b4c, 0 6px 0 3px rgba(0,0,0,.3); }

/* Big Day board (right) */
.bigday {
  position: absolute; right: 2.4cqw; top: 24%; width: 23cqw;
  padding: 1.6cqw 1.8cqw 1.8cqw; font-size: clamp(13px, 1.6cqw, 30px); color: var(--ink);
  background: linear-gradient(#fff1d2, #fbe0ac);
  box-shadow: 0 0 0 .5cqw #b9773a, 0 0 0 calc(.5cqw + 3px) #4a2a12, inset 0 0 0 3px #f0c98b, 0 1cqw 0 .6cqw rgba(0,0,0,.3);
}
.bd-title { text-align: center; font-weight: 700; font-size: 1.25em; padding-bottom: .4em; border-bottom: 3px dashed #d9a95e; margin-bottom: .5em; }
.bd-list { list-style: none; margin: 0 0 .8em; padding: 0; }
.bd-list li { display: flex; align-items: center; gap: .6em; padding: .3em 0; font-weight: 600; }
.bd-list small { display: block; font-size: .7em; font-weight: 400; opacity: .7; margin-top: -.15em; }
.bd-btn {
  display: flex; justify-content: center; align-items: center; gap: .4em; width: 100%; padding: .6em .5em;
  font: 600 .85em var(--font); color: #fff; text-decoration: none; text-shadow: 2px 2px 0 var(--pink-dark);
  background: var(--pink); box-shadow: 0 0 0 3px var(--pink-dark), inset 0 3px 0 var(--pink-hi), inset 0 -3px 0 #d4706a, 0 5px 0 2px rgba(0,0,0,.25);
  transition: transform .1s;
}
.bd-btn:hover, .bd-btn:focus-visible { transform: translateY(-2px); filter: brightness(1.06); }

/* bottom buttons */
.cta {
  position: absolute; left: 50%; bottom: 4.5%; transform: translateX(-50%);
  display: flex; gap: 2.4cqw; font-size: clamp(14px, 1.65cqw, 30px);
}
.cta-btn { min-width: 19cqw; justify-content: center; padding: .55em 1.1em; }
.cta-btn b, .bd-btn b { margin-left: auto; padding-left: .5em; }
.cta-btn:hover, .cta-btn:focus-visible { transform: translateY(-3px) scale(1.03); filter: brightness(1.1); }
.cta-pink { background: linear-gradient(#f7a198, #e77b72); text-shadow: 2px 2px 0 var(--pink-dark);
  box-shadow: 0 0 0 3px var(--pink-dark), inset 0 4px 0 var(--pink-hi), inset 0 -4px 0 #c45d56, 0 6px 0 3px rgba(0,0,0,.3); }

.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -10px; width: 8px; height: 8px; background: #ffc4d6; box-shadow: 4px 4px 0 #f59ab8;
  animation: fall linear infinite; opacity: .9; }
.petal { transition: background-color .35s, box-shadow .35s; }
/* night cherry blossoms: used while the title screen shows the night picture (.hero-art.night) */
.petal-night, .hero-art.night .petal { background: #970404; box-shadow: 4px 4px 0 #f59ab8; }
@keyframes fall {
  to { transform: translate(var(--drift, 120px), 105vh) rotate(360deg); }
}

/* phone & small tablet: artwork on top, board + buttons stacked below */
@media (max-width: 820px) {
  body:not(.sub) .topnav { display: flex; }
  .hero { width: 100%; aspect-ratio: auto; box-shadow: none; padding-bottom: 8px; }
  .hero-art { position: relative; aspect-ratio: 4 / 3; }
  .hero-img { object-position: 50% 0; }
  .hot { left: var(--ml, var(--l)); width: var(--mw, var(--w)); }
  .hot-mailbox, .hot-sign, .signpost { display: none; }
  .speech { left: 56%; font-size: 14px; transform: translate(-50%, -100%) scale(.8); }
  .speech.show { transform: translate(-50%, -100%) scale(1); }
  .bigday { position: relative; inset: auto; width: auto; margin: 40px 20px 0; padding: 18px 20px 20px; font-size: 19px;
    box-shadow: 0 0 0 5px #b9773a, 0 0 0 8px #4a2a12, inset 0 0 0 3px #f0c98b, 0 10px 0 4px rgba(0,0,0,.3); }
  .cta { position: static; transform: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 20px 0; font-size: 18px; }
  .cta-btn { min-width: 0; padding: 14px 12px; }
}
@media (max-width: 460px) {
  .cta { grid-template-columns: 1fr; gap: 16px; }
}

.home-bar { max-width: 1080px; margin: 24px auto 0; padding: 0 16px; display: grid; gap: 20px; }
.countdown { padding: 18px; text-align: center; }
.cd-label { font-size: 20px; margin-bottom: 10px; }
.cd-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cd-cell { background: var(--parch); color: var(--ink); min-width: 88px; padding: 8px 10px; box-shadow: 0 0 0 4px var(--wood-dark); }
.cd-cell b { display: block; font: 700 36px/1 "VT323", monospace; color: var(--pink-dark); }
.cd-cell span { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- section sign ---------- */
.sign {
  text-align: center; margin: 8px auto 28px; max-width: 520px; padding: 14px 18px 12px;
  background: var(--wood); color: var(--parch);
  box-shadow: 0 0 0 4px var(--wood-dark), inset 0 4px 0 var(--wood-hi), 0 10px 0 rgba(0,0,0,.3);
  position: relative;
}
.sign::before, .sign::after { content: ""; position: absolute; top: -30px; width: 8px; height: 26px; background: var(--wood-dark); }
.sign::before { left: 18%; } .sign::after { right: 18%; }
.sign h2 { margin: 0; font-size: clamp(30px, 5vw, 44px); text-shadow: 3px 3px 0 var(--wood-dark); }
.sign p { margin: 0; font-size: 18px; opacity: .9; }

h3 { font-size: 28px; margin: 0 0 14px; }
.section-label { color: #fff; text-shadow: 3px 3px 0 var(--wood-dark); margin: 28px 4px 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.parchment { padding: 26px; }
.note { font-size: 14px; opacity: .7; margin: 14px 0 0; }
.hint { color: #fff; text-align: center; font-size: 16px; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.center { text-align: center; }

/* ---------- character cards ---------- */
.party { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; margin-bottom: 18px; }
.char {
  position: relative; display: block; width: auto; text-align: left; cursor: var(--cur-click);
  font: inherit; color: var(--ink); border: 0; padding: 22px 22px 18px;
  transition: transform .12s;
}
.char:hover { transform: translateY(-4px); }
.char.picked { transform: translateY(-6px); background: #fff6dc; outline: 4px solid var(--pink); outline-offset: 6px; }
.char-tag {
  position: absolute; top: -14px; right: 16px; background: var(--pink); color: #fff; font: 400 24px/1.1 "VT323", monospace;
  padding: 2px 10px; box-shadow: 0 0 0 3px var(--pink-dark); text-shadow: 2px 2px 0 var(--pink-dark);
}
.char-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.char-portrait {
  font-size: 46px; width: 76px; height: 76px; flex: none; display: grid; place-items: center;
  background: linear-gradient(#a99cf0, #f2b5c8); box-shadow: 0 0 0 4px var(--wood-dark), inset 0 -10px 0 #7cbf4a;
}
.char-portrait.has-photo { width: 120px; height: 128px; background: none; box-shadow: 0 0 0 5px var(--wood-dark), 0 6px 0 3px rgba(0,0,0,.2); overflow: hidden; }
.char-portrait img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.char-head { gap: 22px !important; margin-bottom: 18px !important; }
.char:hover .char-portrait, .char.picked .char-portrait { animation: bob .6s steps(2) infinite; }
.char-name { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: 1px; }
.char-class { font-size: 17px; }
.char-class b { color: var(--pink-dark); }
.char-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; padding: 10px 0; border-top: 3px dashed #e3c48c; border-bottom: 3px dashed #e3c48c; font-size: 17px; }
.char-info dt { opacity: .75; }
.char-info dd { margin: 0; font-weight: 600; }
.char-stats { list-style: none; margin: 0; padding: 0; }
.char-stats li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 17px; }
.stars { color: #f0a92e; letter-spacing: 2px; text-shadow: 2px 2px 0 rgba(0,0,0,.18); white-space: nowrap; }
.stars i { font-style: normal; color: #d9c49a; text-shadow: none; }
.char-select { display: none; margin-top: 10px; text-align: center; font-weight: 700; color: var(--pink-dark); animation: blink .8s steps(2) infinite; }
.char.picked .char-select { display: block; }
.char-play { display: block; margin-top: 12px; text-align: center; font-weight: 600; font-size: 16px; color: #fff; background: var(--wood); padding: 6px; box-shadow: inset 0 3px 0 var(--wood-hi), 0 0 0 3px var(--wood-dark); }
.char:hover .char-play { background: var(--pink); box-shadow: inset 0 3px 0 var(--pink-hi), 0 0 0 3px var(--pink-dark); }
.char.picked .char-play { display: none; }
.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 95;
  background: var(--ink); color: #ffd56b; font: 600 18px var(--font); padding: 10px 18px;
  box-shadow: 0 0 0 3px #ffd56b, 0 6px 0 3px rgba(0,0,0,.3); animation: toastIn 2.6s steps(8) forwards; white-space: nowrap;
}
@keyframes toastIn { 0% { opacity: 0; transform: translate(-50%, -10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* 3+ characters: even columns, slightly smaller portraits */
.party:not(:has(.char-vs)) { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 26px 22px; align-items: stretch; }
.party:not(:has(.char-vs)) .char-portrait.has-photo { width: 100px; height: 108px; }
.party:not(:has(.char-vs)) .char-head { gap: 16px !important; }
.party:not(:has(.char-vs)) .char-name { font-size: 28px; }
.name-icon { font-size: .8em; }
.char-vs { font-size: 44px; color: var(--pink); text-shadow: 4px 4px 0 var(--pink-dark); animation: beat 1s steps(2) infinite; }

/* ---------- story ---------- */
.story-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.chapters { list-style: none; padding: 14px; margin: 4px; }
.chapters li { margin: 0 0 8px; }
.chapters button {
  width: 100%; text-align: left; font: 500 18px var(--font); color: var(--parch);
  background: rgba(0,0,0,.15); border: 0; padding: 10px 12px; cursor: var(--cur-click);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.2);
}
.chapters button[disabled] { opacity: .55; cursor: not-allowed; }
.chapters button.current { background: var(--parch); color: var(--ink); box-shadow: inset 0 0 0 3px var(--pink); }
.chapters button small { display: block; font-size: 14px; opacity: .8; }

.scene {
  height: 260px; display: grid; place-items: center; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, #8e85e4 0%, #f2a7c0 70%, #7cbf4a 70%, #5ea338 100%);
}
.scene-emoji { font-size: 110px; filter: drop-shadow(6px 6px 0 rgba(0,0,0,.25)); animation: bob 1.6s steps(4) infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.scene-meta { position: absolute; left: 12px; bottom: 10px; background: rgba(59,36,20,.85); padding: 4px 10px; font-size: 16px; }

.dialog {
  position: relative; margin: 26px 4px 8px; padding: 30px 26px 26px; min-height: 150px;
  background: #fff8e6; color: var(--ink); font-size: 22px; cursor: var(--cur-click);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px var(--parch), 0 0 0 12px var(--ink), 0 14px 0 6px rgba(0,0,0,.25);
}
.dialog p { margin: 0; white-space: pre-wrap; }
.nameplate { position: absolute; top: -20px; left: 18px; background: var(--pink); color: #fff; padding: 4px 14px; font-weight: 700;
  box-shadow: 0 0 0 4px var(--ink); text-shadow: 2px 2px 0 var(--pink-dark); }
.dialog-next { position: absolute; right: 18px; bottom: 8px; color: var(--pink-dark); animation: bob .8s steps(2) infinite; }

/* ---------- wedding ---------- */
.stat-list { list-style: none; padding: 0; margin: 0; }
.stat-list li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 3px dashed #e3c48c; }
.stat-list .ico { font-size: 28px; width: 36px; text-align: center; }
.stat-list b { display: block; font-size: 20px; }
.stat-list small { font-size: 16px; opacity: .8; }
.objectives { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.objectives li { display: grid; grid-template-columns: 22px 92px 1fr; gap: 8px; padding: 9px 0; border-bottom: 3px dashed #e3c48c; align-items: baseline; }
.objectives li::before { content: ""; width: 14px; height: 14px; border: 3px solid var(--wood-dark); background: #fff; align-self: center; }
.objectives .time { font: 700 22px "VT323", monospace; color: var(--pink-dark); }
.objectives em { color: var(--pink-dark); font-style: normal; font-weight: 700; }
.faq { margin-top: 24px; }
.faq details { border-bottom: 3px dashed #e3c48c; padding: 10px 0; }
.faq summary { cursor: var(--cur-click); font-weight: 600; font-size: 20px; list-style: none; }
.faq summary::before { content: "▶ "; color: var(--pink); }
.faq details[open] summary::before { content: "▼ "; }
.faq p { margin: 8px 0 0 26px; }

/* ---------- travel ---------- */
.map { padding: 0 0 14px; background: #5ea338; }
.map-area { position: relative; height: 340px; overflow: hidden; background: #8fd16a; }
.map-grid { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.06) 2px, transparent 2px) 0 0 / 32px 32px,
    linear-gradient(rgba(0,0,0,.06) 2px, transparent 2px) 0 0 / 32px 32px,
    radial-gradient(ellipse 30% 18% at 25% 75%, #6fb6e8 98%, transparent 100%),
    radial-gradient(ellipse 22% 30% at 80% 35%, #5ea338 98%, transparent 100%),
    linear-gradient(115deg, transparent 46%, #e8cf98 46%, #e8cf98 50%, transparent 50%),
    linear-gradient(25deg, transparent 55%, #e8cf98 55%, #e8cf98 58%, transparent 58%);
}
.pin {
  position: absolute; transform: translate(-50%, -50%); font-size: 30px; background: var(--parch); border: 0;
  width: 54px; height: 54px; cursor: var(--cur-click); box-shadow: 0 0 0 4px var(--wood-dark), 0 6px 0 4px rgba(0,0,0,.25);
  animation: bob 1.4s steps(2) infinite;
}
.pin span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 10px; white-space: nowrap;
  font: 600 14px var(--font); background: var(--wood-dark); color: var(--parch); padding: 2px 8px; }
.pin.on { background: var(--pink); }
.map-info { margin: 14px 14px 0; padding: 14px 18px; font-size: 18px; }
.inventory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.slot { padding: 18px; min-width: 0; }
.slot-icon { font-size: 34px; width: 60px; height: 60px; display: grid; place-items: center; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 3px rgba(0,0,0,.25); margin-bottom: 10px; }
.slot h4 { margin: 0 0 6px; font-size: 22px; }
.slot p { margin: 0; font-size: 17px; }

/* ---------- RSVP ---------- */
.rsvp { max-width: 680px; margin: 0 auto; }
.xp { display: flex; align-items: center; gap: 12px; font-size: 16px; margin-bottom: 20px; }
.xp-bar { flex: 1; height: 18px; background: #e3c48c; box-shadow: 0 0 0 3px var(--wood-dark); }
.xp-bar i { display: block; height: 100%; width: 25%; background: repeating-linear-gradient(90deg, var(--pink) 0 12px, var(--pink-hi) 12px 16px); transition: width .3s steps(5); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 26px; font-weight: 700; margin-bottom: 14px; padding: 0; }
.rsvp label { display: block; font-size: 18px; margin-bottom: 16px; }
.rsvp input:not([type=radio]), .rsvp textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px; font: 20px var(--font); color: var(--ink);
  background: #fffaf0; border: 0; box-shadow: 0 0 0 3px var(--wood-dark), inset 0 3px 0 #e8d3a6;
}
.rsvp textarea { resize: vertical; }
.err { color: #c0392b; min-height: 1.2em; font-weight: 600; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { cursor: var(--cur-click); margin: 0 !important; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; padding: 22px 14px; text-align: center; background: #fffaf0; box-shadow: 0 0 0 4px var(--wood-dark), 0 6px 0 4px rgba(0,0,0,.15); transition: transform .1s; }
.choice b { display: block; font-size: 22px; }
.choice small { font-size: 16px; opacity: .75; }
.choice:hover span { transform: translateY(-3px); }
.choice input:checked + span { background: var(--pink); color: #fff; box-shadow: 0 0 0 4px var(--pink-dark), 0 6px 0 4px rgba(0,0,0,.15); }
.choice input:focus-visible + span { outline: 3px dashed var(--pink-dark); outline-offset: 8px; }
.stepper { display: flex; gap: 0; margin-top: 6px; width: max-content; }
.stepper button { width: 48px; font: 700 26px var(--font); background: var(--wood); color: var(--parch); border: 0; cursor: var(--cur-click); box-shadow: 0 0 0 3px var(--wood-dark); }
.stepper input { width: 70px !important; text-align: center; margin: 0 !important; }
.guest-list { display: grid; gap: 12px; margin-bottom: 16px; }
.guest-row { display: grid; grid-template-columns: 1fr 170px; gap: 12px; align-items: end; }
.guest-row label { margin: 0 !important; }
.guest-row select { display: block; width: 100%; margin-top: 6px; padding: 12px 8px; font: 18px var(--font); background: #fffaf0; border: 0; box-shadow: 0 0 0 3px var(--wood-dark); color: var(--ink); }
.rsvp.no .if-yes, .rsvp:not(.no) .if-no { display: none; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.center-row { justify-content: center; flex-wrap: wrap; }
.done { max-width: 620px; margin: 0 auto; text-align: center; }
.done-badge { font-size: 70px; color: var(--pink); text-shadow: 5px 5px 0 var(--pink-dark); animation: beat 1s steps(2) infinite; }
.xp-gain { display: inline-block; background: var(--ink); color: #ffd56b; padding: 6px 14px; font-size: 16px; }

/* ---------- confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -20px; font-style: normal; font-size: 22px; animation: confetti 2.6s ease-in forwards; }
@keyframes confetti { to { transform: translate(var(--dx), 110vh) rotate(540deg); opacity: .6; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .story-layout { grid-template-columns: 1fr; }
  .party { grid-template-columns: 1fr; gap: 26px; }
  .char-vs { text-align: center; margin: -10px 0; }
  .inventory { grid-template-columns: 1fr 1fr; }
  .chapters { display: flex; overflow-x: auto; gap: 8px; }
  .chapters li { margin: 0; flex: 0 0 170px; }
}
@media (max-width: 700px) {
  body { font-size: 17px; }
  .topnav { padding: 8px; gap: 2px; }
  .topnav a { font-size: 15px; padding: 6px 8px; }
  .topnav a .ico { display: none; }
  .inventory { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .guest-row { grid-template-columns: 1fr; }
  .scene { height: 190px; }
  .scene-emoji { font-size: 80px; }
  .dialog { font-size: 19px; }
  .parchment { padding: 20px 18px; }
  .objectives li { grid-template-columns: 20px 78px 1fr; }
  .map-area { height: 300px; }
  .pin { width: 46px; height: 46px; font-size: 24px; }
  .cd-cell { min-width: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .petals { display: none; }
}

/* ---------- RSVP pop-up (end of a story) ---------- */
.pop { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 16px;
  background: rgba(30, 15, 40, .65); animation: screenIn .25s steps(4); }
.pop-box { width: min(440px, 100%); text-align: center; padding: 28px 26px 24px; }
.pop-heart { font-size: 56px; animation: beat 1s steps(2) infinite; }
.pop-box h3 { margin: 6px 0 8px; }
.pop-box p { margin: 0 0 18px; font-size: 19px; }
.pop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* chapter unlock highlight + restart */
.chapters button.just-unlocked { background: #ffd56b; color: var(--ink); box-shadow: inset 0 0 0 3px var(--pink); animation: unlockFlash .5s steps(2) 6; }
@keyframes unlockFlash { 50% { background: #fff6dc; transform: scale(1.04); } }
.chapters .restart { text-align: center; font-size: 15px; background: transparent; box-shadow: none; opacity: .8; text-decoration: underline; }
.chapters .restart:hover { opacity: 1; }

/* ---------- story scene picture (changes every sentence) ---------- */
.scene-meta { z-index: 2; }
.scene-photo { animation: photoIn .35s steps(5); }
.scene-photo.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-photo.portrait { width: 150px; height: 162px; object-fit: cover; box-shadow: 0 0 0 5px var(--wood-dark), 0 8px 0 4px rgba(0,0,0,.25); }
.scene.has-full { background: #2b1a3a; }
.scene { position: relative; }
@keyframes photoIn { from { opacity: 0; transform: scale(.96); } }
@media (max-width: 700px) { .scene-photo.portrait { width: 110px; height: 118px; } }

/* =========================================================
   Visual-novel story frame (scene + scroll + badge + dialogue)
   Positions are % of a 16:9 canvas so they line up with
   illustrations drawn in the same layout.
   ========================================================= */
.story-layout { display: block !important; }
.vn { position: relative; container-type: inline-size; margin: 4px 4px 0; box-shadow: 0 0 0 4px var(--wood-dark), 0 10px 0 4px rgba(0,0,0,.3); background: #3b2414; }
.vn-crop { position: relative; overflow: hidden; }
.vn-canvas { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: #3b2414; }
.vn .scene-photo.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vn .scene-photo.portrait { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); width: 18cqw; height: auto; aspect-ratio: .93; }
.vn .scene-emoji { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); font-size: 12cqw; }

/* chapter scroll (top-left) */
.vn-title {
  position: absolute; left: 1.2%; top: 1.1%; width: 34.2%; height: 10.6%; z-index: 4;
  display: flex; align-items: center; gap: 1.2cqw; padding: 0 2cqw; white-space: nowrap; overflow: hidden;
  font: 600 clamp(10px, 2.3cqw, 28px)/1 var(--font); color: var(--ink);
  background: linear-gradient(#fbe7bf, #f1cf92); border-radius: .6cqw;
  box-shadow: 0 0 0 .35cqw #b77a3e, 0 0 0 .6cqw #5a3418, inset 0 -.4cqw 0 #e0b56e;
}
.vn-title b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.vn-title-icon { font-size: 1.25em; }
/* place + year badge (top-right) */
.vn-badge {
  position: absolute; right: 1%; top: 1.6%; width: 29.4%; height: 7%; z-index: 4;
  display: flex; align-items: center; justify-content: space-around; gap: 1cqw; padding: 0 1cqw; white-space: nowrap; overflow: hidden;
  font: 600 clamp(9px, 1.55cqw, 20px)/1 var(--font); color: var(--ink);
  background: linear-gradient(#fbe7bf, #f1cf92); border-radius: .6cqw;
  box-shadow: 0 0 0 .3cqw #b77a3e, 0 0 0 .55cqw #5a3418;
}
.vn-badge > span { overflow: hidden; text-overflow: ellipsis; }

/* dialogue box (bottom, over the scene) */
.vn .dialog {
  position: absolute; left: 1.4%; right: 1.5%; top: 70.5%; bottom: 2.6%; margin: 0; min-height: 0; z-index: 5;
  padding: 2.4cqw 3cqw 1.5cqw 19.5%; font-size: clamp(15px, 2.15cqw, 26px); line-height: 1.45;
  background: linear-gradient(#fff6e2, #fbe9c4); border-radius: .8cqw;
  box-shadow: 0 0 0 .4cqw #c98a4b, 0 0 0 .75cqw #5a3418, 0 .8cqw 0 .5cqw rgba(0,0,0,.25);
}
.vn .dialog p { overflow: auto; max-height: 100%; }
.vn .nameplate {
  top: auto; bottom: calc(100% - .8cqw); left: 14.2%; padding: .5cqw 2.4cqw; font-size: clamp(13px, 2cqw, 24px);
  background: linear-gradient(#fbe7bf, #f1cf92); color: var(--ink); text-shadow: none; border-radius: .6cqw .6cqw 0 0;
  box-shadow: 0 0 0 .35cqw #c98a4b, 0 0 0 .6cqw #5a3418;
}
.vn .dialog-next { right: 2.4cqw; bottom: 1.4cqw; font-size: clamp(14px, 2cqw, 24px); }
.dlg-portrait {
  position: absolute; left: 1.1%; bottom: 5%; height: 118%; aspect-ratio: .88; z-index: 2;
  display: grid; place-items: center; overflow: hidden; border-radius: .6cqw;
  background: linear-gradient(#a99cf0, #f2b5c8); box-shadow: 0 0 0 .35cqw #c98a4b, 0 0 0 .6cqw #5a3418;
}
.dlg-portrait img { width: 100%; height: 100%; object-fit: cover; }
.dlg-portrait.narrator { background: linear-gradient(#fbe7bf, #f1cf92); font-size: 7cqw; }

/* chapter picker row (under the frame) */
.story-layout .chapters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 4px 0; padding: 12px; }
.story-layout .chapters li { flex: 1 1 150px; margin: 0; }
.story-layout .hint { margin: 14px 0 0; }

/* phone: crop away the bottom of the art and put the dialogue under it */
@media (max-width: 700px) {
  .vn-crop { aspect-ratio: 1672 / 592; }
  .vn .dialog { position: relative; inset: auto; margin: 14px 8px 10px; min-height: 120px; padding: 26px 14px 14px 96px; font-size: 16px; border-radius: 8px;
    box-shadow: 0 0 0 3px #c98a4b, 0 0 0 6px #5a3418; }
  .vn .nameplate { left: 92px; bottom: auto; top: -18px; padding: 3px 12px; font-size: 15px; border-radius: 6px; box-shadow: 0 0 0 3px #c98a4b, 0 0 0 5px #5a3418; }
  .dlg-portrait { left: 10px; bottom: auto; top: 14px; height: auto; width: 74px; border-radius: 6px; box-shadow: 0 0 0 3px #c98a4b, 0 0 0 5px #5a3418; }
  .dlg-portrait.narrator { font-size: 36px; }
  .vn .dialog-next { right: 12px; bottom: 8px; }
}
/* VN tweaks */
.vn .nameplate { left: 19.5%; min-width: 10.5cqw; text-align: center; z-index: 3; }
.vn-badge { width: auto; min-width: 0; max-width: 60%; justify-content: flex-end; gap: 2cqw; padding: 0 1.6cqw; }
@media (max-width: 700px) { .vn .nameplate { left: 96px; min-width: 0; } .vn-badge { max-width: 70%; } }

/* ===== Readable text: pixel font for titles/buttons, Nunito for reading ===== */
:root { --font-read: "Nunito", system-ui, "Segoe UI", sans-serif; }
body { font-family: var(--font-read); font-weight: 600; -webkit-font-smoothing: antialiased; }
input, select, textarea { font-family: var(--font-read) !important; font-weight: 600; }
.dialog p, .vn .dialog p { font-family: var(--font-read); font-weight: 700; letter-spacing: .01em; }
/* keep the game look on titles, names, signs and buttons */
h1, h2, h3, h4, button, .btn, .cta-btn, .topnav, .sign, .plank, .section-label, .nameplate,
.char-name, .char-tag, .char-select, .char-play, .char-vs, .countdown, .cd-cell, .time, .home-bar,
.hud, .hud-btn, .xp, .done-badge, .vn-title, .vn-badge, .step, .choice, .pin, .slot-icon, kbd {
  font-family: var(--font);
}
/* small text reads better in the clear font */
.chapters small, .vn-badge, .hint { font-family: var(--font-read); font-weight: 700; }
/* per-sentence faces (assets/faces): transparent cut-out, no frame */
.dlg-portrait.cutout { background: none; box-shadow: none; overflow: visible; border-radius: 0; }
.dlg-portrait.cutout img { object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 .3cqw 0 rgba(90,52,24,.35)); }

/* ===== pixel icons (one style for every menu / heading icon) ===== */
.pxi { display: inline-block; width: 1.3em; height: 1.3em; flex: none; vertical-align: -.25em; background: center / contain no-repeat; image-rendering: pixelated;
  filter: drop-shadow(1px 1px 0 rgba(59,31,12,.45)); }
.pxi-home { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='7' y='1' width='2' height='1' fill='%233b1f0c'/><rect x='6' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='2' width='2' height='1' fill='%23e0574f'/><rect x='9' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='3' width='4' height='1' fill='%23e0574f'/><rect x='10' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='4' width='6' height='1' fill='%23e0574f'/><rect x='11' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='5' width='8' height='1' fill='%23e0574f'/><rect x='12' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='6' width='10' height='1' fill='%23e0574f'/><rect x='13' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='7' width='2' height='1' fill='%233b1f0c'/><rect x='3' y='7' width='10' height='1' fill='%23b13a36'/><rect x='13' y='7' width='2' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='8' width='10' height='1' fill='%23fbe6b8'/><rect x='13' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='9' width='1' height='1' fill='%23fbe6b8'/><rect x='4' y='9' width='3' height='1' fill='%233b1f0c'/><rect x='7' y='9' width='2' height='1' fill='%23fbe6b8'/><rect x='9' y='9' width='3' height='1' fill='%233b1f0c'/><rect x='12' y='9' width='1' height='1' fill='%23fbe6b8'/><rect x='13' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='10' width='1' height='1' fill='%23fbe6b8'/><rect x='4' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='10' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='10' width='2' height='1' fill='%23fbe6b8'/><rect x='9' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='10' y='10' width='1' height='1' fill='%239a5a2b'/><rect x='11' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='10' width='1' height='1' fill='%23fbe6b8'/><rect x='13' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='11' width='1' height='1' fill='%23fbe6b8'/><rect x='4' y='11' width='3' height='1' fill='%233b1f0c'/><rect x='7' y='11' width='2' height='1' fill='%23fbe6b8'/><rect x='9' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='10' y='11' width='1' height='1' fill='%239a5a2b'/><rect x='11' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='11' width='1' height='1' fill='%23fbe6b8'/><rect x='13' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='12' width='6' height='1' fill='%23fbe6b8'/><rect x='9' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='10' y='12' width='1' height='1' fill='%239a5a2b'/><rect x='11' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='12' width='1' height='1' fill='%23fbe6b8'/><rect x='13' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='13' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='13' width='6' height='1' fill='%23fbe6b8'/><rect x='9' y='13' width='1' height='1' fill='%233b1f0c'/><rect x='10' y='13' width='1' height='1' fill='%239a5a2b'/><rect x='11' y='13' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='13' width='1' height='1' fill='%23fbe6b8'/><rect x='13' y='13' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='14' width='12' height='1' fill='%233b1f0c'/></svg>"); }
.pxi-heart { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='2' y='1' width='4' height='1' fill='%233b1f0c'/><rect x='10' y='1' width='4' height='1' fill='%233b1f0c'/><rect x='1' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='2' width='4' height='1' fill='%23e8505b'/><rect x='6' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='9' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='10' y='2' width='4' height='1' fill='%23e8505b'/><rect x='14' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='3' width='1' height='1' fill='%23e8505b'/><rect x='2' y='3' width='2' height='1' fill='%23ffb3b8'/><rect x='4' y='3' width='3' height='1' fill='%23e8505b'/><rect x='7' y='3' width='2' height='1' fill='%233b1f0c'/><rect x='9' y='3' width='6' height='1' fill='%23e8505b'/><rect x='15' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='4' width='1' height='1' fill='%23e8505b'/><rect x='2' y='4' width='1' height='1' fill='%23ffb3b8'/><rect x='3' y='4' width='12' height='1' fill='%23e8505b'/><rect x='15' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='5' width='14' height='1' fill='%23e8505b'/><rect x='15' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='6' width='13' height='1' fill='%23e8505b'/><rect x='14' y='6' width='1' height='1' fill='%23b8333f'/><rect x='15' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='7' width='11' height='1' fill='%23e8505b'/><rect x='13' y='7' width='1' height='1' fill='%23b8333f'/><rect x='14' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='8' width='9' height='1' fill='%23e8505b'/><rect x='12' y='8' width='1' height='1' fill='%23b8333f'/><rect x='13' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='9' width='7' height='1' fill='%23e8505b'/><rect x='11' y='9' width='1' height='1' fill='%23b8333f'/><rect x='12' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='10' width='5' height='1' fill='%23e8505b'/><rect x='10' y='10' width='1' height='1' fill='%23b8333f'/><rect x='11' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='11' width='3' height='1' fill='%23e8505b'/><rect x='9' y='11' width='1' height='1' fill='%23b8333f'/><rect x='10' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='12' width='1' height='1' fill='%23e8505b'/><rect x='8' y='12' width='1' height='1' fill='%23b8333f'/><rect x='9' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='13' width='2' height='1' fill='%233b1f0c'/></svg>"); }
.pxi-ring { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='6' y='1' width='4' height='1' fill='%233b1f0c'/><rect x='5' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='2' width='1' height='1' fill='%23ffffff'/><rect x='7' y='2' width='3' height='1' fill='%238fd8ff'/><rect x='10' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='3' width='3' height='1' fill='%238fd8ff'/><rect x='9' y='3' width='1' height='1' fill='%234aa3d8'/><rect x='10' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='4' width='2' height='1' fill='%234aa3d8'/><rect x='9' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='5' width='6' height='1' fill='%233b1f0c'/><rect x='3' y='6' width='2' height='1' fill='%233b1f0c'/><rect x='5' y='6' width='6' height='1' fill='%23f5c03a'/><rect x='11' y='6' width='2' height='1' fill='%233b1f0c'/><rect x='2' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='7' width='2' height='1' fill='%23f5c03a'/><rect x='5' y='7' width='2' height='1' fill='%233b1f0c'/><rect x='9' y='7' width='2' height='1' fill='%233b1f0c'/><rect x='11' y='7' width='1' height='1' fill='%23f5c03a'/><rect x='12' y='7' width='1' height='1' fill='%23c98a1a'/><rect x='13' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='2' height='1' fill='%23f5c03a'/><rect x='4' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='11' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='8' width='1' height='1' fill='%23f5c03a'/><rect x='13' y='8' width='1' height='1' fill='%23c98a1a'/><rect x='14' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='1' height='1' fill='%23f5c03a'/><rect x='3' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='13' y='9' width='1' height='1' fill='%23c98a1a'/><rect x='14' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='1' height='1' fill='%23f5c03a'/><rect x='3' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='13' y='10' width='1' height='1' fill='%23c98a1a'/><rect x='14' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='11' width='2' height='1' fill='%23f5c03a'/><rect x='4' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='11' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='11' width='2' height='1' fill='%23c98a1a'/><rect x='14' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='12' width='1' height='1' fill='%23f5c03a'/><rect x='4' y='12' width='1' height='1' fill='%23c98a1a'/><rect x='5' y='12' width='2' height='1' fill='%233b1f0c'/><rect x='9' y='12' width='2' height='1' fill='%233b1f0c'/><rect x='11' y='12' width='2' height='1' fill='%23c98a1a'/><rect x='13' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='13' width='2' height='1' fill='%233b1f0c'/><rect x='5' y='13' width='7' height='1' fill='%23c98a1a'/><rect x='12' y='13' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='14' width='6' height='1' fill='%233b1f0c'/></svg>"); }
.pxi-map { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='1' y='2' width='14' height='1' fill='%233b1f0c'/><rect x='1' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='3' width='4' height='1' fill='%237cc4e8'/><rect x='6' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='3' width='4' height='1' fill='%23fbe6b8'/><rect x='11' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='3' width='2' height='1' fill='%238cc95a'/><rect x='14' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='4' width='1' height='1' fill='%237cc4e8'/><rect x='3' y='4' width='2' height='1' fill='%238cc95a'/><rect x='5' y='4' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='4' width='1' height='1' fill='%23fbe6b8'/><rect x='8' y='4' width='2' height='1' fill='%238cc95a'/><rect x='10' y='4' width='1' height='1' fill='%23fbe6b8'/><rect x='11' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='4' width='2' height='1' fill='%238cc95a'/><rect x='14' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='5' width='4' height='1' fill='%238cc95a'/><rect x='6' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='5' width='2' height='1' fill='%238cc95a'/><rect x='9' y='5' width='2' height='1' fill='%23fbe6b8'/><rect x='11' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='5' width='1' height='1' fill='%23fbe6b8'/><rect x='13' y='5' width='1' height='1' fill='%238cc95a'/><rect x='14' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='6' width='2' height='1' fill='%238cc95a'/><rect x='4' y='6' width='1' height='1' fill='%23fbe6b8'/><rect x='5' y='6' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='6' width='4' height='1' fill='%23fbe6b8'/><rect x='11' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='6' width='2' height='1' fill='%23fbe6b8'/><rect x='14' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='7' width='1' height='1' fill='%237cc4e8'/><rect x='3' y='7' width='2' height='1' fill='%23fbe6b8'/><rect x='5' y='7' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='7' width='1' height='1' fill='%23fbe6b8'/><rect x='8' y='7' width='1' height='1' fill='%23e0574f'/><rect x='9' y='7' width='1' height='1' fill='%23fbe6b8'/><rect x='10' y='7' width='1' height='1' fill='%23e0574f'/><rect x='11' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='7' width='1' height='1' fill='%237cc4e8'/><rect x='13' y='7' width='1' height='1' fill='%23fbe6b8'/><rect x='14' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='2' height='1' fill='%237cc4e8'/><rect x='4' y='8' width='1' height='1' fill='%23fbe6b8'/><rect x='5' y='8' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='8' width='2' height='1' fill='%23fbe6b8'/><rect x='9' y='8' width='1' height='1' fill='%23e0574f'/><rect x='10' y='8' width='1' height='1' fill='%23fbe6b8'/><rect x='11' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='8' width='2' height='1' fill='%237cc4e8'/><rect x='14' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='1' height='1' fill='%237cc4e8'/><rect x='3' y='9' width='2' height='1' fill='%238cc95a'/><rect x='5' y='9' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='9' width='1' height='1' fill='%23fbe6b8'/><rect x='8' y='9' width='1' height='1' fill='%23e0574f'/><rect x='9' y='9' width='1' height='1' fill='%23fbe6b8'/><rect x='10' y='9' width='1' height='1' fill='%23e0574f'/><rect x='11' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='9' width='2' height='1' fill='%237cc4e8'/><rect x='14' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='1' height='1' fill='%237cc4e8'/><rect x='3' y='10' width='2' height='1' fill='%238cc95a'/><rect x='5' y='10' width='1' height='1' fill='%237cc4e8'/><rect x='6' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='10' width='4' height='1' fill='%23fbe6b8'/><rect x='11' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='10' width='1' height='1' fill='%238cc95a'/><rect x='13' y='10' width='1' height='1' fill='%237cc4e8'/><rect x='14' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='11' width='4' height='1' fill='%237cc4e8'/><rect x='6' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='11' width='4' height='1' fill='%23e9c98a'/><rect x='11' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='11' width='2' height='1' fill='%237cc4e8'/><rect x='14' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='12' width='14' height='1' fill='%233b1f0c'/></svg>"); }
.pxi-camera { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='5' y='2' width='5' height='1' fill='%233b1f0c'/><rect x='4' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='3' width='5' height='1' fill='%23c9b3e6'/><rect x='10' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='4' width='14' height='1' fill='%233b1f0c'/><rect x='1' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='5' width='10' height='1' fill='%23c9b3e6'/><rect x='12' y='5' width='1' height='1' fill='%23e0574f'/><rect x='13' y='5' width='1' height='1' fill='%23c9b3e6'/><rect x='14' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='6' width='3' height='1' fill='%239b7cc4'/><rect x='5' y='6' width='5' height='1' fill='%233b1f0c'/><rect x='10' y='6' width='4' height='1' fill='%239b7cc4'/><rect x='14' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='7' width='2' height='1' fill='%239b7cc4'/><rect x='4' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='7' width='5' height='1' fill='%235fb3e6'/><rect x='10' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='11' y='7' width='3' height='1' fill='%239b7cc4'/><rect x='14' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='1' height='1' fill='%239b7cc4'/><rect x='3' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='8' width='1' height='1' fill='%235fb3e6'/><rect x='5' y='8' width='1' height='1' fill='%23ffffff'/><rect x='6' y='8' width='4' height='1' fill='%235fb3e6'/><rect x='10' y='8' width='1' height='1' fill='%232f6fa0'/><rect x='11' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='8' width='2' height='1' fill='%239b7cc4'/><rect x='14' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='1' height='1' fill='%239b7cc4'/><rect x='3' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='9' width='6' height='1' fill='%235fb3e6'/><rect x='10' y='9' width='1' height='1' fill='%232f6fa0'/><rect x='11' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='9' width='2' height='1' fill='%239b7cc4'/><rect x='14' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='1' height='1' fill='%239b7cc4'/><rect x='3' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='10' width='5' height='1' fill='%235fb3e6'/><rect x='9' y='10' width='2' height='1' fill='%232f6fa0'/><rect x='11' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='10' width='2' height='1' fill='%239b7cc4'/><rect x='14' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='11' width='2' height='1' fill='%239b7cc4'/><rect x='4' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='11' width='5' height='1' fill='%232f6fa0'/><rect x='10' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='11' y='11' width='3' height='1' fill='%239b7cc4'/><rect x='14' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='12' width='4' height='1' fill='%236f5296'/><rect x='6' y='12' width='4' height='1' fill='%233b1f0c'/><rect x='10' y='12' width='4' height='1' fill='%236f5296'/><rect x='14' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='13' width='14' height='1' fill='%233b1f0c'/></svg>"); }
.pxi-mail { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='1' y='2' width='14' height='1' fill='%233b1f0c'/><rect x='1' y='3' width='2' height='1' fill='%233b1f0c'/><rect x='3' y='3' width='10' height='1' fill='%23fff3dc'/><rect x='13' y='3' width='2' height='1' fill='%233b1f0c'/><rect x='1' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='4' width='1' height='1' fill='%23fff3dc'/><rect x='3' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='4' width='8' height='1' fill='%23fff3dc'/><rect x='12' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='13' y='4' width='1' height='1' fill='%23fff3dc'/><rect x='14' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='4' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='5' width='6' height='1' fill='%23fff3dc'/><rect x='11' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='14' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='6' width='3' height='1' fill='%23fff3dc'/><rect x='5' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='6' width='4' height='1' fill='%23fff3dc'/><rect x='10' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='11' y='6' width='3' height='1' fill='%23fff3dc'/><rect x='14' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='7' width='4' height='1' fill='%23fff3dc'/><rect x='6' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='7' y='7' width='2' height='1' fill='%23e8505b'/><rect x='9' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='10' y='7' width='4' height='1' fill='%23fff3dc'/><rect x='14' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='3' height='1' fill='%23fff3dc'/><rect x='5' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='8' width='1' height='1' fill='%23fff3dc'/><rect x='7' y='8' width='2' height='1' fill='%23e8505b'/><rect x='9' y='8' width='1' height='1' fill='%23fff3dc'/><rect x='10' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='11' y='8' width='3' height='1' fill='%23fff3dc'/><rect x='14' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='2' height='1' fill='%23fff3dc'/><rect x='4' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='9' width='6' height='1' fill='%23fff3dc'/><rect x='11' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='12' y='9' width='2' height='1' fill='%23fff3dc'/><rect x='14' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='1' height='1' fill='%23fff3dc'/><rect x='3' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='10' width='8' height='1' fill='%23fff3dc'/><rect x='12' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='13' y='10' width='1' height='1' fill='%23fff3dc'/><rect x='14' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='11' width='2' height='1' fill='%233b1f0c'/><rect x='3' y='11' width='10' height='1' fill='%23e9cf9c'/><rect x='13' y='11' width='2' height='1' fill='%233b1f0c'/><rect x='1' y='12' width='14' height='1' fill='%233b1f0c'/></svg>"); }
.plank .pxi, .cta-btn .pxi { width: 1.45em; height: 1.45em; }
.topnav a { display: inline-flex; align-items: center; }
.topnav a .pxi { width: 1.2em; height: 1.2em; }
.sign h2 .pxi { width: .9em; height: .9em; vertical-align: -.08em; filter: drop-shadow(3px 3px 0 var(--wood-dark)); }
/* six planks on the signpost */
.signpost { top: 22%; gap: 1cqw; }

/* ===== Gallery: real photos pinned in wooden frames ===== */
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 28px; padding: 6px 6px 10px; }
.photo-card {
  margin: 0; padding: 12px 12px 10px; background: var(--parch); color: var(--ink); position: relative;
  transform: rotate(var(--tilt, 0deg)); transition: transform .15s;
  box-shadow: 0 0 0 4px var(--wood-dark), inset 0 0 0 4px var(--wood), inset 0 0 0 8px var(--wood-hi), 0 12px 0 rgba(0,0,0,.25);
}
.photo-card::before { /* pixel pin */
  content: ""; position: absolute; top: -10px; left: 50%; width: 16px; height: 16px; transform: translateX(-50%);
  background: var(--pink); box-shadow: 0 0 0 3px var(--ink), inset 3px 3px 0 var(--pink-hi), inset -3px -3px 0 var(--pink-dark); z-index: 2;
}
.photo-card:hover, .photo-card:focus-within { transform: rotate(0deg) translateY(-4px); }
.photo-frame {
  display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; cursor: var(--cur-click); overflow: hidden;
  background: var(--wood-dark); box-shadow: inset 0 0 0 4px var(--wood-dark);
}
.photo-frame { position: relative; }
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.photo-frame:focus-visible { outline: 3px dashed var(--pink-dark); outline-offset: 4px; }
.photo-card figcaption { padding: 10px 4px 0; text-align: center; line-height: 1.25; }
.photo-card figcaption b { display: block; font: 600 19px var(--font); }
.photo-card figcaption span { display: block; font: 700 14px var(--font-read); opacity: .7; margin-top: 2px; }
.photo-card.empty .photo-frame { display: grid; place-items: center; cursor: var(--cur); background: repeating-linear-gradient(45deg, #ead3a0 0 10px, #e2c58c 10px 20px); box-shadow: inset 0 0 0 4px var(--wood); }
.photo-card.empty .photo-frame .pxi { width: 64px; height: 64px; opacity: .55; }
.photo-card.empty figcaption b { opacity: .6; }

.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px 70px; background: rgba(30,16,8,.82); }
.lightbox[hidden] { display: none !important; }
body.lb-open { overflow: hidden; }
.lb-frame { margin: 0; padding: 16px 16px 12px; max-width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.lb-frame img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; margin: 0 auto; box-shadow: 0 0 0 4px var(--wood-dark); image-rendering: auto; }
.lb-frame figcaption { text-align: center; padding-top: 12px; }
.lb-frame figcaption b { display: block; font: 600 22px var(--font); }
.lb-frame figcaption span { font: 700 15px var(--font-read); opacity: .7; }
.lb-btn { position: absolute; min-width: 48px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 12px; top: 12px; }
@media (max-width: 820px) { .album { grid-template-columns: 1fr 1fr; gap: 28px 18px; } }
@media (max-width: 700px) {
  .lightbox { padding: 64px 10px 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-prev { left: calc(50% - 64px); } .lb-next { right: calc(50% - 64px); }
}
@media (max-width: 460px) { .album { grid-template-columns: 1fr; } }
/* landscape portrait: both of us speaking, and the end of a story */
.dlg-portrait.wide { aspect-ratio: 1143 / 1024; height: 125%; left: .6%; }
.vn .dialog.wide-portrait { padding-left: 25%; }
.vn .dialog.wide-portrait .nameplate { left: 25%; }
@media (max-width: 700px) {
  .dlg-portrait.wide { width: 108px; height: auto; left: 6px; }
  .vn .dialog.wide-portrait { padding-left: 124px; }
  .vn .dialog.wide-portrait .nameplate { left: 122px; }
}
/* title screen: night version shown while the mouse button is held on the artwork (PC) */
.hero-night { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; pointer-events: none; }
.hero-art.night .hero-night { opacity: 1; }
/* phones: holding a finger on the art shouldn't select it or pop up "save image" */
.hero-art, .hero-art * {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;
}
/* iPhone: let the finger land on the art box, not on the <img>, so Safari has no image to select or preview */
.hero-art .hero-img { pointer-events: none; }

/* ===== cursor: a pixel cherry blossom; over things you can click it becomes a grey cat (Leia) ===== */
:root {
  --cur: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='6' y='1' width='4' height='1' fill='%237a3046'/><rect x='5' y='2' width='1' height='1' fill='%237a3046'/><rect x='6' y='2' width='4' height='1' fill='%23ffc4d6'/><rect x='10' y='2' width='1' height='1' fill='%237a3046'/><rect x='2' y='3' width='2' height='1' fill='%237a3046'/><rect x='5' y='3' width='1' height='1' fill='%237a3046'/><rect x='6' y='3' width='1' height='1' fill='%23ffc4d6'/><rect x='7' y='3' width='2' height='1' fill='%23ffffff'/><rect x='9' y='3' width='1' height='1' fill='%23ffc4d6'/><rect x='10' y='3' width='1' height='1' fill='%237a3046'/><rect x='12' y='3' width='2' height='1' fill='%237a3046'/><rect x='1' y='4' width='1' height='1' fill='%237a3046'/><rect x='2' y='4' width='2' height='1' fill='%23ffc4d6'/><rect x='4' y='4' width='2' height='1' fill='%237a3046'/><rect x='6' y='4' width='4' height='1' fill='%23ffc4d6'/><rect x='10' y='4' width='2' height='1' fill='%237a3046'/><rect x='12' y='4' width='2' height='1' fill='%23ffc4d6'/><rect x='14' y='4' width='1' height='1' fill='%237a3046'/><rect x='1' y='5' width='1' height='1' fill='%237a3046'/><rect x='2' y='5' width='1' height='1' fill='%23ffc4d6'/><rect x='3' y='5' width='1' height='1' fill='%23ffffff'/><rect x='4' y='5' width='2' height='1' fill='%23ffc4d6'/><rect x='6' y='5' width='1' height='1' fill='%237a3046'/><rect x='7' y='5' width='2' height='1' fill='%23ffc4d6'/><rect x='9' y='5' width='1' height='1' fill='%237a3046'/><rect x='10' y='5' width='2' height='1' fill='%23ffc4d6'/><rect x='12' y='5' width='1' height='1' fill='%23ffffff'/><rect x='13' y='5' width='1' height='1' fill='%23ffc4d6'/><rect x='14' y='5' width='1' height='1' fill='%237a3046'/><rect x='1' y='6' width='1' height='1' fill='%237a3046'/><rect x='2' y='6' width='5' height='1' fill='%23ffc4d6'/><rect x='7' y='6' width='2' height='1' fill='%23ffd23f'/><rect x='9' y='6' width='5' height='1' fill='%23ffc4d6'/><rect x='14' y='6' width='1' height='1' fill='%237a3046'/><rect x='2' y='7' width='1' height='1' fill='%237a3046'/><rect x='3' y='7' width='3' height='1' fill='%23ffc4d6'/><rect x='6' y='7' width='1' height='1' fill='%23ffd23f'/><rect x='7' y='7' width='2' height='1' fill='%23e89a1c'/><rect x='9' y='7' width='1' height='1' fill='%23ffd23f'/><rect x='10' y='7' width='3' height='1' fill='%23ffc4d6'/><rect x='13' y='7' width='1' height='1' fill='%237a3046'/><rect x='2' y='8' width='1' height='1' fill='%237a3046'/><rect x='3' y='8' width='3' height='1' fill='%23ffc4d6'/><rect x='6' y='8' width='1' height='1' fill='%23ffd23f'/><rect x='7' y='8' width='2' height='1' fill='%23e89a1c'/><rect x='9' y='8' width='1' height='1' fill='%23ffd23f'/><rect x='10' y='8' width='3' height='1' fill='%23ffc4d6'/><rect x='13' y='8' width='1' height='1' fill='%237a3046'/><rect x='1' y='9' width='1' height='1' fill='%237a3046'/><rect x='2' y='9' width='5' height='1' fill='%23ffc4d6'/><rect x='7' y='9' width='2' height='1' fill='%23ffd23f'/><rect x='9' y='9' width='5' height='1' fill='%23ffc4d6'/><rect x='14' y='9' width='1' height='1' fill='%237a3046'/><rect x='1' y='10' width='1' height='1' fill='%237a3046'/><rect x='2' y='10' width='1' height='1' fill='%23ffc4d6'/><rect x='3' y='10' width='1' height='1' fill='%23ffffff'/><rect x='4' y='10' width='2' height='1' fill='%23ffc4d6'/><rect x='6' y='10' width='1' height='1' fill='%237a3046'/><rect x='7' y='10' width='1' height='1' fill='%23f08fb0'/><rect x='8' y='10' width='1' height='1' fill='%23ffc4d6'/><rect x='9' y='10' width='1' height='1' fill='%237a3046'/><rect x='10' y='10' width='2' height='1' fill='%23ffc4d6'/><rect x='12' y='10' width='1' height='1' fill='%23ffffff'/><rect x='13' y='10' width='1' height='1' fill='%23ffc4d6'/><rect x='14' y='10' width='1' height='1' fill='%237a3046'/><rect x='1' y='11' width='1' height='1' fill='%237a3046'/><rect x='2' y='11' width='3' height='1' fill='%23ffc4d6'/><rect x='5' y='11' width='2' height='1' fill='%237a3046'/><rect x='7' y='11' width='1' height='1' fill='%23f08fb0'/><rect x='8' y='11' width='1' height='1' fill='%23ffc4d6'/><rect x='9' y='11' width='2' height='1' fill='%237a3046'/><rect x='11' y='11' width='2' height='1' fill='%23ffc4d6'/><rect x='13' y='11' width='1' height='1' fill='%237a3046'/><rect x='2' y='12' width='2' height='1' fill='%237a3046'/><rect x='4' y='12' width='2' height='1' fill='%23ffc4d6'/><rect x='6' y='12' width='1' height='1' fill='%237a3046'/><rect x='7' y='12' width='1' height='1' fill='%23f08fb0'/><rect x='8' y='12' width='2' height='1' fill='%23ffc4d6'/><rect x='10' y='12' width='3' height='1' fill='%237a3046'/><rect x='4' y='13' width='1' height='1' fill='%237a3046'/><rect x='5' y='13' width='2' height='1' fill='%23ffc4d6'/><rect x='7' y='13' width='1' height='1' fill='%23f08fb0'/><rect x='8' y='13' width='2' height='1' fill='%23ffc4d6'/><rect x='10' y='13' width='1' height='1' fill='%237a3046'/><rect x='5' y='14' width='5' height='1' fill='%237a3046'/></svg>") 16 16, auto;
  --cur-click: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='1' y='1' width='2' height='1' fill='%233a3036'/><rect x='13' y='1' width='2' height='1' fill='%233a3036'/><rect x='1' y='2' width='1' height='1' fill='%233a3036'/><rect x='2' y='2' width='1' height='1' fill='%238a8088'/><rect x='3' y='2' width='1' height='1' fill='%233a3036'/><rect x='12' y='2' width='1' height='1' fill='%233a3036'/><rect x='13' y='2' width='1' height='1' fill='%238a8088'/><rect x='14' y='2' width='1' height='1' fill='%233a3036'/><rect x='1' y='3' width='1' height='1' fill='%233a3036'/><rect x='2' y='3' width='1' height='1' fill='%23f4a0a8'/><rect x='3' y='3' width='1' height='1' fill='%238a8088'/><rect x='4' y='3' width='1' height='1' fill='%233a3036'/><rect x='11' y='3' width='1' height='1' fill='%233a3036'/><rect x='12' y='3' width='1' height='1' fill='%238a8088'/><rect x='13' y='3' width='1' height='1' fill='%23f4a0a8'/><rect x='14' y='3' width='1' height='1' fill='%233a3036'/><rect x='1' y='4' width='1' height='1' fill='%233a3036'/><rect x='2' y='4' width='2' height='1' fill='%23f4a0a8'/><rect x='4' y='4' width='1' height='1' fill='%238a8088'/><rect x='5' y='4' width='6' height='1' fill='%233a3036'/><rect x='11' y='4' width='1' height='1' fill='%238a8088'/><rect x='12' y='4' width='2' height='1' fill='%23f4a0a8'/><rect x='14' y='4' width='1' height='1' fill='%233a3036'/><rect x='1' y='5' width='1' height='1' fill='%233a3036'/><rect x='2' y='5' width='12' height='1' fill='%238a8088'/><rect x='14' y='5' width='1' height='1' fill='%233a3036'/><rect x='0' y='6' width='1' height='1' fill='%233a3036'/><rect x='1' y='6' width='14' height='1' fill='%238a8088'/><rect x='15' y='6' width='1' height='1' fill='%233a3036'/><rect x='0' y='7' width='1' height='1' fill='%233a3036'/><rect x='1' y='7' width='2' height='1' fill='%238a8088'/><rect x='3' y='7' width='2' height='1' fill='%23ffe040'/><rect x='5' y='7' width='6' height='1' fill='%238a8088'/><rect x='11' y='7' width='2' height='1' fill='%23ffe040'/><rect x='13' y='7' width='2' height='1' fill='%238a8088'/><rect x='15' y='7' width='1' height='1' fill='%233a3036'/><rect x='0' y='8' width='1' height='1' fill='%233a3036'/><rect x='1' y='8' width='2' height='1' fill='%238a8088'/><rect x='3' y='8' width='1' height='1' fill='%23ffe040'/><rect x='4' y='8' width='1' height='1' fill='%232a2020'/><rect x='5' y='8' width='6' height='1' fill='%238a8088'/><rect x='11' y='8' width='1' height='1' fill='%232a2020'/><rect x='12' y='8' width='1' height='1' fill='%23ffe040'/><rect x='13' y='8' width='2' height='1' fill='%238a8088'/><rect x='15' y='8' width='1' height='1' fill='%233a3036'/><rect x='0' y='9' width='1' height='1' fill='%233a3036'/><rect x='1' y='9' width='6' height='1' fill='%238a8088'/><rect x='7' y='9' width='2' height='1' fill='%23e07888'/><rect x='9' y='9' width='6' height='1' fill='%238a8088'/><rect x='15' y='9' width='1' height='1' fill='%233a3036'/><rect x='0' y='10' width='1' height='1' fill='%233a3036'/><rect x='1' y='10' width='1' height='1' fill='%238a8088'/><rect x='2' y='10' width='2' height='1' fill='%23c4bcc0'/><rect x='4' y='10' width='2' height='1' fill='%238a8088'/><rect x='6' y='10' width='1' height='1' fill='%233a3036'/><rect x='7' y='10' width='2' height='1' fill='%238a8088'/><rect x='9' y='10' width='1' height='1' fill='%233a3036'/><rect x='10' y='10' width='2' height='1' fill='%238a8088'/><rect x='12' y='10' width='2' height='1' fill='%23c4bcc0'/><rect x='14' y='10' width='1' height='1' fill='%238a8088'/><rect x='15' y='10' width='1' height='1' fill='%233a3036'/><rect x='0' y='11' width='1' height='1' fill='%233a3036'/><rect x='1' y='11' width='1' height='1' fill='%238a8088'/><rect x='2' y='11' width='3' height='1' fill='%23c4bcc0'/><rect x='5' y='11' width='2' height='1' fill='%238a8088'/><rect x='7' y='11' width='2' height='1' fill='%233a3036'/><rect x='9' y='11' width='2' height='1' fill='%238a8088'/><rect x='11' y='11' width='3' height='1' fill='%23c4bcc0'/><rect x='14' y='11' width='1' height='1' fill='%238a8088'/><rect x='15' y='11' width='1' height='1' fill='%233a3036'/><rect x='1' y='12' width='1' height='1' fill='%233a3036'/><rect x='2' y='12' width='12' height='1' fill='%23c4bcc0'/><rect x='14' y='12' width='1' height='1' fill='%233a3036'/><rect x='2' y='13' width='2' height='1' fill='%233a3036'/><rect x='4' y='13' width='8' height='1' fill='%23c4bcc0'/><rect x='12' y='13' width='2' height='1' fill='%233a3036'/><rect x='4' y='14' width='8' height='1' fill='%233a3036'/></svg>") 16 16, pointer;
}
html, body { cursor: var(--cur); }
a, button, summary, label, select, [role="button"], input[type="radio"], input[type="checkbox"] { cursor: var(--cur-click); }
input:not([type="radio"]):not([type="checkbox"]), textarea { cursor: text; }

/* ===== story: "◀ Back" tab on the top-right edge of the dialogue box (mirrors the name tag) ===== */
.dialog-back {
  position: absolute; right: 18px; top: -20px; z-index: 3;
  font: 700 16px var(--font); color: var(--ink); padding: 4px 12px; border: 0; border-radius: 6px;
  background: linear-gradient(#fbe7bf, #f1cf92); box-shadow: 0 0 0 3px #c98a4b, 0 0 0 5px #5a3418;
  cursor: var(--cur-click);
}
.dialog-back[hidden] { display: none; }
.dialog-back:hover, .dialog-back:focus-visible { background: linear-gradient(#ffd6e2, #f7a8c0); outline: none; }
.dialog-back:active { transform: translateY(1px); }
.vn .dialog-back {
  top: auto; bottom: calc(100% - .8cqw); right: 2.4cqw; padding: .5cqw 1.8cqw; font-size: clamp(12px, 1.7cqw, 20px);
  border-radius: .6cqw .6cqw 0 0; box-shadow: 0 0 0 .35cqw #c98a4b, 0 0 0 .6cqw #5a3418;
}
@media (max-width: 700px) {
  .vn .dialog-back { bottom: auto; top: -18px; right: 12px; padding: 3px 10px; font-size: 14px; border-radius: 6px;
    box-shadow: 0 0 0 3px #c98a4b, 0 0 0 5px #5a3418; }
}

/* ===== gallery albums: a shelf of scrapbooks (cover photo with pages stacked behind) ===== */
.album-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 44px 34px; padding: 14px 10px 10px; }
.album-shelf[hidden], .album-view[hidden] { display: none; }
.album-card {
  position: relative; z-index: 0; display: flex; flex-direction: column; align-items: stretch; width: 100%;
  padding: 14px 14px 12px; border: 0; background: none; color: var(--ink); text-align: center; cursor: var(--cur-click);
  transform: rotate(var(--tilt, 0deg)); transition: transform .15s;
}
/* the cover paper, plus two more pages peeking out behind it (all behind the card's content) */
.album-paper, .album-card::before, .album-card::after { content: ""; position: absolute; inset: 0; box-shadow: 0 0 0 4px var(--wood-dark); }
.album-paper { z-index: -1; background: var(--parch);
  box-shadow: 0 0 0 4px var(--wood-dark), inset 0 0 0 4px var(--wood), inset 0 0 0 8px var(--wood-hi), 0 12px 0 rgba(0,0,0,.25); }
.album-card::before { z-index: -2; background: #f3dfb3; transform: rotate(4deg) translate(6px, 2px); }
.album-card::after { z-index: -3; background: #e9cd96; transform: rotate(-3.5deg) translate(-6px, 4px); }
.album-card:hover, .album-card:focus-visible { transform: rotate(0deg) translateY(-5px); outline: none; }
.album-card:focus-visible .album-paper { box-shadow: 0 0 0 4px var(--pink-dark), inset 0 0 0 4px var(--wood), inset 0 0 0 8px var(--wood-hi), 0 12px 0 rgba(0,0,0,.25); }
.album-cover {
  display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--wood-dark); box-shadow: inset 0 0 0 4px var(--wood-dark);
}
.album-cover { position: relative; }
.album-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.album-card.empty .album-cover { background: repeating-linear-gradient(45deg, #ead3a0 0 10px, #e2c58c 10px 20px); box-shadow: inset 0 0 0 4px var(--wood); }
.album-card.empty .album-cover .pxi { width: 64px; height: 64px; opacity: .55; }
.album-title { display: block; margin-top: 10px; font: 600 21px var(--font); }
.album-note { display: block; margin-top: 3px; font: 700 14px var(--font-read); opacity: .7; }

/* inside an album: "◀ All albums" + the album name, then its photos */
.album-head { display: flex; align-items: center; gap: 18px; margin: 4px 6px 30px; flex-wrap: wrap; }
.album-back { padding: 10px 16px; font-size: 17px; }
.album-name h3 { margin: 0; font: 600 26px var(--font); color: var(--parch); text-shadow: 2px 2px 0 var(--wood-dark); }
.album-name p { margin: 2px 0 0; font: 700 15px var(--font-read); color: var(--parch); opacity: .85; text-shadow: 1px 1px 0 var(--wood-dark); }
@media (max-width: 520px) {
  .album-shelf { grid-template-columns: 1fr 1fr; gap: 30px 20px; padding: 10px 6px; }
  .album-card { padding: 9px 9px 8px; }
  .album-title { font-size: 17px; margin-top: 7px; }
  .album-note { font-size: 12px; }
  .album-card.empty .album-cover .pxi { width: 40px; height: 40px; }
}
.album-loading { grid-column: 1 / -1; text-align: center; font: 600 20px var(--font); color: var(--parch); text-shadow: 2px 2px 0 var(--wood-dark); }

/* ===== chat: floating button above the music switch + a pop-up chat box ===== */
.pxi-chat { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='2' y='1' width='12' height='1' fill='%233b1f0c'/><rect x='1' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='2' width='12' height='1' fill='%23fff3dc'/><rect x='14' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='3' width='14' height='1' fill='%23fff3dc'/><rect x='15' y='3' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='4' width='14' height='1' fill='%23fff3dc'/><rect x='15' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='3' y='5' width='2' height='1' fill='%233b1f0c'/><rect x='5' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='7' y='5' width='2' height='1' fill='%233b1f0c'/><rect x='9' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='11' y='5' width='2' height='1' fill='%233b1f0c'/><rect x='13' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='15' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='6' width='2' height='1' fill='%23fff3dc'/><rect x='3' y='6' width='2' height='1' fill='%233b1f0c'/><rect x='5' y='6' width='2' height='1' fill='%23fff3dc'/><rect x='7' y='6' width='2' height='1' fill='%233b1f0c'/><rect x='9' y='6' width='2' height='1' fill='%23fff3dc'/><rect x='11' y='6' width='2' height='1' fill='%233b1f0c'/><rect x='13' y='6' width='2' height='1' fill='%23fff3dc'/><rect x='15' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='7' width='14' height='1' fill='%23fff3dc'/><rect x='15' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='0' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='8' width='13' height='1' fill='%23fff3dc'/><rect x='14' y='8' width='1' height='1' fill='%23e9cf9c'/><rect x='15' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='1' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='11' height='1' fill='%23fff3dc'/><rect x='13' y='9' width='1' height='1' fill='%23e9cf9c'/><rect x='14' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='4' height='1' fill='%233b1f0c'/><rect x='6' y='10' width='2' height='1' fill='%23fff3dc'/><rect x='8' y='10' width='6' height='1' fill='%233b1f0c'/><rect x='4' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='11' width='2' height='1' fill='%23fff3dc'/><rect x='7' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='12' width='1' height='1' fill='%23fff3dc'/><rect x='6' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='4' y='13' width='2' height='1' fill='%233b1f0c'/></svg>"); }
.hud { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-btn { width: 52px; height: 52px; padding: 0; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0,0,0,.3); animation: chat-bob 2.4s steps(2) infinite; }
.chat-btn .pxi { width: 32px; height: 32px; }
.chat-btn:hover, .chat-btn.on { background: var(--pink-dark, #c0475f); animation: none; }
@keyframes chat-bob { 50% { transform: translateY(-3px); } }
.chat-box {
  position: fixed; right: 12px; bottom: 120px; z-index: 61; width: 330px; max-width: calc(100vw - 24px);
  height: 400px; max-height: calc(100vh - 150px); display: flex; flex-direction: column; padding: 0; overflow: hidden;
  color: var(--ink); background: var(--parch);
  box-shadow: 0 0 0 4px var(--wood-dark), inset 0 0 0 4px var(--wood), 0 10px 0 rgba(0,0,0,.25);
}
.chat-box[hidden] { display: none; }
.chat-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; font: 600 18px var(--font);
  color: var(--parch); background: var(--wood); border-bottom: 4px solid var(--wood-dark);
}
.chat-close { margin-left: auto; font: 700 16px var(--font); color: var(--parch); background: none; border: 0; padding: 2px 6px; cursor: var(--cur-click); }
.chat-close:hover { color: var(--pink-hi, #ffd1dc); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { margin: 0; max-width: 82%; padding: 8px 12px; font: 700 15px/1.35 var(--font-read); white-space: pre-wrap; word-wrap: break-word;
  box-shadow: 0 0 0 3px var(--wood-dark); border-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: #fff8e6; }
.chat-msg.me { align-self: flex-end; background: var(--pink); color: #fff; }
.chat-msg.typing { animation: blink .6s steps(2) infinite; letter-spacing: 2px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 4px solid var(--wood); background: var(--parch-2); }
.chat-form input { flex: 1; min-width: 0; font: 700 15px var(--font-read); padding: 8px 10px; border: 3px solid var(--wood-dark); background: #fffaf0; color: var(--ink); }
.chat-form input:focus { outline: 3px dashed var(--pink-dark, #c0475f); outline-offset: 1px; }
.chat-send { padding: 8px 14px; font-size: 16px; }
@media (max-width: 700px) { .chat-box { bottom: 116px; height: 360px; } }

/* ===== language switch (EN → 繁 → 简), above the chat button ===== */
.lang-btn { width: 52px; height: 52px; padding: 0; display: grid; place-items: center; font-size: 20px; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.lang-btn:hover { background: var(--pink-dark); }
/* Chinese: the pixel fonts have no Chinese letters, so use the system's Chinese font for those */
html:lang(zh-Hant) { --font: "Pixelify Sans", "VT323", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --font-read: "Nunito", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif; }
html:lang(zh-Hans) { --font: "Pixelify Sans", "VT323", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-read: "Nunito", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
.chat-box { bottom: 182px; }
@media (max-width: 700px) { .chat-box { bottom: 178px; } }

/* ===== Message Board: pinned paper notes + photo comments in the photo viewer ===== */
.pxi-note { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='6' y='0' width='3' height='1' fill='%233b1f0c'/><rect x='5' y='1' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='1' width='1' height='1' fill='%23e8505b'/><rect x='7' y='1' width='1' height='1' fill='%23ffb3b8'/><rect x='8' y='1' width='1' height='1' fill='%23e8505b'/><rect x='9' y='1' width='1' height='1' fill='%233b1f0c'/><rect x='5' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='6' y='2' width='2' height='1' fill='%23e8505b'/><rect x='8' y='2' width='1' height='1' fill='%23b8333f'/><rect x='9' y='2' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='3' width='12' height='1' fill='%233b1f0c'/><rect x='2' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='4' width='4' height='1' fill='%23fff3dc'/><rect x='7' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='8' y='4' width='5' height='1' fill='%23fff3dc'/><rect x='13' y='4' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='5' width='1' height='1' fill='%23fff3dc'/><rect x='4' y='5' width='7' height='1' fill='%23b98b5a'/><rect x='11' y='5' width='2' height='1' fill='%23fff3dc'/><rect x='13' y='5' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='6' width='10' height='1' fill='%23fff3dc'/><rect x='13' y='6' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='7' width='1' height='1' fill='%23fff3dc'/><rect x='4' y='7' width='8' height='1' fill='%23b98b5a'/><rect x='12' y='7' width='1' height='1' fill='%23fff3dc'/><rect x='13' y='7' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='8' width='10' height='1' fill='%23fff3dc'/><rect x='13' y='8' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='9' width='1' height='1' fill='%23fff3dc'/><rect x='4' y='9' width='5' height='1' fill='%23b98b5a'/><rect x='9' y='9' width='4' height='1' fill='%23fff3dc'/><rect x='13' y='9' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='10' width='10' height='1' fill='%23fff3dc'/><rect x='13' y='10' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='11' width='1' height='1' fill='%23fff3dc'/><rect x='4' y='11' width='7' height='1' fill='%23b98b5a'/><rect x='11' y='11' width='2' height='1' fill='%23fff3dc'/><rect x='13' y='11' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='12' width='8' height='1' fill='%23fff3dc'/><rect x='11' y='12' width='2' height='1' fill='%23e9cf9c'/><rect x='13' y='12' width='1' height='1' fill='%233b1f0c'/><rect x='2' y='13' width='1' height='1' fill='%233b1f0c'/><rect x='3' y='13' width='7' height='1' fill='%23fff3dc'/><rect x='10' y='13' width='1' height='1' fill='%23e9cf9c'/><rect x='11' y='13' width='2' height='1' fill='%233b1f0c'/><rect x='2' y='14' width='10' height='1' fill='%233b1f0c'/></svg>"); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* hidden spam-bot trap */
.note-form { max-width: 720px; margin: 0 auto 34px; display: grid; gap: 12px; }
.note-form label { display: grid; gap: 4px; font-weight: 700; }
.note-form input, .note-form textarea, .lb-form input, .lb-form textarea {
  width: 100%; font: 700 16px var(--font-read); padding: 9px 11px; border: 3px solid var(--wood-dark); background: #fffaf0; color: var(--ink); resize: vertical; }
.note-form input:focus, .note-form textarea:focus, .lb-form input:focus, .lb-form textarea:focus { outline: 3px dashed var(--pink-dark); outline-offset: 1px; }
.note-form-row { display: flex; align-items: center; gap: 12px; }
.note-form-row .err { flex: 1; margin: 0; }
.note-count { font: 700 13px var(--font-read); opacity: .6; }
.note-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 26px; padding: 10px 6px; align-items: start; }
.note-card {
  position: relative; margin: 0; padding: 22px 18px 14px; background: var(--paper, #fff3dc); color: var(--ink);
  transform: rotate(var(--tilt, 0deg)); transition: transform .15s;
  box-shadow: 0 0 0 3px var(--wood-dark), 0 10px 0 rgba(0,0,0,.22);
}
.note-card::before { /* pixel pin */
  content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; transform: translateX(-50%);
  background: var(--pink); box-shadow: 0 0 0 3px var(--ink), inset 3px 3px 0 var(--pink-hi), inset -3px -3px 0 var(--pink-dark);
}
.note-card:hover { transform: rotate(0deg) translateY(-4px); }
.note-text { margin: 0 0 12px; font: 700 17px/1.5 var(--font-read); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-card footer { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 2px dashed rgba(90,52,24,.3); padding-top: 8px; }
.note-card footer b { font: 600 17px var(--font); overflow-wrap: anywhere; }
.note-card footer time { font: 700 12px var(--font-read); opacity: .6; white-space: nowrap; }
.note-empty { grid-column: 1 / -1; text-align: center; font: 600 20px var(--font); color: var(--parch); text-shadow: 2px 2px 0 var(--wood-dark); }

/* photo viewer: picture on the left, comments on the right (stacked on phones) */
.lb-frame { flex-direction: row; gap: 18px; align-items: stretch; max-width: min(1240px, 100%); max-height: calc(100vh - 48px); }
.lb-photo { margin: 0; display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.lb-photo img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; margin: 0 auto; box-shadow: 0 0 0 4px var(--wood-dark); image-rendering: auto; }
.lb-photo figcaption { text-align: center; padding-top: 12px; }
.lb-photo figcaption b { display: block; font: 600 22px var(--font); }
.lb-photo figcaption span { font: 700 15px var(--font-read); opacity: .7; }
.lb-comments { flex: 0 0 300px; display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 80px); border-left: 3px dashed rgba(90,52,24,.35); padding-left: 16px; }
.lb-comments h4 { margin: 0 0 8px; font: 600 19px var(--font); }
.lb-list { list-style: none; margin: 0 0 10px; padding: 0 4px 0 0; flex: 1 1 auto; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.lb-list li { background: #fffaf0; padding: 8px 10px; box-shadow: 0 0 0 2px var(--wood); }
.lb-list li b { font: 600 15px var(--font); margin-right: 8px; }
.lb-list li time { font: 700 11px var(--font-read); opacity: .6; }
.lb-list li p { margin: 4px 0 0; font: 700 14px/1.4 var(--font-read); white-space: pre-wrap; overflow-wrap: anywhere; }
.lb-list li.lb-empty { background: none; box-shadow: none; font: 700 14px var(--font-read); opacity: .7; padding: 4px 0; }
.lb-form { display: grid; gap: 6px; }
.lb-form input, .lb-form textarea { font-size: 14px; padding: 7px 9px; }
.lb-form .btn { padding: 8px 16px; font-size: 16px; }
.photo-talk { display: inline-block; margin-top: 4px; font: 700 13px var(--font-read); opacity: .75; }
.photo-talk[hidden] { display: none; }
@media (max-width: 820px) {
  .lb-frame { flex-direction: column; overflow-y: auto; }
  .lb-photo img { max-height: 55vh; }
  .lb-comments { flex: none; max-height: none; border-left: 0; padding-left: 0; border-top: 3px dashed rgba(90,52,24,.35); padding-top: 12px; }
  .lb-list { max-height: 30vh; }
}
@media (max-width: 520px) { .note-wall { grid-template-columns: 1fr; } }

/* ===== character cards: six-stat hexagon chart (STR DEX CON INT WIS CHA, 1–10) ===== */
.char-hex { display: block; width: 100%; max-width: 280px; margin: 2px auto 6px; overflow: visible; }
.hex-grid polygon { fill: none; stroke: #d9bf8c; stroke-width: 1; }
.hex-grid polygon:first-child { fill: rgba(217,191,140,.18); stroke: var(--wood); stroke-width: 2; }
.hex-grid line { stroke: #d9bf8c; stroke-width: 1; stroke-dasharray: 2 3; }
.hex-shape { fill: rgba(232,80,91,.38); stroke: var(--pink-dark); stroke-width: 2.5; stroke-linejoin: round; }
.hex-dot { fill: var(--pink-dark); stroke: #fff; stroke-width: 1; }
.hex-stat text { font: 700 15px var(--font); fill: var(--ink); }
.hex-stat .hex-v { fill: var(--pink-dark); font-size: 15px; }
.hex-stat { cursor: help; }
.hex-stat:hover text { fill: var(--pink-dark); }

/* ===== "Sending…" pop-up for Forum messages and photo comments ===== */
.send-pop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(30,16,8,.45); }
.send-pop[hidden] { display: none; }
.send-box { min-width: 240px; max-width: min(360px, calc(100vw - 40px)); padding: 22px 26px 18px; text-align: center; animation: pop-in .18s steps(3); }
.send-icon { font-size: 46px; line-height: 1; }
.send-pop.busy .send-icon { animation: send-fly .9s steps(4) infinite; }
.send-msg { margin: 12px 0 0; font: 600 20px var(--font); color: var(--ink); }
@keyframes send-fly { 0%, 100% { transform: translate(-6px, 2px); } 50% { transform: translate(6px, -6px); } }
@keyframes pop-in { from { transform: scale(.85); opacity: 0; } }

/* ===== character cards: Instagram link ===== */
.char:focus-visible { outline: 3px dashed var(--pink-dark); outline-offset: 6px; }
.char-ig { color: var(--pink-dark); font-weight: 700; text-decoration: none; overflow-wrap: break-word; cursor: var(--cur-click); }
.char-ig:hover, .char-ig:focus-visible { text-decoration: underline; }
