/* A4 v2.1: physical dimensions are shared by screen and print. */
*{box-sizing:border-box}html,body{margin:0;color:#191919;font-family:Meiryo,'Yu Gothic',sans-serif;font-size:9.4pt;line-height:4.35mm}body{background:#e8e8e8}p,h1,h2,figure{margin:0}button{font:inherit}.controls{max-width:190mm;margin:4mm auto;padding:3mm;background:white}.controls p{margin:1mm 0}.sheet{position:relative;width:190mm;height:277mm;margin:5mm auto 12mm;background:white;--row:6.5mm;--section-head:8mm;--section-gap:3mm;--pad:2.3mm}.brand{min-height:14mm;border-bottom:.25mm solid #191919;display:flex;justify-content:space-between;align-items:flex-start;gap:3mm}.brand img{width:33mm;height:11.5mm;object-fit:contain}.brand>div{text-align:right;font-size:7.2pt;line-height:4.3mm;min-width:0;max-width:154mm;overflow-wrap:anywhere}.brand .labels{display:inline-block;max-width:100%}.hero{position:relative;padding:3mm 0 8mm}.title-price{display:flex;justify-content:space-between;min-height:18mm;gap:3mm}h1{font-size:16pt;line-height:6.3mm;width:126mm;font-weight:bold;overflow-wrap:anywhere}.price{text-align:right;flex:1;white-space:nowrap}.price small{display:block;font-size:7.5pt;line-height:4mm}.price strong{font-size:25pt;line-height:11mm}.price span{font-size:12pt;margin-left:1mm}.location{margin-top:3mm;overflow-wrap:anywhere}.location>span{font-size:8.2pt;color:#555;display:inline-block;width:18mm}.transport{font-size:9pt;margin-top:2mm;overflow-wrap:anywhere}.header-photo{position:absolute;right:0;bottom:8mm;width:34mm;height:20mm;object-fit:contain}.hero.has-photo .location,.hero.has-photo .transport{max-width:145mm}.hero.has-photo{min-height:53mm}.content{position:relative}.media{height:var(--band);margin:0}.media[hidden]{display:none}.media-heading{height:8mm;display:flex;justify-content:space-between;align-items:flex-start;padding-top:.3mm}.media-heading h2{flex:1}.media-heading small{font-size:7.2pt;white-space:nowrap}.media-items{height:calc(var(--band) - 17mm);display:flex;gap:4mm}.media figure{margin:0;min-width:0;position:relative;flex:1;display:flex;align-items:center;justify-content:center}.media img{object-fit:contain;display:block;max-width:100%;max-height:100%}.media figcaption{position:absolute;top:100%;left:0;right:0;min-height:5mm;padding-top:.5mm;font-size:7.8pt;line-height:3.3mm;overflow-wrap:anywhere}.media h2{border-left:0}.media-heading{border-bottom:.15mm solid #999;margin-bottom:0}h2{font-size:10pt;line-height:4.3mm;font-weight:bold;border-left:1mm solid #faed00;padding-left:2mm}.detail-section{margin-bottom:var(--section-gap);break-inside:avoid}.detail-section>h2,.remarks>h2{height:var(--section-head);padding-top:.3mm;border-bottom:.15mm solid #999;margin-bottom:0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 4mm;align-items:stretch}.field{display:grid;grid-template-columns:23mm 1fr;min-height:var(--row);border-bottom:.15mm solid #c0c0c0;break-inside:avoid;align-items:stretch;min-width:0}.field-label{background:#f2f2f2;color:#555;font-size:7.8pt;line-height:3.2mm;padding:calc(var(--pad)/2) 1mm;display:flex;align-items:center;overflow-wrap:anywhere}.field-value{font-size:9.4pt;line-height:4.35mm;padding:calc(var(--pad)/2) 0 calc(var(--pad)/2) 2mm;display:flex;align-items:center;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}.field:last-child:nth-child(odd){grid-column:1/-1}.sheet.one-column .field-grid{grid-template-columns:1fr}.remarks{break-inside:avoid}.remarks>p{padding:0 2mm;white-space:pre-wrap;overflow-wrap:anywhere}.company{position:absolute;top:247mm;left:0;right:0;height:30mm;border-top:.25mm solid #191919;padding-top:1mm;display:flex;gap:6mm;justify-content:space-between}.company-text{width:160mm;line-height:4.5mm}.company-text>strong{font-size:10.5pt}.company-text b{font-size:14pt;line-height:6mm}.company-text div>span{font-size:8.2pt;margin-left:7mm}.company-text p{font-size:7.8pt;line-height:4mm}.company-text>small{font-size:6.5pt;line-height:3mm;display:block}.qr-block{position:relative;width:24mm;flex-shrink:0;text-align:right}.qr-block>small{position:absolute;bottom:100%;right:0;font-size:6.5pt;white-space:nowrap}.qr-block #qr,.qr-block svg{width:24mm;height:24mm;display:block}.qr-block>span{display:block;font-size:6pt;line-height:3mm;white-space:nowrap;position:absolute;right:0;top:24mm}.print-failure{display:none}.sheet.compact{--row:6mm;--section-head:7mm;--section-gap:2mm;--pad:1.65mm}.sheet.one-column{--row:8mm}a[href]::after{content:none!important}
@page{size:A4 portrait;margin:10mm}
@media print{html,body{background:white!important;margin:0!important;padding:0!important}.controls,noscript{display:none!important}.sheet{margin:0;box-shadow:none;break-inside:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}body:not([data-print-state="ready"]) .sheet{display:none!important}body:not([data-print-state="ready"]) .print-failure{display:block;font-size:11pt;line-height:6mm}}

/* 0.2.6: version read by print.js; must match the page and print.js (an old cached copy stops printing). */
:root{--fudoisao-print-version:'0.2.11'}
/* 0.2.5: media band holds positioned cells (rows / columns) chosen by print.js. */
.media-items{display:block;position:relative;height:calc(var(--band) - 9mm)}
.media figure{position:absolute;display:block;flex:none}
.media figure img{display:block}
.media figcaption{text-align:center}
/* 0.2.5: main photo beside the title / price / address. */
.has-hero-photo .hero-b{display:flex;gap:5mm;align-items:flex-start;padding:3mm 0 5mm}
.hero-b .header-photo{position:static;flex:none;width:auto;height:auto;max-width:92mm;max-height:66mm;object-fit:contain}
.has-hero-photo .hero-b .hero-text{flex:1;min-width:0}
.has-hero-photo .hero-b h1{width:auto}
.has-hero-photo .hero-b .title-price{flex-direction:column;min-height:0;gap:2mm}
.has-hero-photo .hero-b .price{text-align:left}
.has-hero-photo .hero-b .location>span{display:block;width:auto}
/* 0.2.6: screen preview only. The sheet stays the 190x277mm printable area (all measurements use it); a 10mm white border drawn with
   box-shadow makes it look like the A4 paper (210x297mm). At least 12mm of grey is kept on all four sides of the paper: sheet margin
   22mm = 10mm border + 12mm grey; narrow windows scroll sideways instead of losing the gap. Print output is unchanged (print rules
   remove margin, padding and shadow). */
@media screen{body{padding:0 12mm;min-width:234mm}.controls{max-width:210mm;margin:12mm auto 0}.sheet{margin:22mm auto;box-shadow:0 0 0 10mm #fff,0 1mm 4mm 10mm rgba(0,0,0,.22)}}

/* 0.2.7: Isao yellow / black / white maisoku design. Text is unchanged; only presentation.
   Heights used by the fit check (--row, --section-head, --pad) keep their meaning, so measure() still decides the layout. */
.sheet{--isao:#faed00;--ink:#191919;--label:#fff6c2}
.brand{border-bottom:1.4mm solid var(--isao);align-items:center;padding-bottom:.6mm;min-height:14mm}
.brand>div{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.8mm 2mm;font-size:7.2pt;line-height:3.8mm}
.badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1.2mm}
.badge{display:inline-block;padding:0 2.2mm;border:.3mm solid var(--ink);border-radius:1mm;font-size:8.6pt;line-height:4.8mm;font-weight:bold;white-space:nowrap}
.badge-purpose{background:var(--ink);color:var(--isao)}
.badge-type{background:var(--isao);color:var(--ink)}
.badge-sub{background:#fff;color:var(--ink);font-weight:normal}
.brand .meta{color:#444}
.brand .labels{flex-basis:100%;font-weight:bold;text-align:right}
h1{font-size:17pt;line-height:6.5mm;letter-spacing:.02em}
.price{flex:none;align-self:flex-start;background:var(--isao);border-radius:1.5mm;padding:.6mm 3mm 1mm;text-align:left}
.price small{font-weight:bold}
.price strong{font-size:27pt;line-height:11.5mm;letter-spacing:.01em}
.price span{font-weight:bold}
.location>span{display:inline-block!important;width:auto!important;background:var(--ink);color:#fff;font-size:7.4pt;line-height:4.4mm;padding:0 1.6mm;border-radius:.8mm;margin-right:2mm;vertical-align:.2mm}
.has-hero-photo .hero-b .location>span{margin-bottom:.8mm}
.transport{color:#333}
.hero-b .header-photo{border-radius:.6mm}
.media-heading{border-bottom:.4mm solid var(--ink)}
.media-heading h2{border-left:1.6mm solid var(--isao);padding-left:2mm}
.media img{border-radius:.4mm}
.media img[data-plan="true"]{border-radius:0}
.media figcaption{font-weight:bold}
/* Section bar: black band with a yellow tab, drawn inside the same --section-head height. */
.detail-section>h2,.remarks>h2{border-bottom:0;border-left:0;padding:1.1mm 0 0 4.2mm;color:#fff;font-size:9.6pt;line-height:calc(var(--section-head) - 1.4mm);
  background:linear-gradient(90deg,var(--isao) 0 1.6mm,var(--ink) 1.6mm) left 1.1mm/100% calc(100% - 1.4mm) no-repeat}
.field{border-bottom:.15mm solid #d4d4d4}
.field-label{background:var(--label);color:#333}
.remarks>p{border-left:.5mm solid var(--isao);margin-left:1mm}
.company{border-top:1.2mm solid var(--ink)}
.company-text>strong{font-size:11pt}
.company-text b{display:inline-block;background:var(--isao);padding:0 2mm;border-radius:1mm;font-size:15pt;line-height:6.4mm;margin:.4mm 0}
@media screen{#print-button{background:#faed00;color:#191919;border:.5mm solid #191919;border-radius:999px;padding:1.5mm 5mm;font-weight:bold;cursor:pointer}
#print-button:disabled{background:#eee;color:#888;border-color:#bbb;cursor:not-allowed}}
/* Compact fallback (only when the normal layout cannot fit, e.g. a very long title with a high price): slightly smaller title and price. */
.sheet.compact h1{font-size:16pt;line-height:6.2mm}
.sheet.compact .price{padding:.4mm 2.4mm .6mm}
.sheet.compact .price strong{font-size:23pt;line-height:10mm}
/* 0.2.8: final adjustments for a handout customers can read at a glance. Same text, same row heights (the fit check decides
   the layout as before). Only labels the sheet already uses are styled; the one added word is the footer tag below. */
.badge{font-size:9pt}
.price small{font-size:8pt}
.location{font-weight:bold}
.location>span{font-weight:normal}
.transport{font-size:8.8pt;color:#444}
/* Table: bold labels with a thin rule before the value, so each row reads as label / value. */
.field-label{font-weight:bold;color:#2b2b2b;border-right:.3mm solid #ecd94a}
/* Remarks: a pale yellow box under its heading, so the notes are not lost at the bottom of the sheet. */
.remarks>p{border-left:0;margin-left:0;padding:0 2.5mm;background:#fffae0}
.remarks>p:last-of-type{border-bottom:.3mm solid #ecd94a}
/* Contact block: a small tag in front of the company name marks the footer as the place to ask. */
.company-text>strong::before{content:"お問い合わせ";display:inline-block;background:var(--ink);color:var(--isao);font-size:7.6pt;line-height:4.4mm;padding:0 1.8mm;border-radius:.8mm;margin-right:2mm;vertical-align:.3mm;font-weight:bold}
.qr-block>small{font-weight:bold;color:#191919}
/* 0.2.9: the map under the address, beside the heading, in the heading's top-right corner, or beside a single photo in the band.
   The map is image layers (tiles or one static image) around the property point; the frame shows the middle part.
   Label and credit sit inside the image, like the map service's own attribution, so they take no extra height. */
figure.map{position:relative;margin:2mm 0 0;border:.3mm solid var(--ink);line-height:0;background:#eef0ea}
figure.map[hidden]{display:none!important}
figure.map .map-canvas{position:relative;overflow:hidden;width:100%}
figure.map img.map-img{position:absolute;display:block;max-width:none;max-height:none;object-fit:fill}
figure.map .map-pin{position:absolute;left:50%;top:50%;width:4.2mm;height:6mm;margin:-6mm 0 0 -2.1mm}
figure.map figcaption{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;justify-content:space-between;align-items:flex-end;gap:2mm;padding:0 .8mm .6mm;line-height:3mm;min-height:0;font-weight:normal;text-align:left}
figure.map .map-label{position:absolute;left:.8mm;top:.8mm;background:var(--ink);color:var(--isao);font-weight:bold;font-size:7pt;line-height:3.6mm;padding:0 1.2mm;border-radius:.6mm}
figure.map .map-credit{margin-left:auto;background:rgba(255,255,255,.88);color:#333;font-size:5.6pt;line-height:2.8mm;padding:0 .8mm}
.media figure.map{margin:0}
figure.map.map-side .map-credit,figure.map.map-corner .map-credit{max-width:100%;font-size:5pt;line-height:2.4mm}
/* Google draws its logo bottom-left and its data credit bottom-right: keep the label top-left only. */
figure.map[data-provider="google"] figcaption{display:block}
/* rc2: the Google image is requested at the frame's own size and shown whole (never cropped): logo and attribution stay visible. */
figure.map img.map-google{left:0;top:0;width:100%;height:100%}
/* rc3: the GSI credit links to GSI's tile list on screen; on paper it is the same plain text. */
figure.map a.map-credit{color:#333;text-decoration:none}
/* 0.2.11 (improvement 3): a map lower than 30mm shows the tiles one zoom level out (twice the area). */
figure.map img.map-wide{display:none}figure.map.map-zoomout img.map-img{display:none}figure.map.map-zoomout img.map-wide{display:block}
