/* STAY ARI · compare.css — compare toggle, bottom tray, compare view, direct-vs-booking-site savings, "why book direct" strip.
   Uses the site tokens from base.css (--gold, --line, --panel, --ease, ...). */

/* ---------- toggle on every apartment card ---------- */
.cmpb { position: relative; z-index: 6; display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 5px 14px 5px 7px; border-radius: var(--pill); cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line-soft);   /* no backdrop blur: ~28 blurred pills made WebKit's memory climb without end (2026-11-16) */
  transition: background-color .4s var(--ease), border-color .4s var(--ease), opacity .4s var(--ease), color .3s; }
.cmpb:hover { border-color: var(--gold); }
.cmpb:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.cmpb-box { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; color: transparent; transition: background-color .4s var(--ease), color .3s, border-color .3s; }
.cmpb-box svg { width: 12px; height: 12px; }
.cmpb-t { font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1; }
.cmpb.is-on { background: rgba(255, 81, 0, 0.94); border-color: var(--gold); color: var(--ink); }
.cmpb.is-on .cmpb-box { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.cmpb.is-full { opacity: .5; }
@media (pointer: coarse) { .cmpb { min-height: 40px; } }

/* ---------- bottom tray (stacks above the signup bar) ---------- */
.cmpt { position: fixed; left: 50%; bottom: calc(var(--bar-offset, 0px) + 14px); z-index: 85; width: min(840px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px;
  border-radius: 18px; background: rgba(24, 31, 23, .96); border: 1px solid var(--line); box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translate(-50%, 26px); opacity: 0; pointer-events: none; transition: transform .7s var(--ease), opacity .5s var(--ease), bottom .8s var(--ease); }
.cmpt[hidden] { display: none; }
.cmpt.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cmpt-list { flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cmpt-item { flex: 1 1 0; max-width: 260px; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 4px 4px 4px; border-radius: 12px; background: rgba(65, 59, 50, 0.05); border: 1px solid var(--line-soft); animation: cmptIn .5s var(--ease) both; }
@keyframes cmptIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.cmpt-th { position: relative; flex: none; width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: #ece4da; }
.cmpt-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmpt-th .ph { position: absolute; inset: 0; min-height: 0; gap: 0; }
.cmpt-th .ph-text { display: none; } .cmpt-th .ph-mark { width: 22px; height: 22px; font-size: 8px; } .cmpt-th .ph::after { display: none; }
.cmpt-nm { flex: 1; min-width: 0; font-size: 12px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.cmpt-x { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: color .3s, background-color .3s; }
.cmpt-x:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.cmpt-x svg { width: 14px; height: 14px; }
.cmpt-hint { flex: none; font-size: 12px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.cmpt-hint:empty { display: none; }
.cmpt-clear { flex: none; height: 36px; padding: 0 10px; border-radius: var(--pill); font-size: 12.5px; color: var(--muted); transition: color .3s; }
.cmpt-clear:hover { color: var(--ink); }
.cmpt-go { flex: none; }
.cmpt-go:disabled { opacity: .45; pointer-events: none; }
.cmpt button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body.cmpt-on .site-footer { padding-bottom: calc(28px + var(--bar-offset, 0px) + 84px); }
@media (max-width: 640px) {
  .cmpt { width: calc(100vw - 16px); gap: 6px; padding: 8px 8px 8px 8px; }
  .cmpt-list { gap: 10px; padding-top: 4px; }
  .cmpt-item { position: relative; flex: 0 0 auto; padding: 0; border: 0; background: none; }
  .cmpt-nm, .cmpt-hint { display: none; }
  .cmpt-th { width: 44px; height: 44px; }
  .cmpt-x { position: absolute; right: -8px; top: -8px; width: 24px; height: 24px; background: #2b352a; border: 1px solid var(--line); color: #fff; }
  .cmpt-x svg { width: 11px; height: 11px; }
  .cmpt-x::before { content: ''; position: absolute; inset: -9px; }
  .cmpt-clear { margin-left: auto; }
}
@media (max-width: 380px) {
  .cmpt { flex-wrap: wrap; }
  .cmpt-list { flex: 1 1 100%; }
  .cmpt-clear { margin-left: 0; }
  .cmpt-go { margin-left: auto; }
}

.cmpt-toast { position: fixed; left: 50%; bottom: calc(var(--bar-offset, 0px) + 98px); z-index: 90; max-width: calc(100vw - 32px); padding: 11px 20px; border-radius: var(--pill); font-size: 13.5px; text-align: center;
  background: rgba(240, 233, 214, .97); color: var(--ink); box-shadow: var(--shadow-2); transform: translate(-50%, 14px); opacity: 0; pointer-events: none; transition: transform .5s var(--ease), opacity .4s var(--ease), bottom .8s var(--ease); }
.cmpt-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- the compare view ---------- */
body.cmpd-open .sa-pop { z-index: 300; }
.cmpd { --lw: 200px; --cmin: 250px; --cw: 100vw; position: fixed; inset: 0; z-index: 250; display: flex; flex-direction: column; color: var(--text);
  background: radial-gradient(90% 60% at 50% -10%, rgba(255, 81, 0, 0.22), transparent 60%), var(--bg);
  opacity: 0; transform: translateY(18px); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.fixture-banner ~ .cmpd { top: 21px; }
.cmpd.show { opacity: 1; transform: none; }
.cmpd.leaving { opacity: 0; transform: translateY(10px); }
.cmpd-top { flex: none; display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter) 12px; border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.96); }
.cmpd-top h2 { flex: 1; margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; }
.cmpd-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); background: rgba(255, 255, 255, 0.60); transition: background-color .4s, transform .5s var(--ease); }
.cmpd-x:hover { background: rgba(255, 81, 0, 0.14); transform: rotate(90deg); }
.cmpd-x svg { width: 18px; height: 18px; }
.cmpd button:focus-visible, .cmpd a:focus-visible, .cmpd input:focus-visible, .cmpd select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.cmpd-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-padding-left: var(--lw); outline: none; padding-bottom: 36px; }

/* date + guests row and the differences switch stay put while the table scrolls sideways */
.cmpd-find, .cmpd-meta { position: sticky; left: 0; width: var(--cw); max-width: 100vw; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px var(--gutter) 0; }
.cmpd-pill { height: 46px; display: inline-flex; align-items: center; gap: 10px; padding: 0 20px; border-radius: var(--pill); background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: 0 6px 18px rgba(65, 45, 25, 0.09); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.cmpd-pill:hover { transform: translateY(-1px); }
.cmpd-pill[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(255, 81, 0, 0.55), 0 6px 18px rgba(65, 45, 25, 0.09); }
.cmpd-pi { width: 18px; height: 18px; color: #4a5646; display: inline-flex; flex: none; } .cmpd-pi svg { width: 100%; height: 100%; }
.cmpd-pv.is-ph { color: rgba(27, 31, 26, .6); font-weight: 400; }
.cmpd-in input, .cmpd-in select { height: 46px; padding: 0 14px; border-radius: var(--pill); border: 0; background: #fff; color: var(--ink); font: 500 14px var(--sans); }
.cmpd-go.is-nudge { box-shadow: 0 0 0 3px rgba(255, 81, 0, 0.60); }
.cmpd-msg { flex: 1 1 100%; margin: 0; min-height: 20px; font-size: 12.5px; letter-spacing: .04em; color: var(--muted); }
.cmpd-msg.warn { color: var(--gold); }
.cmpd-meta { padding-top: 6px; justify-content: flex-end; }
.cmpd-sw { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 4px; font-size: 13px; letter-spacing: .04em; color: var(--text); }
.cmpd-sw-k { position: relative; width: 40px; height: 24px; border-radius: var(--pill); background: rgba(255, 255, 255, .14); border: 1px solid var(--line); transition: background-color .4s var(--ease), border-color .4s; }
.cmpd-sw-k::after { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .45s var(--ease); }
.cmpd-sw[aria-checked="true"] .cmpd-sw-k { background: var(--gold); border-color: var(--gold); }
.cmpd-sw[aria-checked="true"] .cmpd-sw-k::after { transform: translateX(16px); background: var(--ink); }

/* table */
.cmpd-tbl { width: max(var(--cw), calc(var(--lw) + var(--cols, 3) * var(--cmin))); table-layout: fixed; border-collapse: separate; border-spacing: 0; margin-top: 14px; }
.cmpd-tbl th, .cmpd-tbl td { padding: 14px 18px; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.5; border-bottom: 1px solid var(--line-soft); }
.cmpd-tbl thead th { position: sticky; top: 0; z-index: 9; padding: 10px 14px 10px 18px; vertical-align: middle; background: rgba(24, 31, 23, .97); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); scroll-snap-align: start; }
.cmpd-tbl thead .cmpd-corner { left: 0; z-index: 11; width: var(--lw); scroll-snap-align: none; }
.cmpd-tbl tbody th[scope="row"] { position: sticky; left: 0; z-index: 8; width: var(--lw); background: #1f281e; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); box-shadow: 1px 0 0 var(--line-soft); }
.cmpd-hd { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.cmpd-hb { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.cmpd-hb small { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmpd-hb b { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cmpd-rm { flex: none; position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-soft); transition: color .3s, background-color .3s; }
.cmpd-rm:hover { color: var(--ink); background: rgba(255, 81, 0, .1); }
.cmpd-rm svg { width: 13px; height: 13px; }
.cmpd-rm::before { content: ''; position: absolute; inset: -7px; }
.cmpd-tbl tbody tr:not(.cmpd-gh):hover td { background: rgba(255, 81, 0, 0.04); }
.cmpd-tbl tbody tr:last-child th, .cmpd-tbl tbody tr:last-child td { border-bottom: 0; }
.cmpd-tbl td small { display: block; font-size: 12px; color: var(--muted); }
.cmpd-v { font-weight: 500; }
.cmpd-na { color: rgba(169, 176, 163, .55); }
.cmpd-note { font-size: 13px; line-height: 1.55; color: rgba(65, 59, 50, 0.86); }
.r-photo td { padding-top: 16px; padding-bottom: 16px; }
.cmpd-ph { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #ece4da; border: 1px solid var(--line-soft); }
.cmpd-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmpd-ph .ph { position: absolute; inset: 0; min-height: 0; gap: 6px; }
.cmpd-ph .ph-mark { width: 34px; height: 34px; font-size: 12px; } .cmpd-ph .ph-text { font-size: 8.5px; letter-spacing: .2em; } .cmpd-ph .ph::after { inset: 8px; }
.cmpd .chip--mode { display: inline-block; font-size: 10px; padding: 5px 11px; letter-spacing: .1em; border: 1px solid var(--line-soft); border-radius: var(--pill); }
.cmpd .chip--mode.is-instant { color: #cfe3cf; border-color: rgba(255, 81, 0, .6); }
.cmpd .chip--mode.is-long { color: var(--gold); border-color: var(--line); }
.cmpd .chip--mode.is-req { color: #e6d6b0; border-color: rgba(230, 214, 176, .35); }
.r-text .cmpd-note { display: block; }
.cmpd-io span + span { margin-left: 12px; }
.cmpd-yes { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255, 81, 0, 0.16); border: 1px solid var(--line); color: var(--gold); }
.cmpd-yes svg { width: 13px; height: 13px; }
.cmpd-tbl .cmpd-gh th { padding: 22px 0 8px; border-bottom: 1px solid var(--line); background: transparent; font-weight: 500; }
.cmpd-gh th span { position: sticky; left: 18px; display: inline-block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text); }
.cmpd-nr td { font-size: 13px; color: var(--muted); }
.cmpd-one, .cmpd-foot, .cmpd-empty { position: sticky; left: 0; width: var(--cw); max-width: 100vw; margin: 0; padding: 14px var(--gutter) 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.cmpd-one { color: var(--gold); font-size: 14px; }
.cmpd-foot { padding-top: 20px; }

/* price cell */
.cmpd-pr { display: grid; gap: 4px; justify-items: start; }
.cmpd-pr b { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; }
.cmpd-pr small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.cmpd-pr.is-monthly b, .cmpd-pr.is-request b, .cmpd-pr.is-check b { color: var(--gold); }
.cmpd-pr.is-unavailable b, .cmpd-pr.is-busy b, .cmpd-pr.is-none b, .cmpd-pr.is-minstay b { font-size: 1.05rem; color: rgba(65, 59, 50, 0.78); }
.cmpd-live { margin-top: 8px; }
.cmpd-best { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: var(--gold); padding: 2px 9px; border-radius: var(--pill); }
.cmpd-sk { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(65, 59, 50, 0.05), rgba(255, 255, 255, .14), rgba(65, 59, 50, 0.05)); background-size: 200% 100%; animation: cmpdSk 1.4s linear infinite; }
.cmpd-sk.a { width: 55%; height: 22px; } .cmpd-sk.b { width: 90%; }
@keyframes cmpdSk { to { background-position: -200% 0; } }

/* ---------- direct vs booking-site savings (also used inside the apartment cards) ---------- */
.sav-top { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.sav-top .sav-eb { margin-top: 6px; }
/* platform list prices: price on top, platform name underneath (Cameron 2026-10-18) */
.ota-grid { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-bottom: 10px; }
.ota-p { flex: 1 1 0; min-width: 88px; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(65, 59, 50, 0.03); }
.ota-v { font-size: 14px; font-weight: 500; color: rgba(65, 59, 50, 0.72); font-variant-numeric: tabular-nums; }
.ota-n { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ota-grid + .sav-eb { display: block; margin-top: 0; }
a.ota-p { text-decoration: none; color: inherit; transition: border-color .2s ease, background-color .2s ease; position: relative; z-index: 4; }
a.ota-p:hover, a.ota-p:focus-visible { border-color: var(--gold); background: rgba(201, 169, 106, .08); }
a.ota-p:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ota-p.is-noprice .ota-v { font-size: 12.5px; color: var(--gold); }
.ota-x { vertical-align: -1px; opacity: .8; }
.ota-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ota-row-l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.ota-chip { position: relative; z-index: 4; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-soft); font-size: 12px; color: var(--text); text-decoration: none; }
.ota-chip:hover, .ota-chip:focus-visible { border-color: var(--gold); }
.sav-eb { font-size: 9.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--sage-2); }
.sav-was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.sav-was-l { display: block; font-size: 12.5px; color: var(--muted); }
.sav-was-n { display: block; font-size: 11px; color: var(--muted); opacity: .8; }
.sav-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sav-badge { display: inline-block; padding: 3px 11px; border-radius: var(--pill); font-size: 12px; font-weight: 600; letter-spacing: .03em; color: #d9efd9; background: rgba(255, 81, 0, 0.38); border: 1px solid rgba(255, 81, 0, .65); }
.sav-i { position: relative; z-index: 4; width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--gold); font: italic 600 13px/1 var(--serif); transition: background-color .3s, color .3s; }
.sav-i::before { content: ''; position: absolute; inset: -10px; }
.sav-i:hover, .sav-i[aria-expanded="true"] { background: rgba(255, 81, 0, 0.20); color: var(--ink); }
.sav-i:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sav-pop { display: block; max-width: 36ch; padding: 9px 12px; border-radius: 10px; font-size: 12px; line-height: 1.55; color: var(--text); background: rgba(0, 0, 0, .3); border: 1px solid var(--line-soft); animation: savIn .35s var(--ease) both; }
.sav-pop[hidden] { display: none; }
@keyframes savIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .cmpd { --lw: 104px; --cmin: max(168px, calc(var(--cw) - 104px - 30px)); }
  .cmpd-tbl th, .cmpd-tbl td { padding: 12px 12px; font-size: 13.5px; }
  .cmpd-tbl thead th { padding: 8px 8px 8px 12px; }
  .cmpd-tbl tbody th[scope="row"] { font-size: 9.5px; letter-spacing: .12em; padding-left: 12px; padding-right: 8px; }
  .cmpd-hb b { font-size: .95rem; }
  .cmpd-gh th span { left: 12px; }
  .cmpd-find { gap: 8px; padding-top: 12px; }
  .cmpd-pill { flex: 1 1 0; min-width: 0; padding: 0 14px; font-size: 13.5px; }
  .cmpd-pv { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cmpd-go { flex: 1 1 100%; min-height: 44px; }
  .cmpd-meta { justify-content: space-between; }
  .cmpd-pr b { font-size: 1.3rem; }
  .cmpd-sw-t { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .cmpb, .cmpt, .cmpt-item, .cmpt-toast, .cmpd, .cmpd-x, .cmpd-pill, .cmpd-sw-k, .cmpd-sw-k::after, .sav-pop, .sav-i { transition-duration: .01s !important; animation-duration: .01s !important; }
  .cmpd-sk { animation: none; }
}
/* bright theme: compare tray + table surfaces */
.cmpd-tbl thead th { background: rgba(255, 255, 255, .97); }
.cmpd-tbl tbody th[scope="row"] { background: #faf9f7; }
.cmpt { background: rgba(255, 255, 255, .97); color: var(--text); }
.cmpt-x { background: var(--text); color: #fff; }

/* ---------- Showtime 2026-10-19 ---------- */
/* Booking-site prices as plain text, name then price ("Airbnb ¥117,776"): no boxes, no icons, no links. */
.ota-grid { display: grid; grid-template-columns: max-content max-content; justify-content: start; align-items: baseline; column-gap: 14px; row-gap: 3px; width: 100%; margin-bottom: 10px; }
.ota-p { display: contents; text-align: left; }
.ota-n { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); text-align: left; }
.ota-v { font-size: 13px; font-weight: 500; color: rgba(65, 59, 50, 0.82); font-variant-numeric: tabular-nums; text-align: left; }

/* Compare dialog chips on white. */
.cmpd .chip { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.cmpd .chip--mode.is-instant, .cmpd .chip--mode.is-closed, .cmpd .chip--mode.is-req, .cmpd .chip--mode.is-long { color: var(--ink); border-color: var(--line); }

/* Compare dialog icons and tray remove button (sage / white-on-white leftovers). */
.cmpd-pi { color: var(--gold-deep); }
.cmpd-na { color: rgba(65, 59, 50, .45); }
.cmpt-x:hover { color: #fff; background: var(--ink); }
