:root {
  --blue: #0459ff;
  --blue-dark: #0046d4;
  --ink: #14151a;
  --muted: #5d6068;
  --line: #cfe0ff;
  --soft-line: #e8f0ff;
  --page: #ffffff;
  --panel: #ffffff;
  --shadow: none;
  --input-bg: #ffffff;
  --hover: #f6f9ff;
  --card-border: #a9c5ff;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.theme-dark {
  --ink: #f7f9ff;
  --muted: #b6bdca;
  --line: #24304a;
  --soft-line: #182236;
  --page: #000000;
  --panel: #07090d;
  --shadow: none;
  --input-bg: #0c0f16;
  --hover: #101827;
  --card-border: #1f55c7;
  --card-bg: #07090d;
  background: #000000;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.app-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.brand-header {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.brand-header.compact {
  min-height: 96px;
}

.brand-header.compact .brand-logo {
  font-size: clamp(34px, 8vw, 54px);
}

.brand-logo {
  display: inline-block;
  color: #050508;
  font-size: clamp(46px, 10vw, 72px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 0.95;
}

body.theme-dark .brand-logo {
  color: #fff;
}

.brand-logo span {
  color: var(--blue);
}

.brand-header p {
  margin: 12px 0 0;
  color: #54565c;
  font-size: clamp(14px, 2.6vw, 18px);
  font-weight: 800;
  letter-spacing: 0.8px;
}

body.theme-dark .brand-header p {
  color: #c4cad6;
}

.brand-header p span {
  margin: 0 7px;
}

.latest-section {
  border-bottom: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  font-size: clamp(20px, 4vw, 25px);
  letter-spacing: 0;
}

.section-title a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: clamp(15px, 3.2vw, 19px);
  font-weight: 800;
  white-space: nowrap;
}

.section-title svg,
.chevron {
  width: 22px;
  height: 22px;
}

.listing-list {
  display: grid;
}

.listing-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 150px 180px 24px;
  gap: 16px;
  align-items: center;
  min-height: 60px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.listing-row:hover {
  background: var(--hover);
}

.listing-row:last-child {
  border-bottom: 0;
}

.rank {
  color: var(--blue);
  font-size: 17px;
  font-weight: 800;
}

.title {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(15px, 2.8vw, 18px);
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-row strong {
  color: var(--blue);
  font-size: clamp(14px, 2.8vw, 18px);
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.location {
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(14px, 2.7vw, 17px);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: #343840;
  justify-self: end;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 30px 28px 22px;
  border-bottom: 1px solid var(--line);
}

.category-strip a {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  color: #2d3037;
  font-size: clamp(14px, 3.6vw, 21px);
  font-weight: 500;
  text-align: center;
}

.category-strip a + a {
  border-left: 1px solid var(--line);
}

.category-strip svg {
  width: clamp(32px, 8vw, 46px);
  height: clamp(32px, 8vw, 46px);
  color: var(--blue);
  stroke-width: 1.8;
}

.search-area {
  padding: 0 28px 24px;
  border-bottom: 1px solid var(--line);
}

.search-form {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 0 28px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--input-bg);
}

.search-form svg {
  width: 30px;
  height: 30px;
  color: #464a53;
  stroke-width: 2;
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: clamp(18px, 4vw, 24px);
}

.search-form input::placeholder {
  color: #777b84;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  min-height: 126px;
  padding: 24px 28px 14px;
  border-bottom: 1px solid var(--line);
}

.bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #4c5059;
  font-size: clamp(14px, 3.4vw, 21px);
}

.bottom-nav svg {
  width: clamp(34px, 9vw, 48px);
  height: clamp(34px, 9vw, 48px);
  stroke-width: 1.9;
}

.bottom-nav .active {
  color: var(--blue);
}

.add-link span {
  display: grid;
  place-items: center;
  width: clamp(48px, 11vw, 58px);
  height: clamp(48px, 11vw, 58px);
  margin-top: -10px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(4, 89, 255, 0.22);
}

.add-link span svg {
  width: 34px;
  height: 34px;
}

.copyright {
  padding: 10px 20px 18px;
  color: #5d6068;
  font-size: clamp(13px, 3vw, 17px);
  font-weight: 700;
  text-align: center;
}

.notice {
  margin: 18px 28px 0;
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  color: #173d8f;
  font-weight: 700;
}

.notice.error {
  border-color: #ffc5c5;
  background: #fff0f0;
  color: #9b1f1f;
}

.form-panel,
.detail-panel {
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.form-panel h1,
.detail-panel h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.05;
}

.form-help,
.detail-panel p,
.empty-state {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.stack-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--ink);
  outline: 0;
}

.stack-form input[type="file"] {
  padding: 12px;
}

.check-label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.check-label input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.check-label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.stack-form textarea {
  min-height: 120px;
  padding-top: 12px;
  resize: vertical;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(4, 89, 255, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.primary-action,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--blue-dark);
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.inline-action {
  width: max-content;
  margin-top: 16px;
}

.text-button {
  min-height: 40px;
  background: var(--input-bg);
  color: var(--blue);
}

.text-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.success-box {
  padding: 22px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.account-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.profile-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--blue);
  font-weight: 900;
}

.avatar-upload-trigger {
  position: relative;
  cursor: pointer;
}

.avatar-upload-trigger:hover {
  border-color: var(--blue);
}

.avatar-upload-trigger.is-uploading {
  opacity: 0.72;
}

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

.profile-avatar.large {
  width: 74px;
  height: 74px;
  font-size: 28px;
}

.profile-avatar img,
.avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-state {
  margin: 0;
  padding: 24px 28px;
}

.pill {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 11px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--blue);
  font-weight: 900;
}

.detail-price {
  display: block;
  margin: 18px 0;
  color: var(--blue);
  font-size: clamp(24px, 7vw, 38px);
}

.plan-box {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.plan-box b {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
}

.plan-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.45;
}

.plan-box li + li {
  margin-top: 6px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail-stats span {
  padding: 8px 10px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.contact-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.listing-gallery,
.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.listing-gallery img,
.listing-gallery video,
.media-preview-grid img,
.media-preview-grid video {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #000;
  object-fit: cover;
}

.listing-gallery a:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.media-upload-box {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.photo-uploader {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.photo-uploader.is-dragging {
  border-color: var(--blue);
  background: #f7faff;
  box-shadow: inset 0 0 0 2px rgba(21, 93, 252, 0.14);
}

.photo-uploader-head {
  display: grid;
  gap: 16px;
}

.photo-bot-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.photo-bot-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.photo-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.photo-add-button {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  width: 220px;
  min-height: 88px;
  padding: 14px;
  border: 2px dashed var(--card-border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--blue);
  cursor: pointer;
  text-align: left;
}

.photo-add-button.muted {
  border-style: solid;
  background: #fbfcff;
}

.photo-add-button:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.photo-add-icon {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.photo-add-button strong {
  font-size: 18px;
  line-height: 1.08;
}

.photo-add-button small {
  color: var(--muted);
  font-weight: 900;
}

.photo-count-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--ink);
  font-weight: 900;
}

.photo-count-row span {
  color: var(--blue);
  font-size: 22px;
}

.photo-count-row em {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.photo-progress {
  width: min(520px, 100%);
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6d9de;
}

.photo-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #83dfc5, var(--blue));
  transition: width 0.2s ease;
}

.media-picker {
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.is-hidden-picker {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.media-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.media-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  color: var(--brand);
  background: #fff;
  font-weight: 900;
}

.media-upload-box p {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.selected-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 48px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.selected-media-preview > p {
  flex: 1 0 100%;
  margin: 0;
}

.selected-media-preview .media-warning {
  color: #b42318;
}

.selected-media-item {
  position: relative;
  flex: 0 0 140px;
  width: 140px;
  aspect-ratio: 4 / 3;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: #94989f;
}

.selected-media-item b {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 0 0 4px 0;
  background: #259b78;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.selected-media-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  display: block;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: #94989f;
  opacity: 0.46;
}

.selected-media-item span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  padding: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: normal;
}

.photo-uploader {
  display: block;
  padding: 28px 28px 24px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--card-bg);
}

.photo-uploader .photo-uploader-head {
  display: block;
}

.photo-uploader .photo-bot-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.photo-uploader .photo-bot-check input {
  appearance: none;
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  border: 1px solid #e4a557;
  border-radius: 3px;
  background: #f5b45f;
  position: relative;
}

.photo-uploader .photo-bot-check input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.photo-uploader .photo-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
  margin: 0 0 24px;
}

.photo-uploader .photo-add-button {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  width: 260px;
  min-height: 96px;
  padding: 16px 18px;
  border: 2px dashed #d6d6d6;
  border-radius: 3px;
  background: #fff;
  color: #4388dc;
  cursor: pointer;
  text-align: left;
}

.photo-uploader .photo-add-button.muted {
  border-style: solid;
  background: #f9fafc;
}

.photo-uploader .photo-add-button:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.photo-uploader .photo-add-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #4388dc;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.photo-uploader .photo-add-button strong {
  display: block;
  min-width: 0;
  color: #4388dc;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.08;
}

.photo-uploader .photo-add-button small {
  display: block;
  margin-top: 3px;
  color: #7b7f88;
  font-size: 13px;
  font-weight: 800;
}

.photo-uploader .photo-count-row {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
}

.photo-uploader .photo-count-row span {
  color: #4388dc;
  font-size: 22px;
  font-weight: 900;
}

.photo-uploader .photo-count-row em {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.photo-uploader .photo-progress {
  width: min(520px, 100%);
  height: 8px;
  margin: 14px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #d3d5d9;
}

.photo-uploader .media-picker,
.photo-uploader .is-hidden-picker {
  display: none !important;
}

.photo-uploader > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-uploader .selected-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.photo-uploader .selected-media-preview > p {
  flex: 1 0 100%;
  margin: 0;
}

.photo-uploader .selected-media-item {
  flex: 0 0 150px;
  width: 150px;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 2px;
  background: #969696;
}

.photo-uploader .selected-media-item img {
  opacity: 0.5;
}

.photo-uploader .selected-media-item span {
  font-size: 13px;
  font-weight: 900;
}

.contact-card h2 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1.1;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.action-note {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.category-icon {
  display: grid;
  place-items: center;
  width: clamp(32px, 8vw, 46px);
  height: clamp(32px, 8vw, 46px);
  border: 2px solid var(--blue);
  border-radius: 4px;
  color: var(--blue);
  font-weight: 900;
}

.top-search {
  padding-top: 24px;
}

.qr-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: min(260px, 80vw);
  aspect-ratio: 1;
  margin: 28px auto 0;
  padding: 16px;
  border: 10px solid var(--blue);
  background: var(--panel);
}

.qr-preview span {
  background: var(--blue);
}

.qr-preview span:nth-child(3n),
.qr-preview span:nth-child(7),
.qr-preview span:nth-child(10),
.qr-preview span:nth-child(14) {
  background: var(--panel);
}

.admin-shell {
  width: min(100%, 1080px);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.compact-actions {
  justify-content: flex-end;
}

.profile-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.profile-top-actions form {
  margin: 0;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.status-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--muted);
  font-weight: 900;
}

.status-tabs a.selected {
  border-color: var(--blue);
  background: var(--card-bg);
  color: var(--blue);
}

.status-tabs span {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--card-bg);
}

.admin-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.message-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.message-shell {
  width: min(100%, 1180px);
}

.message-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: calc(100vh - 96px);
  border-top: 1px solid var(--line);
}

.conversation-list {
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.conversation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.conversation-toolbar h1 {
  font-size: 28px;
}

.conversation-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.conversation-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.conversation-item.selected,
.conversation-item:hover {
  background: var(--hover);
}

body.theme-dark .conversation-item.selected,
body.theme-dark .conversation-item:hover {
  background: #101827;
}

.avatar-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy b,
.conversation-copy span,
.conversation-copy small,
.conversation-copy p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy b {
  font-size: 15px;
}

.conversation-copy span,
.conversation-copy small,
.conversation-copy p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.conversation-copy p {
  margin: 5px 0 0;
  font-weight: 700;
}

.conversation-item em {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.conversation-panel {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  min-width: 0;
  background: var(--page);
}

.conversation-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.conversation-head h2 {
  margin: 0;
  font-size: 24px;
}

.conversation-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.conversation-product {
  display: grid;
  gap: 5px;
  margin: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.conversation-product b {
  color: var(--blue);
  font-size: 16px;
}

.conversation-product span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  padding: 14px;
  overflow: auto;
}

.chat-bubble {
  max-width: min(78%, 680px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: none;
}

.chat-bubble.mine {
  align-self: flex-end;
  border-color: var(--card-border);
  background: var(--hover);
}

body.theme-dark .chat-bubble.mine {
  background: #0d1a31;
}

.chat-bubble.theirs {
  align-self: flex-start;
}

.chat-bubble p {
  margin: 0;
  line-height: 1.45;
}

.chat-bubble span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.chat-compose textarea {
  width: 100%;
  min-height: 64px;
  max-height: 150px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--ink);
  resize: vertical;
}

.chat-compose .primary-action {
  height: 64px;
  min-height: 64px;
}

.conversation-empty {
  display: grid;
  place-content: center;
  min-height: 460px;
  padding: 28px;
  text-align: center;
}

.conversation-empty h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.conversation-empty p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.message-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.message-card h2 {
  margin: 0 0 8px;
  font-size: clamp(19px, 4vw, 26px);
  line-height: 1.12;
}

.message-card p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.admin-card h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.08;
}

.admin-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 20px;
}

.admin-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.admin-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.admin-meta div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

body.theme-dark .admin-meta div,
body.theme-dark .media-upload-box,
body.theme-dark .check-label {
  background: var(--card-bg);
}

body.theme-dark .media-picker span,
body.theme-dark .selected-media-item img {
  background: #080b12;
}

body.theme-dark .photo-uploader.is-dragging {
  background: #071225;
}

body.theme-dark .photo-add-button.muted {
  background: #080b12;
}

body.theme-dark .photo-add-icon {
  background: #111a2a;
}

body.theme-dark .photo-progress {
  background: #232936;
}

.admin-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-meta dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.reject-reason {
  display: grid;
  gap: 6px;
  color: #5d6068;
  font-size: 12px;
  font-weight: 900;
}

.reject-reason textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px;
  border: 1px solid #f2b8b5;
  border-radius: 4px;
  color: var(--ink);
  background: var(--input-bg);
  resize: vertical;
}

.admin-actions .primary-action,
.admin-actions .text-button,
.danger-button {
  width: 100%;
  min-height: 42px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #b42318;
  border-radius: 4px;
  background: var(--input-bg);
  color: #b42318;
  font-weight: 900;
  cursor: pointer;
}

.member-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--card-border);
  background: var(--card-bg);
}

.member-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

.member-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.member-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  vertical-align: top;
}

.member-table tr.is-banned td {
  background: #fff7f7;
}

.member-main-cell {
  width: 260px;
}

.member-main-cell strong,
.member-main-cell span,
.member-main-cell small {
  display: block;
}

.member-main-cell strong {
  margin-bottom: 3px;
  font-size: 17px;
  line-height: 1.15;
}

.member-main-cell span,
.member-main-cell small {
  color: var(--muted);
  font-size: 12px;
}

.member-main-cell .status-bad {
  margin-top: 5px;
  color: #b32318;
}

.count-pill {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--blue);
  font-weight: 900;
}

.member-actions-cell {
  width: 190px;
  white-space: nowrap;
}

.mini-button,
.member-ban-details summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.member-ban-details {
  display: inline-block;
  margin-left: 6px;
}

.member-ban-details form {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 280px;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  box-shadow: 0 16px 36px rgba(13, 34, 75, 0.14);
}

.member-ban-details textarea {
  width: 100%;
  min-height: 86px;
  padding: 10px;
  border: 1px solid #f2b8b5;
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--ink);
  resize: vertical;
}

body.theme-dark .member-table tr.is-banned td {
  background: #1a0f12;
}

body.theme-dark .pill,
body.theme-dark .status-tabs a.selected,
body.theme-dark .notice,
body.theme-dark .success-box,
body.theme-dark .change-note {
  background: #0d1a31;
  color: #d8e6ff;
}

body.theme-dark .rejection-note,
body.theme-dark .user-rejection,
body.theme-dark .notice.error {
  background: #1a0808;
  color: #ffd6d6;
}

body.theme-dark .rejection-note p,
body.theme-dark .user-rejection p {
  color: #ffd6d6;
}

.rejection-note,
.user-rejection,
.change-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #f2b8b5;
  border-radius: 4px;
  background: #fff0f0;
  color: #9b1f1f;
}

.rejection-note b,
.user-rejection b,
.change-note b {
  display: block;
  margin-bottom: 6px;
}

.rejection-note p,
.user-rejection p,
.change-note p {
  margin: 0;
  color: #9b1f1f;
  font-weight: 700;
  line-height: 1.45;
}

.change-note {
  border-color: var(--card-border);
  background: var(--card-bg);
  color: #173d8f;
}

.change-note p {
  color: #173d8f;
}

.account-listing.is-passive .listing-row {
  background: var(--card-bg);
}

.account-listing .user-rejection {
  margin: 0 28px 14px 64px;
}

.listing-inline-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 28px 12px;
}

.listing-inline-actions .text-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.profile-mini-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.public-profile-head .account-head {
  align-items: center;
}

.profile-actions {
  margin-top: 20px;
  justify-content: flex-start;
}

.rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--muted);
  font-weight: 800;
}

.rating-summary strong {
  color: var(--blue);
  font-size: 22px;
}

.review-form {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.review-form select,
.review-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.review-form textarea {
  min-height: 120px;
  resize: vertical;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
}

.review-card p {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .app-shell {
    border-left: 0;
    border-right: 0;
  }

  .brand-header {
    min-height: 112px;
  }

  .section-title {
    min-height: 70px;
    padding: 0 18px;
  }

  .listing-row {
    grid-template-columns: 28px minmax(0, 1fr) 120px 22px;
    gap: 9px;
    min-height: 58px;
    padding: 0 18px;
  }

  .location {
    display: none;
  }

  .category-strip {
    padding: 26px 16px 18px;
  }

  .search-area {
    padding: 0 18px 22px;
  }

  .search-form {
    min-height: 72px;
    padding: 0 20px;
  }

  .bottom-nav {
    min-height: 116px;
    padding: 22px 18px 12px;
  }

  .form-grid,
  .account-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-card,
  .admin-meta,
  .message-card,
  .message-layout {
    grid-template-columns: 1fr;
  }

  .message-layout {
    min-height: auto;
  }

  .conversation-list {
    border-right: 0;
  }

  .conversation-panel {
    min-height: 520px;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .chat-bubble {
    max-width: 92%;
  }

  .account-listing .user-rejection {
    margin: 0 18px 14px;
  }

  .listing-inline-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 18px 12px;
  }

  .contact-card {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .photo-add-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .photo-add-button {
    width: 100%;
  }

  .photo-count-row em {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .selected-media-item {
    flex-basis: calc(50% - 6px);
    width: calc(50% - 6px);
  }
}

@media (max-width: 430px) {
  .listing-row {
    grid-template-columns: 25px minmax(0, 1fr) 104px 18px;
    gap: 7px;
    min-height: 54px;
    padding: 0 12px;
  }

  .rank {
    font-size: 15px;
  }

  .listing-row strong {
    font-size: 13px;
  }

  .category-strip a {
    font-size: 13px;
  }

  .selected-media-item {
    flex-basis: 100%;
    width: 100%;
  }
}

/* Photo uploader hard override: keeps old PHP markup from leaking into the form. */
.media-upload-box.photo-uploader-ready {
  display: block !important;
  margin: 22px 0 !important;
  padding: 22px !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 4px !important;
  background: var(--card-bg) !important;
  color: var(--ink) !important;
}

.photo-uploader-ready .listing-photo-input,
.photo-uploader-ready .media-picker,
.photo-uploader-ready .is-hidden-picker,
.photo-uploader-ready label:has(.listing-photo-input) {
  display: none !important;
}

.photo-uploader-ready .photo-uploader-head {
  display: grid !important;
  gap: 18px !important;
  margin: 0 0 22px !important;
}

.photo-uploader-ready .photo-bot-check {
  display: grid !important;
  grid-template-columns: 34px 1fr !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

.photo-uploader-ready .photo-bot-check input {
  appearance: none !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  border: 1px solid #7fb0ff !important;
  border-radius: 4px !important;
  background: #0b63f6 !important;
  display: grid !important;
  place-items: center !important;
}

.photo-uploader-ready .photo-bot-check input::after {
  content: "" !important;
  width: 8px !important;
  height: 14px !important;
  border: solid #fff !important;
  border-width: 0 3px 3px 0 !important;
  transform: rotate(45deg) !important;
}

.photo-uploader-ready .photo-add-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  align-items: stretch !important;
}

.photo-uploader-ready .photo-add-button {
  all: unset !important;
  box-sizing: border-box !important;
  width: 260px !important;
  min-height: 92px !important;
  display: grid !important;
  grid-template-columns: 56px 1fr !important;
  grid-template-rows: auto auto !important;
  column-gap: 14px !important;
  align-items: center !important;
  padding: 16px !important;
  border: 2px dashed #c8d1df !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--blue) !important;
  cursor: pointer !important;
  font-weight: 900 !important;
}

.photo-uploader-ready .photo-add-button.muted {
  border-style: solid !important;
  color: #4285d9 !important;
}

.photo-uploader-ready .photo-add-icon {
  grid-row: 1 / 3 !important;
  width: 48px !important;
  height: 48px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 4px !important;
  background: #eef5ff !important;
  color: var(--blue) !important;
  font-size: 28px !important;
}

.photo-uploader-ready .photo-add-button strong {
  display: block !important;
  font-size: 18px !important;
  line-height: 1.12 !important;
  color: inherit !important;
}

.photo-uploader-ready .photo-add-button small {
  display: block !important;
  grid-column: 2 !important;
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.photo-uploader-ready .photo-count-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 14px !important;
  align-items: center !important;
  font-size: 16px !important;
}

.photo-uploader-ready .photo-count-row span {
  color: var(--blue) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

.photo-uploader-ready .photo-count-row em {
  color: var(--muted) !important;
  font-style: italic !important;
  font-weight: 700 !important;
}

.photo-uploader-ready .photo-progress {
  height: 8px !important;
  width: min(520px, 100%) !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: #d1d5db !important;
}

.photo-uploader-ready .photo-progress span {
  display: block !important;
  min-width: 24px !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: #94e2c4 !important;
}

.photo-uploader-ready .selected-media-preview {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 18px !important;
  padding-top: 18px !important;
  border-top: 1px solid var(--card-border) !important;
}

.photo-uploader-ready .selected-media-preview > p {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-weight: 800 !important;
}

.photo-uploader-ready .selected-media-item {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 4px !important;
  background: #9ca3af !important;
}

.photo-uploader-ready .selected-media-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.photo-uploader-ready .selected-media-item b {
  position: absolute !important;
  z-index: 2 !important;
  top: 0 !important;
  left: 0 !important;
  padding: 4px 9px !important;
  border-radius: 0 0 4px 0 !important;
  background: #299b70 !important;
  color: #fff !important;
  font-size: 12px !important;
}

.photo-uploader-ready .selected-media-item span {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  padding: 8px !important;
  background: rgba(0, 0, 0, 0.48) !important;
  color: #fff !important;
  text-align: center !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

@media (max-width: 760px) {
  .photo-uploader-ready .photo-add-button {
    width: 100% !important;
  }
}
/* Listing detail expandable photo gallery */
.listing-photo-toggle {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  color: var(--blue);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.listing-photo-toggle b {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: var(--blue);
  font-size: 13px;
}

.listing-photo-toggle.is-open {
  background: #eef5ff;
}

.listing-gallery.listing-gallery-panel {
  display: none !important;
  margin: 0 0 28px !important;
  padding: 14px !important;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: #fff;
}

.listing-gallery.listing-gallery-panel.is-open {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)) !important;
  gap: 12px !important;
}

.listing-gallery-panel .listing-gallery-viewer {
  display: none;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: #f8fbff;
}

.listing-gallery-panel .listing-gallery-viewer.is-visible {
  display: block;
}

.listing-gallery-panel .listing-gallery-viewer img,
.listing-gallery-panel .listing-gallery-viewer video {
  width: 100% !important;
  max-height: 72vh;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #000;
}

.listing-gallery-panel .listing-gallery-thumb {
  display: block;
  cursor: pointer;
}

.listing-gallery-panel .listing-gallery-thumb img,
.listing-gallery-panel .listing-gallery-thumb video,
.listing-gallery-panel > img.listing-gallery-thumb,
.listing-gallery-panel > video.listing-gallery-thumb {
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 4px !important;
  background: #000;
}

body.theme-dark .listing-photo-toggle {
  background: #05070a;
  color: #7fb0ff;
  border-color: #7fb0ff;
}

body.theme-dark .listing-photo-toggle.is-open,
body.theme-dark .listing-gallery.listing-gallery-panel,
body.theme-dark .listing-gallery-panel .listing-gallery-viewer {
  background: #05070a;
  border-color: #1f2a44;
}
/* QRilan rules modal and stable listing gallery */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.qrilan-rules-accept {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 18px 0 !important;
  padding: 16px 18px !important;
  border: 1px solid var(--card-border, #a9c5ff) !important;
  border-radius: 4px !important;
  background: var(--card-bg, #fff) !important;
  color: var(--ink, #14151a) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

.qrilan-rules-checkbox {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  accent-color: var(--blue, #0459ff) !important;
}

.qrilan-rules-copy {
  min-width: 0;
}

.qrilan-rules-link {
  all: unset;
  color: var(--blue, #0459ff) !important;
  cursor: pointer !important;
  font-weight: 900 !important;
}

.qrilan-rules-link:hover {
  text-decoration: underline !important;
}

.qrilan-rules-backdrop[hidden] {
  display: none !important;
}

.qrilan-rules-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6vh 18px;
  overflow: auto;
  background: rgba(0, 0, 0, .62);
}

body.qrilan-rules-open {
  overflow: hidden;
}

.qrilan-rules-modal {
  position: relative;
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 28px 32px;
  border: 1px solid var(--card-border, #a9c5ff);
  border-radius: 4px;
  background: var(--panel, #fff);
  color: var(--ink, #14151a);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.qrilan-rules-close {
  position: sticky;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #8b95a5;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.qrilan-rules-modal h2 {
  margin: 0 52px 16px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line, #cfe0ff);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
}

.qrilan-rules-modal h3 {
  margin: 28px 0 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line, #cfe0ff);
  font-size: clamp(20px, 3vw, 28px);
}

.qrilan-rules-modal p,
.qrilan-rules-modal li {
  color: var(--ink, #14151a);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.45;
}

.qrilan-rules-modal ol {
  margin: 0 0 0 24px;
  padding: 0;
}

.qrilan-rules-modal li + li {
  margin-top: 10px;
}

.listing-gallery.qrilan-fixed-gallery {
  display: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  margin: 0 0 28px !important;
  padding: 14px !important;
  border: 1px solid var(--card-border, #a9c5ff) !important;
  border-radius: 4px !important;
  background: var(--card-bg, #fff) !important;
  box-sizing: border-box !important;
}

.listing-gallery.qrilan-fixed-gallery.is-open {
  display: block !important;
}

.qrilan-fixed-gallery,
.qrilan-fixed-gallery * {
  box-sizing: border-box !important;
  max-width: 100%;
}

.qrilan-fixed-gallery-main {
  width: 100% !important;
  min-height: 220px !important;
  max-height: 68vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #f8fbff !important;
  border: 1px solid var(--card-border, #a9c5ff) !important;
  border-radius: 4px !important;
}

.qrilan-fixed-gallery-main img,
.qrilan-fixed-gallery-main video {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 68vh !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f8fbff !important;
}

.qrilan-fixed-gallery-thumbs {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)) !important;
  gap: 8px !important;
  margin-top: 10px !important;
  width: 100% !important;
  overflow: hidden !important;
}

.qrilan-fixed-gallery-thumb {
  all: unset !important;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  border: 1px solid var(--card-border, #a9c5ff) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  background: #fff !important;
  cursor: pointer !important;
}

.qrilan-fixed-gallery-thumb.is-active {
  border-color: var(--blue, #0459ff) !important;
  box-shadow: 0 0 0 2px rgba(4, 89, 255, .16) !important;
}

.qrilan-fixed-gallery-thumb img,
.qrilan-fixed-gallery-thumb video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.theme-dark .qrilan-rules-modal,
body.theme-dark .qrilan-rules-accept {
  background: #05070a !important;
  color: #f8fbff !important;
  border-color: #1f2a44 !important;
}

body.theme-dark .qrilan-fixed-gallery-main,
body.theme-dark .qrilan-fixed-gallery-main img,
body.theme-dark .qrilan-fixed-gallery-main video {
  background: #05070b !important;
}

@media (max-width: 760px) {
  .qrilan-rules-accept {
    align-items: flex-start !important;
    padding: 14px !important;
  }

  .qrilan-rules-modal {
    padding: 22px 18px;
  }

  .qrilan-fixed-gallery-main {
    min-height: 180px !important;
  }

  .qrilan-fixed-gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) !important;
  }
}
