*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ef-paper);
  color: var(--ef-ink);
  font-family: var(--ef-font-ui);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.2s, color 0.2s;
}

.ef-contours-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--ef-contour-opacity);
}
:root[data-theme='dark'] .ef-contours-bg { filter: invert(1); }

.ef-coord-marks { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.ef-coord-marks span {
  position: absolute;
  font-family: var(--ef-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ef-ink-2);
  opacity: 0.48;
}
.ef-coord-marks .tl { top: 66px; right: 20px; left: auto; }
.ef-coord-marks .br { bottom: 12px; right: 16px; }

.ef-mono-asset { transition: filter 0.18s; }
:root:not([data-theme='dark']) .ef-mono-asset { filter: invert(1); }

/* Top 3-color bar + Always-dark Command Bar */
.ef-tri {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 3px;
}
.ef-tri i:nth-child(1) { background: var(--ef-tri-a); }
.ef-tri i:nth-child(2) { background: var(--ef-tri-b); }
.ef-tri i:nth-child(3) { background: var(--ef-tri-c); }

.ef-cmdbar {
  position: sticky;
  top: 3px;
  z-index: 59;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0 1.25rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: #161616;
  color: #ededed;
  border-bottom: 1px solid #2b2b2b;
}
.ef-cmdbar .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  text-decoration: none;
  color: #ededed;
}
.ef-cmdbar .seal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  background: linear-gradient(-45deg, transparent 7px, #fffa00 7.5px);
}
.ef-cmdbar .seal-svg { width: 24px; height: 24px; fill: #161616; }
.ef-cmdbar .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.ef-cmdbar .brand-text strong { font-size: 0.92rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.ef-cmdbar .brand-text small { font-family: var(--ef-font-mono); font-size: 0.62rem; letter-spacing: 0.14em; color: #a3a3a3; }

.ef-cmdbar nav { display: flex; flex-wrap: wrap; margin-right: auto; }
.ef-cmdbar nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  padding: 0.35rem 1.15rem 0.35rem 0.85rem;
  background: transparent;
  border: 0;
  color: #b8b8b8;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.ef-cmdbar nav a small { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.ef-cmdbar nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: #fffa00;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ef-mech);
}
.ef-cmdbar nav a:hover { color: #ffffff; background: #222222; }
.ef-cmdbar nav a:hover::after { transform: scaleX(1); }
.ef-cmdbar nav a[aria-current='page'] {
  color: #161616;
  background: linear-gradient(-45deg, transparent 10px, #fffa00 10.5px);
}
.ef-cmdbar nav a[aria-current='page'] small { color: #161616; opacity: 0.85; }
.ef-cmdbar nav a[aria-current='page']::after { display: none; }

.ef-cmdbar .util { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0; }
.hud-wallets { display: flex; align-items: center; gap: 0.4rem; }
.hud-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.24rem 0.65rem 0.24rem 0.38rem;
  background: #232323;
  border: 1px solid #353535;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ededed;
}
.hud-wallet-pill img { width: 22px; height: 22px; object-fit: contain; }
.hud-wallet-pill span.lbl { font-size: 0.62rem; color: #a3a3a3; letter-spacing: 0.08em; }

.hud-op {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.7rem 0.2rem 0.25rem;
  background: #222222;
  border: 1px solid #383838;
}
.hud-op img { width: 30px; height: 30px; object-fit: cover; background: #111; border: 1px solid #fffa00; }
.hud-op-info { display: flex; flex-direction: column; line-height: 1.15; }
.hud-op-info b { font-size: 0.76rem; color: #ededed; }
.hud-op-info small { font-family: var(--ef-font-mono); font-size: 0.62rem; color: #fffa00; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem;
}
.view { display: none; }
.view.is-active { display: block; animation: ef-view-in 240ms var(--ef-mech) both; }
body.preview-all .view { display: block !important; margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px dashed var(--ef-rule); }
@keyframes ef-view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.ef-head {
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr);
  align-items: center;
  gap: 0.35rem 1.25rem;
  margin-bottom: 1.35rem;
}
.ef-head::after {
  content: '';
  grid-column: 2;
  grid-row: 1;
  height: 0.9rem;
  background: var(--ef-hatch);
  border-left: 0.9rem solid var(--ef-ink);
}
.ef-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem; margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.15rem); font-weight: 800; line-height: 1.15; }
.ef-head h1 small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-ink-2); }
.ef-head p { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; color: var(--ef-ink-2); }

.ef-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ef-ink-2); }
.ef-eyebrow.slash::before { content: '// '; letter-spacing: 0; color: var(--ef-trace); }

.ef-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem calc(0.5rem + var(--ef-cut)) 0.12rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ef-tag-fg);
  background: linear-gradient(-45deg, transparent calc(var(--ef-cut) - 0.5px), var(--ef-tag-bg) var(--ef-cut));
}
.ef-tag.signal { color: var(--ef-on-signal); background: linear-gradient(-45deg, transparent calc(var(--ef-cut) - 0.5px), var(--ef-signal) var(--ef-cut)); }
.ef-tag.mint { color: #161616; background: linear-gradient(-45deg, transparent calc(var(--ef-cut) - 0.5px), var(--ef-tri-c) var(--ef-cut)); }

.ef-btn {
  --fill: var(--ef-chip);
  --wipe: var(--ef-signal);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.35rem 0.55rem 0.95rem;
  border: 0;
  background: var(--fill);
  -webkit-mask: linear-gradient(-45deg, transparent var(--ef-cut-btn), #000 calc(var(--ef-cut-btn) + 0.5px));
  mask: linear-gradient(-45deg, transparent var(--ef-cut-btn), #000 calc(var(--ef-cut-btn) + 0.5px));
  color: var(--ef-ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s 0.05s, transform 0.1s;
}
.ef-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--wipe);
  transform: translateX(-101%);
  transition: transform 0.25s var(--ef-mech);
}
.ef-btn:hover::before, .ef-btn:focus-visible::before { transform: none; }
.ef-btn:hover, .ef-btn:focus-visible { color: var(--ef-on-signal); }
.ef-btn:active { transform: translateY(1px) scale(0.985); }
.ef-btn.primary { --fill: var(--ef-signal); color: var(--ef-on-signal); }
.ef-btn.primary::before { background: var(--ef-ink); }
.ef-btn.primary:hover { color: var(--ef-panel); }
.ef-btn.go { --fill: var(--ef-ink); color: var(--ef-panel); }
.ef-btn.small { padding: 0.34rem 1.05rem 0.34rem 0.7rem; font-size: 0.78rem; }
.ef-btn.cmd-theme { --fill: #2c2c2c; color: #ededed; }
.ef-btn.cmd-theme:hover { color: #161616; }

.ef-panel {
  position: relative;
  min-width: 0;
  padding: 1rem 1.15rem 1.15rem;
  background: var(--ef-panel);
  border: 1px solid var(--ef-rule);
}
.ef-panel::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 4px;
  background: var(--ef-trace);
  transform: scaleX(0.16);
  transform-origin: left;
  transition: transform 0.35s var(--ef-mech);
  pointer-events: none;
}
.ef-panel:hover::before, .ef-panel:focus-within::before { transform: none; }

.ef-panel-shell {
  position: relative;
  background: var(--ef-rule);
  padding: 1px;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.ef-panel-shell > .ef-panel-inner {
  position: relative;
  background: var(--ef-panel);
  padding: 1rem 1.15rem 1.15rem;
  height: 100%;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 21.5px), calc(100% - 21.5px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 21.5px), calc(100% - 21.5px) 100%, 0 100%);
}
.ef-panel-shell > .ef-panel-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--ef-trace);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.35s var(--ef-mech);
}
.ef-panel-shell:hover > .ef-panel-inner::before { transform: none; }

.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin: 0 0 0.75rem; }
.panel-title h2 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.panel-title span.sub { font-family: var(--ef-font-mono); font-size: 0.72rem; color: var(--ef-ink-2); }

.ef-item-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: none;
  background: var(--ef-slot);
  border: 1px solid var(--ef-rule);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.ef-item-slot.dark-well { background: var(--ef-slot-dark); border-color: #3a3a3a; }
.ef-item-slot::after {
  content: attr(data-code);
  position: absolute;
  top: 2px; left: 4px;
  font-family: var(--ef-font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ef-ink-2);
}
.ef-item-slot.dark-well::after { color: #8c8c8c; }
.ef-item-slot img { width: 54px; height: 54px; object-fit: contain; }
.ef-item-slot .rarity-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ef-signal); }
.ef-item-slot .rarity-bar.purple { background: var(--ef-tri-a); }
.ef-item-slot .rarity-bar.mint { background: var(--ef-tri-c); }

/* View 01 */
.console-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.op-card-top { display: flex; gap: 0.9rem; align-items: center; }
.op-avatar-frame { position: relative; width: 76px; height: 76px; flex: none; background: #161616; border: 1px solid var(--ef-trace); overflow: hidden; }
.op-avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.op-avatar-frame .corner-badge {
  position: absolute; right: 0; bottom: 0; padding: 1px 4px;
  background: var(--ef-signal); color: #161616; font-family: var(--ef-font-mono); font-size: 9px; font-weight: 800;
}
.op-switcher { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--ef-rule); }
.op-pick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; padding: 0.35rem 0.2rem;
  border: 1px solid var(--ef-rule); background: var(--ef-chip); color: var(--ef-ink);
  font-family: inherit; font-size: 0.7rem; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.op-pick img { width: 28px; height: 28px; object-fit: cover; background: #161616; }
.op-pick.is-active { border-color: var(--ef-trace); background: var(--ef-signal); color: #161616; }

.ef-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--ef-rule); }
.ef-figs .metric { display: grid; gap: 0.15rem; }
.ef-figs b { font-size: 1.7rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ef-figs span { display: flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; color: var(--ef-ink-2); }
.ef-figs span img { width: 18px; height: 18px; object-fit: contain; }

.ef-cells-bar { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; margin: 0.5rem 0 0.75rem; }
.ef-cells-bar i { display: block; height: 10px; background: var(--ef-chip); }
.ef-cells-bar i.on { background: var(--ef-signal); }

.ef-rows { margin: 0 -1.15rem -1.15rem; padding: 0; list-style: none; border-top: 1px solid var(--ef-rule); }
.ef-rows li {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem; align-items: center; padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--ef-rule); font-size: 0.82rem; transition: background-color 0.15s;
}
.ef-rows li::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ef-trace);
  transform: scaleY(0); transform-origin: top; transition: transform 0.18s var(--ef-snap);
}
.ef-rows li:hover { background: var(--ef-paper); }
.ef-rows li:hover::before { transform: none; }
.ef-rows li:last-child { border-bottom: 0; }
.ef-rows img.mini-av { width: 28px; height: 28px; object-fit: cover; background: #161616; border: 1px solid var(--ef-rule); }

.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.game-card { display: grid; gap: 0.85rem; }
.game-card-head { display: flex; gap: 0.9rem; align-items: flex-start; }
.game-card-body { min-width: 0; flex: 1; }
.game-card-body h3 { margin: 0.15rem 0 0.25rem; font-size: 1.06rem; font-weight: 800; }
.game-card-body p { margin: 0; font-size: 0.81rem; color: var(--ef-ink-2); line-height: 1.45; }
.game-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-top: 0.65rem; border-top: 1px solid var(--ef-rule); }
.game-stats { display: flex; gap: 0.8rem; font-family: var(--ef-font-mono); font-size: 0.74rem; color: var(--ef-ink-2); }
.game-stats b { color: var(--ef-ink); }

.sector-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.15rem; background: var(--ef-hatch-soft), var(--ef-panel);
  border: 1px solid var(--ef-rule); border-left: 5px solid var(--ef-signal);
}
.sector-banner-left { display: flex; align-items: center; gap: 0.85rem; }
.sector-banner-left img.dept { width: 44px; height: 44px; object-fit: contain; }
/* Application states use the same console geometry and tokens as the reference. */
:root { font-synthesis: none; }
body { min-width: 280px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ef-trace); outline-offset: 3px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.ef-contours-bg { background: url('/assets/svg/contour-a.svg') center / cover; }
.ef-cmdbar { gap: 0 1.1rem; }
.ef-cmdbar .seal img { width: 25px; height: 25px; object-fit: contain; }
.ef-cmdbar nav a { text-decoration: none; }
.ef-cmdbar .util { margin-left: auto; }
.hud-wallet-pill { padding: 0 9px 0 0; }
.wallet-slot { display: grid; place-items: center; width: 32px; height: 32px; background: #161616; }
.hud-op { max-width: 190px; }
.hud-op-info { min-width: 0; }
.hud-op-info b { max-width: 105px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap { min-height: calc(100vh - 130px); padding-bottom: 2rem; }
.ef-head h1 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
.ef-head h1 small { white-space: normal; }
.stack > * { min-width: 0; }
.ef-panel-inner { min-width: 0; }
.ef-panel-shell:focus-within > .ef-panel-inner::before { transform: none; }
.op-name { margin: 0; font-size: 1.03rem; }
.op-meta { margin-top: 4px; font-family: var(--ef-font-mono); font-size: .67rem; color: var(--ef-ink-2); overflow-wrap: anywhere; }
.op-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.op-switcher { margin-bottom: .85rem; }
.op-pick { white-space: normal; min-height: 62px; }
.op-pick:disabled { opacity: .35; }
.ef-figs { margin-top: .85rem; }
.ef-figs .metric { min-width: 0; }
.ef-figs b { overflow-wrap: anywhere; }
.ef-figs .secondary-figure { font-size: 1.35rem; padding-top: .25rem; }
.account-link { width: 100%; margin-top: 1rem; }
.panel-copy { margin: 0 0 .85rem; color: var(--ef-ink-2); font-size: .81rem; }
.supply-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .8rem; }
.supply-row + .supply-row { border-top: 1px solid var(--ef-rule); padding-top: .8rem; margin-top: .8rem; }
.supply-row b, .mono { font-family: var(--ef-font-mono); font-variant-numeric: tabular-nums; }
.ef-rows li { grid-template-columns: minmax(0, 1fr) auto; }
.ef-rows li time { display: block; font-family: var(--ef-font-mono); font-size: .65rem; color: var(--ef-ink-2); margin-top: .2rem; }
.ef-rows li > div { min-width: 0; overflow-wrap: anywhere; }
.ef-rows .empty-row { display: block; color: var(--ef-ink-2); }
.sector-banner { border-left-color: var(--ef-rule); }
.sector-banner-left { min-width: 0; }
.sector-banner h2 { margin: .15rem 0; font-size: 1.05rem; }
.sector-banner p { margin: 0; color: var(--ef-ink-2); font-size: .8rem; }
.game-card { height: 100%; }
.game-card-body .ef-eyebrow { font-size: .62rem; overflow-wrap: anywhere; }
.game-card-foot { margin-top: auto; }
.games-grid > .ef-panel-shell { min-width: 0; }
.game-card-head .ef-item-slot { width: 68px; height: 72px; }
.game-card-head .ef-item-slot img { width: 56px; height: 56px; }
.game-card-foot .ef-btn { white-space: nowrap; }
.empty-state { padding: 2.25rem 1rem; text-align: center; }
.empty-state .ef-item-slot { margin: 0 auto 1rem; }
.empty-state h2 { margin: .4rem 0; }
.empty-state p { color: var(--ef-ink-2); font-size: .85rem; }
.account-grid { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); gap: 1.25rem; align-items: start; }
.account-grid > * { min-width: 0; }
.account-form { display: grid; gap: .65rem; }
.account-form label { display: grid; gap: .35rem; font-size: .8rem; font-weight: 700; }
.account-form input { min-width: 0; width: 100%; padding: .65rem .7rem; color: var(--ef-ink); background: var(--ef-paper); border: 1px solid var(--ef-rule); }
.account-form .ef-btn { justify-self: start; margin-top: .2rem; }
.account-form p { margin: 0; font-size: .77rem; color: var(--ef-ink-2); }
.account-form + details, .account-form + .account-form { border-top: 1px solid var(--ef-rule); padding-top: 1rem; margin-top: 1rem; }
details summary { cursor: pointer; font-size: .84rem; font-weight: 700; }
details .account-form { margin-top: 1rem; }
.ledger { padding: 0; margin: 0 -1.15rem -1.15rem; list-style: none; border-top: 1px solid var(--ef-rule); }
.ledger li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .6rem; padding: .8rem 1.15rem; border-bottom: 1px solid var(--ef-rule); font-size: .84rem; }
.ledger time { display: block; margin-top: .2rem; font-size: .68rem; color: var(--ef-ink-2); font-family: var(--ef-font-mono); }
.ledger b { font-family: var(--ef-font-mono); font-variant-numeric: tabular-nums; }
.positive { color: var(--ef-mint); }
.medal-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.stat-list div { border-bottom: 1px solid var(--ef-rule); padding-bottom: .4rem; font-size: .8rem; overflow-wrap: anywhere; }
.stat-list b { display: block; font-family: var(--ef-font-mono); margin-top: .25rem; }
.cabinet-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.room-meta { font-family: var(--ef-font-mono); color: var(--ef-ink-2); font-size: .75rem; overflow-wrap: anywhere; }
#game-container { min-height: 330px; }
.connection { position: relative; z-index: 5; margin: 0; padding: .7rem 1rem; background: var(--ef-chip); color: var(--ef-ink); border-bottom: 1px solid var(--ef-rule); text-align: center; font-size: .8rem; }
.text-button { background: none; border: 0; padding: .2rem .3rem; text-decoration: underline; color: inherit; }
#toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; padding: .7rem 1.2rem; background: var(--ef-ink); color: var(--ef-panel); border-left: 4px solid var(--ef-trace); font-size: .85rem; overflow-wrap: anywhere; box-shadow: 0 4px 18px #0003; }
.site-footer { position: relative; max-width: 1380px; margin: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: 1rem clamp(1rem,3vw,2rem) 1.5rem; color: var(--ef-ink-2); font-size: .65rem; letter-spacing: .08em; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 120; padding: .7rem; background: var(--ef-signal); color: #161616; }
.skip-link:focus { top: 8px; }
.ef-mobile-tabbar { display: none; }
@media (max-width: 1200px) { .ef-cmdbar { gap: 0 .6rem; } .ef-cmdbar nav a { padding-right: .8rem; padding-left: .6rem; } .brand-text small { display: none; } .hud-op-info { display: none; } }
@media (max-width: 1080px) { .console-grid { grid-template-columns: 290px minmax(0,1fr); } .games-grid { grid-template-columns: 1fr; } .account-grid { grid-template-columns: minmax(240px,.8fr) minmax(0,1.2fr); } }
@media (max-width: 800px) { .console-grid { grid-template-columns: 1fr; } .console-grid > aside { grid-template-columns: 1fr 1fr; align-items: start; } .console-grid > aside > :first-child { grid-row: span 2; } .games-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .hud-wallet-pill { display: none; } .ef-cmdbar .brand-text strong { font-size: .8rem; } .ef-cmdbar nav a { font-size: .78rem; } }
@media (max-width: 720px) {
  .ef-cmdbar { min-height: 58px; padding: 0 1rem; gap: .5rem; flex-wrap: nowrap; }
  .ef-cmdbar nav, .hud-wallet-pill { display: none; }
  .ef-cmdbar .brand-text strong { font-size: .82rem; }
  .ef-cmdbar .brand-text small { display: block; font-size: .5rem; letter-spacing: .04em; }
  .ef-cmdbar .util { gap: .45rem; }
  .hud-op { padding: .15rem; border: 0; }
  .hud-op img { width: 29px; height: 29px; }
  .cmd-theme { padding-right: .85rem !important; padding-left: .55rem !important; font-size: .72rem !important; }
  .wrap { padding: 1.25rem 1rem 1.5rem; }
  .ef-head { grid-template-columns: minmax(0,1fr) 2rem; }
  .ef-head h1 { display: grid; gap: .5rem; font-size: 1.5rem; }
  .ef-head h1 small { font-size: .6rem; letter-spacing: .09em; }
  .ef-head p { font-size: .78rem; }
  .console-grid > aside { display: grid; grid-template-columns: 1fr; }
  .console-grid > aside > :first-child { grid-row: auto; }
  .games-grid, .account-grid { grid-template-columns: 1fr; }
  .ef-mobile-tabbar { position: fixed; inset: auto 0 0; z-index: 70; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--ef-panel); border-top: 1px solid var(--ef-rule); }
  .ef-mobile-tabbar a { display: grid; place-content: center; justify-items: center; min-height: 50px; font-size: .78rem; font-weight: 700; }
  .ef-mobile-tabbar small { font-size: .56rem; letter-spacing: .1em; color: var(--ef-ink-2); }
  .ef-mobile-tabbar a[aria-current='page'] { background: linear-gradient(-45deg,transparent 7px,var(--ef-signal) 7.5px); color: #161616; }
  .ef-mobile-tabbar a[aria-current='page'] small { color: #161616; }
  .site-footer { padding-bottom: calc(95px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(83px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) { .brand-text small { display: none !important; } .ef-cmdbar .seal { width: 29px; height: 29px; } .ef-cmdbar { gap: .3rem; padding: 0 .65rem; } .brand { gap: .4rem !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.archive-medal-preview { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 1.45rem; margin-top: .65rem; }
.archive-medal-preview .panel-copy { margin: 0; font-size: .7rem; }
.account-link[data-command] { width: 100%; margin-top: .85rem; }
.leaderboard-panel { padding-bottom: 0; }
.ranking-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .35rem; margin: 0 -.2rem .6rem; }
.ranking-tabs button { min-height: 38px; border: 1px solid var(--ef-rule); background: var(--ef-paper); color: var(--ef-ink-2); font-size: .75rem; font-weight: 800; }
.ranking-tabs button[aria-selected='true'] { border-color: var(--ef-trace); background: var(--ef-trace); color: var(--ef-paper); }
.ranking-list { margin: 0 -1.15rem; padding: 0; list-style: none; border-top: 1px solid var(--ef-rule); }
.ranking-row { display: grid; grid-template-columns: 1.25rem 34px minmax(0,1fr) auto; gap: .55rem; align-items: center; min-width: 0; padding: .65rem 1rem; border-bottom: 1px solid var(--ef-rule); }
.ranking-row > img { width: 34px; height: 34px; object-fit: cover; border: 1px solid var(--ef-rule); background: #161616; }
.rank-number { color: var(--ef-ink-2); font: 700 .74rem var(--ef-font-mono); text-align: right; }
.ranking-identity { min-width: 0; display: grid; gap: .08rem; }
.ranking-identity b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.ranking-identity > span { color: var(--ef-ink-2); font: .58rem var(--ef-font-mono); }
.ranking-medals { display: flex; flex-wrap: wrap; gap: .2rem; min-width: 0; margin-top: .1rem; }
.ranking-medals span { max-width: 100%; padding: 0 .25rem; background: var(--ef-chip); color: var(--ef-ink-2); font-size: .56rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-score { display: flex; align-items: baseline; gap: .2rem; font: 700 .75rem var(--ef-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking-score small { color: var(--ef-ink-2); font-size: .58rem; }
.ranking-empty { padding: .9rem 1rem; color: var(--ef-ink-2); font-size: .75rem; }
.archive-dialog { width: min(720px,calc(100vw - 32px)); max-width: 720px; max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid var(--ef-trace); background: var(--ef-panel); color: var(--ef-ink); box-shadow: 0 16px 50px #0007; clip-path: polygon(0 0,100% 0,100% calc(100% - 22px),calc(100% - 22px) 100%,0 100%); }
.archive-dialog::backdrop { background: #080808b8; }
.archive-dialog-head { position: sticky; z-index: 1; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.25rem .85rem; background: var(--ef-panel); border-bottom: 1px solid var(--ef-rule); }
.archive-dialog-head h2 { margin: .15rem 0; font-size: 1.25rem; }
.archive-dialog-head p { margin: 0; color: var(--ef-ink-2); font-size: .78rem; }
.archive-dialog-head .ef-btn { flex: none; }
.archive-form { display: grid; gap: 1rem; padding: 1rem 1.25rem 1.25rem; }
.archive-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.archive-form legend { margin-bottom: .5rem; font-size: .85rem; font-weight: 800; }
.archive-form legend small { margin-left: .35rem; color: var(--ef-ink-2); font-size: .68rem; font-weight: 500; }
.archive-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); gap: .45rem; }
.archive-choice { position: relative; display: grid; grid-template-columns: 32px minmax(0,1fr); grid-template-rows: auto auto; gap: .12rem .5rem; align-items: center; min-width: 0; min-height: 56px; padding: .4rem; background: var(--ef-paper); border: 1px solid var(--ef-rule); cursor: pointer; }
.archive-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.archive-choice > span { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; background: #161616; }
.archive-choice > span img { width: 100%; height: 100%; object-fit: cover; }
.archive-choice > span i { width: 100%; height: 100%; background: var(--choice-color,var(--ef-chip)); }
.archive-choice > b { grid-column: 2; grid-row: 1 / span 2; min-width: 0; font-size: .72rem; overflow-wrap: anywhere; }
.archive-choice.is-selected { border-color: var(--ef-trace); box-shadow: inset 0 -3px var(--ef-trace); }
.archive-choice:focus-within { outline: 2px solid var(--ef-trace); outline-offset: 2px; }
.archive-choice.is-locked { opacity: .48; cursor: not-allowed; }
.archive-choice.is-locked > span { filter: grayscale(1); }
.archive-options .panel-copy { grid-column: 1 / -1; margin: .15rem 0; font-size: .75rem; }
.archive-banner-swatch { background: repeating-linear-gradient(-45deg,#161616 0 6px,#353535 6px 8px) !important; }
.archive-medal-mark { display: grid; place-items: center; color: var(--ef-signal); font-style: normal; }
.archive-dialog-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .8rem; border-top: 1px solid var(--ef-rule); }
.archive-dialog-foot .panel-copy { margin: 0; font-size: .72rem; }
@media (max-width: 720px) {
  .archive-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .archive-dialog-head { padding: .85rem .85rem .7rem; gap: .5rem; }
  .archive-dialog-head h2 { font-size: 1.05rem; }
  .archive-dialog-head p { max-width: 31ch; font-size: .7rem; }
  .archive-form { gap: .8rem; padding: .8rem .85rem 1rem; }
  .archive-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .archive-dialog-foot { align-items: stretch; }
  .archive-dialog-foot .ef-btn { width: 100%; min-height: 44px; }
}

/* Explicit operator access: restrained signal yellow, hard edges, both themes. */
.auth-entry { white-space: nowrap; }
.auth-online-dot { display: inline-block; flex: none; width: 7px; height: 7px; background: #00ffa2; border: 1px solid #007b50; vertical-align: middle; }
.hud-op.is-online .hud-op-info { display: grid; }
.hud-op.is-online .auth-online-dot { margin: 0 3px; }
.account-session { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.25rem; }
.account-session > div { min-width: 0; flex: 1 1 220px; }
.account-session h2 { margin: .25rem 0; font-size: 1.05rem; }
.account-session h2 .auth-online-dot { margin-right: .5rem; }
.account-session p { margin: 0; font-size: .78rem; color: var(--ef-ink-2); }
.auth-dialog { width: min(440px,calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 1.25rem; overflow: auto; border: 1px solid var(--ef-rule); border-top: 3px solid #fffa00; background: var(--ef-panel); color: var(--ef-ink); box-shadow: 0 18px 60px #0007; }
.auth-dialog::backdrop { background: #080808ba; }
.auth-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; margin-bottom: 1.1rem; }
.auth-dialog-head h2 { margin: .25rem 0 0; font-size: 1.2rem; }
.auth-dialog-head > div { min-width: 0; }
.auth-dialog-head .ef-btn { flex: none; }
.auth-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
.auth-tabs button { min-width: 0; min-height: 44px; padding: .5rem .3rem; background: var(--ef-paper); color: var(--ef-ink); border: 1px solid var(--ef-rule); font-weight: 800; font-size: .82rem; }
.auth-tabs button[aria-selected='true'] { background: linear-gradient(-45deg,transparent 9px,#fffa00 9.5px); color: #161616; border-color: transparent; }
.auth-note { min-height: 3em; margin: .85rem 0 1rem; font-size: .8rem; color: var(--ef-ink-2); font-variant-numeric: tabular-nums; }
.auth-form { display: grid; gap: .45rem; }
.auth-form > label { font-size: .83rem; font-weight: 800; }
.auth-form > label:not(:first-child) { margin-top: .55rem; }
.auth-form input { width: 100%; min-width: 0; min-height: 46px; padding: .65rem .7rem; border: 1px solid var(--ef-rule); background: var(--ef-paper); color: var(--ef-ink); font-size: 16px; }
.auth-form input::placeholder { color: var(--ef-ink-2); opacity: 1; font-size: .8rem; }
.auth-form > small, .auth-safety { color: var(--ef-ink-2); font-size: .72rem; }
.auth-pin-field { display: grid; grid-template-columns: minmax(0,1fr) 46px; border: 1px solid var(--ef-rule); background: var(--ef-paper); }
.auth-pin-field input { border: 0; font-variant-numeric: tabular-nums; }
.auth-pin-toggle { display: grid; place-items: center; border: 0; border-left: 1px solid var(--ef-rule); background: var(--ef-chip); color: var(--ef-ink); }
.auth-pin-toggle .auth-eye-slash { display: none; }
.auth-pin-toggle[aria-pressed='true'] .auth-eye-slash { display: block; }
.auth-error { margin: .45rem 0 0; padding: .6rem .7rem; border-left: 3px solid var(--ef-danger); color: var(--ef-danger); background: var(--ef-paper); font-size: .82rem; }
#auth-submit { width: 100%; min-height: 46px; margin-top: .75rem; white-space: normal; }
.auth-safety { margin: .5rem 0 0; }
.ddz-auth-guide { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; padding: .75rem .85rem; border: 1px solid var(--ef-rule); border-left: 3px solid var(--ef-trace); background: var(--ef-paper); }
.ddz-auth-guide p { min-width: 0; flex: 1 1 230px; margin: 0; color: var(--ef-ink-2); font-size: .78rem; }
.ddz-auth-guide .ef-btn { flex: none; }
@media (max-width: 1200px) {
  .hud-op.is-online .hud-op-info b { max-width: 72px; }
  .hud-op.is-online .hud-op-info small { display: none; }
}
@media (max-width: 720px) {
  .ef-cmdbar .brand { min-width: 0; flex: 1; gap: .4rem; }
  .ef-cmdbar .brand-text { min-width: 0; }
  .ef-cmdbar .brand-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; letter-spacing: .02em; }
  .ef-cmdbar .brand-text small { display: none; }
  .ef-cmdbar .seal { width: 28px; height: 30px; }
  .ef-cmdbar .util { min-width: 0; flex: none; gap: .35rem; }
  .auth-entry { min-height: 38px; padding: .5rem .8rem .5rem .6rem !important; font-size: .73rem !important; }
  .hud-op.is-online { min-width: 0; max-width: 135px; gap: .3rem; }
  .hud-op.is-online .hud-op-info b { max-width: 62px; font-size: .72rem; }
  .hud-op.is-online .auth-online-dot { width: 6px; height: 6px; margin: 0; }
  .account-session { padding: .85rem; }
  .account-session .ef-btn { min-height: 44px; }
  .auth-dialog { padding: 1rem; max-height: calc(100dvh - 24px); }
  .auth-dialog-head h2 { font-size: 1.1rem; }
}
