:root {
  --cream: #f4e6d0;
  --ink: #1c3a38;
  --teal: #1e7a76;
  --coral: #e07a6a;
  --muted: #5a7472;
  --card: rgba(255, 250, 242, 0.94);
  --shadow: 0 8px 22px rgba(28, 58, 56, 0.12);
  --font: "Noto Sans CJK TC", "Noto Sans TC", "Source Han Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--cream); color: var(--ink); font-family: var(--font); user-select: none; -webkit-user-select: none; }
#stage { position: absolute; inset: 0; z-index: 0; touch-action: none; }
#bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
#top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 22px 0; pointer-events: none; gap: 16px; }
#top > * { pointer-events: auto; }
.brand h1 { font-size: 22px; font-weight: 800; letter-spacing: 0.01em; }
.brand p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { background: var(--card); color: var(--teal); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; box-shadow: var(--shadow); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
button { font-family: var(--font); font-weight: 700; font-size: 14px; border: none; cursor: pointer; border-radius: 999px; padding: 8px 16px; background: #fff; color: var(--ink); box-shadow: var(--shadow); border: 1px solid rgba(30,122,118,0.14); }
button:hover { transform: translateY(-1px); }
button.primary { background: var(--teal); color: #fff; border-color: transparent; }
button.coral { background: var(--coral); color: #fff; border-color: transparent; }
button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
#hint { position: absolute; top: 70px; left: 22px; z-index: 4; font-size: 12px; color: var(--muted); background: var(--card); padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); pointer-events: none; max-width: min(420px, calc(100vw - 44px)); }
#fps { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4; font-size: 11px; color: var(--muted); background: var(--card); padding: 3px 8px; border-radius: 8px; display: none; font-variant-numeric: tabular-nums; }
#fps.on { display: block; }
#toast { position: absolute; top: 88px; left: 50%; transform: translateX(-50%) translateY(-8px); z-index: 5; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bubble { position: absolute; transform: translate(-50%, -100%); background: #fffaf3; border: 2px solid var(--teal); color: var(--ink); border-radius: 16px 16px 16px 6px; padding: 7px 11px 8px; max-width: 16rem; box-shadow: var(--shadow); opacity: 0; text-align: center; line-height: 1.35; pointer-events: none; transition: opacity 0.18s ease; }
.bubble.show { opacity: 1; }
.bubble .who { display: block; font-size: 11px; color: var(--teal); font-weight: 700; margin-bottom: 2px; }
.bubble .txt { font-size: 14px; font-weight: 600; }
#loading { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--cream); font-weight: 700; color: var(--teal); pointer-events: none; opacity: 1; transition: opacity 0.35s ease; }
#loading.hide { opacity: 0; }
#credit { position: absolute; left: 22px; bottom: 16px; z-index: 4; font-size: 11px; color: var(--muted); background: var(--card); padding: 6px 10px; border-radius: 12px; box-shadow: var(--shadow); pointer-events: none; line-height: 1.4; }
@media (max-width: 640px) {
  .brand h1 { font-size: 18px; }
  #hint { top: auto; bottom: 16px; left: 12px; right: 12px; max-width: none; }
  #credit { display: none; }
  #top { padding: 12px; }
}
