.game-feedback {
  --feedback-accent: var(--game-accent, #d14d78);
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 24;
  width: min(390px, calc(100% - 72px));
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  pointer-events: none;
}

.game-feedback[hidden] { display: none !important; }

.game-feedback__invite,
.game-feedback__bar,
.game-feedback__panel,
.game-feedback__toast {
  pointer-events: auto;
  border: 1px solid color-mix(in srgb, var(--feedback-accent) 48%, rgba(255, 255, 255, .2));
  background: rgba(13, 18, 24, .94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .44);
  backdrop-filter: blur(14px);
}

.game-feedback__invite {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.game-feedback__invite-open {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.game-feedback__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--feedback-accent) 24%, rgba(255, 255, 255, .04));
  color: color-mix(in srgb, var(--feedback-accent) 70%, white);
}

.game-feedback__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.game-feedback__invite strong { display: block; margin: 1px 0 4px; font-size: .91rem; line-height: 1.2; letter-spacing: 0; }
.game-feedback__invite-copy { display: block; color: rgba(255, 255, 255, .7); font-size: .76rem; line-height: 1.38; }
.game-feedback__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.game-feedback__close:hover,
.game-feedback__close:focus-visible { color: #fff; background: rgba(255, 255, 255, .1); }

.game-feedback__bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.game-feedback__bar svg { width: 15px; height: 15px; fill: none; stroke: color-mix(in srgb, var(--feedback-accent) 74%, white); stroke-width: 1.9; }

.game-feedback__panel {
  width: min(430px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 32px));
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  color-scheme: dark;
}
.game-feedback__panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.game-feedback__eyebrow { margin: 0 0 5px; color: color-mix(in srgb, var(--feedback-accent) 72%, white); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.game-feedback__panel h3 { margin: 0; color: #fff; font-size: 1.08rem; line-height: 1.25; letter-spacing: 0; }
.game-feedback__intro { margin: 10px 0 14px; color: rgba(255, 255, 255, .72); font-size: .82rem; line-height: 1.45; }
.game-feedback__field { display: grid; gap: 6px; margin-top: 12px; color: rgba(255, 255, 255, .82); font-size: .78rem; font-weight: 700; }
.game-feedback__field select,
.game-feedback__field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 7px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0;
}
.game-feedback__field select { min-height: 40px; padding: 8px 10px; }
.game-feedback__field textarea { min-height: 128px; resize: vertical; padding: 10px 11px; line-height: 1.45; }
.game-feedback__field textarea::placeholder { color: rgba(255, 255, 255, .42); }

body.play-page .game-panel .game-feedback__panel h3,
body.play-page .game-feedback__panel h3 { color: #fff; }
body:is([data-theme="sepia"], [data-theme="light"]).play-page .game-feedback__field select,
body:is([data-theme="sepia"], [data-theme="light"]).play-page .game-feedback__field textarea {
  border-color: rgba(255, 255, 255, .17);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  color-scheme: dark;
}
.game-feedback__technical { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; color: rgba(255, 255, 255, .76); font-size: .76rem; line-height: 1.35; cursor: pointer; }
.game-feedback__technical input { margin: 2px 0 0; accent-color: var(--feedback-accent); }
.game-feedback__privacy { margin: 9px 0 0; color: rgba(255, 255, 255, .48); font-size: .68rem; line-height: 1.4; }
.game-feedback__error { min-height: 1.3em; margin: 9px 0 0; color: #ffaaa5; font-size: .74rem; }
.game-feedback__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.game-feedback__actions button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
}
.game-feedback__cancel { background: transparent; color: rgba(255, 255, 255, .78); }
.game-feedback__send { background: var(--feedback-accent); color: #fff; border-color: transparent !important; }
.game-feedback__actions button:disabled { opacity: .55; cursor: wait; }

.game-feedback__success { padding: 12px 0 2px; text-align: center; }
.game-feedback__success-mark { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 10px; border-radius: 50%; background: rgba(64, 194, 131, .18); color: #8af0bc; font-size: 1.2rem; }
.game-feedback__success p { margin: 0; color: rgba(255, 255, 255, .78); font-size: .84rem; line-height: 1.45; }
.game-feedback__toast { margin-top: 8px; padding: 10px 12px; border-radius: 8px; color: #bfffe0; font-size: .8rem; font-weight: 800; text-align: center; }

.player-fullscreen-content { position: relative; }

@media (max-width: 680px) {
  .game-feedback {
    position: fixed;
    left: max(8px, env(safe-area-inset-left));
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 120;
    width: calc(100% - 16px);
  }
  .game-feedback__invite { grid-template-columns: minmax(0, 1fr) 26px; padding: 10px; }
  .game-feedback__invite-open { grid-template-columns: 32px minmax(0, 1fr); }
  .game-feedback__icon { width: 32px; height: 32px; }
  .game-feedback__panel { width: 100%; max-height: min(620px, calc(100dvh - 80px)); padding: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  .game-feedback__invite,
  .game-feedback__bar,
  .game-feedback__panel { animation: game-feedback-in .18s ease-out both; }
  @keyframes game-feedback-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
