/* ==========================================================================
   Instituto Xavier — Captive Portal · EVA-01 theme
   ========================================================================== */

@font-face { font-family: "Shippori"; src: url("/fonts/shippori-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow C"; src: url("/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow C"; src: url("/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow C"; src: url("/fonts/barlow-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --void: #07040d;
  --abyss: #110821;
  --purple-900: #1c0d33;
  --purple-700: #3b1a6b;
  --purple-500: #6a35c2;
  --purple-400: #8b5cf6;
  --purple-300: #b794ff;
  --green: #9dff2e;
  --green-500: #6bdc2a;
  --green-dim: #3f7d1a;
  --orange: #ff7a1a;
  --red: #ff2a3d;
  --text: #ece6f7;
  --muted: #9c8fb8;
  --line: rgba(183, 148, 255, .22);
  --panel: rgba(20, 9, 38, .72);

  --serif: "Shippori", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Times New Roman", serif;
  --cond: "Barlow C", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JB Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--void);
  color: var(--text);
  font-family: var(--cond);
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.mincho { font-family: var(--serif); font-weight: 800; }
.jp { font-family: var(--serif); }
[hidden] { display: none !important; }

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 78% 22%, rgba(106, 53, 194, .55), transparent 70%),
    radial-gradient(35% 30% at 12% 85%, rgba(157, 255, 46, .14), transparent 70%),
    radial-gradient(60% 50% at 50% 50%, rgba(28, 13, 51, .9), transparent 80%);
  animation: drift 18s ease-in-out infinite alternate;
}
.bg-hex { position: absolute; inset: 0; color: rgba(157, 255, 46, .07);
  -webkit-mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 85%);
          mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 85%); }
.bg-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.bg-scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30vh; top: -30vh;
  background: linear-gradient(to bottom, transparent, rgba(157, 255, 46, .05), transparent);
  animation: sweep 7s linear infinite;
}
.bg-noise {
  position: absolute; inset: 0; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.05); } }
@keyframes sweep { to { top: 110vh; } }

/* ---------- top bar ---------- */
.topbar { position: relative; z-index: 2; }
.tape {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--green) 0 14px, var(--purple-700) 14px 28px);
  box-shadow: 0 0 18px rgba(157, 255, 46, .35);
  animation: tape 1.6s linear infinite;
  background-size: 39.6px 10px;
}
@keyframes tape { to { background-position: 39.6px 0; } }
.topbar-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(7, 4, 13, .9), rgba(7, 4, 13, .4));
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 39px; color: var(--green); filter: drop-shadow(0 0 6px rgba(157,255,46,.6)); flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-weight: 800; letter-spacing: .18em; font-size: 15px; }
.brand-text span { font-size: 11px; letter-spacing: .22em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sysclock { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--mono); font-size: 13px; color: var(--green); }
.sysclock .jp { font-size: 11px; color: var(--purple-300); letter-spacing: .1em; }

/* ---------- layout ---------- */
.layout {
  position: relative; z-index: 1;
  display: grid; gap: clamp(20px, 3vw, 40px);
  padding: clamp(20px, 4vw, 48px) var(--gutter);
  max-width: 1280px; margin: 0 auto;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: 1.05fr 1fr; align-items: start; }
}

/* ---------- title card ---------- */
.titlecard { position: relative; padding-top: 8px; }
.eva {
  position: absolute; right: 0; top: 150px;
  width: min(42vw, 250px); opacity: .85;
  filter: drop-shadow(0 0 30px rgba(106, 53, 194, .6));
  animation: hover 6s ease-in-out infinite;
  z-index: -1;
}
.eva-eyes { animation: eyes 4s steps(1) infinite; }
@keyframes eyes { 0%, 92%, 100% { opacity: 1; } 94% { opacity: .2; } 96% { opacity: 1; } 97% { opacity: .3; } }
@keyframes hover { 50% { transform: translateY(-8px); } }
body[data-state="syncing"] .eva-eyes { animation: eyes-on .3s ease-in-out infinite alternate; }
body[data-state="granted"] .eva-mouth { fill: var(--green); filter: drop-shadow(0 0 10px var(--green)); }
@keyframes eyes-on { to { opacity: .45; } }

.ep {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(15px, 2.2vw, 20px); letter-spacing: .04em; margin: 0 0 6px;
  color: var(--text);
}
.ep b { font-family: var(--serif); }
.titlecard h1 {
  margin: 0; line-height: .88; letter-spacing: -.01em;
  display: flex; flex-direction: column; align-items: flex-start;
  text-shadow: 0 0 40px rgba(139, 92, 246, .45);
}
.titlecard h1 span { display: block; transform-origin: left; }
.t1 { font-size: clamp(54px, 11vw, 120px); transform: scaleX(.86); }
.t2 { font-size: clamp(44px, 9vw, 96px); color: var(--green); transform: scaleX(.92); text-shadow: 0 0 24px rgba(157, 255, 46, .55); }
.t3 { font-size: clamp(30px, 6vw, 64px); margin-left: .6em; transform: scaleX(1.12); }
.jp-sub {
  margin: 18px 0 0; font-size: clamp(22px, 4vw, 34px); letter-spacing: .3em; color: var(--purple-300);
}
.lede { max-width: 46ch; margin: 18px 0 0; font-size: 18px; color: #d4cbe6; }
.lede em { color: var(--green); font-style: normal; font-weight: 600; }

/* title card entrance */
.titlecard > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.titlecard h1 span { animation: slam .7s cubic-bezier(.2, .8, .2, 1) both; }
.t1 { animation-delay: .15s !important; }
.t2 { animation-delay: .3s !important; }
.t3 { animation-delay: .45s !important; }
.jp-sub { animation-delay: .6s; }
.lede { animation-delay: .75s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes slam { from { opacity: 0; letter-spacing: .4em; filter: blur(6px); } }

/* ---------- panels ---------- */
.console { display: grid; gap: 16px; }
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 16px;
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) both;
}
.console > .panel:nth-child(1) { animation-delay: .3s; }
.console > .panel:nth-child(2) { animation-delay: .45s; }
.console > .panel:nth-child(3) { animation-delay: .6s; }
.panel::before { /* corner accent */
  content: ""; position: absolute; top: 0; left: 0; width: 46px; height: 3px; background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-weight: 800; letter-spacing: .2em; font-size: 13px; color: var(--purple-300);
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px dashed var(--line);
}
.panel-head .jp { color: var(--orange); letter-spacing: .15em; }

/* ---------- MAGI ---------- */
.magi-grid {
  position: relative; display: grid;
  grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; gap: 12px 14%;
  padding: 4px 0 0;
}
.magi-lines { position: absolute; inset: 0 0 26px 0; width: 100%; height: calc(100% - 26px); }
.magi-lines path { stroke: var(--purple-400); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; opacity: .6; vector-effect: non-scaling-stroke; }
.magi-node {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 4px;
  padding: 10px 12px; min-height: 64px;
  background: linear-gradient(135deg, rgba(59, 26, 107, .9), rgba(28, 13, 51, .9));
  border: 1px solid var(--purple-400);
  font-weight: 800; letter-spacing: .12em; font-size: 14px;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.magi-node i { font-style: normal; color: var(--muted); }
.magi-node .vote {
  grid-column: 1 / -1; font-family: var(--serif); font-size: 22px; letter-spacing: .25em; color: var(--purple-300);
}
.magi-node.n2 { grid-column: 1 / -1; justify-self: center; width: 50%; clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); text-align: center; }
.magi-node.n1 { clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%); }
.magi-node.n3 { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.magi-node.n1, .magi-node.n3 { grid-row: 2; }
.magi-node.n2 { grid-row: 1; grid-template-columns: 1fr; }
.magi-node.n2 b, .magi-node.n2 i { grid-column: 1; }
.magi-node.n2 i { display: none; }
.magi-node[data-vote="deliberating"] .vote { color: var(--orange); animation: blink .45s steps(1) infinite; }
.magi-node[data-vote="approve"] { background: linear-gradient(135deg, rgba(107, 220, 42, .35), rgba(28, 60, 12, .8)); border-color: var(--green); box-shadow: 0 0 22px rgba(157, 255, 46, .35) inset; }
.magi-node[data-vote="approve"] .vote { color: var(--green); }
.magi-node[data-vote="reject"] { background: linear-gradient(135deg, rgba(255, 42, 61, .35), rgba(60, 8, 14, .85)); border-color: var(--red); }
.magi-node[data-vote="reject"] .vote { color: var(--red); }
.magi-code { grid-column: 1 / -1; grid-row: 3; font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-align: center; }
.magi-code span { color: var(--orange); }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- Entry plug ---------- */
.status-pill {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  padding: 2px 8px; border: 1px solid currentColor; color: var(--orange);
}
body[data-state="syncing"] .status-pill { color: var(--purple-300); animation: blink .6s steps(1) infinite; }
body[data-state="granted"] .status-pill { color: var(--green); }
body[data-state="error"] .status-pill { color: var(--red); }

.demo-banner {
  font-size: 14px; padding: 10px 12px; margin-bottom: 14px;
  border-left: 3px solid var(--orange); background: rgba(255, 122, 26, .08); color: #ffd2b0;
}
.readout { margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.readout div { min-width: 0; }
.readout dt { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.readout dd { margin: 2px 0 0; font-family: var(--mono); font-size: 14px; color: var(--green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sync { position: relative; margin-bottom: 18px; }
.sync-graph {
  display: block; width: 100%; height: 110px;
  background: linear-gradient(to bottom, rgba(7, 4, 13, .7), rgba(28, 13, 51, .5));
  border: 1px solid var(--line);
}
.sync-grid path { stroke: rgba(183, 148, 255, .12); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.wave { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.w1 { stroke: var(--green); filter: drop-shadow(0 0 4px var(--green)); }
.w2 { stroke: var(--purple-400); filter: drop-shadow(0 0 4px var(--purple-400)); }
.w3 { stroke: var(--orange); opacity: .8; }
.sync-readout { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.sync-label { font-size: 12px; letter-spacing: .24em; color: var(--muted); }
.sync-value { font-family: var(--mono); font-weight: 700; font-size: 30px; color: var(--text); font-variant-numeric: tabular-nums; }
.sync-value small { font-size: 16px; color: var(--muted); margin-left: 2px; }
body[data-state="granted"] .sync-value { color: var(--green); text-shadow: 0 0 14px rgba(157, 255, 46, .6); }
.sync-bar { height: 6px; background: rgba(183, 148, 255, .12); margin-top: 6px; overflow: hidden; }
.sync-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple-500), var(--green)); box-shadow: 0 0 12px var(--green); transition: width .2s linear; }

.plug-form { display: grid; gap: 14px; }
.code-field { display: grid; gap: 6px; }
.code-field span { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.code-field input {
  font-family: var(--mono); font-size: 20px; letter-spacing: .3em; text-transform: uppercase;
  padding: 12px 14px; color: var(--green); background: rgba(7, 4, 13, .8);
  border: 1px solid var(--purple-400); outline: none; border-radius: 0; width: 100%;
}
.code-field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(157, 255, 46, .18); }

.terms { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; cursor: pointer; user-select: none; }
.terms input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.terms .check {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid var(--purple-400); position: relative; transition: .15s;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.terms input:checked + .check { background: var(--green); border-color: var(--green); box-shadow: 0 0 12px var(--green); }
.terms input:checked + .check::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 12px;
  border: solid var(--void); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.terms input:focus-visible + .check { outline: 2px solid var(--green); outline-offset: 3px; }
.link { all: unset; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:focus-visible { outline: 2px solid var(--green); }

.launch {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  background: transparent; color: var(--void); font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.launch-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(100deg, var(--green) 0%, #c8ff6b 50%, var(--green) 100%);
  background-size: 200% 100%;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: transform .15s, filter .2s;
  animation: sheen 3s linear infinite;
}
.launch-edge {
  position: absolute; inset: -4px; z-index: 0;
  background: var(--green); opacity: .25; filter: blur(14px);
  animation: pulse 2s ease-in-out infinite;
}
.launch-jp { font-family: var(--serif); font-size: 28px; line-height: 1; }
.launch-text { font-weight: 800; font-size: 20px; letter-spacing: .22em; }
.launch:hover .launch-inner { filter: brightness(1.08); }
.launch:active .launch-inner { transform: scale(.985); }
.launch:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.launch:disabled { cursor: progress; }
.launch:disabled .launch-inner { background: linear-gradient(100deg, var(--purple-500), var(--purple-400), var(--purple-500)); background-size: 200% 100%; color: var(--text); animation-duration: .8s; }
.launch:disabled .launch-edge { background: var(--purple-400); }
@keyframes sheen { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .5; } }
.form-msg { margin: 0; min-height: 1.2em; font-family: var(--mono); font-size: 13px; color: var(--red); }

/* ---------- power / 7-seg timer ---------- */
.power { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.power-mode { display: flex; flex-direction: column; }
.power-label { font-weight: 800; font-size: 20px; letter-spacing: .18em; color: var(--orange); }
.power-sub { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
body[data-state="granted"] .power-label { color: var(--green); }
.seg { display: flex; flex-direction: column; align-items: flex-end; }
.seg-digits {
  font-family: var(--mono); font-weight: 700; font-size: clamp(30px, 7vw, 40px); line-height: 1;
  color: var(--orange); text-shadow: 0 0 12px rgba(255, 122, 26, .8);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
  padding: 6px 10px; background: #120604; border: 1px solid rgba(255, 122, 26, .35);
}
body[data-state="granted"] .seg-digits { color: var(--green); text-shadow: 0 0 12px rgba(157, 255, 46, .8); background: #071203; border-color: rgba(157, 255, 46, .35); }
.seg-cap { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); margin-top: 4px; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; text-align: center; padding: 8px var(--gutter) 32px; color: var(--muted); }
.foot .mincho { font-size: clamp(15px, 2.4vw, 20px); color: var(--purple-300); margin: 0 0 6px; }
.foot-meta { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; margin: 0; }

/* ---------- overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: var(--gutter);
  background: rgba(0, 0, 0, .94);
  animation: fadein .35s ease both;
}
.overlay-inner { width: min(640px, 100%); }
.ov-ep { font-family: var(--serif); font-weight: 800; font-size: 18px; margin: 0 0 8px; }
.ov-title { margin: 0; display: flex; flex-direction: column; line-height: .9; }
.ov-title span:first-child { font-size: clamp(56px, 15vw, 128px); transform: scaleX(.85); transform-origin: left; }
.ov-title span:last-child { font-size: clamp(40px, 11vw, 92px); color: var(--green); transform: scaleX(1.05); transform-origin: left; margin-left: .4em; text-shadow: 0 0 30px rgba(157, 255, 46, .5); }
.ov-stamp {
  display: inline-block; margin: 22px 0 0; padding: 4px 14px;
  font-family: var(--serif); font-weight: 800; font-size: 40px; letter-spacing: .3em;
  color: var(--green); border: 3px solid var(--green); transform: rotate(-6deg);
  animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) .5s both;
}
.ov-text { font-size: 18px; color: #d4cbe6; margin: 18px 0 24px; }
.ov-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ov-btn {
  display: inline-block; padding: 14px 26px; border: 0; cursor: pointer;
  font: 800 16px/1 var(--cond); letter-spacing: .24em; text-decoration: none;
  background: var(--green); color: var(--void);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.ov-btn.ghost { background: transparent; color: var(--text); outline: 1px solid var(--purple-400); outline-offset: -1px; }
.overlay.error .ov-title span:last-child { color: var(--red); text-shadow: 0 0 30px rgba(255, 42, 61, .5); }
.overlay.error .ov-stamp { color: var(--red); border-color: var(--red); }
.overlay.error { background:
  repeating-linear-gradient(-45deg, rgba(255, 42, 61, .07) 0 22px, transparent 22px 44px), rgba(0, 0, 0, .94); }
@keyframes fadein { from { opacity: 0; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-6deg) scale(2.2); } }

/* ---------- AT field ---------- */
.atfield { position: fixed; inset: 0; z-index: 15; pointer-events: none; display: grid; place-items: center; }
.atfield i {
  position: absolute; width: 80px; height: 80px; opacity: 0;
  border: 3px solid var(--orange);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  box-shadow: 0 0 30px var(--orange) inset;
  background: radial-gradient(rgba(255, 122, 26, .15), transparent 70%);
}
.atfield.go i { animation: at 1.1s cubic-bezier(.1, .7, .3, 1) both; }
.atfield.go i:nth-child(2) { animation-delay: .1s; }
.atfield.go i:nth-child(3) { animation-delay: .2s; }
.atfield.go i:nth-child(4) { animation-delay: .3s; }
@keyframes at { 0% { opacity: .9; transform: scale(.2); } 100% { opacity: 0; transform: scale(14); } }

/* ---------- terms dialog ---------- */
.terms-dialog {
  width: min(560px, calc(100% - 32px)); max-height: 85vh; padding: 18px;
  background: var(--abyss); color: var(--text); border: 1px solid var(--purple-400);
}
.terms-dialog::backdrop { background: rgba(0, 0, 0, .75); }
.terms-body { font-size: 16px; color: #d4cbe6; }
.terms-body ol { padding-left: 20px; }
.terms-body li { margin-bottom: 8px; }
.terms-quote { color: var(--purple-300); font-size: 15px; }
.terms-dialog form { margin-top: 12px; text-align: right; }

/* ---------- state: granted flashes ---------- */
body[data-state="granted"] .tape { background: repeating-linear-gradient(-45deg, var(--green) 0 14px, var(--green-dim) 14px 28px); background-size: 39.6px 10px; }
body[data-state="error"] .tape { background: repeating-linear-gradient(-45deg, var(--red) 0 14px, #2a0508 14px 28px); background-size: 39.6px 10px; }

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  .eva { width: 130px; right: -14px; top: 190px; opacity: .45; }
  .readout { grid-template-columns: 1fr; }
  .launch-text { font-size: 17px; letter-spacing: .16em; }
  .magi-node { font-size: 12px; padding: 8px 10px; }
  .magi-node .vote { font-size: 19px; }
  .magi-grid { gap: 10px 8%; }
  .sysclock .jp { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
