/* House Next Door — bright, friendly, hand-drawn.
   Sticker look: bright fills, soft-black outlines, hard little shadows. */

/* ================================================================ tokens */
:root {
  color-scheme: light;
  --paper: #fffdf8;
  --surface: #ffffff;
  --surface-2: #fff7e8;
  --ink: #231f1c;
  --ink-2: #4a443e;
  --muted: #6b645c;
  --line: #eadfcb;
  --edge: #231f1c;
  --shadow-c: #231f1c;
  --on-bright: #231f1c;

  --coral: #ff7b5c;
  --coral-soft: #ffe7df;
  --coral-text: #c93f27;
  --sun: #ffd447;
  --sun-soft: #fff4cc;
  --mint: #7fdcae;
  --mint-soft: #e2f7ea;
  --leaf: #17805a;
  --sky: #c4eaff;
  --sky-soft: #e8f6ff;
  --blue: #6cbcf7;
  --blue-text: #1b6fb3;
  --lilac: #c3b2f7;
  --focus: #1b6fb3;

  /* the street */
  --sky-a: #aee0ff;
  --sky-b: #e6f6ff;
  --ground: #bfe6a3;
  --ground-2: #a6d889;
  --h-ink: #231f1c;
  --h-wall: #fffdf8;
  --h-wall-2: #fff5e2;
  --h-roof-ko: #ff7b5c;
  --h-roof-en: #5fcf9a;
  --h-roof-ja: #6cbcf7;
  --h-roof-zh: #ffd447;
  --h-roof-me: #c3b2f7;
  --h-door-1: #8a4b3a;
  --h-door-2: #2c7257;
  --h-door-3: #2f6aa3;
  --h-door-4: #c9603a;
  --h-door-5: #6a55b8;
  --h-chim: #e2836a;
  --h-win-off: #9aa3ad;
  --cloud: #ffffff;
  --sign: #fffdf8;

  --wrap: 1120px;
  --header-h: 64px;
  --shadow: 4px 4px 0 var(--shadow-c);
  --shadow-sm: 2px 2px 0 var(--shadow-c);
  --lang-accent: var(--coral);
  --f: .442;

  --display: "Fredoka", "Jua", system-ui, sans-serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15172a;
  --surface: #1f2238;
  --surface-2: #262a45;
  --ink: #f6f1e6;
  --ink-2: #d8d2c6;
  --muted: #aaa69d;
  --line: #383c5c;
  --edge: #6a6fa0;
  --shadow-c: #070812;

  --coral: #ff8a6e;
  --coral-soft: #442a30;
  --coral-text: #ffa08a;
  --sun-soft: #2a2d4d;
  --mint-soft: #1d3340;
  --leaf: #86e0b4;
  --sky: #2a3166;
  --sky-soft: #1c2142;
  --blue-text: #93cdf9;
  --focus: #93cdf9;

  --sky-a: #0d1130;
  --sky-b: #2d3275;
  --ground: #24462f;
  --ground-2: #1c3826;
  --h-ink: #07080f;
  --h-wall: #5b5f86;
  --h-wall-2: #50547a;
  --h-roof-ko: #a44a3b;
  --h-roof-en: #2f7a5c;
  --h-roof-ja: #3a6ea3;
  --h-roof-zh: #a8872a;
  --h-roof-me: #6f62a8;
  --h-door-1: #3f2620;
  --h-door-2: #173b2d;
  --h-door-3: #1a3657;
  --h-door-4: #6b3220;
  --h-door-5: #372b66;
  --h-chim: #7a4538;
  --h-win-off: #1a1c30;
  --cloud: #3a4080;
  --sign: #c9c6d8;
}

/* Each language has its own colour (and its own house on the street). */
:root[data-lang="ko"] { --lang-accent: var(--coral); --f: .1; }
:root[data-lang="en"] { --lang-accent: var(--mint); --f: .276; }
:root[data-lang="ja"] { --lang-accent: var(--blue); --f: .442; }
:root[data-lang="zh"] { --lang-accent: var(--sun); --f: .6375; }
/* On phones the street opens on the empty room, then walks to the visitor's language. */
:root.js:not(.street-ready) { --f: .9; }

/* Fonts per script. Latin is always Fredoka (headlines) + Nunito (text). */
:lang(en) { --display: "Fredoka", system-ui, sans-serif; --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; }
:lang(ko) { --display: "Fredoka", "Jua", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --sans: "Nunito", "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif; }
:lang(ja) { --display: "Fredoka", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", sans-serif; --sans: "Nunito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", "Meiryo", sans-serif; }
:lang(zh) { --display: "Fredoka", "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", sans-serif; --sans: "Nunito", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Heiti TC", sans-serif; }
/* Simplified Chinese (mainland): same rounded headline font (it carries Simplified glyphs), SC system fonts for text. */
:lang(zh-Hans) { --display: "Fredoka", "Chiron GoRound TC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; --sans: "Nunito", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", "Heiti SC", sans-serif; }

/* ================================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.lang-pending body { visibility: hidden; }
[lang] { font-family: var(--sans); }
h1, h2, h3, p, dl, dd, ul, ol, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
h1, h2, .display { font-family: var(--display); font-weight: 600; font-synthesis: none; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 5.4vw, 3.9rem); line-height: 1.06; letter-spacing: -.01em; }
h2 { font-size: clamp(1.65rem, 3.5vw, 2.5rem); line-height: 1.14; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 800; }
:lang(ko) h1, :lang(ja) h1, :lang(zh) h1 { line-height: 1.24; letter-spacing: 0; }
:lang(ko) h2, :lang(ja) h2, :lang(zh) h2 { line-height: 1.3; }
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
:lang(en), :lang(ja), :lang(zh) { word-break: normal; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) .display { word-break: auto-phrase; }
.nw { white-space: nowrap; }
p { text-wrap: pretty; }
a { color: var(--leaf); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--sun); color: var(--on-bright); }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--sun); color: var(--on-bright); font-weight: 800; padding: 10px 16px; border: 2px solid var(--edge); border-radius: 12px; }
.skip:focus { top: 10px; }
html:not(.js) .needs-js { display: none; }
[hidden] { display: none !important; }

section { padding-block: clamp(52px, 8vw, 96px); }
.tint-sun { background: var(--sun-soft); }
.tint-mint { background: var(--mint-soft); }
.tint-sky { background: var(--sky-soft); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .88rem; color: var(--on-bright); background: var(--sun); border: 2px solid var(--edge); border-radius: 999px; padding: 4px 14px; margin-bottom: 16px; }
.section-head { max-width: 720px; margin-bottom: clamp(26px, 4vw, 42px); }
.section-head p { color: var(--ink-2); font-size: 1.1rem; margin-top: 12px; }

/* reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .3, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* instant language switch: a very quick cross-fade where the browser supports it */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--vt-dur, .16s); }

/* =============================================================== buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 1.05rem; line-height: 1.2; padding: 14px 24px; border-radius: 999px; border: 2px solid var(--edge); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; text-align: center; transition: transform .12s ease, box-shadow .12s ease, background-color .15s; }
.btn-primary { background: var(--coral); color: var(--on-bright); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-c); }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-c); }
.btn-ghost:hover { background: var(--sun-soft); }
.btn-small { font-size: .92rem; padding: 9px 16px; }
.btn-small.btn-primary { box-shadow: var(--shadow-sm); }
.btn-small.btn-primary:hover { box-shadow: 3px 3px 0 var(--shadow-c); }
.btn.full { width: 100%; }
.small-link { font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 3px; text-underline-offset: 6px; padding: 8px 2px; }
.small-link:hover { text-decoration-color: var(--sun); }

/* ================================================================ header */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--paper); border-bottom: 2px solid transparent; transition: background-color .25s, border-color .25s; }
.site-header.scrolled { border-bottom-color: var(--edge); }
body[data-page="home"] .site-header:not(.scrolled) { background: var(--sky-a); }
.site-header .wrap { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; color: var(--ink); text-decoration: none; font-family: "Fredoka", var(--sans); font-weight: 600; font-size: 1.2rem; white-space: nowrap; }
.logo-mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--coral); color: var(--on-bright); border: 2px solid var(--edge); box-shadow: var(--shadow-sm); font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1; transform: rotate(-5deg); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover .logo-mark { transform: rotate(4deg) scale(1.06); }
.badge-pilot { font-family: var(--sans); font-size: .72rem; font-weight: 800; background: var(--sun); color: var(--on-bright); padding: 2px 9px; border-radius: 999px; border: 2px solid var(--edge); }
.nav { display: flex; align-items: center; gap: 12px; }
.nav-wide { display: none; }
.nav a:not(.btn) { color: var(--ink); font-weight: 800; text-decoration: none; padding: 8px 2px; }
.nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 3px; text-underline-offset: 6px; }
@media (min-width: 900px) {
  .nav { gap: 18px; }
  .nav-wide { display: inline-flex; }
}

/* Always-visible "My messages" control (icon-only on phones so five language buttons still fit). */
.acct-entry, .foot-links [data-acct-link], .map-links [data-acct-link] { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.acct-ic { display: none; flex: none; }
.unread-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--edge); }
.unread-dot[hidden] { display: none; }
@media (max-width: 899px) {
  .site-header .acct-entry { padding: 8px; min-width: 44px; min-height: 44px; justify-content: center; margin: 0; }
  .site-header .acct-entry:hover { text-decoration: none; }
  .site-header .acct-ic { display: block; }
  .site-header .acct-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .site-header .acct-entry .unread-dot { position: absolute; top: 6px; right: 6px; }
}

.lang-switch { position: relative; display: inline-flex; flex: none; padding: 3px; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }
.lang-switch::before { content: ""; display: none; position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--thumb-w, 0); transform: translateX(var(--thumb-x, 0)); border-radius: 999px; background: var(--lang-accent); border: 2px solid var(--edge); transition: transform .34s cubic-bezier(.3, 1.35, .5, 1), width .34s cubic-bezier(.3, 1.35, .5, 1), background-color .25s; }
.lang-switch.has-thumb::before { display: block; }
.lang-switch button { position: relative; z-index: 1; appearance: none; border: 0; background: none; color: var(--ink); font-weight: 800; font-size: .92rem; line-height: 1; height: 38px; padding: 0 13px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.lang-switch button[aria-pressed="true"] { color: var(--on-bright); }
.lang-switch:not(.has-thumb) button[aria-pressed="true"] { background: var(--lang-accent); }
.lang-switch .sm { display: none; }
@media (max-width: 560px) {
  :root { --header-h: 58px; }
  .site-header .wrap { gap: 8px; width: min(100% - 24px, var(--wrap)); }
  .badge-pilot { display: none; }
  .logo { font-size: .94rem; gap: 6px; }
  .logo-mark { width: 34px; height: 34px; font-size: 1.05rem; }
  .lang-switch button { padding: 0 6px; min-width: 40px; font-size: .84rem; height: 40px; }
  .lang-switch .lg { display: none; }
  .lang-switch .sm { display: inline; }
}
/* Five language buttons (Chinese in two scripts): tighten a little on phone widths so the name still fits. */
@media (max-width: 440px) {
  .site-header .wrap { gap: 6px; }
  .logo { font-size: .86rem; gap: 5px; }
  .logo-mark { width: 32px; height: 32px; font-size: 1rem; }
  .lang-switch button { padding: 0 5px; min-width: 38px; font-size: .82rem; }
}
/* Hide the wordmark a little earlier so the messages icon + five language buttons fit at 390px. */
@media (max-width: 480px) { .logo-name { display: none; } }

/* ================================================================== hero */
.hero { padding: 0 0 clamp(44px, 7vw, 84px); }
.hero-street { position: relative; overflow: hidden; background: linear-gradient(var(--sky-a), var(--sky-b) 80%); border-bottom: 2px solid var(--edge); container-type: inline-size; }
.street-svg { display: block; max-width: none; margin-inline: auto; height: auto; aspect-ratio: 1200 / 254;
  --sw: clamp(820px, 100vw, 1320px); width: var(--sw);
  transform: translateX(clamp(min(0px, 100vw - var(--sw)), 50vw - var(--f) * var(--sw), 0px));
  transition: transform .9s cubic-bezier(.3, 1, .35, 1); }
@supports (width: 1cqw) {
  .street-svg { --sw: clamp(820px, 100cqw, 1320px); transform: translateX(clamp(min(0px, 100cqw - var(--sw)), 50cqw - var(--f) * var(--sw), 0px)); }
}
@media (min-width: 1321px) {
  .street-svg { -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
  .hero-street { background: linear-gradient(var(--sky-a), var(--sky-b) 80%, var(--sky-b) 87%, var(--ground) 87%); }
}

.street-svg .outline { stroke: var(--h-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.street-svg .ground { fill: var(--ground); }
.street-svg .ground-shade { fill: var(--ground-2); }
.street-svg .ground-line { fill: none; stroke: var(--h-ink); stroke-width: 2; stroke-linecap: round; }
.street-svg .wall { fill: var(--h-wall); }
.street-svg .wall-2 { fill: var(--h-wall-2); }
.street-svg .roof-ko { fill: var(--h-roof-ko); }
.street-svg .roof-en { fill: var(--h-roof-en); }
.street-svg .roof-ja { fill: var(--h-roof-ja); }
.street-svg .roof-zh { fill: var(--h-roof-zh); }
.street-svg .roof-me { fill: var(--h-roof-me); }
.street-svg .door-1 { fill: var(--h-door-1); }
.street-svg .door-2 { fill: var(--h-door-2); }
.street-svg .door-3 { fill: var(--h-door-3); }
.street-svg .door-4 { fill: var(--h-door-4); }
.street-svg .door-5 { fill: var(--h-door-5); }
.street-svg .chim { fill: var(--h-chim); }
.street-svg .win .glow { fill: var(--wc); stroke: none; filter: url(#win-glow); transition: fill .8s; }
.street-svg .win .tint { fill: var(--wt); fill-opacity: .28; }
.street-svg .win .mull { fill: none; stroke-width: 1.1; opacity: .45; }
.street-svg .win.vacant .glow { fill: var(--h-win-off); filter: none; }
.street-svg .win.vacant .tint { fill-opacity: 0; }
.room-filled .street-svg .win.vacant .glow { fill: var(--wc); filter: url(#win-glow); }
.room-filled .street-svg .win.vacant .tint { fill-opacity: .28; }
:root[data-theme="dark"] .street-svg .win .glow { filter: url(#win-glow-night); }
:root[data-theme="dark"] .street-svg .win.vacant .glow { filter: none; }
:root[data-theme="dark"].room-filled .street-svg .win.vacant .glow { filter: url(#win-glow-night); }
.street-svg .cloud { fill: var(--cloud); stroke: var(--h-ink); stroke-width: 1.6; stroke-linejoin: round; }
.street-svg .cloud-a { animation: drift 46s linear infinite alternate; }
.street-svg .cloud-b { animation: drift 62s linear infinite alternate-reverse; }
.street-svg .stars { opacity: 0; transition: opacity .6s; }
.street-svg .stars circle { fill: #fff6c9; animation: twinkle 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.7s); }
:root[data-theme="dark"] .street-svg .stars { opacity: 1; }
:root[data-theme="dark"] .street-svg .cloud { opacity: .5; }
.street-svg .sign-board { fill: var(--sign); }
.street-svg .sign-text { font-family: var(--sans); font-size: 11.5px; font-weight: 800; fill: #231f1c; stroke: none; letter-spacing: .04em; }
.room-filled .street-svg .sign { opacity: 0; transition: opacity .6s; }

.street-svg .house { cursor: pointer; }
.js .street-svg .house { transform-box: fill-box; transform-origin: 50% 100%; animation: house-in .75s cubic-bezier(.25, 1.45, .4, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
.street-svg .hello-in { opacity: 0; transform: scale(.4) rotate(-8deg); transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .2s, transform .4s cubic-bezier(.3, 1.7, .5, 1); pointer-events: none; }
.street-svg .hello-in .bub { fill: #fff; stroke: var(--h-ink); stroke-width: 2; stroke-linejoin: round; }
.street-svg .hello-in text { font-family: var(--sans); font-size: 14px; font-weight: 800; fill: #231f1c; stroke: none; }
:root[data-lang="ko"] .house[data-house-lang="ko"] .hello-in,
:root[data-lang="en"] .house[data-house-lang="en"] .hello-in,
:root[data-lang="ja"] .house[data-house-lang="ja"] .hello-in,
:root[data-lang="zh"] .house[data-house-lang="zh"] .hello-in { opacity: 1; transform: none; transition-delay: .25s; }
@media (hover: hover) { .street-svg .house:hover .hello-in { opacity: 1; transform: none; } }

@keyframes house-in { from { opacity: 0; transform: translateY(26px) scale(.8, .6); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(60px); } }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.sky-toggle { position: absolute; z-index: 3; top: 10px; right: max(12px, calc((100% - var(--wrap)) / 2)); width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.sky-toggle svg { display: block; width: 100%; height: 100%; overflow: visible; transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.sky-toggle:hover svg { transform: rotate(18deg) scale(1.08); }
.sky-toggle .sun, .sky-toggle .moon { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1), opacity .35s; }
.sky-toggle .moon { opacity: 0; transform: translateY(24px) scale(.5); }
:root[data-theme="dark"] .sky-toggle .sun { opacity: 0; transform: translateY(24px) scale(.5); }
:root[data-theme="dark"] .sky-toggle .moon { opacity: 1; transform: none; }
@media (max-width: 560px) { .sky-toggle { width: 46px; height: 46px; top: 6px; } }

.hero-grid { display: grid; gap: 34px; padding-top: 30px; }
.hero-copy .lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--ink-2); margin-top: 18px; max-width: 33em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 28px; }
.hero-card-col { position: relative; z-index: 2; min-width: 0; }
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: 56px; align-items: start; padding-top: 44px; }
  .hero-card-col { margin-top: -72px; }
}

/* ========================================================== listing card */
.card-demo { position: relative; background: var(--surface); border: 2px solid var(--edge); border-radius: 22px; box-shadow: 6px 6px 0 var(--shadow-c); }
.card-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px 9px 14px; border-bottom: 2px solid var(--edge); background: var(--sun-soft); border-radius: 20px 20px 0 0; }
.stamp { flex: none; font-family: var(--display); font-weight: 600; font-size: .86rem; line-height: 1; color: var(--coral-text); background: var(--surface); border: 2px solid var(--coral-text); border-radius: 8px; padding: 6px 10px; transform: rotate(-6deg); letter-spacing: .04em; box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--coral-text); }
.card-tabs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.card-tabs button { position: relative; overflow: hidden; appearance: none; font-weight: 800; font-size: .86rem; line-height: 1; padding: 0 11px; height: 36px; border-radius: 999px; border: 2px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.card-tabs button:hover { border-color: var(--edge); }
.card-tabs button[aria-pressed="true"] { border-color: var(--edge); color: var(--on-bright); }
.card-tabs button[data-card-lang="ko"][aria-pressed="true"] { background: var(--coral); }
.card-tabs button[data-card-lang="en"][aria-pressed="true"] { background: var(--mint); }
.card-tabs button[data-card-lang="ja"][aria-pressed="true"] { background: var(--blue); }
.card-tabs button[data-card-lang="zh"][aria-pressed="true"] { background: var(--sun); }
.card-tabs.auto button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--on-bright); opacity: .55; transform-origin: 0 50%; animation: tab-progress var(--cycle, 3.6s) linear both; }
@keyframes tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.card-hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; font-weight: 700; color: var(--ink-2); font-size: .98rem; }
.card-hint svg { flex: none; margin-top: 3px; color: var(--coral-text); }
@media (max-width: 560px) {
  .card-bar { padding: 8px 8px 8px 12px; gap: 6px; }
  .card-tabs { flex-wrap: nowrap; gap: 2px; }
  .card-tabs button { font-size: .8rem; padding: 0 8px; height: 40px; }
  .stamp { font-size: .78rem; padding: 5px 8px; }
}

.lcard { display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border: 2px solid var(--edge); border-radius: 20px; padding: 18px 20px 16px; }
.card-demo .lcard { border: 0; background: none; border-radius: 0 0 20px 20px; }
.lcard.swap > * { animation: card-swap .26s cubic-bezier(.2, .8, .3, 1) both; }
.lcard.swap > :nth-child(2) { animation-delay: .03s; }
.lcard.swap > :nth-child(3) { animation-delay: .06s; }
.lcard.swap > :nth-child(4) { animation-delay: .09s; }
.lcard.swap > :nth-child(5) { animation-delay: .12s; }
@keyframes card-swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lcard-place { min-width: 0; }
.lcard-suburb { font-family: var(--sans); font-size: 1.4rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.lcard-approx { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.lcard-price { text-align: right; flex: none; }
.lcard-amount { display: block; font-weight: 800; color: var(--leaf); white-space: nowrap; }
.lcard-amount b { font-family: "Fredoka", var(--sans); font-weight: 600; font-size: 1.7rem; line-height: 1; }
.lcard-price small { display: inline-block; margin-top: 5px; font-size: .78rem; font-weight: 800; color: var(--on-bright); background: var(--mint); border-radius: 999px; padding: 1px 9px; }
.lcard-room { margin: 14px 0 12px; font-weight: 700; font-size: 1.02rem; line-height: 1.4; }
.lcard-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lcard-facts > div { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.lcard-facts dt { font-size: .76rem; font-weight: 700; color: var(--muted); }
.lcard-facts dd { font-weight: 800; font-size: .96rem; line-height: 1.35; }
.lcard-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 14px; }
.lcard-langs-lbl { font-size: .82rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.chip { font-size: .82rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--sky); color: var(--ink); }
.chip-empty { background: var(--surface-2); color: var(--muted); }
.lcard-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 12px; border-top: 2px dashed var(--line); }
.tag-welcome { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 800; color: var(--leaf); }
.lcard-src { font-size: .84rem; font-weight: 700; color: var(--blue-text); text-decoration: underline; text-underline-offset: 3px; }
.lcard-src small { font-weight: 600; color: var(--muted); font-size: .76rem; text-decoration: none; display: inline-block; }

/* ============================================================== benefits */
.benefits { display: grid; gap: 16px; }
@media (min-width: 760px) { .benefits { grid-template-columns: repeat(3, 1fr); } }
.benefit { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border: 2px solid var(--edge); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.3, 1.5, .5, 1); }
.benefit:hover { transform: translateY(-4px) rotate(-.6deg); }
.benefit:nth-child(1) { background: var(--sun-soft); }
.benefit:nth-child(2) { background: var(--mint-soft); }
.benefit:nth-child(3) { background: var(--sky-soft); }
.ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; border: 2px solid var(--edge); background: var(--sun); color: var(--on-bright); }
.benefit:nth-child(2) .ic { background: var(--mint); }
.benefit:nth-child(3) .ic { background: var(--blue); }
.benefit h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
:lang(ko) .benefit h3, :lang(ja) .benefit h3, :lang(zh) .benefit h3 { line-height: 1.35; }
.benefit p { color: var(--ink-2); margin-top: 4px; font-size: 1rem; }
.still { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-weight: 800; font-size: 1.08rem; }
.still .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--coral); }

/* ====================================================== card studio */
.studio-grid { display: grid; gap: 22px; }
.sheet { background: var(--surface); border: 2px solid var(--edge); border-radius: 22px; padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow); }
.ctl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.ctl { min-width: 0; }
.ctl.full { grid-column: 1 / -1; }
.ctl > label, .ctl > legend, .ctl-label { display: block; font-weight: 800; font-size: .92rem; margin-bottom: 7px; padding: 0; }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.ctl-row label { font-weight: 800; font-size: .92rem; }
.ctl-row output { font-family: "Fredoka", var(--sans); font-weight: 600; font-size: 1.15rem; color: var(--leaf); }
input[type="text"], input[type="number"], input[type="url"], input[type="date"], select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 14px; background: var(--surface); color: var(--ink); }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23807a72' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 15px; }
input::placeholder { color: var(--muted); opacity: .8; }
input[type="range"] { width: 100%; accent-color: var(--coral); height: 30px; margin: 0; cursor: pointer; }
.seg { display: flex; border: 2px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--surface); }
.seg label { flex: 1; position: relative; margin: 0; }
.seg label + label { border-left: 2px solid var(--edge); }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 44px; padding: 6px 8px; font-weight: 800; font-size: .95rem; text-align: center; line-height: 1.2; transition: background-color .15s; }
.seg input:checked + span { background: var(--sun); color: var(--on-bright); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -4px; border-radius: 12px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; margin: 0; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border: 2px solid var(--edge); border-radius: 999px; font-weight: 800; font-size: .92rem; background: var(--surface); transition: background-color .15s, transform .15s; }
.pick input:checked + span { background: var(--sky); color: var(--ink); }
.pick input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 900; }
.pick input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch, .ctl > label.switch { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 0; font-weight: 800; font-size: .95rem; cursor: pointer; min-height: 44px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; position: relative; width: 50px; height: 30px; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface-2); transition: background-color .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 3px; }
.studio-preview { min-width: 0; z-index: 5; }
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.studio-note { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .95rem; font-weight: 700; }
.studio-note svg { flex: none; }
@media (min-width: 940px) {
  .studio-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px 40px; align-items: start; }
  .studio-preview { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 20px); }
  .studio-controls { grid-column: 1; grid-row: 1; }
  .studio-actions { grid-column: 1; grid-row: 2; }
}
/* phones/tablets: the card preview sits above the form in normal flow (never sticky), so it can't cover fields */
@media (max-width: 420px) { .ctl-grid { grid-template-columns: 1fr; } }

/* ============================================================== chat demo */
.chat-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 940px) { .chat-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; } }
.chat-copy h2 { margin-bottom: 12px; }
.chat-copy > p { color: var(--ink-2); font-size: 1.1rem; }
.chat-pick { margin-top: 24px; }
.chat-pick .ctl-label { margin-bottom: 9px; }
.chat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.chat-note { font-size: .9rem; color: var(--muted); font-weight: 700; }
.chatwin { background: var(--surface); border: 2px solid var(--edge); border-radius: 24px; box-shadow: 6px 6px 0 var(--shadow-c); overflow: hidden; }
.chatwin-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 2px solid var(--edge); background: var(--sun-soft); font-weight: 800; }
.chatwin-head .avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--coral); border: 2px solid var(--edge); color: var(--on-bright); }
.chatwin-head small { display: block; font-weight: 700; color: var(--muted); font-size: .8rem; line-height: 1.2; }
.msgs { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-height: 430px; }
.msg { max-width: 86%; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 18px; }
.msg.pop { animation: msg-in .32s cubic-bezier(.3, 1.4, .5, 1) both; }
.msg.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; transform-origin: 0 100%; }
.msg.me { align-self: flex-end; background: var(--mint); color: var(--on-bright); border-bottom-right-radius: 5px; transform-origin: 100% 100%; }
.msg p { line-height: 1.45; }
.msg .main { font-weight: 700; }
.msg .side { font-size: .86rem; opacity: .85; }
.msg .side + .main, .msg .main + .side { margin-top: 7px; padding-top: 7px; border-top: 2px dashed color-mix(in srgb, currentColor 22%, transparent); }
.msg .lbl { display: inline-block; font-size: .68rem; font-weight: 800; line-height: 1; padding: 3px 6px; margin-right: 6px; border-radius: 6px; background: var(--ink); color: var(--paper); vertical-align: 1px; white-space: nowrap; }
.msg.me .lbl { background: var(--on-bright); color: #fff; }
.msg.sys { align-self: center; max-width: 100%; text-align: center; border: 0; background: none; padding: 2px 8px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.typing-dots { display: inline-flex; gap: 5px; align-items: center; padding: 4px 2px; }
.typing-dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; animation: dot 1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================ how + agree */
.steps { display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.step { position: relative; padding: 26px 20px 20px; border: 2px solid var(--edge); border-radius: 20px; background: var(--surface); }
.step-num { position: absolute; top: -18px; left: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--edge); background: var(--coral); color: var(--on-bright); font-family: "Fredoka", var(--sans); font-weight: 700; font-size: 1.2rem; box-shadow: var(--shadow-sm); transform: rotate(-6deg); }
.step:nth-child(2) .step-num { background: var(--mint); transform: rotate(4deg); }
.step:nth-child(3) .step-num { background: var(--blue); transform: rotate(-3deg); }
.step h3 { font-size: 1.22rem; font-weight: 600; margin: 6px 0; }
.step p { color: var(--ink-2); font-size: 1rem; }
.agree-box { margin-top: clamp(30px, 5vw, 48px); padding: clamp(20px, 3vw, 30px); border: 2px solid var(--edge); border-radius: 22px; background: var(--mint-soft); }
.agree-box h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-bottom: 14px; }
.agree-list { display: grid; gap: 10px; }
.agree-list li { position: relative; padding-left: 36px; font-weight: 600; }
.agree-list li::before { content: ""; position: absolute; left: 0; top: .12em; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--edge); background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.4 3.4L15 6.8' fill='none' stroke='%23231f1c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* ============================================================ story + form */
.join-grid { display: grid; gap: 30px; }
@media (min-width: 940px) { .join-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 52px; align-items: start; } .join-side { position: sticky; top: calc(var(--header-h) + 24px); } }
.story { position: relative; padding: 24px 22px 20px; border: 2px solid var(--edge); border-radius: 22px 22px 22px 6px; background: var(--surface); box-shadow: var(--shadow); }
.story h2 { font-size: 1.15rem; display: inline-block; background: var(--sun); color: var(--on-bright); border: 2px solid var(--edge); border-radius: 999px; padding: 3px 14px; margin-bottom: 14px; }
.story blockquote p { font-size: 1.12rem; line-height: 1.6; font-weight: 600; }
.story .sign { margin-top: 12px; font-weight: 800; color: var(--coral-text); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 26px; font-weight: 800; }
.form h2 { margin-bottom: 8px; }
.form-intro { color: var(--ink-2); margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 800; font-size: .96rem; margin-bottom: 6px; }
.field .req { color: var(--coral-text); }
.field .opt { font-weight: 700; color: var(--muted); font-size: .84rem; margin-left: 4px; }
.field input[aria-invalid="true"] { border-color: var(--coral-text); background: var(--coral-soft); }
.field-err { color: var(--coral-text); font-weight: 800; font-size: .88rem; margin-top: 5px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 10px; border: 2px solid var(--edge); border-radius: 14px; background: var(--surface); font-weight: 700; cursor: pointer; transition: background-color .15s; }
.check:has(input:checked) { background: var(--mint-soft); }
.check.invalid { border-color: var(--coral-text); background: var(--coral-soft); }
.check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--leaf); cursor: pointer; }
.attach { border-style: dashed; background: var(--sun-soft); }
.attach small { display: block; font-weight: 700; color: var(--ink-2); font-size: .86rem; margin-top: 2px; }
.form .btn.full { margin-top: 10px; }
.form-msg { min-height: 1.4em; margin-top: 12px; font-weight: 800; }
.form-msg.err { color: var(--coral-text); }
.privacy { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.privacy svg { flex: none; margin-top: 3px; }
.done { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; margin-top: 18px; padding: 18px; border: 2px solid var(--edge); border-radius: 18px; background: var(--mint-soft); animation: msg-in .4s cubic-bezier(.3, 1.4, .5, 1) both; }
.done[hidden] { display: none; }
.done-house { grid-row: span 2; width: 84px; height: auto; }
.done-house .lit { fill: var(--h-win-off); transition: fill 1s .3s; }
.done.on .done-house .lit { fill: #ffd447; }
.done h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; }
.done p { font-weight: 700; color: var(--ink-2); }
.fallback { grid-column: 1 / -1; margin-top: 10px; padding-top: 14px; border-top: 2px dashed var(--line); }
.fallback strong { display: block; }
.fallback p { font-size: .95rem; margin: 2px 0 12px; overflow-wrap: anywhere; }
.fallback-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fallback textarea { margin-top: 12px; font-size: 1rem; line-height: 1.45; resize: vertical; }

/* =================================================================== FAQ */
.faq { display: grid; gap: 12px; align-items: start; }
@media (min-width: 820px) { .faq { grid-template-columns: 1fr 1fr; gap: 14px 18px; } }
.faq details { border: 2px solid var(--edge); border-radius: 18px; background: var(--surface); overflow: hidden; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; font-weight: 800; font-size: 1.08rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--edge); background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' fill='none' stroke='%23231f1c' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--coral); }
.faq details[open] summary { background: var(--sun-soft); }
.faq .answer { padding: 4px 18px 18px; color: var(--ink-2); background: var(--sun-soft); }

/* ================================================================ footer */
.site-footer { border-top: 2px solid var(--edge); background: var(--surface-2); padding: 34px 0 40px; font-size: .95rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer a { font-weight: 800; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 6px; }
.foot-row .logo { margin: 0; }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; }
.theme-btn .moon-ic, :root[data-theme="dark"] .theme-btn .sun-ic { display: none; }
:root[data-theme="dark"] .theme-btn .moon-ic { display: inline; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); font-weight: 800; padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================== map page */
.demo-banner { background: var(--sun); color: var(--on-bright); border-bottom: 2px solid var(--edge); text-align: center; font-weight: 800; font-size: .95rem; padding: 9px 16px; text-wrap: balance; }
.map-main { padding-block: 26px 60px; }
.map-head { max-width: 780px; margin-bottom: 22px; }
.map-head h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.map-head p { color: var(--ink-2); margin-top: 10px; }
.map-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 12px; }
.map-links a { font-weight: 800; color: var(--ink); padding: 8px 0; }
@media (min-width: 900px) { .map-links { display: none; } }
@media (max-width: 560px) { .price-pin span { font-size: .8rem; padding: 2px 7px; } }
.map-layout { display: grid; gap: 18px; }
.map-col { position: relative; height: 44vh; min-height: 290px; order: -1; }
#map { height: 100%; border: 2px solid var(--edge); border-radius: 20px; overflow: hidden; z-index: 0; background: var(--sky-soft); box-shadow: var(--shadow); }
.map-offline { display: none; margin-top: 10px; padding: 12px 16px; border: 2px dashed var(--edge); border-radius: 14px; background: var(--sun-soft); font-weight: 700; }
.no-map .map-offline { display: block; }
.no-map #map { display: none; }
.no-map .map-col { height: auto; min-height: 0; }
.no-map [data-act="map"] { display: none; }
.map-hint { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--ink); color: var(--paper); font-size: .8rem; font-weight: 800; padding: 6px 12px; border-radius: 999px; pointer-events: none; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.map-col.hint .map-hint { opacity: .92; }
@media (hover: none) { .map-col:not(.touch) .map-hint { display: none; } }
.no-dialog [data-act="chat"] { display: none; }
@media (min-width: 980px) {
  .map-layout { grid-template-columns: 430px minmax(0, 1fr); align-items: start; }
  .map-col { order: 2; position: sticky; top: calc(var(--header-h) + 14px); height: calc(100vh - var(--header-h) - 28px); }
}
.filters { border: 2px solid var(--edge); border-radius: 20px; background: var(--surface); margin-bottom: 16px; }
.filters summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; font-weight: 800; font-size: 1.05rem; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: ""; width: 12px; height: 12px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.filters[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 2px 18px 16px; }
.fgrid .field { margin: 0; min-width: 0; }
.fgrid .field label { font-size: .86rem; font-weight: 800; }
.fgrid select, .fgrid input[type="date"] { min-height: 42px; padding: 6px 12px; }
.fgrid select { padding-right: 34px; }
.fgrid .wide { grid-column: 1 / -1; }
.fgrid .check { grid-column: 1 / -1; margin: 0; padding: 9px 12px; }
.frow { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.count { font-family: "Fredoka", var(--sans); font-weight: 600; font-size: 1.1rem; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.price-row output { font-weight: 800; color: var(--leaf); font-size: .9rem; white-space: nowrap; }
.list { display: grid; gap: 16px; }
.list .lcard { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; scroll-margin-top: calc(var(--header-h) + 16px); }
.list .lcard:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.list .lcard.sel { box-shadow: 5px 5px 0 var(--coral); border-color: var(--edge); background: var(--surface-2); }
.lcard-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.lcard-actions .btn { flex: 1 1 auto; }
.empty { padding: 26px 20px; border: 2px dashed var(--edge); border-radius: 20px; text-align: center; font-weight: 700; color: var(--ink-2); }

.leaflet-container { font-family: inherit; }
/* Any hairline between map tiles shows this colour, so keep it close to the tiles. */
#map.leaflet-container { background: #f2efe9; }
:root[data-theme="dark"] #map.leaflet-container { background: #2b2e31; }
:root[data-theme="dark"] .leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
.price-pin { background: none; border: 0; }
.price-pin span { display: inline-block; transform: translate(-50%, -50%); padding: 3px 9px; border: 2px solid #231f1c; border-radius: 999px; background: #fff; color: #231f1c; font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; font-size: .92rem; line-height: 1.2; white-space: nowrap; box-shadow: 2px 2px 0 #231f1c; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .15s; }
.price-pin:hover span, .price-pin:focus-visible span { background: #ffd447; transform: translate(-50%, -50%) scale(1.1); }
.price-pin.sel span { background: #ff7b5c; transform: translate(-50%, -50%) scale(1.18); }
.price-pin:focus { outline: none; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.92) contrast(.88) saturate(.7); }
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(21, 23, 42, .8); color: #d8d2c6; }
:root[data-theme="dark"] .leaflet-control-attribution a { color: #93cdf9; }
:root[data-theme="dark"] .leaflet-bar a { background: #262a45; color: #f6f1e6; border-bottom-color: #383c5c; }

/* chat dialog */
dialog.chat { width: min(100%, 460px); max-width: 100%; height: min(88dvh, 700px); max-height: none; margin: auto auto 0; padding: 0; border: 2px solid var(--edge); border-bottom: 0; border-radius: 24px 24px 0 0; background: var(--surface); color: var(--ink); overflow: hidden; }
dialog.chat[open] { display: flex; flex-direction: column; animation: sheet-in .32s cubic-bezier(.2, .9, .3, 1) both; }
dialog.chat::backdrop { background: rgba(35, 31, 28, .5); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) { dialog.chat { margin: auto 26px 26px auto; border-bottom: 2px solid var(--edge); border-radius: 24px; height: min(82dvh, 680px); box-shadow: 6px 6px 0 var(--shadow-c); } }
.chat-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 2px solid var(--edge); background: var(--sun); color: var(--on-bright); }
.chat-head h2 { font-size: 1.2rem; }
.chat-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--on-bright); background: #fff; color: var(--on-bright); cursor: pointer; }
.chat-demo-note { flex: none; padding: 9px 18px; background: var(--sun-soft); border-bottom: 2px dashed var(--line); font-size: .84rem; color: var(--ink-2); line-height: 1.4; }
.chat-demo-note strong { display: block; color: var(--ink); }
.chat-ctx { flex: none; padding: 10px 18px; border-bottom: 2px solid var(--line); font-size: .9rem; }
.chat-ctx b { font-size: 1rem; }
.chat-ctx span { display: block; color: var(--ink-2); font-weight: 700; }
dialog.chat .msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.compose { flex: none; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 2px solid var(--edge); background: var(--surface-2); }
.chips-lbl { display: block; font-size: .78rem; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 5px 5px 10px; scrollbar-width: thin; }
.chips button { flex: none; max-width: 78vw; appearance: none; border: 2px solid var(--edge); border-radius: 16px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: .9rem; line-height: 1.3; padding: 8px 12px; text-align: left; cursor: pointer; transition: background-color .15s, transform .15s; }
.chips button:hover { background: var(--mint-soft); transform: translateY(-2px); }
.chips-row[hidden] { display: none; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; border-radius: 999px; }
.chat-form .btn { flex: none; width: 48px; height: 48px; padding: 0; }

/* ======================================================= 2026-11 additions */
/* Date fields: iOS Safari gives date inputs a wide intrinsic size and centred text, which pushed
   "Available from" past the screen edge. Keep them inside their column on every browser. */
input[type="date"] { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; text-align: left; line-height: 1.3; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.3em; }
input[type="date"]::-webkit-datetime-edit { padding: 0; }
@supports (-webkit-touch-callout: none) {
  /* iOS hides the calendar icon once appearance is reset; draw one so it still reads as a date field */
  input[type="date"] { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='4.5' width='14' height='12' rx='2.5' fill='none' stroke='%23807a72' stroke-width='2'/%3E%3Cpath d='M3 8.5h14M7 2.5v4M13 2.5v4' stroke='%23807a72' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
}
textarea { line-height: 1.45; resize: vertical; min-height: 88px; }
.field textarea[aria-invalid="true"] { border-color: var(--coral-text); background: var(--coral-soft); }
input:disabled { opacity: .5; cursor: not-allowed; }

/* "More renters" box: the ask for the next community */
.benefit-more { margin-top: 8px !important; font-size: .95rem !important; font-weight: 700; }
.benefit-more a { color: var(--leaf); font-weight: 800; text-decoration-thickness: 2px; white-space: nowrap; }

/* story: three short paragraphs */
.story blockquote p + p { margin-top: 12px; }
.story blockquote p:nth-child(2) { font-size: 1.02rem; font-weight: 600; color: var(--ink-2); }
.story blockquote .story-goal { font-weight: 800; color: var(--leaf); }

/* three-way toggle (furnished) */
.seg-3 span { font-size: .9rem; padding: 6px 4px; word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 420px) { .seg-3 span { font-size: .86rem; } }

/* $ before the car-space cost */
.money { position: relative; }
.money-sign { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); pointer-events: none; }
.money input { padding-left: 28px; }

/* Suburb search */
.combo { position: relative; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 45; margin: 0; padding: 6px; list-style: none; max-height: min(296px, 46vh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--surface); color: var(--ink); border: 2px solid var(--edge); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow-c); }
.combo-list li[role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 700; line-height: 1.25; -webkit-tap-highlight-color: transparent; }
.combo-list li[role="option"][aria-selected="true"] { background: var(--sky); color: var(--ink); }
@media (hover: hover) { .combo-list li[role="option"]:hover { background: var(--sky-soft); } .combo-list li[role="option"][aria-selected="true"]:hover { background: var(--sky); } }
.combo-list li.is-current .combo-name::after { content: " ✓"; font-weight: 900; }
.combo-name { min-width: 0; overflow-wrap: anywhere; }
.combo-pc { flex: none; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.combo-list mark { background: var(--sun-soft); color: inherit; border-radius: 4px; padding: 0 1px; }
.combo-group { padding: 6px 12px 4px; font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.combo-empty { padding: 12px; font-weight: 700; color: var(--ink-2); }
.combo.open input { border-color: var(--edge); }
/* the open list must sit above the sticky card preview and later sections */
.ctl:has(.combo.open), .field:has(.combo.open) { position: relative; z-index: 46; }

/* map filters: toggles and chips */
.fgrid fieldset.field legend { display: block; padding: 0; font-size: .86rem; font-weight: 800; margin-bottom: 6px; }
.seg-sm span { min-height: 40px; font-size: .9rem; padding: 4px 6px; }
.pick-sm { gap: 6px; }
.pick-sm span { min-height: 36px; padding: 2px 12px; font-size: .86rem; }
.fhint { margin-top: 6px !important; font-size: .8rem; font-weight: 700; color: var(--muted); line-height: 1.35; }
.lcard-facts dd small { font-weight: 800; color: var(--muted); font-size: .8em; }

/* "back to the card" link under the builder (phones only; on desktop the card sits beside the form) */
.studio-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--leaf); text-underline-offset: 3px; }
@media (min-width: 940px) { .studio-back { display: none; } }
/* room at the very bottom for iOS Safari's toolbar and the Netlify badge */
@media (max-width: 939px) { .site-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ======================================================= reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .hero-street, .lang-switch, .sky-toggle { position: static; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ===================================================== live site (2026-11-14) */
input[type="email"] { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 14px; background: var(--surface); color: var(--ink); }
.linkish { appearance: none; border: 0; background: none; padding: 6px 2px; color: var(--blue-text); font: inherit; font-weight: 800; font-size: .92rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.linkish:hover { text-decoration-thickness: 2px; }
.check-hint { margin: -4px 0 14px 4px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.email-instead { margin-top: 10px; text-align: center; }
.done-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.done-actions[hidden], .done-actions [hidden] { display: none; }
.foot-links { margin-top: 6px; }
.foot-links a { font-weight: 800; }

/* sign-in dialog */
dialog.auth-dlg { height: fit-content; max-height: 92dvh; }
dialog.auth-dlg[open] { display: flex; }
@media (min-width: 720px) { dialog.auth-dlg { margin: auto; height: fit-content; } }
.auth-body { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
.auth-reason { margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: var(--sun-soft); border: 2px solid var(--edge); font-weight: 800; }
.auth-reason[hidden] { display: none; }
.auth-intro { color: var(--ink-2); font-weight: 700; margin-bottom: 14px; overflow-wrap: anywhere; }
.code-input { font-size: 1.5rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 4px; }

/* cards for real rooms and examples */
.ex-tag { display: inline-block; margin-left: 8px; vertical-align: 3px; font-size: .7rem; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 7px; border: 2px solid var(--coral-text); color: var(--coral-text); background: var(--surface); letter-spacing: .03em; }
.lcard-place .ex-tag { margin-left: 0; margin-top: 4px; }
.lcard-note { margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px; background: var(--sun-soft); font-weight: 700; font-size: .94rem; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.list .lcard.real { border-color: var(--edge); box-shadow: 3px 3px 0 var(--leaf); }
.price-pin.real span { background: #7fdcae; }
.price-pin.real.sel span { background: #ff7b5c; }

/* real message thread */
.msg .tr-toggle { display: inline-block; margin-top: 6px; appearance: none; border: 0; background: none; padding: 2px 0; font: inherit; font-size: .8rem; font-weight: 800; color: inherit; opacity: .75; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.msg .tr-state { font-weight: 800; font-size: .8rem; opacity: .75; display: flex; align-items: center; gap: 6px; }
.msg .tr-state .typing-dots i { width: 6px; height: 6px; }
.msg.is-pending .main { opacity: .8; }
.msg .main, .msg .side { overflow-wrap: anywhere; white-space: pre-line; }

/* My account */
.acct-main { padding-block: 20px 60px; max-width: 860px; }
.acct-main h1 { margin: 6px 0 18px; }
.acct-box { margin-bottom: 26px; }
.acct-box > p { font-weight: 700; margin-bottom: 14px; }
.acct-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.acct-who { font-weight: 800; overflow-wrap: anywhere; min-width: 0; }
.acct-name { margin-top: 16px; }
.acct-name label { display: block; font-weight: 800; font-size: .96rem; margin-bottom: 6px; }
.acct-name-row { display: flex; gap: 10px; }
.acct-name-row input { flex: 1; min-width: 0; }
.acct-name-row .btn { flex: none; }
.acct-lang { margin-top: 12px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.acct-main .acct-sec { margin-top: 30px; padding-block: 0; }
.acct-sec h2 { font-size: 1.4rem; margin-bottom: 12px; }
.acct-sec .acct-row { margin-bottom: 12px; }
.acct-sec .acct-row h2 { margin: 0; }
.acct-list-cta { margin-top: 12px; }
.my-rooms { display: grid; gap: 16px; }
@media (min-width: 760px) { .my-rooms { grid-template-columns: 1fr 1fr; } }
.room-status { align-self: flex-start; margin-bottom: 10px; font-size: .78rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--edge); background: var(--surface-2); }
.room-status.st-listed { background: var(--mint); color: var(--on-bright); }
.room-status.st-draft { background: var(--sun-soft); }
.room-status.st-let { background: var(--lilac); color: var(--on-bright); }
.btn.danger { color: var(--coral-text); border-color: var(--coral-text); }
.conv-group { font-size: 1rem; margin: 16px 0 8px; color: var(--ink-2); }
.convs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.conv { display: grid; gap: 3px; width: 100%; text-align: left; appearance: none; border: 2px solid var(--edge); border-radius: 16px; background: var(--surface); color: var(--ink); padding: 12px 14px; font: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.conv:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-sm); }
.conv.has-new { background: var(--mint-soft); }
.conv-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.conv-new { flex: none; font-size: .74rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--coral); color: var(--on-bright); border: 2px solid var(--edge); }
.conv-room { font-size: .86rem; font-weight: 700; color: var(--muted); }
.conv-last { font-size: .92rem; color: var(--ink-2); overflow-wrap: anywhere; }
