:root {
  color-scheme: dark;
  --bg: #101418;
  --panel: rgba(14, 19, 24, 0.82);
  --panel-strong: rgba(14, 19, 24, 0.94);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7fbff;
  --muted: rgba(247, 251, 255, 0.7);
  --accent: #ffb35b;
  --accent-2: #4dd6c8;
  --danger: #ff7373;
  --ok: #9be47a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

/* Pixel-style refresh for the QR generator, dashboard, and WeChat scan view. */
:root {
  --pixel-ink: #101318;
  --pixel-paper: #fff6d7;
  --pixel-yellow: #ffd91f;
  --pixel-pink: #ff4fa3;
  --pixel-blue: #31b7ff;
  --pixel-green: #24e59d;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

.admin-page {
  background: #e8e2c8;
  color: var(--pixel-ink);
}

.admin-page::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 5px),
    #e8e2c8;
  background-size: 26px 26px, 26px 26px, 100% 5px, auto;
}

body::before,
body::after,
.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(120deg, rgba(17, 20, 24, 0.75), rgba(17, 20, 24, 0.28)),
    radial-gradient(circle at 14% 20%, rgba(255, 179, 91, 0.34), transparent 28%),
    radial-gradient(circle at 76% 16%, rgba(77, 214, 200, 0.22), transparent 30%),
    linear-gradient(160deg, #1a3136 0%, #302d3b 45%, #503629 100%);
}

body::after {
  z-index: -2;
  opacity: 0.46;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.ambient-layer {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 105%, rgba(255, 255, 255, 0.18), transparent 25%),
    linear-gradient(180deg, transparent 60%, rgba(255, 255, 255, 0.08) 61%, transparent 64%);
  animation: breathe 8s ease-in-out infinite;
}

.theme-cyber::before {
  background:
    linear-gradient(120deg, rgba(6, 9, 18, 0.84), rgba(6, 9, 18, 0.28)),
    repeating-linear-gradient(90deg, rgba(0, 255, 209, 0.14) 0 2px, transparent 2px 26px),
    radial-gradient(circle at 20% 20%, rgba(245, 71, 255, 0.35), transparent 28%),
    radial-gradient(circle at 78% 76%, rgba(38, 217, 255, 0.28), transparent 30%),
    #090b18;
}

.theme-universe::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 22%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 70%, rgba(255, 255, 255, 0.62) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 75%, rgba(141, 119, 255, 0.3), transparent 26%),
    linear-gradient(145deg, #07091b, #111d33 58%, #1e1432);
  background-size: auto;
}

.theme-pixel::before {
  background:
    linear-gradient(135deg, rgba(22, 34, 26, 0.84), rgba(28, 18, 42, 0.44)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0 10px, transparent 10px 20px),
    linear-gradient(140deg, #28b463, #2559a9 44%, #b53c82 100%);
}

.theme-beach::before {
  background:
    linear-gradient(180deg, rgba(10, 25, 31, 0.42), rgba(10, 25, 31, 0.7)),
    radial-gradient(circle at 64% 18%, rgba(255, 230, 142, 0.36), transparent 18%),
    repeating-radial-gradient(ellipse at 50% 110%, rgba(255, 255, 255, 0.12) 0 12px, transparent 12px 28px),
    linear-gradient(145deg, #1bb5ad, #2b79bb 58%, #ead285);
}

.theme-forest::before {
  background:
    linear-gradient(120deg, rgba(7, 21, 18, 0.82), rgba(7, 21, 18, 0.32)),
    radial-gradient(circle at 20% 80%, rgba(190, 225, 94, 0.3), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(89, 189, 177, 0.24), transparent 28%),
    linear-gradient(145deg, #0e382f, #263d31 48%, #40304c);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.admin-page .topbar {
  width: 100%;
  border-bottom: 4px solid #000;
  padding: 10px min(24px, 4vw);
  background: var(--pixel-yellow);
  color: #000;
}

.admin-page .brand {
  border: 3px solid #000;
  padding: 8px 10px;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
  font-size: 16px;
}

.admin-page nav a {
  border: 3px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  box-shadow: 4px 4px 0 #000;
  font-weight: 900;
}

a {
  color: inherit;
  text-decoration: none;
}

.brand {
  font-size: 18px;
  font-weight: 800;
}

nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shell {
  display: grid;
  min-height: calc(100vh - 92px);
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
  place-items: center;
}

.intro-panel,
.work-panel,
.profile-panel,
.admin-controls {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--panel);
  backdrop-filter: blur(22px);
}

.admin-page .admin-controls,
.admin-page .table-wrap,
.admin-page .stats-row div {
  border: 4px solid #000;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 8px 8px 0 #000;
  color: #000;
  backdrop-filter: none;
}

.admin-page .admin-controls h1 {
  display: inline;
  background: var(--pixel-blue);
  box-shadow: 6px 6px 0 #000;
  line-height: 1.18;
}

.admin-page .eyebrow,
.admin-page th {
  color: #000;
}

.admin-page .helper-text {
  color: #222;
}

.admin-page .helper-text strong,
.admin-page .helper-text span {
  display: block;
}

.admin-page .helper-text strong {
  color: #000;
  font-size: 16px;
}

.admin-page label,
.admin-page legend,
.admin-page .stats-row small,
.admin-page td,
.admin-page tr.is-bound td,
.admin-page .qr-item small {
  color: #141414;
}

.admin-page .stats-row span,
.admin-page .qr-item strong,
.admin-page table strong {
  color: #000;
}

.admin-page input::placeholder,
.admin-page textarea::placeholder {
  color: #5d5d5d;
  opacity: 1;
}

.admin-page .table-wrap {
  background: rgba(255, 255, 255, 0.96);
}

.admin-page table {
  background: #fffef7;
}

.admin-page th {
  background: #f3edcf;
}

.admin-page td {
  background: rgba(255, 254, 247, 0.95);
}

.admin-page tr.is-bound td {
  background: #fff7d1;
}

.admin-page tr:not(.is-bound) td {
  color: #4f4f4f;
}

.admin-page .small-button {
  color: #000;
}

.intro-panel,
.work-panel,
.profile-panel {
  padding: clamp(26px, 6vw, 58px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.section-title {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.section-title h1,
.admin-controls h1 {
  font-size: clamp(30px, 5vw, 54px);
}

.lead,
.profile-detail p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.profile-detail {
  margin-top: 28px;
}

.profile-detail h2 {
  margin: 0;
  color: var(--accent-2);
  font-size: 15px;
}

.profile-detail p {
  margin-top: 10px;
}

.code-form,
.claim-form,
.batch-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

label,
legend {
  display: grid;
  gap: 8px;
  color: rgba(247, 251, 255, 0.86);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.admin-page input,
.admin-page textarea {
  border: 3px solid #000;
  border-radius: 0;
  background: #fffef3;
  color: #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.82);
}

.admin-page button {
  border: 3px solid #000;
  border-radius: 0;
  background: var(--pixel-pink);
  color: #000;
  box-shadow: 4px 4px 0 #000;
}

input:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(77, 214, 200, 0.15);
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.7;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  background: var(--accent);
  color: #1a1208;
  font-weight: 800;
  transition: transform 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.theme-choice {
  position: relative;
  display: grid;
  min-height: 86px;
  align-content: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-align: left;
}

.theme-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-choice span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.theme-choice::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.8;
}

.theme-choice[data-theme="cyber"]::before {
  background: linear-gradient(135deg, #111827, #e851ff, #26d9ff);
}

.theme-choice[data-theme="sunset"]::before {
  background: linear-gradient(135deg, #1b3c49, #e87d44, #ffd166);
}

.theme-choice[data-theme="universe"]::before {
  background: linear-gradient(135deg, #060818, #34266b, #8893ff);
}

.theme-choice[data-theme="pixel"]::before {
  background: linear-gradient(135deg, #1e904d, #2661c9, #d5438c);
}

.theme-choice[data-theme="beach"]::before {
  background: linear-gradient(135deg, #08a8a2, #3b86d1, #f2d889);
}

.theme-choice[data-theme="forest"]::before {
  background: linear-gradient(135deg, #153c30, #8abb48, #58c1b4);
}

.theme-choice:has(input:checked) {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.primary-action {
  width: 100%;
}

.code-badge {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-weight: 800;
}

.profile-panel {
  display: grid;
  gap: 36px;
}

.profile-copy h1 {
  overflow-wrap: anywhere;
}

.contact-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.contact-strip span {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 800;
}

.status-line {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.status-line.error {
  color: var(--danger);
}

.status-line.ok {
  color: var(--ok);
}

.helper-text {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

.admin-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.admin-controls {
  width: 100%;
  padding: 28px;
}

.batch-form {
  grid-template-columns: 2fr 0.8fr 0.8fr 0.8fr auto;
  align-items: end;
}

.dashboard-form {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 0.7fr 1.4fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 28px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-actions button:last-child {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.qr-item {
  border: 4px solid #000;
  border-radius: 0;
  padding: 14px;
  background: #fffef7;
  color: #111827;
  box-shadow: 8px 8px 0 #000;
}

.qr-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.qr-item strong,
.qr-item small {
  display: block;
  overflow-wrap: anywhere;
}

.qr-item strong {
  margin-top: 8px;
  font-size: 16px;
}

.qr-item small {
  margin-top: 4px;
  color: #4b5563;
  font-size: 11px;
  line-height: 1.35;
}

.qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.qr-actions a,
.small-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 3px solid #000;
  border-radius: 0;
  padding: 0 10px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 3px 3px 0 #000;
}

.qr-actions a:last-child {
  background: var(--pixel-blue);
  color: #000;
}

.code-session {
  min-height: 100dvh;
  background: var(--pixel-paper);
}

.code-session .topbar {
  display: none;
}

.code-session::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.045) 0 2px, transparent 2px 6px),
    var(--pixel-paper);
  background-size: 22px 22px, 22px 22px, 100% 6px, auto;
}

.code-session::after {
  opacity: 1;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 79, 163, 0.34), transparent 23%),
    radial-gradient(circle at 86% 24%, rgba(49, 183, 255, 0.28), transparent 25%),
    radial-gradient(circle at 66% 92%, rgba(255, 217, 31, 0.36), transparent 26%);
  mask-image: none;
}

.code-session.theme-universe::after {
  background:
    radial-gradient(circle at 18% 18%, rgba(137, 119, 255, 0.36), transparent 24%),
    radial-gradient(circle at 80% 28%, rgba(49, 183, 255, 0.26), transparent 22%),
    radial-gradient(circle at 50% 90%, rgba(255, 79, 163, 0.28), transparent 28%);
}

.code-session.theme-forest::after {
  background:
    radial-gradient(circle at 16% 18%, rgba(36, 229, 157, 0.34), transparent 24%),
    radial-gradient(circle at 88% 22%, rgba(255, 217, 31, 0.26), transparent 22%),
    radial-gradient(circle at 54% 88%, rgba(49, 183, 255, 0.24), transparent 28%);
}

.code-session .ambient-layer {
  opacity: 0.35;
  background:
    linear-gradient(45deg, transparent 48%, rgba(0, 0, 0, 0.18) 49%, rgba(0, 0, 0, 0.18) 51%, transparent 52%);
  background-size: 18px 18px;
}

.code-session .shell {
  min-height: 100dvh;
  width: min(560px, calc(100% - 22px));
  padding: 18px 0 28px;
  place-items: center;
}

.code-session .work-panel,
.code-session .profile-panel {
  width: 100%;
  border: 4px solid #000;
  border-radius: 0;
  background: rgba(255, 254, 243, 0.96);
  color: #111;
  box-shadow: 8px 8px 0 #000;
  backdrop-filter: none;
}

.code-session .profile-panel {
  gap: 24px;
  padding: 22px;
}

.code-session .profile-copy .eyebrow {
  display: inline-block;
  border: 3px solid #000;
  padding: 5px 8px;
  background: var(--pixel-green);
  color: #000;
  box-shadow: 4px 4px 0 #000;
}

.code-session .profile-copy h1 {
  display: inline;
  background: var(--pixel-yellow);
  color: #000;
  box-shadow: 6px 6px 0 #000;
  font-size: clamp(46px, 17vw, 86px);
  line-height: 1.05;
}

.code-session .profile-detail {
  border: 3px solid #000;
  padding: 14px;
  background: #ffffff;
  box-shadow: 5px 5px 0 #000;
}

.code-session .profile-detail h2 {
  display: inline-block;
  margin: -28px 0 8px;
  border: 3px solid #000;
  padding: 5px 8px;
  background: var(--pixel-blue);
  color: #000;
  box-shadow: 3px 3px 0 #000;
  font-size: 14px;
}

.code-session .profile-detail p {
  color: #1b1f24;
  font-size: 17px;
  line-height: 1.75;
}

.code-session .contact-strip {
  grid-template-columns: 1fr;
  border-top: 3px dashed #000;
  padding-top: 20px;
}

.code-session .contact-strip span {
  border: 3px solid #000;
  padding: 14px;
  background: #000;
  color: #fff;
  box-shadow: 5px 5px 0 var(--pixel-pink);
  font-size: clamp(24px, 8vw, 36px);
}

.code-session #copyContact {
  width: 100%;
  border: 4px solid #000;
  border-radius: 0;
  background: var(--pixel-pink);
  color: #000;
  box-shadow: 5px 5px 0 #000;
}

.code-session .status-line {
  color: #111;
}

.code-session {
  --opc-yellow: #ffd900;
  --opc-cyan: #77e3e7;
  --opc-pink: #ff85b9;
  --opc-orange: #ff9d25;
  --opc-ink: #111111;
}

.code-session::before {
  background:
    radial-gradient(circle, rgba(255, 156, 37, 0.38) 0 3px, transparent 4px) 18px 22px / 58px 58px,
    radial-gradient(circle, rgba(119, 227, 231, 0.32) 0 3px, transparent 4px) 44px 8px / 64px 64px,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 6px),
    var(--opc-yellow);
}

.code-session.profile-mode::before {
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.12) 0 4px, transparent 5px) 20px 30px / 70px 70px,
    radial-gradient(circle, rgba(119, 227, 231, 0.36) 0 3px, transparent 4px) 44px 8px / 64px 64px,
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.035) 0 2px, transparent 2px 6px),
    #fffdf4;
}

.code-session::after {
  opacity: 1;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.35) 49% 51%, transparent 52%) 0 0 / 26px 26px,
    radial-gradient(circle at 92% 10%, rgba(255, 133, 185, 0.45), transparent 18%),
    radial-gradient(circle at 12% 90%, rgba(119, 227, 231, 0.38), transparent 24%);
  mask-image: none;
}

.code-session .shell {
  width: min(430px, calc(100% - 18px));
  min-height: 100dvh;
  padding: 16px 0 24px;
  place-items: center;
}

.code-session .work-panel,
.code-session .profile-panel {
  position: relative;
  overflow: hidden;
  border: 5px solid #000;
  border-radius: 0;
  padding: 20px;
  background: #fffdf4;
  color: var(--opc-ink);
  box-shadow: 9px 9px 0 #000;
}

.code-session.claim-mode .work-panel {
  min-height: calc(100dvh - 40px);
  background: #ffdb00;
}

.code-session.profile-mode .profile-panel {
  min-height: calc(100dvh - 40px);
}

.code-session .work-panel::before,
.code-session .profile-panel::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    radial-gradient(circle, rgba(255, 149, 31, 0.5) 0 4px, transparent 5px) 20px 20px / 72px 72px,
    radial-gradient(circle, rgba(0, 0, 0, 0.1) 0 4px, transparent 5px) 54px 48px / 88px 88px;
  pointer-events: none;
}

.code-session.profile-mode .profile-panel::before {
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.12) 0 4px, transparent 5px) 20px 20px / 76px 76px,
    radial-gradient(circle, rgba(119, 227, 231, 0.32) 0 4px, transparent 5px) 54px 48px / 88px 88px;
}

.code-session .work-panel > *,
.code-session .profile-panel > * {
  position: relative;
  z-index: 1;
}

.opc-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.opc-kicker {
  margin: 0 0 4px;
  color: #000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.opc-title {
  display: inline-block;
  margin: 0;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(38px, 10vw, 54px);
  line-height: 0.98;
  white-space: nowrap;
  text-shadow:
    2px 0 #fff,
    -2px 0 #fff,
    0 2px #fff,
    0 -2px #fff,
    4px 4px 0 rgba(0, 0, 0, 0.28);
}

.opc-mascot {
  width: 112px;
  height: 92px;
  object-fit: contain;
  justify-self: end;
  margin-top: -16px;
  margin-right: -8px;
  filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.32));
}

.code-session .code-badge {
  border: 3px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  box-shadow: 4px 4px 0 #000;
  font-size: 12px;
}

.code-session .claim-form {
  gap: 14px;
  margin-top: 12px;
}

.opc-field,
.code-session .profile-detail {
  display: grid;
  gap: 8px;
  border: 4px solid var(--opc-cyan);
  border-radius: 9px;
  padding: 12px;
  background: rgba(255, 253, 244, 0.84);
  box-shadow: 7px 7px 0 #000;
}

.opc-about-field {
  border-color: var(--opc-pink);
}

.opc-vibe-field {
  border-color: var(--opc-cyan);
}

.opc-contact-field {
  border-color: var(--opc-orange);
}

.code-session label,
.code-session .profile-detail h2 {
  color: #000;
  font-size: 14px;
  font-weight: 900;
}

.code-session label span,
.code-session .profile-detail h2 {
  display: inline-block;
  margin: 0;
  border: 4px solid #000;
  padding: 7px 10px;
  background: #33b4ec;
  box-shadow: 5px 5px 0 #000;
  line-height: 1.15;
}

.code-session input,
.code-session textarea {
  border: 0;
  border-radius: 0;
  padding: 6px 0;
  background: transparent;
  color: #000;
  box-shadow: none;
  font-size: 19px;
  font-weight: 800;
}

.code-session textarea {
  min-height: 112px;
}

.code-session input::placeholder,
.code-session textarea::placeholder {
  color: rgba(0, 0, 0, 0.42);
  opacity: 1;
}

.opc-foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  justify-items: center;
  margin-top: 6px;
}

.opc-foot span {
  color: #000;
  font-weight: 900;
}

.code-session .primary-action,
.code-session #copyContact {
  border: 4px solid #000;
  border-radius: 0;
  min-height: 54px;
  background: var(--opc-pink);
  color: #000;
  box-shadow: 5px 5px 0 #000;
  font-weight: 900;
}

.code-session .primary-action {
  width: min(280px, 100%);
}

.code-session.profile-mode .profile-copy {
  display: grid;
  gap: 18px;
}

.code-session .profile-detail {
  margin-top: 0;
}

.code-session .profile-detail p {
  margin: 4px 0 0;
  max-width: none;
  color: #000;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.65;
}

.code-session .opc-name-line {
  border-color: var(--opc-cyan);
}

.code-session .opc-name-line p {
  font-size: 24px;
}

.code-session .contact-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border-top: 3px dashed #000;
  padding-top: 18px;
}

.code-session .contact-strip h2 {
  margin: 0;
  color: #000;
  font-size: 15px;
}

.code-session .contact-strip span {
  border: 3px solid #000;
  padding: 16px;
  background: #fff;
  color: #000;
  box-shadow: 5px 5px 0 var(--opc-yellow);
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 900;
}

.copy-fallback {
  position: fixed;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.copy-fallback.is-active {
  position: static;
  width: 100%;
  height: 74px;
  opacity: 1;
  border: 3px solid #000;
  background: #fff;
  color: #000;
}

.code-session .status-line {
  min-height: 22px;
  color: #000;
  font-size: 13px;
  font-weight: 800;
}

.code-session .status-line.error {
  color: #b00020;
}

.code-session .status-line.ok {
  color: #007a3d;
}

.code-session .profile-copy .opc-title,
.code-session .work-panel .opc-title {
  display: inline-block;
  background: transparent;
  color: #000;
  box-shadow: none;
  font-size: clamp(38px, 10vw, 54px);
  line-height: 0.98;
  white-space: nowrap;
}

@media (max-width: 390px) {
  .opc-card-head {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .opc-mascot {
    width: 86px;
    height: 76px;
    margin-top: -12px;
  }

  .opc-title,
  .code-session .profile-copy .opc-title,
  .code-session .work-panel .opc-title {
    font-size: clamp(30px, 8.5vw, 38px);
  }
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.stats-row div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.stats-row span,
.stats-row small {
  display: block;
}

.stats-row span {
  font-size: 34px;
  font-weight: 900;
}

.stats-row small {
  margin-top: 4px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

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

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

th {
  color: var(--accent-2);
  font-size: 12px;
}

td {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

tr.is-bound td {
  color: var(--text);
}

.small-button {
  min-height: 32px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 115, 115, 0.18);
  color: #ffd5d5;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.62;
    transform: translateY(0);
  }
  50% {
    opacity: 0.92;
    transform: translateY(-18px);
  }
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
  }

  .shell {
    place-items: start center;
    padding-top: 20px;
  }

  .code-row,
  .contact-strip,
  .batch-form,
  .dashboard-form {
    grid-template-columns: 1fr;
  }

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

  .admin-actions,
  .admin-actions button {
    width: 100%;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #111827;
  }

  body::before,
  body::after,
  .ambient-layer,
  .topbar,
  .admin-controls,
  .qr-actions {
    display: none;
  }

  .admin-shell {
    width: 100%;
    padding: 0;
  }

  .qr-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0;
  }

  .qr-item {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Final OPC identity-card mobile layout */
.code-session {
  --opc-card-bg: #fffef6;
  --opc-blue: #77e7eb;
  --opc-pink: #ff7daf;
  --opc-label-blue: #33b4ec;
  --opc-yellow: #ffd908;
  --opc-orange: #ff9a24;
}

.code-session.claim-mode::before,
.code-session.profile-mode::before {
  background:
    radial-gradient(circle, rgba(194, 194, 194, 0.55) 0 4px, transparent 5px) 18px 18px / 74px 74px,
    radial-gradient(circle, rgba(119, 231, 235, 0.48) 0 5px, transparent 6px) 52px 44px / 88px 88px,
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.028) 0 2px, transparent 2px 6px),
    #faf8ee;
}

.code-session.claim-mode::after,
.code-session.profile-mode::after {
  background:
    linear-gradient(135deg, transparent 0 47%, rgba(0, 0, 0, 0.12) 48% 50%, transparent 51%) 0 0 / 26px 26px;
  opacity: 0.55;
}

.code-session .shell {
  width: min(430px, calc(100% - 16px));
  padding: 14px 0 22px;
}

.code-session .work-panel,
.code-session .profile-panel,
.code-session.claim-mode .work-panel,
.code-session.profile-mode .profile-panel {
  min-height: auto;
  overflow: visible;
  border: 5px solid #000;
  padding: 18px;
  background:
    radial-gradient(circle, rgba(198, 198, 198, 0.5) 0 4px, transparent 5px) 14px 20px / 76px 76px,
    radial-gradient(circle, rgba(126, 236, 239, 0.45) 0 5px, transparent 6px) 54px 58px / 91px 91px,
    var(--opc-card-bg);
  box-shadow: none;
}

.code-session .work-panel {
  background:
    radial-gradient(circle, rgba(255, 169, 0, 0.55) 0 4px, transparent 5px) 14px 20px / 76px 76px,
    radial-gradient(circle, rgba(204, 174, 0, 0.4) 0 5px, transparent 6px) 54px 58px / 91px 91px,
    var(--opc-yellow);
}

.code-session .work-panel::before,
.code-session .profile-panel::before {
  display: none;
}

.opc-card-head {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 98px;
  align-items: start;
  gap: 4px;
  min-height: 100px;
  margin-bottom: 16px;
}

.opc-kicker {
  color: #000;
  font-size: 12px;
  letter-spacing: 0;
}

.opc-title,
.code-session .profile-copy .opc-title,
.code-session .work-panel .opc-title {
  display: flex;
  align-items: baseline;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(34px, 10.4vw, 48px);
  line-height: 0.95;
  text-shadow:
    2px 0 #fff,
    -2px 0 #fff,
    0 2px #fff,
    0 -2px #fff,
    5px 5px 0 rgba(0, 0, 0, 0.34);
}

.opc-logo-en {
  color: var(--opc-yellow);
}

.opc-logo-cn {
  color: #000;
}

.code-session .work-panel .opc-logo-cn {
  color: #fff;
}

.opc-mascot {
  width: 108px;
  height: 96px;
  margin-top: -16px;
  margin-right: -14px;
  object-fit: contain;
  justify-self: end;
}

.opc-decor {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  object-fit: contain;
}

.opc-pin {
  width: 38px;
  height: 48px;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) rotate(5deg);
}

.opc-pencil {
  width: 42px;
  height: 42px;
  top: 68px;
  left: 10px;
  transform: rotate(-22deg);
}

.opc-keyboard {
  width: 88px;
  top: 326px;
  right: 4px;
  transform: rotate(-14deg);
}

.opc-heart {
  width: 52px;
  right: 30px;
  bottom: 110px;
}

.opc-rainbow {
  width: 74px;
  left: 132px;
  bottom: 88px;
  transform: rotate(-6deg);
}

.code-session .claim-form,
.code-session.profile-mode .profile-copy {
  gap: 16px;
}

.opc-field,
.code-session .profile-detail {
  position: relative;
  border: 4px solid var(--opc-blue);
  border-radius: 9px;
  padding: 12px 12px 14px;
  background: rgba(255, 254, 246, 0.86);
  box-shadow: 7px 7px 0 #000;
}

.opc-about-field {
  border-color: var(--opc-pink);
  min-height: 170px;
}

.opc-vibe-field {
  min-height: 136px;
}

.opc-name-field,
.code-session .opc-name-line {
  min-height: 92px;
}

.opc-contact-field {
  border-color: var(--opc-orange);
  min-height: 96px;
}

.code-session label span,
.code-session .profile-detail h2 {
  display: inline-block;
  border: 4px solid #000;
  padding: 7px 10px;
  background: var(--opc-label-blue);
  color: #000;
  box-shadow: 5px 5px 0 #000;
  font-size: 14px;
  line-height: 1.15;
}

.code-session .work-panel label span {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
}

.code-session input,
.code-session textarea {
  color: #000;
  font-size: 20px;
  line-height: 1.55;
}

.code-session textarea {
  min-height: 108px;
}

.opc-about-field textarea {
  min-height: 132px;
}

.code-session .profile-detail p {
  margin: 12px 0 0;
  color: #000;
  font-size: 24px;
  line-height: 1.45;
}

.code-session .contact-strip {
  margin-top: 8px;
  border-top: 4px dashed #000;
  padding-top: 20px;
}

.code-session .contact-strip h2 {
  font-size: 16px;
  font-weight: 900;
}

.code-session .contact-strip span {
  border: 4px solid #000;
  background: #fff;
  box-shadow: 7px 7px 0 var(--opc-yellow);
  color: #000;
}

.opc-foot {
  margin-top: 12px;
}

.code-session .primary-action {
  width: min(300px, 88%);
  justify-self: center;
}

@media (max-width: 390px) {
  .opc-card-head {
    grid-template-columns: minmax(0, 1fr) 84px;
    min-height: 86px;
  }

  .opc-title,
  .code-session .profile-copy .opc-title,
  .code-session .work-panel .opc-title {
    font-size: clamp(30px, 8.5vw, 36px);
  }

  .opc-mascot {
    width: 88px;
    height: 78px;
  }

  .opc-keyboard {
    width: 76px;
    top: 320px;
  }
}

/* OPC layout correction: readable title, larger mascot, decorations stay at the bottom. */
.code-session .work-panel,
.code-session .profile-panel,
.code-session.claim-mode .work-panel,
.code-session.profile-mode .profile-panel {
  padding-bottom: 132px;
}

.code-session .profile-panel {
  padding-bottom: 104px;
}

.opc-card-head {
  grid-template-columns: minmax(0, 1fr) 128px;
  min-height: 112px;
  margin-bottom: 12px;
}

.opc-title,
.code-session .profile-copy .opc-title,
.code-session .work-panel .opc-title {
  color: #000;
  font-size: clamp(34px, 9.4vw, 48px);
  text-shadow:
    -2px 0 #000,
    0 -2px #000,
    2px 0 #000,
    0 2px #000,
    4px 4px 0 #9a9a9a;
}

.opc-logo-en {
  color: var(--opc-yellow);
}

.opc-logo-cn,
.code-session .work-panel .opc-logo-cn {
  color: #000;
  text-shadow: 4px 4px 0 #9a9a9a;
}

.opc-mascot {
  width: 132px;
  height: 116px;
  margin-top: -18px;
  margin-right: -18px;
}

.opc-pin {
  width: 38px;
  height: 48px;
  top: auto;
  left: 52%;
  bottom: 74px;
  transform: translateX(-50%) rotate(7deg);
}

.opc-pencil {
  width: 42px;
  height: 42px;
  top: auto;
  left: 22px;
  bottom: 52px;
  transform: rotate(-24deg);
}

.opc-keyboard {
  width: 92px;
  top: auto;
  right: 18px;
  bottom: 50px;
  transform: rotate(-14deg);
}

.opc-heart {
  width: 54px;
  right: 42px;
  bottom: 96px;
}

.opc-rainbow {
  width: 74px;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%) rotate(-4deg);
}

.code-session .profile-panel .opc-keyboard {
  bottom: 168px;
  left: 18px;
  right: auto;
}

.code-session .profile-panel .opc-heart {
  bottom: 92px;
  right: 34px;
}

.code-session .profile-panel .opc-pencil {
  bottom: 104px;
  left: 24px;
}

.code-session .profile-panel .opc-rainbow {
  bottom: 70px;
}

.code-session .profile-panel .opc-pin {
  bottom: 34px;
}

@media (max-width: 390px) {
  .opc-card-head {
    grid-template-columns: minmax(0, 1fr) 104px;
    min-height: 98px;
  }

  .opc-title,
  .code-session .profile-copy .opc-title,
  .code-session .work-panel .opc-title {
    font-size: clamp(29px, 8vw, 36px);
  }

  .opc-mascot {
    width: 110px;
    height: 96px;
    margin-top: -15px;
    margin-right: -16px;
  }
}

/* Pixel-perfect OPC SPA rebuild */
.opc-session {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(45deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px) 0 0 / 16px 16px,
    #f2eed8;
  color: #0a0a0a;
}

.opc-session::before,
.opc-session::after,
.opc-session .ambient-layer,
.opc-session .topbar {
  display: none;
}

.opc-session .shell {
  width: min(430px, calc(100% - 18px));
  min-height: 100dvh;
  padding: 10px 0 22px;
  place-items: center;
}

.opc-card {
  position: relative;
  display: block;
  width: min(414px, 100%);
  aspect-ratio: 148 / 210;
  overflow: hidden;
  border: 5px solid #000;
  padding: 58px 24px 22px;
  background:
    radial-gradient(circle, rgba(255, 156, 0, 0.44) 0 4px, transparent 5px) 19px 22px / 76px 76px,
    radial-gradient(circle, rgba(196, 167, 0, 0.34) 0 4px, transparent 5px) 58px 64px / 92px 92px,
    #ffd908;
  box-shadow: none;
  font-family: "Pixelify Sans", "Press Start 2P", "Arial Black", "Microsoft YaHei", sans-serif;
}

.opc-card--match {
  background:
    radial-gradient(circle, rgba(197, 197, 197, 0.56) 0 4px, transparent 5px) 18px 22px / 76px 76px,
    radial-gradient(circle, rgba(112, 232, 235, 0.52) 0 5px, transparent 6px) 54px 62px / 94px 94px,
    #fff8cf;
}

.opc-card > * {
  position: relative;
  z-index: 1;
}

.opc-head {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 6px;
  align-items: start;
  margin-bottom: 18px;
}

.opc-state {
  margin: 0 0 8px;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.opc-logo {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  white-space: nowrap;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(38px, 10.2vw, 49px);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow:
    -2px 0 #fff,
    0 -2px #fff,
    2px 0 #fff,
    0 2px #fff,
    5px 5px 0 rgba(0, 0, 0, 0.38);
}

.opc-logo span {
  color: #ffe119;
  text-shadow:
    -2px 0 #000,
    0 -2px #000,
    2px 0 #000,
    0 2px #000,
    5px 5px 0 rgba(0, 0, 0, 0.38);
}

.opc-monster {
  width: 112px;
  height: 92px;
  object-fit: contain;
  justify-self: end;
  margin-top: -16px;
  margin-right: -10px;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.25));
}

.opc-form,
.opc-display {
  display: grid;
  gap: 13px;
}

.opc-box {
  position: relative;
  display: block;
  border: 4px solid #70e2e6;
  border-radius: 9px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.opc-box--name {
  height: 48px;
}

.opc-box--about {
  height: 139px;
  border-color: #ff79a8;
}

.opc-box--vibe {
  height: 106px;
}

.opc-box span,
.opc-box h2,
.opc-contact-input span,
.opc-contact-card h2 {
  display: block;
  margin: 0 0 4px;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.opc-box input,
.opc-box textarea,
.opc-contact-input input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #000;
  box-shadow: none;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
}

.opc-box textarea {
  height: calc(100% - 22px);
  resize: none;
}

.opc-box input::placeholder,
.opc-box textarea::placeholder,
.opc-contact-input input::placeholder {
  color: rgba(0, 0, 0, 0.38);
  opacity: 1;
}

.opc-display .opc-box {
  height: auto;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 7px 7px 0 #000;
}

.opc-display .opc-box h2 {
  display: inline-block;
  border: 4px solid #000;
  padding: 7px 10px;
  background: #33b4ec;
  box-shadow: 4px 4px 0 #000;
}

.opc-display .opc-box p {
  margin: 10px 0 0;
  max-width: none;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.45;
}

.opc-contact-input {
  display: block;
  margin-top: 2px;
  padding-left: 64px;
  padding-right: 78px;
}

.opc-contact-input input {
  border-bottom: 3px solid rgba(0, 0, 0, 0.35);
  font-size: 16px;
}

.opc-bottom {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 44px;
  display: grid;
  grid-template-columns: 48px 1fr 70px;
  align-items: center;
  min-height: 92px;
}

.opc-bottom-copy {
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.25;
}

.opc-bottom-copy span {
  display: block;
  font-size: 13px;
}

.opc-qr-hole {
  justify-self: end;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
}

.opc-card--match .opc-qr-hole {
  border-color: rgba(0, 0, 0, 0.38);
}

.opc-ccc {
  position: absolute;
  left: 34px;
  bottom: 18px;
  display: flex;
  gap: 7px;
}

.opc-ccc i {
  width: 15px;
  height: 15px;
  background: #ffd908;
  clip-path: polygon(0 0, 100% 0, 100% 38%, 58% 50%, 100% 62%, 100% 100%, 0 100%);
  filter: drop-shadow(1px 1px 0 #000);
}

.opc-submit {
  justify-self: center;
  width: min(292px, 88%);
  min-height: 52px;
  border: 5px solid #000;
  border-radius: 0;
  margin-top: 2px;
  background: #ff7daf;
  color: #000;
  box-shadow: 6px 6px 0 #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 900;
}

.opc-contact-card {
  border-top: 4px dashed #000;
  margin-top: 4px;
  padding-top: 14px;
}

.opc-contact-card span {
  display: block;
  border: 4px solid #000;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #000;
  box-shadow: 7px 7px 0 #ffd908;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
}

.opc-contact-card button {
  width: 100%;
  min-height: 52px;
  border: 5px solid #000;
  border-radius: 0;
  margin-top: 14px;
  background: #ff7daf;
  color: #000;
  box-shadow: 6px 6px 0 #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 900;
}

.copy-fallback {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.copy-fallback.is-active {
  position: static;
  width: 100%;
  height: 72px;
  opacity: 1;
  border: 4px solid #000;
  background: #fff;
  color: #000;
}

.opc-card .status-line {
  min-height: 20px;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.opc-card .status-line.error {
  color: #b00020;
}

.opc-card .status-line.ok {
  color: #007a3d;
}

.px-pin,
.px-pencil,
.px-keyboard,
.px-heart,
.px-phone,
.px-rainbow {
  position: absolute;
  display: block;
  pointer-events: none;
}

.px-pin {
  width: 18px;
  height: 24px;
  background: #ffad00;
  border: 3px solid #000;
  border-radius: 50% 50% 20% 20%;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.22);
}

.px-pin::after {
  position: absolute;
  left: 6px;
  top: 20px;
  width: 4px;
  height: 26px;
  background: #000;
  transform: rotate(14deg);
  content: "";
}

.opc-pin-top {
  left: 50%;
  top: -12px;
  transform: translateX(-50%) rotate(8deg);
  z-index: 3;
}

.px-pencil {
  width: 34px;
  height: 14px;
  background: #ff4f9a;
  border: 3px solid #000;
  transform: rotate(48deg);
}

.px-pencil::after {
  position: absolute;
  right: -14px;
  top: -3px;
  border-left: 14px solid #ffd24a;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  content: "";
}

.opc-pencil {
  left: 32px;
  top: 96px;
}

.px-keyboard {
  width: 74px;
  height: 40px;
  border: 3px solid #000;
  background:
    repeating-linear-gradient(90deg, #73d8ee 0 5px, transparent 5px 9px),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(0, 0, 0, 0.12) 7px 8px),
    #f1feff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.22);
  transform: rotate(-17deg);
}

.opc-keyboard {
  right: -22px;
  bottom: -20px;
}

.px-heart {
  width: 46px;
  height: 42px;
  background: #39bdec;
  clip-path: polygon(50% 100%, 0 45%, 0 18%, 18% 0, 38% 0, 50% 16%, 62% 0, 82% 0, 100% 18%, 100% 45%);
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.22));
}

.opc-heart {
  right: 34px;
  bottom: 16px;
}

.px-phone {
  position: static;
  width: 38px;
  height: 50px;
  border: 4px solid #ff629d;
  border-radius: 8px;
}

.px-phone::before {
  position: absolute;
  width: 20px;
  height: 16px;
  border: 4px solid #ff629d;
  border-left: 0;
  left: 16px;
  top: 17px;
  content: "";
}

.px-rainbow {
  position: static;
  width: 64px;
  height: 42px;
  align-self: start;
  background:
    radial-gradient(ellipse at 50% 100%, transparent 0 31%, #fff 32% 45%, transparent 46%),
    radial-gradient(ellipse at 50% 100%, transparent 0 42%, #30c8ff 43% 53%, transparent 54%),
    radial-gradient(ellipse at 50% 100%, transparent 0 52%, #ffd908 53% 63%, transparent 64%),
    radial-gradient(ellipse at 50% 100%, transparent 0 62%, #ff5aa0 63% 73%, transparent 74%);
  filter: drop-shadow(2px 2px 0 #000);
}

@media (max-width: 390px) {
  .opc-card {
    padding: 52px 20px 20px;
  }

  .opc-head {
    grid-template-columns: 1fr 82px;
  }

  .opc-logo {
    font-size: clamp(32px, 9vw, 38px);
  }

  .opc-monster {
    width: 92px;
    height: 78px;
  }

  .opc-box--about {
    height: 128px;
  }

  .opc-box--vibe {
    height: 96px;
  }
}

/* Final H5 OPC identity-card spec override. Keep this block last. */
.hidden {
  display: none !important;
}

body.opc-session {
  min-height: 100dvh;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(45deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px) 0 0 / 20px 20px,
    #fff6b7;
}

body.opc-session .topbar {
  display: none;
}

body.opc-session .shell {
  width: min(448px, calc(100% - 16px));
  min-height: 100dvh;
  padding: 12px 0 24px;
  place-items: start center;
}

body.opc-session .ambient-layer {
  opacity: 0.08;
}

body.opc-session .opc-card {
  position: relative;
  width: min(430px, 100%);
  min-height: max(720px, calc(100dvh - 24px));
  aspect-ratio: auto;
  overflow: hidden;
  border: 5px solid #000;
  border-radius: 0;
  padding: 42px 20px 22px;
  color: #000;
  background:
    radial-gradient(circle, rgba(255, 153, 0, 0.58) 0 4px, transparent 5px) 20px 24px / 76px 76px,
    radial-gradient(circle, rgba(194, 164, 0, 0.4) 0 4px, transparent 5px) 58px 68px / 91px 91px,
    #ffd908;
  box-shadow: none;
  font-family: "Pixelify Sans", "Press Start 2P", "Arial Black", "Microsoft YaHei", sans-serif;
}

body.opc-match .opc-card--match {
  background:
    radial-gradient(circle, rgba(190, 190, 190, 0.58) 0 4px, transparent 5px) 18px 22px / 76px 76px,
    radial-gradient(circle, rgba(115, 233, 236, 0.5) 0 5px, transparent 6px) 54px 62px / 94px 94px,
    #fff8cf;
}

body.opc-session .opc-card > * {
  position: relative;
  z-index: 1;
}

body.opc-session .opc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 4px;
  align-items: start;
  min-height: 96px;
  margin-bottom: 8px;
}

body.opc-session .opc-state {
  margin: 0 0 8px;
  color: #000;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

body.opc-session .opc-logo {
  display: flex;
  align-items: baseline;
  gap: 3px;
  max-width: 100%;
  margin: 0;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(36px, 9.2vw, 48px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow:
    -2px 0 #fff,
    0 -2px #fff,
    2px 0 #fff,
    0 2px #fff,
    5px 5px 0 rgba(0, 0, 0, 0.42);
  white-space: nowrap;
}

body.opc-session .opc-logo span {
  color: #ffe119;
  text-shadow:
    -2px 0 #000,
    0 -2px #000,
    2px 0 #000,
    0 2px #000,
    5px 5px 0 rgba(0, 0, 0, 0.42);
}

body.opc-session .opc-monster {
  width: 124px;
  height: 104px;
  object-fit: contain;
  justify-self: end;
  margin-top: -16px;
  margin-right: -12px;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.28));
}

body.opc-session .opc-form,
body.opc-session .opc-display {
  display: grid;
  gap: 12px;
}

body.opc-session .opc-box,
body.opc-session .opc-contact-input {
  position: relative;
  display: block;
  border: 4px solid #70e2e6;
  border-radius: 9px;
  padding: 11px 12px;
  background: rgba(255, 255, 245, 0.82);
  box-shadow: 7px 7px 0 #000, inset 0 0 0 2px rgba(255, 255, 255, 0.48);
}

body.opc-session .opc-box--name {
  height: 74px;
}

body.opc-session .opc-box--about {
  height: 158px;
  border-color: #ff79a8;
}

body.opc-session .opc-box--vibe {
  height: 128px;
}

body.opc-session .opc-contact-input {
  min-height: 76px;
  border-color: #ff9d25;
  padding-left: 12px;
  padding-right: 12px;
  margin-bottom: 8px;
}

body.opc-session .opc-box span,
body.opc-session .opc-box h2,
body.opc-session .opc-contact-input span,
body.opc-session .opc-contact-card h2 {
  display: block;
  margin: 0 0 5px;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

body.opc-session .opc-display .opc-box h2 {
  display: inline-block;
  border: 4px solid #000;
  padding: 7px 10px;
  background: #33b4ec;
  box-shadow: 4px 4px 0 #000;
}

body.opc-session .opc-box input,
body.opc-session .opc-box textarea,
body.opc-session .opc-contact-input input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #000;
  box-shadow: none;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.45;
}

body.opc-session .opc-box textarea {
  height: calc(100% - 24px);
  resize: none;
}

body.opc-session .opc-box input::placeholder,
body.opc-session .opc-box textarea::placeholder,
body.opc-session .opc-contact-input input::placeholder {
  color: rgba(0, 0, 0, 0.42);
  opacity: 1;
}

body.opc-session .opc-display .opc-box {
  height: auto;
  min-height: 80px;
}

body.opc-session .opc-display .opc-box p {
  margin: 10px 0 0;
  max-width: none;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.45;
}

body.opc-session .opc-bottom,
body.opc-session .opc-bottom--display {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: 48px 1fr 66px 76px;
  gap: 8px;
  align-items: center;
  min-height: 86px;
  margin-top: 8px;
}

body.opc-session .opc-bottom-copy {
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

body.opc-session .opc-bottom-copy span {
  display: block;
  color: #000;
  font-size: 12px;
}

body.opc-session .opc-qr-hole {
  justify-self: end;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
}

body.opc-match .opc-qr-hole {
  border-color: rgba(0, 0, 0, 0.38);
}

body.opc-session .opc-ccc {
  position: relative;
  left: auto;
  bottom: auto;
  display: flex;
  gap: 7px;
  justify-self: start;
  margin: -4px 0 0 6px;
}

body.opc-session .opc-ccc i {
  width: 15px;
  height: 15px;
  background: #ffd908;
  clip-path: polygon(0 0, 100% 0, 100% 38%, 58% 50%, 100% 62%, 100% 100%, 0 100%);
  filter: drop-shadow(1px 1px 0 #000);
}

body.opc-session .opc-submit,
body.opc-session .opc-contact-card button {
  justify-self: center;
  width: min(320px, 92%);
  min-height: 54px;
  border: 5px solid #000;
  border-radius: 0;
  background: #ff7daf;
  color: #000;
  box-shadow: 6px 6px 0 #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 900;
}

body.opc-session .opc-submit {
  margin-top: 2px;
}

body.opc-session .opc-contact-card {
  border-top: 4px dashed #000;
  margin-top: 8px;
  padding-top: 16px;
}

body.opc-session .opc-contact-card span {
  display: block;
  border: 4px solid #000;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #000;
  box-shadow: 7px 7px 0 #ffd908;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
  word-break: break-all;
}

body.opc-session .opc-card .status-line {
  min-height: 20px;
  margin: 2px 0 0;
  color: #000;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

body.opc-session .opc-card .status-line.error {
  color: #b00020;
}

body.opc-session .opc-card .status-line.ok {
  color: #007a3d;
}

body.opc-session .copy-fallback {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body.opc-session .copy-fallback.is-active {
  position: static;
  width: 100%;
  height: 76px;
  opacity: 1;
  border: 4px solid #000;
  background: #fff;
  color: #000;
}

body.opc-session .opc-pin-top {
  left: 50%;
  top: 8px;
  transform: translateX(-50%) rotate(8deg);
  z-index: 4;
}

body.opc-session .opc-pencil {
  left: 28px;
  top: 118px;
}

body.opc-session .opc-keyboard {
  right: -24px;
  bottom: -18px;
}

body.opc-session .opc-heart {
  right: 30px;
  bottom: 14px;
}

body.opc-session .px-rainbow {
  width: 64px;
  height: 42px;
}

body.opc-session .opc-form .opc-box span,
body.opc-session .opc-form .opc-contact-input span {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #000;
}

@media (max-width: 390px) {
  body.opc-session .shell {
    width: min(100% - 8px, 430px);
    padding-top: 8px;
  }

  body.opc-session .opc-card {
    padding: 58px 16px 20px;
  }

  body.opc-session .opc-head {
    grid-template-columns: minmax(0, 1fr) 100px;
    min-height: 98px;
  }

  body.opc-session .opc-logo {
    font-size: clamp(31px, 8.8vw, 36px);
  }

  body.opc-session .opc-monster {
    width: 108px;
    height: 90px;
    margin-right: -12px;
  }

  body.opc-session .opc-bottom,
  body.opc-session .opc-bottom--display {
    grid-template-columns: 42px 1fr 58px 66px;
  }

  body.opc-session .opc-bottom-copy {
    font-size: 14px;
  }
}

/* Final compact card layout: no bottom decorative footer. */
body.opc-session .shell {
  padding: 8px 0 18px;
}

body.opc-session .opc-card {
  min-height: auto;
  padding: 34px 20px 20px;
}

body.opc-session .opc-head {
  grid-template-columns: minmax(0, 1fr) 118px;
  min-height: 88px;
  margin-bottom: 8px;
}

body.opc-session .opc-state {
  margin-bottom: 6px;
}

body.opc-session .opc-logo {
  font-size: clamp(36px, 9vw, 47px);
}

body.opc-session .opc-monster {
  width: 120px;
  height: 98px;
  margin-top: -14px;
}

body.opc-session .opc-form,
body.opc-session .opc-display {
  gap: 12px;
}

body.opc-session .opc-box--name {
  height: 70px;
}

body.opc-session .opc-box--about {
  height: 148px;
}

body.opc-session .opc-box--vibe {
  height: 118px;
}

body.opc-session .opc-contact-input {
  min-height: 72px;
  margin-bottom: 2px;
}

body.opc-session .opc-submit {
  margin-top: 0;
}

body.opc-session .opc-contact-card {
  margin-top: 2px;
  padding-top: 12px;
}

body.opc-session .opc-contact-card button {
  margin-top: 12px;
}

body.opc-session .opc-bottom,
body.opc-session .opc-bottom--display,
body.opc-session .opc-ccc {
  display: none !important;
}

@media (max-width: 390px) {
  body.opc-session .opc-card {
    padding: 32px 16px 18px;
  }

  body.opc-session .opc-head {
    grid-template-columns: minmax(0, 1fr) 96px;
    min-height: 82px;
    margin-bottom: 8px;
  }

  body.opc-session .opc-logo {
    font-size: clamp(30px, 8.3vw, 35px);
  }

  body.opc-session .opc-monster {
    width: 104px;
    height: 86px;
    margin-top: -12px;
  }

  body.opc-session .opc-box,
  body.opc-session .opc-contact-input {
    padding: 10px 12px;
  }

  body.opc-session .opc-box--about {
    height: 140px;
  }

  body.opc-session .opc-box--vibe {
    height: 112px;
  }
}
