:root {
  --page: #c3beeb;
  --paper: #fff0db;
  --surface: #ecdef3;
  --ink: #302e4e;
  --muted: #504e71;
  --line: #bbaccb;
  --accent: #55417f;
  --accent-soft: #dfd3f3;
  --primary: #ffb487;
  --primary-edge: #af7156;
  --primary-ink: #462c28;
  --danger: #983d52;
  --sky: #1b2543;
  --sky-light: #344573;
  --sky-line: #516485;
  --moon: #ffdaaa;
  --dialog-face: repeating-linear-gradient(128deg, #8fcabe 0 8px, #ffefda 8px 16px) top / 100% 6px no-repeat,
    linear-gradient(155deg, #c8e9db, #fae8d8 45%, #efdbec);
  --type: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--page);
  overflow: hidden;
  overscroll-behavior: none;
}
canvas {
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.collect-stars-toast {
  position: fixed;
  left: 50%;
  bottom: calc(68px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--sky);
  color: var(--paper);
  font: 14px/1.45 "PingFang SC", "Noto Sans SC", sans-serif;
  text-align: center;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(20, 10, 40, 0.28);
}

.collect-stars-toast, #account-note { border-inline-start: 4px solid var(--primary); }
#text-wish:not([open]) { display: none; }
#text-wish {
  box-sizing: border-box;
  width: min(335px, calc(100% - 40px));
  max-height: calc(100% - 24px);
  padding: 24px 22px 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--dialog-face);
  box-shadow: 0 4px 0 #9aa8ba;
  color: var(--ink);
  font: 15px/1.4 var(--type);
}
#text-wish::backdrop { background: rgba(34,51,83,.43); }
#text-wish h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 20px; }
#text-wish h2::before {
  content: '✦';
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--accent);
  background: #f2b7bc;
  font-size: 19px;
}
#text-wish label { display: block; color: var(--muted); font-weight: 600; }
#text-wish input {
  box-sizing: border-box; width: 100%; margin: 6px 0 14px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid #9daccc; color: inherit; background: #fff; font: inherit; font-size: 16px;
}
#text-wish button {
  display: block; width: min(100%, 220px); min-height: 46px; margin: 9px auto 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 2px 0 var(--line);
  color: var(--accent); font: 700 15px/1.4 var(--type); cursor: pointer;
}
#text-wish button[value="make"] {
  color: white; border-color: #644780; background: #805591; box-shadow: 0 2px 0 #644780;
}
#text-wish :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
