:root {
  --ink: #07090f;
  --panel: #10141c;
  --sand: #eef2f7;
  --mute: #8b94a8;
  --mint: #3ee0b4;
  --line: rgba(255, 255, 255, 0.08);
  --sans: "Manrope", "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--sand);
  font-family: var(--sans);
  background:
    radial-gradient(640px 380px at 6% -8%, rgba(224, 197, 106, 0.16), transparent 62%),
    radial-gradient(820px 520px at 88% 8%, rgba(22, 61, 50, 0.72), transparent 58%),
    var(--ink);
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  min-height: 100svh;
}

.intro {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding: 36px 36px 40px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 20, 28, 0.2), rgba(7, 9, 15, 0.72));
}

.seal {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0;
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.lede {
  margin: 0;
  max-width: 26ch;
  color: var(--mute);
  font-size: 1.05rem;
  line-height: 1.45;
}

.notes {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes li {
  color: var(--sand);
  font-size: 0.95rem;
  line-height: 1.35;
  padding-left: 14px;
  border-left: 2px solid var(--mint);
}

.house {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.house a {
  color: var(--mute);
  font-size: 0.85rem;
  text-decoration: none;
}

.house a:hover { color: var(--mint); }

.catalog {
  position: relative;
  min-height: 100svh;
  padding: 28px 28px 48px;
}

.catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.catalog-head p {
  margin: 0;
  color: var(--mute);
  font-size: 0.85rem;
}

.catalog-tools {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: -28px -28px 16px;
  padding: 28px 28px 14px;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0.96) 0 78%, rgba(7, 9, 15, 0));
}

.finder { margin: 0; }

.finder-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 8px 0 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.finder-field:focus-within {
  border-color: rgba(62, 224, 180, 0.7);
}

.finder-field svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(238, 242, 247, 0.6);
  stroke-width: 2;
  stroke-linecap: round;
}

.finder-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--sand);
  font: inherit;
  font-size: 15px;
}

.finder-field input::placeholder { color: rgba(238, 242, 247, 0.5); }

.finder-field input::-webkit-search-cancel-button { display: none; }

.finder-clear {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--mute);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.empty {
  margin: 36px 0 12px;
  text-align: center;
  color: var(--mute);
}

.tile.is-hidden,
.group.is-hidden { display: none; }

.stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  container-type: inline-size;
}

.group h3 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

.group h3::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: rgba(224, 197, 106, 0.7);
}

.lane {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@container (min-width: 620px) {
  .lane { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 960px) {
  .lane { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tile {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 52px 92px;
  align-items: center;
  min-height: 96px;
  border-radius: 16px;
  overflow: hidden;
  color: var(--sand);
  background: linear-gradient(105deg, #121820 0%, #1a2a22 62%, #121820 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.tile:focus-visible {
  outline: 2px solid rgba(62, 224, 180, 0.85);
  outline-offset: 2px;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 224, 180, 0.55);
}

.tile .shot {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 90px;
  justify-self: end;
  border-radius: 10px;
  overflow: hidden;
  background: #0b221c;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.tile img.preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.01);
  transition: transform 0.5s ease;
}

.tile:hover img.preview { transform: scale(1.08); }

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tile .idx {
  position: relative;
  z-index: 2;
  padding-left: 14px;
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--mint);
}

.tile .mark {
  position: relative;
  z-index: 2;
  height: 96px;
  pointer-events: none;
}

.vcard {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 32px;
  height: 45px;
  margin-left: -16px;
  border-radius: 4px;
  background: linear-gradient(160deg, #fff8ea, #f6e6c4 55%, #eed6a8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  outline: 1px solid rgba(120, 82, 28, 0.28);
  transform: rotate(var(--a));
  transform-origin: 50% 140%;
  color: var(--inkc);
  font-family: Roboto, "Manrope", sans-serif;
  font-variant-emoji: text;
  font-weight: 800;
}

.vcard .pip {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 8px;
  line-height: 1;
  text-align: center;
}

.vcard .pip b { display: block; font-size: 9px; letter-spacing: -0.3px; }
.vcard .pip i { display: block; font-style: normal; font-size: 7px; line-height: 1; }

.vcard .pip.flip {
  top: auto;
  left: auto;
  bottom: 2px;
  right: 3px;
  transform: rotate(180deg);
}

.vcard .center {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

.vcard svg {
  display: block;
  fill: currentColor;
}

.vcard svg.pip-suit {
  width: 7px;
  height: 7px;
  margin: 0 auto;
}

.vcard svg.center-suit {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
}

.vcard.uno .blob {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 32%;
  bottom: 32%;
  border-radius: 6px;
  background: var(--inkc);
  color: #fff4dc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.tile .meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 8px 10px 2px;
  text-align: left;
}

.tile .meta strong {
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.tile .meta em {
  margin-top: 3px;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(238, 242, 247, 0.72);
}

html.still .tile,
html.still .tile img.preview { transition: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .intro {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 28px 20px 24px;
  }
  h1 { font-size: 2.6rem; }
  .catalog { padding: 18px 14px 32px; min-height: 0; }
  .catalog-tools { margin: -18px -14px 14px; padding: 18px 14px 12px; }
  .tile {
    grid-template-columns: 36px minmax(0, 1fr) 48px 84px;
    min-height: 88px;
  }
  .tile .shot { width: 38px; height: 80px; border-radius: 8px; }
  .tile .idx { padding-left: 10px; font-size: 0.62rem; }
  .tile .meta strong { font-size: 0.98rem; white-space: normal; }
  .tile .mark { height: 88px; }
  .vcard { width: 26px; height: 36px; margin-left: -13px; bottom: 6px; }
}

.booth {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 12, 0.78);
  backdrop-filter: blur(10px);
}

.booth[hidden] { display: none; }

.booth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sand);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.booth-close:hover { color: var(--mint); }

.booth-name {
  position: absolute;
  top: 20px;
  left: 22px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.device-shell { position: relative; }

.device {
  position: absolute;
  left: 0;
  top: 0;
  width: 404px;
  height: 858px;
  transform-origin: top left;
}

.chassis {
  position: absolute;
  inset: 0;
  border-radius: 52px;
  padding: 7px;
  background:
    linear-gradient(155deg, #5a5a62 0%, #222228 10%, #0c0c0e 40%, #141418 76%, #3c3c42 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 36px 80px rgba(0, 0, 0, 0.55);
}

.glass {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 46px;
  overflow: hidden;
  background: #07090f;
}

.glass iframe {
  position: absolute;
  inset: 0;
  width: 390px;
  height: 844px;
  border: 0;
  background: transparent;
}

.booth-wait {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--mute);
  font-size: 0.92rem;
  background: #07090f;
}

.booth-wait[hidden] { display: none; }

.status {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 28px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status svg { height: 12px; fill: currentColor; }
.status svg:first-child { width: 17px; }
.status svg:last-child { width: 25px; }

.home-bar {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 8px;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.88);
  pointer-events: none;
}

.key {
  position: absolute;
  z-index: 1;
  width: 4px;
  background: linear-gradient(#2e2e32, #0a0a0c);
}

.key.silent { left: -3px; top: 122px; height: 28px; border-radius: 2px 0 0 2px; }
.key.vol.up { left: -3px; top: 172px; height: 52px; border-radius: 2px 0 0 2px; }
.key.vol.down { left: -3px; top: 234px; height: 52px; border-radius: 2px 0 0 2px; }
.key.power { right: -3px; top: 190px; height: 78px; border-radius: 0 2px 2px 0; }
