/* The feedback window (src/ui/feedback.js), shared by the welcome page and the
   game. Its own palette, the welcome page's: the game's chrome tokens change
   with the lighting mode, and this should look the same wherever it opens. */
.fb-scrim {
  --fb-bg: #15231e; --fb-panel: #1b2c26; --fb-line: #2c4740; --fb-ink: #e6eee4; --fb-dim: #94ab9e;
  --fb-gold: #dfab58; --fb-gold-2: #f0c47c;
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(6, 14, 11, .62);
  animation: fb-fade .18s ease-out;
}
.fb-scrim[hidden] { display: none; }
@keyframes fb-fade { from { opacity: 0; } }
@keyframes fb-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.fb-card {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: linear-gradient(180deg, #1c2f28 0%, var(--fb-bg) 60%);
  color: var(--fb-ink); border: 1px solid var(--fb-line); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  padding: 26px 26px 22px; font: 14px/1.5 Manrope, system-ui, sans-serif;
  animation: fb-rise .22s ease-out;
}
.fb-close {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--fb-dim); font: 24px/1 system-ui; cursor: pointer;
}
.fb-close:hover { background: var(--fb-panel); color: var(--fb-ink); }
.fb-eyebrow { margin: 0 0 4px; font: 500 11px 'DM Mono', monospace; letter-spacing: 1.6px; color: var(--fb-gold); }
.fb-card h2 { margin: 0; font: 800 26px/1.15 'Playfair Display', Georgia, serif; color: #f3f7f1; }
.fb-lede { margin: 6px 0 18px; color: var(--fb-dim); }

.fb-card fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.fb-card legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 13.5px; color: var(--fb-ink); }
.fb-card legend span { font-weight: 500; color: var(--fb-dim); }

.fb-moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fb-moods legend { grid-column: 1 / -1; }
.fb-mood { position: relative; cursor: pointer; }
.fb-mood input, .fb-topic input { position: absolute; opacity: 0; pointer-events: none; }
.fb-mood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px;
  border: 1px solid var(--fb-line); border-radius: 10px; background: var(--fb-panel); transition: transform .12s, border-color .12s, background .12s; }
.fb-face { font-size: 28px; line-height: 1; filter: grayscale(.35); transition: filter .12s, transform .12s; }
.fb-mood-label { font-size: 11.5px; color: var(--fb-dim); text-align: center; }
.fb-mood:hover { transform: translateY(-2px); border-color: #45685c; }
.fb-mood:hover .fb-face { filter: none; }
.fb-mood:has(input:checked) { border-color: var(--fb-gold); background: #2a3a2c; }
.fb-mood:has(input:checked) .fb-face { filter: none; transform: scale(1.15); }
.fb-mood:has(input:checked) .fb-mood-label { color: var(--fb-gold-2); }
.fb-mood:has(input:focus-visible), .fb-topic:has(input:focus-visible) { outline: 2px solid var(--fb-gold); outline-offset: 2px; }

.fb-topics { display: flex; flex-wrap: wrap; gap: 7px; }
.fb-topics legend { width: 100%; }
.fb-topic span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fb-line);
  background: var(--fb-panel); color: var(--fb-dim); font-size: 13px; cursor: pointer; transition: border-color .12s, color .12s; }
.fb-topic:hover span { border-color: #45685c; color: var(--fb-ink); }
.fb-topic input:checked + span { border-color: var(--fb-gold); color: #1d2a1f; background: var(--fb-gold); font-weight: 700; }

.fb-field { display: block; margin: 0 0 14px; }
.fb-field > span { display: block; margin-bottom: 6px; font-weight: 700; font-size: 13.5px; }
.fb-field em { font-style: normal; font-weight: 500; color: var(--fb-dim); }
.fb-field textarea, .fb-field input {
  width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--fb-line);
  background: #101b17; color: var(--fb-ink); font: 14px/1.5 Manrope, system-ui, sans-serif; resize: vertical;
}
.fb-field textarea:focus, .fb-field input:focus { outline: none; border-color: var(--fb-gold); box-shadow: 0 0 0 3px #dfab5833; }
.fb-field textarea::placeholder { color: #6a8578; }

.fb-note { min-height: 1.2em; margin: 0 0 8px; color: #f0a48f; font-size: 13px; }
.fb-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fb-send {
  border: 0; border-radius: 9px; padding: 12px 26px; cursor: pointer;
  background: var(--fb-gold); color: #1f2b1f; font: 800 15px Manrope, system-ui, sans-serif;
  box-shadow: 0 6px 18px #dfab5833; transition: transform .12s, background .12s;
}
.fb-send:hover:not(:disabled) { background: var(--fb-gold-2); transform: translateY(-1px); }
.fb-send:disabled { opacity: .6; cursor: progress; }
.fb-fine { flex: 1; min-width: 180px; font-size: 12px; color: #6f897c; }

.fb-thanks { text-align: center; padding: 18px 6px 6px; }
.fb-thanks[hidden] { display: none; }
.fb-thanks-face { font-size: 54px; line-height: 1; margin-bottom: 8px; animation: fb-rise .3s ease-out; }
.fb-thanks p { color: var(--fb-dim); margin: 8px 0 20px; }

/* The nudge: a small card in the bottom-left corner, once. */
.fb-nudge {
  position: fixed; left: 16px; bottom: 96px; z-index: 8000; max-width: 300px;
  padding: 14px 16px; border-radius: 12px; border: 1px solid #2c4740;
  background: #15231ef2; color: #e6eee4; box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  font: 13.5px/1.45 Manrope, system-ui, sans-serif; animation: fb-rise .25s ease-out;
}
.fb-nudge p { margin: 0 0 10px; }
.fb-nudge b { color: #f0c47c; }
.fb-nudge div { display: flex; gap: 8px; }
.fb-nudge button { border-radius: 8px; padding: 7px 14px; cursor: pointer; font: 700 13px Manrope, system-ui, sans-serif;
  border: 1px solid #2c4740; background: transparent; color: #94ab9e; }
.fb-nudge button[data-yes] { background: #dfab58; border-color: #dfab58; color: #1f2b1f; }

@media (max-width: 520px) {
  .fb-card { padding: 22px 16px 18px; border-radius: 12px; }
  .fb-card h2 { font-size: 22px; }
  .fb-face { font-size: 24px; }
  .fb-mood-label { font-size: 10.5px; }
  .fb-nudge { left: 12px; right: 12px; max-width: none; bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-scrim, .fb-card, .fb-nudge, .fb-thanks-face { animation: none; }
}
