/* Hypha · Invitation · the HUNTER card: the Hunter page's lit room, scaled into the card.
   Lifted from the Hunter bridge hero (hunter/01 #reply): the Leads sheet, the Sent list where the reply lands, and the
   phone that wakes with it. Window chrome and shadows from hunter/css/world.css (.win), the phone from
   hunter/css/tool-phone.css (.mob). Every size is in em of the stage's unit (56 units across the card's world), so the
   whole room scales with the card. Keyframes only; select.css runs them only while .mini.is-live, and with reduced
   motion they are off and the room rests lit (the resting state below IS the lit state). */

.sc-world > .mini.hx {
  container-type: inline-size;
  aspect-ratio: 56 / 50;
  max-width: 600px;
  /* un-boxed 10-27: no plate, no ring, no corner; the windows and the phone float on the dark stage */
}
/* on a desk the room reaches a little into the gap, so it holds its own beside the words */
@media (min-width: 900px) {
  .sc-world > .mini.hx { width: calc(100% + min(3vw, 44px)); max-width: 640px; margin-left: calc(-1 * min(3vw, 44px)); }
}
.mini.hx b, .mini.hx em, .mini.hx s { display: inline; }
.hx .hx-stage { position: absolute; inset: 0; font-size: calc(100cqw / 56); }

/* the room's own light: a window high on the left, its shaft falling across the desk */
.hx .hx-sun {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 30%, rgb(255 255 255 / 0.55) 30% 44%, transparent 44% 100%),
    radial-gradient(40% 30% at 8% 0%, rgb(255 255 255 / 1), transparent 80%);
  opacity: 0.8;
}
/* off the lit room's plate (un-boxed 10-27) the window's shaft read as a grey slab on the dark: it rests */
.sc-world > .mini.hx .hx-sun { display: none; }

/* ---------- a window (hunter world.css .win, day look) ---------- */
.hx .hx-win {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.15em;
  background: #fff;
  color: #1b1f24;
  font-family: var(--f-app);
  font-size: 1em;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  box-shadow:
    0 0 0 0.1em rgb(15 23 20 / 0.11),
    0 1.4em 4em -1.6em rgb(5 12 10 / 0.36),
    0 3.6em 9em -3em rgb(5 12 10 / 0.34);
}
.hx .hx-bar {
  flex: none;
  display: flex;
  align-items: center;
  height: 2.8em;
  padding: 0 1.2em;
  background: #f3f4f6;
  border-bottom: 0.1em solid #e6e8eb;
  font-weight: 600;
  font-size: 1.05em;
  color: #50575e;
}
.hx .hx-dots { display: inline-flex; gap: 0.62em; }
.hx .hx-dots i { display: block; width: 1.02em; height: 1.02em; border-radius: 50%; box-shadow: inset 0 0 0 0.05em rgb(0 0 0 / 0.12); }
.hx .hx-dots i:nth-child(1) { background: #ff5f57; }
.hx .hx-dots i:nth-child(2) { background: #febc2e; }
.hx .hx-dots i:nth-child(3) { background: #28c840; }
.hx .hx-title { flex: 1; text-align: center; margin-right: 4.4em; white-space: nowrap; }

/* ---------- the Leads sheet ---------- */
.hx .hx-sheet { left: 14.5em; top: 1.8em; width: 46em; height: 25em; z-index: 1; }
.hx .hx-menu { flex: none; display: flex; gap: 1.45em; padding: 0.55em 1.2em 0.2em; font-size: 1.04em; color: #1b1f24; }
.hx .hx-tools { flex: none; padding: 0.35em 0.8em 0.45em; }
.hx .hx-tl {
  display: inline-flex;
  align-items: center;
  gap: 1.05em;
  padding: 0.42em 1.2em;
  border-radius: 2em;
  background: #eef1f4;
  color: #3c4247;
  font-size: 0.98em;
  white-space: nowrap;
}
.hx .hx-tl i { display: block; width: 0.1em; height: 1.3em; background: #d5d9de; }
.hx .hx-tl b { font-weight: 700; }
.hx .hx-tl em { font-style: italic; }
.hx .hx-size { padding: 0 0.4em; border-radius: 0.3em; background: #fff; box-shadow: inset 0 0 0 0.1em #c6ccd2; }
.hx .hx-fx { flex: none; display: flex; align-items: center; height: 2.3em; border-top: 0.1em solid #e6e8eb; border-bottom: 0.1em solid #e6e8eb; font-size: 1em; }
.hx .hx-ref { width: 7.2em; padding-left: 0.9em; border-right: 0.1em solid #e6e8eb; }
.hx .hx-fxl { padding-left: 0.9em; color: #6b7178; font-style: italic; }
.hx .hx-grid { font-family: var(--f-sheet); font-size: 1em; color: #1b1f24; }
.hx .hx-r {
  display: grid;
  grid-template-columns: 2.6em 11.2em 11em 12.4em 10em;
  height: 2.4em;
  border-bottom: 0.1em solid #e6e8eb;
}
.hx .hx-r > span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 0.6em;
  border-right: 0.1em solid #e6e8eb;
  white-space: nowrap;
  overflow: hidden;
}
.hx .hx-r > span:first-child { justify-content: center; padding: 0; background: #f8f9fa; color: #6b7178; font-size: 0.92em; }
.hx .hx-r--cols { height: 2em; background: #f8f9fa; }
.hx .hx-r--cols > span { justify-content: center; color: #50575e; font-size: 0.92em; }
.hx .hx-r--head > span:not(:first-child) { font-weight: 700; }
.hx .hx-logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.45em;
  height: 1.45em;
  margin-right: 0.55em;
  border-radius: 0.32em;
  background: #f1f3f4;
  box-shadow: inset 0 0 0 0.07em #d5d9de;
  color: #3c4247;
  font: 700 0.78em/1 var(--f-app);
}
.hx .hx-logo--lush { color: transparent; background: #000 linear-gradient(#fff, #fff) center / 64% 0.16em no-repeat; box-shadow: none; }

/* ---------- the Sent list, the reply landing on top ---------- */
.hx .hx-mail { left: 2.4em; top: 23.6em; width: 33.4em; height: 32em; z-index: 2; }
.hx .hx-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.8em;
  height: 2.7em;
  margin: 0.9em 1.1em 0.5em;
  padding: 0 1em;
  border-radius: 0.8em;
  background: #eef1f4;
  color: #50575e;
  font-size: 1.02em;
}
.hx .hx-search svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hx .hx-acts { flex: none; display: flex; align-items: center; gap: 1.5em; height: 2.6em; padding: 0 1.5em; border-bottom: 0.1em solid #e6e8eb; color: #50575e; }
.hx .hx-acts svg { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.hx .hx-box { display: block; width: 1.05em; height: 1.05em; border-radius: 0.18em; box-shadow: inset 0 0 0 0.12em #8a9097; }
.hx .hx-more { font-size: 1.3em; line-height: 1; }
.hx .hx-list { margin: 0; padding: 0; list-style: none; }
.hx .hx-list li {
  position: relative;
  padding: 0.72em 1.2em 0.74em 2.1em;
  border-bottom: 0.1em solid #e6e8eb;
  background: #f6f7f9;
}
.hx .hx-h { display: flex; justify-content: space-between; gap: 1em; margin: 0; font-size: 1.04em; color: #2a2f35; }
.hx .hx-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx .hx-who em { font-style: normal; color: #6b7178; margin-left: 0.25em; }
.hx .hx-when { flex: none; color: #50575e; font-size: 0.94em; }
.hx .hx-s { margin: 0.18em 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7178; font-size: 1.02em; }
.hx .hx-subj { color: #50575e; }

/* the reply: lit, raised off the list, with its own green light (the Hunter hero's lit row) */
.hx .hx-list li.hx-lit {
  z-index: 2;
  background: linear-gradient(90deg, rgb(57 241 100 / 0.16), #fff 46%);
  box-shadow:
    inset 0 0 0 0.12em rgb(57 241 100 / 0.62),
    0 0.5em 2.2em -0.2em rgb(57 241 100 / 0.5),
    0 1.6em 3em -1.4em rgb(5 12 10 / 0.3);
  animation: hx-land 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}
.hx .hx-lit .hx-h, .hx .hx-lit .hx-s b { color: #07100e; font-weight: 700; }
.hx .hx-lit .hx-s { color: #1f2925; }
.hx .hx-lit .hx-who em { color: #0b8a39; font-weight: 700; }
.hx .hx-lit .hx-when { color: #07100e; font-weight: 700; }
.hx .hx-dot { position: absolute; left: 0.85em; top: 1.3em; display: block; width: 0.56em; height: 0.56em; border-radius: 50%; background: #07100e; box-shadow: 0 0 0.6em rgb(57 241 100 / 0.9); }

/* ---------- the phone, awake: the reply on its lock screen (hunter tool-phone.css .mob, --wake 1) ---------- */
.hx .hx-spill {
  position: absolute;
  left: 30em;
  top: 22em;
  width: 32em;
  height: 30em;
  z-index: 3;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(189 246 199 / 0.75), rgb(57 241 100 / 0.24) 44%, rgb(101 219 174 / 0.08) 72%, transparent);
  mix-blend-mode: multiply;
  animation: hx-wake 1s ease 0.6s both;
}
.hx .hx-phone { position: absolute; left: 37.8em; top: 24em; width: 15.6em; aspect-ratio: 0.47; z-index: 4; rotate: -6deg; }
.hx .hx-body {
  position: absolute;
  inset: 0;
  padding: 0.36em;
  border-radius: 2.42em;
  background: linear-gradient(150deg, #3a3f45 0%, #16191c 18%, #08090a 60%, #1c1f23 100%);
  box-shadow:
    inset 0 0 0 0.07em rgb(255 255 255 / 0.14),
    inset 0 0 0 0.17em #060708,
    0 0.2em 0.4em -0.1em rgb(5 12 10 / 0.55),
    0 2.6em 4.6em -1.4em rgb(5 12 10 / 0.6),
    0 0 4.4em -0.6em rgb(120 200 160 / 0.55);
}
.hx .hx-scr { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; border-radius: 2.08em; background: #020303; }
.hx .hx-wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 55% at 20% 18%, rgb(64 92 122 / 0.75), transparent 70%),
    radial-gradient(80% 60% at 85% 75%, rgb(40 58 92 / 0.7), transparent 72%),
    linear-gradient(180deg, #16202c 0%, #0c121a 55%, #07090d 100%);
  animation: hx-wake 0.7s ease 0.6s both;
}
.hx .hx-lock { position: absolute; inset: 0; z-index: 1; color: #f4f7fa; text-align: center; animation: hx-wake 0.7s ease 0.6s both; }
.hx .hx-date { position: absolute; top: 10.5%; left: 0; right: 0; margin: 0; font-size: 0.88em; font-weight: 500; letter-spacing: 0.01em; color: rgb(244 247 250 / 0.88); }
.hx .hx-clock { position: absolute; top: 14%; left: 0; right: 0; margin: 0; font-size: 3.7em; font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hx .hx-note {
  position: absolute;
  top: 40%;
  left: 3.5%;
  right: 3.5%;
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  gap: 0.08em 0.6em;
  padding: 0.7em 0.8em 0.75em 0.7em;
  border-radius: 1.2em;
  background: rgb(240 243 246 / 0.93);
  color: #121417;
  font-size: 0.86em;
  line-height: 1.3;
  text-align: left;
  box-shadow: 0 0 2.4em rgb(189 246 199 / 0.45), 0 0.4em 1.2em rgb(0 0 0 / 0.35);
  animation: hx-note 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.8s both;
}
.hx .hx-ni { grid-row: 1 / span 3; display: grid; place-items: center; width: 2em; height: 2em; border-radius: 0.5em; background: linear-gradient(180deg, #4f8df5, #2563d6); color: #fff; }
.hx .hx-ni svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.hx .hx-nh { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4em; margin: 0; min-width: 0; }
.hx .hx-nh b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.hx .hx-nh span { flex: none; color: #5d646b; font-size: 0.9em; }
.hx .hx-ns { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.hx .hx-nb { margin: 0; color: #2c3136; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx .hx-home { position: absolute; left: 50%; bottom: 1.8%; display: block; width: 36%; height: 0.22em; translate: -50% 0; border-radius: 0.2em; background: rgb(255 255 255 / 0.82); }
.hx .hx-hole { position: absolute; z-index: 6; top: 2.2%; left: 50%; display: block; width: 0.66em; height: 0.66em; translate: -50% 0; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 0.09em #0d1014; }
.hx .hx-glass {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(130% 55% at 12% 0%, rgb(255 255 255 / 0.05), transparent 62%),
    linear-gradient(118deg, rgb(255 255 255 / 0.12) 0%, rgb(255 255 255 / 0.045) 31%, transparent 31.5%, transparent 68%, rgb(255 255 255 / 0.035) 68.5%, transparent 100%);
}

/* the moment: the row lights as the reply lands, then the phone wakes with it */
@keyframes hx-land {
  0%, 25% { background: #f6f7f9; box-shadow: inset 0 0 0 0 rgb(57 241 100 / 0), 0 0 0 0 rgb(57 241 100 / 0), 0 0 0 0 rgb(5 12 10 / 0); transform: translateY(-0.6em); opacity: 0; }
  55% { opacity: 1; }
}
@keyframes hx-wake { from { opacity: 0; } }
@keyframes hx-note { from { opacity: 0; transform: translateY(-1.2em) scale(0.96); } }

/* ---------- a phone: the same room, a little bigger, framed on the reply and the lit phone ---------- */
@media (max-width: 899px) {
  .sc-world > .mini.hx { aspect-ratio: 40 / 44; height: auto; }
  .hx .hx-stage { font-size: calc(100cqw / 40); }
  .hx .hx-sheet { left: 6.4em; top: 1.4em; width: 42em; height: 22em; }
  .hx .hx-mail { left: 0.8em; top: 23.2em; width: 25.4em; }
  .hx .hx-phone { left: 26.6em; top: 21.4em; width: 12.6em; }
  .hx .hx-spill { left: 18em; top: 18em; width: 26em; height: 26em; }
  .hx .hx-note { font-size: 0.8em; }
  .hx .hx-nh span { display: none; }
}
