:root {
  --font-regular: "LatinSmall";
  --font-bold: "LatinRCond";
  --bg: #000000;
  --paper: #000000;
  --ink: #FFFFFF;
  --muted: #FFFFFF;
  --brand: #BA0013;
  --brand-soft: #000000;
  --line: #FFFFFF;
  --ok: #FFFFFF;
  --warn: #BA0013;
  --bad: #BA0013;
}

@font-face {
  font-family: "LatinSmall";
  src: url("/static/assets/latinsmall.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "LatinRCond";
  src: url("/static/assets/latinrcond.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--brand);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--font-regular), "Segoe UI", sans-serif;
  color: var(--ink);
  text-align: center;
  background: radial-gradient(circle at 0% 0%, rgba(186, 0, 19, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 42%), var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 220px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

body::before {
  left: 0;
  background-image: url("/static/assets/Tomoe_Poster.jpg");
}

body::after {
  right: 0;
  background-image: url("/static/assets/Goemon_Poster.png");
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}

.bg-shape-a {
  width: 300px;
  height: 300px;
  left: -100px;
  top: -100px;
  background: rgba(186, 0, 19, 0.28);
}

.bg-shape-b {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -120px;
  background: rgba(255, 255, 255, 0.18);
}

.page-header,
.status-banner,
.layout {
  position: relative;
  z-index: 1;
}

.page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: flex-end;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
  color: var(--brand);
  text-transform: uppercase;
}

h1 {
  margin: 0.3rem 0 0.2rem;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.subhead {
  margin: 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.status-banner {
  display: none !important;
  max-width: 1280px;
  margin: 0.35rem auto 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.92);
  color: var(--ink);
  font-size: 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.status-ok {
  background: rgba(0, 0, 0, 0.92);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--ink);
}

.status-warn {
  background: rgba(186, 0, 19, 0.09);
  border-color: rgba(186, 0, 19, 0.45);
  color: var(--warn);
}

.status-bad {
  background: rgba(186, 0, 19, 0.14);
  border-color: rgba(186, 0, 19, 0.65);
  color: var(--bad);
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
}

.panel {
  grid-column: span 6;
  background: rgba(0, 0, 0, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.panel-wide {
  grid-column: 1 / -1;
}

.admin-panel {
  border-left: 4px solid var(--brand);
}

h2 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

h3 {
  margin: 0;
  font-size: 0.98rem;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.panel-head {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.44rem 0.35rem;
  text-align: center;
  vertical-align: top;
}

th {
  font-size: 0.81rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition:
    transform 0.18s ease,
    background-color 0.28s ease 0.06s,
    border-color 0.28s ease 0.06s,
    color 0.22s ease 0.03s,
    box-shadow 0.22s ease 0.06s;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(186, 0, 19, 0.34);
}

.btn-primary {
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost {
  background: var(--bg);
}

.tiny {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0.35rem 0 0.7rem;
}

.strong {
  font-weight: 700;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
  color: var(--ink);
}

.chip {
  font-size: 0.78rem;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 0.65rem;
}

.inline-form {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
  justify-items: center;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-family: var(--font-regular), "Segoe UI", sans-serif;
  padding: 0.44rem 0.55rem;
  text-align: center;
  accent-color: var(--brand);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.btn:focus-visible,
a.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

label > input[type="checkbox"] {
  width: auto;
}

textarea {
  resize: vertical;
  font-size: 0.84rem;
}

.tile-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.tile {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0.55rem;
  background: rgba(0, 0, 0, 0.94);
}

.tile p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.check-grid {
  display: grid;
  gap: 0.5rem;
}

.check-item {
  background: rgba(0, 0, 0, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  display: grid;
  gap: 0.25rem;
}

.check-item label {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  justify-items: start;
  column-gap: 0.55rem;
  width: 100%;
  text-align: left;
  color: var(--ink);
}

.check-item input {
  width: auto;
  margin: 0;
  justify-self: center;
}

.list {
  display: grid;
  gap: 0.45rem;
}

.list-item {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9px;
  padding: 0.5rem 0.58rem;
  background: rgba(0, 0, 0, 0.94);
  font-size: 0.9rem;
}

.single-line-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.single-line-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.single-line-controls input {
  width: 120px;
}

.admin-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}

.card-form {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 0.7rem;
  background: rgba(0, 0, 0, 0.94);
}

.inline-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.code-block {
  margin: 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  padding: 0.6rem;
  overflow: auto;
  min-height: 120px;
  font-size: 0.78rem;
  font-family: var(--font-regular), "Segoe UI", sans-serif;
}

.bet-card {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.94);
}

.bet-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: start;
}

.fight-card-list {
  max-width: 760px;
  margin: 0 auto;
}

.fight-row {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.fight-main {
  font-family: var(--font-regular), "Segoe UI", sans-serif;
}

.fight-bout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
}

.fighter {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fighter-left {
  text-align: right;
}

.fighter-right {
  text-align: left;
}

.fighter.is-winner {
  color: var(--brand);
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.fight-vs {
  text-align: center;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  min-width: 3ch;
}

.fight-main-main {
  color: var(--brand);
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.fight-main-co-main {
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.fight-main-regular {
  font-family: var(--font-regular), "Segoe UI", sans-serif;
}

.winner-name {
  color: var(--ink);
  background: rgba(186, 0, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.12rem 0.42rem;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

strong,
b {
  font-family: var(--font-bold), "Segoe UI", sans-serif;
}

.site-nav {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  flex-wrap: wrap;
}

body.public-view::before,
body.public-view::after {
  width: 620px;
  opacity: 0.96;
}

body.public-view .page-header,
body.public-view .status-banner,
body.public-view .layout {
  max-width: 1120px;
}

body.public-view .page-header {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

body.public-view .layout {
  grid-template-columns: minmax(0, 1fr);
}

body.public-view .panel {
  grid-column: 1 / -1;
}

body.public-view .eyebrow {
  font-size: 1.6rem;
}

body.public-view h1 {
  font-size: clamp(4rem, 9vw, 7.6rem);
}

body.public-view h2 {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
}

body.public-view h3 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
}

body.public-view .panel {
  padding: 1.5rem;
}

body.public-view th {
  font-size: 1.15rem;
}

body.public-view td {
  font-size: 1.5rem;
}

body.public-view .btn {
  font-size: 1.4rem;
  padding: 0.8rem 1.1rem;
}

body.public-view .tiny {
  font-size: 1.2rem;
}

body.public-view label {
  font-size: 1.25rem;
}

body.public-view input,
body.public-view select,
body.public-view textarea {
  font-size: 1.25rem;
  padding: 0.65rem 0.8rem;
}

body.public-view .list-item,
body.public-view .tile p {
  font-size: 1.2rem;
}

body.public-view:not(.admin-view) .fight-row {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.2rem 0;
}

body.public-view:not(.admin-view) .fight-main-main {
  font-size: clamp(1.8rem, 3.7vw, 2.7rem);
}

body.public-view:not(.admin-view) .fight-main-co-main {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

body.public-view:not(.admin-view) .fight-main-regular {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}

body.public-view:not(.admin-view) .fight-empty {
  font-size: 1.2rem;
  color: var(--muted);
}

body.admin-view h1 {
  font-size: clamp(2.4rem, 4.8vw, 4rem);
}

body.admin-view h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

body.admin-view h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

body.admin-view .btn {
  font-size: 1rem;
  padding: 0.58rem 0.82rem;
}

body.admin-view .tiny {
  font-size: 0.95rem;
}

body.admin-view label {
  font-size: 0.95rem;
}

body.admin-view input,
body.admin-view select,
body.admin-view textarea {
  font-size: 0.98rem;
}

.panel-slim {
  max-width: 760px;
  margin-inline: auto;
}

.panel-report-slim {
  max-width: 620px;
  margin-inline: auto;
}

.narrow-form {
  max-width: 460px;
  margin-inline: auto;
}

.narrow-form input,
.narrow-form select,
.narrow-form textarea {
  max-width: 320px;
  margin-inline: auto;
}

body.admin-view .bet-duo {
  max-width: 980px;
  margin: 0 auto 1rem;
}

body.admin-view .bet-card {
  margin-bottom: 0;
}

body.admin-view .bet-card input,
body.admin-view .bet-card select {
  max-width: 260px;
  margin-inline: auto;
}

.admin-sections {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.admin-status {
  margin: 0.65rem auto 0.15rem;
  max-width: 980px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  background: rgba(0, 0, 0, 0.86);
}

.disclaimer-panel {
  border-color: rgba(186, 0, 19, 0.85);
  box-shadow: 0 8px 20px rgba(186, 0, 19, 0.18);
}

.disclaimer-text {
  margin: 0;
  font-family: var(--font-bold), "Segoe UI", sans-serif;
  color: #fff;
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  line-height: 1.35;
  text-transform: uppercase;
}

.admin-section {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.9);
}

.admin-section > h3 {
  margin: 0 0 0.65rem;
}

.admin-grid-tight {
  margin-top: 0;
}

.admin-grid .card-form-triple {
  grid-column: span 3;
}

.card-rows {
  display: grid;
  gap: 0.55rem;
}

.card-row-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding-bottom: 0.35rem;
}

.inline-check input {
  width: auto;
}

body.public-view .bet-duo {
  max-width: 1100px;
  margin: 0 auto 1rem;
}

body.public-view .bet-card {
  margin-bottom: 0;
}

body.public-view .bet-card input,
body.public-view .bet-card select {
  max-width: 320px;
  margin-inline: auto;
}

@media (max-width: 1800px) {
  body.public-view::before,
  body.public-view::after {
    display: none;
  }
}

@media (max-width: 980px) {
  .panel {
    grid-column: 1 / -1;
  }

  .page-header {
    align-items: center;
    flex-direction: column;
  }

  .bet-duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-row-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid .card-form-triple {
    grid-column: span 1;
  }
}

