:root {
  --bg: #131722;
  --surface: #1b2130;
  --surface-2: #222a3c;
  --surface-3: #2a344a;
  --border: #2f3b54;
  --text: #e6edf3;
  --muted: #9aa8be;
  --accent: #60a5fa;
  --gold: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --purple: #a78bfa;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html[data-theme='light'] {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #edeae0;
  --surface-3: #e2dfd3;
  --border: #d4d0c3;
  --text: #1e293b;
  --muted: #526075;
  --accent: #0284c7;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

.ico {
  width: 1.05em;
  height: 1.05em;
  display: inline-block;
  vertical-align: -0.16em;
  flex-shrink: 0;
}

/* Sticky Top Command Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top-row-1 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.brand-pill {
  font-weight: 700;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  white-space: nowrap;
  direction: ltr;
}

.search-wrap {
  flex: 1 1 200px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 32px;
  font-size: 13.5px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-icon {
  position: absolute;
  inset-inline-start: 10px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.7;
}

.search-clear {
  position: absolute;
  inset-inline-end: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 2px 6px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.icon-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.count-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0 5px;
  border-radius: 99px;
  font-size: 11px;
}

.view-seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.view-seg button {
  padding: 5px 9px;
  font-size: 12.5px;
  font-weight: 600;
}

.view-seg button.active {
  background: var(--accent);
  color: #fff;
}

.top-row-2 {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-row-2::-webkit-scrollbar {
  display: none;
}

.stat-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.stat-tab.active {
  background: var(--surface-3);
  border-color: var(--accent);
  color: var(--accent);
}

.stat-tab b {
  font-size: 11.5px;
  opacity: 0.85;
}

.mode-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}

.mode-toggle button {
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--surface-2);
}

.mode-toggle button.active[data-fmode='inc'] {
  background: var(--green);
  color: #06281e;
}

.mode-toggle button.active[data-fmode='exc'] {
  background: var(--red);
  color: #fff;
}

.divider-v {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
}

.sort-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.active-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 5px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.active-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.active-chips:empty {
  display: none;
}

.active-end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}

.active-chip.inc {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid var(--green);
}

.active-chip.exc {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid var(--red);
}

.bulk-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bulk-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 600;
}

/* Main Workspace */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.workspace.mode-split {
  grid-template-columns: minmax(300px, 33%) 1fr;
}

.workspace.mode-list .map-pane {
  display: none;
}

.workspace.mode-map .list-pane {
  display: none;
}

.list-pane {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-pane {
  position: relative;
  min-height: 0;
  border-inline-start: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 1020px) {
  .workspace.mode-split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(160px, 38dvh) 1fr;
  }

  .workspace.mode-split .map-pane {
    order: -1;
    border-inline-start: none;
    border-bottom: 1px solid var(--border);
  }
}

/* Feather-Light Project Card */
.card {
  contain: layout style;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card.is-fav {
  border-inline-start: 3px solid var(--gold);
}

.card.is-vis {
  border-inline-start: 3px solid var(--green);
}

.card.is-fav.is-vis {
  border-inline-start: 3px solid #14b8a6;
}

.card.is-ignored {
  opacity: 0.62;
  border-style: dashed;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.badge-table {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: var(--accent);
}

.badge-table.is-me {
  background: rgba(167, 139, 250, 0.24);
  border-color: var(--purple);
  color: #ddd6fe;
}

.badge-cat {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.badge-cat.c1 {
  background: rgba(251, 113, 133, 0.15);
  color: #fda4af;
}

.badge-cat.c2 {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

.badge-cat.c3 {
  background: rgba(129, 140, 248, 0.16);
  color: #a5b4fc;
}

.badge-cat.c4 {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

html[data-theme='light'] .badge-cat.c1 {
  color: #be123c;
}

html[data-theme='light'] .badge-cat.c2 {
  color: #0369a1;
}

html[data-theme='light'] .badge-cat.c3 {
  color: #4338ca;
}

html[data-theme='light'] .badge-cat.c4 {
  color: #b45309;
}

.badge-path {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.badge-mini {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}

.badge-match {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

html[data-theme='light'] .badge-match {
  color: #047857;
}

.card-quick-ops {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.act-btn {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13.5px;
  font-weight: 700;
}

.act-btn.fav.on {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold);
  color: var(--gold);
}

.act-btn.vis.on {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--green);
  color: var(--green);
}

.act-btn.ign.on {
  background: rgba(239, 68, 68, 0.22);
  border-color: var(--red);
  color: var(--red);
}

.card-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.card-desc.expanded {
  -webkit-line-clamp: unset;
  color: var(--text);
}

.card-rate-bar,
.members-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.stars-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  direction: ltr;
}

.star-btn {
  font-size: 17px;
  color: var(--surface-3);
  padding: 0 3px;
}

html[data-theme='light'] .star-btn {
  color: #cbd5e1;
}

.star-btn.on {
  color: var(--gold);
}

.tag-pill {
  font-size: 12.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  opacity: 0.78;
}

.tag-pill.on {
  opacity: 1;
  background: rgba(96, 165, 250, 0.2);
  border-color: var(--accent);
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.member-chip.met {
  border-color: var(--green);
  background: rgba(16, 185, 129, 0.16);
}

.note-preview {
  font-size: 12.5px;
  color: var(--accent);
  background: var(--surface-2);
  border-radius: 7px;
  padding: 4px 8px;
  cursor: pointer;
}

.pager-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 0 10px;
  direction: ltr;
  flex-shrink: 0;
}

.pager-bar .load-more-btn {
  padding: 7px 14px;
}

.pager-bar .load-more-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pager-info {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 0 8px;
}

.load-more-btn {
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 13.5px;
}

/* Docked Bottom Edge-Arrow Filter & Status Drawer (never overlaps list cards or pager) */
.bottom-drawer {
  position: relative;
  flex-shrink: 0;
  z-index: 45;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 10px max(5px, env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.22);
}

.drawer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.drawer-panel {
  width: min(100%, 860px);
  max-height: 40dvh;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-panel .active-bar {
  background: transparent;
  border-bottom: none;
  padding: 2px 2px 0;
}

/* Rebuilt Map (Full-Viewport Map + Collapsible Floating Controls Tray) */
.map-tray {
  position: relative;
  z-index: 12;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.map-tray-btn {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 700;
}

.map-tray-body {
  display: flex;
  flex-direction: column;
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  padding-inline-start: 62px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.map-seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.map-seg button,
.map-zoom-btns button,
.chip-btn {
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 700;
  min-width: 32px;
}

.map-seg button.active,
.chip-btn.active {
  background: var(--accent);
  color: #fff;
}

.map-toggles,
.map-zoom-btns {
  display: inline-flex;
  gap: 4px;
}

.chip-btn,
.map-zoom-btns button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.map-zoom-btns {
  margin-inline-start: auto;
}

.map-zone-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.map-zone-strip::-webkit-scrollbar {
  display: none;
}

.zjump-btn {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.zjump-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.zjump-btn.active sub {
  color: #fff;
}

.zjump-btn sub {
  font-size: 10px;
  color: var(--accent);
  margin-inline-start: 2px;
}

.zjump-btn:not(.has-matches) {
  opacity: 0.45;
}

.map-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.canvas-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  direction: ltr;
  display: block;
}

.hall-canvas {
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

.official-map-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fafafa;
}

/* Native 120fps Zone Booth Grid */
.zone-grid-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.zgrid-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  direction: ltr;
}

.zgrid-rows {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  direction: ltr;
  padding: 10px;
}

.zgrid-inner {
  width: max-content;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zrow {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
}

.zrow.aisle-after {
  margin-bottom: 14px;
}

.zrow-lbl {
  width: 26px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.zrow-cells {
  display: flex;
  gap: 4px;
}

.ztile {
  width: 48px;
  height: 46px;
  padding: 2px;
  flex-shrink: 0;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  line-height: 1.1;
  border: 1.5px solid transparent;
}

.ztile i {
  font-style: normal;
  font-size: 9.5px;
  color: #fef08a;
  margin-top: 2px;
}

.ztile.dim {
  opacity: 0.2;
}

.ztile.ign {
  opacity: 0.14;
  text-decoration: line-through;
}

.ztile.empty,
.ztile.hidden-slot {
  background: transparent;
  border: 1px dashed var(--border);
  opacity: 0.2;
  pointer-events: none;
}

.ztile.is-me {
  border-color: #f5d0fe;
  box-shadow: 0 0 0 2px #a855f7;
}

.ztile.selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2.5px var(--accent);
  transform: scale(1.06);
}

html[data-theme='light'] .ztile.selected {
  border-color: #0f172a;
}

.map-legend {
  position: absolute;
  bottom: 8px;
  inset-inline-start: 8px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.92;
}

.leg-i {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.leg-i i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.map-inspector {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: min(340px, calc(100% - 16px));
  max-height: calc(100% - 16px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 25;
}

@media (max-width: 640px) {
  .map-inspector {
    top: 8px;
    inset-inline: 8px;
    width: auto;
  }
}

.insp-switch {
  display: flex;
  gap: 4px;
}

.insp-switch button {
  flex: 1;
  padding: 4px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
}

.insp-switch button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.insp-head {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.insp-close {
  margin-inline-start: auto;
  padding: 2px 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.insp-title {
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.insp-actions,
.insp-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.insp-note {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 12.5px;
}

.map-route-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.route-pill {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  white-space: nowrap;
  direction: ltr;
}

.route-pill.start {
  border-color: var(--purple);
  color: var(--purple);
}

/* Centered Modals */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 12, 22, 0.78);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  overflow-y: auto;
}

.modal {
  width: min(740px, 100%);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.modal-head h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.modal-close {
  margin-inline-start: auto;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sec-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.fchip.inc {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--green);
}

.fchip.exc {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
  text-decoration: line-through;
}

.kw-row {
  display: flex;
  gap: 6px;
}

.kw-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}

.btn-primary {
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.btn-danger {
  padding: 7px 13px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--red);
  color: #fca5a5;
  font-weight: 700;
  font-size: 13px;
}

.sub-ratings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sub-rate-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}

.detail-desc {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: var(--surface-2);
  padding: 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.detail-members {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
}

.detail-member-row a {
  margin-inline-start: auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.guide-sub {
  font-size: 13px;
  color: var(--muted);
  margin: -4px 0 6px;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.45;
}

.guide-step .ico {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 6px;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
}

.guide-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--chip);
  color: var(--text);
  flex-shrink: 0;
}

.guide-swatch {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.guide-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.welcome-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid var(--gold);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.welcome-notice .ico {
  color: var(--gold);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.welcome-notice strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 3px;
  color: var(--gold);
}

.btn-tweet-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d9bf0, #0284c7);
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 20px rgba(29, 155, 240, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-tweet-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.tweet-embed-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.tweet-embed-wrap .twitter-tweet {
  width: 100% !important;
  max-width: 550px !important;
  margin: 0 auto !important;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
}

.tweet-embed-wrap .twitter-tweet a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
