*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root, [data-theme="dark"] {
  --bg: #1e1f22;
  --surface: #2b2d31;
  --surface2: #313338;
  --card: #383a40;
  --border: #3f4147;
  --text: #f2f3f5;
  --muted: #949ba4;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --success: #23a559;
  --warn: #f0b232;
  --danger: #f23f43;
  --hover-bg: rgba(79, 84, 92, 0.32);
  --msg-bg: #383a40;
}

[data-theme="light"] {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface2: #ffffff;
  --card: #ebedef;
  --border: #e3e5e8;
  --text: #060607;
  --muted: #5c5e66;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --success: #23a559;
  --warn: #f0b232;
  --danger: #f23f43;
  --hover-bg: rgba(116, 127, 141, 0.16);
  --msg-bg: #ebedef;
}

html, body {
  min-height: 100%;
}

body {
  font-family: "gg sans", "Noto Sans", -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input, button, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
}
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

.theme-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 1001;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.theme-fab svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
}
[data-theme="dark"] .theme-fab .icon-moon { display: none; }
[data-theme="light"] .theme-fab .icon-sun { display: none; }

.theme-btn {
  padding: .4rem .65rem;
  background: var(--card);
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
}

.toast {
  position: fixed;
  top: calc(.75rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: .65rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  z-index: 2000;
  opacity: 0;
  transition: all .25s;
  background: var(--danger);
  color: #fff;
  max-width: 90vw;
  text-align: center;
}
.toast.ok { background: var(--success); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.c0{color:#9b84ec}.c1{color:#5dadec}.c2{color:#3ba55d}
.c3{color:#faa81a}.c4{color:#ed4245}.c5{color:#00a8fc}
.c6{color:#eb459f}.c7{color:#57f287}
