/* ==========================================================================
 * Panel Component Styles
 * Extracted from inline styles in panel partials for better maintainability
 * ========================================================================== */

/* Equipment Browser Panel
 * ========================================================================== */
/* Equipment Browser Styles */
.equipment-browser-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary, #1a1a2e);
  color: var(--text-primary, #e0e0e0);
}

/* Header / Search */
.eb-header {
  padding: 10px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
}

.eb-search {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 13px;
}

.eb-search:focus {
  outline: none;
  border-color: var(--accent-primary, #4a9eff);
}

.eb-search::placeholder {
  color: var(--text-muted, #666);
}

/* Categories */
.eb-categories {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
  overflow-x: auto;
}

.eb-cat-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  background: transparent;
  color: var(--text-secondary, #888);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.eb-cat-btn:hover {
  background: var(--bg-hover, #2a2a4a);
  color: var(--text-primary, #e0e0e0);
}

.eb-cat-btn.eb-cat-active {
  background: var(--accent-primary, #4a9eff);
  color: #fff;
}

/* Items List */
.eb-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.eb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted, #666);
  text-align: center;
  padding: 24px;
}

.eb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.eb-item:hover {
  background: var(--bg-hover, #2a2a4a);
  border-color: var(--accent-primary, #4a9eff);
}

.eb-item--selected {
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--accent-success, #4ade80);
}

.eb-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--text-secondary, #888);
}

.eb-item-info {
  flex: 1;
  min-width: 0;
}

.eb-item-name {
  font-weight: 500;
  font-size: 13px;
}

.eb-item-desc {
  font-size: 11px;
  color: var(--text-secondary, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-item-cost {
  font-size: 12px;
  color: var(--accent-warning, #fbbf24);
  font-weight: 500;
}

.eb-item-check {
  width: 20px;
  color: var(--accent-success, #4ade80);
}

.eb-svg {
  width: 18px;
  height: 18px;
}

.eb-check {
  width: 16px;
  height: 16px;
}

/* Footer / Cart */
.eb-footer {
  border-top: 1px solid var(--border-color, #3a3a5a);
  padding: 10px;
}

.eb-cart {
  max-height: 100px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.eb-cart-empty {
  text-align: center;
  color: var(--text-muted, #666);
  font-size: 12px;
  padding: 8px;
}

.eb-cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: var(--bg-secondary, #252545);
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 12px;
}

.eb-cart-item-name {
  flex: 1;
}

.eb-cart-item-cost {
  color: var(--accent-warning, #fbbf24);
}

.eb-cart-remove {
  background: none;
  border: none;
  color: var(--text-muted, #666);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
}

.eb-cart-remove:hover {
  color: var(--accent-danger, #f87171);
}

/* Actions */
.eb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.eb-total {
  font-size: 13px;
}

.eb-total-label {
  color: var(--text-secondary, #888);
}

.eb-total-amount {
  font-weight: 600;
  color: var(--accent-warning, #fbbf24);
}

.eb-confirm {
  padding: 8px 16px;
  background: var(--accent-primary, #4a9eff);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.eb-confirm:hover:not(:disabled) {
  background: #3a8eef;
}

.eb-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Warning Toast */
.eb-warning {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: var(--accent-danger, #f87171);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  animation: ebFadeIn 0.2s ease;
}

@keyframes ebFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Scrollbar */
.eb-items::-webkit-scrollbar,
.eb-cart::-webkit-scrollbar {
  width: 6px;
}

.eb-items::-webkit-scrollbar-track,
.eb-cart::-webkit-scrollbar-track {
  background: transparent;
}

.eb-items::-webkit-scrollbar-thumb,
.eb-cart::-webkit-scrollbar-thumb {
  background: var(--border-color, #3a3a5a);
  border-radius: 3px;
}

/* Gold-Buy Mode Styles
 * ========================================================================== */

.eb-budget-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--bg-secondary, #252540), var(--bg-tertiary, #2a2a4a));
  border: 1px solid var(--accent-warning, #fbbf24);
  border-radius: 6px;
  margin-bottom: 10px;
}

.eb-budget-label {
  font-size: 12px;
  color: var(--text-secondary, #888);
}

.eb-budget-remaining {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-warning, #fbbf24);
}

.eb-budget--low {
  color: var(--accent-danger, #f87171);
}

.eb-category-filters {
  display: flex;
  gap: 6px;
  padding: 8px 0;
  overflow-x: auto;
  flex-wrap: wrap;
}

.eb-category-btn {
  padding: 6px 12px;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 4px;
  color: var(--text-secondary, #888);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-category-btn:hover {
  background: var(--bg-hover, #3a3a5a);
  color: var(--text-primary, #e0e0e0);
}

.eb-category-btn--active {
  background: var(--accent-primary, #4a9eff);
  border-color: var(--accent-primary, #4a9eff);
  color: #fff;
}

.eb-item-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 0;
  max-height: 400px;
  overflow-y: auto;
}

.eb-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-secondary, #252540);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.eb-item-card:hover {
  border-color: var(--accent-primary, #4a9eff);
  background: var(--bg-tertiary, #2a2a4a);
}

.eb-item-card--unaffordable {
  opacity: 0.5;
}

.eb-item-card--unaffordable:hover {
  border-color: var(--border-color, #3a3a5a);
  background: var(--bg-secondary, #252540);
}

.eb-item-info {
  flex: 1;
  min-width: 0;
}

.eb-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 2px;
}

.eb-item-type {
  font-size: 11px;
  color: var(--text-muted, #666);
  text-transform: capitalize;
}

.eb-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eb-item-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-warning, #fbbf24);
}

.eb-add-btn {
  padding: 6px 12px;
  background: var(--accent-primary, #4a9eff);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-add-btn:hover:not(:disabled) {
  background: #3a8eef;
}

.eb-add-btn--disabled {
  background: var(--bg-tertiary, #2a2a4a);
  color: var(--text-muted, #666);
  cursor: not-allowed;
}

.eb-add-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.eb-add-btn.eb-loading {
  pointer-events: none;
  opacity: 0.7;
}

.eb-items-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: var(--text-muted, #666);
}

.eb-items-empty-hint {
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.7;
}

.eb-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--bg-secondary, #252540);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 13px;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.eb-notification--success {
  border-color: var(--accent-success, #4ade80);
  background: rgba(74, 222, 128, 0.1);
}

.eb-notification--error {
  border-color: var(--accent-danger, #f87171);
  background: rgba(248, 113, 113, 0.1);
}

.eb-notification--fade {
  opacity: 0;
}

/* Inline Cart for Gold-Buy Mode (embedded in equipment browser)
 * ========================================================================== */
.eb-inline-cart {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-tertiary, #1a1a2e);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 8px;
}

.eb-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
  margin-bottom: 10px;
}

.eb-cart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.eb-cart-total {
  font-size: 12px;
  color: var(--accent-warning, #fbbf24);
  font-weight: 500;
}

.eb-cart-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.eb-cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg-secondary, #252540);
  border-radius: 4px;
}

.eb-cart-item-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
}

.eb-cart-item-qty {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.eb-cart-item-price {
  font-size: 12px;
  color: var(--accent-warning, #fbbf24);
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

.eb-cart-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 4px;
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
}

.eb-cart-remove:hover {
  background: var(--accent-danger, #f87171);
  border-color: var(--accent-danger, #f87171);
  color: #fff;
}

.eb-cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #3a3a5a);
  margin-top: 10px;
}

.eb-cart-remaining {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}

.eb-cart-confirm {
  padding: 8px 16px;
  background: var(--accent-success, #4ade80);
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-cart-confirm:hover:not(:disabled) {
  background: #22c55e;
}

.eb-cart-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.eb-cart-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted, #666);
  font-size: 13px;
}

.eb-cart-empty p {
  margin: 0;
}

/* Equipment Modal (Gold-Buy Mode)
 * ========================================================================== */

@keyframes equipmentModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes equipmentModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.equipment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: equipmentModalFadeIn 0.2s ease;
}

.equipment-modal-overlay--closing {
  animation: equipmentModalFadeIn 0.2s ease reverse;
}

.equipment-modal {
  width: 90vw;
  max-width: 1000px;
  height: 80vh;
  max-height: 700px;
  background: var(--bg-primary, #1a1a2e);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: equipmentModalSlideIn 0.25s ease;
}

.equipment-modal__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
  background: var(--bg-secondary, #252540);
}

.equipment-modal__header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.equipment-modal__budget {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.equipment-modal__budget-label {
  color: var(--text-muted, #888);
}

.equipment-modal__budget-amount {
  font-weight: 600;
  color: var(--accent-warning, #fbbf24);
}

.equipment-modal__budget-total {
  color: var(--text-muted, #666);
  font-size: 12px;
}

.equipment-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-muted, #888);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.equipment-modal__close:hover {
  background: var(--accent-danger, #f87171);
  border-color: var(--accent-danger, #f87171);
  color: #fff;
}

.equipment-modal__body {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
  min-height: 0;
}

.equipment-modal__browser {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
}

.equipment-modal__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.equipment-modal__filter-btn {
  padding: 6px 12px;
  background: var(--bg-secondary, #252540);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-secondary, #aaa);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.equipment-modal__filter-btn:hover {
  background: var(--bg-tertiary, #2a2a4a);
  border-color: var(--accent-primary, #4a9eff);
}

.equipment-modal__filter-btn--active {
  background: var(--accent-primary, #4a9eff);
  border-color: var(--accent-primary, #4a9eff);
  color: #fff;
}

.equipment-modal__search {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary, #252540);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 13px;
}

.equipment-modal__search:focus {
  outline: none;
  border-color: var(--accent-primary, #4a9eff);
}

.equipment-modal__search::placeholder {
  color: var(--text-muted, #666);
}

.equipment-modal__items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.equipment-modal__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-secondary, #252540);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.equipment-modal__item:hover {
  border-color: var(--accent-primary, #4a9eff);
  background: var(--bg-tertiary, #2a2a4a);
}

.equipment-modal__item--unaffordable {
  opacity: 0.5;
}

.equipment-modal__item--unaffordable:hover {
  border-color: var(--border-color, #3a3a5a);
  background: var(--bg-secondary, #252540);
}

.equipment-modal__item-info {
  flex: 1;
  min-width: 0;
}

.equipment-modal__item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 2px;
}

.equipment-modal__item-type {
  font-size: 11px;
  color: var(--text-muted, #666);
  text-transform: capitalize;
}

.equipment-modal__item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.equipment-modal__item-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-warning, #fbbf24);
}

.equipment-modal__add-btn {
  padding: 6px 14px;
  background: var(--accent-primary, #4a9eff);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.equipment-modal__add-btn:hover:not(:disabled) {
  background: #3a8eef;
}

.equipment-modal__add-btn--disabled {
  background: var(--bg-tertiary, #2a2a4a);
  color: var(--text-muted, #666);
  cursor: not-allowed;
}

.equipment-modal__add-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.equipment-modal__add-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Modal Cart */
.equipment-modal__cart {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary, #252540);
  border-radius: 8px;
  padding: 14px;
  overflow: hidden;
}

.equipment-modal__cart h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.equipment-modal__cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.equipment-modal__cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-tertiary, #1a1a2e);
  border-radius: 4px;
}

.equipment-modal__cart-item-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
}

.equipment-modal__cart-item-qty {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.equipment-modal__cart-item-price {
  font-size: 12px;
  color: var(--accent-warning, #fbbf24);
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

.equipment-modal__cart-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 4px;
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
}

.equipment-modal__cart-remove:hover {
  background: var(--accent-danger, #f87171);
  border-color: var(--accent-danger, #f87171);
  color: #fff;
}

.equipment-modal__cart-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--text-muted, #666);
  font-size: 13px;
}

.equipment-modal__cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #3a3a5a);
}

.equipment-modal__confirm {
  padding: 10px 20px;
  background: var(--accent-success, #4ade80);
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.equipment-modal__confirm:hover:not(:disabled) {
  background: #22c55e;
}

.equipment-modal__confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal utilities */
.equipment-modal__empty,
.equipment-modal__loading,
.equipment-modal__error {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  color: var(--text-muted, #666);
  text-align: center;
}

.equipment-modal__empty-hint {
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.7;
}

.equipment-modal__notification {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--bg-secondary, #252540);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 13px;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.equipment-modal__notification--success {
  border-color: var(--accent-success, #4ade80);
  background: rgba(74, 222, 128, 0.1);
}

.equipment-modal__notification--error {
  border-color: var(--accent-danger, #f87171);
  background: rgba(248, 113, 113, 0.1);
}

.equipment-modal__notification--fade {
  opacity: 0;
}

/* Gold-buy inline button styles */
.gold-buy-info {
  padding: 16px;
  text-align: center;
}

.gold-buy-info p {
  margin: 0 0 8px 0;
  color: var(--text-secondary, #aaa);
}

.gold-buy-hint {
  font-size: 12px;
  color: var(--text-muted, #666);
}

.gold-buy-open-shop {
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--accent-primary, #4a9eff);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gold-buy-open-shop:hover {
  background: #3a8eef;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
  .equipment-modal {
    width: 95vw;
    height: 90vh;
    max-height: none;
  }

  .equipment-modal__body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .equipment-modal__cart {
    max-height: 200px;
  }
}

/* Equipment Cart Panel
 * ========================================================================== */
/* Equipment Cart Panel Styles */
.equipment-cart-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary, #1a1a2e);
  color: var(--text-primary, #e0e0e0);
}

/* Header */
.ec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
  gap: 8px;
}

.ec-mode-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.ec-mode-label {
  color: var(--text-secondary, #888);
}

.ec-mode-value {
  font-weight: 600;
  color: var(--accent-primary, #4a9eff);
}

.ec-mode-toggle {
  padding: 4px 8px;
  font-size: 11px;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 4px;
  color: var(--text-secondary, #888);
  cursor: pointer;
  transition: all 0.15s;
}

.ec-mode-toggle:hover {
  background: var(--bg-hover, #3a3a5a);
  color: var(--text-primary, #e0e0e0);
  border-color: var(--accent-primary, #4a9eff);
}

/* Gold Display */
.ec-gold-display {
  padding: 10px;
  background: var(--bg-secondary, #252545);
  border-bottom: 1px solid var(--border-color, #3a3a5a);
}

.ec-gold-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}

.ec-gold-row--spent .ec-gold-value {
  color: var(--accent-danger, #f87171);
}

.ec-gold-row--remaining .ec-gold-value {
  font-size: 14px;
  font-weight: 600;
}

.ec-gold-label {
  color: var(--text-secondary, #888);
}

.ec-gold-value {
  color: var(--accent-warning, #fbbf24);
}

.ec-gold-value--highlight {
  color: var(--accent-success, #4ade80);
}

/* Items Container */
.ec-items-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ec-section-title {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary, #888);
  border-bottom: 1px solid var(--border-color, #3a3a5a);
}

.ec-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ec-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted, #666);
  font-size: 13px;
  padding: 20px;
}

.ec-empty small {
  margin-top: 4px;
  font-size: 11px;
}

/* Cart Item */
.ec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  transition: all 0.15s;
}

.ec-item:hover {
  border-color: var(--accent-primary, #4a9eff);
}

.ec-item-info {
  flex: 1;
  min-width: 0;
}

.ec-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-item-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary, #888);
  margin-top: 2px;
}

.ec-item-cost {
  color: var(--accent-warning, #fbbf24);
}

.ec-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ec-item-qty-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 3px;
  color: var(--text-primary, #e0e0e0);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.ec-item-qty-btn:hover {
  background: var(--accent-primary, #4a9eff);
  border-color: var(--accent-primary, #4a9eff);
}

.ec-item-qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 12px;
}

.ec-item-remove {
  padding: 4px 8px;
  background: none;
  border: none;
  color: var(--text-muted, #666);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.ec-item-remove:hover {
  color: var(--accent-danger, #f87171);
}

/* Quick Pick Item (different styling) */
.ec-item--choice {
  border-left: 3px solid var(--accent-success, #4ade80);
}

.ec-item-choice-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-success, #4ade80);
  margin-bottom: 2px;
}

/* Footer */
.ec-footer {
  padding: 10px;
  border-top: 1px solid var(--border-color, #3a3a5a);
  background: var(--bg-secondary, #252545);
}

.ec-summary {
  margin-bottom: 10px;
  text-align: center;
}

.ec-item-count {
  font-size: 12px;
  color: var(--text-secondary, #888);
}

.ec-actions {
  display: flex;
  gap: 8px;
}

.ec-clear-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-secondary, #888);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.ec-clear-btn:hover:not(:disabled) {
  background: var(--bg-hover, #3a3a5a);
  color: var(--accent-danger, #f87171);
  border-color: var(--accent-danger, #f87171);
}

.ec-clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ec-confirm-btn {
  flex: 2;
  padding: 8px 16px;
  background: var(--accent-primary, #4a9eff);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.ec-confirm-btn:hover:not(:disabled) {
  background: #3a8eef;
}

.ec-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Scrollbar */
.ec-items::-webkit-scrollbar {
  width: 6px;
}

.ec-items::-webkit-scrollbar-track {
  background: transparent;
}

.ec-items::-webkit-scrollbar-thumb {
  background: var(--border-color, #3a3a5a);
  border-radius: 3px;
}

/* Warning/Error Toast */
.ec-toast {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: var(--accent-danger, #f87171);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  animation: ecFadeIn 0.2s ease;
  z-index: 100;
}

.ec-toast--success {
  background: var(--accent-success, #4ade80);
}

@keyframes ecFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Pack/Container Styles for Equipment Cart */
.ec-pack {
  border: 1px solid var(--accent-primary, #4a9eff);
  border-radius: 6px;
  margin-bottom: 6px;
  overflow: hidden;
  background: var(--bg-secondary, #252545);
}

.ec-pack-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(74, 158, 255, 0.1);
  cursor: pointer;
  transition: background 0.15s ease;
}

.ec-pack-header:hover {
  background: rgba(74, 158, 255, 0.15);
}

.ec-pack-toggle {
  font-size: 10px;
  color: var(--text-secondary, #888);
  transition: transform 0.2s ease;
}

.ec-pack-info {
  flex: 1;
  min-width: 0;
}

.ec-pack-name {
  font-size: 13px;
  font-weight: 500;
}

.ec-pack-meta {
  font-size: 11px;
  color: var(--text-secondary, #888);
  margin-top: 2px;
}

.ec-pack-count {
  font-size: 11px;
  color: var(--text-secondary, #888);
  padding: 2px 6px;
  background: var(--bg-tertiary, #2a2a4a);
  border-radius: 3px;
}

.ec-pack-contents {
  padding: 8px 12px 12px 28px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(74, 158, 255, 0.2);
}

.ec-pack-contents.collapsed {
  display: none;
}

.ec-pack-content-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 12px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.ec-pack-content-item:last-child {
  margin-bottom: 0;
}

.ec-pack-content-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ec-pack-content-name {
  flex: 1;
  color: var(--text-primary, #e0e0e0);
}

.ec-pack-content-qty {
  font-size: 11px;
  color: var(--text-secondary, #888);
}

/* Pack Preview for Quick Pick mode */
.ec-pack-preview {
  font-size: 10px;
  color: var(--text-muted, #666);
  margin-top: 4px;
  font-style: italic;
}

/* Character Carousel - For saved/preset character selection
 * ========================================================================== */

.character-carousel-container {
  padding: 0 1rem;
  margin-bottom: 1rem;
  animation: carouselFadeIn 0.2s ease;
}

@keyframes carouselFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.character-carousel {
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 8px;
  overflow: hidden;
}

.character-carousel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary, #2a2a4a);
  border-bottom: 1px solid var(--border-color, #3a3a5a);
}

.character-carousel__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
}

.character-carousel__close {
  background: none;
  border: none;
  color: var(--text-muted, #666);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.character-carousel__close:hover {
  color: var(--text-primary, #e0e0e0);
}

.character-carousel__track {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color, #3a3a5a) transparent;
}

.character-carousel__track::-webkit-scrollbar {
  height: 6px;
}

.character-carousel__track::-webkit-scrollbar-track {
  background: transparent;
}

.character-carousel__track::-webkit-scrollbar-thumb {
  background: var(--border-color, #3a3a5a);
  border-radius: 3px;
}

/* Responsive adjustments for carousel */
@media (max-width: 480px) {
  .character-carousel__track {
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

/* ==========================================================================
 * Choice Cards - Universal selection cards for AI carousel
 * Supports: target, item, spell, character, option
 * ========================================================================== */

button.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.875rem;
  min-width: 140px;
  max-width: 180px;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: var(--bg-tertiary, #2a2a4a) !important;
  background-image: none !important;
  border: 1px solid var(--border-color, #3a3a5a) !important;
  border-radius: 8px;
  outline: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-align: center;
}

button.choice-card:hover {
  background: var(--bg-secondary, #252545) !important;
  border-color: var(--accent-primary, #4a9eff) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

button.choice-card:active {
  transform: translateY(0);
}

.choice-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

/* SVG icon sizing - use default 24px from inline attributes */
.choice-card__icon svg {
  display: block;
  margin: 0 auto;
}

/* Icon colors - themed by action type */
.choice-card__icon--user { color: #60a5fa; } /* Blue - user actions */
.choice-card__icon--users { color: #60a5fa; } /* Blue - user/character related */
.choice-card__icon--sparkles { color: #fbbf24; } /* Gold - magical/creative */
.choice-card__icon--flask { color: #a78bfa; } /* Purple - experimental/homebrew */
.choice-card__icon--link { color: #34d399; } /* Green - connections */
.choice-card__icon--list { color: #94a3b8; } /* Gray - neutral/info */
.choice-card__icon--sword { color: #ef4444; } /* Red - combat/fighter */
.choice-card__icon--swords { color: #dc2626; } /* Darker red - intense combat */
.choice-card__icon--user-secret { color: #7c3aed; } /* Purple - stealth/rogue */
.choice-card__icon--theater-mask { color: #ec4899; } /* Pink - DM/performance */
.choice-card__icon--book-open { color: #3b82f6; } /* Blue - learning/tutorial */
.choice-card__icon--message-circle { color: #22d3ee; } /* Cyan - chat */
.choice-card__icon--coins { color: #f59e0b; } /* Amber - gold/treasure */
.choice-card__icon--gift { color: #8b5cf6; } /* Purple - magic items */
.choice-card__icon--settings { color: #64748b; } /* Slate - dev tools */

/* Hover effect - brighten on hover */
button.choice-card:hover .choice-card__icon svg {
  filter: brightness(1.3);
  transition: filter 0.2s ease;
}

.choice-card__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0) !important;
  line-height: 1.2;
}

.choice-card__meta {
  font-size: 11px;
  color: var(--text-secondary, #888);
  line-height: 1.3;
}

.choice-card__description {
  font-size: 11px;
  color: var(--text-secondary, #888);
  line-height: 1.3;
  max-width: 100%;
}

/* Target Cards - Combat target selection */
button.choice-card--target {
  border-left: 3px solid #dc2626;
}

button.choice-card--target:hover {
  border-left-color: #f87171;
}

.choice-card__ac {
  font-size: 11px;
  color: var(--text-secondary, #888);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.choice-card__conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
}

.condition-badge {
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
  text-transform: uppercase;
}

.condition-badge--poisoned { background: rgba(34, 197, 94, 0.3); color: #86efac; }
.condition-badge--stunned { background: rgba(234, 179, 8, 0.3); color: #fde047; }
.condition-badge--prone { background: rgba(139, 92, 246, 0.3); color: #c4b5fd; }
.condition-badge--blinded { background: rgba(75, 85, 99, 0.4); color: #d1d5db; }

/* Item Cards - Shop browsing, inventory */
button.choice-card--item {
  border-left: 3px solid #f59e0b;
}

button.choice-card--item:hover {
  border-left-color: #fbbf24;
}

.choice-card__price {
  font-size: 12px;
  color: #fbbf24;
  font-weight: 500;
}

.choice-card__quantity {
  font-size: 10px;
  color: var(--text-secondary, #888);
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.choice-card__rarity {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Item rarity colors */
button.choice-card--rarity-common .choice-card__rarity {
  background: rgba(156, 163, 175, 0.3);
  color: #d1d5db;
}

button.choice-card--rarity-uncommon .choice-card__rarity {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

button.choice-card--rarity-rare .choice-card__rarity {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

button.choice-card--rarity-veryrare .choice-card__rarity,
button.choice-card--rarity-very_rare .choice-card__rarity {
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

button.choice-card--rarity-legendary .choice-card__rarity {
  background: rgba(249, 115, 22, 0.3);
  color: #fdba74;
}

button.choice-card--rarity-artifact .choice-card__rarity {
  background: rgba(236, 72, 153, 0.3);
  color: #f9a8d4;
}

/* Spell Cards */
button.choice-card--spell {
  border-left: 3px solid #8b5cf6;
}

button.choice-card--spell:hover {
  border-left-color: #a78bfa;
}

.choice-card__level {
  font-size: 10px;
  color: var(--text-secondary, #888);
  padding: 2px 6px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 4px;
}

.choice-card__school {
  font-size: 9px;
  color: var(--text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.choice-card__components {
  font-size: 9px;
  color: var(--text-muted, #666);
  font-style: italic;
}

.choice-card__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

.choice-card__badge--concentration {
  background: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

/* Make spell cards relative for badge positioning */
button.choice-card--spell {
  position: relative;
}

/* School-specific border colors */
button.choice-card--school-abjuration { border-left-color: #60a5fa; }
button.choice-card--school-conjuration { border-left-color: #fbbf24; }
button.choice-card--school-divination { border-left-color: #c084fc; }
button.choice-card--school-enchantment { border-left-color: #f472b6; }
button.choice-card--school-evocation { border-left-color: #f87171; }
button.choice-card--school-illusion { border-left-color: #a78bfa; }
button.choice-card--school-necromancy { border-left-color: #6b7280; }
button.choice-card--school-transmutation { border-left-color: #4ade80; }

/* Character Choice Cards */
button.choice-card--character {
  border-left: 3px solid #4a9eff;
}

button.choice-card--character:hover {
  border-left-color: #7ab8ff;
}

.choice-card__class {
  font-size: 11px;
  color: var(--accent-primary, #4a9eff);
}

/* Option Cards - Generic choices */
button.choice-card--option {
  border-left: 3px solid #4ade80;
}

button.choice-card--option:hover {
  border-left-color: #86efac;
}

/* Style variants for option cards */
button.choice-card--primary {
  border-left-color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.1);
}

button.choice-card--primary:hover {
  border-left-color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.2);
}

button.choice-card--danger {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

button.choice-card--danger:hover {
  border-left-color: #f87171;
  background: rgba(220, 38, 38, 0.2);
}

/* Carousel variant styling */
.character-carousel--target {
  border-color: rgba(220, 38, 38, 0.4);
}

.character-carousel--item {
  border-color: rgba(245, 158, 11, 0.4);
}

.character-carousel--spell {
  border-color: rgba(139, 92, 246, 0.4);
}

.character-carousel--option {
  border-color: rgba(74, 222, 128, 0.4);
}

/* Responsive adjustments for choice cards */
@media (max-width: 480px) {
  button.choice-card {
    min-width: 120px;
    padding: 0.75rem;
  }

  .choice-card__label {
    font-size: 13px;
  }

  .choice-card__meta,
  .choice-card__description {
    font-size: 10px;
  }
}

/* Story Option Cards - Guided Story Mode
 * ========================================================================== */
button.choice-card--story-option {
  border-left: 3px solid #6366f1;
  position: relative;
  min-height: 80px;
  padding: 0.875rem 1rem;
  text-align: left;
  transition: all 0.2s ease;
}

button.choice-card--story-option:hover {
  border-left-color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
}

/* Type-specific borders */
button.choice-card--type-action {
  border-left-color: #ef4444;
}
button.choice-card--type-action:hover {
  border-left-color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

button.choice-card--type-dialogue {
  border-left-color: #3b82f6;
}
button.choice-card--type-dialogue:hover {
  border-left-color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
}

button.choice-card--type-exploration {
  border-left-color: #10b981;
}
button.choice-card--type-exploration:hover {
  border-left-color: #34d399;
  background: rgba(16, 185, 129, 0.1);
}

button.choice-card--type-retreat {
  border-left-color: #f59e0b;
}
button.choice-card--type-retreat:hover {
  border-left-color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

/* Card content layout */
.choice-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.choice-card__type-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.choice-card__label--story {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary, #e0e0e0);
}

/* Hint badges */
.choice-card__hint {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 0.25rem;
}

.choice-card__hint--risky {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.choice-card__hint--safe {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.choice-card__hint--diplomatic {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.choice-card__hint--sneaky {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.choice-card__hint--neutral {
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.4);
}

/* Position badge */
.choice-card__position {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-secondary, #888);
}

/* Swipe indicators */
.choice-card__swipe-indicators {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.375rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.swipe-indicator {
  font-size: 12px;
  color: var(--text-muted, #666);
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.swipe-indicator--loaded {
  color: var(--accent-primary, #4a9eff);
  opacity: 1;
}

button.choice-card--story-option:hover .swipe-indicator {
  opacity: 1;
}

/* Loading state during variation fetch */
.choice-card--loading-variation {
  opacity: 0.7;
  pointer-events: none;
}

.choice-card--loading-variation::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-muted, #666);
  border-top-color: var(--accent-primary, #4a9eff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translateX(-50%) rotate(360deg); }
}

/* Story mode carousel styling */
.character-carousel--story_option {
  border-color: rgba(99, 102, 241, 0.4);
}

.character-carousel--story_option .character-carousel__track {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Story option cards should be wider for readability */
.character-carousel--story_option button.choice-card--story-option {
  min-width: 200px;
  max-width: 280px;
  flex: 1;
}

/* Responsive adjustments for story cards */
@media (max-width: 768px) {
  .character-carousel--story_option .character-carousel__track {
    flex-direction: column;
    align-items: stretch;
  }

  .character-carousel--story_option button.choice-card--story-option {
    min-width: unset;
    max-width: unset;
  }
}

/* --------------------------------------------------------------------------
 * Category Cards (Expandable categories in lobby)
 * -------------------------------------------------------------------------- */
button.choice-card--category {
  border-left: 3px solid var(--accent-primary, #9333ea);
  position: relative;
}

button.choice-card--category:hover {
  border-left-color: #a855f7;
}

button.choice-card--category.expanded {
  border-left-color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}

.choice-card__expand-indicator {
  font-size: 10px;
  margin-left: auto;
  transition: transform 0.2s ease;
  color: var(--text-muted, #666);
}

button.choice-card--category.expanded .choice-card__expand-indicator {
  transform: rotate(180deg);
  color: #22d3ee;
}

/* Children container (appears below the expanded category card) */
.category-children {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

button.choice-card--child {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

button.choice-card--child:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary, #9333ea);
}

button.choice-card--child .choice-card__title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
}

button.choice-card--child .choice-card__description {
  display: block;
  font-size: 11px;
  color: var(--text-secondary, #888);
  margin-top: 0.25rem;
}

/* ==========================================================================
 * Extended Choice Card Types
 * New card variants for platform-wide selection panels
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * Check Cards (Ability Checks, Saving Throws)
 * -------------------------------------------------------------------------- */
button.choice-card--check {
  border-left: 3px solid var(--color-accent-error, #ef4444);
}

button.choice-card--check:hover {
  border-left-color: var(--color-accent-error, #f87171);
}

button.choice-card--saving_throw {
  border-left-color: #f59e0b;
}

button.choice-card--saving_throw:hover {
  border-left-color: #fbbf24;
}

.choice-card__dc {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-error, #ef4444);
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.choice-card__ability {
  font-size: 0.7rem;
  color: var(--color-text-secondary, #a0a0a0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.choice-card__skill {
  font-size: 0.7rem;
  color: var(--color-accent-primary, #60a5fa);
}

.choice-card__badge--advantage {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.choice-card__badge--disadvantage {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

/* --------------------------------------------------------------------------
 * Service Cards (Shop Services)
 * -------------------------------------------------------------------------- */
button.choice-card--service {
  border-left: 3px solid #f59e0b;
}

button.choice-card--service:hover {
  border-left-color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.choice-card__duration {
  font-size: 0.7rem;
  color: var(--color-text-secondary, #a0a0a0);
  display: flex;
  align-items: center;
  gap: 4px;
}

.choice-card__duration::before {
  content: '⏱';
  font-size: 0.8em;
}

.choice-card__requirements {
  font-size: 0.65rem;
  color: var(--color-accent-warning, #f59e0b);
  font-style: italic;
}

/* --------------------------------------------------------------------------
 * NPC Cards
 * -------------------------------------------------------------------------- */
button.choice-card--npc {
  border-left: 3px solid var(--color-accent-primary, #60a5fa);
}

button.choice-card--npc:hover {
  border-left-color: var(--color-accent-primary, #93c5fd);
  background: rgba(96, 165, 250, 0.1);
}

/* NPC Disposition variants */
button.choice-card--disposition-friendly {
  border-left-color: #22c55e;
}

button.choice-card--disposition-friendly:hover {
  background: rgba(34, 197, 94, 0.1);
}

button.choice-card--disposition-neutral {
  border-left-color: #64748b;
}

button.choice-card--disposition-hostile {
  border-left-color: #ef4444;
}

button.choice-card--disposition-hostile:hover {
  background: rgba(239, 68, 68, 0.1);
}

.choice-card__role {
  font-size: 0.7rem;
  color: var(--color-accent-primary, #60a5fa);
  font-style: italic;
}

.choice-card__disposition {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.choice-card__disposition--friendly {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.choice-card__disposition--neutral {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.choice-card__disposition--hostile {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.choice-card__location {
  font-size: 0.65rem;
  color: var(--color-text-muted, #6b7280);
}

.choice-card__location::before {
  content: '📍 ';
}

.choice-card__stats {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
 * Quest Cards
 * -------------------------------------------------------------------------- */
button.choice-card--quest {
  border-left: 3px solid var(--color-accent-primary, #60a5fa);
  min-height: 80px;
}

button.choice-card--quest:hover {
  border-left-color: var(--color-accent-primary, #93c5fd);
  background: rgba(96, 165, 250, 0.1);
}

/* Quest difficulty variants */
button.choice-card--difficulty-easy {
  border-left-color: #22c55e;
}

button.choice-card--difficulty-moderate {
  border-left-color: #f59e0b;
}

button.choice-card--difficulty-hard {
  border-left-color: #ef4444;
}

button.choice-card--difficulty-deadly {
  border-left-color: #7c3aed;
}

.choice-card__difficulty {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.choice-card__difficulty--easy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.choice-card__difficulty--moderate {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.choice-card__difficulty--hard {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.choice-card__difficulty--deadly {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
}

.choice-card__reward {
  font-size: 0.7rem;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 4px;
}

.choice-card__reward::before {
  content: '🏆';
  font-size: 0.9em;
}

.choice-card__giver {
  font-size: 0.65rem;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
}

.choice-card__status {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.choice-card__status--available {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

.choice-card__status--active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.choice-card__status--completed {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.choice-card__progress {
  width: 100%;
  height: 6px;
  background: var(--color-bg-tertiary, #2a2a4a);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.choice-card__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.choice-card__progress-text {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.55rem;
  color: var(--color-text-primary, #e0e0e0);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

/* --------------------------------------------------------------------------
 * Dialogue Cards
 * -------------------------------------------------------------------------- */
button.choice-card--dialogue {
  border-left: 3px solid var(--color-accent-primary, #60a5fa);
  text-align: left;
}

button.choice-card--dialogue:hover {
  border-left-color: var(--color-accent-primary, #93c5fd);
  background: rgba(96, 165, 250, 0.1);
}

/* Dialogue tone variants */
button.choice-card--tone-friendly {
  border-left-color: #22c55e;
}

button.choice-card--tone-friendly:hover {
  background: rgba(34, 197, 94, 0.1);
}

button.choice-card--tone-aggressive {
  border-left-color: #ef4444;
}

button.choice-card--tone-aggressive:hover {
  background: rgba(239, 68, 68, 0.1);
}

button.choice-card--tone-deceptive {
  border-left-color: #a78bfa;
}

button.choice-card--tone-deceptive:hover {
  background: rgba(167, 139, 250, 0.1);
}

button.choice-card--tone-inquisitive {
  border-left-color: #22d3ee;
}

button.choice-card--tone-inquisitive:hover {
  background: rgba(34, 211, 238, 0.1);
}

.choice-card__tone {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.choice-card__tone--friendly {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.choice-card__tone--aggressive {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.choice-card__tone--deceptive {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}

.choice-card__tone--inquisitive {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
}

.choice-card__skill-check {
  font-size: 0.65rem;
  color: var(--color-accent-warning, #f59e0b);
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.choice-card__skill-check::before {
  content: '🎲 ';
}

.choice-card__consequence {
  font-size: 0.6rem;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
 * Creation Cards (Race, Class, Background, etc.)
 * -------------------------------------------------------------------------- */
button.choice-card--creation {
  border-left: 3px solid var(--color-accent-success, #22c55e);
  min-height: 70px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

button.choice-card--creation:hover {
  border-left-color: var(--color-accent-success, #4ade80);
  background: rgba(34, 197, 94, 0.1);
}

/* Creation type-specific colors */
button.choice-card--race {
  border-left-color: #f59e0b;
}

button.choice-card--race:hover {
  background: rgba(245, 158, 11, 0.1);
}

button.choice-card--class {
  border-left-color: #ef4444;
}

button.choice-card--class:hover {
  background: rgba(239, 68, 68, 0.1);
}

button.choice-card--background {
  border-left-color: #8b5cf6;
}

button.choice-card--background:hover {
  background: rgba(139, 92, 246, 0.1);
}

button.choice-card--alignment {
  border-left-color: #64748b;
}

button.choice-card--skill {
  border-left-color: #22d3ee;
}

button.choice-card--equipment {
  border-left-color: #fbbf24;
}

.choice-card__source {
  font-size: 0.6rem;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
}

.choice-card__traits,
.choice-card__bonuses,
.choice-card__abilities,
.choice-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.choice-card__trait,
.choice-card__feature {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-bg-tertiary, #2a2a4a);
  color: var(--color-text-secondary, #a0a0a0);
}

.choice-card__trait--more {
  background: transparent;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
}

.choice-card__bonus {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.choice-card__ability-pill {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* --------------------------------------------------------------------------
 * Location Cards
 * -------------------------------------------------------------------------- */
button.choice-card--location {
  border-left: 3px solid var(--color-accent-primary, #60a5fa);
}

button.choice-card--location:hover {
  border-left-color: var(--color-accent-primary, #93c5fd);
  background: rgba(96, 165, 250, 0.1);
}

/* Location danger level variants */
button.choice-card--danger-safe {
  border-left-color: #22c55e;
}

button.choice-card--danger-low {
  border-left-color: #84cc16;
}

button.choice-card--danger-moderate {
  border-left-color: #f59e0b;
}

button.choice-card--danger-high {
  border-left-color: #ef4444;
}

button.choice-card--danger-deadly {
  border-left-color: #7c3aed;
}

button.choice-card--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.choice-card__danger {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.choice-card__danger--safe {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.choice-card__danger--low {
  background: rgba(132, 204, 22, 0.2);
  color: #84cc16;
}

.choice-card__danger--moderate {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.choice-card__danger--high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.choice-card__danger--deadly {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
}

.choice-card__distance {
  font-size: 0.65rem;
  color: var(--color-text-muted, #6b7280);
}

.choice-card__distance::before {
  content: '📍 ';
}

.choice-card__badge--undiscovered {
  background: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
  font-size: 0.8rem;
}

.choice-card__badge--locked {
  background: rgba(239, 68, 68, 0.2);
  font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
 * Action Cards (Combat Actions, Abilities)
 * -------------------------------------------------------------------------- */
button.choice-card--action {
  border-left: 3px solid var(--color-accent-primary, #60a5fa);
}

button.choice-card--action:hover {
  border-left-color: var(--color-accent-primary, #93c5fd);
  background: rgba(96, 165, 250, 0.1);
}

/* Action type variants */
button.choice-card--action-type-action {
  border-left-color: #60a5fa;
}

button.choice-card--action-type-bonus_action {
  border-left-color: #f59e0b;
}

button.choice-card--action-type-reaction {
  border-left-color: #a78bfa;
}

button.choice-card--action-type-movement {
  border-left-color: #22c55e;
}

button.choice-card--action-type-free {
  border-left-color: #94a3b8;
}

.choice-card__action-type {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--color-bg-tertiary, #2a2a4a);
  color: var(--color-text-secondary, #a0a0a0);
}

.choice-card__uses {
  font-size: 0.65rem;
  color: var(--color-accent-success, #22c55e);
}

.choice-card__cooldown {
  font-size: 0.6rem;
  color: var(--color-text-muted, #6b7280);
}

.choice-card__cooldown::before {
  content: '⏱ ';
}

.choice-card__resource {
  font-size: 0.6rem;
  color: var(--color-accent-warning, #f59e0b);
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
 * HP Bar (shared component for target/npc cards)
 * -------------------------------------------------------------------------- */
.choice-card__hp-bar {
  width: 100%;
  height: 6px;
  background: var(--color-bg-tertiary, #2a2a4a);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.choice-card__hp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.choice-card__hp-fill--healthy {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.choice-card__hp-fill--wounded {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.choice-card__hp-fill--critical {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.choice-card__hp-text {
  font-size: 0.55rem;
  color: var(--color-text-secondary, #a0a0a0);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
 * Responsive adjustments for new card types
 * -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  button.choice-card--creation,
  button.choice-card--quest,
  button.choice-card--npc {
    min-height: unset;
    padding: 10px 12px;
  }

  .choice-card__traits,
  .choice-card__bonuses,
  .choice-card__abilities,
  .choice-card__features {
    display: none; /* Hide pills on mobile for cleaner UI */
  }

  .choice-card__progress {
    height: 4px;
  }
}

/* Character Sheet Panel (Overview during creation)
 * ========================================================================== */
/* Character Overview Styles */
.character-overview {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary, #1a1a2e);
  color: var(--text-primary, #e0e0e0);
}

.co-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Progress Bar */
.co-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.co-progress-bar {
  height: 8px;
  background: var(--bg-tertiary, #2a2a4a);
  border-radius: 4px;
  overflow: hidden;
}

.co-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary, #4a9eff), var(--accent-success, #4ade80));
  transition: width 0.3s ease;
}

.co-progress-label {
  font-size: 12px;
  color: var(--text-secondary, #888);
  text-align: center;
}

.co-progress-stages {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.co-stage {
  color: var(--text-muted, #666);
  padding: 2px 6px;
  border-radius: 3px;
}

.co-stage--done {
  color: var(--accent-success, #4ade80);
}

.co-stage--active {
  color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.1);
}

/* Choices List */
.co-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.co-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  font-size: 13px;
}

.co-choice--complete {
  border-color: var(--accent-success, #4ade80);
  background: rgba(74, 222, 128, 0.05);
}

.co-choice--active {
  border-color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.1);
  border-left: 3px solid var(--accent-primary, #4a9eff);
}

.co-choice--active .co-choice-icon {
  color: var(--accent-primary, #4a9eff);
}

.co-choice--active .co-choice-label {
  color: var(--accent-primary, #4a9eff);
}

.co-active-indicator {
  color: var(--accent-primary, #4a9eff);
  font-weight: bold;
}

.co-choice--pending {
  opacity: 0.7;
}

.co-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-secondary, #888);
}

.co-choice--complete .co-choice-icon {
  color: var(--accent-success, #4ade80);
}

.co-choice-label {
  font-weight: 500;
  min-width: 80px;
}

.co-choice-value {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #888);
}

.co-choice--complete .co-choice-value {
  color: var(--text-primary, #e0e0e0);
}

.co-check {
  display: flex;
  color: var(--accent-success, #4ade80);
}

.co-pending {
  font-style: italic;
  color: var(--text-muted, #666);
}

.co-svg {
  width: 16px;
  height: 16px;
}

.co-svg--check {
  width: 14px;
  height: 14px;
}

/* Hints Section */
.co-hints {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 6px;
  margin-top: 8px;
}

.co-hint-icon {
  display: flex;
  color: var(--accent-primary, #4a9eff);
  flex-shrink: 0;
}

.co-hint-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary, #e0e0e0);
}

/* Tab styling for creation phase */
.sp-tab-btn:disabled {
  cursor: default;
  opacity: 0.8;
}

/* Game Log Panel
 * ========================================================================== */
/* Game Log Panel Styles */
.game-log-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary, #1a1a2e);
  color: var(--text-primary, #e0e0e0);
}

/* Filter Bar */
.gl-filters {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: var(--bg-secondary, #252545);
  border-bottom: 1px solid var(--border-color, #3a3a5a);
  flex-shrink: 0;
}

.gl-filter-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  background: transparent;
  color: var(--text-secondary, #888);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;  /* Prevent text selection on tap */
  -webkit-user-select: none;  /* Safari/iOS */
  -webkit-tap-highlight-color: transparent;  /* Remove tap highlight flash */
}

.gl-filter-btn:hover {
  background: var(--bg-hover, #2a2a4a);
  color: var(--text-primary, #e0e0e0);
}

.gl-filter-btn.gl-filter-active {
  background: var(--accent-primary, #4a9eff);
  color: #fff;
  border-color: var(--accent-primary, #4a9eff);
}

.gl-filter-btn:focus-visible {
  outline: 2px solid var(--accent-primary, #4a9eff);
  outline-offset: 2px;
}

.gl-filter-icon {
  width: 12px;
  height: 12px;
}

/* Mobile touch target sizing for game log filters */
@media (max-width: 1024px) {
  .gl-filter-btn {
    min-height: 44px;  /* WCAG minimum */
    min-width: 44px;  /* Square touch target */
    padding: var(--space-2, 8px) var(--space-3, 12px);
  }
}

/* Entries Container */
.gl-entries {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scroll-behavior: smooth;
}

/* Empty State */
.gl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted, #666);
  padding: 24px;
}

.gl-empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.gl-empty p {
  font-size: 13px;
  margin: 0;
}

/* Log Entry */
.gl-entry {
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  animation: glEntrySlide 0.2s ease-out;
}

@keyframes glEntrySlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gl-entry:last-child {
  margin-bottom: 0;
}

/* Entry Header */
.gl-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.gl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.gl-svg-icon {
  width: 18px;
  height: 18px;
}

.gl-result {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-success, #4ade80);
}

.gl-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted, #666);
}

/* Entry Body */
.gl-body {
  padding-left: 32px;
}

.gl-message {
  color: var(--text-primary, #e0e0e0);
  line-height: 1.4;
}

/* Details Section */
.gl-details {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-secondary, #888);
}

.gl-details summary {
  cursor: pointer;
  color: var(--accent-primary, #4a9eff);
}

.gl-details summary:hover {
  text-decoration: underline;
}

.gl-dice, .gl-modifier, .gl-detail-content {
  padding: 4px 0;
  font-family: var(--font-mono, monospace);
}

/* Advantage/Disadvantage dice display */
.gl-dice-adv-dis {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gl-dice-label {
  font-weight: bold;
  color: var(--color-text-secondary, #888);
  font-size: 0.9em;
}

.gl-dice-kept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1.1em;
}

.gl-dice-kept.gl-adv {
  background: rgba(152, 195, 121, 0.2);
  color: var(--color-accent-secondary, #98c379);
  border: 1px solid rgba(152, 195, 121, 0.4);
}

.gl-dice-kept.gl-dis {
  background: rgba(224, 108, 117, 0.2);
  color: var(--color-accent-error, #e06c75);
  border: 1px solid rgba(224, 108, 117, 0.4);
}

.gl-dice-discarded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.95em;
  color: var(--color-text-muted, #666);
  background: rgba(128, 128, 128, 0.1);
  text-decoration: line-through;
  opacity: 0.6;
}

/* Entry Type Variations */
.gl-entry.dice_roll {
  border-left: 3px solid var(--accent-success, #4ade80);
}

.gl-entry.dice_roll .gl-icon {
  color: var(--accent-success, #4ade80);
}

.gl-entry.combat {
  border-left: 3px solid var(--accent-danger, #f87171);
}

.gl-entry.combat .gl-icon {
  color: var(--accent-danger, #f87171);
}

.gl-entry.inventory {
  border-left: 3px solid var(--accent-warning, #fbbf24);
}

.gl-entry.inventory .gl-icon {
  color: var(--accent-warning, #fbbf24);
}

.gl-entry.character {
  border-left: 3px solid var(--accent-info, #60a5fa);
}

.gl-entry.character .gl-icon {
  color: var(--accent-info, #60a5fa);
}

.gl-entry.general {
  border-left: 3px solid var(--border-color, #3a3a5a);
}

/* Scrollbar */
.gl-entries::-webkit-scrollbar {
  width: 6px;
}

.gl-entries::-webkit-scrollbar-track {
  background: transparent;
}

.gl-entries::-webkit-scrollbar-thumb {
  background: var(--border-color, #3a3a5a);
  border-radius: 3px;
}

.gl-entries::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #666);
}

/* ==========================================================================
 * Panel Highlight Animations (AI DM Panel Tools)
 * Used by highlight_panel tool to draw player attention
 * ========================================================================== */

/* Pulse Effect - Pulsing border animation */
.split-panel--highlight-pulse {
  animation: panelPulse 0.6s ease-in-out 3;
}

@keyframes panelPulse {
  0%, 100% {
    border-color: var(--accent-primary, #4a9eff);
    box-shadow: 0 0 0 0 rgba(74, 158, 255, 0);
  }
  50% {
    border-color: var(--accent-primary, #4a9eff);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.3);
  }
}

/* Glow Effect - Soft glowing aura */
.split-panel--highlight-glow {
  animation: panelGlow 1s ease-in-out infinite alternate;
}

@keyframes panelGlow {
  from {
    box-shadow:
      0 0 5px rgba(74, 158, 255, 0.3),
      0 0 10px rgba(74, 158, 255, 0.2),
      0 0 15px rgba(74, 158, 255, 0.1);
  }
  to {
    box-shadow:
      0 0 10px rgba(74, 158, 255, 0.5),
      0 0 20px rgba(74, 158, 255, 0.3),
      0 0 30px rgba(74, 158, 255, 0.2);
  }
}

/* Border Effect - Quick border flash */
.split-panel--highlight-border {
  animation: panelBorderFlash 0.3s ease-out 2;
}

@keyframes panelBorderFlash {
  0% {
    border-color: var(--border-color, #3a3a5a);
  }
  50% {
    border-color: var(--accent-warning, #fbbf24);
    box-shadow: inset 0 0 0 2px rgba(251, 191, 36, 0.3);
  }
  100% {
    border-color: var(--accent-warning, #fbbf24);
  }
}

/* Shake Effect - Attention-grabbing shake */
.split-panel--highlight-shake {
  animation: panelShake 0.4s ease-in-out 2;
}

@keyframes panelShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-4px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(4px);
  }
}

/* Combat Effect - Red pulsing for combat alerts */
.split-panel--highlight-combat {
  animation: panelCombat 0.5s ease-in-out 3;
}

@keyframes panelCombat {
  0%, 100% {
    border-color: var(--accent-danger, #f87171);
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
  }
  50% {
    border-color: var(--accent-danger, #f87171);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.4);
  }
}

/* Success Effect - Green glow for positive events */
.split-panel--highlight-success {
  animation: panelSuccess 0.6s ease-in-out 2;
}

@keyframes panelSuccess {
  0%, 100% {
    border-color: var(--accent-success, #4ade80);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
  50% {
    border-color: var(--accent-success, #4ade80);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  }
}

/* Panel Tooltip - Floating message from AI DM */
.split-panel__tooltip {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 8px 12px;
  background: var(--bg-elevated, #2a2a4a);
  border: 1px solid var(--accent-primary, #4a9eff);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: tooltipFadeIn 0.2s ease-out;
  pointer-events: none;
}

.split-panel__tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent-primary, #4a9eff);
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-90%);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(-100%);
  }
}

/* Tooltip variants */
.split-panel__tooltip--warning {
  border-color: var(--accent-warning, #fbbf24);
}

.split-panel__tooltip--warning::after {
  border-top-color: var(--accent-warning, #fbbf24);
}

.split-panel__tooltip--danger {
  border-color: var(--accent-danger, #f87171);
}

.split-panel__tooltip--danger::after {
  border-top-color: var(--accent-danger, #f87171);
}

.split-panel__tooltip--success {
  border-color: var(--accent-success, #4ade80);
}

.split-panel__tooltip--success::after {
  border-top-color: var(--accent-success, #4ade80);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .split-panel--highlight-pulse,
  .split-panel--highlight-glow,
  .split-panel--highlight-border,
  .split-panel--highlight-shake,
  .split-panel--highlight-combat,
  .split-panel--highlight-success {
    animation: none;
  }

  .split-panel--highlight-pulse,
  .split-panel--highlight-glow {
    box-shadow: 0 0 0 2px var(--accent-primary, #4a9eff);
  }

  .split-panel--highlight-border {
    border-color: var(--accent-warning, #fbbf24);
  }

  .split-panel--highlight-combat {
    border-color: var(--accent-danger, #f87171);
  }

  .split-panel--highlight-success {
    border-color: var(--accent-success, #4ade80);
  }
}

/* ==========================================================================
 * Creation Pane Highlight Support
 * Ensure highlight animations work on character creation panes
 * ========================================================================== */

.creation-pane.split-panel--highlight-pulse,
.creation-pane.split-panel--highlight-glow,
.creation-pane.split-panel--highlight-border,
.creation-pane.split-panel--highlight-shake {
  animation-duration: 1.5s;
  animation-iteration-count: 2;
}

/* ==========================================================================
 * Character Creation Accordion (Panel-First UX)
 * Collapsible sections for race, class, background, etc.
 * ========================================================================== */

.sp-creation-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

/* Individual accordion section */
.sp-creation-section {
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-creation-section:hover {
  border-color: var(--accent-primary, #4a9eff);
}

/* Section states */
.sp-creation-section.completed {
  border-left: 3px solid var(--accent-success, #4ade80);
}

.sp-creation-section.active {
  border-color: var(--accent-primary, #4a9eff);
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.2);
}

.sp-creation-section.locked {
  opacity: 0.5;
  pointer-events: none;
}

.sp-creation-section.locked .sp-section-header {
  cursor: not-allowed;
}

/* Section header (always visible) */
.sp-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sp-section-header:hover {
  background: var(--bg-hover, #2a2a4a);
}

.sp-section-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sp-section-title {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
}

.sp-section-value {
  font-size: 12px;
  color: var(--text-secondary, #888);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-creation-section.completed .sp-section-value {
  color: var(--accent-success, #4ade80);
}

.sp-section-toggle {
  font-size: 10px;
  color: var(--text-muted, #666);
  transition: transform 0.2s ease;
}

.sp-creation-section.expanded .sp-section-toggle {
  transform: rotate(180deg);
}

.sp-section-check {
  color: var(--accent-success, #4ade80);
  font-size: 14px;
}

/* Section options container (collapsible) */
.sp-section-options {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 1px solid transparent;
}

.sp-creation-section.expanded .sp-section-options {
  max-height: 400px;
  overflow-y: auto;
  border-top-color: var(--border-color, #3a3a5a);
}

/* Options grid */
.sp-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 12px;
}

/* Option card */
.sp-option-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.sp-option-card:hover {
  border-color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.1);
}

.sp-option-card.selected {
  border-color: var(--accent-success, #4ade80);
  background: rgba(74, 222, 128, 0.1);
}

.sp-option-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.sp-option-name {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 2px;
}

.sp-option-preview {
  font-size: 10px;
  color: var(--text-muted, #666);
  line-height: 1.3;
}

/* Option list (alternative to grid) */
.sp-options-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.sp-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sp-option-row:hover {
  border-color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.1);
}

.sp-option-row.selected {
  border-color: var(--accent-success, #4ade80);
  background: rgba(74, 222, 128, 0.1);
}

.sp-option-row-info {
  flex: 1;
  min-width: 0;
}

.sp-option-row-name {
  font-size: 13px;
  font-weight: 500;
}

.sp-option-row-desc {
  font-size: 11px;
  color: var(--text-secondary, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-option-row-check {
  color: var(--accent-success, #4ade80);
  font-size: 16px;
}

/* Scrollbar for options */
.sp-section-options::-webkit-scrollbar {
  width: 6px;
}

.sp-section-options::-webkit-scrollbar-track {
  background: transparent;
}

.sp-section-options::-webkit-scrollbar-thumb {
  background: var(--border-color, #3a3a5a);
  border-radius: 3px;
}

/* Create Character Button (shown when complete) */
.sp-create-character-section {
  margin-top: 12px;
  padding: 12px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid var(--accent-success, #4ade80);
  border-radius: 8px;
  text-align: center;
}

.sp-create-btn {
  width: 100%;
  padding: 12px 20px;
  background: var(--accent-success, #4ade80);
  border: none;
  border-radius: 6px;
  color: #1a1a2e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sp-create-btn:hover {
  background: #5be890;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.sp-create-btn:active {
  transform: translateY(0);
}

/* Reduced motion for accordion */
@media (prefers-reduced-motion: reduce) {
  .sp-section-options {
    transition: none;
  }

  .sp-section-toggle {
    transition: none;
  }
}

/* ========================================
   Cumulative Character Preview (Phase 6)
   ======================================== */

.cp-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
  font-size: 13px;
}

.cp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #888);
}

.cp-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.cp-header {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle, #333);
}

.cp-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary, #e0e0e0);
}

.cp-identity {
  color: var(--text-secondary, #aaa);
  margin-top: 4px;
}

.cp-placeholder {
  color: var(--text-muted, #666);
  font-style: italic;
}

.cp-level {
  color: var(--accent-primary, #60a5fa);
  margin-left: 8px;
}

.cp-section {
  background: var(--bg-elevated, #1a1a2e);
  border-radius: 6px;
  padding: 10px;
}

.cp-section-title {
  font-weight: bold;
  color: var(--accent-primary, #60a5fa);
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Ability Grid */
.cp-ability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cp-ability {
  text-align: center;
  padding: 6px;
  background: var(--bg-surface, #252540);
  border-radius: 4px;
  position: relative;
}

.cp-ability--boosted {
  border: 1px solid var(--accent-success, #4ade80);
}

.cp-ability-name {
  display: block;
  font-size: 10px;
  color: var(--text-muted, #888);
}

.cp-ability-score {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary, #e0e0e0);
}

.cp-ability-mod {
  display: block;
  font-size: 11px;
  color: var(--text-secondary, #aaa);
}

.cp-ability-bonus {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
  color: var(--accent-success, #4ade80);
  font-weight: bold;
}

.cp-ability-source {
  margin-top: 8px;
  font-size: 11px;
  color: var(--accent-success, #4ade80);
  text-align: center;
}

.cp-abilities-pending {
  text-align: center;
  padding: 8px;
}

/* Vitals */
.cp-vitals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cp-vital {
  text-align: center;
}

.cp-vital-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted, #888);
}

.cp-vital-value {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary, #e0e0e0);
}

.cp-vital-note {
  display: block;
  font-size: 10px;
  color: var(--text-muted, #888);
}

/* Proficiencies */
.cp-prof-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.cp-prof-label {
  color: var(--text-muted, #888);
  min-width: 60px;
}

.cp-prof-value {
  color: var(--text-primary, #e0e0e0);
}

/* Traits & Features */
.cp-trait, .cp-feature {
  margin-bottom: 6px;
}

.cp-trait-name, .cp-feature-name {
  color: var(--text-primary, #e0e0e0);
  font-weight: 500;
}

.cp-trait-desc {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #888);
}

/* Equipment */
.cp-equipment-count {
  font-size: 12px;
  color: var(--text-secondary, #aaa);
}

/* Form Mode: Create Character Button */
.cp-create-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle, #333);
  background: var(--bg-elevated, #252540);
}

.create-character-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bg-base, #0a0a0f);
  background: linear-gradient(135deg, var(--accent-success, #34d399) 0%, var(--accent-primary, #60a5fa) 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.3);
}

.create-character-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.4);
}

.create-character-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(52, 211, 153, 0.2);
}

.create-character-btn .btn-icon {
  font-size: 18px;
}

.create-character-btn .btn-text {
  flex: 1;
  text-align: center;
}

.create-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted, #888);
  text-align: center;
  font-style: italic;
}

/* ============================================
   6-PANE CHARACTER CREATION GRID
   ============================================
   tmux-style grid layout for character creation.
   Replaces the split layout during character creation phase.
   Layout:
   ┌─────────────────┬─────────────────┬─────────────────┐
   │  AI/Narrative   │  Selection Pane │ Character Prev  │
   │  (DM dialogue)  │ Race→Class→Bg   │ (live preview)  │
   │                 │  (dynamic)      │                 │
   ├─────────────────┼─────────────────┼─────────────────┤
   │ Abilities/Skills│    Equipment    │     Spells      │
   │  (point buy,    │  (choices grid) │  (cantrips +    │
   │   skill picks)  │                 │   known spells) │
   └─────────────────┴─────────────────┴─────────────────┘
*/

.creation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 100%;
  width: 100%;
  padding: 4px;
  background: var(--bg-base, #0a0a0f);
  box-sizing: border-box;
}

.creation-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface, #1a1a2e);
  border: 1px solid var(--border-subtle, #333);
  border-radius: 4px;
  overflow: hidden;
  min-height: 0; /* Allow shrinking in grid */
}

.creation-pane .pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-elevated, #252540);
  border-bottom: 1px solid var(--border-subtle, #333);
  flex-shrink: 0;
}

.creation-pane .pane-title {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary, #60a5fa);
}

.creation-pane .pane-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--accent-primary, #60a5fa);
  color: var(--bg-base, #0a0a0f);
  border-radius: 10px;
  font-weight: 600;
}

.creation-pane .pane-badge:empty {
  display: none;
}

.creation-pane .pane-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0; /* Allow shrinking */
}

.creation-pane .pane-placeholder {
  color: var(--text-muted, #666);
  font-style: italic;
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

/* Error fallback UI for creation pane render failures */
.creation-pane .pane-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--error-color, #cc6666);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.creation-pane .pane-error .error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--error-bg, rgba(204, 102, 102, 0.2));
  color: var(--error-color, #cc6666);
  font-weight: bold;
  font-size: 11px;
}

.creation-pane .pane-error .error-text {
  font-style: italic;
}

/* Narrative Pane - DM dialogue and input */
.pane-narrative {
  display: flex;
  flex-direction: column;
}

.pane-narrative .pane-content {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.pane-narrative .narrative-box {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.pane-narrative .narrative-output {
  font-size: 13px;
  line-height: 1.5;
}

.pane-narrative .narrative-input-area {
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle, #333);
  padding: 8px;
  background: var(--bg-elevated, #252540);
}

/* Selection Pane - Race/Class/Background options */
.pane-selection .pane-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  align-content: start;
  padding: 8px;
}

/* Option cards for race/class/background selection */
.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: var(--bg-elevated, #252540);
  border: 1px solid var(--border-subtle, #333);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  min-height: 60px;
}

.option-card:hover {
  background: var(--bg-hover, #2a2a45);
  border-color: var(--accent-primary, #60a5fa);
  transform: translateY(-1px);
}

.option-card.selected {
  background: var(--accent-primary-dim, #1e3a5f);
  border-color: var(--accent-primary, #60a5fa);
}

.option-card .option-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.option-card .option-desc {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 4px;
}

/* Preview Pane - Live character sheet */
.pane-preview .pane-content {
  padding: 8px;
}

/* Abilities Pane - Point buy and skills */
.pane-abilities .pane-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
}

/* Equipment Pane */
.pane-equipment .pane-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
  align-content: start;
  padding: 8px;
}

/* Spells Pane */
.pane-spells .pane-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
  align-content: start;
  padding: 8px;
}

/* Complete badge shown when core selections are done */
.selection-complete-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.selection-complete-badge .checkmark {
  font-size: 32px;
  color: var(--accent-success, #4ade80);
  margin-bottom: 8px;
}

.selection-complete-badge .complete-text {
  font-size: 14px;
  color: var(--text-primary, #e0e0e0);
  font-weight: 600;
}

.selection-complete-badge .selections-summary {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-top: 8px;
}

/* Responsive: Stack on narrower screens */
@media (max-width: 1100px) {
  .creation-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
  }
}

/* Mobile: Single column with prioritized layout */
@media (max-width: 700px) {
  .creation-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;  /* Allow panes to size naturally */
    gap: 8px;  /* Increased spacing for touch targets */
    padding: 8px;
  }

  /* Narrative pane - primary (taller for conversation) */
  .pane-narrative {
    min-height: 300px;
    max-height: 50vh;  /* Don't dominate entire screen */
  }

  /* Selection pane - important (expandable) */
  .pane-selection {
    min-height: 200px;
  }

  /* Preview pane - compact summary */
  .pane-preview {
    min-height: 150px;
    max-height: 200px;
  }

  /* Secondary panes - collapsed by default, expandable */
  .pane-abilities,
  .pane-equipment,
  .pane-spells {
    min-height: 60px;  /* Just show header when collapsed */
  }

  /* Make pane headers tappable to expand/collapse on mobile */
  .creation-pane .pane-header {
    cursor: pointer;
    padding: 12px 16px;  /* Larger touch target */
    user-select: none;
  }

  .creation-pane .pane-header::after {
    content: '▼';
    font-size: 10px;
    color: var(--text-muted, #666);
    margin-left: auto;
  }

  /* Collapsed state for secondary panes */
  .creation-pane.collapsed .pane-content {
    display: none;
  }

  .creation-pane.collapsed .pane-header::after {
    content: '▶';
  }

  /* Increase touch targets for mobile */
  .creation-pane .chip,
  .creation-pane button {
    min-height: 44px;  /* WCAG minimum touch target */
    padding: 12px 16px;
  }

  /* Stack ability score controls vertically */
  .ability-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==========================================================================
 * Simple Two-Column Creation Layout
 * Replaces the 6-pane grid with narrative + character sheet side-by-side
 * ========================================================================== */

.creation-layout {
  display: grid;
  grid-template-columns: 1fr 320px 280px;
  gap: 4px;
  height: 100%;
  padding: 4px;
  background: var(--bg-base, #0a0a14);
}

.creation-narrative {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.creation-narrative .narrative-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.creation-sheet {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--border-subtle, #2a2a3a);
  overflow: hidden;
}

.creation-sheet .character-sheet-panel-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.creation-log {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--border-subtle, #2a2a3a);
  overflow: hidden;
}

.creation-log .game-log-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Responsive: Stack on narrower screens */
@media (max-width: 1024px) {
  .creation-layout {
    grid-template-columns: 1fr 280px;
    grid-template-rows: 1fr auto;
  }

  .creation-log {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--border-subtle, #2a2a3a);
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  .creation-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
  }

  .creation-sheet {
    border-left: none;
    border-top: 1px solid var(--border-subtle, #2a2a3a);
    max-height: 40vh;
  }

  .creation-log {
    max-height: 30vh;
  }
}

/* ==========================================================================
 * Creation Preview - Dynamic Character Sheet during creation
 * ========================================================================== */

.creation-preview {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.creation-preview-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle, #2a2a3a);
  background: var(--bg-secondary, #1a1a2e);
}

.creation-preview-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.creation-preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.creation-preview-empty {
  text-align: center;
  padding: 24px 16px;
}

.creation-preview-empty .cs-empty-text {
  margin-bottom: 16px;
  color: var(--text-muted, #888);
}

.creation-preview-hints {
  text-align: left;
  background: var(--bg-secondary, #1a1a2e);
  border-radius: 8px;
  padding: 12px 16px;
}

.creation-preview-hints p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-secondary, #aaa);
}

.creation-preview-hints ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-muted, #888);
}

.creation-preview-hints li {
  margin-bottom: 4px;
}

/* Character Preview Sections */
.cp-identity {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle, #2a2a3a);
}

.cp-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 4px;
}

.cp-subtitle {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}

.cp-vitals {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle, #2a2a3a);
}

.cp-vital {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.cp-vital-label {
  font-size: 11px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}

.cp-vital-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.cp-section-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.cp-abilities,
.cp-skills,
.cp-equipment,
.cp-spells {
  margin-bottom: 16px;
}

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

.cp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: var(--bg-secondary, #1a1a2e);
  border-radius: 6px;
}

.cp-stat-abbr {
  font-size: 10px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}

.cp-stat-score {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.cp-stat-mod {
  font-size: 12px;
  color: var(--accent-primary, #4a9eff);
}

.cp-skills-list,
.cp-equipment-list,
.cp-spells-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-skill-tag,
.cp-equipment-tag,
.cp-spell-tag {
  padding: 4px 8px;
  font-size: 12px;
  background: var(--bg-secondary, #1a1a2e);
  border-radius: 4px;
  color: var(--text-secondary, #aaa);
}

/* ============================================
   MASONRY CARD LAYOUT
   Pure CSS masonry for selection options
   Replaces quick actions with optimistic UI cards
   ============================================ */

.masonry-options {
  column-count: 3;
  column-gap: 12px;
  padding: 12px;
}

.masonry-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--bg-elevated, #1e1e2e);
  border: 1px solid var(--border-subtle, #333);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.masonry-card:hover {
  border-color: var(--accent-primary, #4a9eff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.masonry-card:active {
  transform: translateY(0);
}

/* Selected state - instant visual feedback */
.masonry-card--selected {
  border-color: var(--accent-success, #4ade80);
  background: rgba(74, 222, 128, 0.1);
}

.masonry-card--selected::before {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent-success, #4ade80);
  font-weight: bold;
}

/* Pending state - waiting for server confirmation */
.masonry-card--pending {
  border-color: var(--accent-warning, #f59e0b);
  opacity: 0.8;
  pointer-events: none;
}

.masonry-card--pending::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--accent-warning, #f59e0b);
  border-top-color: transparent;
  border-radius: 50%;
  animation: masonry-spin 0.6s linear infinite;
}

@keyframes masonry-spin {
  to { transform: rotate(360deg); }
}

/* Hidden state - filtered out by category */
.masonry-card--hidden {
  display: none;
}

/* Category filter bar */
.category-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--bg-elevated, #1e1e2e);
  border-radius: 6px;
  border: 1px solid var(--border-subtle, #333);
}

.category-filter-bar::before {
  content: 'Filter:';
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary, #888);
  margin-right: 4px;
}

.category-filter-bar .chip {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  background: var(--bg-base, #121212);
  border: 1px solid var(--border-subtle, #444);
  color: var(--text-secondary, #aaa);
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-filter-bar .chip:hover {
  border-color: var(--accent-primary, #4a9eff);
  color: var(--text-primary, #e0e0e0);
  background: var(--bg-hover, #1a1a2e);
}

.category-filter-bar .chip--selected {
  background: var(--accent-primary, #4a9eff);
  border-color: var(--accent-primary, #4a9eff);
  color: var(--bg-base, #121212);
  font-weight: 600;
}

/* Card content structure */
.masonry-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 4px;
}

.masonry-card__subtitle {
  font-size: 12px;
  color: var(--text-secondary, #aaa);
  margin-bottom: 8px;
}

.masonry-card__description {
  font-size: 12px;
  color: var(--text-tertiary, #888);
  line-height: 1.4;
}

.masonry-card__icon {
  font-size: 24px;
  margin-bottom: 8px;
}

/* Make cards position relative for pseudo-elements */
.masonry-card {
  position: relative;
}

/* Expandable thread section (future enhancement) */
.card-thread {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 1px solid var(--border-subtle, #333);
  margin-top: 8px;
  padding-top: 0;
}

.masonry-card.expanded .card-thread {
  max-height: 200px;
  padding-top: 8px;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .masonry-options {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .masonry-options {
    column-count: 1;
  }
}

/* ============================================
   SELECTION SECTIONS FOR PARALLEL DISPLAY
   Wrapper for race/class/background groups
   ============================================ */

.selection-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle, #333);
}

.selection-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 12px;
}

.section-title {
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-check {
  color: var(--accent-success, #4ade80);
  font-size: 12px;
  font-weight: bold;
}

/* Completed section styling - collapse to single row */
.selection-section--completed {
  opacity: 0.7;
}

.selection-section--completed .masonry-options {
  column-count: 4;
  max-height: 80px;
  overflow: hidden;
}

.selection-section--completed .masonry-card {
  padding: 6px 10px;
  margin-bottom: 6px;
}

.selection-section--completed .masonry-card__desc {
  display: none;
}

.selection-section--completed .section-title {
  color: var(--accent-success, #4ade80);
}

/* ============================================
   COLLAPSED SECTION STATE (per-section collapse)
   Animates individual sections when selection made
   ============================================ */

.selection-section {
  transition: max-height 0.4s ease-out, opacity 0.3s ease;
  overflow: hidden;
}

.selection-section--collapsed {
  max-height: 56px;
  opacity: 1;
}

.selection-section--collapsed .masonry-options {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.3s ease;
}

.selection-section--collapsed .section-header {
  display: none;
}

/* Selection Summary Bar - shown when collapsed */
.selection-summary {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--panel-bg-hover, rgba(255, 255, 255, 0.05));
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.selection-section--collapsed .selection-summary {
  display: flex;
}

.selection-summary:hover {
  background: var(--panel-bg-active, rgba(255, 255, 255, 0.08));
}

.selection-summary__icon {
  color: var(--accent-success, #4ade80);
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.selection-summary__type {
  color: var(--text-secondary, #aaa);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
}

.selection-summary__text {
  color: var(--text-primary, #e0e0e0);
  font-weight: 500;
  font-size: 13px;
  flex-grow: 1;
}

.selection-summary__expand {
  color: var(--text-muted, #888);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.selection-summary:hover .selection-summary__expand {
  color: var(--accent-primary, #60a5fa);
}

.selection-summary__expand-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.selection-section--expanded .selection-summary__expand-icon {
  transform: rotate(180deg);
}

/* Re-expanded state after user clicks "Change" */
.selection-section--expanded {
  max-height: none;
}

.selection-section--expanded .selection-summary {
  display: flex;
  margin-bottom: 12px;
  background: var(--accent-success-dim, rgba(74, 222, 128, 0.1));
  border: 1px solid var(--accent-success, #4ade80);
}

.selection-section--expanded .masonry-options {
  opacity: 1;
  max-height: none;
}

.selection-section--expanded .section-header {
  display: none;
}

/* Card content elements */
.masonry-card__name {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 2px;
}

.masonry-card__desc {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #888);
  line-height: 1.3;
}

/* Button reset for masonry cards */
button.masonry-card {
  font-family: inherit;
  text-align: left;
  width: 100%;
  display: block;
}

/* Info button for Guided mode (explain_option) */
.masonry-card__info-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-surface-elevated, #2a2a2a);
  border: 1px solid var(--color-border, #444);
  color: var(--color-text-muted, #888);
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
  z-index: 5;
}

.masonry-card:hover .masonry-card__info-btn,
.masonry-card:focus .masonry-card__info-btn {
  opacity: 1;
}

.masonry-card__info-btn:hover {
  background: var(--color-accent-blue, #61afef);
  color: var(--color-bg, #1a1a1a);
  border-color: var(--color-accent-blue, #61afef);
}

/* Explanation loading indicator */
.explanation-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-surface-elevated, #2a2a2a);
  border: 1px solid var(--color-border, #444);
  border-radius: var(--radius-md, 6px);
  margin-bottom: 12px;
  color: var(--color-text-muted, #888);
  font-size: 13px;
  animation: explanation-pulse 1.5s ease-in-out infinite;
}

@keyframes explanation-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.explanation-loading .loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-border, #444);
  border-top-color: var(--color-accent-blue, #61afef);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Masonry card badges (Beginner Friendly, etc.) */
.masonry-card__badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 4;
}

.masonry-card__badge--beginner {
  background: var(--color-accent-green, #98c379);
  color: var(--color-bg, #1a1a1a);
}

.masonry-card__badge--recommended {
  background: var(--color-accent-purple, #c678dd);
  color: var(--color-bg, #1a1a1a);
}

/* DM Suggested badge for Immersive mode */
.masonry-card__badge--dm-suggested {
  background: var(--color-accent-gold, #e5c07b);
  color: var(--color-bg, #1a1a1a);
  animation: dm-glow 2s ease-in-out infinite;
}

@keyframes dm-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(229, 192, 123, 0.4); }
  50% { box-shadow: 0 0 8px rgba(229, 192, 123, 0.7); }
}

/* Override button in masonry cards */
.dm-override-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--color-border, #4a4a4a);
  background: var(--color-bg-alt, #2a2a2a);
  color: var(--color-text-secondary, #888);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.dm-override-btn:hover {
  background: var(--color-accent-gold, #e5c07b);
  color: var(--color-bg, #1a1a1a);
  border-color: var(--color-accent-gold, #e5c07b);
}

/* DM inference container for ability scores preview */
.cp-dm-inference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  margin-bottom: 8px;
  background: rgba(229, 192, 123, 0.15);
  border: 1px solid var(--color-accent-gold, #e5c07b);
  border-radius: 4px;
}

.cp-dm-badge {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-accent-gold, #e5c07b);
  cursor: help;
}

.cp-override-btn {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--color-border, #4a4a4a);
  background: var(--color-bg-alt, #2a2a2a);
  color: var(--color-text-secondary, #888);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cp-override-btn:hover {
  background: var(--color-accent-gold, #e5c07b);
  color: var(--color-bg, #1a1a1a);
  border-color: var(--color-accent-gold, #e5c07b);
}

/* Override notice in narrative pane */
.dm-override-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: rgba(229, 192, 123, 0.1);
  border-left: 3px solid var(--color-accent-gold, #e5c07b);
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: var(--color-text-secondary, #888);
}

.dm-override-notice .override-icon {
  font-size: 14px;
  color: var(--color-accent-gold, #e5c07b);
}

/* Responsive for selection sections */
@media (max-width: 1200px) {
  .selection-section--completed .masonry-options {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .selection-section--completed .masonry-options {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .selection-section--completed .masonry-options {
    column-count: 1;
    max-height: 100px;
  }
}

/* Selection pane scrollable for parallel content */
.pane-selection .pane-content {
  display: block;
  overflow-y: auto;
  padding: 0;
}

/* ============================================
   Origin/World Ties Selection Panel
   ============================================ */

.origin-selection-panel {
  background: var(--panel-bg, rgba(0, 0, 0, 0.85));
  border: 1px solid var(--color-border, #444);
  border-radius: 4px;
  margin: 1rem 0;
  padding: 1rem;
}

.origin-intro {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-dim, #333);
}

.origin-intro-text {
  color: var(--color-text-dim, #888);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

/* Origin Sections (Faction, Mentor, Quest) */
.origin-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--color-bg-dark, rgba(0, 0, 0, 0.3));
  border-radius: 4px;
  border: 1px solid var(--color-border-dim, #333);
}

.origin-section:last-of-type {
  margin-bottom: 1rem;
}

.origin-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.origin-section-icon {
  font-size: 1.2rem;
  opacity: 0.8;
}

.origin-section-title {
  font-weight: 600;
  color: var(--color-text, #ddd);
  flex: 1;
}

.origin-section-desc {
  color: var(--color-text-dim, #888);
  font-size: 0.85rem;
  margin: 0 0 0.75rem 0;
}

/* Skip buttons */
.origin-skip-btn {
  background: transparent;
  border: 1px solid var(--color-border-dim, #444);
  color: var(--color-text-dim, #888);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.origin-skip-btn:hover {
  background: var(--color-bg-hover, rgba(255, 255, 255, 0.05));
  color: var(--color-text, #ddd);
  border-color: var(--color-border, #555);
}

/* Origin Options Container */
.origin-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.origin-no-options {
  color: var(--color-text-dim, #666);
  font-style: italic;
  font-size: 0.85rem;
  padding: 0.5rem;
}

/* Origin Cards (Faction, Mentor, Quest) */
.origin-card {
  background: var(--color-bg-card, rgba(0, 0, 0, 0.4));
  border: 1px solid var(--color-border-dim, #444);
  border-radius: 4px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.origin-card:hover {
  background: var(--color-bg-hover, rgba(255, 255, 255, 0.05));
  border-color: var(--color-border, #555);
}

.origin-card.selected {
  border-color: var(--color-primary, #4a9eff);
  background: var(--color-primary-bg, rgba(74, 158, 255, 0.1));
  box-shadow: 0 0 6px var(--color-primary-glow, rgba(74, 158, 255, 0.3));
}

.origin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.origin-card-title {
  font-weight: 600;
  color: var(--color-text, #ddd);
  font-size: 0.95rem;
}

.origin-card-type {
  font-size: 0.7rem;
  color: var(--color-text-dim, #888);
  background: var(--color-bg-badge, rgba(255, 255, 255, 0.1));
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.origin-card-desc {
  color: var(--color-text-dim, #999);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.origin-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted, #666);
}

.origin-card-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-border-dim, #555);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.15s ease;
}

.origin-card.selected .origin-card-check {
  background: var(--color-primary, #4a9eff);
  border-color: var(--color-primary, #4a9eff);
  color: white;
}

/* Faction-specific styles */
.faction-card .origin-card-type {
  background: var(--color-faction-badge, rgba(156, 39, 176, 0.2));
  color: var(--color-faction, #ce93d8);
}

/* Mentor-specific styles */
.mentor-card .origin-card-type {
  background: var(--color-mentor-badge, rgba(76, 175, 80, 0.2));
  color: var(--color-mentor, #a5d6a7);
}

/* Quest-specific styles */
.quest-card .origin-card-type {
  background: var(--color-quest-badge, rgba(255, 152, 0, 0.2));
  color: var(--color-quest, #ffcc80);
}

/* Skip All Button */
.selection-skip-all-btn {
  background: transparent;
  border: 1px solid var(--color-border-dim, #555);
  color: var(--color-text-dim, #888);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 0.5rem;
}

.selection-skip-all-btn:hover {
  background: var(--color-bg-hover, rgba(255, 255, 255, 0.05));
  color: var(--color-text, #ddd);
  border-color: var(--color-border, #666);
}

/* Confirm button area adjustments for origin panel */
.origin-selection-panel .selection-confirm-area {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-dim, #333);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .origin-options {
    grid-template-columns: 1fr;
  }

  .origin-section {
    padding: 0.75rem;
  }

  .origin-selection-panel .selection-confirm-area {
    flex-direction: column;
  }

  .selection-skip-all-btn {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

/* ==========================================================================
 * DM Warning Panel - Risky Action Confirmation
 * Shows when player attempts risky actions (attacking friendlies, etc.)
 * ========================================================================== */

.dm-warning-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 480px;
  background: var(--bg-elevated, #1e1e2e);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1200;
  animation: warningPanelSlideIn 0.25s ease-out;
  overflow: hidden;
}

@keyframes warningPanelSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Warning header with severity color */
.dm-warning-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
}

.dm-warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.dm-warning-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.dm-warning-close {
  background: none;
  border: none;
  color: var(--text-muted, #666);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.dm-warning-close:hover {
  color: var(--text-primary, #e0e0e0);
}

/* Warning body content */
.dm-warning-body {
  padding: 20px;
}

.dm-warning-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 16px;
}

/* Consequences list */
.dm-warning-consequences {
  margin-bottom: 16px;
}

.dm-warning-consequences-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dm-warning-consequences-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dm-warning-consequences-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}

.dm-warning-consequences-list li::before {
  content: '•';
  color: var(--accent-danger, #f87171);
}

/* Alternatives section */
.dm-warning-alternatives {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-secondary, #252545);
  border-radius: 8px;
}

.dm-warning-alternatives-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dm-warning-alternative-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--bg-tertiary, #2a2a4a);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dm-warning-alternative-btn:last-child {
  margin-bottom: 0;
}

.dm-warning-alternative-btn:hover {
  border-color: var(--accent-primary, #4a9eff);
  background: rgba(74, 158, 255, 0.1);
}

/* Warning actions (confirm/cancel) */
.dm-warning-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color, #3a3a5a);
  background: var(--bg-secondary, #252545);
}

.dm-warning-cancel-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 8px;
  color: var(--text-secondary, #aaa);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dm-warning-cancel-btn:hover {
  background: var(--bg-hover, #2a2a4a);
  color: var(--text-primary, #e0e0e0);
  border-color: var(--text-muted, #666);
}

.dm-warning-confirm-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* ==========================================================================
 * Severity-Based Styling
 * ========================================================================== */

/* CAUTION - Yellow/Warning theme */
.dm-warning-panel.warning-caution {
  border: 2px solid var(--accent-warning, #fbbf24);
}

.dm-warning-panel.warning-caution .dm-warning-header {
  background: rgba(251, 191, 36, 0.1);
  border-bottom-color: rgba(251, 191, 36, 0.3);
}

.dm-warning-panel.warning-caution .dm-warning-icon {
  color: var(--accent-warning, #fbbf24);
}

.dm-warning-panel.warning-caution .dm-warning-confirm-btn {
  background: var(--accent-warning, #fbbf24);
  color: #1a1a2e;
}

.dm-warning-panel.warning-caution .dm-warning-confirm-btn:hover {
  background: #eab308;
}

.dm-warning-panel.warning-caution .dm-warning-consequences-list li::before {
  color: var(--accent-warning, #fbbf24);
}

/* DANGER - Red/Danger theme */
.dm-warning-panel.warning-danger {
  border: 2px solid var(--accent-danger, #f87171);
}

.dm-warning-panel.warning-danger .dm-warning-header {
  background: rgba(248, 113, 113, 0.1);
  border-bottom-color: rgba(248, 113, 113, 0.3);
}

.dm-warning-panel.warning-danger .dm-warning-icon {
  color: var(--accent-danger, #f87171);
}

.dm-warning-panel.warning-danger .dm-warning-confirm-btn {
  background: var(--accent-danger, #f87171);
  color: #fff;
}

.dm-warning-panel.warning-danger .dm-warning-confirm-btn:hover {
  background: #ef4444;
}

/* CRITICAL - Purple/Critical theme with shake animation */
.dm-warning-panel.warning-critical {
  border: 2px solid #a855f7;
  animation: warningPanelSlideIn 0.25s ease-out, criticalPulse 2s ease-in-out infinite;
}

@keyframes criticalPulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(168, 85, 247, 0);
  }
  50% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.4);
  }
}

.dm-warning-panel.warning-critical .dm-warning-header {
  background: rgba(168, 85, 247, 0.15);
  border-bottom-color: rgba(168, 85, 247, 0.3);
}

.dm-warning-panel.warning-critical .dm-warning-icon {
  color: #a855f7;
  animation: criticalShake 0.5s ease-in-out infinite;
}

@keyframes criticalShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.dm-warning-panel.warning-critical .dm-warning-confirm-btn {
  background: #a855f7;
  color: #fff;
}

.dm-warning-panel.warning-critical .dm-warning-confirm-btn:hover {
  background: #9333ea;
}

.dm-warning-panel.warning-critical .dm-warning-consequences-list li::before {
  color: #a855f7;
}

/* Warning overlay backdrop */
.dm-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1199;
  animation: overlayFadeIn 0.2s ease-out;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Expiration timer */
.dm-warning-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #666);
  padding: 8px 20px;
  border-top: 1px solid var(--border-color, #3a3a5a);
}

.dm-warning-timer-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-tertiary, #2a2a4a);
  border-radius: 2px;
  overflow: hidden;
}

.dm-warning-timer-fill {
  height: 100%;
  background: var(--accent-primary, #4a9eff);
  transition: width 1s linear;
}

.dm-warning-panel.warning-caution .dm-warning-timer-fill {
  background: var(--accent-warning, #fbbf24);
}

.dm-warning-panel.warning-danger .dm-warning-timer-fill {
  background: var(--accent-danger, #f87171);
}

.dm-warning-panel.warning-critical .dm-warning-timer-fill {
  background: #a855f7;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .dm-warning-panel,
  .dm-warning-overlay {
    animation: none;
  }

  .dm-warning-panel.warning-critical {
    animation: none;
  }

  .dm-warning-panel.warning-critical .dm-warning-icon {
    animation: none;
  }
}

/* ==========================================================================
 * Rewind Button - Turn undo functionality
 * ========================================================================== */

.rewind-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-secondary, #252545);
  border: 1px solid var(--border-color, #3a3a5a);
  border-radius: 6px;
  color: var(--text-secondary, #aaa);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rewind-button:hover {
  background: var(--bg-hover, #2a2a4a);
  border-color: var(--accent-primary, #4a9eff);
  color: var(--text-primary, #e0e0e0);
}

.rewind-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rewind-button-icon {
  font-size: 14px;
}

.rewind-button-count {
  padding: 2px 6px;
  background: var(--bg-tertiary, #2a2a4a);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* Combat tracker mobile font sizes */
@media (max-width: 640px) {
  .initiative-entry {
    padding: 12px;
    gap: 12px;
  }

  .initiative-roll {
    font-size: 18px;  /* Larger for quick reference (was 14px) */
    font-weight: bold;
    min-width: 36px;
  }

  .participant-name {
    font-size: 16px;  /* Readable (was 14px) */
    font-weight: 500;
  }

  .participant-hp {
    font-size: 15px;  /* Clear HP visibility (was 13px) */
  }

  /* Highlight current turn more prominently on mobile */
  .initiative-entry.current {
    background: rgba(255, 215, 0, 0.2);
    border-left: 4px solid #ffd700;
    padding-left: 16px;
  }
}

/* ============================================
   Form Mode Wizard Layout
   Simple 2-pane layout for quick character creation
   ============================================ */

.creation-wizard {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  height: 100%;
  min-height: 400px;
  padding: 16px;
  background: var(--bg-surface, #1a1a2e);
  box-sizing: border-box;
}

.wizard-selection {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary, #0f0f1a);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  overflow: hidden;
}

.wizard-preview {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary, #0f0f1a);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  overflow: hidden;
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary, #1f1f3a);
  border-bottom: 1px solid var(--border-color, #333);
}

.wizard-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary, #60a5fa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wizard-progress {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--accent-primary, #60a5fa);
  color: var(--bg-primary, #0a0a14);
  border-radius: 12px;
  font-weight: 600;
}

.wizard-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Enforce 3 columns for form mode options */
.masonry-options--three-col {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  column-count: unset !important;  /* Override default column-count */
}

.masonry-options--three-col .masonry-card {
  break-inside: unset;  /* Override for grid layout */
  margin-bottom: 0;     /* Grid handles gaps */
}

/* Form complete summary */
.form-complete {
  text-align: center;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.form-complete__checkmark {
  font-size: 48px;
  color: var(--accent-success, #4ade80);
  margin-bottom: 16px;
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.form-complete__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 24px 0;
}

.form-complete__summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--bg-tertiary, #1f1f3a);
  border-radius: 8px;
  border: 1px solid var(--border-color, #333);
}

.form-complete__summary .summary-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--text-primary, #e0e0e0);
}

.form-complete__summary .summary-label {
  color: var(--text-muted, #666);
  font-weight: 500;
}

.form-complete__message {
  color: var(--text-muted, #666);
  font-size: 13px;
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

/* Responsive: 2 columns on tablet */
@media (max-width: 1024px) {
  .masonry-options--three-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .creation-wizard {
    grid-template-columns: 1fr 280px;
    gap: 12px;
    padding: 12px;
  }
}

/* Responsive: Single column on mobile */
@media (max-width: 640px) {
  .masonry-options--three-col {
    grid-template-columns: 1fr;
  }

  .creation-wizard {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .wizard-preview {
    max-height: 200px;
  }
}

/* ========================================
   Suggestions Panel
   ======================================== */

/* Main container for suggestions panel */
.suggestions-panel-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-4, 16px);
  gap: var(--space-4, 16px);
  background: var(--bg-secondary, #16161f);
}

/* Header section */
.suggestions-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
  padding-bottom: var(--space-3, 12px);
  border-bottom: 1px solid var(--border-color, #333);
}

.suggestions-header .panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0;
}

.suggestions-header .panel-subtitle {
  font-size: 13px;
  color: var(--text-muted, #666);
  margin: 0;
}

/* Scrollable suggestions list */
.suggestions-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  padding: var(--space-2, 8px) 0;
}

/* Individual suggestion item */
.suggestion-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-3, 12px);
  border: 1px solid var(--border-color, #333);
  border-radius: var(--radius-md, 8px);
  background: var(--surface-raised, #1f1f3a);
  cursor: pointer;
  transition: all 0.2s ease;
  gap: var(--space-2, 8px);
}

.suggestion-item:hover {
  border-color: var(--primary, #7c3aed);
  background: var(--surface-hover, #252540);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.suggestion-item.selected {
  border-color: var(--primary, #7c3aed);
  background: var(--surface-hover, #252540);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Suggestion header row with icon, action, and checkbox */
.suggestion-header-row {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
}

.suggestion-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.suggestion-action {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
}

.suggestion-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary, #7c3aed);
}

/* Example suggestions */
.suggestion-examples {
  font-size: 13px;
  color: var(--text-muted, #666);
  padding-left: var(--space-8, 36px); /* Align with action text */
  line-height: 1.4;
}

.suggestion-example-link {
  color: var(--primary, #7c3aed);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.suggestion-example-link:hover {
  color: var(--primary-light, #9f67ff);
  text-decoration: none;
}

/* Footer with batch button and custom input */
.suggestions-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  padding-top: var(--space-3, 12px);
  border-top: 1px solid var(--border-color, #333);
}

.suggestion-batch-btn {
  width: 100%;
  padding: var(--space-3, 12px);
  background: var(--primary, #7c3aed);
  color: white;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-batch-btn:hover {
  background: var(--primary-dark, #6d28d9);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.suggestion-batch-btn:active {
  transform: translateY(0);
}

.suggestion-custom-input {
  width: 100%;
  padding: var(--space-3, 12px);
  background: var(--bg-tertiary, #1f1f3a);
  color: var(--text-primary, #e0e0e0);
  border: 1px solid var(--border-color, #333);
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.suggestion-custom-input:focus {
  outline: none;
  border-color: var(--primary, #7c3aed);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.suggestion-custom-input::placeholder {
  color: var(--text-muted, #666);
}

/* Empty state */
.suggestions-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  text-align: center;
  gap: var(--space-2, 8px);
  padding: var(--space-6, 24px);
}

.suggestions-empty-state p {
  margin: 0;
  color: var(--text-primary, #e0e0e0);
}

.suggestions-empty-state .text-muted {
  font-size: 13px;
  color: var(--text-muted, #666);
  max-width: 300px;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .suggestions-panel-content {
    padding: var(--space-3, 12px);
  }

  .suggestion-item {
    padding: var(--space-2, 8px);
  }

  .suggestion-examples {
    padding-left: var(--space-6, 24px);
  }
}
