/* =============================================================================
   Engawa property page v2: layout layer only.
   Loads AFTER tailwind.css, styles.css and engawa-ds.css (the live site files,
   unchanged). Every colour, font, radius and spacing value is a live token from
   styles.css :root. The only new value is the chapter spacing (96 = 4xl + 2xl).
   Header and footer are the live markup and are never styled here.
   ============================================================================= */

.pv {
  --pv-chapter: calc(var(--space-4xl) + var(--space-2xl)); /* 96 desktop */
  --pv-rail-paint: 168px;
  --pv-row-paint: 72px;
  color: var(--on-page);
}
@media (max-width: 1023px) {
  .pv { --pv-chapter: var(--space-4xl); --pv-rail-paint: 128px; --pv-row-paint: 56px; } /* 64 */
}

/* One container for everything: the live 1680 container with 24 gutters. */
.pv-wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  box-sizing: border-box;
}

/* 12-column grid, 24 gutter (at 1440: 94 px columns). */
.pv-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-xl);
}

/* Longer small text needs air: 15/24 instead of 15/20 where it wraps. */
.pv .ew-body-small { line-height: 1.5rem; }
.pv p + p { margin-top: var(--space-lg); }
html[lang="ja"] .pv .ew-body-medium,
html[lang="ja"] .pv .ew-body-large { line-height: 1.8; }
html[lang="ja"] .pv .ew-body-small { line-height: 1.7; }

/* ---------------------------------------------------------------- Gallery */
.pv-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-sm);
  height: clamp(320px, 42vw, 600px);
  margin-top: var(--space-lg);
  position: relative;
}
.pv-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--sunken);
}
.pv-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Each photo is a link (the file with no JS, the viewer with JS). */
.pv-gallery__open { display: block; height: 100%; }
/* A listing with one photo: that photo takes the whole row. */
.pv-gallery--one { grid-template-columns: 1fr; }
.pv-gallery .ew-gallery__all { right: var(--space-lg); bottom: var(--space-lg); }
@media (max-width: 767px) {
  .pv-gallery {
    grid-template-columns: 86% 86%;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
  }
  .pv-gallery--one { grid-template-columns: 1fr; overflow-x: visible; }
  .pv-gallery__item { aspect-ratio: 4 / 3; scroll-snap-align: start; }
  .pv-gallery .ew-gallery__all { position: static; justify-self: start; }
  .pv-gallery__count { margin-top: var(--space-md); }
}

/* ------------------------------------------------------------------- Hero */
.pv-hero { padding-block: var(--space-2xl) var(--space-4xl); row-gap: var(--space-2xl); }
.pv-hero__main { grid-column: 1 / span 7; min-width: 0; }
.pv-hero__aside { grid-column: 9 / span 4; }
.pv-hero__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-lg); flex-wrap: wrap;
}
.pv-hero__actions { display: flex; gap: var(--space-sm); align-items: center; }
.pv-hero h1 { margin-top: var(--space-md); }
.pv-hero__place { margin-top: var(--space-sm); }

.pv-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--space-2xl) 0 0;
  border-top: 1px solid var(--outline);
  border-bottom: 1px solid var(--outline);
}
.pv-facts > div { padding: var(--space-lg) var(--space-lg) var(--space-lg) 0; }
.pv-facts > div + div { padding-left: var(--space-lg); border-left: 1px solid var(--outline-alt); }
.pv-facts dt { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-body); font-weight: 300; font-size: var(--text-body-small-size); line-height: var(--text-body-small-line); color: var(--on-page-alt); }
.pv-facts dd {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-title-small-size); line-height: var(--text-title-small-line);
  color: var(--on-page);
}
.pv-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-xl);
}

/* Price card (v2.1). One column, five steps of size, one rhythm:
   label 14 / yen 40 / GBP 20 / fine print 15 / button / reply 15 / rule / source 14.
   Gaps: 4 under the label, 4 under the yen, 8 under GBP, 24 to the button,
   12 under the button, 24 to the rule, 16 under the rule.
   Reference: Airbnb web reserve card (price first, full-width button, one
   reassurance line centred right under it). */
.pv-price { position: sticky; top: calc(var(--site-header-height) + var(--space-xl)); gap: 0; padding: var(--space-2xl); align-items: stretch; }
.pv-price > p { margin: 0; }
.pv-price__label { color: var(--on-page-alt); }
.pv-price__yen {
  margin-top: var(--space-xs) !important;
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.5rem; line-height: 3rem; letter-spacing: -0.01em;
  color: var(--on-page); white-space: nowrap;
}
.pv-price__yen--text { white-space: normal; text-wrap: balance; overflow-wrap: anywhere; }
.pv-price__fx { margin-top: var(--space-xs) !important; font-family: var(--font-body); font-weight: 500; font-size: 1.25rem; line-height: 1.75rem; color: var(--on-page); }
.pv-price__fine { margin-top: var(--space-sm) !important; font-family: var(--font-body); font-weight: 300; font-size: 0.9375rem; line-height: 1.375rem; color: var(--on-page-alt); }
.pv-price .pv-price__cta { width: 100%; margin-top: var(--space-xl); }
.pv-price__reply { text-wrap: balance; margin-top: var(--space-md) !important; font-family: var(--font-body); font-weight: 400; font-size: 0.9375rem; line-height: 1.375rem; color: var(--on-page); text-align: center; }
.pv-price__src { text-wrap: pretty; margin-top: var(--space-xl) !important; padding-top: var(--space-lg); border-top: 1px solid var(--outline-alt); font-family: var(--font-body); font-weight: 300; font-size: 0.875rem; line-height: 1.25rem; color: var(--on-page-alt); }
.pv-price__src a { color: var(--on-page-alt); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--outline); }
.pv-price__src a:hover { color: var(--on-page); text-decoration-color: var(--accent); }
.pv-nowrap { white-space: nowrap; }
.pv-price__links { width: 100%; margin-top: var(--space-xl); border-top: 1px solid var(--outline-alt); }
.pv-price__links .ew-rich-link { padding-block: var(--space-md); border-bottom: 1px solid var(--outline-alt); }
.pv-price__links .ew-rich-link:last-child { border-bottom: 0; padding-bottom: 0; }

@media (max-width: 1023px) {
  .pv-hero__main, .pv-hero__aside { grid-column: 1 / -1; }
  .pv-price { position: static; }
}
@media (max-width: 767px) {
  .pv-hero { padding-top: var(--space-xl); }
  .pv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .pv-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--outline-alt); }
  .pv-price { padding: var(--space-xl); }
  .pv-price__yen { font-size: 2.25rem; line-height: 2.75rem; }
}

/* ------------------------------------------------------------ Section nav */
.pv-nav {
  position: sticky; top: var(--site-header-height); z-index: 20;
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--outline-alt);
  border-bottom: 1px solid var(--outline-alt);
}
.pv-nav__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xl); min-height: 72px; }
.pv-nav__links { display: flex; gap: var(--space-xl); list-style: none; margin: 0; padding: 0; }
.pv-nav__links a {
  display: inline-flex; align-items: center; min-height: 72px;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line);
  letter-spacing: var(--text-label-medium-tracking);
  color: var(--on-page-alt); text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
}
.pv-nav__links a:hover { color: var(--on-page); }
.pv-nav__links a[aria-current="true"] { color: var(--on-page); box-shadow: inset 0 -3px 0 var(--accent); }
.pv-nav__links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-nav__deal { display: flex; align-items: center; gap: var(--space-lg); white-space: nowrap; }
.pv-nav__deal .pv-nav__yen { font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); }
@media (max-width: 1023px) {
  .pv-nav__deal { display: none; }
  .pv-nav__bar { min-height: 64px; }
  .pv-nav__links { gap: var(--space-sm); overflow-x: auto; scrollbar-width: none; padding-block: var(--space-md); margin-inline: calc(-1 * var(--page-gutter)); padding-inline: var(--page-gutter); }
  .pv-nav__links a { min-height: 40px; padding: 0 var(--space-md); border: 1px solid var(--outline); border-radius: var(--radius-md); font-family: var(--font-body); font-weight: 300; font-size: var(--text-body-medium-size); letter-spacing: 0; white-space: nowrap; box-shadow: none; color: var(--on-page); background: var(--page); }
  .pv-nav__links a[aria-current="true"] { background: var(--inverse); color: var(--on-inverse); border-color: var(--inverse); box-shadow: none; }
}

/* --------------------------------------------------------------- Chapters
   Rail (cols 1-4): painting, heading, intro. Body (cols 6-12).
   One painting per chapter, always here, always the same size. */
.pv-chapter { padding-block: var(--pv-chapter); border-top: 1px solid var(--outline-alt); scroll-margin-top: calc(var(--site-header-height) + 72px); }
.pv-chapter--band { background: var(--raised); }
.pv-chapter:first-of-type { border-top: 0; }
.pv-rail { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--site-header-height) + 72px + var(--space-xl)); }
.pv-rail--static { position: static; }
.pv-body { grid-column: 6 / span 7; min-width: 0; }
.pv-paint { display: block; height: var(--pv-rail-paint); width: auto; max-width: 100%; margin: 0 0 var(--space-xl); }
.pv-rail h2 { margin: 0; }
.pv-rail .pv-intro { margin-top: var(--space-lg); }
.pv-body > * + * { margin-top: var(--space-2xl); }
.pv-h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-title-small-size); line-height: var(--text-title-small-line);
  color: var(--on-page); margin: 0;
}
.pv-h3 + * { margin-top: var(--space-lg) !important; }
@media (max-width: 1023px) {
  .pv-rail, .pv-body { grid-column: 1 / -1; position: static; }
  .pv-body { margin-top: var(--space-2xl); }
}
@media (max-width: 767px) {
  .pv-paint { margin-bottom: var(--space-lg); }
}

/* Story */
.pv-story { font-family: var(--font-body); font-weight: 300; font-size: var(--text-title-medium-size); line-height: var(--text-title-medium-line); color: var(--on-page); margin: 0; }
.pv-runin { font-family: var(--font-display); font-weight: 600; color: var(--on-page); }

/* Two-column label/value table: label column fixed, values aligned. */
.pv-table { margin: 0; border-top: 1px solid var(--outline); }
.pv-table > div {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: var(--space-xl);
  padding-block: var(--space-lg); border-bottom: 1px solid var(--outline-alt);
}
.pv-table dt { font-family: var(--font-body); font-weight: 300; font-size: var(--text-body-medium-size); line-height: var(--text-body-medium-line); color: var(--on-page-alt); }
.pv-table dd { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: var(--text-body-medium-size); line-height: var(--text-body-medium-line); color: var(--on-page); }
.pv-table--two { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-2xl); border-top: 0; }
.pv-table--two > div { grid-template-columns: 160px minmax(0, 1fr); }
.pv-table--two > div:nth-child(-n+2) { border-top: 1px solid var(--outline); }
.pv-table--icons dt { display: flex; align-items: flex-start; gap: var(--space-md); }
.pv-table--icons dt .pv-i { margin-top: calc((var(--text-body-medium-line) - 24px) / 2); }
@media (max-width: 767px) {
  .pv-table > div, .pv-table--two > div { grid-template-columns: 128px minmax(0, 1fr); column-gap: var(--space-lg); }
  .pv-table--icons > div { grid-template-columns: 164px minmax(0, 1fr); }
  .pv-table--two { grid-template-columns: 1fr; }
  .pv-table--two > div:nth-child(2) { border-top: 0; }
}

/* Price chapter: two figures, then the reading. */
.pv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.pv-stat { padding: var(--space-xl); background: var(--raised); border: 1px solid var(--outline-alt); border-radius: var(--radius-md); }
.pv-stat__icon { display: block; margin-bottom: var(--space-md); }
.pv-stat__n { font-family: var(--font-display); font-weight: 700; font-size: var(--text-headline-small-size); line-height: var(--text-headline-small-line); color: var(--on-page); }
.pv-stat__l { margin-top: var(--space-xs); }
.pv-links2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.pv-links2 .ew-rich-link { padding: var(--space-xl); border: 1px solid var(--outline); border-radius: var(--radius-md); background: var(--page); }
@media (max-width: 767px) { .pv-stats, .pv-links2 { grid-template-columns: 1fr; gap: var(--space-lg); } }

/* Record rows: hazards, bank rules, renting. Painting | name + tier | text. */
.pv-records { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--outline); }
.pv-record {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--space-lg);
  padding-block: var(--space-xl); border-bottom: 1px solid var(--outline-alt);
}
.pv-record__icon { margin-top: 2px; }
.pv-record--plain { grid-template-columns: minmax(0, 1fr); }
.pv-record__paint { width: var(--pv-row-paint); height: var(--pv-row-paint); object-fit: contain; }
.pv-record__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-lg); }
.pv-record__name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); color: var(--on-page); margin: 0; }
.pv-record__text { margin-top: var(--space-sm) !important; color: var(--on-page); }
.pv-record__note, .pv-record__src { margin-top: var(--space-sm) !important; }
.pv-record__src { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); align-items: baseline; }
.pv-record__src a { color: var(--on-page); text-decoration: underline; text-underline-offset: 3px; }
.pv-group-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-title-small-size); line-height: var(--text-title-small-line); color: var(--on-page); margin: 0 0 var(--space-lg); }
.pv-tier { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 767px) {
  .pv-record { column-gap: var(--space-md); }
  .pv-record__head { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
}

/* ------------------------------------------------------------- Note (v2.1)
   The one highlight for notes, alerts and banners. No coloured edge: a
   tinted panel with a round seal (like a hanko stamp) holding a brush icon.
   ink   = information (bank notice, English help, Koryoya, sending)
   accent = caution or failure (earthquake code, enquiry failed)
   Seal 40 px circle, icon 24 px inside, panel radius 8, 1 px outline-alt
   border all round, padding 20/24, seal-to-text gap 16. */
.pv-note {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--space-lg); align-items: start;
  padding: 20px var(--space-xl); border: 1px solid var(--outline-alt); border-radius: var(--radius-md);
  background: var(--sunken); color: var(--on-page); list-style: none;
}
.pv-note[hidden] { display: none; }
.pv-note__seal {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--inverse); color: var(--page);
}
.pv-note__seal .pv-note__icon { width: 24px; height: 24px; color: inherit; }
.pv-note__body { min-width: 0; align-self: center; }
.pv-note__body > * { margin: 0; }
.pv-note__body > * + * { margin-top: var(--space-sm) !important; }
.pv-note__body p { color: var(--on-page); }
.pv-note__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-title-small-size); line-height: var(--text-title-small-line); color: var(--on-page); margin: 0; }
.pv-note--accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, var(--outline-alt)); }
.pv-note--accent .pv-note__seal { background: var(--accent); color: #fff; }
.pv-note--compact { padding: var(--space-md) var(--space-lg); grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--space-md); }
.pv-note--compact .pv-note__seal { width: 32px; height: 32px; }
.pv-note--compact .pv-note__seal .pv-note__icon { width: 20px; height: 20px; }
/* A hazard record that needs attention is itself the note. */
.pv-note--record { margin-block: 0 var(--space-lg); padding: var(--space-xl); }
.pv-note--record .pv-note__body { align-self: start; }
.pv-note--record .pv-record__text { margin-top: var(--space-sm) !important; }
@media (max-width: 767px) {
  .pv-note { padding: var(--space-lg); column-gap: var(--space-md); }
  .pv-note--record .pv-record__head { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
}

/* Location: its own 3-area grid.
   >=1024: head (cols 1-4, row 1), Getting around + links (cols 1-4, row 2),
   map (cols 6-12, rows 1-2, at least 560 tall).
   <1024: source order, one column: head, map (360 tall), Getting around, links. */
.pv-loc { row-gap: 0; }
.pv-loc__head { grid-column: 1 / span 4; grid-row: 1; }
.pv-loc__around { grid-column: 1 / span 4; grid-row: 2; }
.pv-loc__map { grid-column: 6 / span 7; grid-row: 1 / span 2; display: flex; min-width: 0; }
.pv-map { width: 100%; height: 100%; min-height: 560px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--outline-alt); background: var(--sunken); }
.pv-around { margin-top: var(--space-2xl); }
.pv-around .pv-table > div { grid-template-columns: 136px minmax(0, 1fr); column-gap: var(--space-lg); }
.pv-around .pv-table dt, .pv-around .pv-table dd { font-size: var(--text-body-small-size); line-height: 1.5rem; }
.pv-maplinks { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-md); }
.pv-maplinks a { font-family: var(--font-display); font-weight: 600; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); color: var(--on-page); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--outline); }
.pv-maplinks a:hover { text-decoration-color: var(--accent); }
@media (max-width: 1023px) {
  .pv-loc__head, .pv-loc__around, .pv-loc__map { grid-column: 1 / -1; grid-row: auto; }
  .pv-loc__map { display: block; margin-top: var(--space-2xl); }
  .pv-map { min-height: 360px; height: 360px; }
}
.akiya-pin-dot { background: var(--accent); }

/* Read more / external links with a square marker */
.pv-squares { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-md); }
.pv-squares li { position: relative; padding-left: var(--space-xl); }
.pv-squares li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; background: var(--accent); }
.pv-squares a { color: var(--on-page); text-decoration: underline; text-underline-offset: 3px; }

/* Grants: name, condition pill and toggle left; amount right. */
.pv-grants { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--outline); }
.pv-grant { padding-block: var(--space-xl); border-bottom: 1px solid var(--outline-alt); }
.pv-grant__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-sm) var(--space-xl); align-items: baseline; }
.pv-grant__name { display: flex; align-items: flex-start; gap: var(--space-md); font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); margin: 0; color: var(--on-page); }
.pv-grant__amount { font-family: var(--font-display); font-weight: 700; font-size: var(--text-title-small-size); line-height: var(--text-title-small-line); color: var(--on-page); white-space: nowrap; text-align: right; }
/* Real amounts can be a sentence; those wrap under the name as body text. */
.pv-grant__amount--long { grid-column: 1 / -1; white-space: normal; text-align: left; padding-left: calc(24px + var(--space-md)); font-family: var(--font-body); font-weight: 500; font-size: var(--text-body-medium-size); line-height: var(--text-body-medium-line); }
.pv-grant__icon { flex: none; margin-top: calc((var(--text-label-medium-line) - 24px) / 2); }
.pv-grant__meta { display: flex; align-items: center; gap: var(--space-lg); margin-top: var(--space-sm); grid-column: 1 / -1; padding-left: calc(24px + var(--space-md)); }
.pv-grant details { padding-left: calc(24px + var(--space-md)); }
.pv-grant details { margin-top: var(--space-md); }
.pv-grant summary { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 40px; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: var(--text-body-medium-size); color: var(--on-page); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--outline); }
.pv-grant summary::-webkit-details-marker { display: none; }
.pv-grant summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.pv-grant details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.pv-grant__more { padding: var(--space-lg) 0 0; }
.pv-grant__more > * + * { margin-top: var(--space-md) !important; }
.pv-grant__more ul { list-style: none; margin: 0; padding: 0; }
.pv-grant__more ul li { position: relative; padding-left: var(--space-xl); }
.pv-grant__more ul li + li { margin-top: var(--space-sm); }
.pv-grant__more ul li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--accent); }
@media (max-width: 767px) {
  .pv-grant__row { grid-template-columns: 1fr; }
  .pv-grant__amount { text-align: left; padding-left: calc(24px + var(--space-md)); white-space: normal; }
}

/* How to buy: the live buying-route copy. The bold title is
   the H2; the body is set like the house story; the English help line uses
   the same once-only note as Bank rules; Koryoya (B only) is an outlined
   panel; "free to ask" and "always some costs" sit side by side. */
.pv-terms { list-style: none; margin: 0; padding: 0; }
.pv-buy > * + * { margin-top: var(--space-2xl); }
.pv-terms { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.pv-terms li { display: flex; gap: var(--space-md); align-items: flex-start; padding: var(--space-xl); background: var(--raised); border: 1px solid var(--outline-alt); border-radius: var(--radius-md); color: var(--on-page); }
.pv-terms__icon { margin-top: calc((var(--text-body-medium-line) - 24px) / 2); }
.pv-buy .pv-help { margin-top: var(--space-2xl); }
.pv-buy .pv-help .pv-help__list li { color: var(--on-page); }
.pv-buy .pv-help .pv-help__charges { border-top-color: var(--outline-alt); }
@media (max-width: 767px) { .pv-terms { grid-template-columns: 1fr; gap: var(--space-lg); } .pv-terms li { padding: var(--space-lg); } }

/* --------------------------------------------------------------- Enquiry
   Lead (cols 1-5): eyebrow, H2, the How to buy copy for this listing's
   version, then the Koryoya box on agent-involved (B) listings only.
   Form card (cols 7-12). No steps list, no agent card on the band. */
.pv-enquiry { padding-block: var(--pv-chapter); }
.pv-enquiry__lead { grid-column: 1 / span 5; }
.pv-enquiry__form { grid-column: 7 / span 6; }
.pv-enquiry__reply { margin-top: var(--space-xl); color: var(--on-inverse); }
.pv-enquiry .ew-body-small { color: color-mix(in srgb, var(--on-inverse) 78%, transparent); }

/* Koryoya box (B only): an outlined panel on the dark band, never a card. */
.pv-help { margin-top: var(--space-2xl); padding: var(--space-xl); border: 1px solid color-mix(in srgb, var(--on-inverse) 28%, transparent); border-radius: var(--radius-md); }
.pv-help__title { margin: 0 0 var(--space-md); font-family: var(--font-display); font-weight: 700; font-size: var(--text-title-small-size); line-height: var(--text-title-small-line); color: var(--on-inverse); }
.pv-help > p + p, .pv-help > ul + p { margin-top: var(--space-md); }
.pv-help__list { list-style: none; margin: var(--space-md) 0 0; padding: 0; }
.pv-help__list li { position: relative; padding-left: var(--space-xl); color: var(--on-inverse); }
.pv-help__list li + li { margin-top: var(--space-sm); }
.pv-help__list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; background: var(--accent); }
.pv-help__charges { padding-top: var(--space-md); border-top: 1px solid color-mix(in srgb, var(--on-inverse) 20%, transparent); }

/* Form card. Everything in it uses page ink, whatever the band does. */
.pv-form { padding: var(--space-2xl); gap: var(--space-xl); color: var(--on-page); }
.pv-form .ew-body-medium, .pv-form .ew-body-large { color: var(--on-page); }
.pv-form .ew-body-small { color: var(--on-page-alt); }
/* The card holds the agent strip (C) and the form; the form stacks its own
   fields with the same rhythm as the card. */
.pv-form__fields { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xl); width: 100%; }
.pv-form .ew-agent-strip { width: 100%; padding-bottom: var(--space-xl); border-bottom: 1px solid var(--outline-alt); }
.pv-form__two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); width: 100%; }
.pv-form .ew-formfield { width: 100%; }
.pv-form textarea.ew-formfield-input { min-height: 168px; }
.pv-help-text { margin-top: var(--space-sm); }
.pv-form__send { display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; width: 100%; }
.pv-form .ew-btn[disabled] { opacity: 0.6; cursor: progress; }
.pv-routing { width: 100%; margin-top: calc(-1 * var(--space-md)) !important; }
.pv-optin { width: 100%; }
.pv-optin .ew-check-label { color: var(--on-page); }
/* Status: the compact note. Sending = ink note, failed = accent note; sent swaps the form for ew-sent-card. */
.pv-status { width: 100%; margin: 0; }
.pv-form--sent .ew-sent-card .ew-badge { background: var(--sunken); }
/* Our agent's own listing (C): the agent strip heads the form card. */
.pv-strip { width: 100%; padding-bottom: var(--space-xl); border-bottom: 1px solid var(--outline-alt); }
.pv-strip__who { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--space-lg); align-items: center; }
.pv-strip__name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-title-small-size); line-height: var(--text-title-small-line); color: var(--on-page); }
.pv-strip__more { color: var(--on-page) !important; text-decoration: underline; text-underline-offset: 3px; }
.pv-strip__facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-top: var(--space-lg); }
.pv-strip .ew-badge { background: var(--sunken); }
.pv-agent__av { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--sunken); color: var(--on-page); font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); }
@media (max-width: 1023px) {
  .pv-enquiry__lead, .pv-enquiry__form { grid-column: 1 / -1; }
  .pv-enquiry__form { margin-top: var(--space-2xl); }
}
@media (max-width: 767px) {
  .pv-form { padding: var(--space-xl); }
  .pv-form__two { grid-template-columns: 1fr; }
  .pv-help { padding: var(--space-lg); }
  .pv-strip__who { grid-template-columns: 56px minmax(0, 1fr); }
  .pv-strip__more { grid-column: 2; }
}

/* ------------------------------------------------------- Save button state
   Live .save-btn, unchanged. Saved = .saved + aria-pressed="true", filled heart, label "Saved". */

/* ---------------------------------------------------------- After the form */
.pv-after { padding-block: var(--pv-chapter) 0; }
.pv-after + .pv-after { padding-top: var(--space-4xl); }
.pv-after__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xl); margin-bottom: var(--space-2xl); flex-wrap: wrap; }
.pv-similar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }
.pv-card { display: block; text-decoration: none; color: inherit; }
.pv-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); display: block; background: var(--sunken); }
.pv-card__title { margin-top: var(--space-lg); font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); color: var(--on-page); }
.pv-card .ew-price-tag { margin-top: var(--space-sm); }
.pv-card .ew-property-attrs { margin-top: var(--space-xs); }
.pv-card .ew-badge { margin-top: var(--space-md); }
.pv-guides { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl); }
.pv-guides .ew-rich-link { padding-top: var(--space-lg); border-top: 2px solid var(--on-page); }
.pv-prov { padding-bottom: var(--pv-chapter); }
.pv-prov__left { grid-column: 1 / span 5; }
.pv-prov__right { grid-column: 7 / span 6; }
.pv-prov__right > * + * { margin-top: var(--space-xl); }
.pv-prov__links { display: flex; gap: var(--space-xl); flex-wrap: wrap; margin-top: var(--space-xl); }
.pv-prov__links a { font-family: var(--font-display); font-weight: 600; font-size: var(--text-label-medium-size); color: var(--on-page); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--outline); }
@media (max-width: 1023px) {
  .pv-similar { grid-template-columns: 1fr 1fr; }
  .pv-guides { grid-template-columns: 1fr 1fr; }
  .pv-prov__left, .pv-prov__right { grid-column: 1 / -1; }
  .pv-prov__right { margin-top: var(--space-2xl); }
}
@media (max-width: 767px) {
  .pv-similar { grid-template-columns: 1fr; }
  .pv-guides { grid-template-columns: 1fr; }
}

/* Phone price bar: fixed at the bottom once the price card has scrolled away. */
.pv-bar { display: none; }
@media (max-width: 1023px) {
  .pv-bar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 25; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-md) var(--page-gutter) calc(var(--space-md) + env(safe-area-inset-bottom, 0px)); background: var(--raised); border-top: 1px solid var(--outline-alt); }
  .pv-bar.is-hidden { display: none; }
  .pv-bar__yen { font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); color: var(--on-page); }
}

/* ------------------------------------------------------------ Photo wall
   Max 2 columns. With no JS: landscape photos take the full row, portrait
   photos pair up. With JS: a two-column masonry (below).
   Light, page-coloured, no categories. */
.pv-wall { position: fixed; inset: 0; z-index: 60; background: var(--page); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pv-wall[hidden] { display: none; }
/* No JS: the wall opens by #all-photos (:target). listing-v2.js adds
   .pv-wall--js and drives it with the hidden attribute instead. */
.pv-wall:not(.pv-wall--js):not(:target) { display: none; }
.pv-wall:focus { outline: none; }
.pv-viewer:focus { outline: none; }
.pv-wall__bar { position: sticky; top: 0; z-index: 1; background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--outline-alt); }
.pv-wall__barin { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-lg); min-height: 72px; }
.pv-wall__title { text-align: center; }
.pv-wall__title p { margin: 0; }
.pv-wall__titlemain { font-family: var(--font-display); font-weight: 700; font-size: var(--text-label-medium-size); line-height: var(--text-label-medium-line); color: var(--on-page); }
.pv-wall__back { justify-self: start; gap: var(--space-sm); }
.pv-wall__back svg { width: 16px; height: 16px; }
.pv-wall__grid { max-width: 1200px; margin: var(--space-2xl) auto var(--space-4xl); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); padding-inline: var(--page-gutter); }
.pv-wall__grid figure { margin: 0; }
.pv-wall__grid .is-land { grid-column: 1 / -1; }
.pv-wall__open { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--radius-md); cursor: zoom-in; }
.pv-wall__open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pv-wall__grid img { width: 100%; height: auto; display: block; border-radius: var(--radius-md); background: var(--sunken); }
.pv-wall__note { max-width: 1200px; margin: var(--space-xl) auto 0; padding-inline: var(--page-gutter); }
/* With JS: a two-column masonry. listing-v2.js deals the photos into two
   columns (left, right, left...), each photo at its own ratio, never cropped. */
.pv-wall--js .pv-wall__grid { display: flex; align-items: flex-start; }
.pv-wall__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xl); }
.pv-wall__col:empty { display: none; }
@media (max-width: 767px) {
  .pv-wall__barin { grid-template-columns: auto 1fr; }
  .pv-wall__title { text-align: right; }
  .pv-wall__grid { grid-template-columns: 1fr 1fr; gap: var(--space-sm); padding-inline: 0; margin-top: var(--space-sm); }
  .pv-wall__grid img, .pv-wall__open { border-radius: 0; }
  .pv-wall__note { padding-inline: var(--page-gutter); }
  .pv-wall__col { gap: var(--space-sm); }
}

/* ------------------------------------------------------- Photo viewer (v2.1)
   One photo, whole, on the page colour. Opens from a wall tile.
   Slim sticky bar: Back chip left, "3 of 9" centred. Under it the photo is
   contained in a box the size of the rest of the window (never cropped, never
   cut off); round arrow buttons float over its sides. The viewer is its own
   scroll box. Escape / browser Back return to the wall. */
.pv-viewer { position: fixed; inset: 0; z-index: 70; display: block; background: var(--page); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; --pv-vbar: 56px; }
.pv-viewer[hidden] { display: none; }
.pv-viewer__bar { position: sticky; top: 0; z-index: 1; background: var(--page); border-bottom: 1px solid var(--outline-alt); }
.pv-viewer__barin { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-lg); height: var(--pv-vbar); box-sizing: border-box; padding-inline: var(--page-gutter); }
.pv-viewer__back { justify-self: start; gap: var(--space-sm); }
.pv-viewer__back svg { width: 16px; height: 16px; }
.pv-viewer__count { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: var(--text-body-small-size); line-height: 1.5rem; color: var(--on-page); font-variant-numeric: tabular-nums; }
/* The whole photo, as large as the window allows under the bar: a box the
   size of the window, the photo contained in it, so it is never cut off.
   The arrows float over its edges. */
.pv-viewer__stage { position: relative; }
.pv-viewer__img { display: block; width: 100%; height: calc(100vh - var(--pv-vbar) - 1px); height: calc(100dvh - var(--pv-vbar) - 1px); object-fit: contain; }
.pv-viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--outline); background: var(--raised); color: var(--on-page); cursor: pointer; }
.pv-viewer__prev { left: var(--page-gutter); }
.pv-viewer__next { right: var(--page-gutter); }
.pv-viewer__nav:hover { border-color: var(--on-page); }
.pv-viewer__nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pv-viewer__nav[aria-disabled="true"] { opacity: 0.35; cursor: default; }
@media (max-width: 767px) {
  .pv-viewer__barin { grid-template-columns: auto 1fr; }
  .pv-viewer__count { text-align: right; }
  .pv-viewer__nav { width: 40px; height: 40px; }
  .pv-viewer__prev { left: var(--space-sm); }
  .pv-viewer__next { right: var(--space-sm); }
}

/* Icons (v2.1): one inline sprite per page, 24 px everywhere, ink colour. */
.pv-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pv-i { display: inline-block; flex: none; width: 24px; height: 24px; color: var(--on-page); vertical-align: middle; }

/* Real records carry long unbroken strings the mockup never had (a source
   host name, a JA grant amount sentence): let them wrap instead of pushing
   the page sideways on a phone. */
.pv a, .pv dd, .pv-grant__amount, .pv-grant__name { overflow-wrap: anywhere; }
