/* ============================================================
   redeem.html · Cartoon / Neobrutalism 卡通风格
   双主题：theme-warm（暖：奶白+黄）/ theme-ocean（冷：冰蓝+天空蓝）
   特征：粗黑描边 + 偏移实色阴影 + 漂浮几何贴纸 + 超粗大字
   ============================================================ */

/* ----- 结构 token（不随主题变） ----- */
:root {
  --c-ink:        #1a1a1a;
  --c-ink-soft:   #4a4a4a;
  --c-ink-muted:  #7a7a7a;

  --c-border:       2.5px solid var(--c-ink);
  --c-border-thick: 3px solid var(--c-ink);
  --c-shadow-sm:  3px 3px 0 var(--c-ink);
  --c-shadow-md:  5px 5px 0 var(--c-ink);
  --c-shadow-lg:  7px 7px 0 var(--c-ink);
  --c-shadow-xl:  9px 9px 0 var(--c-ink);

  --c-r-sm:       8px;
  --c-r-md:       14px;
  --c-r-lg:       20px;
  --c-r-pill:     999px;

  --c-tx:         200ms cubic-bezier(.4, 0, .2, 1);
  --c-bounce:     220ms cubic-bezier(.34, 1.56, .64, 1);
}

/* ----- 暖调（默认 + theme-warm）：奶白纸张 + 黄/珊瑚/薄荷/天空/粉/紫 ----- */
body.redeem-page,
body.redeem-page.theme-warm {
  --c-paper:        #fdf8e8;
  --c-paper-2:      #faf0d4;
  --c-cream:        #fff7d6;
  --c-surface:      #ffffff;
  --c-surface-soft: #fffce0;

  --c-primary:      #ffd43b;  /* 主色 黄 */
  --c-primary-2:    #f7b801;
  --c-secondary:    #ff6b6b;  /* 珊瑚 */
  --c-success:      #95f1d5;  /* 薄荷 */
  --c-info:         #6dd3ff;  /* 天空蓝 */
  --c-pink:         #ffa6c9;
  --c-accent:       #c8a2ff;  /* 紫 */

  --c-info-box-bg:    #d8efff;
  --c-warning-box-bg: #fff0c2;

  /* 6 张贴纸的填充色 */
  --sk-1: #ffd43b;  /* 笑脸 - 黄 */
  --sk-2: #95f1d5;  /* 三角 - 薄荷 */
  --sk-3: #ff6b6b;  /* 方块 - 珊瑚 */
  --sk-4: #6dd3ff;  /* 十角星 - 天空蓝 */
  --sk-5: #ffa6c9;  /* 爱心 - 粉 */
  --sk-6: #c8a2ff;  /* 六边形 - 紫 */
}

/* ----- 冷调（theme-ocean）：淡冰蓝纸张 + 天空蓝/玫红/青绿/薰衣草/粉/紫蓝 ----- */
body.redeem-page.theme-ocean {
  --c-paper:        #eaf2fc;
  --c-paper-2:      #d8e6f5;
  --c-cream:        #dceaff;       /* 替代奶油色（冷感）*/
  --c-surface:      #ffffff;
  --c-surface-soft: #eaf2ff;

  --c-primary:      #5eb8ff;  /* 主色 天空蓝 */
  --c-primary-2:    #2e96e5;
  --c-secondary:    #ff7a90;  /* 玫红 */
  --c-success:      #7ce0c4;  /* 青绿 */
  --c-info:         #b794f6;  /* 薰衣草 */
  --c-pink:         #ffb1d8;
  --c-accent:       #8b9eff;  /* 紫蓝 / 长春花 */

  --c-info-box-bg:    #c8dfff;
  --c-warning-box-bg: #ffd9e0;

  /* 贴纸：保持位置，配色冷化 */
  --sk-1: #5eb8ff;  /* 笑脸 - 天空蓝 */
  --sk-2: #7ce0c4;  /* 三角 - 青绿 */
  --sk-3: #ff7a90;  /* 方块 - 玫红 */
  --sk-4: #b794f6;  /* 十角星 - 薰衣草 */
  --sk-5: #ffb1d8;  /* 爱心 - 浅玫粉 */
  --sk-6: #8b9eff;  /* 六边形 - 紫蓝 */
}

/* ----- 旧颜色变量名向后兼容（组件内还在用 --c-yellow / --c-coral 等） ----- */
body.redeem-page {
  --c-yellow:   var(--c-primary);
  --c-yellow-2: var(--c-primary-2);
  --c-coral:    var(--c-secondary);
  --c-mint:     var(--c-success);
  --c-sky:      var(--c-info);
  --c-purple:   var(--c-accent);
}

/* ============================================================
   Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body.redeem-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Sora', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(26, 26, 26, 0.085) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--c-paper) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.redeem-page {
  position: relative;
  overflow-x: hidden;
}

/* hide legacy dark scene */
.bg-scene,
.grid-overlay { display: none !important; }

/* ============================================================
   Cartoon Stickers (decorative shapes floating on bg)
   ============================================================ */
.cartoon-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.sticker {
  position: absolute;
  pointer-events: none;
  animation: sticker-float 9s ease-in-out infinite;
}
.sticker svg { display: block; width: 100%; height: 100%; }

/* 主题色驱动贴纸填充 */
.sticker-1 .sk-fill { fill: var(--sk-1); }
.sticker-2 .sk-fill { fill: var(--sk-2); }
.sticker-3 .sk-fill { fill: var(--sk-3); }
.sticker-4 .sk-fill { fill: var(--sk-4); }
.sticker-5 .sk-fill { fill: var(--sk-5); }
.sticker-6 .sk-fill { fill: var(--sk-6); }

.sticker-1 { top: 6%;  left: -34px; width: 130px; height: 130px; animation-delay: 0s;    transform: rotate(-12deg); }
.sticker-2 { top: 10%; right: -24px; width: 110px; height: 110px; animation-delay: -2.4s; transform: rotate(14deg); }
.sticker-3 { top: 38%; left: 4%;     width: 84px;  height: 84px;  animation-delay: -4s;   transform: rotate(8deg); }
.sticker-4 { top: 60%; right: 5%;    width: 92px;  height: 92px;  animation-delay: -1.2s; transform: rotate(-6deg); }
.sticker-5 { top: 82%; left: 10%;    width: 76px;  height: 76px;  animation-delay: -3s;   transform: rotate(20deg); }
.sticker-6 { top: 88%; right: 12%;   width: 100px; height: 100px; animation-delay: -5s;   transform: rotate(-15deg); }

@keyframes sticker-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

@media (max-width: 760px) {
  .sticker-3, .sticker-4, .sticker-5, .sticker-6 { display: none; }
  .sticker-1 { width: 80px; height: 80px; top: 4%; left: -20px; }
  .sticker-2 { width: 80px; height: 80px; top: 6%; right: -20px; }
}

@media (prefers-reduced-motion: reduce) {
  .sticker { animation: none; }
}

/* ============================================================
   Layout
   ============================================================ */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}

@media (max-width: 760px) {
  .page-wrap { padding: 28px 16px 72px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: var(--c-yellow);
  color: var(--c-ink);
  border: 2px dashed var(--c-ink);
  border-radius: var(--c-r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: var(--c-shadow-sm);
  transform: rotate(-1.5deg);
}
.logo-badge::before {
  content: "★";
  color: var(--c-ink);
  font-size: 14px;
  line-height: 1;
}

.hero-header h1 {
  margin: 6px 0 0;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  text-shadow: 3px 3px 0 var(--c-yellow);
}
.hero-header h1 .hero-highlight {
  display: inline-block;
  padding: 4px 18px 6px;
  margin: 0 4px;
  background: var(--c-yellow);
  color: var(--c-ink);
  border: var(--c-border-thick);
  border-radius: var(--c-r-md);
  box-shadow: var(--c-shadow-md);
  text-shadow: none;
  transform: rotate(-1.2deg);
}

.hero-subtitle {
  margin: 4px 0 6px;
  color: var(--c-ink-soft);
  font-size: clamp(15px, 2.4vw, 17px);
  font-weight: 500;
  max-width: 36ch;
}

/* 名额徐章并排一行 */
.spots-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.spots-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--c-success);
  color: var(--c-ink);
  border: var(--c-border);
  border-radius: var(--c-r-pill);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--c-shadow-sm);
  transform: rotate(-1deg);
}
.spots-badge i { color: var(--c-ink); }
.welfare-spots-badge {
  background: var(--c-pink);
  transform: rotate(1.5deg);
}
.spots-badge .seats-count {
  display: inline-block;
  min-width: 22px;
  padding: 0 6px;
  margin: 0 1px;
  background: var(--c-ink);
  color: var(--c-primary);
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 480px) {
  .spots-row { gap: 8px; }
  .spots-badge { font-size: 12px; padding: 7px 12px; }
}

/* ============================================================
   Top tabs (3-column cartoon button group)
   ============================================================ */
.top-nav-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px;
  margin-bottom: 22px;
  background: var(--c-cream);
  border: var(--c-border-thick);
  border-radius: var(--c-r-md);
  box-shadow: var(--c-shadow-md);
}

.tab-indicator { display: none; }

.top-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--c-surface);
  color: var(--c-ink);
  border: var(--c-border);
  border-radius: var(--c-r-sm);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--c-tx), box-shadow var(--c-tx), background var(--c-tx);
  position: relative;
}
.top-tab i { width: 18px; height: 18px; }
.top-tab:hover {
  background: var(--c-cream);
  transform: translate(-1px, -1px);
  box-shadow: var(--c-shadow-sm);
}
.top-tab.active {
  background: var(--c-yellow);
  transform: translate(-2px, -2px);
  box-shadow: var(--c-shadow-md);
  z-index: 1;
}
.top-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--c-sky), var(--c-shadow-sm);
}

@media (max-width: 760px) {
  .top-nav-tabs { gap: 8px; padding: 8px; }
  .top-tab { font-size: 13px; padding: 11px 8px; }
  .top-tab i { width: 16px; height: 16px; }
}

/* ============================================================
   Main shell + tab panel cards
   ============================================================ */
.main-shell {
  position: relative;
  z-index: 2;
}
.container.full-layout { width: 100%; }

.step { display: none; }
.step.active { display: block; }

.tab-panel {
  display: none;
  background: var(--c-surface);
  border: var(--c-border-thick);
  border-radius: var(--c-r-lg);
  box-shadow: var(--c-shadow-lg);
  padding: 32px;
  position: relative;
}
.tab-panel.active {
  display: block;
  animation: panel-pop var(--c-bounce) both;
}
@keyframes panel-pop {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.panel-head {
  margin-bottom: 22px;
}
.panel-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.panel-head p {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 14.5px;
}

.panel-head-with-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.panel-meta-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--c-cream);
  color: var(--c-ink);
  border: var(--c-border);
  border-radius: var(--c-r-pill);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--c-ink);
}
.panel-meta-pill i { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .tab-panel { padding: 22px 18px; border-radius: var(--c-r-md); box-shadow: var(--c-shadow-md); }
  .panel-head-with-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============================================================
   Info / Warning boxes
   ============================================================ */
.info-box,
.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 0 0 22px;
  border: var(--c-border);
  border-radius: var(--c-r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 3px 3px 0 var(--c-ink);
}
.info-box {
  background: var(--c-info-box-bg);
  color: var(--c-ink);
}
.warning-box {
  background: var(--c-warning-box-bg);
  color: var(--c-ink);
}
.info-box .info-icon,
.warning-box .info-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--c-ink);
}
.info-box p,
.warning-box p { margin: 0; }
.info-box strong,
.warning-box strong {
  background: var(--c-yellow);
  padding: 0 4px;
  border-radius: 4px;
  border: 1.5px solid var(--c-ink);
}

/* ============================================================
   Forms
   ============================================================ */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-ink);
}
.required-star {
  color: var(--c-coral);
  margin-left: 2px;
}

.field-wrap {
  position: relative;
}

.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--c-ink-soft);
  pointer-events: none;
  transition: color var(--c-tx);
}

.form-input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  background: var(--c-surface);
  color: var(--c-ink);
  border: var(--c-border);
  border-radius: var(--c-r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--c-shadow-sm);
  transition: transform var(--c-tx), box-shadow var(--c-tx), background var(--c-tx);
  outline: none;
}
.form-input::placeholder {
  color: var(--c-ink-muted);
  font-weight: 500;
}
.form-input:hover {
  background: var(--c-surface-soft);
}
.form-input:focus {
  background: var(--c-surface-soft);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--c-ink);
}
.field-wrap:focus-within .field-icon {
  color: var(--c-ink);
}

.field-hint {
  font-size: 12.5px;
  color: var(--c-ink-soft);
  margin: 4px 2px 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  height: 54px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--c-ink);
  border: var(--c-border-thick);
  border-radius: var(--c-r-md);
  cursor: pointer;
  transition: transform var(--c-tx), box-shadow var(--c-tx), background var(--c-tx), filter var(--c-tx);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.btn i { width: 18px; height: 18px; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(.2);
}

.btn-primary {
  background: var(--c-yellow);
  color: var(--c-ink);
  box-shadow: var(--c-shadow-md);
  width: 100%;
}
.btn-primary:hover:not(:disabled) {
  background: var(--c-yellow-2);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--c-ink);
}
.btn-primary:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--c-ink);
}

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-ink);
  box-shadow: var(--c-shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--c-mint);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--c-ink);
}
.btn-secondary:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--c-ink);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--c-sky), var(--c-shadow-md);
}

.spinning {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Result shell / cards (filled by JS)
   ============================================================ */
.result-shell {
  margin-top: 22px;
  background: var(--c-cream);
  border: var(--c-border-thick);
  border-radius: var(--c-r-lg);
  box-shadow: var(--c-shadow-lg);
  padding: 28px;
  animation: panel-pop var(--c-bounce) both;
}

.result-card { padding: 0; }
.result-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.result-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--c-border-thick);
  border-radius: var(--c-r-md);
  box-shadow: 3px 3px 0 var(--c-ink);
}
.result-icon i { width: 26px; height: 26px; }
.result-icon.success { background: var(--c-mint); }
.result-icon.error   { background: var(--c-coral); color: #fff; }
.result-icon.info    { background: var(--c-sky);   color: #fff; }

.result-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-ink);
}
.result-message {
  margin: 4px 0 0;
  color: var(--c-ink-soft);
  font-size: 14.5px;
}

.result-details {
  margin: 16px 0 0;
  padding: 16px 18px;
  background: var(--c-surface);
  border: var(--c-border);
  border-radius: var(--c-r-md);
  box-shadow: 3px 3px 0 var(--c-ink);
}
.result-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1.5px dashed rgba(26, 26, 26, 0.18);
}
.result-detail-item:last-child { border-bottom: none; }
.result-detail-label {
  color: var(--c-ink-soft);
  font-size: 13.5px;
  font-weight: 600;
}
.result-detail-value {
  color: var(--c-ink);
  font-weight: 700;
  font-size: 14px;
  text-align: right;
  word-break: break-all;
}

.result-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.result-card-actions .btn { flex: 1 1 160px; }

.result-inline-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--c-cream);
  border: var(--c-border);
  border-radius: var(--c-r-sm);
  font-size: 13.5px;
  color: var(--c-ink-soft);
}
.result-inline-note strong { color: var(--c-ink); }

/* Badges (used in records) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid var(--c-ink);
  border-radius: var(--c-r-pill);
  box-shadow: 2px 2px 0 var(--c-ink);
  letter-spacing: 0.02em;
}
.badge-success { background: var(--c-mint); color: var(--c-ink); }
.badge-error   { background: var(--c-coral); color: #fff; }
.badge-warn    { background: var(--c-yellow); color: var(--c-ink); }
.badge-neutral { background: var(--c-surface); color: var(--c-ink); }

/* ============================================================
   Warranty view & records
   ============================================================ */
.warranty-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.warranty-summary {
  padding: 18px 20px;
  background: var(--c-surface);
  border: var(--c-border-thick);
  border-radius: var(--c-r-md);
  box-shadow: var(--c-shadow-md);
}

.summary-card-label {
  font-size: 12px;
  color: var(--c-ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.summary-card-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  margin-top: 4px;
}

.warranty-query-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.warranty-query-field { min-width: 0; }
.warranty-query-btn { width: auto; height: 54px; padding: 0 20px; }
.warranty-query-hint { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .warranty-query-row { grid-template-columns: 1fr; }
  .warranty-query-btn { width: 100%; }
}

.records-section { margin-top: 6px; }
.records-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-ink);
  margin: 4px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.records-section-title::before {
  content: "✱";
  color: var(--c-coral);
  font-size: 18px;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-card {
  padding: 16px 18px;
  background: var(--c-surface);
  border: var(--c-border);
  border-radius: var(--c-r-md);
  box-shadow: 4px 4px 0 var(--c-ink);
  transition: transform var(--c-tx), box-shadow var(--c-tx);
}
.record-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--c-ink);
}

.record-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.record-code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-ink);
  word-break: break-all;
}
.record-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}
.record-meta-item { display: flex; flex-direction: column; gap: 2px; }
.record-meta-label {
  font-size: 11.5px;
  color: var(--c-ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.record-meta-value {
  font-size: 13.5px;
  color: var(--c-ink);
  font-weight: 600;
  word-break: break-all;
}
.record-meta-value.inline { display: inline-flex; gap: 6px; align-items: center; }
.record-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.record-footer-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.record-footer-copy {
  font-size: 12px;
  color: var(--c-ink-soft);
  font-weight: 600;
}

.empty-result {
  padding: 28px 20px;
  text-align: center;
  background: var(--c-surface);
  border: 2.5px dashed var(--c-ink);
  border-radius: var(--c-r-md);
  color: var(--c-ink-soft);
  font-weight: 600;
}

/* Inline code input (used by JS for renewal etc) */
.inline-code-box { margin: 12px 0 0; }
.inline-code-input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  background: var(--c-surface-soft);
  border: var(--c-border);
  border-radius: var(--c-r-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  box-shadow: 3px 3px 0 var(--c-ink);
  outline: none;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--c-ink);
  color: var(--c-cream);
  border: var(--c-border-thick);
  border-color: var(--c-ink);
  border-radius: var(--c-r-md);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--c-shadow-md);
  z-index: 9999;
  opacity: 0;
  transition: transform 280ms cubic-bezier(.34, 1.56, .64, 1), opacity 200ms;
  max-width: calc(100vw - 32px);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.success { background: var(--c-mint); color: var(--c-ink); }
.toast.error   { background: var(--c-coral); color: #fff; }
.toast.warning { background: var(--c-yellow); color: var(--c-ink); }
.toast.info    { background: var(--c-sky); color: #fff; }

/* ============================================================
   Modals (announcement / renewal reminder)
   ============================================================ */
.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.announcement-modal[aria-hidden="false"] { display: flex; }

.announcement-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
}

.announcement-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fffdf2;
  border: var(--c-border-thick);
  border-radius: var(--c-r-lg);
  box-shadow: var(--c-shadow-xl);
  overflow: hidden;
  animation: panel-pop var(--c-bounce) both;
}

.announcement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--c-yellow);
  border-bottom: var(--c-border-thick);
}
.announcement-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.announcement-header h2::before {
  content: "📢";
  font-size: 18px;
}
.announcement-close {
  background: var(--c-surface);
  border: var(--c-border);
  border-radius: var(--c-r-sm);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--c-tx), box-shadow var(--c-tx);
  box-shadow: 2px 2px 0 var(--c-ink);
  color: var(--c-ink);
}
.announcement-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--c-ink);
  background: var(--c-coral);
  color: #fff;
}
.announcement-close:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 var(--c-ink);
}

.announcement-body {
  padding: 20px 22px;
  overflow-y: auto;
  color: var(--c-ink);
  font-size: 14.5px;
  line-height: 1.65;
}
.announcement-body h1,
.announcement-body h2,
.announcement-body h3 {
  margin: 16px 0 8px;
  font-weight: 800;
  color: var(--c-ink);
}
.announcement-body h1 { font-size: 1.3rem; }
.announcement-body h2 { font-size: 1.15rem; }
.announcement-body h3 { font-size: 1rem; }
.announcement-body p { margin: 6px 0 10px; }
.announcement-body ul,
.announcement-body ol { padding-left: 22px; margin: 4px 0 10px; }
.announcement-body li { margin: 3px 0; }
.announcement-body a {
  color: var(--c-info);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.announcement-body code {
  background: var(--c-yellow);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1.5px solid var(--c-ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.announcement-body strong { font-weight: 800; }

.announcement-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: var(--c-border-thick);
  background: var(--c-paper);
  flex-wrap: wrap;
}
.announcement-footer .btn { width: auto; padding: 0 18px; height: 46px; font-size: 14px; }

@media (max-width: 760px) {
  .announcement-dialog { max-height: calc(100vh - 24px); border-radius: var(--c-r-md); }
  .announcement-footer { justify-content: stretch; }
  .announcement-footer .btn { flex: 1 1 100%; }
}

/* ============================================================
   Team selection cards (used in 2-team flow)
   ============================================================ */
.team-card {
  padding: 16px;
  background: var(--c-surface);
  border: var(--c-border);
  border-radius: var(--c-r-md);
  box-shadow: 3px 3px 0 var(--c-ink);
  cursor: pointer;
  transition: transform var(--c-tx), box-shadow var(--c-tx), background var(--c-tx);
}
.team-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--c-ink);
  background: var(--c-surface-soft);
}
.team-card.selected {
  background: var(--c-mint);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--c-ink);
}
.team-info {
  font-size: 13.5px;
  color: var(--c-ink-soft);
  font-weight: 600;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .tab-panel.active,
  .result-shell,
  .announcement-dialog {
    animation: none !important;
  }
  .top-tab,
  .form-input,
  .btn,
  .record-card,
  .team-card,
  .announcement-close {
    transition: none !important;
  }
}
