:root {
  --bg: #d8e0e3;
  --card: #f4f7f8;
  --text: #17232b;
  --muted: #61727c;
  --line: #c4d0d7;
  --accent: #455a66;
  --good: #16774b;
  --warn: #9a6700;
  --bad: #b42318;
  --steel-900: #1d2830;
  --steel-800: #2b3943;
  --steel-700: #415560;
  --steel-600: #5d7582;
  --mist-100: #eef4f6;
  --mist-200: #d8e3e7;
  --ice-300: #bed0d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.page-header h1,
.page-header h2,
.card h2,
.card h3 {
  margin-top: 0;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  margin-bottom: 12px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 600;
}

button.secondary {
  background: #eef1f5;
  color: var(--text);
}

button.warn {
  background: #7a2018;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row > * {
  flex: 1 1 auto;
}

.row.compact > * {
  flex: 0 0 auto;
}

.meta,
.small,
pre,
.helper {
  color: var(--muted);
  font-size: 13px;
}

pre {
  white-space: pre-wrap;
  background: #f7f9fc;
  border-radius: 10px;
  padding: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1f5;
  font-size: 13px;
  color: var(--muted);
}

.status-pill.good {
  color: var(--good);
  background: #e7f6ef;
}

.status-pill.warn {
  color: var(--warn);
  background: #fff4dd;
}

.status-pill.bad {
  color: var(--bad);
  background: #fdecea;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  font-size: 13px;
}

.table td input,
.table td select {
  margin: 0;
  min-width: 90px;
}

.table td .row {
  flex-wrap: nowrap;
}

.table .mono,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.kpi {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.kpi strong {
  display: block;
  font-size: 26px;
}

.hidden {
  display: none !important;
}

#catImageWrap {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 14px;
  overflow: hidden;
}

#catImageWrap img {
  width: 100%;
  height: auto;
  display: block;
}

#scannerPanel video {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  background: #111;
}

.link-list a {
  display: inline-block;
  margin-right: 12px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

@media (max-width: 900px) {
  .container {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
  }
}


.play-body {
  background:
    radial-gradient(circle at top left, rgba(190, 208, 216, 0.34), transparent 24%),
    radial-gradient(circle at 90% 8%, rgba(93, 117, 130, 0.32), transparent 28%),
    linear-gradient(180deg, #24323a 0%, #31424c 24%, #425660 46%, #d7e0e4 46%, #e6ecef 100%);
}

.play-container {
  position: relative;
}

.hero-header {
  color: white;
  align-items: flex-start;
}

.hero-copy,
.hero-header .meta {
  color: rgba(239, 245, 247, 0.82);
}

.hero-actions {
  align-items: center;
}

.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.brand-kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(231, 239, 243, 0.64);
}

.catster-logo {
  position: relative;
  width: 196px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 33, 39, 0.92), rgba(49, 66, 76, 0.92));
  border: 1px solid rgba(214, 227, 232, 0.16);
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(14, 22, 28, 0.34);
}

.catster-logo .ring {
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  border: 4px solid transparent;
  opacity: 0.9;
}

.catster-logo .ring-a {
  inset: 10px 18px;
  border-top-color: #dbe7eb;
  border-left-color: #8eb0bf;
}

.catster-logo .ring-b {
  inset: 18px 30px;
  border-right-color: #b4c6cf;
  border-bottom-color: #6d8794;
}

.catster-logo .ring-c {
  inset: 26px 44px;
  border-top-color: #e8eef1;
  border-left-color: #90a9b5;
}

.brand-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #edf4f7;
  text-shadow: 0 0 16px rgba(178, 202, 213, 0.18);
}

.hero-panel,
.play-stage-card {
  border: none;
  box-shadow: 0 18px 44px rgba(10, 14, 26, 0.12);
}

.hero-grid {
  align-items: start;
}

.scanner-shell {
  background: linear-gradient(180deg, #31414b, #243039);
  border-radius: 18px;
  padding: 16px;
  color: white;
  box-shadow: inset 0 0 0 1px rgba(226, 236, 240, 0.08);
}

.stage-shell {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  align-items: stretch;
}

.stage-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blind-tag,
.reveal-overline {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e5edf1;
  color: #47606e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-title {
  margin: 0;
  font-size: 32px;
}

.cat-image-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: fit-content;
  transition: transform 0.18s ease;
}

.cat-image-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.cat-image-button:focus-visible {
  outline: 3px solid rgba(73, 182, 255, 0.45);
  outline-offset: 6px;
  border-radius: 20px;
}

#catImageWrap {
  width: min(100%, 280px);
  min-height: 280px;
  max-height: 280px;
  border-radius: 24px;
  background: linear-gradient(180deg, #edf3f5, #d7e1e6);
  box-shadow: inset 0 0 0 1px rgba(58, 77, 86, 0.08), 0 14px 32px rgba(39, 56, 66, 0.16);
}

#catImageWrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emoji-fallback {
  font-size: 64px;
}

.stage-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reveal-card {
  height: 100%;
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, #2a3942, #1e2a31);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(229, 237, 240, 0.08), 0 16px 36px rgba(22, 34, 41, 0.20);
}

.reveal-header h3 {
  margin: 8px 0 0;
  font-size: 28px;
}

.reveal-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0 18px;
}

.reveal-year {
  grid-column: span 2;
}

.reveal-field {
  padding: 16px;
  border-radius: 18px;
  background: rgba(234, 241, 244, 0.08);
  border: 1px solid rgba(231, 238, 241, 0.10);
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
}

.field-value {
  min-height: 48px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  word-break: break-word;
}

.reveal-year .field-value {
  font-size: 52px;
}

.field-value.masked {
  color: rgba(255, 255, 255, 0.24);
}

.reveal-actions {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.reveal-actions button:last-child {
  background: linear-gradient(135deg, #68818d, #4d636f);
  border: none;
  box-shadow: 0 10px 24px rgba(34, 49, 57, 0.22);
}

@media (max-width: 860px) {
  .stage-shell,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-header {
    gap: 18px;
  }

  .field-value {
    font-size: 24px;
  }

  .reveal-year .field-value {
    font-size: 42px;
  }
}


.play-body .card {
  background: linear-gradient(180deg, rgba(248, 251, 252, 0.96), rgba(241, 246, 248, 0.96));
  border: 1px solid rgba(193, 207, 214, 0.7);
}

.play-body .status-pill {
  background: rgba(231, 238, 241, 0.96);
  color: #40545f;
}

.play-body button.secondary {
  background: #dde7eb;
  color: #22313a;
}

.play-body button {
  background: linear-gradient(135deg, #516873, #3f525d);
}

.play-body input,
.play-body select {
  background: #f8fbfc;
  border-color: #c0cfd6;
}
