/* ===== 2026-11-24 新一版：2048 / 阶跃小游戏 / 橙线火柴人 / AI 面板 ===== */

/* 首页 2048：取代原来无含义的重力块 */
.hero-toys {
  width: 258px;
  padding: 9px 12px 8px;
  border-color: rgba(205, 255, 94, 0.34);
  background:
    linear-gradient(180deg, rgba(9, 28, 19, 0.78), rgba(9, 28, 19, 0.48) 62%, rgba(9, 28, 19, 0.28));
}
.toys-head b { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-mono); }
.toys-head b i { font-style: normal; font-size: 15px; color: var(--lime); }
.toys-stage { height: 224px; border-bottom-color: rgba(205, 255, 94, 0.56); }
.t2048 {
  position: absolute;
  inset: 3px 0 5px;
  display: grid;
  place-items: center;
  outline: none;
}
.t2048-grid {
  display: grid;
  grid-template-columns: repeat(4, 46px);
  grid-template-rows: repeat(4, 46px);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(205, 255, 94, 0.36);
  border-radius: 9px;
  background: rgba(3, 12, 8, 0.72);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.42), 0 12px 28px -18px rgba(0, 0, 0, 0.9);
  touch-action: none;
}
.t2048-cell {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(205, 255, 94, 0.13);
  border-radius: 5px;
  background: rgba(205, 255, 94, 0.065);
  color: var(--ink-green);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  transition: background 120ms, color 120ms, transform 140ms var(--ease);
}
.t2048-cell.has { border-color: rgba(9, 28, 19, 0.28); }
.t2048-cell[data-v="2"], .t2048-cell[data-v="4"] {
  background: linear-gradient(145deg, #e3ff9a, var(--lime));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 12px -8px #000;
}
.t2048-cell[data-v="8"], .t2048-cell[data-v="16"] {
  background: linear-gradient(145deg, #fffdf3, var(--cream));
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px -8px #000;
}
.t2048-cell[data-v="32"], .t2048-cell[data-v="64"] {
  background: linear-gradient(145deg, #ffe6a6, #ffd166);
}
.t2048-cell[data-v="128"], .t2048-cell[data-v="256"] {
  color: #2a1206;
  background: linear-gradient(145deg, #ffb06a, #ff8c42);
}
.t2048-cell[data-v="512"], .t2048-cell[data-v="1024"] {
  color: var(--cream);
  background: linear-gradient(145deg, #ff875f, #d84b32);
}
.t2048-cell[data-v="2048"] {
  color: var(--ink-green);
  background: linear-gradient(145deg, #efffb8, var(--lime));
  box-shadow: 0 0 22px rgba(205, 255, 94, 0.62), inset 0 1px 0 #fff;
}
.t2048-cell.big { font-size: 14px; letter-spacing: -0.08em; }
.t2048-cell.huge { font-size: 11px; letter-spacing: -0.09em; }
.t2048-cell.pop { animation: t2048Pop 260ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes t2048Pop {
  0% { transform: scale(0.72); filter: brightness(1.7); }
  62% { transform: scale(1.1); }
  100% { transform: scale(1); filter: none; }
}
.t2048-over {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 9px;
  background: rgba(3, 12, 8, 0.86);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  text-align: center;
}
.t2048-over b { font-family: var(--font-mono); font-size: 44px; line-height: 1; color: var(--lime); letter-spacing: -0.08em; }
.t2048-over span { font-size: 12px; color: rgba(244, 240, 226, 0.65); }
.t2048-over button {
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid var(--lime);
  border-radius: 999px;
  color: var(--ink-green);
  background: var(--lime);
  font-size: 12px;
}
.t2048-over.win b { font-size: 58px; text-shadow: 0 0 24px rgba(205, 255, 94, 0.6); }
.t2048-grid.over { filter: saturate(0.5) brightness(0.7); }

/* 打卡表单：题量步进器与难度下拉等宽、等高 */
.checkin-form .form-row { align-items: end; }
.checkin-form .field { min-width: 0; }
.checkin-form .stepper {
  display: flex;
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  justify-content: space-between;
  padding: 4px;
}
.checkin-form .stepper .val { flex: 1; display: grid; place-items: center; min-width: 0; }
.checkin-form .stepper button { flex: none; }
.checkin-form .select { width: 100%; height: 48px; box-sizing: border-box; }

/* 橙线火柴人：Alan Becker 式空心圆头、粗线、放大 */
.qj-stick {
  width: 80px !important;
  height: 108px !important;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 8px rgba(255, 102, 0, 0.18));
}
.qj-ledge {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 89;
  width: 150px;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(205, 255, 94, 0.95) 18%, rgba(255, 102, 0, 0.9) 50%, rgba(205, 255, 94, 0.95) 82%, transparent);
  box-shadow: 0 0 14px rgba(205, 255, 94, 0.35);
  transform: translate(-50%, 0);
  transition: opacity 240ms var(--ease), width 300ms var(--ease);
}
.qj-ledge.show { opacity: 1; }
.qj-ledge::before, .qj-ledge::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}
.qj-ledge::before { left: 20%; }
.qj-ledge::after { right: 20%; background: #ff6600; box-shadow: 0 0 8px #ff6600; }

/* 全站小游戏入口 */
.qj-arcade-launch {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(300px, calc(100vw - 120px));
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(205, 255, 94, 0.4);
  border-radius: 10px;
  background: rgba(9, 28, 19, 0.86);
  color: var(--cream);
  text-align: left;
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 220ms var(--ease), border-color 220ms;
}
.qj-arcade-launch:hover { transform: translateY(-3px); border-color: var(--lime); }
.qja-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 7px;
  background: var(--lime);
  color: var(--ink-green);
  font-size: 12px;
  padding-left: 2px;
}
.qja-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qja-copy b { font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qja-copy em { font-style: normal; font-size: 9px; line-height: 1.3; color: rgba(244, 240, 226, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.qj-arcade-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 10, 7, 0.78);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  opacity: 0;
  transition: opacity 240ms var(--ease);
}
.qj-arcade-modal[hidden] { display: none !important; }
.qj-arcade-modal.open { opacity: 1; }
.qja-shell {
  width: min(920px, 96vw);
  max-height: 94dvh;
  overflow: auto;
  border: 1px solid rgba(205, 255, 94, 0.46);
  border-radius: 16px;
  background: #07160f;
  color: var(--cream);
  box-shadow: 0 40px 110px -40px #000, 0 0 0 1px rgba(255, 102, 0, 0.16);
  transform: translateY(14px) scale(0.98);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.qj-arcade-modal.open .qja-shell { transform: none; }
.qja-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(205, 255, 94, 0.18);
  background: linear-gradient(120deg, rgba(205, 255, 94, 0.08), transparent 48%);
}
.qja-kicker { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; color: rgba(205, 255, 94, 0.7); }
.qja-head h2 { margin-top: 4px; font-size: clamp(22px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.04em; }
.qja-head p { margin-top: 4px; font-size: 12px; line-height: 1.5; color: rgba(244, 240, 226, 0.58); }
.qja-close {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 240, 226, 0.2);
  border-radius: 50%;
  color: var(--cream);
  font-size: 24px;
  line-height: 1;
}
.qja-close:hover { background: var(--lime); color: var(--ink-green); border-color: var(--lime); }
.qja-stage {
  position: relative;
  margin: 10px 12px 0;
  border: 1px solid rgba(205, 255, 94, 0.24);
  border-radius: 10px;
  overflow: hidden;
  background: #07160f;
}
.qja-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 900 / 420; touch-action: none; }
.qja-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 22px;
  text-align: center;
  background: radial-gradient(circle at 50% 48%, rgba(9, 28, 19, 0.72), rgba(3, 10, 7, 0.92));
}
.qja-overlay[hidden] { display: none !important; }
.qja-ov-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--lime); text-transform: uppercase; }
.qja-overlay b { font-size: clamp(28px, 5vw, 48px); line-height: 1; letter-spacing: -0.05em; }
.qja-overlay p { max-width: 420px; font-size: 12px; line-height: 1.6; color: rgba(244, 240, 226, 0.64); }
.qja-start {
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink-green);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(205, 255, 94, 0.24);
}
.qja-overlay.win .qja-ov-kicker { color: var(--lime); }
.qja-overlay.lose .qja-ov-kicker { color: #ff8e6a; }
.qja-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(244, 240, 226, 0.52);
}
.qja-foot b { color: var(--lime); font-size: 15px; font-weight: 700; }
.qja-hint { margin-left: auto; }
body.arcade-open { overflow: hidden; }

/* AI 面板：去模型、免费额度、流式、快速操作 */
.qjc-head {
  background:
    radial-gradient(120% 180% at 8% 0%, rgba(205, 255, 94, 0.12), transparent 44%),
    var(--ink-green);
  border-bottom-color: rgba(255, 102, 0, 0.3);
}
.qjc-mark {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: #ff6600;
  color: var(--cream);
}
.qjc-mark svg { width: 22px; height: 22px; display: block; }
.qjc-title b { font-size: 16px; letter-spacing: -0.02em; }
.qjc-title span { color: rgba(244, 240, 226, 0.68); }
.qjc-free {
  margin-left: auto;
  flex: none;
  padding: 4px 8px;
  border: 1px solid rgba(205, 255, 94, 0.52);
  border-radius: 999px;
  background: rgba(205, 255, 94, 0.08);
  font-size: 10px;
  line-height: 1.1;
  color: var(--lime);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.qjc-free i { font-style: normal; opacity: 0.62; }
.qjc-close { margin-left: 2px; }
.qjc-glance { flex-wrap: wrap; row-gap: 5px; }
.qjc-glance b { font-size: 16px; }
.qjc-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.qjc-quick button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(9, 28, 19, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink-green);
  font-size: 10px;
  line-height: 1.2;
  text-align: left;
}
.qjc-quick button span { color: rgba(9, 28, 19, 0.4); font-family: var(--font-mono); font-size: 9px; }
.qjc-quick button:hover { background: var(--ink-green); color: var(--cream); border-color: var(--ink-green); }
.qjc-quick button:hover span { color: var(--lime); }
.qjc-free-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(9, 28, 19, 0.16);
  font-size: 10px;
  line-height: 1.5;
  color: rgba(9, 28, 19, 0.62);
}
.qjc-free-line b { color: var(--ink-green); font-weight: 700; }
.qjc-free-line i { font-style: normal; padding: 2px 5px; border-radius: 3px; background: var(--lime); color: var(--ink-green); font-family: var(--font-mono); font-size: 9px; }

.qjc-think {
  position: relative;
  width: 100%;
  padding: 10px 12px 11px;
  border: 1px solid rgba(9, 28, 19, 0.14);
  border-radius: 9px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.54), rgba(205, 255, 94, 0.12));
  overflow: hidden;
}
.qjc-think::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(205, 255, 94, 0.22) 46%, transparent 72%);
  transform: translateX(-110%);
  animation: qjcScan 1600ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
.qjc-think b { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.02em; color: var(--ink-green); }
.qjc-think b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff6600; box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.14); }
.qjc-think i { display: block; margin-top: 5px; font-style: normal; font-family: var(--font-mono); font-size: 9px; line-height: 1.5; color: rgba(9, 28, 19, 0.48); letter-spacing: 0.02em; }
.qjc-think .qjc-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.qjc-think .qjc-dots em { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-green); animation: qjcDots 760ms ease-in-out infinite; }
.qjc-think .qjc-dots em:nth-child(2) { animation-delay: 110ms; }
.qjc-think .qjc-dots em:nth-child(3) { animation-delay: 220ms; }
@keyframes qjcScan { to { transform: translateX(110%); } }
.qjc-msg.stream p::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 12px;
  margin-left: 2px;
  vertical-align: -1px;
  background: var(--ink-green);
  animation: qjcCaret 620ms steps(2, end) infinite;
}
@keyframes qjcCaret { 50% { opacity: 0; } }
.qjc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -3px 0 12px 31px;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: rgba(9, 28, 19, 0.42);
}
.qjc-meta::before { content: ""; width: 10px; height: 1px; background: rgba(9, 28, 19, 0.25); }
.qjc-draw-cap { font-size: 9px; letter-spacing: 0.02em; color: rgba(9, 28, 19, 0.54); }
.qjc-foot { padding: 1px 12px 9px; font-size: 10px; line-height: 1.5; color: rgba(9, 28, 19, 0.58); }
.qjc-form input { height: 40px; }
.qjc-form button { width: 40px; height: 40px; }

@media (max-width: 980px) {
  .hero-toys { display: none; }
}

@media (max-width: 680px) {
  .qj-stick { width: 68px !important; height: 92px !important; }
  .qj-arcade-launch { left: 12px; bottom: 12px; max-width: calc(100vw - 100px); padding: 6px 9px 6px 6px; }
  .qja-icon { width: 26px; height: 26px; }
  .qja-copy b { font-size: 11px; }
  .qja-copy em { max-width: 160px; }
  .qj-arcade-modal { padding: 8px; }
  .qja-shell { width: 100%; max-height: 96dvh; border-radius: 12px; }
  .qja-head { padding: 13px 13px 10px; }
  .qja-head p { display: none; }
  .qja-stage { margin: 7px 7px 0; }
  .qja-foot { gap: 10px; padding: 9px 11px 11px; font-size: 9px; }
  .qja-hint { display: none; }
  .qjc-free { font-size: 9px; padding: 3px 6px; }
  .qjc-title span { display: none; }
  .qjc-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qjc-foot { display: block; font-size: 8px; }
  .checkin-form .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .t2048-cell, .qja-shell, .qj-arcade-modal, .qj-ledge { transition: none; animation: none; }
  .qjc-think::after, .qjc-msg.stream p::after { animation: none; }
}

/* ===== 2026-11-24 账号体系：登录、免责协议、邮箱/改密 ===== */
.account-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(10, 32, 22, 0.14);
  background: rgba(10, 32, 22, 0.035);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.account-identity strong { color: var(--ink); font-size: 16px; letter-spacing: 0.06em; }
.account-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(113, 238, 62, 0.10);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.account-tools { display: grid; gap: 12px; margin-top: 18px; }
.account-box {
  padding: 16px;
  border: 1px solid rgba(10, 32, 22, 0.14);
  background: rgba(255, 255, 255, 0.34);
}
.account-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.account-box-head h3 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.account-box-head span { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; }
.account-box-note { margin: 6px 0 12px; font-size: 12px; line-height: 1.65; color: var(--ink-3); }
.account-form { display: flex; flex-direction: column; gap: 10px; }
.account-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-inline .btn { flex: 0 0 auto; }
.account-hint { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.account-legal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(10, 32, 22, 0.12);
  font-size: 11px;
  color: var(--ink-3);
}
.account-legal-line .btn { padding: 4px 0; font-size: 11px; }

.qj-legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 16, 10, 0.78);
  backdrop-filter: blur(7px);
}
.qj-legal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid rgba(205, 255, 94, 0.5);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}
.qj-legal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(10, 32, 22, 0.14);
}
.qj-legal-head .eyebrow { color: var(--ink-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; }
.qj-legal-head h2 { margin: 7px 0 5px; font-size: clamp(24px, 4vw, 34px); line-height: 1.05; letter-spacing: -0.04em; }
.qj-legal-meta { margin: 0; font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.qj-legal-x {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(10, 32, 22, 0.2);
  background: transparent;
  color: var(--ink-3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.qj-legal-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 24px 22px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  scrollbar-width: thin;
}
.qj-legal-scroll h4 { margin: 20px 0 7px; font-size: 14px; color: var(--ink); letter-spacing: 0; }
.qj-legal-scroll p { margin: 0 0 10px; }
.qj-legal-scroll p:first-child { font-size: 13px; color: var(--ink); }
.qj-legal-scroll .legal-tip { margin-top: 16px; padding: 10px 12px; background: rgba(10, 32, 22, 0.06); color: var(--ink); }
.qj-legal-foot { padding: 14px 24px 18px; border-top: 1px solid rgba(10, 32, 22, 0.14); background: rgba(10, 32, 22, 0.025); }
.qj-legal-check { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.65; color: var(--ink-2); cursor: pointer; }
.qj-legal-check input { margin-top: 3px; accent-color: var(--accent); }
.qj-legal-foot .btn { width: 100%; margin-top: 12px; }
.qj-legal-note { margin: 8px 0 0; font-size: 11px; color: var(--ink-3); text-align: center; }
html.qj-legal-open, html.qj-legal-open body { overflow: hidden; }

@media (max-width: 620px) {
  .qj-legal-overlay { padding: 10px; }
  .qj-legal-card { max-height: 94vh; }
  .qj-legal-head { padding: 16px 16px 12px; }
  .qj-legal-scroll { padding: 14px 16px 18px; }
  .qj-legal-foot { padding: 12px 16px 14px; }
  .account-tools { grid-template-columns: 1fr; }
}

