:root {
  color-scheme: dark;
  --ink: #171419;
  --paper: #f7f3f1;
  --pink: #e797ae;
  --mint: #6ec1b0;
  --blue: #6889ad;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button { font: inherit; }

.trial-shell {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 24%, rgb(231 151 174 / 18%), transparent 28rem),
    radial-gradient(circle at 82% 78%, rgb(110 193 176 / 12%), transparent 30rem),
    var(--ink);
}

.trial-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image:
    linear-gradient(rgb(255 255 255 / 18%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 18%) 1px, transparent 1px);
  background-size: 28px 28px;
}

.product-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--paper); }

.gate {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 50%;
  width: min(31rem, calc(100% - 2rem));
  min-height: 32rem;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.25rem;
  text-align: center;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 1.75rem;
  background: rgb(28 25 30 / 86%);
  box-shadow: 0 32px 90px rgb(0 0 0 / 38%);
  backdrop-filter: blur(24px);
}

.brand-mark { display: flex; align-items: flex-end; gap: .38rem; height: 4.5rem; margin-bottom: 1.55rem; }
.brand-mark span {
  display: grid;
  place-items: center;
  width: 2.65rem;
  border-radius: .8rem .8rem .4rem .4rem;
  color: var(--ink);
  font: 800 1rem/1 ui-monospace, monospace;
  box-shadow: inset 0 -8px 16px rgb(0 0 0 / 10%);
}
.brand-mark span:nth-child(1) { height: 3.3rem; background: var(--blue); }
.brand-mark span:nth-child(2) { height: 4.15rem; background: var(--pink); }
.brand-mark span:nth-child(3) { height: 2.8rem; background: var(--mint); }
.brand-mark span:nth-child(4) { height: 3.7rem; background: #f2e9e6; }

.eyebrow { margin: 0 0 .85rem; color: var(--pink); font-size: .78rem; font-weight: 750; letter-spacing: .16em; }
.gate h1 { margin: 0; font-size: clamp(2rem, 7vw, 3.15rem); line-height: 1.05; letter-spacing: -.055em; }
.gate-copy { max-width: 24rem; margin: 1.15rem 0 0; color: rgb(247 243 241 / 68%); font-size: .95rem; line-height: 1.7; }
.time-card { width: 100%; margin-top: 1.45rem; padding: 1.15rem 1.4rem; border: 1px solid rgb(255 255 255 / 10%); border-radius: 1.2rem; background: rgb(255 255 255 / 5%); }
.time-card span, .time-card small { display: block; color: rgb(247 243 241 / 56%); font-size: .78rem; }
.time-card strong { display: block; margin: .25rem 0; font: 700 clamp(2.5rem, 10vw, 4rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.08em; }

.primary-action, .secondary-action {
  width: 100%;
  min-height: 3.7rem;
  margin-top: 1rem;
  border: 0;
  border-radius: 1.05rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}
.primary-action { color: var(--ink); background: var(--pink); box-shadow: 0 12px 30px rgb(231 151 174 / 20%); }
.secondary-action { color: var(--paper); background: rgb(255 255 255 / 10%); }
.primary-action:active, .secondary-action:active { transform: translateY(1px) scale(.995); }

.expired-seal { margin-top: 1.8rem; padding: .7rem 1rem; color: rgb(247 243 241 / 42%); border: 1px solid rgb(247 243 241 / 16%); border-radius: .55rem; font: 700 .76rem/1 ui-monospace, monospace; letter-spacing: .18em; transform: rotate(-3deg); }
.gate footer { position: absolute; inset: auto 1.5rem 1.2rem; display: flex; justify-content: space-between; gap: 1rem; color: rgb(247 243 241 / 32%); font: 600 .65rem/1.3 ui-monospace, monospace; letter-spacing: .06em; }

.trial-hud {
  position: absolute;
  z-index: 30;
  top: max(.55rem, env(safe-area-inset-top));
  left: max(.55rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: .48rem;
  min-height: 2rem;
  padding: .35rem .5rem .35rem .7rem;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  color: var(--paper);
  background: rgb(23 20 25 / 84%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  backdrop-filter: blur(14px);
  font-size: .72rem;
  pointer-events: none;
}
.trial-hud strong { font: 750 .72rem/1 ui-monospace, monospace; }
.trial-hud button { border: 0; border-radius: 999px; padding: .28rem .55rem; color: var(--ink); background: var(--pink); font-size: .68rem; font-weight: 800; pointer-events: auto; }
.live-dot { width: .48rem; height: .48rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 .2rem rgb(110 193 176 / 16%); }
.watermark { position: absolute; z-index: 29; right: max(.8rem, env(safe-area-inset-right)); bottom: max(.55rem, env(safe-area-inset-bottom)); color: rgb(23 20 25 / 26%); font: 700 .58rem/1 ui-monospace, monospace; letter-spacing: .12em; pointer-events: none; }

@media (orientation: landscape) and (max-height: 520px) {
  .gate { width: min(48rem, calc(100% - 2rem)); min-height: 0; max-height: calc(100% - 1rem); padding: 1.1rem 1.5rem; }
  .brand-mark { height: 2.6rem; margin-bottom: .6rem; }
  .brand-mark span { width: 1.8rem; font-size: .7rem; }
  .brand-mark span:nth-child(1) { height: 2rem; }
  .brand-mark span:nth-child(2) { height: 2.5rem; }
  .brand-mark span:nth-child(3) { height: 1.7rem; }
  .brand-mark span:nth-child(4) { height: 2.25rem; }
  .eyebrow { margin-bottom: .35rem; }
  .gate h1 { font-size: 1.75rem; }
  .gate-copy { margin-top: .45rem; font-size: .78rem; line-height: 1.4; }
  .time-card { margin-top: .6rem; padding: .55rem 1rem; }
  .time-card strong { font-size: 2rem; }
  .primary-action, .secondary-action { min-height: 2.8rem; margin-top: .55rem; }
  .gate footer { position: static; width: 100%; margin-top: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
