:root {
  color-scheme: dark;
  --bg: #050913;
  --bg-elevated: #08101c;
  --panel: #0d1422;
  --panel-soft: #121d2f;
  --panel-line: rgba(238, 244, 255, 0.14);
  --text: #f8fbff;
  --muted: #aeb9c9;
  --muted-dark: #66758b;
  --metal: #dce5ef;
  --blue-glow: #266188;
  --accent: #ff2e58;
  --accent-soft: rgba(255, 46, 88, 0.16);
  --accent-line: rgba(255, 46, 88, 0.66);
  --hot: #ff2e58;
  --hot-soft: rgba(255, 46, 88, 0.15);
  --good: #2fe0cf;
  --good-soft: rgba(47, 224, 207, 0.13);
  --warning: #ffd36a;
  --warning-soft: rgba(255, 211, 106, 0.14);
  --display: "Teko", Impact, sans-serif;
  --body: "Rajdhani", Arial, sans-serif;
  --panel-shadow: 0 26px 90px rgba(0, 0, 0, 0.5), 0 0 44px rgba(255, 46, 88, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 4%, rgba(40, 94, 132, 0.34), transparent 28rem),
    radial-gradient(circle at 84% 23%, rgba(255, 46, 88, 0.24), transparent 34rem),
    radial-gradient(circle at 60% 100%, rgba(112, 18, 25, 0.28), transparent 32rem),
    linear-gradient(120deg, rgba(3, 9, 20, 0.96), rgba(6, 10, 18, 0.98) 45%, rgba(22, 9, 14, 0.96)),
    var(--bg);
  font-family: var(--body);
  font-weight: 500;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 83% 23%, rgba(255, 46, 88, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.28) 0 1px, transparent 2px),
    repeating-linear-gradient(112deg, transparent 0 38px, rgba(255, 255, 255, 0.035) 39px 40px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
  background-size: 98px 98px, 140px 140px, auto, auto;
  mix-blend-mode: screen;
}

.site-header,
main,
footer {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-line);
  background: linear-gradient(180deg, rgba(5, 9, 19, 0.84), rgba(5, 9, 19, 0));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.access-badge {
  border: 1px solid rgba(255, 46, 88, 0.42);
  border-radius: 30px;
  padding: 5px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sign-out-button {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sign-out-button:hover {
  color: var(--text);
}

.access-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.access-card {
  width: min(100%, 520px);
  border: 1px solid var(--accent-line);
  border-radius: 0;
  padding: 30px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 46, 88, 0.22), transparent 15rem),
    linear-gradient(145deg, rgba(38, 97, 136, 0.18), transparent 44%),
    linear-gradient(18deg, rgba(255, 46, 88, 0.08), transparent 38%),
    var(--panel);
  box-shadow: var(--panel-shadow);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.access-card .brand-mark {
  margin-bottom: 36px;
}

.access-card h1 {
  margin: 9px 0 13px;
  font-size: clamp(64px, 12vw, 92px);
}

.access-card > p:not(.eyebrow, .access-error) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.access-card form,
.code-form {
  display: grid;
  gap: 14px;
}

.access-card form {
  margin-top: 24px;
}

.access-card label,
.code-form label {
  display: grid;
  gap: 7px;
}

.access-card label span,
.code-form label > span,
.scope-summary span {
  color: var(--muted-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.access-card input,
.code-form input {
  min-height: 46px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.2);
}

.field-hint {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.access-error,
.admin-form-status {
  min-height: 18px;
  margin: 0;
  color: var(--hot);
  font-size: 11px;
  line-height: 1.5;
}

.brand,
.source-link,
.text-link,
footer a {
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(248, 251, 255, 0.7);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 46, 88, 0.95), rgba(112, 18, 25, 0.72)),
    var(--panel);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 22px rgba(255, 46, 88, 0.24);
  transform: skewX(-14deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-transform: uppercase;
}

.brand small {
  margin-top: 5px;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-self: stretch;
  gap: 28px;
}

.nav-button {
  position: relative;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--accent), #f8fbff);
  opacity: 0;
  transform: scaleX(0.5);
  transition: 180ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--text);
}

.nav-button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.count-pill {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  border: 1px solid rgba(255, 46, 88, 0.45);
  border-radius: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 46, 88, 0.58), rgba(255, 46, 88, 0.12));
  font-size: 10px;
}

.source-link,
footer a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-link span {
  display: inline-block;
  margin-left: 4px;
  font-size: 15px;
}

.hero {
  display: grid;
  min-height: 590px;
  align-items: center;
  gap: 60px;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--text);
  text-transform: uppercase;
  text-shadow:
    0 0 22px rgba(255, 255, 255, 0.08),
    0 0 38px rgba(255, 46, 88, 0.1);
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(62px, 8.2vw, 118px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.79;
}

h1 span {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255, 46, 88, 0.35);
}

.hero-description {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions,
.flashcard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.secondary-button,
.quiet-button,
.deck-button {
  border-radius: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: 160ms ease;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.primary-button {
  border: 1px solid var(--accent);
  padding: 14px 22px;
  color: #050913;
  background:
    linear-gradient(105deg, #f8fbff 0 8%, transparent 8% 10%),
    linear-gradient(135deg, #ff2e58, #ff6f7f 58%, #f8fbff 118%);
  box-shadow: 0 12px 32px rgba(255, 46, 88, 0.22);
}

.primary-button:hover {
  color: var(--text);
  background: transparent;
}

.secondary-button {
  border: 1px solid rgba(255, 46, 88, 0.7);
  padding: 12px 14px;
  color: var(--accent);
  background: rgba(255, 46, 88, 0.035);
}

.secondary-button:hover {
  background: var(--accent-soft);
}

.quiet-button {
  border: 1px solid var(--panel-line);
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
}

.quiet-button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.text-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link:hover {
  color: var(--text);
}

.text-link span {
  display: inline-block;
  margin-left: 5px;
  color: var(--accent);
}

.fighter-card {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid rgba(255, 46, 88, 0.36);
  background:
    radial-gradient(circle at 78% 38%, rgba(255, 46, 88, 0.28), transparent 13rem),
    linear-gradient(140deg, rgba(38, 97, 136, 0.16), transparent 43%),
    linear-gradient(340deg, rgba(255, 46, 88, 0.16), transparent 44%),
    var(--panel);
  box-shadow: var(--panel-shadow);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.fighter-card::after {
  position: absolute;
  inset: 0;
  border: 10px solid rgba(255, 255, 255, 0.025);
  content: "";
  pointer-events: none;
}

.fighter-card-topline,
.fighter-card-bottom {
  position: absolute;
  z-index: 2;
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: space-between;
}

.fighter-card-topline {
  top: 22px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.fighter-card-bottom {
  bottom: 20px;
  align-items: end;
  color: var(--muted);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.13em;
}

.fighter-card-bottom strong {
  color: var(--text);
  font-size: 58px;
  letter-spacing: -0.03em;
  line-height: 0.8;
}

.fighter-graphic {
  position: absolute;
  inset: 70px 20px 62px;
}

.fighter-kanji {
  position: absolute;
  top: 8px;
  right: 15px;
  color: rgba(255, 255, 255, 0.07);
  font-size: 218px;
  font-weight: 800;
  line-height: 1;
}

.fighter-slash {
  position: absolute;
  top: -40px;
  right: 108px;
  width: 82px;
  height: 430px;
  background: linear-gradient(180deg, transparent, rgba(255, 46, 88, 0.88), transparent);
  opacity: 0.92;
  transform: rotate(34deg);
}

.fighter-slash::before,
.fighter-slash::after {
  position: absolute;
  width: 26px;
  height: 100%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(255, 46, 88, 0.72), transparent);
}

.fighter-slash::before {
  left: -56px;
}

.fighter-slash::after {
  right: -38px;
}

.stat-strip {
  display: grid;
  border-block: 1px solid var(--panel-line);
  grid-template-columns: repeat(4, 1fr);
}

.stat-strip div {
  padding: 22px 20px;
  border-right: 1px solid var(--panel-line);
}

.stat-strip div:first-child {
  padding-left: 0;
}

.stat-strip div:last-child {
  border-right: 0;
}

.stat-value,
.stat-label {
  display: block;
}

.stat-value {
  color: var(--text);
  font-family: var(--display);
  font-size: 35px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  margin-top: 7px;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.view-section {
  display: none;
  padding: 100px 0 90px;
}

.view-section.is-active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

h2 {
  margin: 6px 0 0;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.section-heading > p {
  max-width: 390px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.library-layout {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.toolbar {
  display: flex;
  gap: 10px;
}

.search-box,
.select-wrap {
  display: flex;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  background: rgba(21, 21, 30, 0.84);
}

.search-box {
  flex: 1;
  gap: 11px;
  padding: 0 14px;
}

.search-box span {
  color: var(--accent);
  font-size: 24px;
}

input,
select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

input {
  width: 100%;
  font-size: 13px;
}

input::placeholder {
  color: var(--muted-dark);
}

.select-wrap {
  min-width: 188px;
  padding: 0 12px;
}

select {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}

select option {
  color: var(--text);
  background: var(--panel);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 0 17px;
}

.filter-chip {
  border: 1px solid var(--panel-line);
  border-radius: 30px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: rgba(255, 46, 88, 0.65);
  color: var(--accent);
  background: var(--accent-soft);
}

.move-grid {
  display: grid;
  gap: 8px;
}

.move-card {
  position: relative;
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 14px;
  color: var(--text);
  background: rgba(21, 21, 30, 0.74);
  grid-template-columns: minmax(190px, 1fr) repeat(4, 58px) auto;
  text-align: left;
  transition: 150ms ease;
}

.move-card:hover,
.move-card.is-selected {
  border-color: rgba(255, 46, 88, 0.65);
  background: rgba(255, 46, 88, 0.08);
}

.move-card-command,
.detail-command,
.flashcard h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.015em;
}

.move-card-command {
  display: block;
  color: var(--text);
  font-size: 25px;
  line-height: 0.92;
}

.move-card-name {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-stat {
  display: block;
  text-align: center;
}

.mini-stat span,
.frame-stat span {
  display: block;
  color: var(--muted-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mini-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
}

.mini-stat .is-good {
  color: var(--good);
}

.mini-stat .is-risky {
  color: var(--hot);
}

.level-badge,
.property-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-line);
  border-radius: 30px;
  padding: 5px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.level-badge {
  min-width: 42px;
}

.deck-button {
  border: 1px solid var(--panel-line);
  padding: 9px 10px;
  color: var(--muted);
  background: transparent;
}

.deck-button:hover,
.deck-button.is-saved {
  border-color: rgba(255, 46, 88, 0.58);
  color: var(--accent);
  background: var(--accent-soft);
}

.empty-state {
  border: 1px dashed var(--panel-line);
  padding: 48px 18px;
  color: var(--muted);
  text-align: center;
}

.move-detail {
  position: sticky;
  top: 18px;
  min-height: 320px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 20px;
  background:
    linear-gradient(140deg, rgba(255, 46, 88, 0.08), transparent 38%),
    var(--panel);
}

.detail-placeholder {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.detail-topline,
.detail-header,
.frame-row {
  display: flex;
  justify-content: space-between;
}

.detail-topline {
  align-items: center;
  gap: 10px;
}

.detail-index {
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-header {
  align-items: start;
  gap: 8px;
  margin: 18px 0;
}

.detail-command {
  color: var(--text);
  font-size: 38px;
  line-height: 0.86;
}

.detail-name {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.frame-row {
  gap: 7px;
  margin: 20px 0;
}

.move-video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  background: #050507;
  aspect-ratio: 16 / 9;
}

.move-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.move-video-unavailable {
  display: grid;
  place-items: center;
  color: var(--muted-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.frame-stat {
  flex: 1;
  border: 1px solid var(--panel-line);
  padding: 9px 5px;
  background: rgba(0, 0, 0, 0.15);
  text-align: center;
}

.frame-stat strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 13px;
}

.frame-stat strong.is-good {
  color: var(--good);
}

.frame-stat strong.is-risky {
  color: var(--hot);
}

.detail-section {
  margin-top: 18px;
}

.detail-section h4 {
  margin: 0 0 8px;
  color: var(--muted-dark);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-section p,
.notes-list {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.notes-list {
  padding-left: 17px;
}

.property-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-deck-button {
  width: 100%;
  margin-top: 20px;
}

.study-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.study-sidebar {
  display: flex;
  min-height: 470px;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--panel-line);
  padding: 18px;
  background: rgba(21, 21, 30, 0.76);
}

.study-sidebar h3 {
  margin: 8px 0 6px;
  font-size: 32px;
  line-height: 0.9;
}

.study-sidebar > div > p:last-child {
  color: var(--muted);
  font-size: 12px;
}

.active-deck-summary {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-line);
}

.active-deck-summary p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.deck-selector {
  padding: 7px 0 6px;
}

.deck-picker {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.deck-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.14);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  transition: 150ms ease;
}

.deck-option:hover,
.deck-option.is-active {
  border-color: rgba(255, 46, 88, 0.62);
  color: var(--accent);
  background: var(--accent-soft);
}

.deck-option strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 9px;
}

.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.hard-mode-toggle,
.auto-progress-toggle {
  display: flex;
  align-items: start;
  gap: 9px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 11px 10px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

.hard-mode-toggle input,
.auto-progress-toggle input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.hard-mode-toggle strong,
.hard-mode-toggle small,
.auto-progress-toggle strong,
.auto-progress-toggle small {
  display: block;
}

.hard-mode-toggle strong,
.auto-progress-toggle strong {
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hard-mode-toggle small,
.auto-progress-toggle small {
  margin-top: 4px;
  color: var(--muted-dark);
  font-size: 10px;
  line-height: 1.45;
}

.study-tip {
  margin-top: auto;
  border-top: 1px solid var(--panel-line);
  padding-top: 16px;
}

.study-tip span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.study-tip p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.flashcard-wrap {
  max-width: 780px;
}

.flashcard-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#study-timer-label {
  color: var(--accent);
}

#attempts-remaining-label {
  color: var(--warning);
}

.flashcard-restart-button {
  min-height: 30px;
  margin-left: auto;
  padding: 6px 10px;
  font-size: 8px;
}

.flashcard-restart-button[hidden] {
  display: none;
}

.flashcard {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 46, 88, 0.46);
  border-radius: 3px;
  padding: 30px;
  background:
    linear-gradient(150deg, rgba(255, 46, 88, 0.12), transparent 42%),
    linear-gradient(335deg, rgba(255, 46, 88, 0.08), transparent 42%),
    var(--panel);
}

.flashcard::after {
  position: absolute;
  right: -64px;
  bottom: -122px;
  width: 280px;
  height: 280px;
  border: 34px solid rgba(255, 46, 88, 0.05);
  border-radius: 50%;
  content: "";
}

.flashcard h3 {
  margin: 40px 0 0;
  font-size: clamp(66px, 9vw, 122px);
  line-height: 0.9;
  overflow-wrap: anywhere;
}

.study-name {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.answer-cover {
  display: flex;
  min-height: 90px;
  flex-direction: column;
  justify-content: end;
  margin-top: 35px;
  border-top: 1px solid var(--panel-line);
  color: var(--accent);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-cover small {
  margin-top: 6px;
  color: var(--muted-dark);
  font-family: var(--body);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.study-answer {
  margin-top: 35px;
  border-top: 1px solid var(--panel-line);
  padding-top: 18px;
}

.study-video-shell {
  max-width: 500px;
  margin-bottom: 14px;
}

.study-prompt-video {
  margin-top: 16px;
}

.study-prompt-video .study-video-shell {
  margin-bottom: 0;
}

.study-answer .frame-row {
  max-width: 500px;
  margin: 0 0 16px;
}

.study-answer p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.flashcard-actions {
  margin-top: 12px;
}

.wide-button {
  min-width: 190px;
}

.grade-button {
  flex: 1;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 14px;
  color: var(--text);
  background: var(--panel);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.grade-button.repeat:hover {
  border-color: rgba(255, 200, 87, 0.62);
  color: var(--warning);
  background: var(--warning-soft);
}

.grade-button.known:hover {
  border-color: rgba(84, 212, 166, 0.62);
  color: var(--good);
  background: var(--good-soft);
}

.quiz-button {
  flex: 1;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 15px;
  color: var(--text);
  background: var(--panel);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.quiz-button.launch-yes:hover {
  border-color: rgba(255, 46, 88, 0.62);
  color: var(--hot);
  background: var(--hot-soft);
}

.quiz-button.launch-no:hover {
  border-color: rgba(84, 212, 166, 0.62);
  color: var(--good);
  background: var(--good-soft);
}

.quiz-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--panel-line);
  padding: 13px 14px;
  background: rgba(0, 0, 0, 0.15);
}

.quiz-feedback strong {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quiz-feedback span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.quiz-feedback.is-correct {
  border-color: rgba(84, 212, 166, 0.46);
}

.quiz-feedback.is-correct strong {
  color: var(--good);
}

.quiz-feedback.is-wrong {
  border-color: rgba(255, 46, 88, 0.46);
}

.quiz-feedback.is-wrong strong {
  color: var(--hot);
}

.quiz-auto-advance {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quiz-score-form {
  display: grid;
  width: min(100%, 560px);
  gap: 8px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 16px;
  background: rgba(21, 21, 30, 0.78);
}

.quiz-score-form label,
.quiz-score-form small {
  color: var(--muted-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quiz-score-submit-row {
  display: flex;
  gap: 8px;
}

.quiz-score-submit-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.2);
}

.quiz-score-status {
  min-height: 16px;
  margin: 0;
  color: var(--hot);
  font-size: 11px;
}

.quiz-leaderboard {
  width: min(100%, 700px);
  border: 1px solid rgba(255, 46, 88, 0.46);
  border-radius: 3px;
  padding: 16px;
  background: rgba(21, 21, 30, 0.78);
}

.quiz-leaderboard h3 {
  margin: 8px 0 6px;
  font-size: 30px;
}

.quiz-leaderboard > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.quiz-leaderboard-head,
.quiz-leaderboard-row {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) 62px 92px;
}

.quiz-leaderboard-head {
  margin-top: 14px;
  padding: 0 10px 8px;
  color: var(--muted-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz-leaderboard-list {
  max-height: 382px;
  overflow-y: auto;
  border: 1px solid var(--panel-line);
}

.quiz-leaderboard-row {
  border-top: 1px solid var(--panel-line);
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-leaderboard-row:first-child {
  border-top: 0;
}

.quiz-leaderboard-row.is-current-user {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.quiz-leaderboard-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-leaderboard-row em {
  margin-left: 5px;
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.admin-layout {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.28fr);
}

.admin-panel {
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 20px;
  background: rgba(21, 21, 30, 0.78);
}

.admin-panel h3 {
  margin: 8px 0 10px;
  font-size: 34px;
  line-height: 0.9;
}

.code-input-row,
.duration-row,
.admin-list-heading,
.access-code-row,
.access-code-row-topline {
  display: flex;
  align-items: center;
}

.code-input-row {
  gap: 8px;
}

.code-input-row input {
  flex: 1;
}

.duration-row {
  gap: 10px;
}

.duration-row label {
  flex: 1;
}

.duration-row select {
  min-height: 46px;
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.2);
}

.scope-summary {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 46, 88, 0.36);
  border-radius: 3px;
  padding: 11px;
  background: var(--accent-soft);
}

.scope-summary strong {
  color: var(--accent);
  font-size: 12px;
}

.admin-list-heading,
.access-code-row,
.access-code-row-topline {
  justify-content: space-between;
  gap: 10px;
}

.access-code-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.access-code-row {
  border: 1px solid var(--panel-line);
  border-radius: 3px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.access-code-row > div {
  min-width: 0;
}

.access-code-row-topline {
  justify-content: start;
}

.access-code-row p,
.access-code-row small {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.access-code-row small {
  display: block;
  color: var(--muted-dark);
}

.code-status {
  border-radius: 30px;
  padding: 4px 6px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-status.is-active {
  color: var(--good);
  background: var(--good-soft);
}

.code-status.is-revoked,
.code-status.is-expired {
  color: var(--muted-dark);
  background: rgba(255, 255, 255, 0.05);
}

.admin-security-note {
  max-width: 800px;
  margin: 18px 0 0;
  color: var(--muted-dark);
  font-size: 11px;
  line-height: 1.7;
}

.search-box,
.select-wrap,
.move-card,
.move-detail,
.study-sidebar,
.deck-option,
.hard-mode-toggle,
.auto-progress-toggle,
.flashcard,
.quiz-score-form,
.quiz-leaderboard,
.admin-panel,
.access-code-row,
.frame-stat,
.quiz-feedback,
.grade-button,
.quiz-button {
  border-radius: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 18px 48px rgba(0, 0, 0, 0.18);
}

.move-detail,
.study-sidebar,
.flashcard,
.quiz-score-form,
.quiz-leaderboard,
.admin-panel {
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 46, 88, 0.14), transparent 13rem),
    linear-gradient(145deg, rgba(38, 97, 136, 0.11), transparent 48%),
    rgba(9, 16, 29, 0.88);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.move-card,
.deck-option,
.hard-mode-toggle,
.auto-progress-toggle,
.frame-stat,
.grade-button,
.quiz-button,
.access-code-row {
  background:
    linear-gradient(110deg, rgba(248, 251, 255, 0.035), transparent 18%),
    rgba(7, 13, 24, 0.72);
}

.move-card:hover,
.move-card.is-selected,
.deck-option:hover,
.deck-option.is-active,
.filter-chip:hover,
.filter-chip.is-active,
.deck-button:hover,
.deck-button.is-saved {
  border-color: var(--accent-line);
  color: var(--accent);
  background:
    linear-gradient(110deg, rgba(255, 46, 88, 0.18), rgba(255, 46, 88, 0.04)),
    rgba(7, 13, 24, 0.82);
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 0 28px rgba(255, 46, 88, 0.1);
}

.flashcard {
  box-shadow: var(--panel-shadow);
}

.flashcard::before,
.move-detail::before,
.admin-panel::before,
.quiz-leaderboard::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 48%, rgba(255, 255, 255, 0.045) 49%, transparent 50%),
    radial-gradient(circle at 92% 18%, rgba(255, 46, 88, 0.16), transparent 9rem);
}

.admin-panel,
.quiz-leaderboard {
  position: relative;
}

.move-video-shell {
  border-color: rgba(248, 251, 255, 0.2);
  box-shadow: 0 0 26px rgba(255, 46, 88, 0.08);
}

.quiz-leaderboard-list,
.access-code-list {
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.06);
}

input:focus,
select:focus {
  color: var(--text);
}

.limited-access .hero,
.limited-access .stat-strip {
  display: none;
}

.limited-access #study-view {
  padding-top: 58px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--panel-line);
  padding: 22px 0 30px;
}

footer p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 10px;
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .fighter-card {
    min-height: 390px;
  }

  .fighter-kanji {
    right: -3px;
    font-size: 178px;
  }

  .fighter-card-bottom strong {
    font-size: 48px;
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .move-detail {
    position: static;
    grid-row: 1;
    min-height: auto;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 680px);
  }

  .site-header {
    min-height: 66px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .brand strong {
    font-size: 19px;
  }

  .brand small,
  .source-link,
  .access-badge {
    display: none;
  }

  .main-nav {
    gap: 13px;
  }

  .nav-button {
    font-size: 10px;
    letter-spacing: 0.09em;
  }

  .hero {
    min-height: auto;
    padding: 80px 0 54px;
    grid-template-columns: 1fr;
  }

  .fighter-card {
    display: none;
  }

  h1 {
    font-size: clamp(64px, 19vw, 95px);
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-strip div,
  .stat-strip div:first-child {
    padding: 16px 12px;
    border-bottom: 1px solid var(--panel-line);
  }

  .stat-strip div:nth-child(2) {
    border-right: 0;
  }

  .view-section {
    padding: 72px 0 66px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 13px;
  }

  .toolbar {
    display: block;
  }

  .select-wrap {
    margin-top: 8px;
  }

  .move-card {
    gap: 9px;
    padding: 13px 11px;
    grid-template-columns: minmax(126px, 1fr) repeat(2, 48px) auto;
  }

  .move-card .mini-stat:nth-of-type(3),
  .move-card .mini-stat:nth-of-type(4) {
    display: none;
  }

  .move-card-command {
    font-size: 21px;
  }

  .level-badge {
    min-width: 34px;
    padding-inline: 5px;
    font-size: 8px;
  }

  .deck-button {
    padding-inline: 8px;
    font-size: 0;
  }

  .deck-button::before {
    content: "+";
    font-size: 15px;
  }

  .deck-button.is-saved::before {
    content: "✓";
  }

  .study-layout {
    grid-template-columns: 1fr;
  }

  .study-sidebar {
    min-height: auto;
  }

  .study-tip {
    display: none;
  }

  .flashcard {
    min-height: 340px;
    padding: 22px;
  }

  .flashcard h3 {
    margin-top: 36px;
    font-size: clamp(58px, 19vw, 102px);
  }

  footer {
    display: block;
  }

  footer a {
    display: inline-block;
    margin-top: 12px;
  }
}
