/* YOLK Residences — the public site. One stylesheet, no build step.
   Colours are the building's identity: blue leads, orange is the one highlight
   (never text on cream — too faint), cream is the page, brown the quiet text. */
:root {
  --blue: #1D3A45;
  --blue-2: #24485A;
  --orange: #F5BF63;
  --cream: #F6F0E9;
  --cream-2: #EFE6DA;
  --paper: #FFFDF9;
  --brown: #432C25;
  --ink: #1C1A18;
  --muted: #6B5A52;
  --line: #E2D6C6;
  --serif: "Crimson Pro", "Noto Serif Thai", "Noto Serif JP", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Noto Sans Thai", "Noto Sans JP", "Futura", "Avenir Next", system-ui, sans-serif;
  --wrap: 1180px;
  --gut: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.005em; margin: 0; color: var(--blue); }
h1 { font-size: clamp(38px, 5.4vw, 62px); text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 48px); text-wrap: balance; }
h3 { font-size: 30px; }
p { margin: 0 0 14px; }
figure { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
@media (min-width: 700px) { :root { --gut: 32px; } }

.eyebrow { font: 500 13px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brown); margin: 0 0 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 500 16px/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-blue { background: var(--blue); color: var(--cream); }
.btn-blue:hover { background: var(--blue-2); }
.btn-line { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-line:hover { background: var(--blue); color: var(--cream); }
.btn-orange { background: var(--orange); color: var(--blue); }
.btn-orange:hover { background: #F8CD82; }
.btn-ghost { border-color: rgba(246,240,233,.55); color: var(--cream); }
.btn-ghost:hover { background: rgba(246,240,233,.12); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hours { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
/* no colour transitions while the page first draws itself: Safari otherwise fades the buttons in
   from link-blue at every load. main.js adds .ready after the first frame. */
html:not(.ready) *, html:not(.ready) *::before, html:not(.ready) *::after { transition: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--cream); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand img { width: 118px; height: auto; }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--brown); }
.nav a:hover { color: var(--blue); }
.top-cta { display: none; }
/* EN / ไทย — always in the header, also on a phone */
.lang { display: flex; margin-left: auto; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 14px; }
.lang a { padding: 7px 12px; text-decoration: none; color: var(--brown); line-height: 1; }
.lang a[aria-current] { background: var(--blue); color: var(--cream); }
.lang a:not([aria-current]):hover { background: var(--cream-2); }
@media (min-width: 900px) { .top-cta { display: inline-flex; } .brand img { width: 132px; } }
@media (min-width: 1100px) { .nav { display: flex; } .lang { margin-left: 0; } }
.nav a[aria-current] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--orange); }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--cream) url("img/contour-cream.svg") center / cover no-repeat; }
.hero-in { display: grid; gap: 36px; padding-top: 36px; padding-bottom: 48px; }
.hero-text { align-self: center; }
.lede { font-size: 19px; max-width: 34em; color: #3B302B; margin-top: 22px; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; border-radius: 2px; box-shadow: 0 30px 60px -30px rgba(29,58,69,.45); }
/* the main picture is a pen-and-ink drawing of the building (img/building-hero*.svg), drawn
   straight onto the page: no card, no shadow, nothing behind it — the page's wavy lines run
   through the sky (Sunny: "lines through the sky look better"); the drawing's own fills are
   the page's cream; its edges fade into the page */
.hero-drawing img {
  object-fit: contain; background: none; border-radius: 0; box-shadow: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 100%);
  mask-composite: intersect;
}
/* on a computer the building stands on the blue band below, its street on the band's edge */
@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 0; min-height: min(86vh, 820px); }
  .hero-text { padding-bottom: 72px; }
  .hero-photo img { aspect-ratio: 3 / 4; }
  .hero-drawing { align-self: end; margin-right: -24px; }
  .hero-drawing img { max-height: 760px; }
}

/* facts band */
.facts { background: var(--blue); color: var(--cream); }
.facts-in { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; padding-top: 28px; padding-bottom: 28px; }
.facts b { display: block; font: 600 28px/1.1 var(--serif); color: var(--orange); }
.facts span { display: block; font-size: 14px; line-height: 1.4; opacity: .9; margin-top: 4px; }
@media (min-width: 900px) { .facts-in { grid-template-columns: repeat(4, 1fr); padding-top: 34px; padding-bottom: 34px; } .facts b { font-size: 34px; } }

/* sections */
.section { padding: 72px 0; }
.section-alt { background: var(--paper); }
.sec-head { max-width: 720px; margin-bottom: 44px; }
.intro { font-size: 18px; color: #3B302B; margin-top: 16px; }
@media (min-width: 900px) { .section { padding: 112px 0; } .sec-head { margin-bottom: 64px; } }

/* apartment rows */
.unit { display: grid; gap: 26px; padding: 0 0 56px; margin: 0 0 56px; border-bottom: 1px solid var(--line); }
.unit:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.unit-text h3 { margin-bottom: 10px; }
.spec { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.spec span { font-size: 14px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--brown); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding: 8px 0 8px 26px; border-top: 1px solid var(--line); font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
@media (min-width: 900px) {
  .unit { grid-template-columns: 1.45fr 1fr; gap: 56px; align-items: start; padding-bottom: 80px; margin-bottom: 80px; }
  .unit.flip .gallery { order: 2; }
  .unit-text { padding-top: 6px; }
}

/* gallery */
.gallery { min-width: 0; }
.g-main { display: block; width: 100%; padding: 0; border: 0; background: var(--paper); cursor: zoom-in; border-radius: 2px; overflow: hidden; }
.g-main img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .2s; }
.g-main img.is-plan { object-fit: contain; background: #fff; padding: 2%; }
.thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; margin-top: 8px; }
.thumbs button { position: relative; padding: 0; border: 2px solid transparent; background: #fff; cursor: pointer; border-radius: 2px; overflow: hidden; opacity: .72; transition: opacity .15s, border-color .15s; }
.thumbs button:hover { opacity: 1; }
.thumbs button.on { opacity: 1; border-color: var(--blue); }
.thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.thumbs .plan img { object-fit: contain; padding: 3px; }
.thumbs .plan span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: rgba(29,58,69,.85); color: var(--cream); padding: 2px 0; }

/* building tiles */
.tiles { display: grid; gap: 22px; }
.tile img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.tile-tall img { aspect-ratio: 4 / 5; }
.tile figcaption { padding-top: 12px; font-size: 16px; color: #3B302B; }
.tile figcaption b { display: block; font: 600 22px/1.2 var(--serif); color: var(--blue); margin-bottom: 2px; }
@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
  .tile-wide { grid-column: span 2; }
  .tile-wide img, .tile-tall img { aspect-ratio: auto; height: 470px; }
}

/* pets */
.pets { background: var(--orange) url("img/contour-cream.svg") center / cover no-repeat; background-blend-mode: multiply; }
.pets-in { display: grid; gap: 32px; align-items: center; }
.pets h2, .pets .eyebrow { color: var(--blue); }
.pets p { font-size: 18px; color: var(--ink); max-width: 30em; }
.pets h2 { margin-bottom: 18px; }
.pets-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 78%; border-radius: 2px; }
@media (min-width: 900px) { .pets-in { grid-template-columns: 0.8fr 1fr; gap: 72px; } }

/* renting steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 0 48px; }
.steps li { counter-increment: s; position: relative; padding: 22px 0 22px 56px; border-top: 1px solid var(--line); font-size: 16px; color: #3B302B; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 20px; font: 600 26px/1 var(--serif); color: var(--blue); }
.steps b { display: block; font-size: 18px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.steps .go { display: table; margin-top: 10px; font-weight: 500; color: var(--blue); text-decoration: none; border-bottom: 1.5px solid var(--orange); }
.steps .go:hover { border-bottom-color: var(--blue); }
.steps-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
@media (min-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }

/* the neighbourhood — navy, like Surawong at night */
.hood { background: var(--blue) url("img/contour-blue.svg") center / cover no-repeat; color: var(--cream); }
.hood h2, .hood h3 { color: var(--cream); }
.hood .eyebrow { color: var(--orange); }
.hood .intro { color: rgba(246,240,233,.88); max-width: 34em; }
.hood .address { font-size: 17px; margin: 18px 0 22px; color: var(--cream); }
.hood-head { display: grid; gap: 28px; align-items: center; margin-bottom: 40px; }
.hood-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.hood-grid { display: grid; gap: 18px; }
.hood-card { background: rgba(246,240,233,.06); border: 1px solid rgba(246,240,233,.16); border-radius: 8px; padding: 22px 20px 10px; }
.hood-card h3 { display: flex; align-items: center; gap: 12px; font-size: 26px; }
.hi { width: 30px; height: 30px; flex: none; color: var(--orange); }
.hi svg { display: block; width: 100%; height: 100%; }
.hood-lede { margin: 8px 0 8px; font-size: 15px; color: rgba(246,240,233,.72); }
.places { list-style: none; margin: 0; padding: 0; }
.places li { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; padding: 11px 0; border-top: 1px solid rgba(246,240,233,.14); }
.places b { font-weight: 500; color: var(--cream); }
.places span { grid-column: 1; font-size: 14px; line-height: 1.45; color: rgba(246,240,233,.7); }
.places em { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 3px 10px; border-radius: 999px; background: var(--orange); color: var(--blue); font-style: normal; font-size: 13px; font-weight: 500; white-space: nowrap; }
.hood-note { margin: 18px 0 0; font-size: 13px; color: rgba(246,240,233,.6); }
@media (min-width: 900px) {
  .hood-head { grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 56px; }
  .hood-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hood-card { padding: 26px 28px 12px; }
}

/* questions */
.faq-in { display: grid; gap: 8px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 17px 44px 17px 0; list-style: none; cursor: pointer; font-size: 18px; font-weight: 500; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 300 28px/1 var(--sans); color: var(--blue); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 18px; max-width: 42em; color: #3B302B; }
@media (min-width: 900px) { .faq-in { grid-template-columns: 0.75fr 1.5fr; gap: 64px; align-items: start; } .faq-in .sec-head { position: sticky; top: 100px; } }

/* contact */
.contact { background: var(--blue) url("img/contour-blue.svg") center / cover no-repeat; color: var(--cream); padding: 72px 0; }
.contact h2 { color: var(--cream); margin-bottom: 14px; }
.contact p { font-size: 19px; opacity: .92; }
.contact p.mail { font-size: 16px; margin: 18px 0 0; }
.contact p.mail a, .foot a { color: inherit; text-underline-offset: 3px; }
.contact-in { display: grid; gap: 36px; align-items: center; }
.qr { justify-self: start; background: var(--paper); padding: 14px 14px 10px; border-radius: 4px; text-align: center; }
.qr img { width: 180px; }
.qr figcaption { color: var(--brown); font-size: 13px; margin-top: 6px; }
@media (min-width: 900px) { .contact { padding: 104px 0; } .contact-in { grid-template-columns: 1fr auto; } .qr { justify-self: end; } }

/* footer */
.foot { background: #152C35; color: rgba(246,240,233,.78); font-size: 14px; padding: 40px 0 110px; }
.foot-in { display: grid; gap: 8px; }
.foot img { width: 110px; margin-bottom: 10px; }
.foot p { margin: 0; }
@media (min-width: 900px) { .foot { padding-bottom: 40px; } }

/* the phone's dock: LINE and Call */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom)); background: rgba(246,240,233,.96); border-top: 1px solid var(--line); }
.dock .btn-line { background: var(--paper); }
@media (min-width: 900px) { .dock { display: none; } }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(14,26,31,.88); }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; background: #fff; }
.lb-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream); color: var(--blue); font-size: 18px; cursor: pointer; z-index: 2; }
/* a set of photos: swipe on a phone, arrows or the keyboard on a computer */
.lb-set { position: relative; width: min(1180px, 96vw); }
.lb-set[hidden] { display: none; }
.lb-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lightbox .lb-strip img { flex: 0 0 100%; width: 100%; max-width: none; height: min(78vh, 66vw); object-fit: contain; background: transparent; scroll-snap-align: center; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(246,240,233,.92); color: var(--blue); font-size: 30px; line-height: 1; cursor: pointer; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-count { margin: 10px 0 0; text-align: center; color: var(--cream); font-size: 14px; }
@media (max-width: 899px) { .lb-prev, .lb-next { display: none; } .lightbox .lb-strip img { height: auto; max-height: 80vh; } }

/* the building's cards that open a set: a photo count on the picture */
.t-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.t-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(29,58,69,.82); color: var(--cream); font-size: 13px; font-weight: 500; line-height: 1.3; }
.t-count svg { width: 16px; height: 16px; }

.nw { white-space: nowrap; }
/* the four layouts, one press away */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--blue); border-radius: 999px; text-decoration: none; color: var(--blue); font-size: 15px; }
.jump a:hover { background: var(--blue); color: var(--cream); }
.jump .jump-av { background: var(--orange); border-color: var(--orange); }
.jump .jump-av:hover { background: #F8CD82; color: var(--blue); }
.av-link { display: inline-block; margin-top: 14px; font-weight: 500; color: var(--blue); text-decoration: none; border-bottom: 2px solid var(--orange); padding-bottom: 1px; }

/* the phone's menu (hidden from 900 px up, where the links sit in the header) */
.menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--blue); font: 500 15px/1 var(--sans); cursor: pointer; }
.menu-btn::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
.menu-btn[aria-expanded="true"] { background: var(--blue); color: var(--cream); border-color: var(--blue); }
.menu { position: absolute; left: 0; right: 0; top: 100%; display: grid; padding: 4px var(--gut) 16px; background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -20px rgba(29,58,69,.45); }
.menu[hidden] { display: none; }
.menu a { padding: 13px 2px; border-top: 1px solid var(--line); text-decoration: none; font: 600 22px/1.3 var(--serif); color: var(--blue); }
.menu a:first-child { border-top: 0; }
.g-count { display: none; }
@media (min-width: 1100px) { .menu-btn, .menu { display: none !important; } }
.menu a[aria-current] { color: var(--brown); }

/* PHONES AND SMALL TABLETS */
@media (max-width: 899px) {
  .top-in { gap: 10px; }
  .lang a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; font-size: 15px; }

  /* the building first, edge to edge */
  .hero-in { padding-top: 0; gap: 26px; }
  .hero-photo { order: -1; margin: 0 calc(-1 * var(--gut)); }
  .hero-photo img { aspect-ratio: 4 / 3; object-position: 50% 42%; border-radius: 0; box-shadow: none; }
  .hero-drawing img {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent);
  }

  /* each layout's photos: swipe sideways, the next one peeking in; a tap enlarges */
  .gallery { position: relative; margin: 0 calc(-1 * var(--gut)); }
  .g-main { display: none; }
  .thumbs { display: flex; gap: 8px; margin: 0; padding: 0 var(--gut); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); overscroll-behavior-x: contain; scrollbar-width: none; }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumbs::after { content: ""; flex: 0 0 1px; }
  .thumbs button, .thumbs button.on { flex: 0 0 88%; scroll-snap-align: start; border: 0; opacity: 1; cursor: zoom-in; }
  .thumbs img { aspect-ratio: 3 / 2; }
  .thumbs .plan img { padding: 4%; }
  .thumbs .plan span { left: 10px; right: auto; bottom: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
  .g-count { display: block; position: absolute; top: 10px; left: calc(var(--gut) + 10px); padding: 4px 10px; border-radius: 999px; background: rgba(29,58,69,.82); color: var(--cream); font-size: 13px; line-height: 1.3; pointer-events: none; }

  /* the building: one card at a time, swiped */
  .tiles { display: flex; gap: 14px; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); overscroll-behavior-x: contain; scrollbar-width: none; }
  .tiles::-webkit-scrollbar { display: none; }
  .tiles::after { content: ""; flex: 0 0 1px; }
  .tile { flex: 0 0 84%; scroll-snap-align: start; }
  .tile img, .tile-wide img, .tile-tall img { aspect-ratio: 1 / 1; height: auto; }

  /* a QR code cannot be scanned by the phone showing it */
  .qr { display: none; }
}

/* THE AVAILABILITY PAGE — the 24 rooms as the building's front, all on one phone screen */
.av { padding: 22px 0 56px; }
.av-head { display: grid; gap: 10px; margin-bottom: 16px; line-height: 1.35; }
.av-head h1 { font-size: clamp(30px, 4vw, 46px); }
.av-sum { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: #3B302B; }
.av-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.av-upd { margin: 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13px; color: var(--brown); white-space: nowrap; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: #3B302B; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend li::before { content: ""; width: 14px; height: 14px; border-radius: 3px; }
.lg-free::before { background: var(--orange); }
.lg-res::before, .u.u-res { background: repeating-linear-gradient(135deg, #D5E0E4 0 5px, var(--paper) 5px 10px); }
.lg-res::before { border: 1px solid #A9BCC3; }
.lg-occ::before { background: var(--paper); border: 1px solid var(--line); }
.av-body { display: grid; gap: 30px; }
.bldg { margin: 0; }
.roof, .base { margin-left: 25px; }
.roof { margin-bottom: 5px; }
.base { margin-top: 5px; }
/* the roof (the rooftop garden, the gym, the skyline) only on a computer: on a phone it would push
   the lower floors off the screen, and all 24 rooms must fit on one */
@media (max-width: 899px) { .roof { display: none; } }
.roof img, .base img { display: block; width: 100%; height: auto; }
.av-grid { --row: 62px; display: grid; grid-template-columns: 20px repeat(3, minmax(0, 1fr)); gap: 5px; }
.fl { align-self: center; text-align: right; font: 600 14px/1 var(--serif); color: var(--muted); }
.u { height: var(--row); min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr; padding: 4px 7px 5px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--blue); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.u b { font: 600 19px/1 var(--serif); }
.u .ic { width: 18px; height: 18px; }
.ic svg { display: block; width: 100%; height: 100%; }
.u .t { grid-column: 1 / -1; font-size: 11px; line-height: 1.15; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u .s { grid-column: 1 / -1; align-self: end; font-size: 12px; line-height: 1.15; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-free { background: var(--orange); border-color: #E3A94A; }
.u-free .t { color: var(--brown); }
.u-res { border-color: #A9BCC3; }
.u-occ .s, .u-ask .s { color: var(--muted); font-weight: 400; }
.u:hover { border-color: var(--blue); }
.av-list h2 { font-size: 24px; margin: 0 0 8px; }
.av-list h2 + * { margin-top: 0; }
.av-list h2:not(:first-child) { margin-top: 26px; }
.li { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; min-height: 48px; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer; }
.li b { font: 600 20px/1 var(--serif); color: var(--blue); }
.li em { font-style: normal; color: var(--muted); font-size: 14px; white-space: nowrap; }
.li-free b { box-shadow: inset 0 -3px 0 var(--orange); }
.li:hover { background: var(--paper); }
.muted { color: var(--muted); font-size: 14px; }
.av-list .muted { margin-top: 10px; }
.av-notes { margin-top: 36px; }
.types { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.types li { display: flex; align-items: center; gap: 10px; }
.types .ic { width: 24px; height: 24px; flex: none; }
@media (min-width: 700px) { .types { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .av { padding-top: 48px; }
  .av-head { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 28px; }
  .av-body { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 56px; align-items: start; }
  .av-grid { --row: 66px; gap: 6px; }
  .u b { font-size: 22px; }
  .u .s { font-size: 13px; }
  .av-list { position: sticky; top: 92px; }
}
@media (max-width: 899px) {
  .av { padding-top: 10px; }
  /* 8 rows between the header and the LINE / Call bar, never shorter than a thumb */
  .av-grid { --row: clamp(44px, calc((100svh - 330px) / 8 - 5px), 64px); }
  .av-head h1 { font-size: 30px; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .u .t { display: none; }
  .u { grid-template-rows: auto 1fr; }
  .av-head { gap: 6px; margin-bottom: 12px; }
  .av-grid { gap: 4px; }
  .av-head h1 { font-size: 26px; }
}

/* a room's details: a sheet from the bottom on a phone, a card on a computer */
.sheet { border: 0; padding: 0; background: transparent; color: var(--ink); }
.sheet::backdrop { background: rgba(14,26,31,.55); }
.sh-in { position: relative; background: var(--cream); padding: 22px var(--gut) calc(22px + env(safe-area-inset-bottom)); }
.sh-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper); color: var(--blue); font-size: 16px; cursor: pointer; }
.sh-body h2 { font-size: 32px; margin-bottom: 10px; padding-right: 44px; }
.st { margin: 16px 0 6px; padding-left: 12px; border-left: 4px solid var(--line); font-size: 17px; font-weight: 500; }
.st-free { border-color: var(--orange); }
.st-res { border-color: #A9BCC3; }
.sh-body .actions { margin-top: 18px; }
.more { display: inline-block; margin-top: 14px; font-weight: 500; color: var(--blue); }
@media (max-width: 899px) {
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; }
  .sh-in { border-radius: 18px 18px 0 0; }
  .sh-body .btn { flex: 1 1 100%; }
}
@media (min-width: 900px) { .sheet { width: 480px; } .sh-in { border-radius: 8px; padding: 30px 34px; } }

/* Japanese: taller lines, no tracking, and lines broken between phrases where the browser can */
:lang(ja) body, body:lang(ja) { line-height: 1.8; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { line-height: 1.4; letter-spacing: 0; }
:lang(ja) h1 { font-size: clamp(32px, 4.4vw, 52px); }
:lang(ja) .eyebrow { letter-spacing: 0.08em; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) p, :lang(ja) li, :lang(ja) figcaption { word-break: auto-phrase; line-break: strict; }

/* three languages in the header: on a narrow phone the Menu button keeps only its icon (the word
   stays for screen readers), the switch and the logo tighten */
@media (max-width: 479px) {
  .menu-btn { padding: 0 12px; }
  .menu-btn .mb-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lang a { padding: 0 10px; }
  .brand img { width: 104px; }
}

/* Thai: taller lines for the vowels and tone marks above and below, no wide tracking */
:lang(th) body, body:lang(th) { line-height: 1.8; }
:lang(th) h1, :lang(th) h2, :lang(th) h3 { line-height: 1.38; letter-spacing: 0; }
:lang(th) h1 { font-size: clamp(34px, 4.8vw, 54px); }
:lang(th) .eyebrow { letter-spacing: 0.06em; }
:lang(th) .facts b { line-height: 1.3; }
:lang(th) .steps li::before { top: 22px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* the viewing page (viewing.html, -th, -ja; viewing.js draws it) */
.vw-page main { padding: 28px 0 96px; }
.vw-wrap { max-width: calc(800px + 2 * var(--gut)); }
.vw-head p { color: var(--muted); margin-top: 10px; }
.vw-step { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; margin: 18px 0 0; }
.vw-step.dim { opacity: .55; }
.vw-step h2 { font-size: 26px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.vw-step h2 b { font: 500 14px/1 var(--sans); width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; }
.vw-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.vw-room { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; text-align: left; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--cream); cursor: pointer; font: inherit; color: var(--ink); }
.vw-room .ic { grid-row: span 3; width: 26px; height: 26px; }
.vw-room b { font-size: 17px; color: var(--blue); }
.vw-room span { font-size: 14px; line-height: 1.3; }
.vw-room small { font-size: 13px; color: var(--muted); }
.vw-room.on { border-color: var(--blue); background: #fff; box-shadow: inset 0 0 0 1px var(--blue); }
.vw-aside { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.vw-link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
.vw-tz { font-size: 14px; color: var(--muted); margin: -6px 0 12px; }
.vw-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.vw-day, .vw-time { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--cream); font: 500 15px/1 var(--sans); color: var(--ink); cursor: pointer; }
.vw-day.on, .vw-time.on { background: var(--blue); border-color: var(--blue); color: var(--cream); }
.vw-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 12px; }
.vw-time { padding: 0; }
.vw-who { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.vw-who legend { font-size: 14px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.vw-seg { position: relative; }
.vw-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vw-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--cream); font-size: 15px; }
.vw-seg input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--cream); }
.vw-seg input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.vw-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .vw-grid { grid-template-columns: 1fr 1fr; } .vw-step { padding: 26px 28px; } .vw-rooms { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.vw-f { display: block; margin: 0 0 12px; }
.vw-f span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.vw-f span i { font-style: normal; opacity: .75; }
.vw-f input, .vw-f select, .vw-f textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font: 400 16px/1.3 var(--sans); color: var(--ink); }
.vw-f textarea { min-height: 84px; resize: vertical; }
.vw-f input:focus, .vw-f select:focus, .vw-f textarea:focus { outline: none; border-color: var(--blue); }
.vw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.vw-err { margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; background: #FBE9E4; color: #8A2E1C; font-size: 15px; }
.vw-small { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.vw-note { color: var(--muted); }
.vw-done h2 { color: var(--blue); }
.vw-step .actions { margin-top: 16px; }

/* At a glance (19 Oct 2026, Sunny: "can you put facility icon down here?"): what each layout has, as icons, under its list.
   The icons are the <symbol>s at the top of the page, drawn in the site's line style. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.amen { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.amen li { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 6px 11px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--paper); text-align: center; font-size: 13px; line-height: 1.25; color: var(--brown); }
.amen svg { width: 26px; height: 26px; color: var(--blue); fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 520px) {
  .amen { gap: 7px; }
  .amen li { padding: 10px 3px 9px; font-size: 11.5px; gap: 5px; border-radius: 12px; }
  .amen svg { width: 22px; height: 22px; }
}
