/* The feedback box (feedback.js): a native dialog; a bottom sheet on phones. Its own file so the player (play.html) can load it
   too: the site pages load it after site.css, play.html after theme.css. Colours come from theme.css (and site.css's day mode). */
.fb { --card-shadow:0 24px 48px rgba(0,0,0,.5); }
:root[data-theme="light"] .fb { --card-shadow:0 18px 40px rgba(17,17,19,.16); }
/* the box's two buttons, for play.html, which has no site.css (the same look as site.css's .btn) */
.fb .btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 22px; border-radius:999px; font-size:16px; font-weight:600; text-decoration:none; white-space:nowrap; cursor:pointer; border:1px solid transparent; }
.fb .btn.primary { background:var(--accent); color:var(--on-accent); }
.fb .btn.primary:hover { opacity:.86; }
.fb .btn.ghost { color:var(--ink); border-color:var(--edge); background:none; }
.fb .btn.ghost:hover { border-color:var(--ink); }
.fb { width:min(560px, calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; border:1px solid var(--line); border-radius:18px; background:var(--panel); color:var(--ink); box-shadow:var(--card-shadow); }
.fb::backdrop { background:rgba(0,0,0,.55); }
:root[data-theme="light"] .fb::backdrop { background:rgba(17,17,19,.32); }
.fb-form, .fb-done, .fb-fail { padding:22px 22px 20px; }
.fb h2 { margin:0; font-size:22px; font-weight:600; letter-spacing:-.02em; }
.fb-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fb-x { display:grid; place-items:center; width:40px; height:40px; margin:-8px -8px -8px 0; border:0; border-radius:10px; background:none; color:var(--dim); cursor:pointer; }
.fb-x:hover { color:var(--ink); background:var(--panel2); }
.fb-x svg { width:16px; height:16px; }
.fb-lede, .fb-done p, .fb-fail p { margin:6px 0 0; color:var(--dim); font-size:15px; }
.fb-kinds { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; margin:18px 0 0; padding:0; border:0; }
.fb-kinds legend { padding:0; margin-bottom:8px; font-size:14px; color:var(--dim); }
.fb-kind { position:relative; display:block; cursor:pointer; }
.fb-kind input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.fb-kind-t { display:flex; flex-direction:column; gap:2px; min-height:64px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--panel2); }
.fb-kind-t b { font-size:15px; font-weight:600; }
.fb-kind-t small { font-size:12.5px; color:var(--dim); line-height:1.3; }
.fb-kind input:checked + .fb-kind-t { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.fb-kind input:focus-visible + .fb-kind-t { outline:2px solid var(--ink); outline-offset:2px; }
.fb-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
.fb-field { display:flex; flex-direction:column; gap:6px; margin-top:14px; font-size:14px; color:var(--dim); }
.fb-field i { font-style:normal; color:var(--dim); opacity:.8; }
.fb-field select, .fb-field input, .fb-field textarea, .fb-copytext { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--edge); border-radius:10px; background:var(--bg); color:var(--ink); font:inherit; font-size:16px; }
.fb-field textarea, .fb-copytext { resize:vertical; line-height:1.4; }
.fb-copytext { margin-top:14px; font-size:14px; }
.fb-field :focus-visible, .fb-copytext:focus-visible { outline:2px solid var(--ink); outline-offset:1px; }
.fb-err { margin:8px 0 0; color:var(--bad); font-size:14px; }
.fb-note { margin:14px 0 0; color:var(--dim); font-size:13px; }
.fb-foot { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.fb-send[disabled] { opacity:.6; cursor:progress; }
.fb-fab { position:fixed; right:max(16px, env(safe-area-inset-right)); bottom:max(16px, env(safe-area-inset-bottom)); z-index:20; display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 16px 0 14px; border:1px solid var(--edge); border-radius:999px; background:var(--panel); color:var(--ink); font:inherit; font-size:15px; font-weight:600; cursor:pointer; box-shadow:var(--card-shadow); }
.fb-fab:hover { border-color:var(--ink); }
.fb-fab svg { width:18px; height:18px; }
@media (max-width:560px) {
  .fb { width:100vw; max-width:100vw; margin:auto 0 0; border-radius:18px 18px 0 0; border-bottom:0; max-height:92dvh; }
  .fb-form, .fb-done, .fb-fail { padding-bottom:max(20px, env(safe-area-inset-bottom)); }
  .fb-row { grid-template-columns:minmax(0,1fr); gap:0; }
  .fb-kind-t small { display:none; }
  .fb-kind-t { min-height:48px; justify-content:center; }
  .fb-foot .btn { flex:1 1 auto; }
  .fb-form .fb-foot { position:sticky; bottom:0; margin:14px -22px -20px; padding:12px 22px max(16px, env(safe-area-inset-bottom)); background:var(--panel); border-top:1px solid var(--line); }
}
/* opened from a step in the player: where the learner was, sent with the message */
.fb-where { margin:12px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--panel2); color:var(--dim); font-size:14px; line-height:1.4; }
.fb-where b { color:var(--ink); font-weight:600; }
