/* The report sheet (report.js): iOS system tokens like plan-ios.css, light; dark under the system's dark or Telegram's
   colour scheme (html[data-theme]). The corner bubble keeps clear of the safe areas and sits under the page's own sheets. */
.rp-ui {
  --rp-blue: #007aff; --rp-red: #ff3b30; --rp-card: #fff; --rp-fill: #f2f2f7; --rp-label: #000; --rp-label2: rgba(60, 60, 67, .6);
  --rp-sep: rgba(60, 60, 67, .29); --rp-seg: rgba(118, 118, 128, .12); --rp-seg-on: #fff; --rp-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .rp-ui {
  --rp-blue: #0a84ff; --rp-red: #ff453a; --rp-card: #1c1c1e; --rp-fill: #2c2c2e; --rp-label: #fff; --rp-label2: rgba(235, 235, 245, .6);
  --rp-sep: rgba(84, 84, 88, .6); --rp-seg: rgba(118, 118, 128, .24); --rp-seg-on: #636366; } }
html[data-theme="dark"] .rp-ui {
  --rp-blue: #0a84ff; --rp-red: #ff453a; --rp-card: #1c1c1e; --rp-fill: #2c2c2e; --rp-label: #fff; --rp-label2: rgba(235, 235, 245, .6);
  --rp-sep: rgba(84, 84, 88, .6); --rp-seg: rgba(118, 118, 128, .24); --rp-seg-on: #636366;
}

/* the bubble: a corner, or a tool in the room's toolbar */
button.rp-fab { position: fixed; z-index: 40; inset-inline-end: max(12px, calc(env(safe-area-inset-right) + 8px)); bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: .5px solid var(--rp-sep); border-radius: 50%;
  background: color-mix(in srgb, var(--rp-card) 88%, transparent); color: var(--rp-label2); box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; opacity: .85; }
button.rp-fab:hover, button.rp-fab:focus-visible { opacity: 1; color: var(--rp-blue); }
.rp-fab svg { width: 20px; height: 20px; }
.rp-tool .ico svg { width: 15px; height: 15px; vertical-align: -3px; }

/* the sheet */
.rp-wrap { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .4); font: 17px/22px var(--rp-font); color: var(--rp-label); }
.rp-sheet { width: min(560px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px;
  background: var(--rp-fill); border-radius: 12px 12px 0 0; padding: 0 16px max(16px, env(safe-area-inset-bottom)); animation: rp-up .22s ease-out; }
@media (min-width: 600px) { .rp-wrap { align-items: center; } .rp-sheet { border-radius: 12px; } }
@keyframes rp-up { from { transform: translateY(24px); opacity: 0; } }
.rp-nav { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; margin: 0 -16px; padding: 0 16px; background: var(--rp-fill); }
.rp-nav b { font-size: 17px; font-weight: 600; white-space: nowrap; }
.rp-ui button.rp-link, .rp-ui button.rp-send { background: none; border: 0; padding: 0; min-height: 44px; color: var(--rp-blue); font: 17px var(--rp-font); cursor: pointer; }
.rp-ui button.rp-send { justify-self: end; font-weight: 600; } .rp-ui button.rp-link { justify-self: start; }
.rp-ui button.rp-send:disabled { opacity: .4; }
.rp-segs { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--rp-seg); }
.rp-ui button.rp-seg { flex: 1; height: 32px; border: 0; border-radius: 7px; background: none; color: var(--rp-label); font: 500 13px var(--rp-font); cursor: pointer; }
.rp-ui button.rp-seg.on { background: var(--rp-seg-on); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.rp-ui textarea.rp-text { width: 100%; box-sizing: border-box; resize: vertical; min-height: 88px; padding: 11px 16px; border: 0; border-radius: 12px; background: var(--rp-card); color: var(--rp-label); font: 17px/22px var(--rp-font); }
.rp-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--rp-card); font-size: 15px; cursor: pointer; }
.rp-check.sub { margin-top: -10px; border-radius: 0 0 12px 12px; border-top: .5px solid var(--rp-sep); padding-inline-start: 44px; color: var(--rp-label2); }
.rp-check:has(+ .rp-check.sub:not([hidden])) { border-radius: 12px 12px 0 0; }
.rp-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--rp-blue); }
.rp-shot { position: relative; align-self: center; line-height: 0; border-radius: 10px; overflow: hidden; border: .5px solid var(--rp-sep); background: var(--rp-card); cursor: crosshair; min-width: 120px; min-height: 80px; }
.rp-shot img { display: block; max-width: 100%; max-height: 42dvh; width: auto; height: auto; }
.rp-shot.busy { min-width: 50%; min-height: 160px; animation: rp-pulse 1.2s ease-in-out infinite; }
@keyframes rp-pulse { 50% { opacity: .5; } }
.rp-pins i { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2.5px solid var(--rp-red); border-radius: 50%; box-sizing: border-box; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8); pointer-events: none; }
.rp-note, .rp-fine, .rp-err { margin: -4px 4px 0; font-size: 13px; line-height: 18px; color: var(--rp-label2); text-align: center; }
.rp-fine { text-align: start; } .rp-err { color: var(--rp-red); } .rp-err:empty { display: none; }
.rp-ui [hidden] { display: none !important; }
