@font-face {
  font-family: "Saira";
  src: url("./fonts/saira-semi-condensed-latin-300-normal-CTi2Kaz_.woff2") format("woff2");
  font-weight: 100 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Saira";
  src: url("./fonts/saira-narrow-latin-400-normal-DAu_tYYo.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Saira";
  src: url("./fonts/saira-semi-condensed-latin-500-normal-OkPZo89y.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Saira";
  src: url("./fonts/saira-semi-condensed-latin-700-normal-DrSnQFZS.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Saira";
  src: url("./fonts/saira-black-latin-900-oblique-BAWbqtYB.woff2") format("woff2");
  font-weight: 800 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "NotoSC";
  src: url("./fonts/sc-regular-core.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "NotoSC";
  src: url("./fonts/sc-bold-core.woff2") format("woff2");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --panel: rgba(13, 15, 18, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #f2f4f6;
  --muted: #9aa1a8;
  --dim: #5f666e;
  --accent: #f2b33d;
  --accent-2: #ffd479;
  --blue: #4b69ff;
  --sans: "Saira", "NotoSC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font-family: inherit;
}

button {
  color: inherit;
}

.hidden {
  display: none !important;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  z-index: 10;
}

/* ------------------------------------------------------------------ case browser */

.case-browser-screen {
  z-index: 12;
  background:
    radial-gradient(circle at 50% -10%, rgba(242, 179, 61, 0.08), transparent 40%),
    #050607;
}

.browser-head {
  position: relative;
  flex: 0 0 auto;
  padding: 28px 40px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.browser-kicker {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.browser-title h1 {
  margin: 4px 0 2px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.browser-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.browser-tools {
  position: absolute;
  right: 40px;
  top: 28px;
  display: flex;
  gap: 6px;
}

.browser-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px 40px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.browser-subhead {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #c5cbd1;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.browser-subhead span:last-child {
  color: var(--dim);
}

.browser-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 9px;
}

.browser-grid .case-tile {
  width: 100%;
  height: 172px;
  flex: initial;
  padding: 14px 10px 10px;
}

.browser-grid .case-tile-art {
  width: 96px;
  height: 66px;
  margin-bottom: 8px;
  transform: scale(1.15);
  transform-origin: center;
}

.browser-grid .case-tile-art::before {
  left: 6px;
  right: 6px;
  height: 28px;
}

.browser-grid .case-tile-art .case-body {
  left: 9px;
  right: 9px;
  top: 24px;
  height: 39px;
}

.browser-grid .case-logo {
  left: 36px;
  top: 29px;
  width: 28px;
  height: 28px;
  font-size: 8px;
}

.browser-grid .case-latch {
  left: 43px;
  top: 45px;
}

.browser-grid .case-tile-name {
  font-size: 11px;
}

.browser-grid .case-tile-meta {
  font-size: 8px;
}

.browser-grid .case-tile-badge {
  font-size: 8px;
}

.browser-footer {
  flex: 0 0 auto;
  padding: 12px 40px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ case screen */

.case-screen {
  z-index: 10;
}

.case-header {
  position: relative;
  flex: 0 0 auto;
  min-height: 108px;
  padding: 22px 34px 0;
  text-align: center;
}

.case-title-block h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.case-sub {
  margin: 5px 0 0;
  color: #d6dae0;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.case-sub b {
  color: #fff;
  font-weight: 600;
}

.case-warning {
  margin: 8px 0 0;
  color: #f2b33d;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.case-warning span {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
}

.case-tools {
  position: absolute;
  right: 30px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: #b9c0c7;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 0.16s ease;
}

.tool-btn:hover {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.tool-btn.icon {
  width: 28px;
  padding: 0;
  font-size: 14px;
}

.class-select {
  height: 28px;
  padding: 0 22px 0 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: #c7ced5;
  font-size: 10px;
  letter-spacing: 0.05em;
  outline: none;
  cursor: pointer;
}

.class-select:focus {
  border-color: rgba(242, 179, 61, 0.55);
}

.class-select option {
  background: #111418;
  color: #e8ecef;
}

.tool-btn span {
  color: var(--accent-2);
  margin-left: 3px;
}

.case-main {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
  padding: 0 64px;
}

.case-main > * {
  min-width: 0;
}

.case-back {
  position: absolute;
  left: 30px;
  top: 24px;
  z-index: 2;
}

.case-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

#caseCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#caseCanvas:active {
  cursor: grabbing;
}

.case-stage-hint {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.36);
  font-size: 9px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.case-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(242, 179, 61, 0.12), transparent 55%);
}

.case-fallback.hidden {
  display: none !important;
}

.fallback-box {
  width: 220px;
  height: 130px;
  display: grid;
  place-items: center;
  color: #17120a;
  background:
    linear-gradient(180deg, #596169, #22272b 24%, #171b1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

.fallback-box span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #17120a;
  background: var(--accent);
  font-weight: 900;
  font-style: italic;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

/* ------------------------------------------------------------------ case shelf */

.case-shelf-section {
  flex: 0 0 auto;
  padding: 4px 0 10px;
  border-top: 1px solid var(--line-soft);
}

.shelf-head,
.inventory-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  color: #c5cbd1;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.shelf-head span:last-child,
.inventory-subhead span:last-child {
  color: var(--dim);
}

.case-shelf {
  display: flex;
  gap: 7px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.case-tile {
  position: relative;
  flex: 0 0 126px;
  height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 8px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  cursor: pointer;
  text-align: center;
  transition: 0.16s ease;
}

.case-tile:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.case-tile.active {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent), 0 0 18px rgba(242, 179, 61, 0.12);
}

.case-tile-art {
  position: relative;
  width: 74px;
  height: 52px;
  margin: 1px auto 3px;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55));
}

.case-tile-art::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 1px;
  height: 22px;
  background: linear-gradient(180deg, #ef9d3b, #a85a1c 78%, #7d3e12);
  border: 1px solid rgba(255, 220, 160, 0.45);
  border-radius: 3px 3px 1px 1px;
  transform: perspective(120px) rotateX(8deg);
}

.case-tile-art::after {
  display: none;
}

.case-body {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 19px;
  height: 31px;
  background:
    linear-gradient(90deg, #5f2c0d 0 6%, transparent 6% 18%, #5f2c0d 18% 23%, transparent 23% 77%, #5f2c0d 77% 82%, transparent 82% 94%, #5f2c0d 94% 100%),
    linear-gradient(180deg, #e49336, #a95517 68%, #71350e);
  border: 1px solid rgba(255, 215, 150, 0.35);
  border-radius: 2px 2px 4px 4px;
}

.case-logo {
  position: absolute;
  left: 25px;
  top: 22px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  z-index: 2;
  color: #fff;
  background: linear-gradient(135deg, #f03a8c, #8b1558);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border: 1px solid rgba(255, 210, 235, 0.7);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.case-latch {
  position: absolute;
  left: 31px;
  top: 35px;
  width: 12px;
  height: 14px;
  background: linear-gradient(180deg, #e7c078, #94652c);
  border: 1px solid rgba(255, 240, 190, 0.4);
  opacity: 0.75;
}

.case-tile-name {
  color: #e8ecef;
  font-size: 9px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-tile-meta {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.case-tile-badge {
  color: var(--accent-2);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 7px;
}

.case-grid .case-tile {
  flex: initial;
  width: 100%;
  min-width: 0;
}

.inventory-cases {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------------------------ loot */

.loot-section {
  flex: 0 0 auto;
  max-height: 204px;
  padding: 7px 0 9px;
  border-top: 1px solid var(--line-soft);
}

.loot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  color: #c5cbd1;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.loot-head span:last-child {
  color: var(--dim);
}

.loot-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  max-height: 166px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.loot-item {
  position: relative;
  height: 94px;
  padding: 5px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 50%),
    rgba(255, 255, 255, 0.025);
  cursor: pointer;
  overflow: hidden;
  transition: 0.16s ease;
}

.loot-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--tone, var(--blue));
  box-shadow: 0 0 12px var(--tone, var(--blue));
}

.loot-item:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.loot-tone {
  position: absolute;
  z-index: 2;
  left: 5px;
  top: 5px;
  padding: 1px 3px;
  color: var(--tone, var(--blue));
  background: rgba(0, 0, 0, 0.58);
  font-size: 6px;
  letter-spacing: 0.1em;
}

.loot-avatar {
  position: relative;
  width: 100%;
  height: 46px;
  margin: 0 auto 3px;
  display: grid;
  place-items: center;
  color: #101214;
  background: linear-gradient(135deg, #fff, var(--tone, var(--blue)) 82%);
  font-size: 12px;
  font-weight: 900;
  font-style: italic;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 88% 100%, 0 100%);
  overflow: hidden;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
}

.loot-avatar img,
.reel-avatar img,
.person-photo img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  clip-path: inherit;
}

.loot-photo {
  border: 0;
  margin: 0;
}

.loot-item--special {
  border-color: rgba(232, 199, 90, 0.5);
  background:
    radial-gradient(circle at 50% 30%, rgba(232, 199, 90, 0.16), transparent 62%),
    rgba(232, 199, 90, 0.04);
}

.loot-item--special::after {
  background: #e8c75a;
  box-shadow: 0 0 12px rgba(232, 199, 90, 0.7);
}

.loot-item--special .loot-tone {
  color: #f3dd83;
}

.loot-avatar--special {
  background: #2c2408;
}

.loot-avatar--special img {
  object-fit: contain;
}

.loot-name {
  color: #dfe3e7;
  font-size: 9px;
  line-height: 1.2;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loot-meta {
  margin-top: 1px;
  color: var(--dim);
  font-size: 6px;
  text-align: left;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ footer */

.case-footer {
  flex: 0 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 40px;
  border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.72);
}

.key-line {
  display: none;
}

.footer-actions {
  display: flex;
  gap: 8px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid transparent;
  color: #fff;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: 0.16s ease;
}

.btn:hover {
  filter: brightness(1.12);
}

.btn.primary {
  color: #17120a;
  background: var(--accent);
  border-color: var(--accent);
}

.btn.ghost {
  color: #cbd1d7;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.btn.ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}

/* ------------------------------------------------------------------ idle */

.idle-screen {
  z-index: 20;
  display: grid;
  place-items: center;
  background: #000;
}

.idle-inner {
  text-align: center;
}

.idle-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: #17120a;
  background: var(--accent);
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

.idle-inner p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

/* ------------------------------------------------------------------ opening */

.opening-screen {
  z-index: 40;
  overflow: hidden;
  background: #050607;
}

.opening-bg {
  position: absolute;
  inset: -30px;
  background:
    radial-gradient(circle at 50% 46%, rgba(242, 179, 61, 0.12), transparent 36%),
    url("./img/de_cache.webp") center 45% / cover no-repeat;
  filter: blur(18px) brightness(0.36) saturate(0.7);
  opacity: 0.9;
}

.opening-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 10%, rgba(0, 0, 0, 0.86) 78%);
}

.opening-head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 26px 0 0;
  text-align: center;
}

.opening-kicker {
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  letter-spacing: 0.28em;
}

.opening-round {
  margin-top: 5px;
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.reel-window {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.reel-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.98), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.98));
}

.reel {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 12px;
  will-change: transform;
}

.reel-item {
  position: relative;
  flex: 0 0 320px;
  height: 224px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 42%),
    radial-gradient(circle at 50% 44%, var(--tone-glow, rgba(75, 105, 255, 0.2)), transparent 64%),
    #15181c;
  filter: blur(2px) brightness(0.72);
  transform: scale(0.94);
  transition: filter 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.reel-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-55deg, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 23px);
  pointer-events: none;
}

.reel-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--tone, var(--blue));
  box-shadow: 0 0 16px var(--tone, var(--blue));
}

.reel-item.winner {
  filter: none;
  transform: scale(1);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 48px var(--tone-glow, rgba(242, 179, 61, 0.25));
}

.reel-tone {
  color: var(--tone, var(--blue));
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.reel-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 12px auto 10px;
  display: grid;
  place-items: center;
  color: #111;
  background: linear-gradient(135deg, #fff, var(--tone, var(--blue)) 82%);
  font-size: 38px;
  font-weight: 900;
  font-style: italic;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  box-shadow: 0 0 30px var(--tone-glow, rgba(75, 105, 255, 0.3));
  overflow: hidden;
}

.reel-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  clip-path: inherit;
}

.reel-item--special {
  border-color: rgba(232, 199, 90, 0.7);
  background:
    radial-gradient(circle at 50% 40%, rgba(232, 199, 90, 0.26), transparent 66%),
    #1d1808;
}

.reel-item--special .reel-tone {
  color: #f5df94;
}

.reel-avatar--special {
  background: #302608;
}

.reel-avatar--special img {
  object-fit: contain;
}

.reel-name {
  color: #f4f6f8;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reel-meta {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-align: center;
}

.center-bar {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 268px;
  transform: translate(-50%, -50%);
  background: #b1af2d;
  box-shadow: 0 0 18px rgba(177, 175, 45, 0.7);
}

.center-bar::before,
.center-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.center-bar::before {
  top: -8px;
  border-top: 8px solid #b1af2d;
}

.center-bar::after {
  bottom: -8px;
  border-bottom: 8px solid #b1af2d;
}

.result-panel {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 8%;
  width: min(620px, 88vw);
  transform: translateX(-50%);
  padding: 18px 22px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 6, 7, 0.9);
  backdrop-filter: blur(10px);
  animation: result-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.result-kicker {
  color: var(--tone, var(--accent));
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.result-name {
  margin: 8px 0 4px;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  text-shadow: 0 0 36px var(--tone-glow, rgba(242, 179, 61, 0.25));
}

.result-meta {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.opening-close {
  position: absolute;
  z-index: 12;
  right: 24px;
  bottom: 20px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: #aeb5bc;
  cursor: pointer;
}

.opening-close:hover {
  color: #fff;
}

/* ------------------------------------------------------------------ inspect */

.inspect-screen {
  z-index: 60;
  background:
    radial-gradient(circle at 50% 42%, rgba(242, 179, 61, 0.09), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.05), transparent 50%),
    #030405;
}

.inspect-head {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 24px;
  width: min(760px, 82vw);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.inspect-kicker {
  color: var(--tone, var(--accent));
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.inspect-name {
  margin: 6px 0 3px;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.8);
}

.inspect-sub {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.inspect-progress {
  position: absolute;
  right: -110px;
  top: 10px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.inspect-bar {
  width: min(360px, 62vw);
  height: 4px;
  margin: 10px auto 0;
  background: rgba(255, 255, 255, 0.14);
}

.inspect-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: #2f7ed8;
  transition: width 0.25s ease;
}

.inspect-nav {
  position: absolute;
  z-index: 5;
  top: 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 150px;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: #c8ced5;
  cursor: pointer;
  opacity: 0.85;
}

.inspect-nav:hover {
  color: #fff;
  opacity: 1;
}

.inspect-nav span {
  font-size: 54px;
  line-height: 0.8;
  font-weight: 200;
}

.inspect-nav small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.inspect-nav--prev {
  left: 24px;
}

.inspect-nav--next {
  right: 24px;
}

.inspect-nav:disabled {
  opacity: 0.16;
  cursor: default;
}

.inspect-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

#cardCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#cardCanvas:active {
  cursor: grabbing;
}

.inspect-hint {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 9px;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.inspect-bottom {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px 22px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}

.inspect-desc {
  max-width: 560px;
  color: #aab1b8;
  font-size: 11px;
  line-height: 1.7;
}

.inspect-close {
  flex: 0 0 auto;
  min-width: 96px;
}

/* ------------------------------------------------------------------ modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-panel {
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  background: #0c0f12;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
}

.modal-panel.wide {
  width: min(960px, 94vw);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-kicker {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.modal-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

#rosterInput {
  width: 100%;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}

#rosterInput:focus {
  border-color: rgba(242, 179, 61, 0.65);
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.inventory-tabs {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.inv-tab {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.inv-tab:hover {
  color: #fff;
}

.inv-tab.active {
  color: var(--accent-2);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------ inventory page */

.inventory-screen {
  z-index: 14;
  background:
    radial-gradient(circle at 50% -10%, rgba(75, 105, 255, 0.08), transparent 40%),
    #050607;
}

.inventory-head {
  position: relative;
  flex: 0 0 auto;
  padding: 28px 40px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.inventory-back {
  position: absolute;
  left: 40px;
  top: 28px;
}

.inventory-title {
  padding-left: 112px;
}

.inventory-kicker {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.inventory-title h1 {
  margin: 4px 0 2px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inventory-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.inventory-total {
  position: absolute;
  right: 40px;
  top: 34px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.inventory-total b {
  color: var(--accent-2);
  font-size: 14px;
}

.inventory-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px 40px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.inventory-main .history-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.inventory-main .history-card {
  min-height: 178px;
}

.inventory-main .history-photo,
.inventory-main .history-photo-fallback {
  height: 96px;
}

.history-new {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 8px;
  padding: 3px 6px;
  color: #fff;
  background: #1e9bd7;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.history-card.is-new {
  border-color: rgba(30, 155, 215, 0.45);
}

/* ------------------------------------------------------------------ inventory page */

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.history-card {
  position: relative;
  min-height: 150px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 80% 10%, var(--tone-glow, rgba(75, 105, 255, 0.2)), transparent 60%),
    rgba(255, 255, 255, 0.025);
  cursor: pointer;
  overflow: hidden;
}

.history-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--tone, var(--blue));
}

.history-photo {
  width: 100%;
  height: 74px;
  object-fit: cover;
  display: block;
  border: 1px solid color-mix(in srgb, var(--tone, var(--blue)) 55%, transparent);
  background: rgba(255, 255, 255, 0.03);
}

.history-photo-fallback {
  width: 100%;
  height: 74px;
  display: grid;
  place-items: center;
  color: var(--tone, var(--blue));
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
  font-size: 25px;
  font-weight: 900;
  font-style: italic;
}

.history-round {
  margin-top: 8px;
  color: var(--tone, var(--blue));
  font-size: 8px;
  letter-spacing: 0.14em;
}

.history-name {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.history-time {
  margin-top: 3px;
  color: var(--dim);
  font-size: 8px;
}

.empty {
  padding: 32px 0;
  color: var(--dim);
  font-size: 11px;
  text-align: center;
}

/* ------------------------------------------------------------------ people editor */

.photo-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.022);
}

.photo-config label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.photo-config input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 10px;
  outline: none;
}

.photo-config input:focus {
  border-color: rgba(242, 179, 61, 0.55);
}

.photo-config p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.5;
}

.photo-config code {
  color: var(--accent-2);
}

.special-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(232, 199, 90, 0.24);
  background: rgba(232, 199, 90, 0.035);
}

.github-config {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(75, 105, 255, 0.25);
  background: rgba(75, 105, 255, 0.035);
}

.github-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #9eb6ff;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.btn-detect {
  min-height: 26px;
  padding: 0 10px;
  font-size: 9px;
}

.github-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.github-config label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #9aa8cc;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.github-config input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(75, 105, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 10px;
  outline: none;
}

.github-config input:focus {
  border-color: rgba(75, 105, 255, 0.65);
}

.github-proxy-label {
  margin-top: 8px;
}

.github-probe {
  grid-column: 1 / -1;
}

.mirror-status {
  margin-top: 8px;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.6;
}

.mirror-status .ok {
  color: #69d39a;
}

.mirror-status .fail {
  color: #e97878;
}

.special-config label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #cbb979;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.special-config input:not([type="checkbox"]) {
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(232, 199, 90, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 10px;
  outline: none;
}

.special-config input:focus {
  border-color: rgba(232, 199, 90, 0.65);
}

.special-toggle {
  flex-direction: row !important;
  align-items: center;
  gap: 7px !important;
  color: #e8c75a !important;
}

.special-toggle input {
  accent-color: #e8c75a;
}

.special-desc-label {
  grid-column: 1 / -1;
}

.people-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 44vh;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.person-row {
  display: grid;
  grid-template-columns: 58px minmax(90px, 0.8fr) 42px minmax(120px, 1.2fr) 32px;
  gap: 7px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
}

.person-photo {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--tone, var(--blue));
  background: linear-gradient(135deg, #fff, var(--tone, var(--blue)) 82%);
  color: #111;
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.person-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.person-photo::after {
  content: "换";
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 3px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 7px;
  font-style: normal;
  font-weight: 500;
  opacity: 0;
  transition: 0.15s ease;
}

.person-photo:hover::after {
  opacity: 1;
}

.person-name,
.person-desc {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 11px;
  outline: none;
}

.person-name:focus,
.person-desc:focus {
  border-color: rgba(242, 179, 61, 0.55);
}

.person-color {
  width: 38px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.person-remove {
  width: 28px;
  height: 30px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: #8e969e;
  cursor: pointer;
}

.person-remove:hover {
  color: #fff;
  border-color: var(--line);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.file-label {
  cursor: pointer;
}

.editor-count {
  margin-left: auto;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ context menu */

.context-menu {
  position: fixed;
  z-index: 200;
  min-width: 210px;
  padding: 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 18, 21, 0.98);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
}

.context-menu button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: #d8dde2;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.context-menu button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.context-menu button + button {
  border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  z-index: 120;
  transform: translate(-50%, 16px);
  padding: 9px 14px;
  border: 1px solid rgba(242, 179, 61, 0.35);
  background: rgba(8, 10, 12, 0.94);
  color: var(--accent-2);
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .browser-head {
    padding: 18px 16px 12px;
  }
  .browser-tools {
    right: 16px;
    top: 18px;
  }
  .browser-main {
    padding: 12px 16px 18px;
  }
  .browser-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  }
  .browser-grid .case-tile {
    height: 152px;
    padding: 10px 6px 8px;
  }
  .browser-footer {
    padding: 10px 16px 12px;
  }
  .inventory-head {
    padding: 18px 16px 12px;
  }
  .inventory-back {
    left: 16px;
    top: 18px;
  }
  .inventory-title {
    padding-left: 100px;
  }
  .inventory-title h1 {
    font-size: 24px;
  }
  .inventory-title p {
    max-width: 62%;
  }
  .inventory-total {
    right: 16px;
    top: 22px;
  }
  .inventory-main {
    padding: 12px 16px 18px;
  }
  .inventory-main .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  }
  .case-header {
    min-height: 112px;
    padding-top: 18px;
  }
  .case-back {
    left: 12px;
    top: 14px;
  }
  .case-tools {
    right: 14px;
    top: 14px;
  }
  .case-main {
    padding: 0 16px;
    grid-template-rows: minmax(140px, 1fr) auto auto;
  }
  .case-tile {
    flex: 0 0 106px;
    height: 116px;
  }
  .case-tile-art {
    transform: scale(0.88);
    transform-origin: center;
  }
  .loot-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .loot-section {
    max-height: 210px;
  }
  .case-footer {
    padding: 0 16px;
  }
  .footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .reel-item {
    flex-basis: 240px;
    height: 168px;
  }
  .reel-avatar {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
  .reel-name {
    font-size: 19px;
  }
  .center-bar {
    height: 220px;
  }
  .inspect-progress {
    display: none;
  }
  .inspect-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .inspect-close {
    align-self: flex-end;
  }
  .person-row {
    grid-template-columns: 48px 1fr 36px 1fr 28px;
  }
  .person-photo {
    width: 48px;
    height: 48px;
  }
  .people-editor {
    max-height: 38vh;
  }
  .photo-config {
    grid-template-columns: 1fr;
  }
  .special-config {
    grid-template-columns: 1fr;
  }
  .github-grid {
    grid-template-columns: 1fr;
  }
}
/* CS case-opening screen: wider reel cards, blurred sides, circular lens */
.opening-head {
  padding: 20px 0 0;
}
.opening-kicker {
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
}
.opening-title {
  margin: 4px 0 2px;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.opening-subtitle {
  color: #c9cdd2;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.opening-subtitle b {
  color: var(--accent-2);
  font-weight: 600;
}
.opening-warning {
  margin-top: 7px;
  color: #b9bec5;
  font-size: 9px;
  letter-spacing: 0.04em;
}
.opening-warning span {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-right: 4px;
  border: 1px solid #b9bec5;
  border-radius: 50%;
  font-size: 8px;
}
.opening-round {
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.32);
}
.reel-window::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: min(660px, 64vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(242, 179, 61, 0.2), rgba(153, 96, 29, 0.13) 38%, rgba(33, 20, 8, 0.22) 62%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}
.reel-window::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 20%, rgba(0, 0, 0, 0.18) 56%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}
.opening-bg {
  filter: blur(22px) brightness(0.3) saturate(0.55);
}
.reel {
  gap: 8px;
}
.reel-item {
  flex: 0 0 320px;
  height: 224px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(173, 190, 204, 0.28);
  border-radius: 1px;
  background:
    linear-gradient(180deg, rgba(74, 91, 103, 0.9), rgba(37, 47, 56, 0.94) 58%, rgba(26, 58, 88, 0.96)),
    #202a31;
  filter: blur(2.5px) brightness(0.56) saturate(0.75);
  transform: scale(0.9);
  opacity: 0.82;
}
.reel-item::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 36%);
}
.reel-item::after {
  height: 5px;
  background: linear-gradient(90deg, #2f6ca8, #7db7e8 50%, #2f6ca8);
  box-shadow: 0 0 14px rgba(90, 157, 220, 0.45);
}
.reel-item:nth-child(odd)::after {
  background: linear-gradient(90deg, #6b38a4, #b98ce8 50%, #6b38a4);
}
.reel-item.winner {
  filter: none;
  transform: scale(1.02);
  opacity: 1;
  border-color: rgba(210, 224, 235, 0.55);
  box-shadow: 0 0 44px rgba(242, 179, 61, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.reel-tone {
  font-size: 8px;
  letter-spacing: 0.14em;
  opacity: 0.9;
}
.reel-avatar {
  width: 100%;
  height: 150px;
  margin: 7px 0 7px;
  font-size: 34px;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 92% 100%, 0 100%);
}
.reel-name {
  color: #f0f2f4;
  font-size: 18px;
  text-align: left;
  padding-left: 2px;
}
.reel-meta {
  text-align: left;
  padding-left: 2px;
}
.center-bar {
  height: 286px;
  background: #b9b62c;
}
.center-bar::before { border-top-color: #b9b62c; }
.center-bar::after { border-bottom-color: #b9b62c; }
/* stronger CS reel lens */
.reel-window::before {
  width: min(720px, 70vw);
  background:
    radial-gradient(circle at 50% 48%, rgba(242, 179, 61, 0.3), rgba(145, 88, 25, 0.18) 38%, rgba(30, 18, 7, 0.25) 64%, transparent 74%);
  filter: blur(14px);
}
.opening-subtitle { letter-spacing: 0.08em; }
/* bottom item strip on the opening screen */
.opening-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 58px;
  padding: 6px 12% 4px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72) 40%, rgba(0, 0, 0, 0.92));
  pointer-events: none;
  overflow: hidden;
}
.opening-strip-item {
  flex: 0 0 54px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(80, 96, 108, 0.5), rgba(20, 28, 36, 0.8));
  overflow: hidden;
}
.opening-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.65;
}
.opening-strip-item::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: -2px;
  background: var(--tone, #4b69ff);
}
.opening-screen:has(.result-panel:not(.hidden)) .opening-strip {
  display: none;
}
