:root {
  --ink: #efe6d6;
  --sub: rgba(239, 230, 214, 0.62);
  --accent: #f2c230;
  --accent-dark: #8a6510;
  --stroke: #1b1714;
  --panel: linear-gradient(180deg, #3b3630 0%, #2a2622 55%, #221e1a 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #141210;
  color: var(--ink);
  font-family: "Zen Maru Gothic", "PingFang SC", "Microsoft YaHei", sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud #quitBtn, #hud #repairBtn { pointer-events: auto; }

#timer {
  position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top));
  transform: translateX(-50%);
  font-family: "Dela Gothic One", "Arial Black", sans-serif;
  font-size: clamp(40px, 7vmin, 56px); line-height: 1.1;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 7px var(--stroke); paint-order: stroke fill;
}
#timer small { font-size: .42em; margin-left: .1em; }
#timer.hurry { color: #ff5a4a; }

#stamina {
  position: fixed; left: 50%; top: calc(clamp(40px, 7vmin, 56px) * 1.15 + 14px + env(safe-area-inset-top));
  transform: translateX(-50%);
  width: min(180px, 44vw); height: 12px;
  border: 2px solid var(--stroke); border-radius: 8px;
  background: rgba(0, 0, 0, .45); overflow: hidden;
}
#staminaFill { display: block; height: 100%; width: 100%; background: #6fd36a; transform-origin: left center; }

#pant {
  position: fixed; left: 0; right: 0;
  top: calc(clamp(40px, 7vmin, 56px) * 1.15 + 36px + env(safe-area-inset-top));
  text-align: center; color: #ffb4a8; font-weight: 900;
  font-size: clamp(18px, 3.2vmin, 24px);
  -webkit-text-stroke: 5px var(--stroke); paint-order: stroke fill;
}

#meta {
  position: fixed; left: calc(100vw - 132px); right: auto;
  top: calc(14px + env(safe-area-inset-top));
  display: flex; gap: 10px; align-items: center;
  font-weight: 900; font-size: 14px; color: var(--sub);
}
#coins {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px 5px 6px; border-radius: 999px;
  background: rgba(20, 16, 12, .68); color: #ffe08a; font-size: 17px;
}
#coins svg { width: 22px; height: 22px; }

#tip {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  text-align: center; font-weight: 900;
  font-size: clamp(15px, 2.6vmin, 19px);
  -webkit-text-stroke: 5px var(--stroke); paint-order: stroke fill;
  transition: opacity .6s;
}
#tip.fade { opacity: 0; }

/* ---------- 标题 ---------- */
#title {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 45%, rgba(42, 38, 34, .55) 0%, rgba(20, 18, 16, .92) 72%);
}
#title h1 {
  font-family: "Dela Gothic One", "Arial Black", sans-serif;
  font-size: clamp(44px, min(12vw, 9svh), 84px); line-height: 1.05;
  letter-spacing: .02em;
  -webkit-text-stroke: 9px var(--stroke); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--stroke);
}
#title p { color: #f0c25a; font-weight: 900; letter-spacing: .3em; font-size: clamp(14px, 2.4vmin, 18px); }
#howto { max-width: 380px; margin-top: 8px; color: var(--sub); font-size: 13px; line-height: 1.7; font-weight: 700; }

#playBtn, #nextBtn, #shopClose, #shopBtn {
  border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #ffd955 0%, #f2c230 55%, #e0ad1c 100%);
  color: #1b1714; font-weight: 900; letter-spacing: .12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 0 var(--accent-dark), 0 8px 16px rgba(0, 0, 0, .45);
}
#playBtn {
  width: min(260px, calc(100vw - 64px)); height: 66px; margin-top: 18px;
  font-size: 26px; letter-spacing: .3em; text-indent: .3em;
}
#playBtn:active, #nextBtn:active, #shopClose:active, #shopBtn:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 0 var(--accent-dark), 0 4px 10px rgba(0, 0, 0, .4);
}

/* ---------- 结果卡 ---------- */
#result, #shop { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
#result { background: linear-gradient(180deg, transparent 40%, rgba(8, 6, 5, .55) 100%); }

.card {
  width: min(380px, 100%); padding: 16px 16px 14px;
  border: 2px solid #5f554a; border-radius: 14px;
  background: radial-gradient(circle at 12px 16px, #8e8377 0 3px, rgba(0, 0, 0, .5) 3.5px 4.5px, transparent 5px),
              radial-gradient(circle at calc(100% - 12px) 16px, #8e8377 0 3px, rgba(0, 0, 0, .5) 3.5px 4.5px, transparent 5px),
              var(--panel);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 28px rgba(0, 0, 0, .6);
}
#result .row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
#resultRound { margin: 0 4px; padding: 1px 10px; border-radius: 4px; background: var(--accent); color: #1b1714; font-size: 12px; font-weight: 900; }
#result .label { font-size: 13px; font-weight: 900; color: var(--sub); letter-spacing: .1em; margin-right: 4px; }
#result .score {
  font-family: "Dela Gothic One", "Arial Black", sans-serif;
  font-size: clamp(44px, min(13vw, 8svh), 60px); line-height: 1.1;
  color: #f6eedf; text-shadow: 0 3px 0 #000;
  font-variant-numeric: tabular-nums;
}
#result .score small { font-size: .5em; margin-left: .08em; }
#comment {
  display: inline-block; margin: 6px 0 8px; padding: 6px 14px; border-radius: 3px;
  background: #d8c79f; color: #2b2622; font-weight: 900; font-size: 16px;
  transform: rotate(-1.2deg);
}
.tally { display: flex; justify-content: center; gap: 14px; color: var(--sub); font-size: 13px; font-weight: 900; }
#bestNum.new { color: #ffd54a; }
#reward { margin: 6px 0 10px; color: #ffd54a; font-weight: 900; font-size: 16px; }
.pair { display: flex; gap: 10px; }
#shopBtn, #nextBtn { flex: 1 1 0; height: 56px; font-size: 18px; }
#shopBtn { background: linear-gradient(180deg, #3a342e, #2a2520); color: var(--ink); border: 2px solid #5f554a; }

/* ---------- 商店 ---------- */
#shop { background: rgba(6, 5, 4, .7); align-items: center; padding: 12px; }
#shop .card { width: min(420px, 100%); }
#shop h2 { font-family: "Dela Gothic One", "Arial Black", sans-serif; color: var(--accent); letter-spacing: .12em; margin-bottom: 4px; }
#shopCoins { margin-bottom: 10px; color: #ffd54a; font-weight: 900; }
#shopList { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border: 1px solid #5f554a; border-radius: 10px;
  background: rgba(0, 0, 0, .28); text-align: left;
}
.item .icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 22px; }
.item .info { flex: 1 1 auto; min-width: 0; }
.item .name { font-size: 15px; font-weight: 900; }
.item .desc { font-size: 12px; font-weight: 700; color: var(--sub); }
.item .lv { font-size: 12px; font-weight: 900; color: var(--accent); }
.item button {
  min-width: 72px; height: 42px; border: 0; border-radius: 10px; font-size: 14px; font-weight: 900;
  background: linear-gradient(180deg, #ffd955 0%, #f2c230 55%, #e0ad1c 100%);
  color: #1b1714;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 3px 0 var(--accent-dark);
}
.item button:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 0 var(--accent-dark); }
.item button[disabled] { background: #4a443d; color: #8a8178; box-shadow: none; cursor: default; }
#shopClose { width: 100%; height: 52px; font-size: 18px; }

/* ---------- 抛光布 ---------- */
#cloth {
  position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(105deg, rgba(250, 245, 232, .96) 0 22px, rgba(214, 206, 190, .96) 22px 26px);
  clip-path: inset(100% 0 0 0);
}
#cloth.wipe { animation: wipe 2.2s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes wipe {
  0% { clip-path: inset(100% 0 0 0); }
  35% { clip-path: inset(0 0 0 0); }
  65% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 100% 0); }
}

#flash { position: fixed; inset: 0; background: #fff; pointer-events: none; opacity: 0; }
#flash.bang { animation: bang .4s ease-out; }
@keyframes bang { 0% { opacity: .85; } 100% { opacity: 0; } }

.back {
  position: fixed; left: calc(12px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom));
  color: var(--sub); font-size: 13px; font-weight: 700; text-decoration: none;
  padding: 6px 10px; border-radius: 8px;
}
.back:hover { color: var(--ink); }

#mute {
  position: fixed; top: calc(54px + env(safe-area-inset-top)); left: calc(100vw - 52px); right: auto;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid #5f554a; background: rgba(28, 24, 20, .82);
  color: var(--ink); font-size: 17px; font-weight: 900;
}
#mute.off { opacity: .45; }

@media (max-height: 700px) {
  #result .score { font-size: clamp(38px, 7svh, 48px); }
  #howto { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #cloth.wipe { animation-duration: .01s; }
  #flash.bang { animation: none; }
}
/* ---------- 取景框 / 暗角 / 字幕 ---------- */
#vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 48%, rgba(0,0,0,0) 45%, rgba(0,0,0,.38) 75%, rgba(0,0,0,.72) 100%);
}
#rec {
  position: fixed; pointer-events: none;
  inset: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
  transition: opacity .5s;
}
#rec i { position: absolute; width: 30px; height: 30px; border: 0 solid rgba(255,255,255,.85); }
#rec i:nth-child(1) { left: 0; top: 0; border-width: 3px 0 0 3px; }
#rec i:nth-child(2) { right: 0; top: 0; border-width: 3px 3px 0 0; }
#rec i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 3px 3px; }
#rec i:nth-child(4) { right: 0; bottom: 0; border-width: 0 3px 3px 0; }
#recLabel {
  position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 7px;
  color: #fff; font-weight: 900; font-size: 18px; letter-spacing: .08em;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
#recLabel::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #ff3b30; animation: recblink 1s steps(2) infinite; }
@keyframes recblink { 50% { opacity: 0; } }
#recTime {
  position: absolute; left: 14px; top: 38px; color: #fff;
  font: 700 13px/1 ui-monospace, Menlo, monospace; text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
#telop {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  text-align: center; pointer-events: none;
}
#telop span {
  display: inline-block; padding: .12em .5em;
  background: rgba(0,0,0,.72); color: #fff; font-weight: 900;
  font-size: clamp(18px, min(5vw, 3.4svh), 28px);
  animation: tremble .18s steps(2) infinite;
}
@keyframes tremble { 0% { transform: translate(0,0); } 50% { transform: translate(1px,-1px); } 100% { transform: translate(-1px,1px); } }
@media (prefers-reduced-motion: reduce) {
  #recLabel::before, #telop span { animation: none; }
}

/* ---------- 标题按钮 / 统计 / 结果副按钮 ---------- */
.title-btns { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
#playBtn, #endlessBtn {
  width: min(220px, calc(50vw - 40px)); height: 60px; margin-top: 0;
  font-size: 20px; letter-spacing: .12em; text-indent: .12em;
}
#endlessBtn {
  background: linear-gradient(180deg, #3a342e, #2a2520);
  color: var(--ink); border: 2px solid #5f554a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 0 #15120f;
}
#titleStats { display: flex; gap: 14px; margin-top: 12px; color: #ffd54a; font-weight: 900; font-size: 13px; flex-wrap: wrap; justify-content: center; }
#titleStats span:empty { display: none; }
.pair.sub { margin-top: 8px; }
#bankBtn {
  flex: 1 1 0; height: 44px; border-radius: 10px; font-size: 13px; font-weight: 900;
  border: 2px solid #5f554a; background: linear-gradient(180deg, #3a342e, #2a2520); color: var(--sub);
}
#bossDebuffs {
  position: fixed; left: calc(14px + env(safe-area-inset-left));
  top: calc(88px + env(safe-area-inset-top));
  max-width: min(72vw, 460px);
  color: #ff9c8a; font-weight: 900; font-size: 12px; line-height: 1.55;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85); pointer-events: none;
}

/* ---------- 目标 / 修复 / 排行榜 ---------- */
#goal {
  position: fixed; left: calc(14px + env(safe-area-inset-left)); top: calc(64px + env(safe-area-inset-top));
  color: #ffd54a; font-weight: 900; font-size: 13px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none;
}
#repairBtn {
  position: fixed; left: 50%; bottom: calc(120px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 10px 22px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #ff7a5c, #e04a3a); color: #fff;
  font-weight: 900; font-size: 16px; letter-spacing: .1em;
  box-shadow: 0 4px 0 #8a2418, 0 8px 16px rgba(0,0,0,.5);
  animation: repairpulse .8s ease-in-out infinite;
}
@keyframes repairpulse { 50% { transform: translateX(-50%) scale(1.06); } }
.linkbtn {
  margin-top: 10px; border: 0; background: none; color: var(--sub);
  font-weight: 900; font-size: 14px; letter-spacing: .1em; text-decoration: underline;
}
.linkbtn:hover { color: var(--ink); }
.title-links { display: flex; gap: 18px; justify-content: center; align-items: center; }
.title-links .linkbtn { margin-top: 12px; }
#notice {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(6, 5, 4, .7);
}
#notice .card {
  width: min(440px, 100%); max-height: calc(100svh - 32px);
  display: flex; flex-direction: column; overflow: hidden; text-align: left;
}
#notice h2 {
  font-family: "Dela Gothic One", "Arial Black", sans-serif; color: var(--accent);
  letter-spacing: .12em; margin-bottom: 8px; text-align: center;
}
#noticeList { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px; margin-bottom: 10px; }
#noticeClose {
  width: 100%; flex: none; height: 46px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #ffd955, #f2c230 55%, #e0ad1c); color: #1b1714;
  font-weight: 900; font-size: 16px;
}
.nitem { padding: 10px 0; border-bottom: 1px solid #4a423a; }
.nitem:last-child { border-bottom: 0; }
.nhead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.nhead h3 { color: var(--accent); font-size: 14px; font-weight: 900; letter-spacing: .04em; }
.nhead time { color: var(--sub); font-size: 11px; font-weight: 700; }
.nhead .nnew { padding: 1px 6px; border-radius: 4px; background: var(--accent); color: #1b1714; font-size: 10px; font-weight: 900; }
.nitem ul { margin: 6px 0 0; padding-left: 16px; color: var(--sub); font-size: 13px; font-weight: 700; line-height: 1.6; }
.nitem li::marker { color: var(--accent); }
#noticeList::-webkit-scrollbar { width: 8px; }
#noticeList::-webkit-scrollbar-track { background: rgba(0, 0, 0, .3); border-radius: 4px; }
#noticeList::-webkit-scrollbar-thumb { background: #5f554a; border-radius: 4px; }
#noticeList::-webkit-scrollbar-thumb:hover { background: var(--accent); }
#board { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,5,4,.7); }
#board .card { width: min(420px, 100%); max-height: calc(100svh - 32px); overflow: auto; }
#board h2 { font-family: "Dela Gothic One", "Arial Black", sans-serif; color: var(--accent); letter-spacing: .12em; margin-bottom: 8px; }
.btabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.btabs button {
  padding: 6px 18px; border-radius: 999px; border: 2px solid #5f554a;
  background: rgba(0,0,0,.28); color: var(--sub); font-weight: 900; font-size: 13px;
}
.btabs button.on { background: var(--accent); color: #1b1714; border-color: var(--accent); }
#boardList { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; color: var(--sub); font-weight: 700; font-size: 14px; }
.brow { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid #5f554a; border-radius: 10px; background: rgba(0,0,0,.28); }
.brank { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #5f554a; color: #fff; font-size: 12px; font-weight: 900; }
.brow:nth-child(1) .brank { background: var(--accent); color: #1b1714; }
.bname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.bval { flex: none; color: #ffd54a; font-weight: 900; }
#boardNote { color: var(--sub); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
#boardNote a { color: #ffd54a; }
#boardClose { width: 100%; height: 46px; border: 0; border-radius: 12px; background: linear-gradient(180deg,#ffd955,#f2c230 55%,#e0ad1c); color: #1b1714; font-weight: 900; font-size: 16px; }
#board .card::-webkit-scrollbar { width: 8px; }
#board .card::-webkit-scrollbar-track { background: rgba(0,0,0,.3); border-radius: 4px; }
#board .card::-webkit-scrollbar-thumb { background: #5f554a; border-radius: 4px; }
#board .card::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.bsec { margin-bottom: 12px; text-align: left; }
.bsec h3 { color: var(--accent); font-size: 13px; font-weight: 900; letter-spacing: .08em; margin-bottom: 6px; }
.blist { display: flex; flex-direction: column; gap: 6px; color: var(--sub); font-weight: 700; font-size: 14px; max-height: 180px; overflow-y: auto; padding-right: 4px; }
.blist::-webkit-scrollbar { width: 8px; }
.blist::-webkit-scrollbar-track { background: rgba(0,0,0,.3); border-radius: 4px; }
.blist::-webkit-scrollbar-thumb { background: #5f554a; border-radius: 4px; }
.blist::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- 实时进度 ---------- */
#progress {
  position: fixed; left: 50%; bottom: calc(52px + env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(320px, 82vw);
  pointer-events: none; text-align: center;
}
#progressBar {
  position: relative; height: 10px; border: 2px solid var(--stroke); border-radius: 6px;
  background: rgba(0,0,0,.5); overflow: hidden;
}
#progressFill { display: block; height: 100%; width: 0; background: #f2c230; transition: width .15s ease; }
#progressTarget {
  position: absolute; top: -2px; bottom: -2px; width: 3px; background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,.8); transform: translateX(-50%);
}
#progressText {
  display: inline-block; margin-top: 4px; color: var(--ink); font-weight: 900; font-size: 12px;
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
}

/* ---------- 商店移动端：固定底栏 + 内滚动 ---------- */
#shop .card { display: flex; flex-direction: column; max-height: calc(100svh - 32px); position: relative; width: min(420px, calc(100vw - 24px)); min-width: 0; }
#shopList { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px; margin-bottom: 10px; }
#shopList::-webkit-scrollbar { width: 8px; }
#shopList::-webkit-scrollbar-track { background: rgba(0,0,0,.3); border-radius: 4px; }
#shopList::-webkit-scrollbar-thumb { background: #5f554a; border-radius: 4px; }
#shopList::-webkit-scrollbar-thumb:hover { background: var(--accent); }
#shopClose { flex: none; }
#shopX {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px;
  border: 2px solid #5f554a; border-radius: 50%; background: rgba(0,0,0,.35);
  color: var(--ink); font-size: 18px; font-weight: 900; line-height: 1;
}
#shopX:hover { background: var(--accent); color: #1b1714; }

/* ---------- 移动端顶部不重叠 ---------- */
@media (max-width: 700px) {
  #roundLabel { display: none; }
  #meta { left: calc(100vw - 116px); right: auto; top: 12px; }
  #goal { top: calc(96px + env(safe-area-inset-top)); font-size: 12px; }
  #bossDebuffs { top: calc(118px + env(safe-area-inset-top)); font-size: 11px; }
  #progress { bottom: calc(46px + env(safe-area-inset-bottom)); }
}
.btabs.four { flex-wrap: wrap; gap: 6px; }
.btabs.four button { padding: 5px 12px; font-size: 12px; }
#boardList { max-height: 46svh; }
#quitBtn {
  position: fixed; left: calc(12px + env(safe-area-inset-left)); bottom: calc(48px + env(safe-area-inset-bottom));
  padding: 7px 14px; border: 2px solid #5f554a; border-radius: 10px;
  background: rgba(20, 16, 12, .72); color: var(--sub);
  font-weight: 900; font-size: 12px; letter-spacing: .06em;
}
#quitBtn:hover { color: #ffb4a8; border-color: #e04a3a; }

/* ---------- 绑定群账号 ---------- */
#bind {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(6, 5, 4, .7);
}
#bind .card { width: min(400px, 100%); text-align: center; }
#bind h2 {
  font-family: "Dela Gothic One", "Arial Black", sans-serif; color: var(--accent);
  letter-spacing: .12em; margin-bottom: 8px;
}
.bind-hint { margin: 0 0 12px; color: var(--sub); font-size: 13px; font-weight: 700; line-height: 1.6; }
#bindCode {
  width: 100%; height: 54px; border: 2px solid #5f554a; border-radius: 12px;
  background: rgba(0, 0, 0, .35); color: var(--ink);
  font: 900 22px/1 "Dela Gothic One", "Arial Black", sans-serif;
  letter-spacing: .2em; text-align: center; text-transform: uppercase;
}
#bindCode:focus { outline: none; border-color: var(--accent); }
.bind-status { min-height: 18px; margin: 10px 0; color: #ffb4a8; font-size: 13px; font-weight: 900; }
.bind-status.ok { color: #8fe08a; }
#bindSubmit {
  width: 100%; height: 50px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #ffd955, #f2c230 55%, #e0ad1c); color: #1b1714;
  font-weight: 900; font-size: 16px; letter-spacing: .12em;
}
#bindSubmit[disabled] { opacity: .55; }
#bindLogout, #bindClose { margin-top: 10px; }
.linkbtn.inline { margin: 0; padding: 0; font-size: inherit; display: inline; }
