:root{--navy:#071a3d;--navy2:#0b2a5b;--blue:#0b5cc0;--blue2:#1e88e5;--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;--bg:#f1f5fb;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 var(--font);-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
.top{position:sticky;top:0;z-index:20;background:var(--navy);color:#fff}
.top-in{max-width:1640px;margin:auto;height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 24px}
.brand b{font-size:20px;font-weight:900;letter-spacing:.04em}
.brand span{margin-left:12px;color:#9fb6dd;font-size:13px}
.btn{border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);color:#fff;border-radius:10px;padding:8px 14px;font-weight:700}
.btn[aria-pressed=true]{background:#fff;color:var(--navy)}
.layout{max-width:1640px;margin:auto;padding:20px 24px;display:grid;grid-template-columns:minmax(0,1fr) var(--w,540px);gap:24px;align-items:start}
.left{min-width:0}
.tip{font-size:13px;color:var(--navy2);background:#e8f1ff;border:1px solid #bfdbfe;border-radius:12px;padding:10px 12px;margin-bottom:12px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px}
.search input{width:100%;border:1.5px solid var(--line);border-radius:10px;padding:10px 12px;outline:0}
.search input:focus{border-color:var(--blue)}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.chips button{border:1.5px solid var(--line);background:#f8fafc;border-radius:999px;padding:5px 12px;font-size:13px;font-weight:700;color:var(--navy2)}
.chips button[aria-pressed=true]{background:var(--navy2);border-color:var(--navy2);color:#fff}
.row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
select,.settings input{width:100%;border:1.5px solid var(--line);border-radius:10px;padding:8px 10px;background:#fff}
.count{margin:8px 0 0;font-size:13px;color:var(--muted)}
.list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;margin-bottom:12px}
.item{display:flex;gap:10px;align-items:center;text-align:left;background:#fff;border:1.5px solid var(--line);border-radius:12px;padding:8px;min-width:0}
.item[aria-current=true]{border-color:var(--blue);box-shadow:0 0 0 3px rgba(11,92,192,.15)}
.item .th{width:76px;height:54px;flex:0 0 76px;border-radius:8px;background:#e2e8f0 center/cover no-repeat}
.item div{min-width:0}
.item b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item strong{display:block;color:var(--blue);font-size:14px}
.item .tag{font-size:10px;font-weight:800;color:#fff;background:#94a3b8;border-radius:4px;padding:0 5px;margin-left:4px;vertical-align:1px}
.item .tag.ready{background:var(--blue)}
.settings summary{cursor:pointer;font-weight:700;color:var(--navy2)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.grid2 label{font-size:13px;font-weight:600;color:var(--muted);display:grid;gap:4px}
.grid2 .wide{grid-column:1/-1}
.hint{font-size:12px;color:var(--muted);margin:8px 0 0}

/* 9:16 stage, designed at 540x960 and scaled */
.right{position:sticky;top:76px;width:var(--w,540px)}
.frame{width:var(--w,540px);height:calc(var(--w,540px)*16/9);position:relative;overflow:hidden;border-radius:calc(22px*var(--s,1));box-shadow:0 18px 40px -14px rgba(7,26,61,.5)}
.stage{position:absolute;left:0;top:0;width:540px;height:960px;transform:scale(var(--s,1));transform-origin:0 0;display:flex;flex-direction:column;gap:10px;padding:14px;
  background:linear-gradient(180deg,#050f26 0%,#0b2a5b 55%,#0e3570 100%);color:#fff;font-family:var(--font);overflow:hidden}
.st-head{display:flex;align-items:center;justify-content:space-between;padding:2px 4px}
.st-head b{display:block;font-size:26px;font-weight:900;letter-spacing:.04em;line-height:1.1}
.st-live{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;letter-spacing:.12em;color:#9fc2ff}
.st-live i{width:8px;height:8px;border-radius:50%;background:#ff3b5c;box-shadow:0 0 0 4px rgba(255,59,92,.25)}
.st-status{font-size:15px;font-weight:900;padding:6px 14px;border-radius:999px;background:#fff;color:var(--navy2)}
.st-status.incoming{background:#fbbf24;color:#3b2500}
.st-photo{position:relative;flex:0 0 280px;border-radius:16px;overflow:hidden;background:#0a1f45}
.st-photo img{width:100%;height:100%;object-fit:cover;display:block}
.st-noimg{position:absolute;inset:0;display:grid;place-items:center;color:#6b84b3;font-weight:800;font-size:20px}
.st-nav{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;border:0;background:rgba(0,0,0,.45);color:#fff;font-size:30px;line-height:1}
.st-nav.prev{left:10px}.st-nav.next{right:10px}
.st-pc,.st-no{position:absolute;bottom:10px;font-size:13px;font-weight:800;background:rgba(0,0,0,.55);padding:3px 10px;border-radius:999px}
.st-pc{right:10px}.st-no{left:10px}
.st-thumbs{flex:0 0 58px;display:flex;gap:6px;overflow:hidden}
.st-thumbs:empty{display:none}
.st-thumbs button{flex:0 0 80px;height:58px;border-radius:8px;border:2px solid transparent;background:#0a1f45 center/cover no-repeat;padding:0;opacity:.7}
.st-thumbs button[aria-current=true]{border-color:#fff;opacity:1}
.st-title{padding:0 4px}
.st-title p{margin:0;font-size:15px;font-weight:800;letter-spacing:.12em;color:#9fc2ff;text-transform:uppercase}
.st-title h2{margin:2px 0 0;font-size:30px;font-weight:900;line-height:1.08;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.st-price{border-radius:16px;padding:10px 18px 12px;background:linear-gradient(135deg,#0b5cc0,#1e88e5);box-shadow:0 10px 24px -10px rgba(0,0,0,.5)}
.st-price>span{font-size:14px;font-weight:700;color:#dbe8ff}
.st-price>div{display:flex;align-items:baseline;gap:8px;line-height:1}
.st-price em{font-style:normal;font-size:26px;font-weight:700;color:#dbe8ff}
.st-price strong{font-size:68px;font-weight:900;letter-spacing:-.02em}
.st-price p{margin:4px 0 0;font-size:16px;font-weight:700;color:#eaf2ff}
.st-price p:empty{display:none}
.st-specs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:1 1 auto;align-content:start}
.st-specs div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);border-radius:12px;padding:8px 10px;min-width:0}
.st-specs span{display:block;font-size:12px;font-weight:700;color:#9fb6dd}
.st-specs b{display:block;font-size:18px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-contact{display:flex;justify-content:space-between;align-items:center;background:#fff;color:var(--navy2);border-radius:12px;padding:10px 16px;font-size:19px}
.st-contact span{font-weight:900;color:var(--blue)}
.st-disc{margin:0;font-size:11px;color:#7d93bd;text-align:center}

.live .top{display:none}
.live .layout{padding-top:12px}
.live .right{top:12px}
.live .tip{display:none}
@media (max-width:900px){
  .layout{display:flex;flex-direction:column;padding:12px}
  .right{position:static;order:-1;align-self:center}
  .row{grid-template-columns:1fr 1fr 1fr}
  .tip{display:none}
}

.count-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px}
.count-row .count{margin:0;flex:1}
.folder,.link{font-size:13px;font-weight:700;color:var(--blue);text-decoration:none;background:none;border:0;padding:0}
.item .tag.promo{background:#e11d48}.item .tag.incoming{background:#d97706}.item .tag.booked{background:#475569}
.st-status.promo{background:#e11d48;color:#fff}.st-status.booked{background:#475569;color:#fff}
.st-feat{display:flex;flex-wrap:wrap;gap:6px;max-height:64px;overflow:hidden}
.st-feat:empty{display:none}
.st-feat span{font-size:13px;font-weight:800;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:3px 10px}
.st-specs{flex:0 0 auto}
.st-photo img{object-fit:contain;background:#0a1f45}
.st-feat{flex:0 0 auto;max-height:30px}
.st-feat span{font-size:12px}

/* v2: loan panel + on-the-road costs */
.loanp h3{margin:0 0 10px;font-size:16px;color:var(--navy2)}
.lp-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px}
.lp-grid label{font-size:13px;font-weight:600;color:var(--muted);display:grid;gap:4px;align-content:start}
.lp-grid input,.lp-grid select{width:100%;border:1.5px solid var(--line);border-radius:10px;padding:8px 10px;background:#fff}
.dp-row{display:flex;gap:6px;align-items:center}
.dp-row input{flex:1}
.dp-row span{font-weight:800;color:var(--navy2)}
.seg{display:flex;background:#eef2f7;border-radius:10px;padding:3px}
.seg button{border:0;background:none;padding:5px 10px;border-radius:8px;font-weight:800;color:var(--muted)}
.seg button[aria-pressed=true]{background:#fff;color:var(--navy2);box-shadow:0 1px 2px rgba(0,0,0,.1)}
.chips.mini{margin:4px 0 0}
.chips.mini button{padding:3px 10px;font-size:12px}
@media (max-width:700px){.lp-grid{grid-template-columns:1fr 1fr}.lp-grid label:first-child{grid-column:1/-1}}
.st-photo{flex:0 0 260px}
.st-price{padding:8px 18px 10px}
.st-price strong{font-size:60px}
.st-costs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.st-costs div{background:#fff;color:var(--navy2);border-radius:10px;padding:6px 8px;min-width:0}
.st-costs span{display:block;font-size:11px;font-weight:800;color:#5b6b85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-costs b{display:block;font-size:17px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-costs small{display:block;font-size:10px;color:#7a879c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-inst{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;color:#0b2a5b;border:3px solid #1e88e5;border-radius:14px;padding:8px 16px}
.st-inst span{display:block;font-size:15px;font-weight:900}
.st-inst small{display:block;font-size:12px;font-weight:700;opacity:.85}
.st-inst strong{font-size:40px;font-weight:900;white-space:nowrap;color:#0b5cc0}
.st-up{margin:-4px 0 0;font-size:12px;font-weight:700;color:#cfe0ff;text-align:center}
.st-up:empty{display:none}
.st-specs b{font-size:16px}
.st-specs div{padding:6px 10px}
.st-specs{grid-template-columns:repeat(4,minmax(0,1fr))}
.st-costs{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.st-costs div{padding:6px 7px}
.st-costs b{font-size:15px}
.lp-grid{grid-template-columns:2fr 1fr 1fr 1fr}
@media (max-width:700px){.lp-grid{grid-template-columns:1fr 1fr}}
