*{box-sizing:border-box}body{margin:0;background:#fdfbf9;color:#383940;font-family:'Bai Jamjuree',sans-serif}a{color:inherit;text-decoration:none}.grid{max-width:1200px;margin:0 auto;padding:20px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;grid-template-areas:'title title hero hero' 'rent location hero hero' 'size availability extra surroundings' 'line call viewing viewing'}.tile{padding:22px;display:flex;flex-direction:column;justify-content:space-between;gap:16px;min-width:0;aspect-ratio:1}.tile h2{font-size:14px;font-weight:400;line-height:1.5;margin:0}.tile p{font-size:clamp(23px,2.6vw,34px);font-weight:600;line-height:1.3;margin:0}.tile>span{font-size:14px;line-height:1.5}.tile b{font-weight:400}.title{grid-area:title;aspect-ratio:auto;background:#e5dfed}.title>a{font-size:14px;width:fit-content}.title h1{font-size:clamp(35px,4.5vw,59px);font-weight:600;line-height:1.3;margin:0 0 8px}.title p{font-size:16px;font-weight:400}.rent{grid-area:rent;background:#f3e7c6}.location{grid-area:location;background:#e2e9e5}.size{grid-area:size;background:#eee4dc}.availability{grid-area:availability;background:#e7e8f0}.line{grid-area:line;background:#d8ead8}.call{grid-area:call;background:#e1e9f1}.viewing{grid-area:viewing;aspect-ratio:auto;background:#eee0e5;border:2px solid #b899aa}.viewing p{font-size:clamp(30px,3.2vw,42px)}.photo{padding:0;border:0;position:relative;min-width:0;min-height:0;cursor:zoom-in;overflow:hidden;font:inherit;text-align:left;color:#353e35;background:#e5e9dd;aspect-ratio:1}.hero{grid-area:hero}.extra{grid-area:extra}.surroundings{grid-area:surroundings}.photo img{width:100%;height:100%;object-fit:cover;display:block}.photo>span{position:absolute;left:0;bottom:0;right:0;background:#fffaf0ed;padding:14px 18px;font-size:16px}.photo small{display:block;font-size:12px;margin-top:3px;color:#687067}a.tile:hover{filter:brightness(.97)}a:focus-visible,button:focus-visible{outline:3px solid #80678e;outline-offset:-5px}dialog{border:0;padding:48px 12px 12px;background:transparent;color:white;max-width:94vw;width:800px;max-height:94dvh;text-align:center}dialog::backdrop{background:#201d25de;backdrop-filter:blur(5px)}dialog img{display:block;max-width:100%;max-height:calc(94dvh - 130px);margin:auto;object-fit:contain}dialog p{font-size:14px}.close{position:absolute;right:8px;top:0;width:44px;height:44px;border:0;background:transparent;color:white;font:28px Arial;cursor:pointer}
@media(max-width:700px){.grid{padding:10px;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:'title title' 'hero hero' 'rent location' 'size availability' 'extra surroundings' 'line call' 'viewing viewing'}.tile{padding:16px;gap:12px}.tile h2,.tile>span{font-size:12px}.title{min-height:220px;padding:24px}.title h1{font-size:clamp(34px,8vw,48px)}.title p{font-size:14px}.tile p{font-size:clamp(22px,5.6vw,32px)}.viewing{min-height:210px;padding:24px}.viewing p{font-size:34px}.photo>span{font-size:14px;padding:10px}.photo small{font-size:11px}}
@media(max-width:360px){.tile{padding:12px}.tile h2,.tile>span{font-size:11px}.tile p{font-size:22px}.title{padding:20px}.title h1{font-size:32px}}

/* Fixed, single-screen grid. Square units scale to the available viewport. */
body{height:100dvh;overflow:hidden;display:grid;place-items:center;padding:10px}
.grid{padding:0;margin:0;max-width:none;gap:8px;width:calc(var(--unit)*4 + 24px);height:calc(var(--unit)*3 + 16px);grid-template-columns:repeat(4,var(--unit));grid-template-rows:repeat(3,var(--unit));grid-template-areas:'title title hero hero' 'location size hero hero' 'availability line call extra'}
.surroundings{display:none}
.tile,.photo{aspect-ratio:auto;min-height:0}
.tile{padding:calc(var(--unit)*.08);gap:4px}
.tile h2,.tile>span{font-size:clamp(10px,calc(var(--unit)*.07),16px);line-height:1.25}
.tile p{font-size:calc(var(--unit)*.17);line-height:1.25}
.title{min-height:0;padding:calc(var(--unit)*.09)}
.title h1{font-size:calc(var(--unit)*.30);margin:0 0 6px;white-space:nowrap}
.title p,.title>a{font-size:clamp(11px,calc(var(--unit)*.075),18px)}
.photo>span{font-size:clamp(10px,calc(var(--unit)*.075),17px);padding:calc(var(--unit)*.055)}
.photo small{font-size:clamp(9px,calc(var(--unit)*.055),13px)}
@media(max-aspect-ratio:4/5){
.grid{width:calc(var(--unit)*3 + 16px);height:calc(var(--unit)*4 + 24px);grid-template-columns:repeat(3,var(--unit));grid-template-rows:repeat(4,var(--unit));grid-template-areas:'title title location' 'hero hero size' 'hero hero availability' 'line call extra'}
.tile p{font-size:calc(var(--unit)*.16)}
.title h1{font-size:calc(var(--unit)*.27)}
.title>span{font-size:10px}
}

.grid{width:calc(var(--unit)*5 + 32px);grid-template-columns:repeat(5,var(--unit));grid-template-areas:'title title hero hero hero' 'location size hero hero hero' 'availability line call extra surroundings'}
.surroundings{display:block}
@media(max-aspect-ratio:4/5){.grid{width:calc(var(--unit)*3 + 16px);height:calc(var(--unit)*5 + 32px);grid-template-columns:repeat(3,var(--unit));grid-template-rows:repeat(5,var(--unit));grid-template-areas:'title title location' 'hero hero size' 'hero hero availability' 'hero hero extra' 'line call surroundings'}}
@media(max-width:450px),(max-height:500px){.tile{padding:calc(var(--unit)*.05);gap:2px}.tile h2,.tile>span{font-size:9px;line-height:1.2}.tile p{font-size:calc(var(--unit)*.14);line-height:1.2}.title h1{font-size:calc(var(--unit)*.25);margin-bottom:3px}.title p,.title>a{font-size:10px}.title>span{font-size:9px}}

.tile.location p{font-size:clamp(10px,calc(var(--unit)*.07),18px);font-weight:400;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:450px),(max-height:500px){.tile.location p{font-size:calc(var(--unit)*.075);line-height:1.35}}

.tile.size{gap:3px;justify-content:flex-start}
.tile.size h2{margin-bottom:auto}
.tile.size strong{font-size:calc(var(--unit)*.066);line-height:1.35;font-weight:600}
.tile.size ul{margin:3px 0 0;padding-left:1.1em;font-size:calc(var(--unit)*.064);line-height:1.45}
.tile.size strong{font-size:clamp(9px,calc(var(--unit)*.066),18px)}
.tile.size ul{font-size:clamp(9px,calc(var(--unit)*.064),17px);line-height:1.3;margin-top:1px}

.status-english{display:block;font-size:.55em;font-weight:400;line-height:1.4;margin-top:8px}

/* Owner's priority order, read left to right and top to bottom. */
.grid{width:calc(var(--unit)*4 + 24px);height:calc(var(--unit)*3 + 16px);grid-template-columns:repeat(4,var(--unit));grid-template-rows:repeat(3,var(--unit));grid-template-areas:'title title location size' 'hero hero line call' 'extra surroundings availability availability'}
@media(max-aspect-ratio:4/5){.grid{width:calc(var(--unit)*3 + 16px);height:calc(var(--unit)*5 + 32px);grid-template-columns:repeat(3,var(--unit));grid-template-rows:repeat(5,var(--unit));grid-template-areas:'title title location' 'size hero hero' 'line hero hero' 'call extra surroundings' 'availability availability availability'}}

.grid{grid-template-areas:'title title hero hero' 'location size line call' 'extra surroundings availability availability'}
@media(max-aspect-ratio:4/5){.grid{grid-template-areas:'title title hero' 'location size hero' 'line call hero' 'extra surroundings hero' 'availability availability availability'}}

/* Availability always occupies one square; photos absorb remaining cells. */
.grid{grid-template-areas:'title title hero hero' 'location size line call' 'extra surroundings surroundings availability'}
@media(max-aspect-ratio:4/5){.grid{grid-template-areas:'title title hero' 'location size hero' 'line call hero' 'extra surroundings hero' 'extra surroundings availability'}}

/* Give property details extra width where the desktop grid has room. */
@media(min-aspect-ratio:4/5){.grid{grid-template-areas:'title title hero hero' 'location size size line' 'call extra surroundings availability'}}

/* Photos only span horizontally, never across multiple rows. */
@media(max-aspect-ratio:4/5){.grid{height:calc(var(--unit)*4 + 24px);grid-template-rows:repeat(4,var(--unit));grid-template-areas:'title title hero' 'location size line' 'call extra extra' 'surroundings surroundings availability'}}
/* Wider screens give the title and phone extra horizontal room. */
@media(min-aspect-ratio:3/2){.grid{width:calc(var(--unit)*5 + 32px);grid-template-columns:repeat(5,var(--unit));grid-template-areas:'title title title hero hero' 'location size size line call' 'extra surroundings surroundings availability call'}}

/* One illustrated property image until additional photos are supplied. */
.photo[hidden]{display:none}
.grid{width:calc(var(--unit)*4 + 24px);height:calc(var(--unit)*3 + 16px);grid-template-columns:repeat(4,var(--unit));grid-template-rows:repeat(3,var(--unit));grid-template-areas:'title title hero hero' 'location size size line' 'call call . availability'}
.hero>span{left:auto;right:10px;bottom:10px;padding:5px 9px;border-radius:3px;background:#fffaf0e8;font-size:12px}
@media(max-aspect-ratio:4/5){.grid{width:calc(var(--unit)*3 + 16px);height:calc(var(--unit)*4 + 24px);grid-template-columns:repeat(3,var(--unit));grid-template-rows:repeat(4,var(--unit));grid-template-areas:'title title title' 'hero hero hero' 'location size line' 'call call availability'}}
@media(min-aspect-ratio:4/5){.grid{width:calc(var(--unit)*5 + 32px);height:calc(var(--unit)*2 + 8px);grid-template-columns:repeat(5,var(--unit));grid-template-rows:repeat(2,var(--unit));grid-template-areas:'title title hero hero hero' 'location size line call availability'}}

.payment{grid-area:payment;background:#eee3d9}
@media(min-aspect-ratio:4/5){.grid{grid-template-areas:'title title hero hero payment' 'location size line call availability'}}
@media(max-aspect-ratio:4/5){.grid{grid-template-areas:'title title title' 'hero hero hero' 'location size line' 'call payment availability'}}

button.tile.payment{border:0;font-family:inherit;color:inherit;text-align:left;cursor:pointer}
button.tile.payment:hover{filter:brightness(.97)}
#payment-dialog{width:min(540px,94vw,94dvh);max-height:96dvh;padding:0;overflow:auto;color:#383940;background:#f8f3f6}
#payment-dialog .close{color:#554b5c;z-index:1}
.payment-card{aspect-ratio:1;padding:clamp(22px,5vw,38px);display:flex;flex-direction:column;justify-content:space-between;gap:14px;text-align:left}
.payment-card h2{font-size:clamp(21px,5vw,32px);line-height:1.3;margin:8px 0 3px;font-weight:600}
.payment-card small,.payment-card>div>span{font-size:clamp(11px,2.8vw,14px)}
.payment-card .payee strong{display:block;font-size:clamp(19px,4.5vw,26px);margin-top:3px}
.payment-method{padding:clamp(12px,3vw,20px);background:#dfeae8}
.payment-method.bank{background:#dfe7f3}
.payment-method strong{display:block;font-size:clamp(25px,6vw,37px);line-height:1.3;font-weight:600;letter-spacing:.02em;margin-top:3px}
@media(max-height:500px){.payment-card{padding:22px;gap:8px}.payment-card h2{font-size:21px}.payment-card small,.payment-card>div>span{font-size:11px}.payment-card .payee strong{font-size:19px}.payment-method{padding:10px}.payment-method strong{font-size:25px}}
.payment-card{gap:10px}

.payment-method{position:relative;padding-right:85px}
.payment-logo{position:absolute;right:14px;top:14px;display:block;overflow:hidden}
.promptpay-logo{width:78px;height:30px}
.bank-logo{width:42px;height:42px}
.payment-method.promptpay{padding-right:100px}
.payment-method strong{white-space:nowrap;font-size:clamp(21px,5.3vw,32px)}
.payment-method>span{display:block;font-size:12px}
@media(max-width:450px){.payment-logo{right:10px;top:10px}.promptpay-logo{width:61px;height:24px}.bank-logo{width:32px;height:32px}.payment-method,.payment-method.promptpay{padding-right:76px}.payment-method>span{font-size:10px}.payment-method strong{font-size:22px}}

/* Fill the viewport; size type from the shorter grid dimension. */
body{padding:10px}
.grid{width:100%;height:100%;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
.tile{overflow:hidden;min-width:0;min-height:0}
button.tile.payment{display:flex;align-items:stretch;justify-content:space-between;padding:calc(var(--unit)*.08)}
.tile.payment p{font-size:calc(var(--unit)*.115);line-height:1.3;overflow-wrap:anywhere;width:100%}
.tile.payment .status-english{font-size:.58em;line-height:1.35;margin-top:8px}
@media(max-aspect-ratio:4/5){.grid{width:100%;height:100%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}}
body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.grid{min-height:0;min-width:0}
/* Preserve square units rather than stretching to fill the viewport. */
.grid{width:calc(var(--unit)*5 + 32px);height:calc(var(--unit)*2 + 8px);grid-template-columns:repeat(5,var(--unit));grid-template-rows:repeat(2,var(--unit));align-self:center;justify-self:center}
@media(max-aspect-ratio:4/5){.grid{width:calc(var(--unit)*3 + 16px);height:calc(var(--unit)*4 + 24px);grid-template-columns:repeat(3,var(--unit));grid-template-rows:repeat(4,var(--unit))}}

.tile.payment p{overflow-wrap:normal;word-break:normal}
.payment-word{display:inline-block;white-space:nowrap}
/* Larger logos with a dedicated column beside the transfer details. */
.payment-method,.payment-method.promptpay{display:grid;grid-template-columns:minmax(0,1fr) 110px;column-gap:12px;align-items:center;padding:14px 18px}
.payment-logo{position:static;grid-column:2;grid-row:1 / span 2;justify-self:end}
.promptpay-logo{width:110px;height:42px}
.bank-logo{width:62px;height:62px}
.payment-method>span,.payment-method>strong{grid-column:1}
.payment-method>span{grid-row:1}
.payment-method>strong{grid-row:2;font-size:clamp(21px,4.8vw,30px)}
@media(max-width:450px){.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr) 82px;padding:12px;column-gap:8px}.promptpay-logo{width:82px;height:31px}.bank-logo{width:50px;height:50px}.payment-method strong{font-size:21px}}

dialog .close,dialog .close:hover,dialog .close:focus,dialog .close:focus-visible{outline:none;box-shadow:none;background:transparent;border:0;opacity:1;filter:none}

/* Crisp vector logos, each on a full-width row above the account number. */
#payment-dialog{width:min(600px,94vw,94dvh)}
.payment-card{padding:clamp(18px,4vw,32px);gap:10px}
.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr);padding:12px 18px;gap:2px}
#payment-dialog .payment-logo{grid-column:1;grid-row:1;justify-self:start;margin:0;object-fit:contain;object-position:left center;max-height:none}
#payment-dialog .promptpay-logo{width:150px;height:62px}
#payment-dialog .bank-logo{width:210px;height:49px}
.payment-method>span{grid-column:1;grid-row:2;font-size:12px}
.payment-method>strong{grid-column:1;grid-row:3;font-size:30px;margin:0}
@media(max-width:450px),(max-height:550px){.payment-card{gap:6px;padding:18px}.payment-card h2{font-size:21px;margin:4px 0 2px}.payment-card .payee strong{font-size:18px}.payment-card small,.payment-card>div>span{font-size:10px}.payment-method,.payment-method.promptpay{padding:8px 12px}#payment-dialog .promptpay-logo{width:112px;height:42px}#payment-dialog .bank-logo{width:165px;height:38px}.payment-method>span{font-size:10px}.payment-method>strong{font-size:23px}}
/* Logos beside the account details, retaining the vector artwork. */
.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr) 165px;column-gap:14px;align-items:center;padding:16px 18px}
#payment-dialog .payment-logo{grid-column:2;grid-row:1 / span 2;justify-self:end;object-position:right center}
#payment-dialog .promptpay-logo{width:140px;height:76px}
#payment-dialog .bank-logo{width:165px;height:50px}
.payment-method>span{grid-column:1;grid-row:1}
.payment-method>strong{grid-column:1;grid-row:2}
@media(max-width:450px),(max-height:550px){.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr) 100px;column-gap:8px;padding:12px}#payment-dialog .promptpay-logo{width:100px;height:55px}#payment-dialog .bank-logo{width:100px;height:32px}.payment-method>strong{font-size:21px}}

#payment-dialog .promptpay-logo{width:140px;height:54px}
#payment-dialog .bank-logo{width:76px;height:76px}
@media(max-width:450px),(max-height:550px){#payment-dialog .promptpay-logo{width:100px;height:38px}#payment-dialog .bank-logo{width:55px;height:55px}}

/* Supplied clear logos in matching square frames, with no distortion. */
#payment-dialog .payment-logo{width:100px;height:100px;aspect-ratio:1;object-fit:contain;object-position:center;background:white}
.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr) 100px}
@media(max-width:450px),(max-height:550px){#payment-dialog .payment-logo{width:72px;height:72px}.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr) 72px}}
/* Four edge-to-edge pastel sections in the payment lightbox. */
.payment-card{padding:0;gap:0;display:grid;grid-template-rows:repeat(4,minmax(0,1fr));aspect-ratio:1}
.payment-card>div{margin:0;min-height:0;padding:16px 28px}
.payment-card>div:first-child,.payment-card>.payee{display:flex;flex-direction:column;justify-content:center}
.payment-card h2{margin:4px 0}
.payment-method,.payment-method.promptpay{gap:2px 14px;padding:16px 28px}
#payment-dialog .payment-logo{width:88px;height:88px}
@media(max-width:450px),(max-height:550px){.payment-card{padding:0;gap:0}.payment-card>div,.payment-method,.payment-method.promptpay{padding:10px 16px}.payment-card h2{font-size:20px}.payment-card .payee strong{font-size:18px}#payment-dialog .payment-logo{width:64px;height:64px}.payment-method,.payment-method.promptpay{grid-template-columns:minmax(0,1fr) 64px;column-gap:8px}.payment-method>strong{font-size:20px}}
/* Fill the square with four equal-height payment sections. */
#payment-dialog{height:min(600px,94vw,94dvh);max-height:94dvh;overflow:hidden}
#payment-dialog .payment-card{width:100%;height:100%;aspect-ratio:auto;grid-template-rows:repeat(4,minmax(0,1fr))}
#payment-dialog .payment-card>div{width:100%;height:100%;box-sizing:border-box}
#payment-dialog .payment-method>span{font-size:16px;font-weight:600;line-height:1.35;color:#24364b}
#payment-dialog .payment-method>strong{font-size:32px;font-weight:700;color:#202d40}
@media(max-width:450px),(max-height:550px){#payment-dialog .payment-method>span{font-size:12px;line-height:1.25}#payment-dialog .payment-method>strong{font-size:21px}}
/* Explicit full-width grid column prevents a content-width strip. */
#payment-dialog .payment-card{grid-template-columns:minmax(0,1fr);justify-content:stretch;align-content:stretch;justify-items:stretch;gap:0;padding:0}
#payment-dialog .payment-card>div{grid-column:1;min-width:0;margin:0}

/* Three property illustrations; photo spans remain horizontal. */
.grid{width:calc(var(--unit)*4 + 24px);height:calc(var(--unit)*3 + 16px);grid-template-columns:repeat(4,var(--unit));grid-template-rows:repeat(3,var(--unit));grid-template-areas:'title title hero hero' 'location size line call' 'extra surroundings payment availability'}
.photo>span{left:auto;right:8px;bottom:8px;padding:4px 7px;background:#fffaf0e8;font-size:11px}
.photo small{font-size:10px;margin-top:1px}
@media(max-aspect-ratio:4/5){.grid{width:calc(var(--unit)*3 + 16px);height:calc(var(--unit)*5 + 32px);grid-template-columns:repeat(3,var(--unit));grid-template-rows:repeat(5,var(--unit));grid-template-areas:'title title title' 'hero hero hero' 'location size line' 'call extra surroundings' 'call payment availability'}}

/* Priority: title, front, address, details, LINE, phone, payment, inside, restroom, availability. */
.grid{grid-template-areas:'title title hero hero' 'location size line call' 'payment extra surroundings availability'}
@media(max-aspect-ratio:4/5){.grid{grid-template-areas:'title title title' 'hero hero hero' 'location size line' 'call payment extra' 'call surroundings availability'}}
