:root {
  --hw-ink: #212529;
  --hw-muted: #868e96;
  --hw-line: #e9ecef;
  --hw-accent: #d6336c;
  --hw-bg: #fff;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--hw-ink); }

/* header */
.hw-top { position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--hw-line);
  backdrop-filter: blur(6px); }
.hw-brand { font-weight: 700; text-decoration: none; color: var(--hw-ink); letter-spacing: .2px; }
.hw-nav a { margin-left: 16px; text-decoration: none; color: var(--hw-muted); font-size: 14px; }
.hw-nav a:hover { color: var(--hw-ink); }
.hw-donate { color: var(--hw-accent) !important; font-weight: 600; }

/* map */
.hw-main { position: absolute; inset: 52px 0 0 0; }
#hw-map { width: 100%; height: 100%; background: #f1f3f5; }

/* pins */
.hw-pin-dot { display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px;
  box-shadow: 0 1px 4px rgba(0,0,0,.35); border: 2px solid #fff; }

/* controls (bottom-left) */
.hw-controls { position: absolute; left: 12px; bottom: 18px; z-index: 800;
  background: var(--hw-bg); border: 1px solid var(--hw-line); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 2px 10px rgba(0,0,0,.08); font-size: 13px; }
.hw-count { font-weight: 600; margin-bottom: 6px; }
.hw-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hw-filters select { font-size: 13px; }
.hw-kind { display: inline-flex; align-items: center; gap: 4px; color: var(--hw-muted); }

/* domain filter */
.hw-domain-row { margin-top: 8px; border-top: 1px solid var(--hw-line); padding-top: 8px; max-width: 340px; }
.hw-domain-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hw-domain-head span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--hw-muted); }
.hw-domain-clear { border: 0; background: none; color: var(--hw-accent); font-size: 12px; cursor: pointer; padding: 0; }
.hw-domain-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.hw-dchip { font-size: 12px; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hw-line); background: #fff; color: #495057; }
.hw-dchip:hover { border-color: #adb5bd; }
.hw-dchip.on { background: var(--hw-accent); border-color: var(--hw-accent); color: #fff; }

/* side panel */
.hw-panel { position: absolute; top: 52px; right: 0; bottom: 0; width: min(420px, 92vw);
  z-index: 900; background: var(--hw-bg); border-left: 1px solid var(--hw-line);
  box-shadow: -4px 0 16px rgba(0,0,0,.08); padding: 16px 18px 28px; overflow-y: auto; }
.hw-panel-close { position: absolute; top: 8px; right: 10px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--hw-muted); cursor: pointer; }
.hw-player video, .hw-player audio { width: 100%; border-radius: 8px; background: #000; }
.hw-player audio { background: transparent; }
.hw-audio { width: 100%; margin-top: 4px; }
.hw-audio-cover { width: 100%; height: 200px; border-radius: 8px; background: #f1f3f5 center/cover no-repeat; margin-bottom: 8px; }
.hw-loading { padding: 40px 0; text-align: center; color: var(--hw-muted); }
.hw-clip-title { margin: 14px 0 4px; font-size: 19px; }
.hw-clip-meta { margin: 0 0 10px; color: var(--hw-muted); font-size: 13px; }
.hw-clip-summary { font-size: 15px; line-height: 1.5; }
.hw-transcript { margin-top: 14px; border-top: 1px solid var(--hw-line); padding-top: 10px; }
.hw-transcript summary { cursor: pointer; color: var(--hw-accent); font-weight: 600; font-size: 14px; }
.hw-transcript-body { margin-top: 8px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: #495057; }

/* live subtitle line (under the player) */
.hw-live { margin: 10px 0 2px; padding: 10px 12px; background: #f1f3f5; border-radius: 8px;
  font-size: 15px; line-height: 1.45; color: var(--hw-ink); min-height: 1.2em; }

/* GNH domain tags */
.hw-domains { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.hw-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #edf2ff; color: #3b5bdb; }

/* synced cue transcript (click a line to seek; active line highlights) */
.hw-cues { margin-top: 6px; max-height: 280px; overflow-y: auto; }
.hw-cue { font-size: 14px; line-height: 1.5; color: #868e96; padding: 3px 6px; border-radius: 6px; cursor: pointer; }
.hw-cue:hover { background: #f8f9fa; }
.hw-cue.on { color: var(--hw-ink); background: #fff0f6; }
.hw-spk { font-size: 11px; font-weight: 700; color: var(--hw-accent); text-transform: uppercase; letter-spacing: .3px; }
/* per-word karaoke highlight */
.hw-w { cursor: pointer; transition: color .08s; }
.hw-w:hover { text-decoration: underline; }
.hw-w.onw { color: var(--hw-accent); font-weight: 600; }

/* about */
.hw-about { max-width: 680px; margin: 80px auto 40px; padding: 0 20px; line-height: 1.6; }
.hw-about h1 { font-size: 28px; }
.hw-about a { color: var(--hw-accent); }
