/*
 * Ripley Rdio Themes v1.5.0 Test Build 4.2
 * Visual layer for Rdio Scanner v6.6.3 public interface.
 * The admin interface is intentionally left untouched.
 */

:root {
  --ripley-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ripley-radius-sm: 8px;
  --ripley-radius: 14px;
  --ripley-radius-lg: 20px;
  --ripley-control-height: 44px;
  --ripley-shell-max: 1560px;
  --ripley-motion: 160ms ease;
}

html[data-ripley-skin-disabled] .ripley-skin-shell {
  display: none !important;
}

html:not([data-ripley-skin-disabled]) {
  min-width: 320px;
}

html:not([data-ripley-skin-disabled]) body {
  margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Added header: brand, one Theme menu, and browser audio controls             */
/* -------------------------------------------------------------------------- */

.ripley-skin-shell,
.ripley-skin-shell * {
  box-sizing: border-box;
  font-family: var(--ripley-font);
}

.ripley-skin-shell {
  position: relative;
  z-index: 1200;
  width: 100%;
  color: var(--ripley-text, #f4f8ff);
  background: var(--ripley-header, #071426);
  border-bottom: 1px solid var(--ripley-border, #284c72);
  box-shadow: 0 8px 28px var(--ripley-shadow, rgba(0, 0, 0, 0.25));
}

.ripley-skin-header {
  width: min(100%, var(--ripley-shell-max));
  min-height: 82px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ripley-skin-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ripley-skin-brand-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  color: var(--ripley-accent, #26a7ff);
  filter: drop-shadow(0 0 10px var(--ripley-glow, rgba(38, 167, 255, 0.34)));
}

.ripley-skin-brand-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ripley-skin-brand-words {
  min-width: 0;
}

.ripley-skin-title {
  overflow: hidden;
  color: var(--ripley-heading, #f5f9ff);
  font-size: clamp(22px, 2.1vw, 35px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ripley-skin-subtitle {
  margin-top: 5px;
  color: var(--ripley-muted, #9fb3ca);
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.2;
}

.ripley-skin-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ripley-volume-control,
.ripley-theme-button {
  min-height: var(--ripley-control-height);
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: var(--ripley-radius-sm);
  background: var(--ripley-control, rgba(255, 255, 255, 0.06));
  color: var(--ripley-text, #f4f8ff);
}

/* A flat, non-clickable status readout rather than a button-shaped control. */
.ripley-skin-status {
  min-width: 92px;
  min-height: var(--ripley-control-height);
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ripley-muted, #9fb3ca);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
}

.ripley-skin-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #687485;
  box-shadow: 0 0 0 transparent;
}

.ripley-skin-status[data-state="ready"] { color: var(--ripley-accent, #26a7ff); }
.ripley-skin-status[data-state="ready"] .ripley-skin-status-dot {
  background: #2da8ff;
  box-shadow: 0 0 8px rgba(45, 168, 255, 0.52);
}

.ripley-skin-status[data-state="live"] { color: #00d878; }
.ripley-skin-status[data-state="live"] .ripley-skin-status-dot {
  background: #00d878;
  box-shadow: 0 0 9px rgba(0, 216, 120, 0.72);
}

.ripley-skin-status[data-state="paused"] { color: #ffbf25; }
.ripley-skin-status[data-state="paused"] .ripley-skin-status-dot {
  background: #ffbf25;
  box-shadow: 0 0 9px rgba(255, 191, 37, 0.65);
  animation: ripley-blink 1.4s step-end infinite;
}

.ripley-skin-status[data-state="offline"] { color: #ff5165; }
.ripley-skin-status[data-state="offline"] .ripley-skin-status-dot {
  background: #ff5165;
  box-shadow: 0 0 9px rgba(255, 81, 101, 0.62);
}

@keyframes ripley-blink {
  50% { opacity: 0.25; }
}

.ripley-volume-control {
  height: var(--ripley-control-height);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.ripley-icon-button,
.ripley-theme-button,
.ripley-theme-option {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.ripley-icon-button {
  width: 32px;
  height: 32px;
  padding: 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ripley-accent, #26a7ff);
  background: transparent;
  transition: background var(--ripley-motion), color var(--ripley-motion);
}

.ripley-icon-button:hover:not(:disabled),
.ripley-icon-button:focus-visible {
  outline: none;
  color: var(--ripley-heading, #f5f9ff);
  background: var(--ripley-hover, rgba(255, 255, 255, 0.11));
}

.ripley-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ripley-icon-button svg {
  width: 100%;
  height: 100%;
}

.ripley-volume-mute.is-muted {
  color: #ff5165;
}

.ripley-volume-slider {
  --ripley-volume-progress: 50%;
  --ripley-volume-stop-100: 50%;
  --ripley-volume-stop-133: 66.5%;
  --ripley-volume-stop-166: 83%;
  --ripley-volume-color: rgb(35, 201, 107);
  --ripley-volume-track-empty: color-mix(in srgb, var(--ripley-text, #f4f8ff) 18%, var(--ripley-control, #14243a));
  width: clamp(138px, 14vw, 220px);
  height: 24px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
}

.ripley-volume-slider::-webkit-slider-runnable-track {
  height: 10px;
  border: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 78%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(to right, transparent 0 var(--ripley-volume-progress), var(--ripley-volume-track-empty) var(--ripley-volume-progress) 100%),
    linear-gradient(to right,
      rgb(35, 201, 107) 0 var(--ripley-volume-stop-100),
      rgb(227, 185, 0) var(--ripley-volume-stop-133),
      rgb(240, 122, 0) var(--ripley-volume-stop-166),
      rgb(223, 37, 56) 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.42);
}

.ripley-volume-slider::-moz-range-track {
  height: 10px;
  border: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 78%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(to right, transparent 0 var(--ripley-volume-progress), var(--ripley-volume-track-empty) var(--ripley-volume-progress) 100%),
    linear-gradient(to right,
      rgb(35, 201, 107) 0 var(--ripley-volume-stop-100),
      rgb(227, 185, 0) var(--ripley-volume-stop-133),
      rgb(240, 122, 0) var(--ripley-volume-stop-166),
      rgb(223, 37, 56) 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.42);
}

.ripley-volume-slider::-moz-range-progress {
  background: transparent;
}

.ripley-volume-slider::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -6px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: var(--ripley-volume-color);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.58), 0 0 8px color-mix(in srgb, var(--ripley-volume-color) 58%, transparent);
  transition: background 70ms linear, box-shadow 70ms linear;
}

.ripley-volume-slider::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: var(--ripley-volume-color);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.58), 0 0 8px color-mix(in srgb, var(--ripley-volume-color) 58%, transparent);
  transition: background 70ms linear, box-shadow 70ms linear;
}

.ripley-volume-slider:focus-visible::-webkit-slider-thumb {
  outline: 3px solid color-mix(in srgb, var(--ripley-volume-color) 42%, transparent);
  outline-offset: 2px;
}

.ripley-volume-slider:focus-visible::-moz-range-thumb {
  outline: 3px solid color-mix(in srgb, var(--ripley-volume-color) 42%, transparent);
  outline-offset: 2px;
}

.ripley-volume-slider:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ripley-volume-value {
  min-width: 48px;
  color: var(--ripley-volume-color, rgb(35, 201, 107));
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  text-align: right;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  transition: color 70ms linear;
}

.ripley-theme-wrap {
  position: relative;
}

.ripley-theme-button {
  height: var(--ripley-control-height);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color var(--ripley-motion), background var(--ripley-motion), transform var(--ripley-motion);
}

.ripley-theme-button:hover,
.ripley-theme-button:focus-visible,
.ripley-theme-button[aria-expanded="true"] {
  outline: none;
  border-color: var(--ripley-accent, #26a7ff);
  background: var(--ripley-hover, rgba(255, 255, 255, 0.11));
}

.ripley-theme-button:active {
  transform: translateY(1px);
}

.ripley-theme-palette {
  color: var(--ripley-accent, #26a7ff);
  font-size: 17px;
}

.ripley-theme-arrow {
  color: var(--ripley-muted, #9fb3ca);
}

.ripley-theme-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 1400;
  width: 210px;
  padding: 7px;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 12px;
  background: var(--ripley-menu, #101d2e);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.ripley-theme-menu[hidden] {
  display: none !important;
}

.ripley-theme-option {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 28px 1fr 20px;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  color: var(--ripley-text, #f4f8ff);
  background: transparent;
  text-align: left;
  transition: background var(--ripley-motion), color var(--ripley-motion);
}

.ripley-theme-option:hover,
.ripley-theme-option:focus-visible {
  outline: none;
  background: var(--ripley-hover, rgba(255, 255, 255, 0.1));
}

.ripley-theme-option.is-selected {
  color: var(--ripley-active-text, #fff);
  background: var(--ripley-active, #096fe0);
}

.ripley-theme-option-icon {
  color: var(--ripley-accent, #26a7ff);
  font-size: 18px;
  text-align: center;
}

.ripley-theme-option.is-selected .ripley-theme-option-icon {
  color: inherit;
}

.ripley-theme-check {
  visibility: hidden;
  font-weight: 900;
  text-align: center;
}

.ripley-theme-option.is-selected .ripley-theme-check {
  visibility: visible;
}

/* -------------------------------------------------------------------------- */
/* Theme variables                                                              */
/* -------------------------------------------------------------------------- */

html[data-ripley-theme="dark"] {
  --ripley-page: #050910;
  --ripley-page-2: #0a111d;
  --ripley-header: #070d16;
  --ripley-surface: #101824;
  --ripley-surface-2: #141f2e;
  --ripley-display: #08111d;
  --ripley-control: #111d2b;
  --ripley-menu: #101a28;
  --ripley-text: #d9e3ef;
  --ripley-heading: #f6f9fd;
  --ripley-muted: #8ea0b5;
  --ripley-border: #2b3d52;
  --ripley-divider: rgba(159, 179, 201, 0.19);
  --ripley-accent: #4c9cff;
  --ripley-accent-2: #206bd3;
  --ripley-active: #155bb6;
  --ripley-active-text: #ffffff;
  --ripley-hover: rgba(111, 165, 226, 0.13);
  --ripley-shadow: rgba(0, 0, 0, 0.43);
  --ripley-glow: rgba(76, 156, 255, 0.32);
  --ripley-screen-text: #d9f4f4;
}

html[data-ripley-theme="modern"] {
  --ripley-page: #03101f;
  --ripley-page-2: #061a30;
  --ripley-header: #041426;
  --ripley-surface: #08213a;
  --ripley-surface-2: #0b2948;
  --ripley-display: #04182a;
  --ripley-control: #0a2947;
  --ripley-menu: #08233e;
  --ripley-text: #dcecff;
  --ripley-heading: #f3f9ff;
  --ripley-muted: #94b3ce;
  --ripley-border: #25577d;
  --ripley-divider: rgba(111, 180, 229, 0.2);
  --ripley-accent: #19b7ff;
  --ripley-accent-2: #0a6fe1;
  --ripley-active: linear-gradient(135deg, #0785ef, #074cae);
  --ripley-active-text: #ffffff;
  --ripley-hover: rgba(37, 183, 255, 0.14);
  --ripley-shadow: rgba(0, 0, 0, 0.46);
  --ripley-glow: rgba(25, 183, 255, 0.46);
  --ripley-screen-text: #d7f5ff;
}

html[data-ripley-theme="light-gray"] {
  /* Deliberately gray rather than pure white. */
  --ripley-page: #c9cfd7;
  --ripley-page-2: #d5dae1;
  --ripley-header: #dfe3e8;
  --ripley-surface: #edf0f3;
  --ripley-surface-2: #e4e8ec;
  --ripley-display: #d8dfe5;
  --ripley-control: #e8ebef;
  --ripley-menu: #e5e9ed;
  --ripley-text: #1c2b3d;
  --ripley-heading: #0b1f39;
  --ripley-muted: #4b5b6d;
  --ripley-border: #a7b1bd;
  --ripley-divider: rgba(52, 70, 90, 0.17);
  --ripley-accent: #096bcc;
  --ripley-accent-2: #0756a4;
  --ripley-active: linear-gradient(135deg, #0876dc, #0759b7);
  --ripley-active-text: #f4f7fa;
  --ripley-hover: rgba(29, 94, 155, 0.1);
  --ripley-shadow: rgba(28, 42, 57, 0.23);
  --ripley-glow: rgba(9, 107, 204, 0.2);
  --ripley-screen-text: #0b263f;
}

html[data-ripley-theme="hi-vis"] {
  --ripley-page: #020202;
  --ripley-page-2: #090900;
  --ripley-header: #000000;
  --ripley-surface: #050505;
  --ripley-surface-2: #0b0b08;
  --ripley-display: #000000;
  --ripley-control: #080808;
  --ripley-menu: #090900;
  --ripley-text: #ffffff;
  --ripley-heading: #ffffff;
  --ripley-muted: #fff36b;
  --ripley-border: #fff000;
  --ripley-divider: rgba(255, 240, 0, 0.46);
  --ripley-accent: #fff000;
  --ripley-accent-2: #ffd900;
  --ripley-active: linear-gradient(135deg, #075dd3, #043a91);
  --ripley-active-text: #ffffff;
  --ripley-hover: rgba(255, 240, 0, 0.14);
  --ripley-shadow: rgba(0, 0, 0, 0.72);
  --ripley-glow: rgba(255, 240, 0, 0.52);
  --ripley-screen-text: #ffffff;
  --ripley-radius-sm: 5px;
  --ripley-radius: 8px;
  --ripley-radius-lg: 10px;
}

/* -------------------------------------------------------------------------- */
/* Original: keep Rdio's native layout and add only compact tools              */
/* -------------------------------------------------------------------------- */

html[data-ripley-theme="original"] .ripley-skin-shell {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2000;
  width: auto;
  border: 0;
  border-radius: 10px;
  background: rgba(28, 28, 28, 0.94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

html[data-ripley-theme="original"] .ripley-skin-header {
  width: auto;
  min-height: 0;
  padding: 7px;
}

html[data-ripley-theme="original"] .ripley-skin-brand,
html[data-ripley-theme="original"] .ripley-skin-status {
  display: none;
}

html[data-ripley-theme="original"] .ripley-volume-control,
html[data-ripley-theme="original"] .ripley-theme-button {
  border-color: #555;
  color: #f0f0f0;
  background: #262626;
}

html[data-ripley-theme="original"] .ripley-theme-menu {
  border-color: #555;
  color: #f0f0f0;
  background: #262626;
}

html[data-ripley-theme="original"] .ripley-theme-option {
  color: #f0f0f0;
}

html[data-ripley-theme="original"] .ripley-theme-option:hover,
html[data-ripley-theme="original"] .ripley-theme-option:focus-visible {
  background: #3a3a3a;
}

html[data-ripley-theme="original"] .ripley-theme-option.is-selected {
  background: #1769c2;
}

/* -------------------------------------------------------------------------- */
/* Custom public-interface layouts                                             */
/* -------------------------------------------------------------------------- */

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]),
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) body {
  min-height: 100%;
  color: var(--ripley-text);
  background: var(--ripley-page);
  font-family: var(--ripley-font);
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--ripley-accent) 10%, transparent), transparent 34rem),
    linear-gradient(160deg, var(--ripley-page-2), var(--ripley-page) 58%);
  background-attachment: fixed;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) app-root {
  min-height: 0;
  flex: 1 1 auto;
  display: block;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main-page,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-page,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-container,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-container {
  min-height: calc(100vh - 82px) !important;
  height: auto !important;
  color: var(--ripley-text) !important;
  background: transparent !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-content,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-content {
  min-height: calc(100vh - 82px) !important;
  height: auto !important;
  overflow: visible !important;
  align-items: flex-start !important;
  justify-content: center !important;
  color: var(--ripley-text) !important;
  background: transparent !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
  box-sizing: border-box !important;
  width: min(100%, 1540px) !important;
  max-width: none !important;
  min-width: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 20px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 15px !important;
  color: var(--ripley-text) !important;
  font-family: var(--ripley-font) !important;
  user-select: none;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  margin: 0 !important;
  border: 1px solid var(--ripley-border) !important;
  border-radius: var(--ripley-radius) !important;
  color: var(--ripley-text) !important;
  background: var(--ripley-surface) !important;
  box-shadow: 0 12px 34px var(--ripley-shadow) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status {
  min-height: 42px !important;
  padding: 8px 14px !important;
  display: flex !important;
  align-items: center !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-status .branding {
  color: var(--ripley-heading) !important;
  font-family: var(--ripley-font) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-shadow: none !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-status .led {
  width: 14px !important;
  height: 14px !important;
  margin-left: 16px !important;
  border-radius: 999px !important;
  background: #586675 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-status .led.on {
  background: #00d878 !important;
  box-shadow: 0 0 9px rgba(0, 216, 120, 0.72) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
  position: relative !important;
  min-width: 0 !important;
  padding: 16px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.28fr) minmax(350px, 0.82fr) !important;
  grid-auto-flow: row !important;
  column-gap: 18px !important;
  row-gap: 1px !important;
  overflow: hidden !important;
  color: var(--ripley-screen-text) !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ripley-accent) 6%, transparent), transparent 48%),
    var(--ripley-display) !important;
  cursor: default;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display.idle {
  filter: saturate(0.72);
  opacity: 0.9;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
  grid-column: 1 !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  height: 27px !important;
  padding: 0 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: var(--ripley-screen-text) !important;
  font-family: var(--ripley-font) !important;
  font-size: 14px !important;
  line-height: 27px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row > * {
  min-width: 0 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row > *:last-child {
  text-align: right;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.small {
  height: 16px !important;
  color: var(--ripley-muted) !important;
  font-size: 11px !important;
  line-height: 16px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big {
  height: auto !important;
  min-height: 56px !important;
  margin: 7px 0 !important;
  padding: 8px 4px 10px !important;
  border-top: 1px solid var(--ripley-divider) !important;
  border-bottom: 1px solid var(--ripley-divider) !important;
  color: var(--ripley-heading) !important;
  font-size: clamp(25px, 3.2vw, 48px) !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.025em !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .flag {
  color: var(--ripley-display) !important;
  background: var(--ripley-accent) !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
  grid-column: 2 !important;
  grid-row: 1 / span 8 !important;
  min-width: 0 !important;
  min-height: 250px !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid var(--ripley-border) !important;
  border-radius: 11px !important;
  background: var(--ripley-surface-2) !important;
  overflow: hidden !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper::before {
  content: "RECENT CALLS";
  flex: 0 0 auto;
  margin-bottom: 7px;
  color: var(--ripley-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  color: var(--ripley-text) !important;
  font-family: var(--ripley-font) !important;
  font-size: 12px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history td {
  height: 31px !important;
  padding: 0 7px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ripley-divider) !important;
  color: inherit !important;
  text-align: left !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th {
  height: 27px !important;
  color: var(--ripley-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history tr.replaying {
  color: var(--ripley-active-text) !important;
  background: var(--ripley-active) !important;
  font-weight: 800 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .auth {
  z-index: 4;
  color: #172536 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  padding: 14px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
  gap: 10px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control::before {
  content: "QUICK CONTROLS";
  grid-column: 1 / -1;
  margin-bottom: 1px;
  color: var(--ripley-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control > .row {
  display: contents !important;
  margin: 0 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .spacer {
  display: none !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 8px 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 1px solid var(--ripley-border) !important;
  border-radius: 9px !important;
  color: var(--ripley-heading) !important;
  background: var(--ripley-control) !important;
  box-shadow: none !important;
  font-family: var(--ripley-font) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: border-color var(--ripley-motion), background var(--ripley-motion), transform var(--ripley-motion), box-shadow var(--ripley-motion) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button::before {
  display: inline-block;
  min-width: 18px;
  color: var(--ripley-accent);
  font-size: 20px;
  line-height: 1;
}

.rdio-button[data-ripley-action="live"]::before { content: "◉"; }
.rdio-button[data-ripley-action="hold-system"]::before { content: "▣"; }
.rdio-button[data-ripley-action="hold-talkgroup"]::before { content: "▤"; }
.rdio-button[data-ripley-action="replay"]::before { content: "↶"; }
.rdio-button[data-ripley-action="skip"]::before { content: "≫"; }
.rdio-button[data-ripley-action="avoid"]::before { content: "⊘"; }
.rdio-button[data-ripley-action="search"]::before { content: "⌕"; }
.rdio-button[data-ripley-action="pause"]::before { content: "Ⅱ"; }
.rdio-button[data-ripley-action="select"]::before { content: "☷"; }

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button:hover,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button:focus-visible {
  outline: none !important;
  border-color: var(--ripley-accent) !important;
  background: var(--ripley-hover) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ripley-accent) 22%, transparent) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button:active {
  transform: translateY(1px) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.on,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.partial {
  border-color: var(--ripley-accent) !important;
  color: var(--ripley-active-text) !important;
  background: var(--ripley-active) !important;
  box-shadow: 0 0 20px color-mix(in srgb, var(--ripley-accent) 24%, transparent) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.on::before,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.partial::before {
  color: inherit !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-help {
  right: 26px !important;
  bottom: 18px !important;
  color: var(--ripley-muted) !important;
}

/* Search/select side panels stay functional while matching the selected skin. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .panel,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .panel .mat-toolbar {
  color: var(--ripley-text) !important;
  background: var(--ripley-page) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .panel .mat-toolbar {
  border-bottom: 1px solid var(--ripley-border) !important;
}

/* Hi-Vis: stronger outlines and uppercase labels. */
html[data-ripley-theme="hi-vis"] .ripley-skin-shell,
html[data-ripley-theme="hi-vis"] rdio-scanner-main > .rdio-status,
html[data-ripley-theme="hi-vis"] rdio-scanner-main > .rdio-display,
html[data-ripley-theme="hi-vis"] rdio-scanner-main > .rdio-control {
  border-width: 2px !important;
}

html[data-ripley-theme="hi-vis"] .ripley-skin-title,
html[data-ripley-theme="hi-vis"] .ripley-skin-subtitle,
html[data-ripley-theme="hi-vis"] .rdio-status .branding,
html[data-ripley-theme="hi-vis"] .rdio-control::before,
html[data-ripley-theme="hi-vis"] .rdio-display > .wrapper::before {
  color: #fff000 !important;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* Responsive portrait and horizontal-phone layouts                           */
/* -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .ripley-skin-header {
    padding: 10px 14px;
    gap: 12px;
  }

  .ripley-skin-brand-icon {
    width: 46px;
    height: 46px;
  }

  .ripley-skin-status {
    display: none;
  }

  .ripley-volume-control {
    padding-inline: 7px;
  }

  .ripley-volume-slider {
    width: 132px;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr) !important;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .ripley-skin-header {
    min-height: 0;
    padding: 10px 12px 11px;
    flex-wrap: wrap;
  }

  .ripley-skin-brand {
    width: 100%;
  }

  .ripley-skin-brand-icon {
    width: 42px;
    height: 42px;
  }

  .ripley-skin-title {
    font-size: clamp(20px, 6vw, 27px);
  }

  .ripley-skin-subtitle {
    margin-top: 3px;
    font-size: 13px;
  }

  .ripley-skin-tools {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .ripley-volume-control {
    min-width: 0;
    flex: 1 1 auto;
  }

  .ripley-volume-slider {
    width: auto;
    min-width: 58px;
    flex: 1 1 auto;
  }


  .ripley-theme-button {
    padding-inline: 10px;
  }

  .ripley-theme-button > span:nth-child(2) {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main-page,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-page,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-container,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-container,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-content,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-content {
    min-height: 0 !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
    padding: 10px !important;
    gap: 10px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status {
    min-height: 38px !important;
    padding: 7px 11px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
    padding: 12px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 0 !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
    grid-column: 1 !important;
    height: 25px !important;
    font-size: 13px !important;
    line-height: 25px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big {
    min-height: 51px !important;
    font-size: clamp(24px, 8vw, 37px) !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-height: 0 !important;
    margin-top: 12px !important;
    padding: 9px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history {
    font-size: 10px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history td {
    height: 26px !important;
    padding: 0 4px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    padding: 10px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button {
    min-height: 58px !important;
    padding: 6px 3px !important;
    flex-direction: column !important;
    gap: 3px !important;
    font-size: 10px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button::before {
    font-size: 18px !important;
  }

  html[data-ripley-theme="original"] .ripley-skin-shell {
    top: 6px;
    right: 6px;
    left: 6px;
  }

  html[data-ripley-theme="original"] .ripley-skin-tools {
    width: 100%;
  }
}

/* Rotating a phone horizontally changes to a compact, side-by-side layout. */
@media (orientation: landscape) and (max-height: 620px) {
  .ripley-skin-header {
    min-height: 54px;
    padding: 6px 10px;
    gap: 10px;
  }

  .ripley-skin-brand-icon {
    width: 39px;
    height: 39px;
  }

  .ripley-skin-title {
    font-size: clamp(18px, 3.5vw, 27px);
  }

  .ripley-skin-subtitle {
    display: none;
  }

  .ripley-skin-status {
    display: none;
  }

  .ripley-volume-control,
  .ripley-theme-button {
    height: 38px;
    min-height: 38px;
  }

  .ripley-volume-slider {
    width: clamp(108px, 17vw, 154px);
  }


  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main-page,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-page,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-container,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-container,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-content,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-content {
    min-height: 0 !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
    padding: 7px 9px 10px !important;
    gap: 7px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status {
    display: none !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
    padding: 9px !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr) !important;
    column-gap: 10px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
    height: 21px !important;
    font-size: 11px !important;
    line-height: 21px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.small {
    height: 10px !important;
    font-size: 9px !important;
    line-height: 10px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big {
    min-height: 38px !important;
    margin: 3px 0 !important;
    padding: 4px 3px 6px !important;
    font-size: clamp(20px, 4.8vw, 34px) !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
    min-height: 205px !important;
    padding: 7px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper::before {
    margin-bottom: 3px;
    font-size: 9px;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history {
    font-size: 9px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history td {
    height: 23px !important;
    padding: 0 3px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    padding: 7px !important;
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control::before {
    display: none;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button {
    min-height: 43px !important;
    padding: 4px 2px !important;
    flex-direction: column !important;
    gap: 1px !important;
    font-size: 8px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button::before {
    font-size: 14px !important;
  }
}

/* Version 5.0.0: listener modes and the five-button archive catch-up row. */
.rdio-display { position: relative !important; }
.ripley-readout-map {
  position: absolute;
  z-index: 8;
  right: 14px;
  bottom: 12px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #62c88b;
  border-radius: 11px;
  color: #ddffeb;
  background: linear-gradient(180deg, #237645, #0a2d19);
  box-shadow: inset 0 1px #ffffff55, 0 0 0 1px #173e28, 0 5px 12px #0008;
  font: 900 11px/1 var(--ripley-font, system-ui);
  cursor: pointer;
}
.ripley-readout-map[hidden] { display: none !important; }
.ripley-readout-map span {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: #61ff9d;
  box-shadow: 0 0 10px #41ff88;
  animation: ripley-map-ready 1.25s ease-in-out infinite alternate;
}
@keyframes ripley-map-ready { from { opacity: .55; } to { opacity: 1; box-shadow: 0 0 15px #41ff88; } }
.ripley-clear-call-button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 10px;
  color: var(--ripley-heading, #fff);
  background: var(--ripley-control, #112c48);
  font: 900 11px/1 var(--ripley-font, system-ui);
  cursor: pointer;
}
.ripley-clear-call-button.is-on { border-color: #65dd9a; color: #baffd6; box-shadow: 0 0 12px #2bd57655; }
.ripley-clarity-dialog {
  position: fixed;
  z-index: 2147483642;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #f5f9ff;
  background: #020a13dc;
  backdrop-filter: blur(8px);
}
.ripley-clarity-dialog[hidden] { display: none !important; }
.ripley-clarity-panel { width: min(700px, 100%); padding: 20px; border: 1px solid #4078a8; border-radius: 20px; background: linear-gradient(145deg, #122b47, #071626); box-shadow: 0 25px 80px #000c; }
.ripley-clarity-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.ripley-clarity-header strong { display: block; color: #54c5ff; font-size: 25px; }
.ripley-clarity-header span { display: block; margin-top: 4px; color: #a9bdd1; }
.ripley-clarity-header button, .ripley-clarity-reset { min-height: 38px; padding: 7px 12px; border: 1px solid #5e87aa; border-radius: 10px; color: #fff; background: #102d49; font-weight: 900; cursor: pointer; }
.ripley-clarity-enabled { display: block; margin: 18px 0; font-size: 17px; font-weight: 900; }
.ripley-clarity-enabled input { width: 20px; height: 20px; vertical-align: middle; }
.ripley-clarity-bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ripley-clarity-band { display: grid; gap: 8px; padding: 10px; border: 1px solid #294e70; border-radius: 12px; background: #081b2e; text-align: center; }
.ripley-clarity-band strong { font-size: 11px; color: #b9d7ef; }
.ripley-clarity-band input { width: 100%; }
.ripley-clarity-band output { color: #77e6aa; font-weight: 900; }
.ripley-clarity-reset { display: block; margin: 16px auto 0; }
@media (max-width: 620px) { .ripley-clarity-bands { grid-template-columns: 1fr; } .ripley-clarity-band { grid-template-columns: 95px 1fr 55px; align-items: center; } }
.ripley-extra-control-row {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 10px !important;
}
.ripley-scanner-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 14px 8px;
}
.ripley-mode-switcher,
.ripley-install-phone-app,
.ripley-weather-push-alerts {
  display: block;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 9px;
  color: var(--ripley-heading, #fff);
  background: var(--ripley-control, #112c48);
  font: 850 11px/1 var(--ripley-font, system-ui);
  cursor: pointer;
}
.ripley-install-phone-app { border-color: #42c987; background: #0b4a30; }
.ripley-weather-push-alerts { border-color: #ff9e2f; background: #5a2d00; }
.ripley-weather-push-alerts[data-subscribed="true"] { border-color: #50e69a; background: #0b5737; }
.ripley-weather-push-alerts:disabled { opacity: .62; cursor: wait; }
.ripley-install-phone-app[hidden] { display: none !important; }
.ripley-phone-app-help {
  position: fixed;
  z-index: 2147483645;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #f5f9ff;
  background: rgba(2, 10, 19, .92);
  backdrop-filter: blur(9px);
}
.ripley-phone-app-help-panel {
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid #42c987;
  border-radius: 20px;
  background: linear-gradient(145deg, #12334b, #071626);
  box-shadow: 0 28px 90px #000d;
}
.ripley-phone-app-help-panel h2 { margin: 0 0 15px; color: #74e7ae; font-size: 27px; }
.ripley-phone-app-help-panel ol { display: grid; gap: 10px; margin: 0; padding-left: 24px; font-weight: 800; line-height: 1.4; }
.ripley-phone-app-help-panel p { color: #b7cbe0; line-height: 1.45; }
.ripley-phone-app-help-panel button { width: 100%; min-height: 46px; border: 1px solid #55d697; border-radius: 10px; color: #fff; background: #11613f; font-weight: 950; cursor: pointer; }
.ripley-listener-mode-choice {
  position: fixed;
  z-index: 2147483640;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #f5f9ff;
  background: rgba(2, 10, 19, .9);
  backdrop-filter: blur(9px);
}
.ripley-listener-mode-panel {
  width: min(760px, 100%);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #3b709c;
  border-radius: 22px;
  background: linear-gradient(145deg, #132c49, #071626);
  box-shadow: 0 28px 90px #000c;
  text-align: center;
}
.ripley-listener-mode-panel h1 { margin: 0; font-size: clamp(30px, 6vw, 52px); }
.ripley-listener-mode-panel p { margin: 9px 0 22px; color: #aac0d5; font-size: 17px; }
.ripley-listener-mode-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ripley-listener-mode-buttons button {
  min-height: 150px;
  padding: 20px;
  border: 2px solid #48b7ff;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #166fae, #0a3358);
  box-shadow: inset 0 1px #ffffff66, 0 10px 24px #0007;
  cursor: pointer;
}
.ripley-listener-mode-buttons .ripley-mode-advanced { border-color: #63d596; background: linear-gradient(180deg, #197446, #0a3924); }
.ripley-listener-mode-buttons .ripley-mode-install {
  grid-column: 1 / -1;
  min-height: 108px;
  border-color: #ffb347;
  background: linear-gradient(180deg, #985314, #4b2507);
}
.ripley-listener-mode-buttons strong { display: block; font-size: 25px; }
.ripley-listener-mode-buttons span { display: block; margin-top: 9px; color: #deecf8; font: 700 14px/1.4 var(--ripley-font, system-ui); }
@media (max-width: 620px) {
  .ripley-listener-mode-buttons { grid-template-columns: 1fr; }
  .ripley-listener-mode-buttons .ripley-mode-install { grid-column: auto; }
}
.ripley-simple-controls {
  margin: 12px;
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 18px;
  color: var(--ripley-text, #fff);
  background: var(--ripley-surface, #0e2137);
  box-shadow: 0 12px 30px #0005;
}
.ripley-simple-controls[hidden] { display: none !important; }
.ripley-simple-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ripley-simple-heading strong { color: var(--ripley-accent, #28afff); font-size: 18px; letter-spacing: .07em; }
.ripley-simple-heading span { color: var(--ripley-muted, #a7bad0); font-size: 13px; }
.ripley-simple-button-row { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr) 1.25fr; gap: 10px; }
.ripley-simple-button-row button {
  min-height: 70px;
  padding: 10px;
  border: 1px solid #b9bec4;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, #353a40, #080a0d 55%, #20252a);
  box-shadow: inset 0 2px 1px #ffffff70, inset 0 0 0 2px #030507, 0 0 0 1px #858c93, 0 5px 9px #0009;
  font: 900 15px/1.15 var(--ripley-font, system-ui);
  cursor: pointer;
}
.ripley-simple-play { border-color: #50c98a !important; background: linear-gradient(180deg, #287c4e, #0b2919 58%, #17442b) !important; }
.ripley-simple-advanced { border-color: #53b7ff !important; }
html[data-ripley-listener-mode="simple"] rdio-scanner-main .rdio-control,
html[data-ripley-listener-mode="simple"] .history.ripley-recent-history,
html[data-ripley-listener-mode="simple"] .ripley-alert-row,
html[data-ripley-listener-mode="simple"] .ripley-clear-call-button,
html[data-ripley-listener-mode="simple"] #ripley-captions-wrap,
html[data-ripley-listener-mode="simple"] #ripley-scanner-law-warning,
html[data-ripley-listener-mode="simple"] #ripley-rock-solid-shoutout,
html[data-ripley-listener-mode="simple"] .ripley-mode-switcher { display: none !important; }
@media (max-width: 900px) {
  .ripley-extra-control-row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .ripley-simple-button-row { grid-template-columns: 1fr 1fr; }
  .ripley-simple-play, .ripley-simple-advanced { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ripley-listener-mode-buttons { grid-template-columns: 1fr; }
  .ripley-listener-mode-buttons button { min-height: 118px; }
  .ripley-extra-control-row { grid-template-columns: 1fr !important; }
  .ripley-simple-heading { display: grid; }
}

@media (max-width: 560px) {
  .ripley-theme-menu {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 20px);
    overflow: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-skin-shell *,
  .rdio-button {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Preview-only helper, never present in Rdio Scanner itself. */
html.ripley-preview-page body {
  display: block !important;
  overflow-x: hidden;
}

html.ripley-preview-page app-root {
  min-height: 0 !important;
}

.ripley-preview-note {
  box-sizing: border-box;
  width: min(calc(100% - 20px), 760px);
  margin: 0 auto 16px;
  padding: 10px 14px;
  border: 1px solid var(--ripley-border, #31557d);
  border-radius: 10px;
  color: var(--ripley-text, #eaf3ff);
  background: var(--ripley-surface, #10233d);
  font-family: var(--ripley-font);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.ripley-preview-note button {
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid var(--ripley-accent, #26a7ff);
  border-radius: 7px;
  color: var(--ripley-active-text, #fff);
  background: var(--ripley-active, #096fe0);
  font: 700 12px var(--ripley-font);
  cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* v1.3.0 weather-radio button and expiring county alert ticker               */
/* -------------------------------------------------------------------------- */

.ripley-alert-row,
.ripley-alert-row * {
  box-sizing: border-box;
  font-family: var(--ripley-font);
}

.ripley-alert-row {
  width: min(100%, var(--ripley-shell-max));
  min-height: 54px;
  margin: 0 auto;
  padding: 0 22px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.ripley-weather-button {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  min-width: 176px;
  min-height: 43px;
  padding: 5px 12px 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: var(--ripley-radius-sm);
  color: var(--ripley-muted, #9fb3ca);
  background: var(--ripley-control, rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--ripley-motion), color var(--ripley-motion), background var(--ripley-motion), box-shadow var(--ripley-motion), transform 90ms ease;
}

.ripley-weather-button:hover,
.ripley-weather-button:focus-visible {
  outline: none;
  border-color: var(--ripley-accent, #26a7ff);
  color: var(--ripley-heading, #f5f9ff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ripley-accent, #26a7ff) 22%, transparent);
}

.ripley-weather-button:active {
  transform: translateY(1px);
}

.ripley-weather-button > svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.ripley-weather-button-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.02;
}

.ripley-weather-button-copy strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.075em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ripley-weather-state-text {
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ripley-weather-button[data-state="off"] > svg {
  opacity: 0.64;
}

.ripley-weather-button[data-state="loading"] {
  border-color: #279ce8;
  color: #79ceff;
  background: rgba(23, 119, 180, 0.18);
}

.ripley-weather-button[data-state="loading"] > svg,
.ripley-weather-button.is-buffering > svg {
  animation: ripley-weather-pulse 1s ease-in-out infinite;
}

.ripley-weather-button[data-state="manual"] {
  border-color: #16bd72;
  color: #8ff0be;
  background: rgba(7, 151, 84, 0.2);
  box-shadow: 0 0 15px rgba(13, 199, 110, 0.18);
}

.ripley-weather-button[data-state="auto"] {
  border-color: #ff9e2d;
  color: #fff7e6;
  background: linear-gradient(135deg, #c94a00, #ed7e00);
  box-shadow: 0 0 18px rgba(255, 115, 0, 0.42);
  animation: ripley-weather-alert 1s step-end infinite;
}

.ripley-weather-button[data-state="blocked"] {
  border-color: #ffd21d;
  color: #171100;
  background: #ffd21d;
  box-shadow: 0 0 17px rgba(255, 210, 29, 0.42);
  animation: ripley-weather-pulse 1.15s ease-in-out infinite;
}

.ripley-weather-button[data-state="error"] {
  border-color: #f04b5d;
  color: #ffe8eb;
  background: rgba(177, 20, 43, 0.42);
}

@keyframes ripley-weather-pulse {
  50% { opacity: 0.58; }
}

@keyframes ripley-weather-alert {
  50% { filter: brightness(1.42); }
}

.ripley-alert-ticker {
  position: relative;
  min-width: 0;
  min-height: 43px;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: var(--ripley-radius-sm);
  color: var(--ripley-text, #f4f8ff);
  background: color-mix(in srgb, var(--ripley-display, #08111d) 84%, var(--ripley-control, #111d2b));
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.ripley-alert-viewport {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
}

.ripley-alert-track {
  --ripley-alert-distance: 900px;
  --ripley-alert-duration: 24s;
  width: max-content;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: ripley-alert-scroll var(--ripley-alert-duration) linear infinite;
}

.ripley-alert-ticker:hover .ripley-alert-track,
.ripley-alert-ticker:focus-within .ripley-alert-track {
  animation-play-state: paused;
}

.ripley-alert-track.is-empty {
  width: 100%;
  animation: none;
}

.ripley-alert-group {
  min-width: max-content;
  height: 100%;
  padding: 4px 34px 4px 5px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

@keyframes ripley-alert-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--ripley-alert-distance))); }
}

.ripley-alert-item {
  min-height: 32px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: .38em;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #f7fbff;
  background: #445366;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.15;
  letter-spacing: 0.005em;
  cursor: pointer;
  user-select: none;
}

.ripley-alert-item:hover,
.ripley-alert-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: 2px;
  filter: brightness(1.09);
}

.ripley-alert-county,
.ripley-alert-event {
  font-weight: 900;
}

.ripley-alert-ending {
  font-weight: 750;
  opacity: 0.9;
}

/* Requested warning/watch colors. */
.ripley-alert-tornado-warning {
  border-color: #fff;
  color: #fff;
  background: #d70025;
  box-shadow: 0 0 13px rgba(255, 0, 41, 0.6);
  font-weight: 900;
}

.ripley-alert-tornado-warning.is-flashing {
  animation: ripley-tornado-flash 0.78s step-end infinite;
}

@keyframes ripley-tornado-flash {
  50% {
    color: #d70025;
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
}

.ripley-alert-flood-blue,
.ripley-alert-ice-storm-warning {
  border-color: #a9d6ff;
  color: #fff;
  background: #1263c7;
}

.ripley-alert-severe-watch {
  border-color: #fff2a8;
  color: #171200;
  background: #ffd31a;
}

.ripley-alert-severe-warning,
.ripley-alert-high-wind-warning {
  border-color: #ffd0a0;
  color: #211000;
  background: #ff8614;
}

.ripley-alert-snow-squall-warning {
  border-color: #cdd8e3;
  color: #111820;
  background: #fff;
  box-shadow: 0 0 11px rgba(255, 255, 255, 0.5);
}

.ripley-alert-tornado-watch {
  border-color: #ffb0bc;
  color: #fff;
  background: #a8173d;
}

.ripley-alert-winter-warning {
  border-color: #d9c7ff;
  color: #fff;
  background: #6944b5;
}

.ripley-alert-generic-warning,
.ripley-alert-local-red {
  border-color: #ffc0c7;
  color: #fff;
  background: #b6233b;
}

.ripley-alert-generic-watch {
  border-color: #ffe898;
  color: #211900;
  background: #e5b900;
}

.ripley-alert-local {
  border-color: #a9c9e7;
  color: #fff;
  background: #3b5d7a;
}

.ripley-alert-empty {
  width: 100%;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  color: var(--ripley-muted, #9fb3ca);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.015em;
}

.ripley-alert-source-status {
  width: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--ripley-border, #284c72);
  color: #22c978;
  background: color-mix(in srgb, var(--ripley-control, #111d2b) 88%, transparent);
  font-size: 9px;
  cursor: help;
}

.ripley-alert-source-status[data-state="stale"] {
  color: #ffbe2e;
  font-size: 14px;
  font-weight: 900;
}

.ripley-alert-live-region {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* The Original theme still keeps Rdio's native scanner, but the alert strip
   needs enough width to remain useful. */
html[data-ripley-theme="original"] .ripley-skin-shell {
  width: min(calc(100vw - 20px), 820px);
}

html[data-ripley-theme="original"] .ripley-skin-header {
  justify-content: flex-end;
}

html[data-ripley-theme="original"] .ripley-alert-row {
  width: 100%;
  padding: 0 7px 7px;
}

html[data-ripley-theme="original"] .ripley-alert-ticker,
html[data-ripley-theme="original"] .ripley-weather-button {
  border-color: #555;
  color: #f0f0f0;
  background-color: #262626;
}

/* The added alert row increases the desktop shell height from about 82px to
   about 136px. Mobile rules below already use natural height. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main-page,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-page,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-container,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-container,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-content,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-content {
  min-height: calc(100vh - 136px) !important;
}

@media (max-width: 980px) {
  .ripley-alert-row {
    padding: 0 14px 10px;
  }

  .ripley-weather-button {
    min-width: 154px;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .ripley-alert-row {
    min-height: 50px;
    padding: 0 10px 9px;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 7px;
  }

  .ripley-weather-button {
    min-width: 0;
    min-height: 41px;
    padding-inline: 7px;
    gap: 5px;
  }

  .ripley-weather-button > svg {
    width: 24px;
    height: 24px;
  }

  .ripley-weather-button-copy strong {
    font-size: 8px;
  }

  .ripley-weather-state-text {
    font-size: 10px;
  }

  .ripley-alert-ticker {
    min-height: 41px;
  }

  .ripley-alert-item {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .ripley-alert-source-status {
    width: 19px;
    flex-basis: 19px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .ripley-alert-row {
    min-height: 40px;
    padding: 0 10px 5px;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 7px;
  }

  .ripley-weather-button,
  .ripley-alert-ticker {
    min-height: 35px;
    height: 35px;
  }

  .ripley-weather-button {
    min-width: 0;
    padding: 3px 7px;
  }

  .ripley-weather-button > svg {
    width: 22px;
    height: 22px;
  }

  .ripley-weather-button-copy strong {
    display: none;
  }

  .ripley-weather-state-text {
    margin: 0;
    font-size: 10px;
  }

  .ripley-alert-item {
    min-height: 27px;
    padding: 4px 9px;
    font-size: 10px;
  }
}

@media (max-width: 390px) and (orientation: portrait) {
  .ripley-alert-row {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .ripley-weather-button-copy strong {
    display: none;
  }

  .ripley-weather-state-text {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-alert-track {
    width: 100%;
    overflow: hidden;
    animation: none !important;
    transform: none !important;
  }

  .ripley-alert-group + .ripley-alert-group {
    display: none;
  }

  .ripley-alert-tornado-warning.is-flashing,
  .ripley-weather-button[data-state="auto"],
  .ripley-weather-button[data-state="blocked"],
  .ripley-weather-button[data-state="loading"] > svg,
  .ripley-weather-button.is-buffering > svg {
    animation: none !important;
  }
}

@media (max-width: 720px) and (orientation: portrait),
       (orientation: landscape) and (max-height: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main-page,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-page,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-container,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-container,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) mat-sidenav-content,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .mat-sidenav-content {
    min-height: 0 !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Automatic speech-to-text captions and searchable broadcast archive link    */
/* -------------------------------------------------------------------------- */

.ripley-captions-wrap,
.ripley-captions-wrap * {
  box-sizing: border-box;
  font-family: var(--ripley-font);
}

.ripley-captions-wrap {
  position: relative;
  z-index: 40;
  width: min(calc(100% - 28px), var(--ripley-shell-max));
  margin: 18px auto 28px;
  color: var(--ripley-text, #f4f8ff);
}

.ripley-captions-panel {
  overflow: visible;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: var(--ripley-radius-lg);
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--ripley-card, #10243d) 96%, transparent),
      color-mix(in srgb, var(--ripley-page, #071426) 97%, transparent));
  box-shadow: 0 18px 48px var(--ripley-shadow, rgba(0, 0, 0, .28));
}

.ripley-captions-header {
  min-height: 76px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
}

.ripley-captions-heading-wrap {
  min-width: 0;
}

.ripley-captions-eyebrow {
  display: block;
  color: var(--ripley-accent, #26a7ff);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
}

.ripley-captions-heading {
  margin: 3px 0 0;
  color: var(--ripley-heading, #f5f9ff);
  font-size: clamp(20px, 2.3vw, 30px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.ripley-caption-status {
  min-height: 38px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 999px;
  color: var(--ripley-muted, #9fb3ca);
  background: color-mix(in srgb, var(--ripley-control, #111d2b) 92%, transparent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .055em;
  white-space: nowrap;
}

.ripley-caption-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #728397;
}

.ripley-caption-status[data-state="finding"] {
  color: #8ed1ff;
  border-color: #347cab;
}
.ripley-caption-status[data-state="finding"] .ripley-caption-status-dot {
  background: #2ea9ff;
  box-shadow: 0 0 8px #2ea9ffaa;
  animation: ripley-caption-pulse 1.1s ease-in-out infinite;
}
.ripley-caption-status[data-state="working"] {
  color: #ffdd78;
  border-color: #927125;
}
.ripley-caption-status[data-state="working"] .ripley-caption-status-dot {
  background: #ffc43d;
  box-shadow: 0 0 8px #ffc43daa;
  animation: ripley-caption-pulse 1s ease-in-out infinite;
}
.ripley-caption-status[data-state="ready"] {
  color: #82efad;
  border-color: #278b54;
}
.ripley-caption-status[data-state="ready"] .ripley-caption-status-dot {
  background: #25d77c;
  box-shadow: 0 0 8px #25d77caa;
}
.ripley-caption-status[data-state="setup"],
.ripley-caption-status[data-state="error"] {
  color: #ffd0d6;
  border-color: #b84a59;
}
.ripley-caption-status[data-state="setup"] .ripley-caption-status-dot,
.ripley-caption-status[data-state="error"] .ripley-caption-status-dot {
  background: #ff5268;
  box-shadow: 0 0 8px #ff526899;
}

@keyframes ripley-caption-pulse {
  50% { opacity: .35; transform: scale(.8); }
}

.ripley-captions-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.ripley-caption-action,
.ripley-caption-share-option {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 9px;
  color: var(--ripley-text, #f4f8ff);
  background: var(--ripley-control, #14263b);
  font: 900 11px/1 var(--ripley-font);
  letter-spacing: .035em;
  text-decoration: none;
  cursor: pointer;
}

.ripley-caption-action {
  min-height: 39px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ripley-caption-archive {
  color: #eff8ff;
  border-color: color-mix(in srgb, var(--ripley-accent, #26a7ff) 72%, #fff 8%);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--ripley-accent, #168ef0) 86%, #fff 8%),
    color-mix(in srgb, var(--ripley-accent, #0874cf) 82%, #000 12%));
}

.ripley-caption-map {
  color: #f2fff6;
  border-color: #5fcf86;
  background: linear-gradient(180deg, #26864b, #135b31);
}

.ripley-caption-contacts {
  color: #f3fff9;
  border-color: color-mix(in srgb, #20d49a 68%, var(--ripley-border, #284c72));
  background: linear-gradient(180deg,
    color-mix(in srgb, #17b985 78%, var(--ripley-control, #14263b)),
    color-mix(in srgb, #087f62 82%, var(--ripley-control, #14263b)));
}

html[data-ripley-theme="light-gray"] .ripley-caption-contacts {
  color: #ffffff;
  border-color: #08735a;
}

html[data-ripley-theme="hi-vis"] .ripley-caption-contacts {
  color: #000000;
  border-color: #fff000;
  background: #00ff8c;
}

.ripley-caption-action:hover,
.ripley-caption-action:focus-visible,
.ripley-caption-share-option:hover,
.ripley-caption-share-option:focus-visible {
  outline: none;
  filter: brightness(1.12);
}

.ripley-caption-action:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: none;
}

.ripley-caption-share-wrap {
  position: relative;
}

.ripley-caption-share-menu {
  position: absolute;
  z-index: 1600;
  top: calc(100% + 7px);
  right: 0;
  width: 180px;
  padding: 7px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 12px;
  background: var(--ripley-header, #071426);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .48);
}

.ripley-caption-share-menu[hidden] {
  display: none !important;
}

.ripley-caption-share-option {
  min-height: 39px;
  padding: 9px 11px;
  text-align: left;
}

.ripley-caption-share-option[data-share-kind="facebook"] {
  color: #fff;
  border-color: #4a91ec;
  background: #1769d2;
}

.ripley-caption-share-message {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: max-content;
  max-width: 260px;
  color: #78eca6;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.ripley-caption-metadata {
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 1.35fr .8fr .9fr;
  gap: 9px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
}

.ripley-caption-meta-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 78%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--ripley-control, #111d2b) 78%, transparent);
}

.ripley-caption-meta-label {
  display: block;
  color: var(--ripley-muted, #9fb3ca);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .08em;
}

.ripley-caption-meta-value {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ripley-heading, #f5f9ff);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ripley-caption-transcript {
  min-height: 126px;
  max-height: 300px;
  margin: 16px 18px 10px;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--ripley-accent, #26a7ff) 38%, var(--ripley-border, #284c72));
  border-radius: 13px;
  color: var(--ripley-heading, #f5f9ff);
  background: color-mix(in srgb, var(--ripley-page, #071426) 88%, #000 4%);
  box-shadow: inset 0 2px 9px rgba(0, 0, 0, .22);
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 720;
  line-height: 1.6;
  letter-spacing: .004em;
  white-space: pre-wrap;
}

.ripley-caption-transcript.is-placeholder {
  display: flex;
  align-items: center;
  color: var(--ripley-muted, #9fb3ca);
  font-size: 15px;
  font-weight: 650;
  font-style: italic;
}

.ripley-captions-footer {
  padding: 0 18px 15px;
  color: var(--ripley-muted, #9fb3ca);
  font-size: 11px;
  line-height: 1.45;
}

.ripley-captions-footer p {
  margin: 4px 0;
}

.ripley-caption-accuracy strong {
  color: var(--ripley-text, #f4f8ff);
}

.ripley-caption-live-region {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.ripley-work-in-progress {
  margin: 11px auto 0;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--ripley-accent, #26a7ff) 45%, var(--ripley-border, #284c72));
  border-radius: 12px;
  color: var(--ripley-heading, #f5f9ff);
  background: color-mix(in srgb, var(--ripley-control, #111d2b) 88%, transparent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .015em;
  text-align: center;
}

html[data-ripley-theme="light-gray"] .ripley-caption-transcript {
  background: #edf1f5;
  box-shadow: inset 0 2px 8px rgba(24, 39, 54, .08);
}

html[data-ripley-theme="hi-vis"] .ripley-caption-transcript {
  border-width: 2px;
  font-weight: 850;
}

html[data-ripley-theme="original"] .ripley-captions-wrap {
  width: min(calc(100% - 20px), 820px);
}

@media (max-width: 1100px) {
  .ripley-captions-header {
    grid-template-columns: minmax(210px, 1fr) auto;
  }

  .ripley-captions-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .ripley-caption-metadata {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ripley-captions-wrap {
    width: min(calc(100% - 16px), var(--ripley-shell-max));
    margin-top: 10px;
  }

  .ripley-captions-panel {
    border-radius: 14px;
  }

  .ripley-captions-header {
    padding: 13px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ripley-caption-status {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .ripley-captions-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .ripley-caption-action {
    width: 100%;
  }

  .ripley-caption-share-menu {
    right: 0;
    left: auto;
    width: min(220px, 88vw);
  }

  .ripley-caption-metadata {
    padding: 10px 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ripley-caption-meta-item:first-child {
    grid-column: 1 / -1;
  }

  .ripley-caption-transcript {
    min-height: 150px;
    max-height: 340px;
    margin: 12px 13px 9px;
    padding: 15px;
    font-size: 18px;
  }

  .ripley-captions-footer {
    padding: 0 13px 13px;
  }

  .ripley-work-in-progress {
    font-size: 11px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .ripley-captions-wrap {
    margin-top: 8px;
  }

  .ripley-captions-header {
    min-height: 52px;
    padding: 8px 12px;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 8px;
  }

  .ripley-captions-heading {
    font-size: 18px;
  }

  .ripley-captions-eyebrow,
  .ripley-caption-delay {
    display: none;
  }

  .ripley-captions-actions {
    grid-column: auto;
    display: flex;
    width: auto;
  }

  .ripley-caption-action {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 9px;
  }

  .ripley-caption-metadata {
    padding: 7px 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .ripley-caption-meta-item {
    padding: 5px 7px;
  }

  .ripley-caption-transcript {
    min-height: 78px;
    max-height: 150px;
    margin: 8px 12px 6px;
    padding: 10px 13px;
    font-size: 15px;
    line-height: 1.45;
  }

  .ripley-captions-footer {
    padding: 0 12px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-caption-status-dot {
    animation: none !important;
  }
}


/* -------------------------------------------------------------------------- */
/* v1.3.1 — one non-overlapping document flow for scanner and captions         */
/* -------------------------------------------------------------------------- */

/* Rdio Scanner v6.6.3 gives its root and route hosts viewport-sized heights.
   Captions are now the final child of app-root, and these late, equally-or-more
   specific rules make every major section contribute its real height. */
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]),
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) body {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) app-root {
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  overflow: visible !important;
  position: relative !important;
}

html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) app-root > rdio-scanner-main-page,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) app-root > rdio-scanner-page,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) app-root > rdio-scanner {
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  display: block !important;
  position: relative !important;
  overflow: visible !important;
}

html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) rdio-scanner-main-page,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) rdio-scanner-page,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) rdio-scanner,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) mat-sidenav-container,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .mat-sidenav-container,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) mat-sidenav-content,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .mat-sidenav-content {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) mat-sidenav-content,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .mat-sidenav-content {
  overflow: visible !important;
}

html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-captions-wrap {
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  order: 2147483647 !important;
  flex: 0 0 auto !important;
  align-self: center !important;
  float: none !important;
  clear: both !important;
  transform: none !important;
  isolation: isolate;
}

html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-captions-panel,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-work-in-progress {
  position: relative !important;
  inset: auto !important;
  float: none !important;
  clear: both !important;
}

@media (max-width: 720px),
       (orientation: landscape) and (max-height: 620px) {
  html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-captions-wrap {
    width: calc(100% - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin: 10px auto calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-work-in-progress {
    width: 100% !important;
    overflow-wrap: anywhere;
  }
}

/* -------------------------------------------------------------------------- */
/* v1.4.1 — responsive rotation repair and radio-code reference               */
/* -------------------------------------------------------------------------- */

/* Inline explanations are deliberately part of the transcript's normal flow,
   so they wrap with the spoken text and cannot cover another section. */
.ripley-radio-code-inline {
  display: inline;
  border-radius: .35em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: inherit;
}

.ripley-radio-code-heard {
  color: var(--ripley-heading, #f5f9ff);
  font-weight: 900;
}

.ripley-radio-code-meaning {
  color: var(--ripley-accent, #26a7ff);
  font-weight: 850;
}

html[data-ripley-theme="light-gray"] .ripley-radio-code-heard {
  color: #122b45;
}

html[data-ripley-theme="light-gray"] .ripley-radio-code-meaning {
  color: #075fad;
}

html[data-ripley-theme="hi-vis"] .ripley-radio-code-heard,
html[data-ripley-theme="hi-vis"] .ripley-radio-code-meaning {
  color: #fff000;
}

.ripley-caption-codes {
  color: var(--ripley-heading, #f5f9ff);
  border-color: color-mix(in srgb, var(--ripley-accent, #26a7ff) 55%, var(--ripley-border, #284c72));
  background: color-mix(in srgb, var(--ripley-accent, #168ef0) 18%, var(--ripley-control, #111d2b));
}

/* Full-screen, theme-aware, scrollable code chart. */
html.ripley-radio-codes-open,
body.ripley-radio-codes-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.ripley-radio-codes-dialog,
.ripley-radio-codes-dialog * {
  box-sizing: border-box;
  font-family: var(--ripley-font);
}

.ripley-radio-codes-dialog {
  position: fixed;
  z-index: 2147483600;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  color: var(--ripley-text, #f4f8ff);
  background: color-mix(in srgb, var(--ripley-page, #071426) 88%, #000 12%);
}

.ripley-radio-codes-dialog[hidden] {
  display: none !important;
}

.ripley-radio-codes-panel {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  color: var(--ripley-text, #f4f8ff);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ripley-accent, #26a7ff) 8%, transparent), transparent 42%),
    var(--ripley-page, #071426);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ripley-radio-codes-header {
  flex: 0 0 auto;
  min-width: 0;
  padding: 18px clamp(15px, 3vw, 40px) 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
  background: var(--ripley-header, #071426);
  box-shadow: 0 8px 24px var(--ripley-shadow, rgba(0, 0, 0, .28));
}

.ripley-radio-codes-heading-wrap {
  min-width: 0;
}

.ripley-radio-codes-eyebrow {
  display: block;
  color: var(--ripley-accent, #26a7ff);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
}

.ripley-radio-codes-title {
  margin: 3px 0 0;
  color: var(--ripley-heading, #f5f9ff);
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.ripley-radio-codes-note {
  max-width: 980px;
  margin: 7px 0 0;
  color: var(--ripley-muted, #9fb3ca);
  font-size: clamp(12px, 1.4vw, 15px);
  line-height: 1.35;
}

.ripley-radio-codes-close,
.ripley-radio-codes-search {
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 10px;
  color: var(--ripley-text, #f4f8ff);
  background: var(--ripley-control, #111d2b);
  font: inherit;
}

.ripley-radio-codes-close {
  min-height: 46px;
  padding: 0 16px;
  flex: 0 0 auto;
  color: var(--ripley-heading, #f5f9ff);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .035em;
  cursor: pointer;
}

.ripley-radio-codes-close:hover,
.ripley-radio-codes-close:focus-visible,
.ripley-radio-codes-search:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ripley-accent, #26a7ff) 38%, transparent);
  border-color: var(--ripley-accent, #26a7ff);
}

.ripley-radio-codes-toolbar {
  flex: 0 0 auto;
  padding: 12px clamp(15px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(240px, 720px) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
  background: color-mix(in srgb, var(--ripley-surface, #10233d) 88%, var(--ripley-header, #071426));
}

.ripley-radio-codes-search {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ripley-heading, #f5f9ff);
  font-size: 17px;
  font-weight: 700;
}

.ripley-radio-codes-search::placeholder {
  color: var(--ripley-muted, #9fb3ca);
  opacity: .88;
}

.ripley-radio-codes-count {
  color: var(--ripley-muted, #9fb3ca);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.ripley-radio-codes-scroll {
  min-width: 0;
  min-height: 0;
  padding: 18px clamp(15px, 3vw, 40px) calc(26px + env(safe-area-inset-bottom, 0px));
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: clamp(18px, 3vw, 38px);
  overflow-x: hidden;
  overflow: visible;
}

.ripley-radio-code-group {
  min-width: 0;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 14px;
  background: var(--ripley-surface, #10233d);
  box-shadow: 0 12px 32px var(--ripley-shadow, rgba(0, 0, 0, .25));
  overflow: hidden;
}

.ripley-radio-code-group-title {
  position: sticky;
  z-index: 2;
  top: 0;
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
  color: var(--ripley-heading, #f5f9ff);
  background: color-mix(in srgb, var(--ripley-header, #071426) 92%, var(--ripley-accent, #26a7ff) 8%);
  font-size: 20px;
  font-weight: 900;
}

.ripley-radio-code-rows {
  display: grid;
}

.ripley-radio-code-row {
  min-width: 0;
  min-height: 54px;
  padding: 10px 15px;
  display: grid;
  grid-template-columns: minmax(88px, .33fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 68%, transparent);
  color: var(--ripley-text, #f4f8ff);
  background: color-mix(in srgb, var(--ripley-surface-2, #0d1c31) 82%, transparent);
}

.ripley-radio-code-row:last-child {
  border-bottom: 0;
}

.ripley-radio-code-row:nth-child(even) {
  background: color-mix(in srgb, var(--ripley-control, #111d2b) 88%, transparent);
}

.ripley-radio-code-chart-code {
  color: var(--ripley-accent, #26a7ff);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 950;
  white-space: nowrap;
}

.ripley-radio-code-chart-meaning {
  min-width: 0;
  color: var(--ripley-heading, #f5f9ff);
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ripley-radio-code-empty {
  grid-column: 1 / -1;
  margin: 30px auto;
  color: var(--ripley-muted, #9fb3ca);
  font-size: 19px;
  font-weight: 800;
  text-align: center;
}

html[data-ripley-theme="light-gray"] .ripley-radio-codes-dialog {
  background: #cfd6dd;
}

html[data-ripley-theme="light-gray"] .ripley-radio-codes-search {
  color: #122b45;
  background: #f5f7f9;
}

html[data-ripley-theme="hi-vis"] .ripley-radio-code-group,
html[data-ripley-theme="hi-vis"] .ripley-radio-code-row,
html[data-ripley-theme="hi-vis"] .ripley-radio-codes-header,
html[data-ripley-theme="hi-vis"] .ripley-radio-codes-toolbar {
  border-width: 2px;
}

html[data-ripley-theme="hi-vis"] .ripley-radio-code-chart-code,
html[data-ripley-theme="hi-vis"] .ripley-radio-codes-eyebrow {
  color: #fff000;
}

/* JavaScript's measured viewport state is authoritative after rotation. This
   avoids Android browsers applying stale orientation media queries while the
   address bar or visual viewport is still resizing. */
html[data-ripley-phone-layout="portrait"] .ripley-skin-header {
  min-height: 0;
  padding: 10px 12px 11px;
  flex-wrap: wrap;
  gap: 9px;
}

html[data-ripley-phone-layout="portrait"] .ripley-skin-brand,
html[data-ripley-phone-layout="portrait"] .ripley-skin-tools {
  width: 100%;
}

html[data-ripley-phone-layout="portrait"] .ripley-skin-brand-icon {
  width: 42px;
  height: 42px;
}

html[data-ripley-phone-layout="portrait"] .ripley-skin-title {
  font-size: clamp(20px, 6vw, 27px);
}

html[data-ripley-phone-layout="portrait"] .ripley-skin-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

html[data-ripley-phone-layout="portrait"] .ripley-skin-tools {
  justify-content: space-between;
  gap: 8px;
}

html[data-ripley-phone-layout="portrait"] .ripley-skin-status {
  display: none;
}

html[data-ripley-phone-layout="portrait"] .ripley-volume-control {
  min-width: 0;
  flex: 1 1 auto;
}

html[data-ripley-phone-layout="portrait"] .ripley-volume-slider {
  width: auto;
  min-width: 58px;
  flex: 1 1 auto;
}

html[data-ripley-phone-layout="portrait"] .ripley-alert-row {
  padding: 0 10px 10px;
  grid-template-columns: 1fr;
  gap: 7px;
}

html[data-ripley-phone-layout="portrait"] .ripley-weather-button {
  width: 100%;
  min-width: 0;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
  padding: 10px !important;
  gap: 10px !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status {
  min-height: 38px !important;
  padding: 7px 11px !important;
  display: flex !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
  grid-column: 1 !important;
  height: 25px !important;
  font-size: 13px !important;
  line-height: 25px !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big {
  min-height: 51px !important;
  font-size: clamp(24px, 8vw, 37px) !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
  grid-column: 1 !important;
  grid-row: auto !important;
  min-height: 0 !important;
  margin-top: 12px !important;
  padding: 9px !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  padding: 10px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

html[data-ripley-phone-layout="portrait"] .ripley-captions-header {
  padding: 13px;
  grid-template-columns: 1fr;
  gap: 10px;
}

html[data-ripley-phone-layout="portrait"] .ripley-captions-actions {
  grid-column: auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-ripley-phone-layout="portrait"] .ripley-caption-codes {
  grid-column: auto;
}

html[data-ripley-phone-layout="portrait"] .ripley-caption-action,
html[data-ripley-phone-layout="portrait"] .ripley-caption-share-wrap {
  width: 100%;
}

html[data-ripley-phone-layout="portrait"] .ripley-caption-metadata {
  padding: 10px 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-ripley-phone-layout="portrait"] .ripley-caption-meta-item:first-child {
  grid-column: 1 / -1;
}

html[data-ripley-phone-layout="portrait"] .ripley-caption-transcript {
  min-height: 150px;
  max-height: 340px;
  margin: 12px 13px 9px;
  padding: 15px;
  font-size: 18px;
}

html[data-ripley-phone-layout="landscape"] .ripley-skin-header {
  min-height: 54px;
  padding: 6px 10px;
  flex-wrap: nowrap;
  gap: 9px;
}

html[data-ripley-phone-layout="landscape"] .ripley-skin-brand {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
}

html[data-ripley-phone-layout="landscape"] .ripley-skin-tools {
  width: auto;
  flex: 0 0 auto;
  gap: 7px;
}

html[data-ripley-phone-layout="landscape"] .ripley-skin-brand-icon {
  width: 38px;
  height: 38px;
}

html[data-ripley-phone-layout="landscape"] .ripley-skin-title {
  font-size: clamp(18px, 3.5vw, 27px);
}

html[data-ripley-phone-layout="landscape"] .ripley-skin-subtitle,
html[data-ripley-phone-layout="landscape"] .ripley-skin-status {
  display: none;
}

html[data-ripley-phone-layout="landscape"] .ripley-volume-control,
html[data-ripley-phone-layout="landscape"] .ripley-theme-button {
  height: 38px;
  min-height: 38px;
}

html[data-ripley-phone-layout="landscape"] .ripley-volume-slider {
  width: clamp(98px, 17vw, 145px);
}

html[data-ripley-phone-layout="landscape"] .ripley-alert-row {
  min-height: 44px;
  padding: 0 9px 7px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
}

html[data-ripley-phone-layout="landscape"] .ripley-weather-button {
  min-width: 145px;
  min-height: 37px;
}

html[data-ripley-phone-layout="landscape"] .ripley-alert-ticker {
  min-height: 37px;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
  padding: 7px 9px 10px !important;
  gap: 7px !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status {
  display: none !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
  padding: 9px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr) !important;
  column-gap: 10px !important;
  row-gap: 0 !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
  grid-column: 1 !important;
  height: 21px !important;
  font-size: 11px !important;
  line-height: 21px !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.small {
  height: 10px !important;
  font-size: 9px !important;
  line-height: 10px !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big {
  min-height: 38px !important;
  margin: 3px 0 !important;
  padding: 4px 3px 6px !important;
  font-size: clamp(20px, 4.8vw, 34px) !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
  grid-column: 2 !important;
  grid-row: 1 / span 8 !important;
  min-height: 205px !important;
  margin-top: 0 !important;
  padding: 7px !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  padding: 7px !important;
  grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control::before {
  display: none;
}

html[data-ripley-phone-layout="landscape"] .ripley-captions-wrap {
  margin-top: 8px !important;
}

html[data-ripley-phone-layout="landscape"] .ripley-captions-header {
  min-height: 52px;
  padding: 8px 12px;
  grid-template-columns: minmax(165px, 1fr) auto auto;
  gap: 7px;
}

html[data-ripley-phone-layout="landscape"] .ripley-captions-heading {
  font-size: 18px;
}

html[data-ripley-phone-layout="landscape"] .ripley-captions-eyebrow,
html[data-ripley-phone-layout="landscape"] .ripley-caption-delay {
  display: none;
}

html[data-ripley-phone-layout="landscape"] .ripley-captions-actions {
  grid-column: auto;
  width: auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

html[data-ripley-phone-layout="landscape"] .ripley-caption-action {
  width: auto;
  min-height: 34px;
  padding-inline: 8px;
  font-size: 8.5px;
  white-space: nowrap;
}

html[data-ripley-phone-layout="landscape"] .ripley-caption-metadata {
  padding: 7px 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

html[data-ripley-phone-layout="landscape"] .ripley-caption-meta-item {
  padding: 5px 7px;
}

html[data-ripley-phone-layout="landscape"] .ripley-caption-transcript {
  min-height: 78px;
  max-height: 150px;
  margin: 8px 12px 6px;
  padding: 10px 13px;
  font-size: 15px;
  line-height: 1.45;
}

html[data-ripley-phone-layout="landscape"] .ripley-captions-footer {
  padding: 0 12px 8px;
}

@media (max-width: 899px) {
  .ripley-radio-codes-scroll {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .ripley-radio-codes-header {
    padding: 12px 12px 10px;
    gap: 8px;
  }

  .ripley-radio-codes-title {
    font-size: 25px;
  }

  .ripley-radio-codes-note {
    font-size: 11px;
  }

  .ripley-radio-codes-close {
    min-height: 42px;
    padding: 0 10px;
    font-size: 11px;
  }

  .ripley-radio-codes-toolbar {
    padding: 9px 12px;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .ripley-radio-codes-search {
    min-height: 45px;
    font-size: 16px;
  }

  .ripley-radio-codes-count {
    font-size: 11px;
  }

  .ripley-radio-codes-scroll {
    padding: 12px 10px calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }

  .ripley-radio-code-row {
    min-height: 57px;
    padding: 10px 12px;
    grid-template-columns: minmax(82px, .38fr) minmax(0, 1fr);
    gap: 10px;
  }

  .ripley-radio-code-chart-code,
  .ripley-radio-code-chart-meaning {
    font-size: 17px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .ripley-radio-codes-header {
    padding: 7px 12px 6px;
    align-items: center;
  }

  .ripley-radio-codes-eyebrow,
  .ripley-radio-codes-note {
    display: none;
  }

  .ripley-radio-codes-title {
    font-size: 23px;
  }

  .ripley-radio-codes-toolbar {
    padding-block: 7px;
    grid-template-columns: minmax(240px, 1fr) auto;
  }

  .ripley-radio-codes-search {
    min-height: 40px;
  }

  .ripley-radio-codes-scroll {
    padding-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------------------------------------------------------------- */
/* Test Build 3: ads, SDRTrunk icons, recent calls, law notice, and search.    */
/* -------------------------------------------------------------------------- */

.ripley-ad-strip,
.ripley-ad-strip *,
.ripley-talkgroup-icon-cluster,
.ripley-talkgroup-icon-cluster *,
.ripley-recent-history,
.ripley-recent-history *,
.ripley-call-search-overlay,
.ripley-call-search-overlay *,
.ripley-law-warning {
  box-sizing: border-box;
  font-family: var(--ripley-font, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
}

.ripley-ad-strip {
  position: relative;
  z-index: 1100;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 84px;
  overflow: hidden;
  color: var(--ripley-text, #f4f8ff);
  background: color-mix(in srgb, var(--ripley-panel, #0d2238) 94%, #000 6%);
  border-block: 1px solid var(--ripley-border, #284c72);
  box-shadow: 0 7px 24px #0005;
}

.ripley-ad-label {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 5px;
  color: var(--ripley-muted, #9fb3ca);
  background: color-mix(in srgb, var(--ripley-header, #071426) 94%, transparent);
  border-right: 1px solid var(--ripley-border, #284c72);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .1em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.ripley-ad-viewport {
  position: relative;
  min-width: 0;
  min-height: 82px;
  overflow: hidden;
}

.ripley-ad-link {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.ripley-ad-image {
  position: absolute;
  top: 50%;
  left: 100%;
  display: block;
  width: auto;
  max-width: none;
  height: min(78px, calc(100% - 4px));
  object-fit: contain;
  filter: drop-shadow(0 3px 10px #0009);
  transform: translateY(-50%);
}

.ripley-ad-image.is-scrolling {
  animation: ripley-ad-scroll var(--ripley-ad-scroll-seconds, 6s) linear both;
}

.ripley-ad-link:hover .ripley-ad-image,
.ripley-ad-link:focus-visible .ripley-ad-image {
  filter: brightness(1.14) drop-shadow(0 3px 12px #000b);
}

.ripley-ad-link:focus-visible {
  outline: 3px solid var(--ripley-accent, #2aa7ff);
  outline-offset: -3px;
}

.ripley-ad-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

@keyframes ripley-ad-scroll {
  from { transform: translate(0, -50%); }
  to { transform: translate(calc(-100vw - 100%), -50%); }
}

.ripley-talkgroup-icon-cluster[hidden] { display: none !important; }

.ripley-talkgroup-icon-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  margin: 8px 0;
  padding: 7px 10px;
  overflow: hidden;
  color: var(--ripley-text, #f4f8ff);
  background: color-mix(in srgb, var(--ripley-panel-2, #102c49) 82%, #000 18%);
  border: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 84%, transparent);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff1;
}

.ripley-talkgroup-icon-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ripley-accent, #2aa7ff) 55%, var(--ripley-border, #284c72));
  border-radius: 10px;
  background: color-mix(in srgb, var(--ripley-header, #071426) 82%, transparent);
  font-size: 30px;
  line-height: 1;
}

.ripley-talkgroup-icon-image {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.ripley-talkgroup-icon-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.ripley-talkgroup-icon-kind,
.ripley-talkgroup-icon-name,
.ripley-talkgroup-icon-tgid {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ripley-talkgroup-icon-kind {
  color: var(--ripley-accent, #54c7ff);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.ripley-talkgroup-icon-name {
  margin-top: 3px;
  color: var(--ripley-heading, #fff);
  font-size: 14px;
  font-weight: 900;
}

.ripley-talkgroup-icon-tgid {
  margin-top: 3px;
  color: var(--ripley-muted, #9fb3ca);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
}

.ripley-recent-history {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  color: var(--ripley-text, #f4f8ff) !important;
  background: color-mix(in srgb, var(--ripley-panel, #0d2238) 95%, #000 5%) !important;
  border: 1px solid var(--ripley-border, #284c72) !important;
  border-radius: 9px;
  overflow: hidden;
}

.ripley-recent-history th,
.ripley-recent-history td {
  overflow: hidden !important;
  height: auto !important;
  padding: 7px 8px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 62%, transparent) !important;
  color: var(--ripley-text, #f4f8ff) !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ripley-recent-history th {
  color: var(--ripley-muted, #9fb3ca) !important;
  background: color-mix(in srgb, var(--ripley-header, #071426) 88%, transparent) !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .09em;
}

.ripley-recent-history tbody tr:last-child td { border-bottom: 0 !important; }
.ripley-recent-history tr.replaying { background: color-mix(in srgb, var(--ripley-accent, #26a7ff) 18%, transparent) !important; }
.ripley-recent-history th:nth-child(1), .ripley-recent-history td:nth-child(1) { width: 56px; text-align: center !important; }
.ripley-recent-history th:nth-child(3), .ripley-recent-history td:nth-child(3) { width: 102px; }
.ripley-recent-history th:nth-child(4), .ripley-recent-history td:nth-child(4) { width: 68px; text-align: right !important; }
.ripley-recent-name { font-weight: 850; }
.ripley-recent-empty { color: var(--ripley-muted, #9fb3ca) !important; text-align: center !important; }

.ripley-recent-play,
.ripley-search-play,
.ripley-search-name {
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 7px;
  color: var(--ripley-text, #fff);
  background: var(--ripley-button, #123353);
  font: inherit;
  cursor: pointer;
}

.ripley-recent-play,
.ripley-search-play {
  width: 34px;
  height: 31px;
  padding: 0;
  font-size: 15px;
  font-weight: 950;
}

.ripley-recent-play:hover,
.ripley-recent-play:focus-visible,
.ripley-search-play:hover,
.ripley-search-play:focus-visible,
.ripley-search-name:hover,
.ripley-search-name:focus-visible {
  outline: 2px solid var(--ripley-accent, #26a7ff);
  outline-offset: 1px;
}

.ripley-recent-play:disabled,
.ripley-search-play:disabled { cursor: not-allowed; opacity: .38; }

.ripley-extra-control-row {
  display: flex !important;
  justify-content: center !important;
  gap: 0 !important;
  margin-top: 2px !important;
}

.ripley-extra-control-row .ripley-play-last-ten {
  width: min(100%, 340px) !important;
  flex: 0 1 340px !important;
}

.ripley-law-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid #f2c646;
  border-radius: var(--ripley-radius, 14px);
  color: #fff4bd;
  background: linear-gradient(180deg, #5b4510, #332606);
  box-shadow: 0 8px 24px #0005;
  font-size: clamp(12px, 2vw, 15px);
  font-weight: 950;
  letter-spacing: .035em;
  text-align: center;
  cursor: pointer;
}

.ripley-law-warning:hover,
.ripley-law-warning:focus-visible {
  outline: 3px solid #ffe174;
  outline-offset: 2px;
  filter: brightness(1.13);
}

.ripley-call-search-overlay[hidden] { display: none !important; }
.ripley-call-search-overlay {
  position: fixed;
  z-index: 99998;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--ripley-text, #f4f8ff);
  background: #020811d9;
  backdrop-filter: blur(8px);
}

.ripley-call-search-dialog {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(1120px, 100%);
  max-height: min(88vh, 850px);
  overflow: hidden;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 17px;
  background: linear-gradient(145deg, var(--ripley-panel, #10263d), var(--ripley-header, #071426));
  box-shadow: 0 25px 80px #000c;
}

.ripley-call-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ripley-border, #315a80);
}

.ripley-call-search-header span {
  color: var(--ripley-accent, #5ac7ff);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
}

.ripley-call-search-header h2 { margin: 3px 0 0; font-size: clamp(20px, 4vw, 30px); }
.ripley-call-search-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 10px;
  color: var(--ripley-text, #fff);
  background: var(--ripley-button, #123353);
  font-size: 28px;
  cursor: pointer;
}

.ripley-call-search-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ripley-border, #315a80);
}

.ripley-call-search-tools label { display: grid; gap: 5px; color: var(--ripley-muted, #9fb3ca); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.ripley-call-search-tools input,
.ripley-call-search-tools button {
  min-height: 42px;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 9px;
  color: var(--ripley-text, #fff);
  background: color-mix(in srgb, var(--ripley-panel-2, #102c49) 88%, #000 12%);
  font: 850 13px inherit;
}
.ripley-call-search-tools input { width: 100%; padding: 8px 11px; }
.ripley-call-search-tools button { padding: 8px 12px; cursor: pointer; }
.ripley-call-search-count { padding: 9px 18px; color: var(--ripley-muted, #9fb3ca); font-size: 12px; font-weight: 800; }
.ripley-call-search-results { min-height: 150px; overflow: auto; padding: 0 18px 18px; }
.ripley-call-search-empty { padding: 26px; color: var(--ripley-muted, #9fb3ca); text-align: center; }
.ripley-call-search-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.ripley-call-search-table th,
.ripley-call-search-table td { overflow: hidden; padding: 9px 8px; border-bottom: 1px solid color-mix(in srgb, var(--ripley-border, #315a80) 62%, transparent); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.ripley-call-search-table th { color: var(--ripley-muted, #9fb3ca); background: color-mix(in srgb, var(--ripley-header, #071426) 88%, transparent); font-size: 9px; font-weight: 950; letter-spacing: .08em; }
.ripley-call-search-table th:nth-child(1), .ripley-call-search-table td:nth-child(1) { width: 58px; text-align: center; }
.ripley-call-search-table th:nth-child(2), .ripley-call-search-table td:nth-child(2) { width: 210px; }
.ripley-call-search-table th:nth-child(3), .ripley-call-search-table td:nth-child(3) { width: 145px; }
.ripley-call-search-table th:nth-child(4), .ripley-call-search-table td:nth-child(4) { width: 76px; text-align: right; }
.ripley-search-name { display: block; width: 100%; overflow: hidden; padding: 6px 8px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.ripley-search-description { color: var(--ripley-muted, #9fb3ca); }

html[data-ripley-theme="light-gray"] .ripley-law-warning { color: #3c2b00; background: linear-gradient(180deg, #fff3af, #f6d862); }
html[data-ripley-theme="hi-vis"] .ripley-law-warning { color: #000; background: #ff0; border-color: #fff; }

@media (max-width: 700px) {
  .ripley-ad-strip { grid-template-columns: 31px minmax(0, 1fr); min-height: 68px; }
  .ripley-ad-label { font-size: 7px; }
  .ripley-ad-viewport { min-height: 66px; }
  .ripley-ad-image { height: min(63px, calc(100% - 3px)); }
  .ripley-talkgroup-icon-cluster { min-height: 50px; gap: 7px; padding: 5px 7px; }
  .ripley-talkgroup-icon-symbol { width: 36px; height: 36px; flex-basis: 36px; font-size: 24px; }
  .ripley-talkgroup-icon-image { width: 32px; height: 32px; }
  .ripley-talkgroup-icon-kind { font-size: 9px; }
  .ripley-talkgroup-icon-name { font-size: 11px; }
  .ripley-talkgroup-icon-tgid { font-size: 8px; }
  .ripley-recent-history th, .ripley-recent-history td { padding: 6px 5px !important; font-size: 10px !important; }
  .ripley-recent-history th:nth-child(1), .ripley-recent-history td:nth-child(1) { width: 45px; }
  .ripley-recent-history th:nth-child(3), .ripley-recent-history td:nth-child(3) { width: 76px; }
  .ripley-recent-history th:nth-child(4), .ripley-recent-history td:nth-child(4) { width: 52px; }
  .ripley-recent-play { width: 29px; height: 27px; font-size: 13px; }
  .ripley-call-search-tools { grid-template-columns: 1fr 1fr; }
  .ripley-call-search-tools label { grid-column: 1 / -1; }
  .ripley-call-search-dialog { max-height: 94vh; }
  .ripley-call-search-results { padding-inline: 9px; }
}

@media (max-width: 420px) {
  .ripley-call-search-tools { grid-template-columns: 1fr; }
  .ripley-call-search-tools label { grid-column: auto; }
  .ripley-law-warning { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-ad-image.is-scrolling { left: 50%; animation: none; transform: translate(-50%, -50%); }
}

/* -------------------------------------------------------------------------- */
/* Test Build 3 final wiring: exact classes created by web/upgrade.js.         */
/* -------------------------------------------------------------------------- */

.ripley-ad-viewport,
.ripley-ad-link,
.ripley-ad-image,
.ripley-ad-status,
.ripley-talkgroup-icon-cluster,
.ripley-talkgroup-icon-cluster *,
.ripley-call-search-overlay,
.ripley-call-search-overlay *,
.ripley-scanner-law-warning {
  box-sizing: border-box;
  font-family: var(--ripley-font, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
}

.ripley-ad-strip {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  min-height: 92px;
  border-top: 1px solid var(--ripley-border, #284c72);
  border-bottom: 1px solid var(--ripley-border, #284c72);
}

.ripley-ad-strip[hidden] { display: none !important; }

.ripley-ad-viewport {
  position: relative;
  min-width: 0;
  min-height: 90px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ripley-panel, #0d2238) 94%, #000 6%);
}

.ripley-ad-link {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.ripley-ad-image {
  position: absolute;
  top: 50%;
  left: 100%;
  display: block;
  width: auto;
  max-width: none;
  height: min(86px, calc(100% - 4px));
  object-fit: contain;
  transform: translateY(-50%);
  filter: drop-shadow(0 3px 10px #0009);
  will-change: transform;
}

.ripley-ad-image.is-scrolling {
  animation: ripley-ad-image-scroll var(--ripley-ad-scroll-seconds, 6s) linear both;
}

.ripley-ad-link:hover .ripley-ad-image,
.ripley-ad-link:focus-visible .ripley-ad-image {
  filter: brightness(1.12) drop-shadow(0 3px 12px #000b);
}

.ripley-ad-link:focus-visible { outline: 3px solid var(--ripley-accent, #26a7ff); outline-offset: -3px; }
.ripley-ad-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes ripley-ad-image-scroll {
  from { transform: translate(0, -50%); }
  to { transform: translate(calc(-100vw - 100%), -50%); }
}

.ripley-talkgroup-icon-cluster {
  grid-column: 1 !important;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  margin: 8px 4px 0;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 80%, transparent);
  border-radius: 11px;
  color: var(--ripley-screen-text, var(--ripley-text, #fff));
  background: color-mix(in srgb, var(--ripley-surface-2, #102c49) 78%, transparent);
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--ripley-accent, #26a7ff) 8%, transparent);
}

.ripley-talkgroup-icon-symbol {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 82%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ripley-panel, #0d2238) 85%, transparent);
  font-size: 31px;
  line-height: 1;
}

.ripley-talkgroup-icon-image {
  display: block;
  width: 37px;
  height: 37px;
  object-fit: contain;
}

.ripley-talkgroup-icon-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.ripley-talkgroup-icon-kind {
  overflow: hidden;
  color: var(--ripley-accent, #26a7ff);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ripley-talkgroup-icon-name {
  overflow: hidden;
  color: var(--ripley-heading, #fff);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ripley-talkgroup-icon-tgid {
  color: var(--ripley-muted, #9fb3ca);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .05em;
}

.history.ripley-recent-history {
  width: 100% !important;
  table-layout: fixed !important;
}

.history.ripley-recent-history th,
.history.ripley-recent-history td {
  overflow: hidden !important;
  padding: 0 6px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.history.ripley-recent-history th:nth-child(1),
.history.ripley-recent-history td:nth-child(1) { width: 48px !important; text-align: center !important; }
.history.ripley-recent-history th:nth-child(2),
.history.ripley-recent-history td:nth-child(2) { width: auto !important; }
.history.ripley-recent-history th:nth-child(3),
.history.ripley-recent-history td:nth-child(3) { width: 84px !important; font-variant-numeric: tabular-nums; }
.history.ripley-recent-history th:nth-child(4),
.history.ripley-recent-history td:nth-child(4) { width: 62px !important; text-align: right !important; font-variant-numeric: tabular-nums; }
.history.ripley-recent-history th:nth-child(5),
.history.ripley-recent-history td:nth-child(5) { width: 54px !important; text-align: center !important; }
.history.ripley-recent-history tr.replaying { background: var(--ripley-active, #0f4169) !important; }
.history.ripley-recent-history .ripley-recent-name { color: var(--ripley-heading, #fff) !important; font-weight: 850; }
.history.ripley-recent-history .ripley-recent-empty { height: 42px !important; text-align: center !important; color: var(--ripley-muted, #9fb3ca) !important; }

.ripley-recent-play,
.ripley-search-play {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 7px;
  color: var(--ripley-text, #fff);
  background: var(--ripley-button, #123353);
  font-size: 14px;
  cursor: pointer;
}

.ripley-recent-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 26px;
  padding: 3px 5px;
  border: 1px solid #56c67e;
  border-radius: 7px;
  color: #f2fff6 !important;
  background: linear-gradient(180deg, #267e48, #124b2b);
  font-size: 9px;
  font-weight: 950;
  text-decoration: none;
}

.ripley-recent-map:hover,
.ripley-recent-map:focus-visible {
  outline: 2px solid var(--ripley-accent, #26a7ff);
  outline-offset: 1px;
}

.ripley-recent-play:hover,
.ripley-recent-play:focus-visible,
.ripley-search-play:hover,
.ripley-search-play:focus-visible { outline: 2px solid var(--ripley-accent, #26a7ff); outline-offset: 1px; }
.ripley-recent-play:disabled,
.ripley-search-play:disabled { cursor: not-allowed; opacity: .35; }

.ripley-extra-control-row .ripley-play-last-ten[data-playing="true"] {
  border-color: #ff7584 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #ba283c, #7e1525) !important;
}

.ripley-scanner-law-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(calc(100% - 20px), 1500px);
  min-height: 49px;
  margin: 10px auto 14px;
  padding: 10px 14px;
  border: 1px solid #f2c646;
  border-radius: var(--ripley-radius, 14px);
  color: #fff4bd;
  background: linear-gradient(180deg, #5b4510, #332606);
  box-shadow: 0 8px 24px #0005;
  font-size: clamp(12px, 2vw, 15px);
  font-weight: 950;
  letter-spacing: .035em;
  text-align: center;
  cursor: pointer;
}

.ripley-scanner-law-warning:hover,
.ripley-scanner-law-warning:focus-visible { outline: 3px solid #ffe174; outline-offset: 2px; filter: brightness(1.13); }
html[data-ripley-theme="light-gray"] .ripley-scanner-law-warning { color: #3c2b00; background: linear-gradient(180deg, #fff3af, #f6d862); }
html[data-ripley-theme="hi-vis"] .ripley-scanner-law-warning { color: #000; background: #ff0; border-color: #fff; }

.ripley-call-search-overlay {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--ripley-text, #f4f8ff);
  background: #000b;
  backdrop-filter: blur(8px);
}

.ripley-call-search-overlay[hidden] { display: none !important; }

.ripley-call-search-dialog {
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  max-height: min(850px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid var(--ripley-border, #284c72);
  border-radius: 17px;
  background: linear-gradient(145deg, var(--ripley-panel, #0d2238), var(--ripley-header, #071426));
  box-shadow: 0 24px 90px #000c;
}

.ripley-call-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
}

.ripley-call-search-header span { color: var(--ripley-accent, #26a7ff); font-size: 10px; font-weight: 950; letter-spacing: .09em; }
.ripley-call-search-header h2 { margin: 2px 0 0; color: var(--ripley-heading, #fff); font-size: clamp(20px, 4vw, 30px); }
.ripley-call-search-close { width: 42px; height: 42px; border: 1px solid var(--ripley-border, #284c72); border-radius: 9px; color: var(--ripley-text, #fff); background: var(--ripley-button, #123353); font-size: 27px; cursor: pointer; }

.ripley-call-search-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--ripley-border, #284c72);
}

.ripley-call-search-tools label { display: grid; gap: 5px; color: var(--ripley-muted, #9fb3ca); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.ripley-call-search-tools input { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid var(--ripley-border, #284c72); border-radius: 9px; color: var(--ripley-text, #fff); background: var(--ripley-surface-2, #0a1a2c); font: 700 15px/1.2 inherit; }
.ripley-call-search-tools button { min-height: 43px; padding: 8px 12px; border: 1px solid var(--ripley-accent, #26a7ff); border-radius: 9px; color: #fff; background: linear-gradient(180deg, #168bec, #075eaf); font: 900 11px/1 inherit; cursor: pointer; }
.ripley-call-search-count { padding: 8px 17px; color: var(--ripley-muted, #9fb3ca); font-size: 12px; font-weight: 800; }
.ripley-call-search-results { min-height: 130px; overflow: auto; padding: 0 17px 17px; }
.ripley-call-search-empty { padding: 24px; border: 1px dashed var(--ripley-border, #284c72); border-radius: 11px; color: var(--ripley-muted, #9fb3ca); text-align: center; }

.ripley-call-search-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.ripley-call-search-table th,
.ripley-call-search-table td { overflow: hidden; padding: 9px 8px; border-bottom: 1px solid color-mix(in srgb, var(--ripley-border, #284c72) 65%, transparent); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.ripley-call-search-table th { color: var(--ripley-muted, #9fb3ca); background: var(--ripley-header, #071426); font-size: 9px; font-weight: 950; letter-spacing: .08em; }
.ripley-call-search-table th:nth-child(1), .ripley-call-search-table td:nth-child(1) { width: 54px; text-align: center; }
.ripley-call-search-table th:nth-child(2), .ripley-call-search-table td:nth-child(2) { width: 210px; }
.ripley-call-search-table th:nth-child(3), .ripley-call-search-table td:nth-child(3) { width: 105px; }
.ripley-call-search-table th:nth-child(4), .ripley-call-search-table td:nth-child(4) { width: 72px; text-align: right; }
.ripley-search-name { display: block; width: 100%; overflow: hidden; padding: 0; border: 0; color: var(--ripley-heading, #fff); background: transparent; font: 850 13px/1.2 inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ripley-search-name:hover, .ripley-search-name:focus-visible { color: var(--ripley-accent, #26a7ff); text-decoration: underline; outline: none; }
.ripley-search-description { overflow: hidden !important; color: var(--ripley-muted, #9fb3ca); text-overflow: ellipsis !important; white-space: nowrap !important; }

@media (max-width: 720px) {
  .ripley-ad-strip { min-height: 70px; }
  .ripley-ad-viewport { min-height: 68px; }
  .ripley-ad-image { height: min(64px, calc(100% - 4px)); }
  .ripley-talkgroup-icon-cluster { grid-column: 1 !important; margin: 9px 0 0; min-height: 51px; padding: 5px 7px; }
  .ripley-talkgroup-icon-symbol { width: 37px; height: 37px; flex-basis: 37px; font-size: 27px; }
  .ripley-talkgroup-icon-image { width: 32px; height: 32px; }
  .ripley-talkgroup-icon-name { font-size: 12px; }
  .history.ripley-recent-history th, .history.ripley-recent-history td { padding-inline: 3px !important; font-size: 9px !important; }
  .history.ripley-recent-history th:nth-child(1), .history.ripley-recent-history td:nth-child(1) { width: 42px !important; }
  .history.ripley-recent-history th:nth-child(3), .history.ripley-recent-history td:nth-child(3) { width: 68px !important; }
  .history.ripley-recent-history th:nth-child(4), .history.ripley-recent-history td:nth-child(4) { width: 48px !important; }
  .ripley-recent-play { width: 28px; height: 25px; }
  .ripley-call-search-tools { grid-template-columns: 1fr 1fr; }
  .ripley-call-search-tools label { grid-column: 1 / -1; }
  .ripley-open-full-archive { grid-column: auto; }
  .ripley-call-search-dialog { max-height: calc(100vh - 14px); border-radius: 12px; }
  .ripley-call-search-overlay { padding: 7px; }
  .ripley-call-search-results { padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-ad-image.is-scrolling { animation: none; left: 50%; transform: translate(-50%, -50%); }
}

/* Test Build 3: keep the legal warning and recent-call headings readable on small phones. */
.ripley-scanner-law-warning {
  overflow: visible !important;
  line-height: 1.25 !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

@media (max-width: 420px) and (orientation: portrait) {
  .ripley-scanner-law-warning {
    width: calc(100% - 12px) !important;
    min-height: 48px;
    margin-block: 8px 12px;
    padding: 8px 7px;
    font-size: 10.5px !important;
    letter-spacing: .018em;
  }

  .history.ripley-recent-history th,
  .history.ripley-recent-history td {
    padding-inline: 2px !important;
  }

  .history.ripley-recent-history th {
    font-size: 8px !important;
    letter-spacing: .035em !important;
  }

  .history.ripley-recent-history th:nth-child(1),
  .history.ripley-recent-history td:nth-child(1) { width: 40px !important; }
  .history.ripley-recent-history th:nth-child(3),
  .history.ripley-recent-history td:nth-child(3) { width: 66px !important; }
  .history.ripley-recent-history th:nth-child(4),
  .history.ripley-recent-history td:nth-child(4) {
    width: 49px !important;
    text-overflow: clip !important;
  }

  .ripley-recent-play {
    width: 27px;
    height: 25px;
  }
}


/* -------------------------------------------------------------------------- */
/* Test Build 4: centered hold-and-slide banners and clean scanner readout.    */
/* -------------------------------------------------------------------------- */

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status,
html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status,
html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status,
html[data-ripley-theme="original"]:not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-status {
  display: none !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display,
html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display,
html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.ripley-ad-strip {
  position: relative !important;
  z-index: 20 !important;
  display: block !important;
  width: min(100%, 2048px) !important;
  min-height: 0 !important;
  margin: 0 auto 15px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ripley-ad-strip[hidden],
.ripley-ad-label {
  display: none !important;
}

.ripley-ad-viewport {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 2048 / 682 !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ripley-ad-track {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 100% !important;
  gap: 0 !important;
  will-change: transform;
}

.ripley-ad-track.is-animating {
  transition: transform 700ms cubic-bezier(.35, .05, .2, 1) !important;
}

.ripley-ad-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.ripley-ad-slide-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 2048px !important;
  max-height: none !important;
  object-fit: contain !important;
  filter: none !important;
}

.ripley-ad-slide:hover .ripley-ad-slide-image,
.ripley-ad-slide:focus-visible .ripley-ad-slide-image {
  filter: brightness(1.08) !important;
}

.ripley-ad-slide:focus-visible {
  outline: 3px solid var(--ripley-accent, #26a7ff) !important;
  outline-offset: -3px !important;
}

.ripley-ad-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.ripley-recent-name {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 700px) {
  .ripley-ad-strip {
    width: min(100%, 2048px) !important;
    margin-bottom: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-ad-track.is-animating {
    transition-duration: 1ms !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Test Build 4.2: compact recent calls, close banner spacing, icon-only row,  */
/* readable Light Gray history, and touch-safe Quick Controls.                 */
/* -------------------------------------------------------------------------- */

html[data-ripley-theme]:not([data-ripley-skin-disabled]) rdio-scanner-main {
  padding-bottom: 2px !important;
}

.ripley-ad-strip {
  margin: 0 auto 2px !important;
  line-height: 0 !important;
}

.ripley-ad-viewport {
  aspect-ratio: 2048 / 682 !important;
}

.ripley-captions-wrap,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-captions-wrap {
  margin-top: 2px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
  min-height: 0 !important;
  height: auto !important;
  padding: 8px !important;
  align-self: start !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper::before {
  margin-bottom: 3px !important;
  font-size: 11px !important;
  line-height: 14px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history td {
  height: 25px !important;
  padding: 0 5px !important;
  line-height: 25px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th {
  height: 22px !important;
  font-size: 9px !important;
  line-height: 22px !important;
}

.ripley-recent-play {
  width: 29px !important;
  height: 23px !important;
  min-height: 23px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
  height: 23px !important;
  padding-inline: 4px !important;
  font-size: 13px !important;
  line-height: 23px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.small {
  height: 14px !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big {
  min-height: 46px !important;
  margin: 4px 0 !important;
  padding: 6px 4px 7px !important;
}

.ripley-talkgroup-icon-cluster {
  grid-column: 1 !important;
  grid-row: auto !important;
  justify-self: start !important;
  align-self: start !important;
  width: max-content !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ripley-talkgroup-icon-copy {
  display: none !important;
}

.ripley-talkgroup-icon-symbol {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  border-radius: 10px !important;
}

.ripley-talkgroup-icon-image {
  width: 46px !important;
  height: 46px !important;
}

html[data-ripley-theme="light-gray"] .rdio-display > .wrapper {
  color: #14263a !important;
  background: #eef2f5 !important;
  border-color: #9eabb8 !important;
}

html[data-ripley-theme="light-gray"] .history.ripley-recent-history {
  color: #14263a !important;
  background: #f7f9fb !important;
  border-color: #9eabb8 !important;
}

html[data-ripley-theme="light-gray"] .history.ripley-recent-history thead th {
  color: #29425d !important;
  background: #d6dde5 !important;
  border-bottom-color: #9eabb8 !important;
}

html[data-ripley-theme="light-gray"] .history.ripley-recent-history tbody td {
  color: #14263a !important;
  background: #f7f9fb !important;
  border-bottom-color: #c4ccd5 !important;
}

html[data-ripley-theme="light-gray"] .history.ripley-recent-history tbody tr:nth-child(even) td {
  background: #e9eef3 !important;
}

html[data-ripley-theme="light-gray"] .history.ripley-recent-history .ripley-recent-name {
  color: #0b2743 !important;
}

html[data-ripley-theme="light-gray"] .history.ripley-recent-history tr.replaying td {
  color: #ffffff !important;
  background: #0a68bd !important;
}

html[data-ripley-theme="light-gray"] .ripley-recent-play {
  color: #ffffff !important;
  background: #126db9 !important;
  border-color: #07518d !important;
}

html[data-ripley-theme="light-gray"] .ripley-recent-play:disabled {
  color: #526577 !important;
  background: #cbd3dc !important;
  border-color: #9ba7b3 !important;
  opacity: 1 !important;
}

@media (pointer: coarse) {
  rdio-scanner-main .rdio-control button.rdio-button {
    position: relative !important;
    overflow: hidden !important;
    touch-action: pan-y !important;
  }

  rdio-scanner-main .rdio-control button.rdio-button.ripley-touch-holding::after {
    content: "";
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--ripley-accent, #22a9ff);
    transform: scaleX(0);
    transform-origin: left center;
    animation: ripley-touch-hold-progress 575ms linear forwards;
    pointer-events: none;
  }

  rdio-scanner-main .rdio-control button.rdio-button.ripley-touch-held {
    outline: 2px solid var(--ripley-accent, #22a9ff) !important;
    outline-offset: 1px !important;
  }
}

@keyframes ripley-touch-hold-progress {
  to { transform: scaleX(1); }
}

@media (max-width: 720px) {
  .ripley-ad-strip {
    margin-bottom: 1px !important;
  }

  .ripley-captions-wrap,
  html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-captions-wrap {
    margin-top: 1px !important;
  }

  .ripley-talkgroup-icon-symbol {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
  }

  .ripley-talkgroup-icon-image {
    width: 37px !important;
    height: 37px !important;
  }

  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history th,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display .history td {
    height: 24px !important;
    line-height: 24px !important;
  }

  .ripley-recent-play {
    height: 22px !important;
    min-height: 22px !important;
  }
}

/* Test Build 4.2 final spacing correction: override the earlier full padding
   selector with equal-or-higher specificity so the banner sits immediately
   below Quick Controls on desktop, portrait, and landscape layouts. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
  padding-bottom: 2px !important;
}

html[data-ripley-phone-layout="portrait"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main,
html[data-ripley-phone-layout="landscape"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
  padding-bottom: 1px !important;
}

/* Test Build 4.2: one archive/search layout, no talkgroup icon, safer queue controls. */
.ripley-talkgroup-icon-cluster { display: none !important; }
.ripley-extra-control-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
.ripley-extra-control-row > .rdio-button { width: 100% !important; max-width: none !important; white-space: normal !important; }
.ripley-call-search-tools { grid-template-columns: minmax(260px, 1fr) auto auto auto !important; }
.ripley-call-search-results { max-height: min(58vh, 640px); }
.ripley-call-search-table { min-width: 1180px !important; }
.ripley-call-search-table th:nth-child(1), .ripley-call-search-table td:nth-child(1) { width: 54px !important; text-align: center; }
.ripley-call-search-table th:nth-child(2), .ripley-call-search-table td:nth-child(2) { width: 245px !important; }
.ripley-call-search-table th:nth-child(3), .ripley-call-search-table td:nth-child(3) { width: 78px !important; text-align: center; }
.ripley-call-search-table th:nth-child(4), .ripley-call-search-table td:nth-child(4) { width: 100px !important; text-align: center; }
.ripley-call-search-table th:nth-child(5), .ripley-call-search-table td:nth-child(5) { width: 155px !important; }
.ripley-call-search-table th:nth-child(6), .ripley-call-search-table td:nth-child(6) { width: 72px !important; text-align: right; }
.ripley-call-search-name-cell, .ripley-search-unit, .ripley-search-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ripley-search-name { display: block; overflow: hidden; color: var(--ripley-heading, #fff); font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.ripley-search-action { min-height: 32px; padding: 6px 8px; border: 1px solid var(--ripley-accent, #26a7ff); border-radius: 7px; color: #fff; background: #0b6dc3; font: 850 10px/1 inherit; cursor: pointer; }
.ripley-search-full { border-color: var(--ripley-border, #315a80); background: var(--ripley-button, #123353); }
.ripley-call-search-pages { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 17px 15px; }
.ripley-call-search-pages button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--ripley-accent, #26a7ff); border-radius: 8px; color: #fff; background: #0b6dc3; font-weight: 850; cursor: pointer; }
.ripley-call-search-pages button:disabled { opacity: .38; cursor: default; }
.ripley-call-search-pages span { min-width: 120px; color: var(--ripley-text, #fff); font-weight: 900; text-align: center; }
@media (max-width: 920px) {
  .ripley-call-search-tools { grid-template-columns: 1fr 1fr !important; }
  .ripley-call-search-tools label { grid-column: 1 / -1 !important; }
}
@media (max-width: 520px) {
  .ripley-call-search-tools { grid-template-columns: 1fr !important; }
  .ripley-call-search-tools label { grid-column: auto !important; }
}

/* Test Build 4.3: use the compact archive-banner height on the main page. */
.ripley-ad-strip {
  width: 100% !important;
  max-width: 2048px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.ripley-ad-viewport {
  width: 100% !important;
  height: min(260px, calc(100vw * 0.3330078125)) !important;
  min-height: 0 !important;
  max-height: 260px !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
.ripley-ad-slide,
.ripley-ad-slide-image {
  height: 100% !important;
  max-height: 260px !important;
}
.ripley-ad-slide-image {
  width: 100% !important;
  object-fit: contain !important;
}
.ripley-captions-wrap,
html[data-ripley-theme][data-ripley-captions-mounted]:not([data-ripley-skin-disabled]) .ripley-captions-wrap {
  margin-top: 0 !important;
}
@media (max-width: 980px) {
  .ripley-ad-viewport,
  .ripley-ad-slide,
  .ripley-ad-slide-image {
    max-height: 180px !important;
  }
  .ripley-ad-viewport { height: min(180px, calc(100vw * 0.3330078125)) !important; }
}
@media (max-width: 600px) {
  .ripley-ad-viewport,
  .ripley-ad-slide,
  .ripley-ad-slide-image {
    max-height: 120px !important;
  }
  .ripley-ad-viewport { height: min(120px, calc(100vw * 0.3330078125)) !important; }
}

/* Test Build 4.3 — compact sponsor carousel at the bottom of the code chart. */
.ripley-radio-codes-ads{flex:0 0 auto;width:100%;margin:0;padding:0;border-top:1px solid var(--ripley-border,#315879);background:transparent}

/* The 10-code sponsor banner is the final item in the page's normal flow. */
.ripley-radio-codes-panel > .ripley-radio-codes-ads{position:static!important;margin-top:22px!important}

/* Test Build 4.3 — weather tools beside Weather Radio. */
.ripley-weather-tools{display:flex;align-items:stretch;gap:7px;min-width:0}
.ripley-weather-link-button{-webkit-tap-highlight-color:transparent;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:43px;padding:6px 10px;border:1px solid var(--ripley-border,#284c72);border-radius:var(--ripley-radius-sm,10px);color:var(--ripley-heading,#f5f9ff);background:var(--ripley-control,rgba(255,255,255,.06));font:800 10px/1.1 var(--ripley-font,system-ui);text-align:center;cursor:pointer}
.ripley-weather-link-button:hover,.ripley-weather-link-button:focus-visible{outline:none;border-color:var(--ripley-accent,#26a7ff);box-shadow:0 0 0 2px color-mix(in srgb,var(--ripley-accent,#26a7ff) 22%,transparent)}
.ripley-weather-link-button span{font-size:18px}.ripley-weather-link-button strong{max-width:90px}

.ripley-radar-button{position:relative;overflow:hidden;isolation:isolate;padding-left:7px}
.ripley-radar-button::before{content:"";position:absolute;inset:-40%;z-index:-1;background:conic-gradient(from 180deg,transparent 0 54%,rgba(64,197,255,.24) 64%,transparent 76%);animation:ripley-radar-button-glow 3.2s linear infinite;pointer-events:none}
.ripley-radar-animation{display:inline-flex!important;align-items:center;justify-content:center;width:38px;height:31px;flex:0 0 38px;font-size:0!important;filter:drop-shadow(0 0 5px rgba(90,206,255,.6))}
.ripley-radar-animation-svg{display:block;width:38px;height:31px;overflow:visible}
.ripley-radar-cloud{transform-origin:32px 18px;animation:ripley-radar-cloud-bob 2.2s ease-in-out infinite}
.ripley-radar-lightning{animation:ripley-radar-lightning-flash 1.75s steps(1,end) infinite}
.ripley-radar-rain{fill:none;stroke:#6edcff;stroke-width:2.2;stroke-linecap:round;animation:ripley-radar-rain-fall 1.15s ease-in infinite}
.ripley-radar-rain-two{animation-delay:.28s}.ripley-radar-rain-three{animation-delay:.55s}
.ripley-radar-dish{transform-origin:31px 34px;animation:ripley-radar-dish-pulse 2s ease-in-out infinite}
.ripley-radar-sweep{transform-box:view-box;transform-origin:31px 34px;animation:ripley-radar-sweep 1.8s linear infinite}
@keyframes ripley-radar-button-glow{to{transform:rotate(360deg)}}
@keyframes ripley-radar-cloud-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-1.8px)}}
@keyframes ripley-radar-lightning-flash{0%,58%,100%{opacity:.28}60%,70%{opacity:1;filter:drop-shadow(0 0 4px #ffe36b)}}
@keyframes ripley-radar-rain-fall{0%{opacity:0;transform:translateY(-2px)}25%{opacity:1}100%{opacity:0;transform:translateY(6px)}}
@keyframes ripley-radar-dish-pulse{0%,100%{filter:drop-shadow(0 0 1px rgba(189,155,255,.35))}50%{filter:drop-shadow(0 0 5px rgba(189,155,255,.9))}}
@keyframes ripley-radar-sweep{0%{transform:rotate(-25deg);opacity:.45}45%{opacity:1}100%{transform:rotate(335deg);opacity:.45}}
@media(prefers-reduced-motion:reduce){.ripley-radar-button::before,.ripley-radar-cloud,.ripley-radar-lightning,.ripley-radar-rain,.ripley-radar-dish,.ripley-radar-sweep{animation:none!important}}
@media(max-width:980px){.ripley-weather-link-button{padding-inline:8px}.ripley-weather-link-button strong{max-width:72px;font-size:9px}}
@media(max-width:720px) and (orientation:portrait){.ripley-alert-row{grid-template-columns:1fr}.ripley-weather-tools{display:grid;grid-template-columns:minmax(0,1.25fr) repeat(2,minmax(0,1fr));gap:6px}.ripley-weather-button{width:100%}.ripley-weather-link-button{width:100%;min-height:41px;padding:4px}.ripley-alert-ticker{grid-column:1/-1}}
@media(orientation:landscape) and (max-height:620px){.ripley-weather-tools{gap:5px}.ripley-weather-link-button{min-height:35px;height:35px;padding:3px 6px}.ripley-weather-link-button span{font-size:14px}.ripley-weather-link-button strong{font-size:8px;max-width:64px}}

/* Test Build 4.4: replay/next/stop controls and bottom acknowledgement. */
.ripley-extra-control-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.ripley-extra-control-row .ripley-stop-playback {
  border-color: #d86572 !important;
  background: linear-gradient(180deg, #7c2330, #4a121b) !important;
}

.ripley-rock-solid-shoutout {
  display: block;
  width: min(calc(100% - 20px), 1500px);
  margin: 0 auto 18px;
  padding: 12px 16px;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: var(--ripley-radius, 14px);
  color: var(--ripley-heading, #fff);
  background: var(--ripley-surface, #0e2137);
  box-shadow: 0 8px 24px #0004;
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 950;
  letter-spacing: .02em;
  text-align: center;
}

html[data-ripley-theme="light-gray"] .ripley-rock-solid-shoutout {
  color: #0b2743;
  background: #eef3f7;
  border-color: #aebbc8;
}

@media (pointer: coarse) {
  rdio-scanner-main .rdio-control button.rdio-button[data-ripley-quick-press="true"] {
    touch-action: manipulation !important;
  }
  rdio-scanner-main .rdio-control button.rdio-button[data-ripley-quick-press="true"]::after {
    display: none !important;
    animation: none !important;
  }
}

@media (max-width: 680px) {
  .ripley-extra-control-row {
    grid-template-columns: 1fr !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Test Build 4.4.5: left-anchored, unabridged live-title marquee.              */
/* The native title stays in the DOM and continues to drive Angular/Rdio.      */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big.ripley-live-title {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-align: left !important;
  text-overflow: clip !important;
  direction: ltr !important;
  color: transparent !important;
}

/* Keep Rdio/Angular's native title node in place so its binding continues to
   update. The runner is a visual overlay only; the native text is transparent
   underneath it and still drives the original application state. The selector
   intentionally outranks the older .row.big span ellipsis/right-align rules. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row.big.ripley-live-title > .ripley-live-title-runner {
  position: absolute !important;
  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  left: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-align: left !important;
  text-overflow: clip !important;
  direction: ltr !important;
  color: var(--ripley-heading, #f5f9ff) !important;
  font: inherit !important;
  line-height: inherit !important;
  pointer-events: none !important;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.ripley-live-title-scrolling .ripley-live-title-runner {
  animation: ripley-live-title-marquee var(--ripley-live-title-duration, 20s) ease-in-out infinite alternate;
}

.ripley-live-title-idle .ripley-live-title-runner {
  color: var(--ripley-muted, #9eb1c5) !important;
  font-size: .48em !important;
  font-weight: 750 !important;
  letter-spacing: .01em !important;
  opacity: .9;
}

@keyframes ripley-live-title-marquee {
  0%, 16% { transform: translate3d(0, 0, 0); }
  84%, 100% { transform: translate3d(calc(-1 * var(--ripley-live-title-distance, 0px)), 0, 0); }
}

.ripley-long-press-hint {
  grid-column: 1 / -1 !important;
  margin: -2px 0 1px !important;
  color: var(--ripley-muted, #a7bbcf) !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  letter-spacing: .08em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  pointer-events: none !important;
}

.ripley-weather-link-button.ripley-wp-radar-button {
  position: relative !important;
  isolation: isolate !important;
  width: 60px !important;
  min-width: 60px !important;
  height: 60px !important;
  min-height: 60px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: 0 4px 13px rgba(0,0,0,.42) !important;
}

.ripley-weather-link-button.ripley-wp-radar-button::before {
  display: none !important;
}

.ripley-weather-link-button.ripley-wp-radar-button::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: -25%;
  bottom: -25%;
  left: -80%;
  width: 42%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.08) 25%, rgba(255,255,255,.68) 50%, rgba(255,255,255,.08) 75%, transparent 100%);
  transform: skewX(-18deg);
  animation: ripley-wp-radar-shine 3.8s ease-in-out infinite;
  pointer-events: none;
}

.ripley-wp-radar-button-image {
  position: absolute !important;
  z-index: 1 !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 14px !important;
  animation: ripley-wp-radar-pulse 3.8s ease-in-out infinite;
}

.ripley-wp-radar-lightning {
  position: absolute !important;
  z-index: 3 !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 14px !important;
  opacity: 0;
  filter: saturate(1.25) drop-shadow(0 0 2px #fff36a) drop-shadow(0 0 5px #ffb000);
  transform: scale(1);
  transform-origin: center;
  pointer-events: none !important;
  animation: ripley-wp-radar-lightning-flash 3.8s ease-in-out infinite;
}

.ripley-weather-link-button.ripley-wp-radar-button:hover,
.ripley-weather-link-button.ripley-wp-radar-button:focus-visible {
  transform: translateY(-1px) scale(1.025) !important;
  box-shadow: 0 0 0 2px var(--ripley-accent, #26a7ff), 0 7px 18px rgba(0,0,0,.5) !important;
}

@keyframes ripley-wp-radar-shine {
  0%, 58% { left: -80%; opacity: 0; }
  64% { opacity: 1; }
  77%, 100% { left: 145%; opacity: 0; }
}

@keyframes ripley-wp-radar-lightning-flash {
  0%, 77% { opacity: 0; transform: scale(1); }
  80% { opacity: .35; transform: scale(1.01); }
  83%, 90% { opacity: 1; transform: scale(1.035); }
  95%, 100% { opacity: 0; transform: scale(1); }
}

@keyframes ripley-wp-radar-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.ripley-rock-solid-link {
  color: var(--ripley-accent, #35b4ff) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

.ripley-rock-solid-link:hover,
.ripley-rock-solid-link:focus-visible {
  color: #7ed6ff !important;
  outline: none !important;
  text-shadow: 0 0 10px rgba(53,180,255,.6);
}

@media (max-width: 720px) {
  .ripley-weather-link-button.ripley-wp-radar-button {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    justify-self: center !important;
  }
  .ripley-long-press-hint { font-size: 8px !important; }
}

@media (orientation: landscape) and (max-height: 620px) {
  .ripley-weather-link-button.ripley-wp-radar-button {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 9px !important;
  }
  .ripley-wp-radar-button-image { border-radius: 9px !important; }
  .ripley-long-press-hint { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ripley-live-title-scrolling .ripley-live-title-runner,
  .ripley-weather-link-button.ripley-wp-radar-button::after,
  .ripley-wp-radar-button-image,
  .ripley-wp-radar-lightning {
    animation: none !important;
  }
  .ripley-live-title-scrolling .ripley-live-title-runner {
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    transform: translate3d(0, 0, 0) !important;
  }
  .ripley-wp-radar-lightning {
    opacity: 1 !important;
    transform: scale(1.02) !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Test Build 4.4.7: glossy 3-D scanner controls and equal weather buttons.   */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) {
  --ripley-gloss-black:
    linear-gradient(112deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.12) 8%, rgba(255,255,255,0) 24%),
    linear-gradient(180deg, #353a40 0%, #171b20 18%, #07090c 54%, #020305 82%, #252a30 100%);
  --ripley-gloss-blue:
    linear-gradient(112deg, rgba(255,255,255,.48) 0%, rgba(255,255,255,.13) 9%, rgba(255,255,255,0) 25%),
    linear-gradient(180deg, #174a76 0%, #0b3154 22%, #03162a 58%, #020a13 82%, #0d3f6b 100%);
  --ripley-gloss-border: #8f969e;
  --ripley-gloss-ring: #070a0e;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button {
  position: relative !important;
  min-height: 78px !important;
  padding: 10px 11px !important;
  overflow: hidden !important;
  border: 1px solid #c0c5ca !important;
  border-radius: 18px !important;
  color: #fff !important;
  background: var(--ripley-gloss-black) !important;
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.48),
    inset 0 -3px 0 rgba(255,255,255,.08),
    inset 0 0 0 3px rgba(0,0,0,.78),
    0 0 0 2px var(--ripley-gloss-ring),
    0 0 0 3px var(--ripley-gloss-border),
    0 7px 13px rgba(0,0,0,.52) !important;
  text-shadow: 0 2px 3px #000, 0 0 5px #000 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button::before {
  color: #12b9ff !important;
  filter: drop-shadow(0 1px 1px #000) drop-shadow(0 0 3px rgba(0,170,255,.38));
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button:hover,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button:focus-visible {
  border-color: #d8dde2 !important;
  background:
    linear-gradient(112deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.15) 9%, rgba(255,255,255,0) 25%),
    linear-gradient(180deg, #42484f 0%, #20262c 20%, #090c10 55%, #030507 82%, #30363c 100%) !important;
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.58),
    inset 0 -3px 0 rgba(255,255,255,.1),
    inset 0 0 0 3px rgba(0,0,0,.78),
    0 0 0 2px #05080b,
    0 0 0 3px #a7adb4,
    0 0 16px rgba(22,178,255,.28),
    0 8px 15px rgba(0,0,0,.56) !important;
  transform: translateY(-1px) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button:active {
  transform: translateY(2px) scale(.99) !important;
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,.9),
    inset 0 0 0 3px rgba(0,0,0,.82),
    0 0 0 2px #05080b,
    0 0 0 3px #7d848b,
    0 2px 5px rgba(0,0,0,.7) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.on,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.partial,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button[data-ripley-action="live"].on {
  border-color: #65cfff !important;
  color: #fff !important;
  background: var(--ripley-gloss-blue) !important;
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.54),
    inset 0 -3px 0 rgba(35,166,255,.18),
    inset 0 0 0 3px rgba(0,8,18,.82),
    0 0 0 2px #02101d,
    0 0 0 3px #0ea9f2,
    0 0 17px rgba(0,165,255,.62),
    0 8px 15px rgba(0,0,0,.58) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.on::before,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button.partial::before {
  color: #62d7ff !important;
}

/* STOP PLAYBACK follows the same black/chrome treatment as every other key. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-extra-control-row .ripley-stop-playback {
  border-color: #c0c5ca !important;
  background: var(--ripley-gloss-black) !important;
}

/* The instruction is useful only on touch-first phone/tablet layouts. */
.ripley-long-press-hint { display: none !important; }
@media (max-width: 1366px) and (pointer: coarse),
       (max-width: 1366px) and (hover: none) {
  .ripley-long-press-hint {
    display: block !important;
    margin: 0 0 5px !important;
    padding: 2px 0 !important;
    color: #b9d4e9 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .075em !important;
  }
}

/* Equal-size, glossy Weather Radio / WeatherPulse Radar / Storm Shelters keys. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-tools {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(126px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 68px !important;
  min-height: 68px !important;
  padding: 7px 10px !important;
  overflow: hidden !important;
  border: 1px solid #b9bec4 !important;
  border-radius: 17px !important;
  color: #fff !important;
  background: var(--ripley-gloss-black) !important;
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.46),
    inset 0 -3px 0 rgba(255,255,255,.07),
    inset 0 0 0 3px rgba(0,0,0,.76),
    0 0 0 2px #070a0e,
    0 0 0 3px #848b92,
    0 6px 12px rgba(0,0,0,.48) !important;
  text-shadow: 0 2px 3px #000 !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button:hover,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button:focus-visible,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:hover,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:focus-visible {
  border-color: #dbe0e5 !important;
  background:
    linear-gradient(112deg, rgba(255,255,255,.5), rgba(255,255,255,.12) 10%, transparent 26%),
    linear-gradient(180deg, #42484f, #151a1f 25%, #05070a 70%, #282d33) !important;
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.56),
    inset 0 0 0 3px rgba(0,0,0,.76),
    0 0 0 2px #070a0e,
    0 0 0 3px #9aa1a8,
    0 0 15px rgba(16,178,255,.28),
    0 7px 14px rgba(0,0,0,.55) !important;
  transform: translateY(-1px) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button[data-state="manual"],
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button[data-state="auto"] {
  border-color: #5bd4ff !important;
  background: var(--ripley-gloss-blue) !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button strong {
  max-width: none !important;
  font-size: 11px !important;
  line-height: 1.02 !important;
  letter-spacing: .025em !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button {
  width: 100% !important;
  min-width: 0 !important;
  height: 68px !important;
  min-height: 68px !important;
  padding: 3px !important;
  border: 1px solid #b9bec4 !important;
  border-radius: 17px !important;
  background: var(--ripley-gloss-black) !important;
}

.ripley-wp-radar-art {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 62px !important;
  height: 62px !important;
  flex: 0 0 62px !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: transparent !important;
}

.ripley-wp-radar-art .ripley-wp-radar-button-image,
.ripley-wp-radar-art .ripley-wp-radar-lightning {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 14px !important;
  object-fit: contain !important;
}

/* Smaller glossy controls used elsewhere in the scanner shell. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-theme-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-icon-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-recent-play,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-search-action,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-call-search-pages button {
  border-color: #9da4ab !important;
  color: #fff !important;
  background: var(--ripley-gloss-black) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), inset 0 0 0 2px #05070a, 0 0 0 1px #656c73, 0 4px 8px #0008 !important;
  text-shadow: 0 1px 2px #000 !important;
}

@media (max-width: 980px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button {
    height: 62px !important;
    min-height: 62px !important;
  }
  .ripley-wp-radar-art { width: 56px !important; height: 56px !important; flex-basis: 56px !important; }
}

@media (max-width: 720px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button {
    min-height: 68px !important;
    border-radius: 15px !important;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control .rdio-button {
    min-height: 48px !important;
    border-radius: 11px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button {
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 12px !important;
  }
  .ripley-wp-radar-art { width: 42px !important; height: 42px !important; flex-basis: 42px !important; border-radius: 10px !important; }
}

/* -------------------------------------------------------------------------- */
/* Test Build 4.4.8: compact weather keys and standalone WeatherPulse art.    */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-tools {
  display: flex !important;
  grid-template-columns: none !important;
  width: auto !important;
  flex: 0 0 auto !important;
  align-items: stretch !important;
  gap: 8px !important;
}

/* Match the height and approximate width of one Quick Control instead of
   stretching the weather keys across the entire alert row. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
  width: 158px !important;
  min-width: 158px !important;
  max-width: 158px !important;
  height: 78px !important;
  min-height: 78px !important;
  flex: 0 0 158px !important;
  padding: 8px 10px !important;
  border-radius: 18px !important;
}

/* The supplied WeatherPulse square is the button. Do not put it inside a
   second black/chrome key. Its former white outer canvas is transparent. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button {
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
  height: 78px !important;
  min-height: 78px !important;
  flex: 0 0 78px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button:hover,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button:focus-visible {
  border: 0 !important;
  background: transparent !important;
  box-shadow: 0 0 0 2px var(--ripley-accent, #26a7ff), 0 7px 18px rgba(0,0,0,.52) !important;
}

.ripley-wp-radar-art {
  width: 78px !important;
  height: 78px !important;
  flex: 0 0 78px !important;
  border-radius: 18px !important;
  background: transparent !important;
}

.ripley-wp-radar-art .ripley-wp-radar-button-image,
.ripley-wp-radar-art .ripley-wp-radar-lightning {
  border-radius: 18px !important;
  object-fit: contain !important;
}

@media (max-width: 980px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    height: 68px !important;
    min-height: 68px !important;
    flex-basis: 132px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button,
  .ripley-wp-radar-art {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 68px !important;
    min-height: 68px !important;
    flex-basis: 68px !important;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-tools {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 7px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 66px !important;
    min-height: 66px !important;
    flex-basis: auto !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button,
  .ripley-wp-radar-art {
    width: 66px !important;
    min-width: 66px !important;
    max-width: 66px !important;
    height: 66px !important;
    min-height: 66px !important;
    flex-basis: 66px !important;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
    height: 48px !important;
    min-height: 48px !important;
    flex-basis: 116px !important;
    border-radius: 12px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button,
  .ripley-wp-radar-art {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    flex-basis: 48px !important;
    border-radius: 12px !important;
  }
  .ripley-wp-radar-art .ripley-wp-radar-button-image,
  .ripley-wp-radar-art .ripley-wp-radar-lightning {
    border-radius: 12px !important;
  }
}

/* Use the application's phone/tablet classification as the authoritative
   long-press switch. This stays hidden on normal desktop layouts even if the
   browser window is resized narrow. */
html[data-ripley-phone-layout="portrait"] .ripley-long-press-hint,
html[data-ripley-phone-layout="landscape"] .ripley-long-press-hint {
  display: block !important;
  grid-column: 1 / -1 !important;
}
html[data-ripley-phone-layout="desktop"] .ripley-long-press-hint {
  display: none !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button-copy strong {
  overflow: visible !important;
  font-size: 9px !important;
  line-height: 1.02 !important;
  letter-spacing: .045em !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

/* -------------------------------------------------------------------------- */
/* Test Build 4.4.9: text-only Weather Radio and compact matching top keys.    */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-tools {
  display: flex !important;
  width: auto !important;
  flex: 0 0 auto !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 78px !important;
  min-height: 78px !important;
  flex: 0 0 132px !important;
  padding: 7px 9px !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button-copy {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  text-align: center !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button-copy strong {
  display: block !important;
  font-size: 13px !important;
  line-height: 1.02 !important;
  letter-spacing: .025em !important;
  white-space: normal !important;
}

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-state-text {
  display: block !important;
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: .06em !important;
}

@media (max-width: 980px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: 68px !important;
    min-height: 68px !important;
    flex-basis: 118px !important;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-tools {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    gap: 7px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 66px !important;
    min-height: 66px !important;
    flex: 0 0 112px !important;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 48px !important;
    min-height: 48px !important;
    flex-basis: 104px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button-copy strong {
    font-size: 10px !important;
  }
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-state-text {
    font-size: 11px !important;
  }
}

/* Keep the final v5 control layout authoritative over older test-build rules. */
.ripley-extra-control-row {
  display: contents !important;
  width: auto !important;
  margin: 0 !important;
}
.ripley-extra-control-row .ripley-play-last-ten {
  width: auto !important;
  max-width: none !important;
  flex: initial !important;
}
html[data-ripley-listener-mode="simple"] rdio-scanner-main .rdio-control,
html[data-ripley-listener-mode="simple"] .history.ripley-recent-history,
html[data-ripley-listener-mode="simple"] .ripley-alert-row,
html[data-ripley-listener-mode="simple"] .ripley-clear-call-button,
html[data-ripley-listener-mode="simple"] #ripley-captions-wrap,
html[data-ripley-listener-mode="simple"] #ripley-scanner-law-warning,
html[data-ripley-listener-mode="simple"] #ripley-rock-solid-shoutout,
html[data-ripley-listener-mode="simple"] .ripley-mode-switcher { display: none !important; }
html[data-ripley-listener-mode="simple"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control { display: none !important; }
html[data-ripley-listener-mode="simple"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-display {
  grid-template-columns: minmax(0, 1fr) !important;
}
html[data-ripley-listener-mode="simple"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .row {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}
html[data-ripley-listener-mode="simple"][data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-display > .wrapper {
  display: none !important;
}
html[data-ripley-listener-mode="simple"] rdio-scanner-main > .ripley-ad-strip {
  width: 100% !important;
  margin: 0 !important;
}

/* v5.0.0r2: recorded calls replace the live readout while their audio plays. */
.ripley-recorded-readout {
  position: absolute;
  z-index: 6;
  inset: 10px calc(39% + 12px) 10px 10px;
  min-width: 0;
  padding: 10px 10px 42px;
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--ripley-screen-text, #dceafa);
  background: var(--ripley-display, #071725);
}
.ripley-recorded-readout[hidden] { display: none !important; }
.ripley-recorded-top,.ripley-recorded-meta { display:flex;justify-content:space-between;gap:12px;min-width:0;font-size:13px;font-weight:750; }
.ripley-recorded-channel { margin-top:7px;font-size:14px;font-weight:750; }
.ripley-recorded-code { font-size:13px;font-weight:750; }
.ripley-recorded-title { min-width:0;margin:5px 0;padding:9px 0 10px;overflow:hidden;border-top:1px solid var(--ripley-divider,#29455d);border-bottom:1px solid var(--ripley-divider,#29455d);color:var(--ripley-heading,#f5f9ff);font-size:clamp(26px,3.2vw,48px);font-weight:900;line-height:1.05;letter-spacing:-.025em;text-overflow:ellipsis;white-space:nowrap; }
.ripley-recorded-meta { margin-top:2px;flex-wrap:wrap; }
.ripley-playback-indicator {
  position:absolute;
  z-index:9;
  left:32%;
  bottom:9px;
  transform:translateX(-50%);
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:5px 9px;
  border:1px solid currentColor;
  border-radius:999px;
  background:color-mix(in srgb,var(--ripley-display,#071725) 90%,transparent);
  font:950 11px/1 var(--ripley-font,system-ui);
  letter-spacing:.06em;
  pointer-events:none;
}
.ripley-playback-indicator span { width:9px;height:9px;border-radius:50%;background:currentColor;box-shadow:0 0 10px currentColor; }
.ripley-playback-indicator.is-live { color:#62efa1; }
.ripley-playback-indicator.is-recorded { color:#ffbd4a; }
html[data-ripley-listener-mode="simple"] .ripley-recorded-readout { right:10px; }
html[data-ripley-listener-mode="simple"] .ripley-playback-indicator { left:50%; }
@media(max-width:900px){.ripley-recorded-readout{right:10px}.ripley-playback-indicator{left:50%}.ripley-recorded-title{white-space:normal}.ripley-recorded-top,.ripley-recorded-meta{font-size:11px}}
/* v5.0.0r3: exactly seven equal Quick Controls on each desktop line. */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control > .ripley-primary-control-row,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .rdio-control > .ripley-extra-control-row {
  display: contents !important;
}
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  flex-basis: 132px !important;
}
.ripley-alert-tornado-warning {
  animation: ripley-tornado-flash 0.78s step-end infinite;
}
.ripley-alert-severe-warning {
  animation: ripley-severe-warning-flash 0.86s step-end infinite;
}
@keyframes ripley-severe-warning-flash {
  50% {
    border-color: #fff0d8;
    color: #fff;
    background: #d94a00;
    box-shadow: 0 0 20px rgba(255, 112, 0, .88);
  }
}
@media (max-width: 1100px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 700px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* -------------------------------------------------------------------------- */
/* v5.0.0r13: compact three-line controls and one device-setup checklist.     */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main {
  position: relative !important;
}
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  grid-template-columns: repeat(5, minmax(120px, 158px)) !important;
  justify-content: center !important;
  align-items: stretch !important;
}
.ripley-scanner-top-actions {
  position: absolute !important;
  z-index: 14 !important;
  top: 8px !important;
  right: 12px !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  flex-wrap: wrap !important;
}
.ripley-mode-switcher,
.ripley-install-phone-app,
.ripley-weather-push-alerts,
.ripley-share-scanner {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border: 1px solid var(--ripley-border, #315a80);
  border-radius: 9px;
  color: var(--ripley-heading, #fff);
  background: var(--ripley-control, #112c48);
  font: 900 10px/1.05 var(--ripley-font, system-ui);
  cursor: pointer;
  white-space: nowrap;
}
.ripley-share-scanner { border-color: #56b7f7; background: #0b436d; }
.ripley-install-phone-app { border-color: #42c987; background: #0b4a30; }

html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  height: 78px !important;
  min-height: 78px !important;
  flex: 0 0 148px !important;
}
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button.ripley-wp-radar-button {
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
  height: 78px !important;
  min-height: 78px !important;
  flex: 0 0 78px !important;
  padding: 4px !important;
  overflow: hidden !important;
  border: 1px solid #b9bec4 !important;
  border-radius: 18px !important;
  background: linear-gradient(112deg,rgba(255,255,255,.42),rgba(255,255,255,.1) 10%,transparent 27%),linear-gradient(180deg,#353a40,#15191e 22%,#06080b 60%,#252a30) !important;
  box-shadow: inset 0 2px 1px #ffffff70,inset 0 0 0 2px #030507,0 0 0 1px #858c93,0 5px 9px #0009 !important;
}
.ripley-wp-radar-art {
  width: 68px !important;
  height: 68px !important;
  flex: 0 0 68px !important;
  border-radius: 14px !important;
}

.ripley-device-setup-panel { width: min(680px, calc(100vw - 22px)) !important; }
.ripley-device-setup-panel > p { margin: 0 0 15px; color: #bfd0df; }
.ripley-device-setup-choices { display: grid; gap: 9px; }
.ripley-device-setup-choice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid #315b7e;
  border-radius: 12px;
  background: #081d31;
  cursor: pointer;
}
.ripley-device-setup-choice input { width: 22px; height: 22px; accent-color: #29d77e; }
.ripley-device-setup-choice strong,
.ripley-device-setup-choice small { display: block; }
.ripley-device-setup-choice strong { color: #fff; font-size: 15px; }
.ripley-device-setup-choice small { margin-top: 3px; color: #a9c0d3; line-height: 1.3; }
.ripley-device-setup-status { min-height: 46px; margin-top: 12px; padding: 10px; border-radius: 9px; color: #a9f5ca; background: #09291b; line-height: 1.35; }
.ripley-device-setup-status:empty { display: none; }
.ripley-device-setup-status.is-error { color: #ffd0d5; background: #40131a; }
.ripley-device-setup-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 9px; margin-top: 12px; }
.ripley-device-setup-actions button { min-height: 48px !important; }
.ripley-device-setup-run { border-color: #50e69a !important; background: #0d6b43 !important; }

@media (max-width: 980px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    grid-template-columns: repeat(3, minmax(104px, 1fr)) !important;
  }
  .ripley-scanner-top-actions {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 7px 9px !important;
  }
  .ripley-scanner-top-actions button { width: 100%; white-space: normal; }
}
@media (max-width: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .ripley-device-setup-actions { grid-template-columns: 1fr; }
  .ripley-device-setup-panel { max-height: calc(100dvh - 20px); overflow: auto; padding: 16px !important; }
  .ripley-device-setup-panel h2 { font-size: 27px !important; }
}

/* -------------------------------------------------------------------------- */
/* v5.0.0r15: exact two-row controls and normal-flow desktop actions.         */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
  grid-template-columns: repeat(7, minmax(104px, 158px)) !important;
}
.ripley-scanner-top-actions {
  position: static !important;
  z-index: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  min-height: 34px !important;
  margin: 7px 10px 9px !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
@media (max-width: 980px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    grid-template-columns: repeat(3, minmax(104px, 1fr)) !important;
  }
  .ripley-scanner-top-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 7px 9px !important;
  }
}
@media (max-width: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) rdio-scanner-main > .rdio-control {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* -------------------------------------------------------------------------- */
/* v5.0.0r16: compact text-width weather keys beside the square WP button.    */
/* -------------------------------------------------------------------------- */
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  height: 78px !important;
  min-height: 78px !important;
  flex: 0 0 112px !important;
}
@media (max-width: 620px) {
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-button,
  html[data-ripley-theme]:not([data-ripley-theme="original"]):not([data-ripley-skin-disabled]) .ripley-weather-link-button:not(.ripley-wp-radar-button) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 0 !important;
  }
}
