/* 《撕券大师 v3》千禧年架空快餐「乐堡基 · HAPPY BITE」视觉规范 (UIDD v1.0) */
:root {
  --paper-1998: #F2E4C8;
  --paper-2003: #FAF0D7;
  --paper-2008: #FFFDF6;
  --ink-red: #C63329;
  --ink-red-bright: #D92B2B;
  --ink-navy: #1D4B8A;
  --ink-mustard: #E5A527;
  --ink-yellow: #F5B82E;
  --ink-dark: #2B2118;
  --ink-muted: #6F5E4D;
  --safe: #16A34A;
  --danger: #DC2626;
  --shred: #D97706;
  --wood-light: #D9A46F;
  --wood-dark: #B57B45;
  --tray-red: #B9271E;
  --tray-trim: #F5B82E;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--ink-dark);
  /* 宽屏桌布纹理：复古红白格子快餐桌布 (UIDD §7) */
  background-color: #FAF3E6;
  background-image:
    linear-gradient(90deg, rgba(198, 51, 41, 0.14) 50%, transparent 50%),
    linear-gradient(rgba(198, 51, 41, 0.14) 50%, transparent 50%);
  background-size: 38px 38px;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 竖屏 9:16 居中安全画幅（最大宽 440px，手机端铺满） */
#app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 880px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #E2B483 0%, #D49D66 55%, #C68B53 100%);
  box-shadow: 0 22px 60px rgba(43, 33, 24, 0.35), 0 0 0 1px rgba(43, 33, 24, 0.18);
}

@media (min-width: 500px) and (min-height: 700px) {
  #app-shell {
    height: 94vh;
    border-radius: 26px;
    border: 6px solid #2B2118;
  }
}

/* 复古木纹餐桌细纹叠加 */
#app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0px,
    rgba(255, 255, 255, 0.04) 2px,
    rgba(90, 48, 18, 0.04) 2px,
    rgba(90, 48, 18, 0.04) 7px
  );
  z-index: 0;
}

/* ① 顶栏区 */
.top-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px;
  background: linear-gradient(180deg, #B9271E 0%, #9E1F17 100%);
  color: #FFFDF6;
  border-bottom: 3px solid var(--ink-yellow);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  gap: 6px;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.brand-badge {
  background: var(--ink-yellow);
  color: #8F1B14;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
  white-space: nowrap;
}

.savings-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 240, 180, 0.4);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}

.savings-pill .yen {
  color: #FDE047;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-btn {
  position: relative;
  appearance: none;
  border: 1.5px solid rgba(255, 240, 200, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFDF6;
  border-radius: 10px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn .red-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ADE80;
  border: 1.5px solid #9E1F17;
  box-shadow: 0 0 6px #4ADE80;
}

/* 关卡快捷导航带 */
.level-strip {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(43, 33, 24, 0.14);
  border-bottom: 1px solid rgba(43, 33, 24, 0.12);
  overflow-x: auto;
  scrollbar-width: none;
}
.level-strip::-webkit-scrollbar { display: none; }

.lv-chip {
  flex: 0 0 auto;
  border: 1.5px solid rgba(43, 33, 24, 0.25);
  background: #FAF0D7;
  color: #4A3728;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lv-chip.active {
  background: #C63329;
  color: #FFFDF6;
  border-color: #7F1D1D;
  box-shadow: 0 2px 5px rgba(198, 51, 41, 0.35);
}

.lv-chip.cleared::after {
  content: " ✓";
  color: #16A34A;
}

.lv-chip.active.cleared::after {
  color: #FDE047;
}

.lv-chip.daily {
  background: linear-gradient(135deg, #FEF08A, #F59E0B);
  color: #78350F;
  border-color: #B45309;
}

.lv-chip.daily.active {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #FFFDF6;
}

/* ② 订单夹与餐盘暂存区 */
.order-tray-zone {
  position: relative;
  z-index: 4;
  padding: 6px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-rail {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #4B5563 0%, #374151 100%);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.2), 0 3px 6px rgba(0,0,0,0.18);
  border: 1.5px solid #1F2937;
  min-height: 50px;
}

.order-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #F9FAFB;
  min-width: 68px;
}

.order-meta .batch-tag {
  font-size: 10px;
  font-weight: 800;
  color: #FDE047;
  letter-spacing: 0.4px;
}

.order-meta .era-tag {
  font-size: 10px;
  color: #D1D5DB;
}

.order-tickets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.order-ticket {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFDF6;
  color: #2B2118;
  border: 1.5px dashed #C63329;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
  position: relative;
  transition: transform 0.18s ease;
}

.order-ticket::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 6px;
  border-radius: 2px;
  background: #9CA3AF;
  border: 1px solid #4B5563;
}

.order-ticket.pop {
  animation: ticketPop 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ticketPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.18); background: #DCFCE7; }
  100% { transform: scale(1); }
}

/* 复古快餐塑料餐盘（暂存位） */
.tray-panel {
  background: linear-gradient(180deg, #C63329 0%, #A7241B 100%);
  border: 2.5px solid #8F1B14;
  border-radius: 12px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.22), 0 2px 5px rgba(0,0,0,0.16);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tray-panel.danger-pulse {
  border-color: #FDE047;
  animation: trayPulse 0.9s infinite ease-in-out;
}

@keyframes trayPulse {
  0%, 100% { box-shadow: inset 0 2px 5px rgba(0,0,0,0.22), 0 0 0 0 rgba(253, 224, 71, 0.75); }
  50% { box-shadow: inset 0 2px 5px rgba(0,0,0,0.22), 0 0 0 6px rgba(253, 224, 71, 0); }
}

.tray-label {
  color: #FEF3C7;
  font-size: 11px;
  font-weight: 800;
  writing-mode: horizontal-tb;
  line-height: 1.15;
  text-align: center;
  min-width: 42px;
}

.tray-slots {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-slot {
  flex: 1;
  height: 36px;
  border-radius: 7px;
  border: 1.5px dashed rgba(255, 240, 200, 0.45);
  background: rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 240, 200, 0.5);
  overflow: hidden;
  transition: all 0.2s ease;
}

.tray-slot.filled {
  background: #FAF0D7;
  border: 1.5px solid #78350F;
  color: #2B2118;
  box-shadow: 0 2px 4px rgba(0,0,0,0.22);
  transform: rotate(-1.2deg);
}

.tray-slot.filled:nth-child(even) {
  transform: rotate(1.3deg);
}

.tray-slot.napkin-slot {
  background: rgba(255, 255, 255, 0.22);
  border-color: #FFFDF6;
}

.tray-slot.napkin-slot.filled {
  background: #FFFDF6;
}

/* 关卡提示条 */
.hint-banner {
  position: relative;
  z-index: 4;
  margin: 0 10px;
  padding: 5px 10px;
  background: rgba(255, 253, 246, 0.88);
  border: 1px solid rgba(139, 90, 43, 0.3);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #573B21;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hint-banner.aim-mode {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1E40AF;
}

.hint-banner .pity-badge {
  background: #DCFCE7;
  color: #166534;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ③ 核心撕纸桌台与画布 */
.stage-wrap {
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#game-canvas:active {
  cursor: grabbing;
}

/* 浮动提示 Toast */
.stage-toast {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(43, 33, 24, 0.92);
  color: #FFFDF6;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  z-index: 12;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stage-toast.danger {
  background: #B91C1C;
  border: 1.5px solid #FCA5A5;
}

.stage-toast.success {
  background: #15803D;
  border: 1.5px solid #86EFAC;
}

.stage-toast.shred {
  background: #B45309;
  border: 1.5px solid #FDE047;
}

/* ④ 底部道具托盘区 */
.props-dock {
  position: relative;
  z-index: 5;
  padding: 8px 10px 10px;
  background: linear-gradient(180deg, rgba(43, 33, 24, 0.12) 0%, rgba(43, 33, 24, 0.24) 100%);
  border-top: 1px solid rgba(43, 33, 24, 0.14);
  display: flex;
  align-items: center;
  gap: 7px;
}

.prop-btn {
  flex: 1;
  position: relative;
  appearance: none;
  border: 2px solid #78350F;
  background: linear-gradient(180deg, #FFFDF6 0%, #F2E4C8 100%);
  border-radius: 12px;
  padding: 7px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: #2B2118;
  box-shadow: 0 3px 0 #78350F;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.18s ease;
}

.prop-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #78350F;
}

.prop-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.prop-btn.active-tool {
  background: linear-gradient(180deg, #DBEAFE 0%, #93C5FD 100%);
  border-color: #1D4ED8;
  box-shadow: 0 3px 0 #1D4ED8;
}

.prop-btn .prop-ico {
  font-size: 18px;
  line-height: 1;
}

.prop-btn .prop-name {
  font-size: 11px;
  font-weight: 800;
}

.prop-btn .prop-tag {
  font-size: 9.5px;
  color: #9A3412;
  font-weight: 700;
}

.prop-btn.restart-btn {
  flex: 0 0 64px;
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
}

/* 通用弹窗 / 抽屉遮罩 */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 14, 0.64);
  backdrop-filter: blur(3px);
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer-card {
  width: 100%;
  max-height: 88%;
  background: #FAF0D7;
  border: 3px solid #2B2118;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { transform: translateY(28px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #C63329;
  color: #FFFDF6;
  border-bottom: 3px solid var(--ink-yellow);
}

.drawer-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.close-btn {
  appearance: none;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #FFFDF6;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.drawer-body {
  padding: 12px 14px 16px;
  overflow-y: auto;
  flex: 1;
}

/* 复古热敏纸「今日省钱小票」(UIDD §6.1) */
.receipt-wrapper {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.printer-slot {
  width: 96%;
  height: 14px;
  background: #1F2937;
  border-radius: 7px;
  box-shadow: inset 0 4px 6px rgba(0,0,0,0.7), 0 2px 0 rgba(255,255,255,0.12);
  margin-bottom: -6px;
  z-index: 2;
}

.thermal-receipt {
  width: 88%;
  background: #FCFBF7;
  color: #1F1B18;
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  padding: 18px 16px 18px;
  position: relative;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
  animation: receiptPrint 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 97%,
    96% 100%, 92% 97%, 88% 100%, 84% 97%, 80% 100%, 76% 97%, 72% 100%, 68% 97%, 64% 100%, 60% 97%,
    56% 100%, 52% 97%, 48% 100%, 44% 97%, 40% 100%, 36% 97%, 32% 100%, 28% 97%, 24% 100%, 20% 97%,
    16% 100%, 12% 97%, 8% 100%, 4% 97%, 0% 100%
  );
}

@keyframes receiptPrint {
  from { transform: translateY(-90px); opacity: 0.2; }
  to { transform: translateY(0); opacity: 1; }
}

.receipt-head {
  text-align: center;
  border-bottom: 1.5px dashed #9CA3AF;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.receipt-store {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
}

.receipt-sub {
  font-size: 10.5px;
  color: #6B7280;
  margin-top: 2px;
}

.receipt-list {
  font-size: 11.5px;
  line-height: 1.65;
  border-bottom: 1.5px dashed #9CA3AF;
  padding-bottom: 8px;
  margin-bottom: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.receipt-total-box {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0;
}

.receipt-total-label {
  font-size: 12px;
  font-weight: 800;
}

.receipt-total-val {
  font-size: 22px;
  font-weight: 900;
  color: #B91C1C;
}

.receipt-stamp {
  position: absolute;
  right: 4px;
  top: -16px;
  border: 2.5px solid #DC2626;
  color: #DC2626;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  transform: rotate(-11deg);
  background: rgba(252, 251, 247, 0.85);
  letter-spacing: 0.5px;
}

.receipt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  font-size: 10.5px;
  color: #4B5563;
}

.mini-qr {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background-color: #111827;
  background-image:
    linear-gradient(90deg, #FCFBF7 25%, transparent 25%, transparent 50%, #FCFBF7 50%, #FCFBF7 75%, transparent 75%),
    linear-gradient(#FCFBF7 25%, transparent 25%, transparent 50%, #FCFBF7 50%, #FCFBF7 75%, transparent 75%);
  background-size: 11px 11px;
  border: 3px solid #111827;
  border-radius: 3px;
}

.receipt-actions {
  width: 88%;
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-primary, .btn-secondary {
  flex: 1;
  appearance: none;
  border: 2px solid #2B2118;
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #2B2118;
}

.btn-primary {
  background: #F5B82E;
  color: #2B2118;
}

.btn-secondary {
  background: #C63329;
  color: #FFFDF6;
}

.btn-primary:active, .btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #2B2118;
}

/* 失败救援弹窗 */
.fail-card {
  width: 100%;
  max-width: 330px;
  background: #FAF0D7;
  border: 3px solid #2B2118;
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0,0,0,0.42);
}

.fail-card h3 {
  margin: 4px 0 6px;
  font-size: 18px;
  color: #B91C1C;
}

.fail-card p {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: #573B21;
  line-height: 1.5;
}

.fail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 怀旧玩具陈列柜 (Matte Soft-3D Clay 展示架, UIDD §6.2) */
.wallet-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFDF6;
  border: 2px solid #D97706;
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 800;
}

.wallet-banner .big-money {
  font-size: 17px;
  color: #C63329;
  font-variant-numeric: tabular-nums;
}

.toy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.toy-card {
  position: relative;
  background: linear-gradient(180deg, #FFFDF6 0%, #F3E6CC 100%);
  border: 2px solid #C8A97E;
  border-radius: 14px;
  padding: 10px 8px 10px;
  text-align: center;
  box-shadow: inset 0 -5px 0 rgba(180, 130, 70, 0.25), 0 4px 8px rgba(43,33,24,0.1);
  cursor: pointer;
  transition: transform 0.16s ease;
}

.toy-card:active {
  transform: scale(0.95);
}

.toy-clay-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  /* Soft-3D Matte Clay 高光与底影 */
  box-shadow:
    inset 4px 6px 10px rgba(255, 255, 255, 0.55),
    inset -4px -6px 10px rgba(0, 0, 0, 0.2),
    0 8px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toy-card.locked .toy-clay-orb {
  filter: grayscale(0.95) opacity(0.45);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
}

.toy-card.unlocked:hover .toy-clay-orb {
  transform: translateY(-3px) rotate(-4deg);
}

.toy-name {
  font-size: 12.5px;
  font-weight: 900;
  color: #2B2118;
}

.toy-era {
  font-size: 10px;
  color: #78716C;
  margin-bottom: 5px;
}

.toy-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.toy-tag.price {
  background: #FDE68A;
  color: #78350F;
  border: 1px solid #D97706;
}

.toy-tag.affordable {
  background: #16A34A;
  color: #FFFDF6;
  border: 1px solid #14532D;
  animation: pulseSoft 1.2s infinite;
}

.toy-tag.owned {
  background: #DBEAFE;
  color: #1D4ED8;
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.toy-story-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: #FFFDF6;
  border-left: 4px solid #C63329;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #4A3728;
}

/* 图鉴卡片 */
.codex-era-title {
  font-size: 12px;
  font-weight: 900;
  color: #9A3412;
  margin: 10px 0 6px;
  padding-bottom: 3px;
  border-bottom: 1.5px dashed #C8A97E;
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.codex-item {
  background: #FFFDF6;
  border: 1.5px dashed #B57B45;
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}

.codex-item.locked {
  opacity: 0.48;
  filter: grayscale(1);
}

.codex-item .c-ico { font-size: 22px; }
.codex-item .c-name { font-size: 11px; font-weight: 800; margin-top: 2px; }
.codex-item .c-save { font-size: 10px; color: #C63329; font-weight: 800; }

/* 每日早报 & 省级灯箱总榜 (UIDD §6.3) */
.newspaper-card {
  background: #F4E9D2;
  border: 2.5px solid #2B2118;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 4px 4px 0 rgba(43, 33, 24, 0.2);
}

.newspaper-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2B2118;
  padding-bottom: 5px;
  margin-bottom: 8px;
}

.newspaper-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
}

.newspaper-stamp {
  font-size: 10px;
  font-weight: 900;
  color: #C63329;
  border: 1.5px solid #C63329;
  padding: 1px 6px;
  border-radius: 4px;
}

.lightbox-board {
  background: #231A14;
  color: #FFFDF6;
  border: 3px solid #F5B82E;
  border-radius: 14px;
  padding: 12px;
}

.lightbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.lightbox-head h4 {
  margin: 0;
  font-size: 14px;
  color: #FDE047;
}

.prov-select {
  background: #3B2D23;
  color: #FFFDF6;
  border: 1px solid #F5B82E;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
}

.prov-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.prov-row.mine {
  background: rgba(245, 184, 46, 0.22);
  border: 1px solid #F5B82E;
}

.prov-rank {
  width: 22px;
  font-weight: 900;
  color: #FDE047;
  text-align: center;
}

.prov-bar-wrap {
  flex: 1;
}

.prov-bar-top {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  margin-bottom: 3px;
}

.prov-bar-bg {
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
}

.prov-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #EF4444);
  border-radius: 99px;
}
