/* ==========================================================================
   Nakamas Bot — One Piece Web Games & Character AI Styles
   Inherits all live Dashboard CSS variables (--bg, --surface, --surface-2,
   --surface-3, --border, --accent, --text, --muted, --radius).
   ========================================================================== */

/* ---------- Shared One Piece Accent Touches ---------- */
.op-banner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 160, 23, 0.35);
  background:
    radial-gradient(circle at 12% 50%, rgba(212, 160, 23, 0.14), transparent 45%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

/* ==================== ONEPIECEDLE (onepiecedle.net layout) ==================== */
.opd-shell {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.opd-hero {
  text-align: center;
  padding: 20px 18px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 160, 23, 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 160, 23, 0.18), transparent 60%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  position: relative;
}

.opd-logo-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fde047;
  text-shadow: 0 2px 12px rgba(212, 160, 23, 0.35);
  margin: 0;
}

.opd-logo-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 14px;
}

.opd-top-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.opd-seg-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}

.opd-seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.opd-seg-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.opd-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* 4 Iconic Mode Medallions (Classic / Devil Fruit / Wanted / Laugh) */
.opd-modes-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.opd-mode-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 112px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.opd-mode-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.opd-mode-btn.active {
  border-color: #facc15;
  background: linear-gradient(180deg, rgba(212, 160, 23, 0.18), var(--surface));
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.22);
}

.opd-mode-icon {
  font-size: 24px;
  line-height: 1;
}

.opd-mode-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.opd-mode-check {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Stats & RPG Knowledge Buff Ribbon */
.opd-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}

.opd-stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.opd-stat-pill .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.opd-stat-pill .val {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.opd-buff-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
}

.opd-buff-banner.active {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.09);
}

/* Clue / Wanted Poster Prompt Box */
.opd-clue-box {
  border-radius: 14px;
  border: 1px solid rgba(212, 160, 23, 0.4);
  background:
    radial-gradient(circle at 80% 20%, rgba(212, 160, 23, 0.1), transparent 55%),
    var(--surface);
  padding: 16px 20px;
  text-align: center;
}

.opd-clue-box.bounty {
  background:
    linear-gradient(135deg, rgba(217, 179, 108, 0.14), rgba(146, 64, 14, 0.12)),
    var(--surface);
  border: 2px dashed rgba(212, 160, 23, 0.6);
}

.opd-clue-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #facc15;
  font-weight: 800;
}

.opd-clue-main {
  font-size: 22px;
  font-weight: 900;
  margin: 6px 0 4px;
  color: var(--text);
}

.opd-clue-sub {
  font-size: 13px;
  color: var(--muted);
}

.opd-hints-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.opd-hint-item {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
}

/* Autocomplete Guess Bar */
.opd-guess-bar {
  position: relative;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.opd-guess-input-row {
  display: flex;
  gap: 8px;
}

.opd-guess-input {
  flex: 1;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.opd-guess-input:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
}

.opd-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  z-index: 40;
}

.opd-sugg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 13.5px;
}

.opd-sugg-item:hover,
.opd-sugg-item.active {
  background: rgba(250, 204, 21, 0.14);
}

.opd-char-pic {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: var(--surface-3);
  flex-shrink: 0;
}

.opd-char-pic-fallback {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-3), var(--surface));
  color: #fde047;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.opd-tile.char-col {
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 8px;
  text-align: left;
}

/* 9-Column Animated Color-Coded Wordle Grid */
.opd-grid-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.opd-grid {
  min-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opd-grid-head,
.opd-grid-row {
  display: grid;
  grid-template-columns: 1.55fr 0.72fr 1.35fr 1.05fr 0.78fr 0.95fr 0.8fr 0.95fr 1.05fr;
  gap: 7px;
}

.opd-grid-head div {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 2px 6px;
  border-bottom: 2px solid var(--border);
}

.opd-tile {
  position: relative;
  min-height: 74px;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  word-break: break-word;
}

.opd-tile.animate-flip {
  animation: opdFlipIn 0.48s cubic-bezier(0.22, 0.8, 0.36, 1) both;
}

@keyframes opdFlipIn {
  0% { transform: rotateX(-90deg) scale(0.92); opacity: 0; }
  100% { transform: rotateX(0deg) scale(1); opacity: 1; }
}

.opd-tile.neutral { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.opd-tile.exact   { background: linear-gradient(180deg, #16a34a, #15803d); border-color: #4ade80; }
.opd-tile.partial { background: linear-gradient(180deg, #ca8a04, #a16207); border-color: #fde047; }
.opd-tile.miss    { background: linear-gradient(180deg, #b91c1c, #7f1d1d); border-color: #f87171; }
.opd-tile.higher  { background: linear-gradient(180deg, #c2410c, #991b1b); border-color: #fb923c; }
.opd-tile.lower   { background: linear-gradient(180deg, #991b1b, #1d4ed8); border-color: #60a5fa; }

.opd-tile-arrow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 46px;
  opacity: 0.24;
  pointer-events: none;
  user-select: none;
}

.opd-tile-val {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  line-height: 1.2;
}

.opd-tile-dir {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.92;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.opd-victory-card {
  border-radius: 14px;
  border: 2px solid #22c55e;
  background: radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.2), transparent 65%), var(--surface);
  padding: 20px;
  text-align: center;
}

.opd-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
}

.opd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.opd-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

/* ==================== ONE PIECE RPG WEB HUD ==================== */
.rpg-hud-card {
  border-radius: var(--radius);
  border: 1px solid rgba(212, 160, 23, 0.42);
  background:
    radial-gradient(circle at 8% 30%, rgba(212, 160, 23, 0.14), transparent 45%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.rpg-hud-avatar {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  border: 2px solid #facc15;
  object-fit: cover;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
}

.rpg-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rpg-stat-chip {
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
}

.rpg-action-log {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.rpg-log-entry {
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  line-height: 1.45;
  white-space: pre-wrap;
}

.rpg-log-entry.win { border-left-color: #22c55e; }
.rpg-log-entry.loss { border-left-color: #ef4444; }
.rpg-log-entry.fruit { border-left-color: #a855f7; }

.rpg-drawer {
  border-radius: var(--radius);
  border: 1px solid rgba(212, 160, 23, 0.4);
  background: var(--surface);
  padding: 16px;
  margin-top: 12px;
}

.rpg-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.rpg-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
}

.rpg-stat-alloc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.rpg-stat-alloc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rpg-stat-alloc-val {
  font-size: 20px;
  font-weight: 900;
  color: #facc15;
}

.rpg-stat-alloc-btns {
  display: flex;
  gap: 6px;
}

.opd-wanted-poster-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.opd-wanted-poster-img {
  width: 240px;
  max-width: 100%;
  border-radius: 10px;
  border: 2px solid #8b6534;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  background: #dfc896;
}

.opd-laugh-player {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(15, 17, 23, 0.65);
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.opd-laugh-player audio {
  height: 34px;
  max-width: 240px;
}

.opd-victory-avatar {
  width: 82px;
  height: 82px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid #facc15;
  margin-bottom: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* ==================== CHARACTER.AI 3-COLUMN WORKSPACE ==================== */
.cai-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 265px;
  gap: 0;
  height: calc(100vh - 150px);
  min-height: 580px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

/* Left Sidebar (exact character.ai left rail) */
.cai-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  gap: 10px;
  min-height: 0;
}

.cai-brand {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  color: var(--text);
}

.cai-brand span.gold {
  color: #facc15;
}

.cai-nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease;
}

.cai-nav-btn:hover { background: var(--surface-2); }
.cai-nav-btn.primary {
  background: var(--surface-2);
  border-color: var(--border);
  justify-content: center;
  border-radius: 999px;
}
.cai-nav-btn.active {
  background: rgba(212, 160, 23, 0.16);
  border-color: rgba(212, 160, 23, 0.45);
}

.cai-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
}

.cai-recent-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 6px 0;
}

.cai-recent-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cai-char-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.cai-char-row:hover { background: var(--surface-2); }
.cai-char-row.active {
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent);
}

.cai-char-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.cai-char-avatar.lg {
  width: 72px;
  height: 72px;
  border-width: 2px;
  border-color: #facc15;
}

.cai-char-avatar.md {
  width: 48px;
  height: 48px;
}

/* Center Chat & Discover Pane */
.cai-center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 160, 23, 0.05), transparent 55%),
    var(--surface);
}

.cai-discover-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cai-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cai-filter-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

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

.cai-discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.cai-discover-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.cai-discover-card:hover {
  transform: translateY(-2px);
  border-color: #facc15;
}

/* Authentic Character.ai Active Chat View */
.cai-chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cai-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 26px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cai-chat-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cai-chat-hero h3 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.cai-chat-hero .sub {
  font-size: 12px;
  color: var(--muted);
}

.cai-msg {
  display: flex;
  gap: 11px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.cai-msg.user {
  flex-direction: row-reverse;
}

.cai-msg-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 78%;
}

.cai-msg.user .cai-msg-body {
  align-items: flex-end;
}

.cai-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.cai-ai-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--border);
}

.cai-bubble {
  padding: 12px 15px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.cai-msg.user .cai-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: #fff;
  border-bottom-right-radius: 5px;
}

.cai-msg.assistant .cai-bubble {
  border-top-left-radius: 5px;
}

.cai-msg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cai-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: all 0.12s ease;
}

.cai-icon-btn:hover,
.cai-icon-btn.active {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
}

/* Bottom Pill Composer (exact character.ai style) */
.cai-composer-wrap {
  padding: 10px 24px 14px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.cai-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  transition: border-color 0.15s ease;
}

.cai-composer:focus-within {
  border-color: #facc15;
}

.cai-composer input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
  padding: 6px 0;
}

.cai-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f8fafc;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.cai-send-btn:hover { transform: scale(1.06); }
.cai-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.cai-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* Right Character Drawer (matching character.ai right panel) */
.cai-right {
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.cai-right-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cai-right-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.cai-right-item label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.cai-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 2px;
}
.cai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: caiBounce 1.1s infinite ease-in-out;
}
.cai-typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.cai-typing-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes caiBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 1100px) {
  .cai-workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .cai-right {
    display: none;
  }
  .rpg-hud-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cai-workspace {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cai-sidebar {
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}
