/* Kits marketplace (/hq/kits): the office look (rooms.css) as a picture shop. Covers keep 16:9, so nothing jumps while
   they load; 4 columns on a desktop, 2 on a phone. */
body.kits .wrap { max-width:1240px; }
body.kits { --verse:#a78bfa; --ui:#fb923c; --icons:#5fe0a0; --props:#38d3ee; --maker:#ffd27a; }

.khero { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,420px); gap:18px; align-items:center; overflow:hidden; position:relative;
  background:linear-gradient(115deg,#1b2f66 0,var(--plum) 55%,#2c2350 100%); border:2px solid var(--line); border-radius:20px; padding:20px 24px; min-height:196px; }
.khero-k { display:inline-flex; align-items:center; gap:7px; font:800 12.5px var(--body); color:var(--lit); letter-spacing:.04em; }
.khero-k .ic { width:18px; height:18px; }
.khero h1 { margin:4px 0 6px; font:800 clamp(30px,4.6vw,46px)/1 var(--display); text-wrap:balance; }
.khero p { margin:0; color:#c9d5f0; font-size:15.5px; max-width:56ch; }
.khero .khero-n { margin-top:8px; font:800 13.5px var(--body); color:var(--cream); }
.khero-p { position:relative; height:170px; }
.khero-p img { position:absolute; width:250px; height:auto; aspect-ratio:16/9; object-fit:cover; border-radius:14px; border:2px solid #35539a; box-shadow:0 12px 26px #0009; top:14px; left:50%; background:#0b1838; }
.khero-p img:nth-child(1) { transform:translateX(-96%) rotate(-7deg); }
.khero-p img:nth-child(2) { transform:translateX(-4%) rotate(6deg); }
.khero-p img:nth-child(3) { transform:translateX(-50%) translateY(6px); }
@media (max-width:860px) { .khero { grid-template-columns:minmax(0,1fr); min-height:0; padding:16px; } .khero-p { display:none; } }

.kbar { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; justify-content:space-between; min-width:0; }
.kbar .chips { flex:1 1 560px; min-width:0; scrollbar-width:none; }
.kbar .chips::-webkit-scrollbar { display:none; }
.kbar .chips button { min-height:40px; }
.kbar .chips i { font-style:normal; opacity:.72; margin-left:5px; font-variant-numeric:tabular-nums; }
.kbar-r { display:flex; gap:10px; align-items:stretch; flex:0 1 360px; min-width:0; }
.ksearch { position:relative; flex:1 1 180px; min-width:0; display:block; }
.ksearch .ic { position:absolute; left:11px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--muted); pointer-events:none; }
.ksearch .fi { width:100%; height:100%; padding-left:36px; display:block; }
.ksort .fi { height:100%; padding-right:8px; }

.kgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(264px,1fr)); gap:16px; min-width:0; }
.kc { position:relative; display:flex; flex-direction:column; min-width:0; background:var(--panel); border:2px solid var(--edge); border-radius:18px; overflow:hidden;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.kc:focus-within { border-color:var(--lit); }
.skelc { aspect-ratio:4/5; background:linear-gradient(90deg,#101f47,#182c60,#101f47); background-size:200% 100%; animation:sh 1.4s linear infinite; }
.kc-cv { position:relative; aspect-ratio:16/9; background:linear-gradient(160deg,#1c3170,#0b1838); overflow:hidden; display:grid; place-items:center; }
.kc-cv img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s ease; }
.kc-cv .ic { width:54px; height:54px; color:#5f7dc4; }
.kc-tags { display:flex; gap:6px; flex-wrap:wrap; min-width:0; }
.ktag { font:800 11.5px/1 var(--body); padding:5px 9px; border-radius:99px; background:#0a1430; color:var(--c,var(--cream)); border:1.5px solid color-mix(in srgb,var(--c,#fff) 55%,transparent); white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.ktag.new { --c:#7cf5b4; } .ktag.by { --c:var(--maker); }
.kc-b { display:flex; flex-direction:column; gap:7px; padding:13px 14px 14px; flex:1; min-width:0; }
.kc h3 { margin:0; font:800 18px/1.15 var(--display); }
.kc-open { background:none; color:inherit; font:inherit; padding:0; text-align:left; overflow-wrap:anywhere; }
.kc-open::after { content:''; position:absolute; inset:0; border-radius:16px; }
.kc-open:focus-visible { outline:none; }
.kc-open:focus-visible::after { outline:3px solid var(--lit); outline-offset:-3px; }
.kc-l { margin:0; font-size:13.5px; line-height:1.4; color:var(--muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.kc-f { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; justify-content:space-between; margin-top:auto; padding-top:4px; }
.kc-p { font:800 23px/1 var(--display); font-variant-numeric:tabular-nums; }
.kc-p.free { color:var(--go); }
.kc-s { display:flex; flex-wrap:wrap; gap:5px; position:relative; z-index:1; }
.kc-s a { position:relative; display:inline-flex; align-items:center; min-height:28px; padding:0 7px; border-radius:99px; border:1.5px solid var(--line); background:var(--plum-2); color:#cfdcf7; font:800 12px var(--body); text-decoration:none; white-space:nowrap; }
.kc-s a::before { content:''; position:absolute; inset:-6px 0; } /* a 40 px tall tap area around the small store pill (N1) */
.kc-buy { position:relative; z-index:1; width:100%; }
.ksell { grid-column:1 / -1; border-style:dashed; border-color:#5b6fae; background:linear-gradient(115deg,#1f3670,#141f44); }
.ksell .kc-b { flex-direction:row; align-items:center; gap:18px; padding:18px 22px; }
.ksell .ic.big { width:56px; height:56px; color:var(--lit); flex:none; }
.ksell .tx { flex:1; min-width:0; display:grid; gap:3px; }
.ksell h3 { font-size:21px; }
.ksell p { margin:0; color:#cfdcf7; font-size:15px; }
.ksell .sbtn { flex:none; }
.kempty { grid-column:1 / -1; text-align:center; padding:26px 16px; display:grid; gap:10px; justify-items:center; }
.kempty p { margin:0; }
@media (hover:hover) {
  .kc:hover { transform:translateY(-5px); border-color:#6f8ed6; box-shadow:0 14px 30px #0008; }
  .kc:hover .kc-cv img { transform:scale(1.035); }
  .kc-s a:hover { border-color:var(--lit); color:#fff; }
}
@media (max-width:620px) {
  .kgrid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .kc { border-radius:14px; }
  .kc-b { padding:9px 9px 10px; gap:6px; }
  .kc h3 { font-size:15px; }
  .kc-l { display:none; }
  .kc-tags { gap:4px; }
  .ktag { font-size:10.5px; padding:4px 7px; }
  .kc-p { font-size:19px; }
  .kc-s { gap:2px; }
  .kc-s a { padding:0 4px; font-size:10.5px; }
  .kc-buy { padding:10px 6px; font-size:14px; }
  .kbar-r { flex:1 1 100%; }
  .kc-f { flex-direction:column; align-items:flex-start; }
  .ksell .kc-b { flex-wrap:wrap; gap:10px 12px; padding:14px; }
  .ksell .ic.big { width:40px; height:40px; }
  .ksell .sbtn { width:100%; }
}
@media (max-width:339px) { .kgrid { grid-template-columns:minmax(0,1fr); } }

/* the detail drawer: a native dialog (focus stays inside, Escape closes it) */
.kd { margin:0 0 0 auto; padding:0 env(safe-area-inset-right,0px) 0 0; border:0; width:min(560px,100vw); max-width:100vw; height:100dvh; max-height:100dvh; background:var(--plum); color:var(--cream); border-left:2px solid var(--line); box-shadow:-18px 0 50px #000a; overscroll-behavior:contain; }
.kd::backdrop { background:#040a1cc4; }
.kd[open] { animation:kdin .22s ease-out; }
@keyframes kdin { from { transform:translateX(40px); opacity:0; } }
.kd-in { display:grid; gap:14px; padding:0 18px max(26px,calc(env(safe-area-inset-bottom,0px) + 16px)); min-width:0; align-content:start; }
.kd-top { position:sticky; top:0; z-index:3; display:flex; gap:10px; align-items:center; justify-content:space-between; background:var(--plum); margin:0 -18px; padding:max(12px,env(safe-area-inset-top,0px)) 18px 12px; }
.kd-x { flex:none; width:40px; height:40px; border-radius:50%; background:#0a1430; color:var(--cream); border:2px solid var(--line); display:grid; place-items:center; }
.kd-x svg { width:18px; height:18px; }
.kd-m { position:relative; aspect-ratio:16/9; border-radius:14px; overflow:hidden; border:2px solid var(--edge); background:linear-gradient(160deg,#1c3170,#0b1838); display:grid; place-items:center; }
.kd-m img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.kd-m .ic { width:70px; height:70px; color:#5f7dc4; }
.kd-th { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.kd-th button { padding:0; border:2px solid var(--edge); border-radius:10px; overflow:hidden; aspect-ratio:16/9; background:#0b1838; }
.kd-th button[aria-pressed=true] { border-color:var(--lit); }
.kd-th img { width:100%; height:100%; object-fit:cover; display:block; }
.kd h2 { margin:0; font:800 27px/1.1 var(--display); overflow-wrap:anywhere; }
.kd h3 { margin:0 0 6px; font:800 17px/1.2 var(--display); }
.kd-h { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:baseline; justify-content:space-between; }
/* the title keeps a real width and a long price ("Free, pay what you want") goes under it instead of squeezing the title to
   one letter per line on 320 px phones (N3) */
.kd-h h2 { flex:1 1 10em; min-width:0; }
.kd-h .kc-p { font-size:28px; flex:0 1 auto; max-width:100%; }
.kd-d { margin:0; color:#d4def4; white-space:pre-line; overflow-wrap:anywhere; }
.kd ul { margin:0; padding-left:20px; display:grid; gap:5px; color:#d4def4; font-size:14.5px; }
.kd-st { display:grid; gap:9px; }
.kd-st .sbtn { width:100%; }
.kd-st .two { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:9px; }
.kd-inst { display:grid; gap:9px; background:linear-gradient(160deg,#2a2414,#1d1a24); border:2px solid #7a5a29; border-radius:14px; padding:14px; }
.kd-inst p { margin:0; }
.kd-inst b { font:800 17px/1.2 var(--display); }
html.kdopen { overflow:hidden; }
@media (max-width:620px) { .kd { width:100vw; border-left:0; padding-left:env(safe-area-inset-left,0px); } .kd-in { padding:0 14px max(30px,calc(env(safe-area-inset-bottom,0px) + 16px)); } .kd-top { margin:0 -14px; padding:max(10px,env(safe-area-inset-top,0px)) 14px 10px; } }
@media (prefers-reduced-motion:reduce) {
  .kc, .kc-cv img { transition:none; }
  .kc:hover { transform:none; }
  .kc:hover .kc-cv img { transform:none; }
  .kd[open], .skelc { animation:none; }
}
