/* GoodsRadar — Framework7 iOS dark (как Translate) */

:root {
  --gr-accent: #6366f1;
  --gr-accent2: #818cf8;
  --gr-surface: #14141f;
  --gr-muted: #8888a0;
  --gr-danger: #ef4444;
  --gr-warn: #f59e0b;
  --gr-ok: #22c55e;
  --gr-radius: 16px;
  --gr-tabbar-h: 49px;
  --gr-safe-top: env(safe-area-inset-top, 0px);
  --gr-safe-bottom: env(safe-area-inset-bottom, 0px);
  --gr-safe-left: env(safe-area-inset-left, 0px);
  --gr-safe-right: env(safe-area-inset-right, 0px);
  --gr-bottom-chrome: calc(var(--gr-tabbar-h) + var(--gr-safe-bottom));
}

/* F7 не дублирует safe-area снизу — отступ только в tabbar */
.views.tabs.safe-areas {
  padding-bottom: 0 !important;
}

.theme-dark {
  --f7-theme-color: var(--gr-accent);
  --f7-theme-color-rgb: 99, 102, 241;
  --f7-bars-bg-color: var(--gr-surface);
  --f7-page-bg-color: #0a0a0f;
  --f7-toggle-active-color: var(--gr-accent);
}

html, body {
  height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  background: #0a0a0f;
  overflow: hidden;
}

html.gr-pwa,
html.gr-pwa body {
  background: #000;
}

html.gr-pwa #app,
html.gr-pwa .views,
html.gr-pwa .view,
html.gr-pwa .page {
  height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

/* F7 safe-areas — в PWA контент на весь экран, отступы только у UI */
html.gr-pwa .views.tabs.safe-areas {
  padding-top: 0 !important;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  html, body {
    overscroll-behavior: none;
  }
}

#app {
  height: 100%;
}

/* MVSE payframe (Liber Exchange) — прозрачная оболочка */
html.lightcase-payframe #lightcase-case,
html.lightcase-payframe #lightcase-content,
html.lightcase-payframe #lightcase-content .lightcase-contentInner,
html[data-lc-type=iframe] #lightcase-case,
html[data-lc-type=iframe] #lightcase-content,
html[data-lc-type=iframe] #lightcase-content .lightcase-contentInner {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

html.lightcase-payframe #lightcase-content iframe,
html[data-lc-type=iframe] #lightcase-content iframe {
  background: transparent !important;
}

#lightcase-overlay,
#lightcase-case,
#lightcase-content,
#lightcase-loading,
a[class*="lightcase-icon-"] {
  z-index: 20001 !important;
}

/* ─── Экран камеры (iPhone-style) ─── */

#view-scan .page-scan-camera {
  background: #000;
}

#view-scan .gr-camera-page {
  position: relative;
  height: 100%;
  padding: 0 !important;
  padding-bottom: 0 !important;
  background: #000;
  overflow: hidden;
}

.gr-camera-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, var(--gr-safe-top)) 16px 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, transparent 100%);
  pointer-events: none;
}

.gr-camera-top > * {
  pointer-events: auto;
}

.gr-camera-brand {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.gr-camera-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gr-top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  appearance: none;
}

.gr-top-icon:active {
  background: rgba(0, 0, 0, 0.55);
}

.gr-top-icon .icon {
  font-size: 18px;
  line-height: 1;
}

.gr-top-icon .icon.hidden {
  display: none;
}

.gr-top-icon-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.gr-top-icon-avatar.hidden {
  display: none;
}

.gr-top-icon--avatar {
  background: rgba(0, 0, 0, 0.25);
}

.gr-coins-float {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--gr-accent2);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gr-camera-banner {
  position: absolute;
  top: max(52px, calc(env(safe-area-inset-top) + 44px));
  left: 12px;
  right: 12px;
  z-index: 11;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #fcd34d;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.gr-camera-banner.hidden {
  display: none !important;
}

/* Баблы активных сканов — сверху, поверх sheet */
.gr-scan-bubbles {
  position: fixed;
  left: 0;
  right: 0;
  top: max(56px, calc(env(safe-area-inset-top) + 48px));
  bottom: auto;
  z-index: 13500;
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 0 14px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  pointer-events: none;
}

.gr-scan-bubbles:not(.is-empty) {
  pointer-events: auto;
}

.gr-scan-bubbles::-webkit-scrollbar {
  display: none;
}

.gr-scan-bubbles.is-empty {
  display: none;
}

.gr-scan-bubble {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gr-scan-bubble-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 20, 32, 0.92);
  border: 2px solid rgba(129, 140, 248, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.gr-scan-bubble-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gr-scan-bubble-thumb .icon {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 64px;
  width: 100%;
  text-align: center;
}

.gr-scan-bubble--ready .gr-scan-bubble-thumb {
  border-color: rgba(52, 211, 153, 0.7);
}

.gr-scan-bubble--error .gr-scan-bubble-thumb {
  border-color: rgba(248, 113, 113, 0.75);
}

.gr-scan-bubble-spin {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.gr-scan-bubble-spin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: gr-spin 0.7s linear infinite;
}

.gr-scan-bubble-done {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  color: #052e16;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.gr-scan-bubble-caption {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.gr-scan-bubble-caption--barcode {
  font-size: 10px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

.gr-scan-bubble-caption--title {
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.92);
}

@keyframes gr-spin {
  to { transform: rotate(360deg); }
}

.scanner-wrap {
  position: absolute;
  inset: 0;
  background: #000;
  touch-action: manipulation;
}

.gr-camera-focus-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border: 2px solid rgba(129, 140, 248, 0.95);
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
  animation: gr-focus-ring 0.65s ease-out forwards;
}

@keyframes gr-focus-ring {
  0% {
    opacity: 1;
    transform: scale(0.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

#video.is-live {
  pointer-events: auto;
}

#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#overlay.hidden {
  display: none;
}

.scanner-placeholder {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: #0a0a0f;
  color: var(--gr-muted);
}

.scanner-placeholder.hidden {
  display: none !important;
}

.gr-placeholder-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
  color: #fff;
}

.scanner-placeholder p {
  margin: 0 0 8px;
  font-size: 16px;
  color: #f0f0f5;
}

.scanner-placeholder .hint {
  font-size: 13px;
  line-height: 1.45;
}

.gr-placeholder-cta {
  margin-top: 12px;
  min-width: 200px;
}

.gr-placeholder-cta + .gr-placeholder-cta {
  margin-top: 10px;
}

/* Десктоп — камера сверху, форма снизу */
.gr-camera-page--desktop {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gr-camera-page--desktop .scanner-wrap {
  position: relative;
  flex: 0 0 clamp(220px, 36vh, 400px);
  height: clamp(220px, 36vh, 400px);
  min-height: 220px;
  inset: unset;
}

.gr-camera-page--desktop .scanner-wrap video,
.gr-camera-page--desktop .scanner-wrap canvas#overlay {
  opacity: 1;
}

.gr-camera-page--desktop .gr-scan-bubbles {
  bottom: auto;
  top: calc(clamp(220px, 36vh, 400px) - 56px);
}

.gr-desktop-camera-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 6;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

.gr-camera-page--desktop .gr-desktop-camera-hint:not(.hidden) {
  display: block;
}

.gr-camera-page--desktop .gr-camera-dock .gr-mode-bubble#btn-torch,
.gr-camera-page--desktop .gr-camera-dock .gr-mode-bubble#btn-scan-hint {
  display: none;
}

.gr-desktop-scan {
  position: relative;
  flex: 1 1 auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px 12px;
  text-align: center;
  overflow-y: auto;
  background: #0a0a0f;
  pointer-events: auto;
}

.gr-desktop-scan > * {
  pointer-events: auto;
}

.gr-desktop-scan-icon {
  font-size: 40px;
  color: var(--gr-accent2);
  margin-bottom: 8px;
  opacity: 0.9;
}

.gr-desktop-scan.hidden {
  display: none !important;
}

.gr-desktop-scan-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.gr-desktop-scan-hint {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--gr-muted);
  max-width: 360px;
}

.gr-manual-form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gr-manual-input-wrap {
  width: 100%;
  text-align: left;
}

.gr-manual-input-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c8c8d8;
}

.gr-manual-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: var(--gr-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gr-manual-input-box:focus-within {
  border-color: var(--gr-accent2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(99, 102, 241, 0.22);
}

.gr-manual-input-icon {
  flex: 0 0 auto;
  font-size: 22px;
  color: var(--gr-accent2);
  opacity: 0.85;
}

.gr-manual-input {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 0;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-align: left;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
}

.gr-manual-input::placeholder {
  font-size: 15px;
  letter-spacing: normal;
  color: var(--gr-muted);
  opacity: 0.85;
}

.gr-manual-input-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gr-muted);
}

.gr-manual-submit {
  height: 48px;
  font-size: 16px;
  font-weight: 600;
}

.gr-desktop-scan-alt {
  margin-top: 20px;
  font-size: 14px;
  color: var(--gr-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gr-desktop-scan-alt .link {
  color: var(--gr-accent2);
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Нижний док — вплотную над tabbar */
#view-scan .gr-camera-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--gr-bottom-chrome);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  pointer-events: none;
}

#view-scan:not(.tab-active) .gr-camera-dock {
  display: none;
}

#view-scan .gr-camera-page--desktop .gr-camera-dock {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  display: flex;
  padding-bottom: max(8px, var(--gr-safe-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.gr-camera-dock > * {
  pointer-events: auto;
}

.photo-strip {
  display: flex;
  gap: 8px;
  padding: 8px 16px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.photo-strip:empty {
  display: none;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.photo-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.gr-photo-open {
  cursor: pointer;
}

.product-hero.gr-photo-open {
  cursor: zoom-in;
}

.gr-mode-scroll {
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 12px 0;
}

.gr-mode-scroll::-webkit-scrollbar {
  display: none;
}

.gr-mode-track {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  padding: 0;
}

.gr-mode-bubble {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: auto;
  min-width: 52px;
  max-width: 136px;
  height: auto;
  min-height: 40px;
  padding: 7px 10px 6px;
  margin: 0;
  border: none;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.15s ease;
}

.gr-mode-bubble .icon {
  font-size: 17px;
  line-height: 1;
}

.gr-mode-bubble span:not(.icon) {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: auto;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.1;
}

.gr-mode-bubble:active {
  transform: scale(0.94);
}

.gr-mode-bubble.is-on {
  background: rgba(250, 204, 21, 0.38);
  color: #fff;
}

.gr-mode-bubble--accent {
  background: rgba(99, 102, 241, 0.45);
  opacity: 0.85;
}

.gr-mode-bubble:disabled {
  cursor: default;
  opacity: 0.7;
}

/* Карточка товара — sheet (как settings-sheet в Translator) */
.sheet-modal.gr-product-sheet {
  --f7-sheet-bg-color: var(--gr-bg, #0f0f14);
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: 92vh !important;
  max-height: 92vh !important;
  max-height: 92dvh !important;
  border-radius: 16px 16px 0 0 !important;
  background: var(--gr-bg, #0f0f14) !important;
  transform: translate3d(0, 100%, 0);
}

.gr-product-sheet.modal-in {
  transform: translate3d(0, 0, 0) !important;
}

.gr-product-sheet.modal-out {
  transform: translate3d(0, 100%, 0) !important;
}

/* F7 actions/dialog поверх карточки товара */
.actions-backdrop,
.actions-modal,
.actions-modal.gr-photo-source-actions {
  z-index: 14500 !important;
}

.dialog-backdrop,
.dialog {
  z-index: 14600 !important;
}

/* Photo browser из карточки товара — popup (11k) был под sheet (12.5k) */
.popup.photo-browser-standalone,
.popup.photo-browser-popup.photo-browser-standalone {
  z-index: 15000 !important;
}

.gr-product-sheet .sheet-modal-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--gr-bg, #0f0f14);
}

.gr-product-sheet-toolbar {
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
  min-height: 44px;
  padding: 14px 52px 8px 16px;
  position: relative;
  z-index: 2;
}

.gr-product-sheet-swipe {
  position: absolute;
  left: 0;
  right: 48px;
  top: 0;
  bottom: 0;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.gr-product-sheet-swipe:active {
  cursor: grabbing;
}

.gr-product-sheet-toolbar .swipe-handler {
  touch-action: none;
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.gr-product-share {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gr-text, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.gr-product-share .icon {
  font-size: 20px;
}

.gr-product-share:active {
  transform: translateY(-50%) scale(0.94);
  background: rgba(255, 255, 255, 0.14);
}

.gr-product-sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.gr-coins-link,
.gr-coins-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--gr-accent2);
  font-size: 15px;
}

.gr-coins-pill {
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
}

.gr-product { margin-top: 0; }

.product-hero-wrap {
  width: 100%;
  max-height: 240px;
  margin-bottom: 12px;
  border-radius: var(--gr-radius);
}

.product-hero-wrap.gr-skel-block {
  height: 180px;
  background: linear-gradient(90deg, #1a1a28 25%, #252535 50%, #1a1a28 75%);
  background-size: 200% 100%;
  animation: gr-skel-shimmer 1.2s ease-in-out infinite;
}

.product-hero {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--gr-radius);
  background: var(--gr-surface);
  margin-bottom: 12px;
}

.gr-product-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.gr-product-text-original {
  color: var(--gr-muted);
  opacity: 0.7;
  font-size: 0.9em;
  line-height: 1.45;
  margin: 0 0 10px;
}

.gr-product-title + .gr-product-text-original {
  margin-top: -2px;
}

.gr-product-desc + .gr-product-text-original {
  margin-top: -6px;
}

.gr-product-ingredients {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 16px 4px;
}

.gr-product-brand {
  color: var(--gr-muted);
  margin-bottom: 8px;
  font-size: 15px;
}

.gr-barcode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 4px 0 14px;
  padding: 12px 14px 10px;
  border: none;
  border-radius: var(--gr-radius);
  background: var(--gr-surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.gr-barcode-card:active {
  transform: scale(0.98);
  background: rgba(99, 102, 241, 0.12);
}

#product-barcode-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin-bottom: 6px;
}

.gr-barcode-digits {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #f0f0f5;
}

.gr-barcode-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--gr-muted);
}

.gr-barcode-hint .icon {
  font-size: 13px;
}

.gr-product-desc {
  font-size: 15px;
  line-height: 1.5;
  margin: 12px 0;
}

.gr-product-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
}

.gr-product-status.hidden {
  display: none !important;
}

.gr-proc-step {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--gr-muted);
}

.gr-proc-step.is-done {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.gr-proc-step.is-pending {
  animation: gr-pulse 1.4s ease-in-out infinite;
}

@keyframes gr-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.gr-skel {
  color: transparent !important;
  border-radius: 8px;
  background: linear-gradient(90deg, #1a1a28 25%, #252535 50%, #1a1a28 75%) !important;
  background-size: 200% 100% !important;
  animation: gr-skel-shimmer 1.2s ease-in-out infinite;
  min-height: 1em;
}

.gr-skel-line {
  height: 14px;
  margin: 8px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #1a1a28 25%, #252535 50%, #1a1a28 75%);
  background-size: 200% 100%;
  animation: gr-skel-shimmer 1.2s ease-in-out infinite;
}

.gr-skel-line:nth-child(2) { width: 88%; }
.gr-skel-line:nth-child(3) { width: 72%; }

@keyframes gr-skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gr-product--loading .price-block.gr-skel-block,
.gr-product--loading #production-info.gr-skel-block {
  min-height: 48px;
}

.gr-profile-id-wrap {
  margin: 0;
  padding: 0 16px 4px;
  text-align: center;
}

/* legacy — удалить после миграции */
.gr-profile-id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 2px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--gr-muted);
  opacity: 0.42;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}

.gr-profile-id:hover,
.gr-profile-id:focus-visible {
  opacity: 0.72;
}

.gr-profile-id-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.gr-app-version {
  display: block;
  margin: 8px 0 24px;
  padding: 16px 12px 0;
  width: 100%;
  font-size: 12px;
  font-family: inherit;
  text-align: center;
  color: var(--gr-muted);
  opacity: 0.45;
  background: none;
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}

.gr-app-version:hover,
.gr-app-version:focus-visible {
  opacity: 0.72;
  outline: none;
}

.gr-app-version:active {
  opacity: 0.9;
}

.gr-app-version[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.gr-product-id {
  margin: 0 0 12px;
  padding: 12px 14px;
}

.gr-product-id-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.gr-product-id-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gr-muted);
}

.gr-product-id-format {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 0 4px;
  word-break: break-all;
}

.gr-product-id-country {
  margin: 0;
  font-size: 13px;
  color: var(--gr-muted);
  line-height: 1.35;
}

.gr-production-note {
  margin: -4px 0 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gr-muted);
}

.gr-production-list {
  margin: 0;
}

.gr-production-row {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gr-production-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gr-production-row dt {
  margin: 0;
  font-size: 13px;
  color: var(--gr-muted);
}

.gr-production-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.gr-confidence {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.gr-confidence--high {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}

.gr-confidence--mid {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.gr-confidence--low {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.gr-confidence--none {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gr-muted);
}

.gr-confidence-hint {
  margin: -4px 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gr-muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.price-block {
  margin: 12px 0 4px;
  background: var(--gr-surface);
  border-radius: var(--gr-radius);
  padding: 14px;
}

.gr-shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px !important;
}

.gr-shop-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--gr-accent2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(129, 140, 248, 0.28);
  -webkit-tap-highlight-color: transparent;
}

.gr-shop-link:active {
  opacity: 0.85;
}

.gr-shop-link .icon {
  font-size: 16px;
}

.gr-shop-link-ext {
  font-size: 12px !important;
  opacity: 0.7;
}

.gr-public-reviews-list {
  margin: 0 0 8px;
}

.gr-public-reviews-list ul {
  margin: 0;
}

.gr-public-review {
  padding: 12px 16px !important;
}

.gr-public-review-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.gr-public-review-rating {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gr-public-review-rating .icon {
  font-size: 18px;
}

.gr-public-review-rating.gr-review-up {
  background: rgba(34, 197, 94, 0.15);
  color: var(--gr-ok);
}

.gr-public-review-rating.gr-review-down {
  background: rgba(239, 68, 68, 0.15);
  color: var(--gr-danger);
}

.gr-public-review-rating.gr-review-mid {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gr-warn);
}

.gr-public-review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gr-public-review-author {
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f5;
}

.gr-public-review-date {
  font-size: 12px;
  color: var(--gr-muted);
}

.gr-public-review-note {
  margin: 10px 0 0 44px;
  font-size: 14px;
  line-height: 1.45;
  color: #d8d8e8;
  white-space: pre-wrap;
}

.gr-public-review-price {
  margin: 6px 0 0 44px;
  font-size: 13px;
  color: var(--gr-accent2);
}

.gr-public-review--skel .gr-skel-line {
  height: 12px;
  margin: 6px 0;
}

.price-main { font-size: 24px; font-weight: 700; }
.price-original { font-size: 13px; color: var(--gr-muted); margin-top: 4px; }

.gr-additives-list .item-title { white-space: normal; }

.additive-risk {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
}

.additive-risk.high { background: rgba(239,68,68,0.2); color: var(--gr-danger); }
.additive-risk.medium { background: rgba(245,158,11,0.2); color: var(--gr-warn); }
.additive-risk.low { background: rgba(34,197,94,0.2); color: var(--gr-ok); }
.additive-risk.unknown { background: #2a2a3d; color: var(--gr-muted); }

.gr-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.gr-gallery::-webkit-scrollbar {
  display: none;
}

.gr-gallery .photo-thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
}

.gr-gallery-item {
  position: relative;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
}

.gr-gallery-item .photo-thumb {
  flex: none;
}

.gr-gallery-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 0;
  cursor: pointer;
}

.gr-gallery-delete .icon {
  font-size: 12px;
  line-height: 1;
}

.gr-gallery-relevance {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  background: rgba(0, 0, 0, 0.72);
  color: #e2e8f0;
  pointer-events: none;
}

.gr-gallery-relevance--high {
  color: #86efac;
}

.gr-gallery-relevance--mid {
  color: #fde68a;
}

.gr-gallery-relevance--low {
  color: #cbd5e1;
}

.gr-gallery-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.gr-gallery-loader::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gr-gallery-spin 0.7s linear infinite;
}

@keyframes gr-gallery-spin {
  to { transform: rotate(360deg); }
}

.gr-gallery-add {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: var(--gr-surface);
  color: var(--gr-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gr-gallery-add .icon {
  font-size: 22px;
  line-height: 1;
}

.gr-gallery-add:active {
  transform: scale(0.96);
}

.review-form .gr-thumb-input {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 8px 0 16px;
}

.review-form .gr-thumb-btn {
  flex: 1;
  max-width: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: var(--gr-surface);
  color: var(--gr-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.review-form .gr-thumb-btn .icon {
  font-size: 30px;
  line-height: 1;
}

.review-form .gr-thumb-btn:active {
  transform: scale(0.96);
}

.review-form .gr-thumb-btn.active#btn-thumb-up,
.review-form .gr-thumb-btn.active.gr-thumb-recommend {
  border-color: rgba(52, 211, 153, 0.65);
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
}

.review-form .gr-thumb-btn.active#btn-thumb-down,
.review-form .gr-thumb-btn.active.gr-thumb-dislike {
  border-color: rgba(248, 113, 113, 0.65);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

.gr-star-rating {
  text-align: center;
  margin: 0 0 16px;
}

.gr-star-rating.hidden {
  display: none;
}

.gr-star-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.gr-star-btn {
  padding: 4px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s ease, transform 0.1s ease;
}

.gr-star-btn .icon {
  font-size: 32px;
}

.gr-star-btn.active {
  color: #fbbf24;
}

.gr-star-btn:active {
  transform: scale(0.92);
}

.gr-star-count {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gr-muted);
}

.gr-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gr-price-row input { flex: 1; }
.gr-price-row select { width: 100px; flex-shrink: 0; }

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toolbar.tabbar {
  --f7-toolbar-height: 49px;
  --f7-safe-area-bottom: 0px;
  --gr-tabbar-h: 49px;
  z-index: 600;
  bottom: 0 !important;
  background: var(--gr-surface);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  padding-bottom: var(--gr-safe-bottom);
  height: var(--gr-bottom-chrome);
  min-height: var(--gr-bottom-chrome);
}

.toolbar.tabbar .toolbar-inner {
  height: var(--gr-tabbar-h);
  min-height: var(--gr-tabbar-h);
  align-items: center;
}

html.gr-pwa .toolbar.tabbar {
  background: #000;
  box-shadow: none;
}

html.gr-pwa .toolbar.tabbar .toolbar-inner {
  height: var(--gr-tabbar-h);
  align-items: center;
}

.toolbar.tabbar .tab-link {
  opacity: 0.72;
}

.toolbar.tabbar .tab-link-active {
  opacity: 1;
  color: var(--gr-accent2);
}

.page-content { padding-bottom: 8px; }

/* ─── История ─── */

.gr-history-list .item-media img {
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.gr-history-noimg {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gr-accent2);
}

.gr-history-noimg .icon {
  font-size: 24px;
}

.gr-history-empty .item-text {
  font-size: 13px;
  color: var(--gr-muted);
}

#profile-history-more-wrap {
  padding-bottom: 8px;
}

.gr-profile-history-title {
  margin-top: 8px;
  margin-bottom: 20px;
}

.gr-profile-history {
  margin-top: 0;
}

/* ─── Профиль ─── */

.gr-profile-page {
  padding-bottom: calc(var(--gr-tabbar-h, 50px) + var(--gr-safe-bottom) + 16px);
}

.gr-profile-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--gr-radius);
}

.gr-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.gr-profile-head-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.gr-profile-hero {
  text-align: center;
  padding-top: 24px;
}

.gr-profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  flex-shrink: 0;
}

.gr-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(99, 102, 241, 0.35);
}

.gr-profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  color: var(--gr-accent2);
}

.gr-profile-avatar--placeholder .icon {
  font-size: 40px;
}

.gr-profile-name {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}

.gr-profile-sub {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--gr-muted);
}

.gr-profile-coins-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gr-profile-coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--gr-accent2);
  font-weight: 600;
  font-size: 14px;
  border: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.gr-profile-coins:hover,
.gr-profile-coins:focus-visible {
  background: rgba(99, 102, 241, 0.2);
}

.gr-profile-coins:active {
  transform: scale(0.97);
}

.gr-energy-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gr-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.gr-energy-help .icon {
  font-size: 20px;
}

.gr-energy-help:hover,
.gr-energy-help:focus-visible {
  color: var(--gr-accent2);
  background: rgba(99, 102, 241, 0.15);
}

.gr-energy-help:active {
  transform: scale(0.94);
}

.gr-energy-help-popover {
  width: min(92vw, 320px);
}

.gr-energy-help-popover .block-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.gr-energy-help-list {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gr-text);
}

.gr-energy-help-list li {
  margin-bottom: 8px;
}

.gr-energy-help-list li:last-child {
  margin-bottom: 0;
}

.gr-profile-id-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.gr-profile-id-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gr-muted);
}

.gr-profile-id-value {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #e8e8f0;
  word-break: break-all;
  line-height: 1.3;
}

.gr-profile-id-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--gr-accent2);
  cursor: pointer;
}

.gr-profile-id-copy .icon {
  font-size: 16px;
}

.gr-profile-stats {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gr-stat-item {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.gr-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.gr-stat-label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--gr-muted);
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
}

.gr-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gr-profile-actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.gr-profile-actions .button.hidden {
  display: none;
}

#btn-mvse-login.hidden,
#btn-mvse-logout.hidden,
#btn-guest-reset.hidden {
  display: none;
}

.gr-profile-coins .icon {
  font-size: 18px;
}

.tabbar .tabbar-label {
  font-size: 10px;
}

.gr-error-panel {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gr-error-panel.hidden {
  display: none !important;
}

.gr-error-panel-inner {
  width: 100%;
  max-width: 480px;
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #1a1a24;
  border: 1px solid rgba(248, 113, 113, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.gr-error-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gr-error-panel-title {
  font-size: 16px;
  color: #fecaca;
}

.gr-error-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.gr-error-panel-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--gr-muted, #9ca3af);
}

.gr-error-panel-text {
  margin: 0;
  flex: 1;
  min-height: 80px;
  max-height: 36vh;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.gr-error-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gr-error-panel-actions .button {
  margin: 0;
}

.gr-report-block {
  margin-top: 20px;
  padding: 8px 0 28px;
  text-align: center;
}

.gr-report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
  padding: 10px 14px;
  border: none;
  background: none;
  color: #ff453a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gr-report-btn .icon {
  font-size: 18px;
}

.gr-report-btn:active {
  opacity: 0.72;
}

.gr-report-sheet {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: auto;
  max-height: 85vh;
  max-height: 85dvh;
  border-radius: 16px 16px 0 0 !important;
  will-change: transform;
}

.gr-report-sheet.modal-in {
  transform: translate3d(0, 0, 0) !important;
}

.gr-report-sheet .sheet-modal-inner {
  border-radius: 16px 16px 0 0;
  background: var(--f7-page-bg-color, #000);
}

.gr-report-sheet-toolbar {
  position: relative;
  min-height: 28px;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.gr-report-sheet-toolbar:active {
  cursor: grabbing;
}

.gr-report-sheet-toolbar .swipe-handler {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.gr-report-sheet-title {
  margin-top: 4px;
  text-align: center;
}

.gr-report-sheet-scroll {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.gr-report-reasons .item-title {
  font-size: 16px;
}

#report-comment {
  min-height: 96px;
  resize: vertical;
}

.gr-settings-sheet {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: auto;
  max-height: 70vh;
  max-height: 70dvh;
  border-radius: 16px 16px 0 0 !important;
  will-change: transform;
}

.gr-settings-sheet.modal-in {
  transform: translate3d(0, 0, 0) !important;
}

.gr-settings-sheet .sheet-modal-inner {
  border-radius: 16px 16px 0 0;
  background: var(--f7-page-bg-color, #000);
}

.gr-ratings-sheet {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: auto;
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 16px 16px 0 0 !important;
  will-change: transform;
}

.gr-ratings-sheet.modal-in {
  transform: translate3d(0, 0, 0) !important;
}

.gr-ratings-sheet .sheet-modal-inner {
  border-radius: 16px 16px 0 0;
  background: var(--f7-page-bg-color, #000);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  max-height: 92dvh;
}

.gr-ratings-sheet-toolbar {
  position: relative;
  min-height: 28px;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
}

.gr-ratings-sheet-toolbar .swipe-handler {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.32);
}

.gr-ratings-sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.gr-ratings-sheet-title {
  margin-top: 4px;
  text-align: center;
}

.gr-ratings-sheet-sub {
  margin: 0 16px 8px;
  text-align: center;
  color: var(--gr-muted, rgba(255, 255, 255, 0.55));
  font-size: 13px;
}

.gr-ratings-list {
  margin-top: 0;
}

.gr-ratings-list .item-link {
  align-items: center;
}

.gr-ratings-rank {
  flex-shrink: 0;
  width: 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gr-muted, rgba(255, 255, 255, 0.5));
  text-align: center;
}

.gr-ratings-rank--top {
  color: #fbbf24;
}

.gr-ratings-list .item-media img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.gr-ratings-noimg {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gr-ratings-noimg .icon {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.35);
}

.gr-ratings-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #fbbf24;
}

.gr-ratings-score .icon {
  font-size: 14px;
}

.gr-ratings-count {
  font-size: 13px;
  color: var(--gr-muted, rgba(255, 255, 255, 0.5));
}

.gr-ratings-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--gr-muted, rgba(255, 255, 255, 0.55));
  font-size: 14px;
}

.gr-ratings-loading {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.gr-ratings-loading.hidden {
  display: none;
}

.gr-ratings-sentinel {
  height: 1px;
}

.gr-ratings-sentinel.hidden {
  display: none;
}

.gr-ratings-footer {
  margin: 0;
  padding: 0 0 8px;
}

.gr-settings-sheet-toolbar {
  position: relative;
  min-height: 28px;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
}

.gr-settings-sheet-toolbar .swipe-handler {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.32);
}

.gr-settings-sheet-title {
  margin-top: 4px;
  text-align: center;
}

.gr-settings-sheet-scroll {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

#view-profile .navbar .right .link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--f7-navbar-text-color, #fff);
}

#view-profile .navbar .right .icon {
  font-size: 22px;
}

.toast.gr-toast-confirm {
  --f7-toast-bg-color: rgba(22, 24, 34, 0.94);
  max-width: min(92vw, 420px);
  margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  backdrop-filter: blur(8px);
}

.toast.gr-toast-confirm .toast-button {
  font-weight: 600;
  color: #a5b4fc;
}

.toast.gr-toast-reward {
  --f7-toast-bg-color: rgba(22, 48, 36, 0.96);
  max-width: min(92vw, 420px);
  margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  backdrop-filter: blur(8px);
  font-weight: 700;
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.25);
}
