/* PhuketVillaHub demo — live product panel under the hero (views-stage.js) and the big home area tiles.
   kibu: icon tabs with an underline over one working app surface, no browser chrome.
   stan: big photo cards with the price sitting on the photo. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage-tabs { display: flex; justify-content: center; gap: 6px; width: max-content; max-width: 100%; margin: 0 auto; padding: 0 10px; border-radius: 16px; background: rgba(255, 255, 255, .78); border: 1px solid var(--sand-line); backdrop-filter: blur(10px); overflow-x: auto; scrollbar-width: none; }
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 14px 12px 12px; border-bottom: 2px solid transparent; font-size: 14.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .15s ease, border-color .15s ease; }
.stage-tabs button:hover { color: var(--ink); }
.stage-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--sea); }
.stage-tabs button[aria-selected="true"] .icon { color: var(--sea); }
.stage-tabs .icon { width: 17px; height: 17px; }
.stage-panel { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 40px 80px -36px rgba(120, 60, 30, .3); }

/* ---------- search ---------- */
.st-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.seg button { height: 34px; padding: 0 13px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background-color .15s ease, color .15s ease; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--sea); font-weight: 600; box-shadow: var(--shadow-sm); }
.st-select { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); border-radius: 12px; transition: border-color .15s ease; }
.st-select:focus-within, .st-select:hover { border-color: var(--ink); }
.st-select .icon { width: 16px; height: 16px; color: var(--sea); }
.st-select select { height: 100%; border: 0; background: transparent; font-size: 14px; font-weight: 500; cursor: pointer; }
.st-select select:focus { outline: none; }
.st-toggle { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 14px; font-weight: 500; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.st-toggle .icon { width: 16px; height: 16px; }
.st-toggle:hover { border-color: var(--ink); }
.st-toggle[aria-pressed="true"] { background: var(--sea-soft); border-color: var(--sea); color: var(--sea-deep); }
.st-count { margin-left: auto; font: 400 12.5px/1 var(--f-mono); color: var(--muted); }
.st-count b { color: var(--ink); font-weight: 500; }

.st-search { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; padding: 18px; }
.st-feature { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.st-photo { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.st-photo > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.st-photo:hover > img { transform: scale(1.03); }
.st-badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.st-badges .tag { background: rgba(255, 255, 255, .92); border-color: transparent; backdrop-filter: blur(6px); }
.st-thumbs { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.st-thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4); }
.st-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 18px 20px 20px; }
.st-info-main { display: grid; gap: 10px; align-content: start; min-width: 0; }
.st-title { font: 500 30px/1.08 var(--f-display); letter-spacing: -.035em; }
.st-info-side { display: grid; gap: 12px; justify-items: end; align-content: start; }
.st-price { text-align: right; }
.st-price b { display: block; font: 500 34px/1 var(--f-display); letter-spacing: -.04em; }
.st-price span { font-size: 13px; color: var(--muted); }
.st-tiers { display: flex; gap: 4px; flex-wrap: wrap; }
.st-tiers div { min-width: 64px; padding: 6px 8px; border-radius: 10px; background: var(--bg-soft); text-align: center; }
.st-tiers small { display: block; font: 400 11px/1.3 var(--f-mono); color: var(--muted); }
.st-tiers b { font-size: 13px; font-weight: 600; }
.st-tiers .on { background: var(--sea); color: #fff; }
.st-tiers .on small { color: rgba(255, 255, 255, .8); }
.st-acts { display: flex; gap: 8px; flex-wrap: wrap; }

.st-side { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(200px, 1fr); gap: 12px; }
.st-card { position: relative; display: block; overflow: hidden; border-radius: 16px; text-align: left; isolation: isolate; background: var(--bg-soft); }
.st-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.st-card::after { content: ""; position: absolute; inset: 40% 0 0; z-index: -1; background: linear-gradient(180deg, transparent, rgba(8, 20, 24, .72)); }
.st-card:hover img { transform: scale(1.05); }
.st-card-price { position: absolute; left: 10px; top: 10px; padding: 6px 10px; border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-sm); }
.st-card-price small { margin-left: 3px; font-weight: 400; color: var(--muted); }
.st-card-text { position: absolute; left: 14px; right: 14px; bottom: 12px; display: grid; gap: 2px; color: #fff; }
.st-card-text b { font: 500 18px/1.15 var(--f-display); letter-spacing: -.02em; }
.st-card-text small { font-size: 12.5px; opacity: .88; }
.st-more { display: flex; justify-content: space-between; align-items: center; height: 54px; padding: 0 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 500; transition: background-color .15s ease; }
.st-more:hover { background: #262626; }
.st-more .icon { width: 18px; height: 18px; }
.st-empty { display: grid; justify-items: center; gap: 10px; padding: 96px 20px; text-align: center; }
.st-empty > .icon { width: 30px; height: 30px; color: var(--sea); }
.st-empty b { font: 500 22px/1.2 var(--f-display); letter-spacing: -.02em; }

/* ---------- AI finder ---------- */
.st-finder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); min-height: 620px; }
.st-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-right: 1px solid var(--line); min-width: 0; }
.st-chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.st-chat-head .link { margin-left: auto; white-space: nowrap; }
.st-chat-body { display: grid; align-content: start; gap: 14px; padding: 20px; overflow-y: auto; max-height: 540px; }
.st-suggest { display: grid; gap: 8px; }
.st-suggest button { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 14px; text-align: left; color: var(--ink-2); transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.st-suggest button:hover { border-color: var(--sea); color: var(--ink); transform: translateX(2px); }
.st-suggest .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--sea); }
.st-answer { display: grid; gap: 12px; max-width: 100%; }
.st-answer .btn { justify-self: start; }
.st-results { display: grid; align-content: start; gap: 14px; padding: 20px; background: var(--bg-soft); }
.st-mhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.st-mhead b { font: 500 21px/1.2 var(--f-display); letter-spacing: -.02em; }
.st-mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; transition: opacity .2s ease; }
.st-mgrid.loading { opacity: .45; }
.st-match { display: grid; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: box-shadow .2s ease, transform .2s ease; }
.st-match:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.st-match-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.st-match-img img { width: 100%; height: 100%; object-fit: cover; }
.st-flag { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 12.5px; font-weight: 600; }
.st-flag .icon { width: 14px; height: 14px; flex: none; }
.st-flag.ok { color: var(--ok); }
.st-flag.warn { color: var(--orange-ink); }
.st-flag.plain { color: var(--ink-2); }
.st-match-body { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px 14px; }
.st-match-body b { display: block; font: 500 17px/1.2 var(--f-display); letter-spacing: -.02em; }
.st-match-body small { display: block; font-size: 12.5px; color: var(--muted); }
.st-match-price { text-align: right; font-weight: 600; white-space: nowrap; }

/* ---------- agent inbox ---------- */
.st-inbox { display: grid; grid-template-columns: 220px 330px minmax(0, 1fr); min-height: 620px; }
.st-nav { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--bg-soft); border-right: 1px solid var(--line); }
.st-org { display: flex; gap: 10px; align-items: center; padding: 2px 6px 16px; }
.st-org .avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--sea); color: #fff; font-size: 13px; }
.st-org b { display: block; font-size: 14px; line-height: 1.2; }
.st-org small { font-size: 12px; color: var(--muted); }
.st-nav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 10px; font-size: 14px; color: var(--ink-2); transition: background-color .15s ease, color .15s ease; }
.st-nav a:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.st-nav a .icon { width: 18px; height: 18px; }
.st-nav a em { margin-left: auto; font: 400 12px/1 var(--f-mono); font-style: normal; color: var(--muted); }
.st-nav a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.st-nav a.on .icon, .st-nav a.on em { color: var(--sea); }
.st-quota { margin-top: auto; display: grid; gap: 10px; padding: 14px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.st-quota .bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.st-quota .bar i { display: block; height: 100%; border-radius: 6px; background: var(--coral); }
.st-list { display: grid; align-content: start; border-right: 1px solid var(--line); overflow-y: auto; max-height: 620px; }
.st-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; transition: background-color .15s ease; }
.st-row:hover { background: var(--bg-soft); }
.st-row.on { background: var(--sea-soft); box-shadow: inset 3px 0 0 var(--sea); }
.st-row .avatar { width: 38px; height: 38px; font-size: 13px; }
.st-row-text { display: grid; gap: 2px; min-width: 0; }
.st-row-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.st-row-text small.muted { color: var(--muted); }
.st-row-top { display: flex; justify-content: space-between; gap: 8px; }
.st-row-top small { font: 400 11.5px/1.6 var(--f-mono); color: var(--muted); }
.st-row .tag { font-size: 12px; }
.st-row.locked { cursor: default; }
.st-row.locked:hover { background: none; }
.st-row.locked .avatar { background: var(--bg-soft); color: var(--muted); }
.st-row.locked .avatar .icon { width: 16px; height: 16px; }
.st-row.locked .st-row-text { opacity: .6; }
.st-detail { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.st-detail-img { position: relative; height: 240px; overflow: hidden; isolation: isolate; }
.st-detail-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.st-detail-img::after { content: ""; position: absolute; inset: 35% 0 0; z-index: -1; background: linear-gradient(180deg, transparent, rgba(8, 20, 24, .7)); }
.st-detail-cap { position: absolute; left: 22px; right: 22px; bottom: 16px; display: grid; gap: 2px; color: #fff; }
.st-detail-cap b { font: 500 24px/1.1 var(--f-display); letter-spacing: -.03em; }
.st-detail-cap small { font-size: 13px; opacity: .9; }
.st-detail-body { display: grid; align-content: start; gap: 16px; padding: 20px 22px 24px; }
.st-who { display: flex; gap: 12px; align-items: center; }
.st-who b { display: block; font-size: 16px; }
.st-who small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.st-who .ch { display: inline-flex; color: var(--wa); }
.st-who .ch .icon { width: 15px; height: 15px; }
.avatar.lg { width: 48px; height: 48px; font-size: 15px; }
.st-msg { padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: var(--bg-soft); color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.st-fit { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.st-fit .icon { width: 18px; height: 18px; flex: none; }
.st-fit.ok { background: var(--ok-soft); color: #0d6b47; }
.st-fit.warn { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 1080px) {
  .st-search { grid-template-columns: 1fr; }
  .st-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; }
  .st-finder { grid-template-columns: 1fr; }
  .st-chat { border-right: 0; border-bottom: 1px solid var(--line); }
  .st-inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .st-nav { display: none; }
}
@media (max-width: 760px) {
  .stage-tabs { justify-content: flex-start; gap: 0; padding: 0 4px; }
  .stage-tabs button { gap: 5px; padding: 12px 5px 10px; font-size: 13.5px; }
  .stage-tabs .icon { width: 15px; height: 15px; }
  .stage-panel { border-radius: 20px; }
  .st-bar { padding: 12px; }
  .st-count { margin-left: 0; width: 100%; }
  .st-search { padding: 12px; gap: 12px; }
  .st-info { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .st-info-side { justify-items: start; }
  .st-price { text-align: left; }
  .st-title { font-size: 25px; }
  .st-thumbs img { width: 56px; height: 42px; }
  .st-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 210px; }
  .st-card-text { left: 12px; right: 12px; }
  .st-card-text b { font-size: 15.5px; }
  .st-card-text small { font-size: 12px; }
  .demo-pill { top: 12px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); font-size: 11px; padding: 5px 10px; }
  .st-mgrid { grid-template-columns: 1fr; }
  .st-chat-body { max-height: none; padding: 16px; }
  .st-results { padding: 16px; }
  .st-inbox { grid-template-columns: 1fr; }
  .st-list { border-right: 0; border-top: 1px solid var(--line); max-height: none; }
  .st-detail { order: -1; }
  .st-row.locked { display: none; }
  .st-detail-img { height: 200px; }
  .st-detail-body { padding: 16px; }
}

/* ---------- home area tiles: one tall lead photo, four around it ---------- */
.areas.big { grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; }
.areas.big .area:first-child { grid-row: span 2; grid-template-rows: minmax(0, 1fr) auto; }
.areas.big .area:first-child img { height: 100%; aspect-ratio: auto; min-height: 420px; }
.areas.big .area:not(:first-child) img { aspect-ratio: 4 / 3; }
.areas.big .area:first-child strong { font-size: 32px; }
@media (max-width: 1000px) {
  .areas.big { grid-template-columns: 1fr 1fr; }
  .areas.big .area:first-child { grid-row: auto; grid-column: span 2; }
  .areas.big .area:first-child img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .areas.big { grid-template-columns: 1fr; }
  .areas.big .area:first-child { grid-column: auto; }
}
