/* FLAG FOR REVIEW — owner-only in-game control + details panel (owner brief,
   2026-08-03). Reuses aurora-experience-layer.css's --ax-* tokens and the
   exact card/backdrop/chip mechanics live-capture-ui.css already
   established for "small, in-hand, doesn't touch table geometry" controls —
   but on its own .frv-* namespace so this can never collide with the
   Thought Journal's .lc-* singleton if both happen to be open. Positioned
   top-right (Thought Journal owns bottom-right; the Assistant/pot-rail own
   the left edge) so it never overlaps #actionBtns/.aurora-context-dock,
   which is already width-constrained (see aurora-table.css's own warning). */

/* Icon-only (owner request, 2026-08-03) — a compact round button, no label
   text on any state. The accessible name lives on aria-label/title instead
   (set in flag-review-ui.js's applyIconState()), so the control is still
   named for screen readers and on hover/long-press even with nothing
   visible to read. */
.frv-fab{
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 6200; /* same tier as .lc-fab — floats above .sd2-overlay (150) automatically, so it stays visible through settlement with no extra wiring */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--ax-line, rgba(201,160,74,.24));
  background: var(--ax-surface-soft, rgba(8,16,20,.78));
  color: var(--ax-text, #f4f1e8);
  box-shadow: 0 8px 22px rgba(0,0,0,.34);
  cursor: pointer;
  transition: transform 160ms var(--ax-ease, ease), border-color 160ms ease, background 160ms ease;
}
.frv-fab:hover{ border-color: var(--ax-gold, #c9a04a); }
.frv-fab:focus-visible{ outline: 2px solid var(--ax-gold-hi, #e2c36e); outline-offset: 2px; }
.frv-fab:active{ transform: translateY(1px); }
.frv-fab[hidden]{ display: none; }
.frv-fab__icon{ font-size: 17px; line-height: 1; }
.frv-fab.is-flagged{
  border-color: var(--ax-gold, #c9a04a);
  background: linear-gradient(180deg, rgba(234,215,140,.22), rgba(199,155,66,.14));
  color: var(--ax-gold-hi, #e2c36e);
}
.frv-fab.is-error{ border-color: rgba(224,138,138,.7); color: #e08a8a; }
.frv-fab.is-saving{ animation: frv-pulse 1.1s ease-in-out infinite; }
@keyframes frv-pulse{ 0%,100%{ opacity: 1; } 50%{ opacity: .5; } }
@media (prefers-reduced-motion: reduce){
  .frv-fab.is-saving{ animation: none; opacity: .7; }
}

.frv-overlay{
  position: fixed;
  inset: 0;
  z-index: 6400;
  display: grid;
  place-items: center;
  padding:
    max(14px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background: rgba(2,6,9,.56);
  backdrop-filter: blur(6px) saturate(.82);
  -webkit-backdrop-filter: blur(6px) saturate(.82);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.frv-overlay.is-visible{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.frv-card{
  width: min(90vw, 440px);
  max-height: min(88vh, 640px);
  overflow-y: auto;
  border: 1px solid var(--ax-line, rgba(201,160,74,.24));
  border-radius: 18px;
  padding: clamp(16px, 3vh, 22px) clamp(16px, 4vw, 24px);
  color: var(--ax-text, #f4f1e8);
  background:
    linear-gradient(145deg, rgba(21,29,35,.97), rgba(5,10,14,.97)),
    var(--ax-surface, rgba(7,12,17,.94));
  box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateY(12px) scale(.98);
  transition: transform 220ms var(--ax-ease, cubic-bezier(.22,.82,.3,1));
}
.is-visible .frv-card{ transform: translateY(0) scale(1); }

.frv-title{ font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.frv-subtitle{
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ax-muted, #91a0ad);
  letter-spacing: .01em;
}

.frv-field-label{
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ax-muted, #91a0ad);
}

.frv-text{
  width: 100%;
  min-height: 56px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--ax-text, #f4f1e8);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
}
.frv-text:focus-visible{ outline: 2px solid var(--ax-gold-hi, #e2c36e); outline-offset: 1px; }

.frv-tags{ display: flex; flex-wrap: wrap; gap: 6px; }
.frv-tag{
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  color: var(--ax-text, #f4f1e8);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.frv-tag:focus-visible{ outline: 2px solid var(--ax-gold-hi, #e2c36e); outline-offset: 2px; }
.frv-tag.is-selected{
  border-color: var(--ax-gold, #c9a04a);
  background: linear-gradient(180deg, rgba(234,215,140,.22), rgba(199,155,66,.14));
  color: var(--ax-gold-hi, #e2c36e);
}

.frv-status{
  margin-top: 12px;
  min-height: 16px;
  font-size: 12px;
  font-weight: 600;
}
.frv-status--error{ color: #e08a8a; }
.frv-status--success{ color: #8fd6a0; }

.frv-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.frv-btn{
  min-width: 88px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.frv-btn--save{
  border: 1px solid rgba(226,195,110,.64);
  color: #17130a;
  background: linear-gradient(180deg, #ead78c, #c79b42);
  box-shadow: 0 8px 22px rgba(0,0,0,.36);
}
.frv-btn--save:disabled{ opacity: .6; cursor: default; }
.frv-btn--save:active:not(:disabled){ transform: translateY(1px); }
.frv-btn--skip{
  border: 1px solid rgba(255,255,255,.16);
  color: var(--ax-text, #f4f1e8);
  background: rgba(255,255,255,.06);
}
.frv-btn--skip:active{ transform: translateY(1px); }

@media (max-width: 480px), (max-height: 420px){
  .frv-card{ padding: 14px 16px; border-radius: 14px; }
  .frv-btn{ min-height: 40px; }
  .frv-fab{ padding: 0 11px 0 9px; min-height: 36px; }
}

@media (max-height: 380px){
  .frv-card{ max-height: 94vh; }
  .frv-text{ min-height: 40px; }
}
