:root {
  --bg: #0b1016; --panel: rgba(13, 19, 27, 0.94); --line: #233041; --text: #e6edf5; --muted: #8fa1b5;
  --accent: #39d98a; --accent2: #4cb3ff; --warn: #ffb347; --bad: #ff6b6b; --raid: #ff4fd8;
  --radius: 10px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --panel: rgba(250, 252, 255, 0.96); --line: #d3dce6; --text: #10202e; --muted: #50657a; }
}
.awcw-top, .awcw-panel, .awcw-modal, .awcw-toast { font: 14px/1.45 var(--font); color: var(--text); }
.awcw-top { position: fixed; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--panel); border-bottom: 1px solid var(--line); z-index: 1000; backdrop-filter: blur(6px); }
.awcw-brand { font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; margin-right: 6px; }
.awcw-brand b { color: var(--accent); }
.awcw-top nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.awcw-top nav::-webkit-scrollbar { display: none; }
.awcw-btn { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font: inherit; white-space: nowrap; }
.awcw-btn:hover { border-color: var(--accent2); }
.awcw-btn.on { background: var(--accent2); color: #001018; border-color: var(--accent2); }
.awcw-btn.primary { background: var(--accent); color: #00140a; border-color: var(--accent); font-weight: 600; }
.awcw-btn.raid { border-color: var(--raid); color: var(--raid); }
.awcw-btn:disabled { opacity: 0.5; cursor: default; }
.awcw-me { white-space: nowrap; color: var(--muted); }
.awcw-panel { position: fixed; top: 56px; right: 0; bottom: 0; width: 380px; max-width: 100vw; background: var(--panel); border-left: 1px solid var(--line);
  z-index: 999; display: none; flex-direction: column; }
.awcw-panel.open { display: flex; }
.awcw-panel header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.awcw-panel header h2 { margin: 0; font-size: 16px; }
.awcw-panel .body { padding: 12px 14px; overflow-y: auto; flex: 1; }
.awcw-panel h3 { font-size: 14px; margin: 14px 0 6px; }
.awcw-muted { color: var(--muted); font-size: 13px; }
.awcw-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 8px 0; }
.awcw-card a { color: var(--accent2); }
.awcw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.awcw-list { list-style: none; padding: 0; margin: 0; }
.awcw-list li { padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.awcw-list li:hover { color: var(--accent2); }
.awcw-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: 4px; }
.awcw-tag.new { color: var(--accent); border-color: var(--accent); }
.awcw-tag.raised { color: var(--warn); border-color: var(--warn); }
input.awcw-in, select.awcw-in, textarea.awcw-in { width: 100%; box-sizing: border-box; background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; font: inherit; margin: 4px 0 8px; }
textarea.awcw-in { min-height: 90px; resize: vertical; }
label.awcw-check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 13px; }
.awcw-chat { display: flex; flex-direction: column; height: 100%; }
.awcw-msgs { flex: 1; overflow-y: auto; font-size: 13px; }
.awcw-msgs .m { padding: 3px 0; word-wrap: break-word; }
.awcw-msgs .m b { color: var(--accent2); }
.awcw-msgs .m.agent b { color: var(--accent); }
.awcw-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.awcw-modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 440px; padding: 18px; max-height: 90vh; overflow-y: auto; }
.awcw-modal h2 { margin: 0 0 8px; }
.awcw-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; z-index: 1200; max-width: 90vw; }
.awcw-toast.bad { border-color: var(--bad); }
.awcw-swatches { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.awcw-swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.awcw-swatches button.on { border-color: var(--text); }
.awcw-scoreboard { position: fixed; left: 12px; top: 68px; z-index: 998; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  font: 13px/1.3 var(--font); color: var(--text); }
.awcw-scoreboard b { color: var(--accent); font-size: 16px; }
@media (max-width: 640px) {
  .awcw-brand span { display: none; }
  .awcw-panel { width: 100vw; }
  .awcw-scoreboard { display: none; }
}
