:root{
  /* Warm Apple-like palette */
  --bg0:#fff7fb;
  --bg1:#fffdf6;
  --bg2:#f3f7ff;

  --ink:#1b1b1f;
  --muted:#5f5f6b;

  --glass: rgba(255,255,255,.70);
  --glass2: rgba(255,255,255,.88);
  --line: rgba(40,40,55,.12);

  --accent:#ff4fa3;
  --accent2:#7c5cff;
  --peach:#ffb38a;
  --gold:#ffd6a8;
  --good:#22c55e;
  --bad:#ff4d6d;

  --shadow: 0 22px 60px rgba(24,24,36,.10);
  --shadow2: 0 10px 30px rgba(24,24,36,.08);

  --radius: 22px;
  --radius2: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Display","SF Pro Text","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 120% at 15% 20%, rgba(255,179,138,.24), transparent 55%),
              radial-gradient(120% 120% at 85% 15%, rgba(124,92,255,.18), transparent 50%),
              radial-gradient(140% 140% at 20% 90%, rgba(255,214,168,.30), transparent 60%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* ========= Background: warm aurora + sparkle ========= */
.bg{ position:fixed; inset:0; z-index:-3; }
.bgGlow{
  position:absolute; inset:-32%;
  filter: blur(42px) saturate(1.08);
  opacity:.95;
}
.bgGlowA{
  background:
    radial-gradient(circle at 18% 22%, rgba(255,79,163,.30), transparent 56%),
    radial-gradient(circle at 52% 18%, rgba(255,179,138,.25), transparent 58%),
    radial-gradient(circle at 80% 26%, rgba(124,92,255,.18), transparent 58%);
  background-size: 120% 120%, 118% 118%, 120% 120%;
  background-position: 14% 22%, 52% 18%, 82% 26%;
  animation: none;
}
.bgGlowB{
  background:
    radial-gradient(circle at 72% 74%, rgba(124,92,255,.16), transparent 55%),
    radial-gradient(circle at 40% 78%, rgba(255,79,163,.14), transparent 60%),
    radial-gradient(circle at 58% 64%, rgba(255,214,168,.18), transparent 60%);
  background-size: 118% 118%, 118% 118%, 122% 122%;
  background-position: 70% 74%, 40% 78%, 60% 64%;
  transform: rotate(8deg);
  animation: none;
}

/* Aurora 漂移：让大底有"呼吸感/流动感" */
@keyframes auroraA{
  0%,100%{
    transform: translate3d(-6%, -4%, 0) scale(1.04) rotate(-4deg);
    background-position: 14% 22%, 52% 18%, 82% 26%;
  }
  38%{
    transform: translate3d(4%, 6%, 0) scale(1.10) rotate(6deg);
    background-position: 8% 34%, 64% 16%, 78% 32%;
  }
  68%{
    transform: translate3d(-3%, 10%, 0) scale(1.16) rotate(12deg);
    background-position: 22% 12%, 46% 30%, 88% 18%;
  }
}
@keyframes auroraB{
  0%,100%{
    transform: translate3d(6%, 4%, 0) scale(1.06) rotate(6deg);
    background-position: 70% 74%, 40% 78%, 60% 64%;
  }
  35%{
    transform: translate3d(-4%, -4%, 0) scale(1.12) rotate(12deg);
    background-position: 64% 62%, 32% 88%, 68% 74%;
  }
  70%{
    transform: translate3d(8%, -8%, 0) scale(1.18) rotate(18deg);
    background-position: 78% 86%, 52% 66%, 72% 54%;
  }
}

/* Replace the “noise” feeling with a soft sparkle shimmer */
.bgNoise{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 55% 20%, rgba(255,255,255,.75) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 58%, rgba(255,255,255,.85) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 76%, rgba(255,255,255,.7) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 82%, rgba(255,255,255,.8) 0 1px, transparent 2px);
  opacity:.50;
  filter: blur(.2px) saturate(1.1);
  animation: none;
}
.bgDecor{
  position:absolute;
  pointer-events:none;
  opacity:.65;
}
.bgTree{
  width: 260px;
  height: 360px;
  background-repeat:no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='300' viewBox='0 0 220 300'%3E%3Crect x='94' y='232' width='32' height='68' rx='8' fill='%238b5a2b'/%3E%3Cg fill='%237fbf6f' stroke='%234f8a5b' stroke-width='8' stroke-linejoin='round'%3E%3Cpath d='M110 32 36 130h148z'/%3E%3Cpath d='M110 104 24 190h172z'/%3E%3Cpath d='M110 168 16 248h188z'/%3E%3C/g%3E%3Ccircle cx='70' cy='150' r='8' fill='%23ff6b6b'/%3E%3Ccircle cx='102' cy='136' r='7' fill='%23ffd447'/%3E%3Ccircle cx='142' cy='152' r='8' fill='%23ff9ff3'/%3E%3Ccircle cx='164' cy='174' r='7' fill='%234fd1c5'/%3E%3Ccircle cx='60' cy='190' r='7' fill='%23ffd447'/%3E%3Ccircle cx='94' cy='208' r='7' fill='%234fd1c5'/%3E%3Ccircle cx='138' cy='206' r='7' fill='%23ff6b6b'/%3E%3Ccircle cx='118' cy='184' r='6' fill='%23ffdd7a'/%3E%3Cpath d='M118 18c-10 0-18 8-18 18s8 18 18 18 18-8 18-18-8-18-18-18z' fill='%23ffd447' stroke='%23f59e0b' stroke-width='4'/%3E%3Cpath d='M118 6v22M100 16l18 10' stroke='%23f59e0b' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.bgTreeL{ left:-40px; bottom: -30px; transform: rotate(-4deg); }
.bgTreeR{ right:-60px; top: 12%; transform: rotate(6deg) scale(.94); opacity:.58; }
.bgStars{
  inset: 0;
  background:
    radial-gradient(8px 8px at 12% 18%, rgba(255,214,168,.8), transparent 55%),
    radial-gradient(6px 6px at 28% 32%, rgba(255,255,255,.8), transparent 50%),
    radial-gradient(8px 8px at 62% 24%, rgba(255,158,243,.75), transparent 55%),
    radial-gradient(7px 7px at 78% 16%, rgba(255,214,168,.8), transparent 52%),
    radial-gradient(6px 6px at 86% 44%, rgba(79,209,197,.72), transparent 52%),
    radial-gradient(7px 7px at 12% 72%, rgba(255,214,168,.8), transparent 52%),
    radial-gradient(6px 6px at 32% 86%, rgba(255,255,255,.8), transparent 52%),
    radial-gradient(8px 8px at 74% 84%, rgba(255,158,243,.72), transparent 55%);
  opacity:.45;
  filter: blur(.2px);
}

/* ========= Layout ========= */
.page{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 46px 16px;
}

.shell{
  width:min(1120px, 100%);
  display:flex;
  flex-direction:column;
  gap: 14px;
}

/* ========= Topbar ========= */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 18px;
}

.brand{ display:flex; align-items:center; gap: 12px; }
.brandMark{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(135deg, rgba(255,79,163,.95), rgba(255,179,138,.95), rgba(124,92,255,.90));
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
}
.brandMark::after{
  content:"";
  position:absolute;
  inset:-60px -90px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  transform: rotate(25deg);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine{
  0%,35%{ transform: translateX(-70%) rotate(25deg); opacity:0;}
  52%{ opacity:1;}
  70%,100%{ transform: translateX(70%) rotate(25deg); opacity:0;}
}
.brandTitle{ font-size: 16px; letter-spacing:.2px; font-weight: 700; }
.brandSub{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.topActions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

/* ========= Tabs (Apple-like pill) ========= */
.tabs{
  display:flex; gap:10px; flex-wrap:wrap;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow2);
}

.tab{
  border:0;
  background: transparent;
  color: rgba(27,27,31,.65);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 13px;
  transition: .18s ease;
}
.tab:hover{
  color: var(--ink);
  background: rgba(255,255,255,.70);
}
.tab.isActive{
  color: var(--ink);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(24,24,36,.10);
}

/* ========= Cards ========= */
.view{ display:none; }
.view.isActive{ display:block; }

.card{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.64));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 18px;
  position:relative;
  overflow:hidden;
}
/* 让卡片内容始终在扫光层之上 */
.card > *{ position:relative; z-index:1; }

/* subtle glass highlight sweep */
.card::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-60%;
  width: 120%;
  height: 120%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: rotate(18deg);
  opacity:.0;
  animation: cardSweep 7.8s ease-in-out infinite;
  pointer-events:none; /* 关键修复：不让扫光层拦截点击事件 */
  z-index:0;
}
@keyframes cardSweep{
  0%,55%{ opacity:0; transform: translateX(-18%) rotate(18deg); }
  68%{ opacity:.55; }
  78%{ opacity:0; transform: translateX(30%) rotate(18deg); }
  100%{ opacity:0; }
}

.cardHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  margin-bottom: 12px;
}

h1{ margin:0; font-size: 20px; }
h2{ margin:0; font-size: 16px; }
.muted{ margin:6px 0 0; color: var(--muted); font-size: 12px; line-height:1.55; }
.small{ font-size: 12px; }
label{ display:block; margin: 10px 0 6px; font-size: 12px; color: rgba(27,27,31,.62); }

/* Inputs: clean, warm, “iOS-like” */
input, select, textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.82);
  color: var(--ink);
  padding: 11px 12px;
  outline:none;
  box-shadow: 0 10px 24px rgba(24,24,36,.06) inset;
  transition: border-color .18s ease, box-shadow .18s ease, transform .06s ease;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(255,79,163,.35);
  box-shadow: 0 0 0 4px rgba(255,79,163,.14);
}
textarea{
  min-height: 112px;
  resize: vertical;
  line-height:1.6;
}

/* Grids */
.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 980px){
  .topbar{ flex-direction:column; align-items:flex-start; }
  .grid3{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .grid2{ grid-template-columns: 1fr; }
}

/* ========= Buttons: warm premium ========= */
.row{ display:flex; align-items:center; gap: 12px; margin-top: 12px; flex-wrap:wrap; }

.btn{
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.78);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
  box-shadow: 0 12px 26px rgba(24,24,36,.10);
  user-select:none;
  position:relative;
  overflow:hidden;
}
.btn::after{
  content:"";
  position:absolute;
  inset:-40px -80px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  transform: rotate(20deg);
  opacity:0;
  transition: opacity .18s ease;
}
.btn:hover{
  transform: translateY(-1px);
  filter: saturate(1.06);
}
.btn:hover::after{ opacity:.55; }
.btn:active{ transform: translateY(0px) scale(.99); }

.btnPrimary{
  border-color: transparent;
  color: #1b1b1f;
  background: linear-gradient(135deg, rgba(255,214,168,.95), rgba(255,79,163,.92), rgba(124,92,255,.88));
  box-shadow: 0 18px 46px rgba(255,79,163,.18), 0 18px 46px rgba(124,92,255,.14);
}
.btnGhost{
  background: rgba(255,255,255,.55);
  box-shadow: none;
}
.btnGood{
  border-color: transparent;
  color:#0b2a16;
  background: linear-gradient(135deg, rgba(167,243,208,.95), rgba(34,197,94,.78));
}
.btnDanger{
  border-color: transparent;
  color:#2a0b12;
  background: linear-gradient(135deg, rgba(255,214,168,.92), rgba(255,77,109,.88));
}

/* Pills */
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.70);
  color: rgba(27,27,31,.62);
  font-size: 12px;
  white-space:nowrap;
}
.pillInfo{ border-color: rgba(34,197,94,.22); }
.pillSoft{ border-color: rgba(124,92,255,.22); }

/* Warnings */
.warn{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,77,109,.22);
  background: rgba(255,77,109,.10);
  color: rgba(27,27,31,.84);
  font-size: 12px;
  line-height:1.55;
}

/* ========= Home cards ========= */
.jarRow{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px){
  .jarRow{ grid-template-columns: 1fr; }
}
.jarCard{
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.56));
  padding: 14px;
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
}
.jarCard::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,79,163,.10), transparent 52%),
    radial-gradient(circle at 82% 24%, rgba(124,92,255,.10), transparent 55%),
    radial-gradient(circle at 52% 88%, rgba(255,214,168,.14), transparent 52%);
  pointer-events:none;
}
.jarTop{ display:flex; justify-content:space-between; gap: 10px; align-items:flex-start; position:relative; }
.jarTitle{ font-weight: 750; }
.jarSub{ margin-top: 6px; color: rgba(27,27,31,.62); font-size: 12px; line-height:1.5; position:relative; }

.jarStats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:10px;
  margin-top: 12px;
  position:relative;
}
.stat{
  border-radius: 14px;
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.70);
  padding: 10px;
  text-align:center;
  box-shadow: 0 10px 22px rgba(24,24,36,.06);
}
.stat b{ display:block; font-size: 14px; }
.stat span{ font-size: 11px; color: rgba(27,27,31,.58); }

.note{
  margin-top: 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.68);
  padding: 12px;
  color: rgba(27,27,31,.62);
  font-size: 12px;
  line-height:1.55;
}

.hintBox{
  width:100%;
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.66);
  padding: 12px;
}
.hintTitle{ font-weight: 750; margin-bottom: 6px; }
.hintText{ color: rgba(27,27,31,.60); font-size: 12px; line-height:1.55; }

/* ========= Jar animation: bright, cute, sparkly ========= */
.animStage{ margin-top: 12px; display:flex; justify-content:center; }
.jarAnim{
  position:relative;
  width: 280px;
  height: 280px;
  border-radius: 30px;
  border: 1px solid rgba(27,27,31,.10);
  background:
    radial-gradient(120% 120% at 24% 24%, rgba(255,179,138,.22), transparent 55%),
    radial-gradient(120% 120% at 76% 20%, rgba(124,92,255,.20), transparent 55%),
    radial-gradient(90% 90% at 50% 85%, rgba(255,214,168,.26), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,245,252,.66));
  box-shadow: var(--shadow), 0 18px 42px rgba(124,92,255,.10), 0 22px 46px rgba(255,79,163,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

/* sparkle overlay on jar stage */
.jarAnim::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.95) 0 1px, transparent 2px),
    radial-gradient(circle at 60% 20%, rgba(255,255,255,.75) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 65%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 78%, rgba(255,255,255,.85) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 82%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(60% 60% at 50% 20%, rgba(255,79,163,.12), transparent 55%),
    radial-gradient(60% 60% at 70% 60%, rgba(124,92,255,.14), transparent 60%);
  opacity:.55;
  pointer-events:none;
}
.jarAnim::after{
  content:"";
  position:absolute; inset:12px;
  border-radius: 24px;
  background: radial-gradient(80% 80% at 50% 50%, rgba(255,255,255,.32), transparent 70%);
  pointer-events:none;
  mix-blend-mode: screen;
}

.jarSvg{ width: 232px; height: 232px; }

/* Make the jar look lighter (SVG uses rgba stops already; we just add glow) */
.jarAnim .glass{
  filter:
    drop-shadow(0 18px 32px rgba(255,79,163,.10))
    drop-shadow(0 14px 26px rgba(124,92,255,.08));
}
.jarAnim .lid{
  filter:
    drop-shadow(0 12px 20px rgba(124,92,255,.12))
    drop-shadow(0 10px 16px rgba(255,214,168,.12));
}

.paperSlip{
  position:absolute;
  width: 130px;
  height: 120px;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  opacity:0;
}
.paperCard{
  width: 130px;
  height: 86px;
  border-radius: 16px;
  border: 1px solid rgba(27,27,31,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.74));
  box-shadow: 0 18px 42px rgba(24,24,36,.12);
  position:relative;
  overflow:hidden;
}
.paperCard::after{
  content:"";
  position:absolute;
  inset:-40px -70px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  transform: rotate(18deg);
  animation: shine 3.2s ease-in-out infinite;
  opacity:.55;
}

/* Opening animation: more “cute” bounce */
.jarAnim.isOpening .lid{
  transform-origin: 120px 52px;
  animation: lidOpen .70s cubic-bezier(.2,.9,.2,1) forwards;
}
@keyframes lidOpen{
  0%{ transform: translateY(0) rotate(0deg); }
  65%{ transform: translateY(-18px) rotate(-10deg); }
  100%{ transform: translateY(-14px) rotate(-8deg); }
}
.jarAnim.isOpening .paperSlip{
  animation: paperUp .95s cubic-bezier(.2,.9,.2,1) .12s forwards;
}
@keyframes paperUp{
  0%{ transform: translate(-50%, -10%) scale(.96); opacity:0; }
  55%{ opacity:1; }
  100%{ transform: translate(-50%, -95%) scale(1.02); opacity:1; }
}

/* Result card */
.cardMini{
  margin-top: 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.72);
  padding: 12px;
  min-height: 76px;
  color: rgba(27,27,31,.90);
  line-height:1.6;
  box-shadow: var(--shadow2);
}
.cardMini .meta{ color: rgba(27,27,31,.58); font-size: 12px; margin-bottom: 6px; }
.cardMini .text{ white-space: pre-wrap; }

/* History list */
.list{ display:flex; flex-direction:column; gap: 10px; margin-top: 12px; }
.item{
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.70);
  padding: 12px;
  box-shadow: var(--shadow2);
}
.itemTop{ display:flex; justify-content:space-between; gap: 10px; align-items:flex-start; }
.itemTitle{ font-weight: 750; }
.itemMeta{ color: rgba(27,27,31,.58); font-size: 12px; margin-top: 6px; line-height:1.45; }
.itemText{ margin-top: 10px; white-space: pre-wrap; }
.itemBtns{ margin-top: 10px; display:flex; gap: 10px; flex-wrap:wrap; }

.footer{
  text-align:center;
  color: rgba(27,27,31,.48);
  font-size: 12px;
  padding: 10px 0 2px;
}

/* Toast: warm, premium */
.toast{
  position:fixed;
  left:50%;
  bottom: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.86);
  color: rgba(27,27,31,.86);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  display:none;
  z-index: 50;
}
.toast.isShow{ display:block; animation: pop .16s ease; }
@keyframes pop{
  from{ transform: translateX(-50%) translateY(10px); opacity:0; }
  to{ transform: translateX(-50%) translateY(0); opacity:1; }
}

/* Confetti container */
.confetti{
  position:fixed; inset:0;
  pointer-events:none;
  z-index: 40;
}
.confetti i{
  position:absolute;
  width: 8px; height: 12px;
  border-radius: 4px;
  opacity: .95;
  animation: fall 1150ms ease-out forwards;
}
@keyframes fall{
  0%{ transform: translateY(-20px) rotate(0deg); opacity:0; }
  10%{ opacity:1; }
  100%{ transform: translateY(560px) rotate(260deg); opacity:0; }
}

/* ======= Background FX canvas ======= */
#fxCanvas{
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  opacity:.95;
  mix-blend-mode: normal;      /* 关键：别用 screen 洗掉颜色 */
  filter: saturate(1.25) contrast(1.06);
}

/* ======= Make cards less "white form" and more "romantic glass" ======= */
.card{
  background: linear-gradient(180deg,
    rgba(255,255,255,.58),
    rgba(255,245,252,.40)
  ) !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  box-shadow: 0 24px 80px rgba(124,92,255,.12), 0 18px 55px rgba(255,79,163,.10) !important;
}

.tabs{
  background: rgba(255,255,255,.55) !important;
  border: 1px solid rgba(255,255,255,.62) !important;
}

input, select, textarea{
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(255,255,255,.75) !important;
  pointer-events: auto !important;
}
/* 顺手把输入框鼠标样式改回正常（更像苹果） */
input, textarea{ cursor:text !important; }
select, button{ cursor:pointer !important; }

label{ color: rgba(35,25,45,.62) !important; }
.muted{ color: rgba(35,25,45,.60) !important; }

/* ======= Santa layer ======= */
#santaLayer{
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
}

.santa{
  position:fixed;
  left:-180px;
  top: 10vh;
  filter: drop-shadow(0 18px 22px rgba(255,79,163,.18))
          drop-shadow(0 14px 18px rgba(124,92,255,.10));
  opacity:.95;
  animation:
    santaFly 22s linear infinite,
    santaBob 1.6s ease-in-out infinite;
}

.santaPixel{
  top: 22vh;
  opacity: .82;
  animation-duration: 28s, 1.2s;
  transform: translateZ(0);
}
.santaPixel svg{ image-rendering: pixelated; }

body[data-santa="pixel"] .santaChibi{ display:none; }
body:not([data-santa="pixel"]) .santaPixel{ display:none; }

@keyframes santaFly{
  0%   { transform: translateX(-220px) translateY(0) rotate(-2deg) scale(.95); }
  100% { transform: translateX(calc(100vw + 260px)) translateY(-40px) rotate(2deg) scale(1.02); }
}
@keyframes santaBob{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
}

.loginShell{
  display:flex;
  flex-direction:column;
  gap: 24px;
}

.loginIntro{
  display:flex;
  flex-direction:column;
  gap: 8px;
  text-align:center;
}

.loginEyebrow{
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(27,27,31,.36);
}

.loginGrid{
  display:grid;
  grid-template-columns: minmax(0, 520px);
  justify-content:center;
  margin-top: 10px;
}

.loginCard{
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.68);
  padding: 18px;
  box-shadow: var(--shadow2);
}

.loginBtn{
  width:100%;
  margin-top: 14px;
}

.boardComposer{
  border-radius: var(--radius2);
  border: 1px solid rgba(27,27,31,.10);
  background: rgba(255,255,255,.64);
  padding: 14px;
  margin-top: 8px;
  box-shadow: var(--shadow2);
}

.boardItem{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.threadRoot + .threadRoot{
  margin-top: 12px;
}

.threadNode{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.threadNode.isChild > .item{
  background: rgba(255,255,255,.60);
}

.replyList{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 12px;
  padding-left: 18px;
  border-left: 2px solid rgba(255,79,163,.16);
}

.threadNode[data-depth="2"] > .item,
.threadNode[data-depth="3"] > .item,
.threadNode[data-depth="4"] > .item{
  background: rgba(255,255,255,.54);
}

.replyComposer{
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255,79,163,.22);
  background: rgba(255,255,255,.52);
}

@media (max-width: 720px){
  .replyList{
    padding-left: 12px;
  }
}

body.isLoginOnly{
  background: #ffffff;
}

body.isLoginOnly .bg,
body.isLoginOnly .topbar,
body.isLoginOnly .tabs{
  display:none !important;
}

body.isLoginOnly .page{
  min-height: 100vh;
  padding: 24px;
}

body.isLoginOnly .shell{
  width: min(380px, 100%);
  gap: 0;
}

body.isLoginOnly #viewLogin{
  padding: 0;
  border: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.isLoginOnly #viewLogin::after{
  display:none;
}

body.isLoginOnly .loginShell{
  gap: 32px;
}

body.isLoginOnly .loginIntro h1{
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .02em;
}

body.isLoginOnly .loginIntro .muted{
  margin: 0;
  color: rgba(27,27,31,.42) !important;
}

body.isLoginOnly .loginGrid{
  margin-top: 0;
  grid-template-columns: 1fr;
}

body.isLoginOnly .loginCard{
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.isLoginOnly .loginCard label{
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(27,27,31,.36) !important;
}

body.isLoginOnly .loginCard input{
  border-radius: 0;
  border: 0 !important;
  border-bottom: 1px solid rgba(27,27,31,.14) !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 14px 0;
}

body.isLoginOnly .loginCard input:focus{
  box-shadow: none !important;
  border-bottom-color: rgba(27,27,31,.55) !important;
}

body.isLoginOnly .loginBtn{
  margin-top: 22px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  box-shadow: none;
}

body.isLoginOnly .loginBtn:hover{
  filter: none;
}

body.isLoginOnly #loginHint{
  margin-top: 14px;
  text-align: center;
  color: rgba(27,27,31,.34) !important;
}
