/* Hall of Heroes (fullscreen showcase) + Give Inspiration modals */

/* ,  Hall of Heroes fullscreen ,  */
.hoh-root--fullscreen {
  position: fixed;
  inset: 0;
  z-index: 12200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hoh-root--fullscreen.hoh-root--visible {
  opacity: 1;
  pointer-events: auto;
}

.hoh-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(251, 191, 36, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 15% 85%, rgba(124, 115, 255, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 88% 75%, rgba(244, 114, 182, 0.14) 0%, transparent 45%),
    linear-gradient(165deg, #1a1033 0%, #120a24 38%, #0d0818 100%);
  color: #f8fafc;
}

.hoh-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hoh-rays {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 140%;
  height: 70%;
  transform: translateX(-50%);
  background: conic-gradient(
    from 180deg at 50% 100%,
    transparent 0deg,
    rgba(251, 191, 36, 0.07) 18deg,
    transparent 36deg,
    rgba(251, 191, 36, 0.05) 54deg,
    transparent 72deg,
    rgba(251, 191, 36, 0.08) 90deg,
    transparent 108deg,
    rgba(251, 191, 36, 0.04) 126deg,
    transparent 144deg,
    rgba(251, 191, 36, 0.06) 162deg,
    transparent 180deg
  );
  animation: hoh-rays-sway 14s ease-in-out infinite alternate;
  opacity: 0.85;
}

.hoh-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 78% 18%, rgba(251, 191, 36, 0.9), transparent),
    radial-gradient(2px 2px at 44% 68%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 90% 72%, rgba(167, 139, 250, 0.8), transparent),
    radial-gradient(2px 2px at 28% 88%, rgba(251, 191, 36, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 62% 42%, rgba(255, 255, 255, 0.5), transparent);
  animation: hoh-sparkle-drift 18s linear infinite;
}

@keyframes hoh-rays-sway {
  from { transform: translateX(-50%) rotate(-2deg); }
  to { transform: translateX(-50%) rotate(2deg); }
}

@keyframes hoh-sparkle-drift {
  from { transform: translateY(0); opacity: 0.7; }
  50% { opacity: 1; }
  to { transform: translateY(-18px); opacity: 0.7; }
}

.hoh-header {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
}

.hoh-header-text {
  min-width: 0;
}

.hoh-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fef3c7;
  text-shadow: 0 2px 16px rgba(251, 191, 36, 0.35);
}

.hoh-title i {
  color: #fbbf24;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

.hoh-subtitle {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.75);
  font-weight: 500;
}

.hoh-count {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(251, 191, 36, 0.85);
}

.hoh-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hoh-scope-toggle {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.hoh-scope-toggle-btn {
  border: none;
  background: transparent;
  color: rgba(248, 250, 252, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 12px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hoh-scope-toggle-btn + .hoh-scope-toggle-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.hoh-scope-toggle-btn:hover:not(.hoh-scope-toggle-btn--active) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.95);
}

.hoh-scope-toggle-btn--active {
  background: rgba(124, 115, 255, 0.35);
  color: #fef3c7;
}

.hoh-view-toggle {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.9);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.hoh-view-toggle:hover:not(:disabled) {
  background: rgba(124, 115, 255, 0.28);
  border-color: rgba(167, 139, 250, 0.45);
  transform: scale(1.05);
}

.hoh-view-toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hoh-close {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.9);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.hoh-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(248, 113, 113, 0.45);
  transform: scale(1.05);
}

.hoh-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 12px 20px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
  box-shadow:
    inset 0 0 80px rgba(251, 191, 36, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.35);
}

.hoh-wall {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hoh-hoard-card {
  position: absolute;
  width: min(220px, 22vw);
  transform: rotate(var(--hoh-rot, 0deg)) scale(var(--hoh-scale, 0.7));
  opacity: 0.42;
  filter: blur(0.3px);
  animation: hoh-hoard-float var(--hoh-duration, 5.5s) ease-in-out infinite;
  animation-delay: var(--hoh-delay, 0s);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  pointer-events: none;
  will-change: transform;
}

.hoh-wall--refresh .hoh-hoard-card {
  animation: hoh-hoard-pop 0.45s ease backwards;
  animation-delay: calc(var(--hoh-delay, 0s) + 0.04s);
}

@keyframes hoh-hoard-float {
  0%, 100% {
    transform: rotate(var(--hoh-rot, 0deg)) scale(var(--hoh-scale, 0.7)) translate(0, 0);
  }
  20% {
    transform: rotate(calc(var(--hoh-rot, 0deg) + 5deg)) scale(var(--hoh-scale, 0.7)) translate(14px, -12px);
  }
  45% {
    transform: rotate(calc(var(--hoh-rot, 0deg) - 4deg)) scale(calc(var(--hoh-scale, 0.7) * 1.04)) translate(-12px, -6px);
  }
  70% {
    transform: rotate(calc(var(--hoh-rot, 0deg) + 3deg)) scale(var(--hoh-scale, 0.7)) translate(8px, -18px);
  }
  85% {
    transform: rotate(calc(var(--hoh-rot, 0deg) - 2deg)) scale(var(--hoh-scale, 0.7)) translate(-6px, -10px);
  }
}

@keyframes hoh-hoard-pop {
  from {
    opacity: 0;
    transform: rotate(var(--hoh-rot, 0deg)) scale(calc(var(--hoh-scale, 0.7) * 0.6));
  }
  to {
    opacity: 0.42;
    transform: rotate(var(--hoh-rot, 0deg)) scale(var(--hoh-scale, 0.7));
  }
}

.hoh-hoard-card-inner {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 27, 75, 0.72);
  border: 1px solid rgba(167, 139, 250, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: hoh-hoard-inner-drift calc(var(--hoh-duration, 5.5s) * 0.85) ease-in-out infinite;
  animation-delay: calc(var(--hoh-delay, 0s) + 0.4s);
}

@keyframes hoh-hoard-inner-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-4px, 5px) rotate(-1.5deg); }
  66% { transform: translate(5px, -4px) rotate(1.5deg); }
}

.hoh-spotlight-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
  pointer-events: none;
}

.hoh-spotlight-glow {
  position: absolute;
  width: min(520px, 85vw);
  height: min(380px, 55vh);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.28) 0%, transparent 68%);
  animation: hoh-glow-pulse 3.2s ease-in-out infinite;
}

@keyframes hoh-glow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}

.hoh-spotlight-card {
  position: relative;
  width: min(560px, 92vw);
  max-height: min(420px, 58vh);
  overflow: auto;
  padding: 28px 32px 24px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(254, 243, 199, 0.95) 100%);
  border: 2px solid rgba(251, 191, 36, 0.65);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 60px rgba(251, 191, 36, 0.35),
    0 24px 64px rgba(0, 0, 0, 0.45);
  color: #1e1b4b;
  transform-origin: center center;
  pointer-events: auto;
}

.hoh-spotlight-card--enter {
  animation: hoh-spotlight-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hoh-spotlight-card--exit {
  animation: hoh-spotlight-exit 0.48s cubic-bezier(0.55, 0, 0.9, 0.38) forwards;
}

.hoh-spotlight-card--swap {
  opacity: 0;
  transform: scale(0.88);
}

@keyframes hoh-spotlight-enter {
  from {
    opacity: 0;
    transform: scale(0.72) translateY(24px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes hoh-spotlight-exit {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(0.78) translateY(-16px);
    filter: blur(3px);
  }
}

.hoh-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

.hoh-card-giver,
.hoh-card-receiver {
  color: #4338ca;
}

.hoh-card-arrow {
  color: #f59e0b;
  font-size: 0.85rem;
}

.hoh-card-message {
  margin: 0;
  padding: 0;
  border: none;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  font-weight: 600;
  font-style: italic;
  color: #1f2937;
  word-break: break-word;
}

.hoh-card-message.rich-text-content {
  white-space: normal;
  font-style: normal;
  font-weight: 500;
}

.hoh-card-message--compact {
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 500;
  font-style: normal;
  color: #e2e8f0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hoh-hoard-card .hoh-card-giver,
.hoh-hoard-card .hoh-card-receiver {
  color: #c4b5fd;
  font-size: 0.68rem;
}

.hoh-hoard-card .hoh-card-arrow {
  font-size: 0.6rem;
}

.hoh-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 115, 255, 0.15);
}

.hoh-card-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
}

.hoh-card-rewards {
  font-size: 0.78rem;
  font-weight: 700;
  color: #059669;
}

.hoh-progress {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.hoh-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.hoh-progress-dot--active {
  background: #fbbf24;
  transform: scale(1.35);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

.hoh-empty-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
  text-align: center;
}

.hoh-empty-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 2px solid rgba(251, 191, 36, 0.35);
  margin-bottom: 20px;
  animation: hoh-empty-pulse 2.8s ease-in-out infinite;
}

@keyframes hoh-empty-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50% { transform: scale(1.06); box-shadow: 0 0 32px rgba(251, 191, 36, 0.25); }
}

.hoh-empty {
  max-width: 420px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.8);
}

.hoh-scene--cards {
  overflow: hidden;
}

.hoh-card-grid-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 12px 20px;
  padding: 4px 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  background: rgba(0, 0, 0, 0.22);
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow:
    inset 0 0 80px rgba(251, 191, 36, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.35);
}

.hoh-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  padding: 16px 12px 8px;
}

.hoh-grid-card {
  min-width: 0;
}

.hoh-grid-card-inner {
  position: relative;
  height: 100%;
  padding: 20px 22px 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(254, 243, 199, 0.95) 100%);
  border: 2px solid rgba(251, 191, 36, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 8px 28px rgba(0, 0, 0, 0.28);
  color: #1e1b4b;
}

.hoh-grid-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.hoh-grid-card-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  background: rgba(254, 242, 242, 0.95);
  color: #dc2626;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.hoh-grid-card-delete:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: scale(1.05);
}

.hoh-grid-card-delete:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.55);
  outline-offset: 2px;
}

.hoh-grid-card .hoh-card-message {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}

@media (max-width: 640px) {
  .hoh-header {
    padding: 14px 14px 8px;
  }

  .hoh-scope-toggle-btn {
    padding: 0 8px;
    font-size: 0.65rem;
  }

  .hoh-stage {
    margin: 0 8px 12px;
    border-radius: 14px;
  }

  .hoh-spotlight-card {
    padding: 20px 18px 18px;
  }

  .hoh-hoard-card {
    width: min(160px, 38vw);
    opacity: 0.32;
  }

  .hoh-card-grid-stage {
    margin: 0 8px 12px;
    border-radius: 14px;
  }

  .hoh-card-grid {
    gap: 12px;
    padding: 12px 8px 6px;
  }

  .hoh-grid-card-inner {
    padding: 16px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hoh-rays,
  .hoh-sparkles,
  .hoh-hoard-card,
  .hoh-hoard-card-inner,
  .hoh-spotlight-glow,
  .hoh-empty-icon {
    animation: none !important;
  }

  .hoh-spotlight-card--enter,
  .hoh-spotlight-card--exit {
    animation-duration: 0.01ms !important;
  }
}

/* ,  Give Inspiration modal ,  */
.insp-give-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.insp-give-overlay-inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: min(90dvh, 820px);
  display: flex;
  flex-direction: column;
}

.insp-give-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.insp-give-panel {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border-radius: 14px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(15, 23, 42, 0.18));
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 820px);
  overflow: hidden;
  color: var(--color-text);
}

.insp-give-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-modal-shell-start) 0%, var(--color-modal-shell-end) 100%);
}

.insp-give-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.insp-give-title i {
  color: #f59e0b;
}

.insp-give-close {
  border: none;
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insp-give-close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.insp-give-body {
  padding: 16px 18px 18px;
  overflow-y: auto;
}

.insp-give-balance {
  background: var(--color-brand-hover-bg);
  border: 1px solid var(--color-modal-shell-border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--color-primary-text);
  font-weight: 600;
}

.insp-give-form .form-group {
  margin-bottom: 14px;
}

.insp-give-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.insp-give-form select,
.insp-give-form textarea {
  width: 100%;
  border: 2px solid var(--color-input-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  background: var(--color-input-bg);
  color: var(--color-input-text);
}

.insp-give-form select option {
  background: var(--color-input-bg);
  color: var(--color-input-text);
}

.insp-give-form textarea {
  min-height: 88px;
  resize: vertical;
}

.insp-give-form select:focus,
.insp-give-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.insp-give-hint {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.insp-give-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

.insp-give-footer .btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.insp-give-footer .btn-secondary:hover {
  background: var(--color-brand-hover-bg);
  border-color: var(--color-primary);
  color: var(--color-text);
}

/* Rich text editor (inspiration messages) */
.rich-text-editor {
  border: 2px solid var(--color-input-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-input-bg);
}

.rich-text-editor:focus-within {
  border-color: var(--color-primary);
}

.rich-text-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background-secondary);
}

.rich-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.rich-text-btn:hover,
.rich-text-btn:focus-visible {
  background: var(--color-brand-hover-bg);
  color: var(--color-primary-text);
  outline: none;
}

.rich-text-toolbar-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--color-border);
}

.rich-text-surface {
  min-height: 96px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-input-text);
  background: var(--color-input-bg);
}

.rich-text-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--color-text-light);
  pointer-events: none;
}

.rich-text-surface:focus {
  outline: none;
}

.rich-text-counter {
  padding: 4px 10px 8px;
  font-size: 11px;
  color: var(--color-text-secondary);
  text-align: right;
}

.rich-text-counter--over {
  color: #dc2626;
  font-weight: 600;
}

.rich-text-meta {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 4px 10px 8px;
  font-size: 11px;
  color: var(--color-text-secondary);
  background: var(--color-input-bg);
}

.rich-text-meta .rich-text-counter {
  padding: 0;
}

.rich-text-media-counter.rich-text-counter--over {
  color: #dc2626;
  font-weight: 600;
}

.rich-text-surface .rich-text-inline-image,
.rich-text-content .rich-text-inline-image,
.hoh-card-message .rich-text-inline-image {
  display: block;
  max-width: min(100%, 280px);
  max-height: 200px;
  width: auto;
  height: auto;
  margin: 8px auto;
  border-radius: 10px;
  object-fit: contain;
}

.hoh-card-message .rich-text-inline-image {
  max-width: min(100%, 320px);
  max-height: 240px;
}

.gif-picker-root {
  position: fixed;
  inset: 0;
  z-index: 12050;
}

.gif-picker-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gif-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.gif-picker-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(0, 0, 0, 0.25));
  overflow: hidden;
}

.gif-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-modal-shell-start) 0%, var(--color-modal-shell-end) 100%);
}

.gif-picker-title {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}

.gif-picker-close {
  border: none;
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gif-picker-close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.gif-picker-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
}

.gif-picker-tab {
  border: none;
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gif-picker-tab.is-active {
  background: var(--color-brand-hover-bg);
  color: var(--color-primary-text);
}

.gif-picker-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 8px 12px;
  border: 2px solid var(--color-input-border);
  border-radius: 10px;
  background: var(--color-input-bg);
}

.gif-picker-search-wrap i {
  color: var(--color-text-light);
}

.gif-picker-search {
  flex: 1;
  border: none;
  outline: none;
  font: inherit;
  font-size: 14px;
  background: transparent;
  color: var(--color-input-text);
}

.gif-picker-search::placeholder {
  color: var(--color-text-light);
}

.gif-picker-status {
  margin: 10px 16px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.gif-picker-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 12px 16px;
}

.gif-picker-root .gif-picker-item {
  display: block;
  flex: 0 0 calc((100% - 16px) / 3);
  width: calc((100% - 16px) / 3);
  max-width: calc((100% - 16px) / 3);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-background-secondary);
  line-height: 0;
  vertical-align: top;
}

.gif-picker-root .gif-picker-thumb {
  display: block;
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  overflow: hidden;
  background: var(--color-border);
}

.gif-picker-root .gif-picker-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.gif-picker-root .gif-picker-item:hover {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.gif-picker-footer {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  color: var(--color-text-secondary);
}

.gif-picker-powered {
  opacity: 0.85;
}

.rich-text-content p,
.hoh-card-message.rich-text-content p {
  margin: 0 0 0.5em;
}

.rich-text-content p:last-child,
.hoh-card-message.rich-text-content p:last-child {
  margin-bottom: 0;
}

.rich-text-content ul,
.rich-text-content ol,
.hoh-card-message.rich-text-content ul,
.hoh-card-message.rich-text-content ol {
  margin: 0.35em 0 0.5em;
  padding-left: 1.25em;
}

.rich-text-content blockquote,
.hoh-card-message.rich-text-content blockquote {
  margin: 0;
  padding: 0;
  border: none;
  font-style: italic;
}

.insp-message-editor-mount {
  width: 100%;
}

.student-dashboard-layout .action-btn-small.action-inspiration {
  border-left: 3px solid #f59e0b;
}
