:root {
  --font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --radius-lg: 16px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --transition: 0.24s ease;
  --bg: #f7f9fc;
  --bg-soft: #eff6ff;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #dbe4ee;
  --line-soft: #e8eef5;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --primary-deep: #1e3a8a;
  --text-soft: #334155;
  --muted-soft: #94a3b8;
  --success: #2f9d67;
  --warning: #da9a19;
  --danger: #d85353;
}

/* Apple-inspired motion, theme shell, and mobile app layout */
:root {
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 180ms;
  --motion-mid: 260ms;
  --motion-slow: 340ms;
  --ios-topbar-bg: rgba(255, 255, 255, 0.78);
  --ios-tabbar-bg: rgba(255, 255, 255, 0.82);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #10141c;
  --bg-soft: #171d28;
  --panel: #1c2431;
  --panel-soft: #222b3a;
  --line: rgba(226, 232, 240, 0.16);
  --line-soft: rgba(226, 232, 240, 0.1);
  --text: #f4f7fb;
  --text-soft: #d8e0ec;
  --muted: #a8b4c6;
  --muted-soft: #7f8da3;
  --primary: #7aa7ff;
  --primary-deep: #b9d2ff;
  --primary-soft: rgba(122, 167, 255, 0.16);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --ios-topbar-bg: rgba(16, 20, 28, 0.76);
  --ios-tabbar-bg: rgba(16, 20, 28, 0.82);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #10141c;
    --bg-soft: #171d28;
    --panel: #1c2431;
    --panel-soft: #222b3a;
    --line: rgba(226, 232, 240, 0.16);
    --line-soft: rgba(226, 232, 240, 0.1);
    --text: #f4f7fb;
    --text-soft: #d8e0ec;
    --muted: #a8b4c6;
    --muted-soft: #7f8da3;
    --primary: #7aa7ff;
    --primary-deep: #b9d2ff;
    --primary-soft: rgba(122, 167, 255, 0.16);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    --ios-topbar-bg: rgba(16, 20, 28, 0.76);
    --ios-tabbar-bg: rgba(16, 20, 28, 0.82);
    color-scheme: dark;
  }
}

/* Report assistant */
.yp-agent-root {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 960;
  font-family: inherit;
}

.yp-agent-fab,
.yp-agent-close,
.yp-agent-form button,
.yp-agent-suggestions button {
  font: inherit;
}

.yp-agent-fab {
  min-width: 96px;
  min-height: 48px;
  border: 1px solid rgba(91, 141, 239, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #70a7ff);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.26);
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.yp-agent-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.32);
}

.yp-mobile-back {
  display: none;
  position: fixed;
  z-index: 1250;
  top: max(14px, calc(env(safe-area-inset-top, 0px) + 14px));
  left: max(14px, calc(env(safe-area-inset-left, 0px) + 14px));
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.yp-mobile-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yp-agent-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 120px));
  overflow: hidden;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(22px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.yp-agent-root.is-open .yp-agent-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.yp-agent-root.is-open .yp-agent-fab {
  opacity: 0;
  pointer-events: none;
}

.yp-agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 12px;
}

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

.yp-agent-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.yp-agent-close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.yp-agent-disclaimer {
  margin: 0 20px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.yp-agent-suggestions {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 20px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.yp-agent-suggestions button {
  flex: 0 0 auto;
  max-width: min(260px, 72vw);
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  scroll-snap-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.yp-agent-suggestions button:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.yp-agent-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 20px 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

.yp-agent-message {
  display: flex;
}

.yp-agent-message.is-user {
  justify-content: flex-end;
}

.yp-agent-bubble {
  position: relative;
  max-width: 86%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.yp-agent-bubble.is-loading {
  padding-right: 48px;
  color: var(--text);
  animation: yp-agent-loading-pulse 1.7s ease-in-out infinite;
}

.yp-agent-bubble.is-loading::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(122, 167, 255, 0.16) 45%, transparent 75%);
  transform: translateX(-100%);
  animation: yp-agent-loading-sheen 1.45s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  content: "";
}

.yp-agent-bubble.is-loading::after {
  position: absolute;
  right: 16px;
  bottom: 13px;
  width: 24px;
  color: var(--muted);
  letter-spacing: 2px;
  animation: yp-agent-loading-dots 1.15s steps(4, end) infinite;
  content: "";
}

.yp-agent-message.is-user .yp-agent-bubble {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, #2563eb, #70a7ff);
  color: #fff;
}

@keyframes yp-agent-loading-sheen {
  to {
    transform: translateX(100%);
  }
}

@keyframes yp-agent-loading-pulse {
  0%,
  100% {
    border-color: var(--line);
  }
  50% {
    border-color: rgba(122, 167, 255, 0.44);
  }
}

@keyframes yp-agent-loading-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75%,
  100% {
    content: "...";
  }
}

.yp-agent-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.yp-agent-count {
  grid-column: 1 / 2;
  margin-top: -5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  justify-self: end;
}

.yp-agent-form textarea {
  min-height: 48px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

.yp-agent-form textarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.yp-agent-form button {
  min-width: 68px;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.yp-agent-form button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

html[data-theme="dark"] .yp-agent-panel {
  background: rgba(24, 35, 51, 0.92);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .yp-agent-fab,
html[data-theme="dark"] .yp-agent-message.is-user .yp-agent-bubble {
  color: #08111f;
}

@media (max-width: 768px) {
  .yp-agent-root {
    right: 16px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .yp-agent-fab {
    min-width: 88px;
    min-height: 44px;
  }

  .yp-agent-panel {
    position: fixed;
    inset: auto 12px calc(82px + env(safe-area-inset-bottom)) 12px;
    width: auto;
    max-height: min(660px, calc(100vh - 120px));
    border-radius: 22px;
    transform-origin: center bottom;
  }

  .yp-agent-head,
  .yp-agent-disclaimer,
  .yp-agent-suggestions,
  .yp-agent-messages,
  .yp-agent-form {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yp-agent-fab,
  .yp-agent-panel,
  .yp-agent-suggestions button,
  .yp-agent-bubble.is-loading,
  .yp-agent-bubble.is-loading::before,
  .yp-agent-bubble.is-loading::after {
    transition: none !important;
    animation: none !important;
  }
}

html {
  background: var(--bg);
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  transition: background-color var(--motion-mid) var(--ease-apple), color var(--motion-mid) var(--ease-apple);
}

.page-shell,
.page-main,
.section-card,
.portal-section,
.service-hall-shell,
.report-center-shell,
.report-detail-shell,
.login-shell,
.task-shell {
  animation: yp-enter var(--motion-slow) var(--ease-apple) both;
}

.section-card,
.portal-card,
.service-hall-card,
.promo-panel,
.metric-card,
.control-panel,
.report-center-card,
.report-document-card,
.report-detail-card,
.service-form-section,
.service-upload-card,
.task-card,
.auth-card,
.login-benefit-card,
.workbench-note,
.upload-box {
  transition:
    transform var(--motion-mid) var(--ease-apple),
    box-shadow var(--motion-mid) var(--ease-apple),
    border-color var(--motion-mid) var(--ease-apple),
    background-color var(--motion-mid) var(--ease-apple),
    color var(--motion-mid) var(--ease-apple);
}

.portal-card:hover,
.service-hall-card:hover,
.promo-panel:hover,
.report-center-card:hover,
.service-form-section:hover,
.upload-box:hover,
.task-card:hover,
.auth-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

html[data-theme="dark"] .portal-card:hover,
html[data-theme="dark"] .service-hall-card:hover,
html[data-theme="dark"] .promo-panel:hover,
html[data-theme="dark"] .report-center-card:hover,
html[data-theme="dark"] .service-form-section:hover,
html[data-theme="dark"] .upload-box:hover,
html[data-theme="dark"] .task-card:hover,
html[data-theme="dark"] .auth-card:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
}

.primary-button,
.solid-button,
.outline-button,
.secondary-button,
.small-button,
.text-button,
button,
a {
  transition:
    transform var(--motion-fast) var(--ease-apple),
    box-shadow var(--motion-fast) var(--ease-apple),
    border-color var(--motion-fast) var(--ease-apple),
    background-color var(--motion-fast) var(--ease-apple),
    color var(--motion-fast) var(--ease-apple),
    opacity var(--motion-fast) var(--ease-apple);
}

.primary-button:hover,
.solid-button:hover,
.outline-button:hover,
.secondary-button:hover,
.small-button:hover,
.text-button:hover,
.yp-icon-button:hover {
  transform: translateY(-1px) scale(1.01);
}

.primary-button:active,
.solid-button:active,
.outline-button:active,
.secondary-button:active,
.small-button:active,
.text-button:active,
.yp-icon-button:active,
.yp-mobile-tabbar a:active {
  transform: scale(0.98);
}

.mode-item,
.section-nav-link,
.topbar-nav-link,
.home-entry-nav-link,
.auth-switcher button,
.task-progress-track span,
.progress-box span {
  transition:
    transform var(--motion-mid) var(--ease-apple),
    width var(--motion-slow) var(--ease-apple),
    background-color var(--motion-mid) var(--ease-apple),
    border-color var(--motion-mid) var(--ease-apple),
    color var(--motion-mid) var(--ease-apple);
}

.yp-shell-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.yp-icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.yp-menu-button {
  display: none;
  font-size: 20px;
  line-height: 1;
}

.yp-mobile-tabbar {
  display: none;
}

.yp-network-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  display: grid;
  max-width: min(360px, calc(100vw - 32px));
  gap: 4px;
  padding: 14px 46px 14px 16px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 14px;
  background: #fff7ed;
  color: #7f1d1d;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.yp-network-banner.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.yp-network-banner strong {
  color: #7f1d1d;
  font-size: 14px;
}

.yp-network-banner span {
  color: #9a3412;
  font-size: 12px;
  line-height: 1.45;
}

.yp-network-banner button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 146, 60, 0.16);
  color: #7f1d1d;
  font-size: 0;
  cursor: pointer;
}

.yp-network-banner button::before,
.yp-network-banner button::after {
  position: absolute;
  top: 14px;
  left: 8px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.yp-network-banner button::before {
  transform: rotate(45deg);
}

.yp-network-banner button::after {
  transform: rotate(-45deg);
}

html[data-theme="dark"] .yp-network-banner {
  border-color: rgba(248, 113, 113, 0.28);
  background: #2a1518;
  color: #fecaca;
}

html[data-theme="dark"] .yp-network-banner strong {
  color: #fee2e2;
}

html[data-theme="dark"] .yp-network-banner span {
  color: #fed7aa;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .portal-section,
html[data-theme="dark"] .service-hall-shell,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .report-document,
html[data-theme="dark"] .task-card {
  background-color: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .section-card,
html[data-theme="dark"] .portal-card,
html[data-theme="dark"] .service-hall-card,
html[data-theme="dark"] .promo-panel,
html[data-theme="dark"] .control-panel,
html[data-theme="dark"] .service-form-section,
html[data-theme="dark"] .service-upload-card,
html[data-theme="dark"] .report-center-card,
html[data-theme="dark"] .report-center-empty,
html[data-theme="dark"] .report-detail-card,
html[data-theme="dark"] .report-document-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .login-benefit-card,
html[data-theme="dark"] .task-meta-grid div,
html[data-theme="dark"] .task-estimate,
html[data-theme="dark"] .page-loading-card,
html[data-theme="dark"] .task-motion,
html[data-theme="dark"] .workbench-note,
html[data-theme="dark"] .report-low-confidence,
html[data-theme="dark"] .report-low-confidence-item {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

html[data-theme="dark"] .text-input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .upload-box,
html[data-theme="dark"] .mode-item,
html[data-theme="dark"] .choice-chip,
html[data-theme="dark"] .switch-row,
html[data-theme="dark"] .auth-switcher .outline-button {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

html[data-theme="dark"] .section-text,
html[data-theme="dark"] .upload-meta,
html[data-theme="dark"] .report-meta-list dd,
html[data-theme="dark"] .report-source-cell p,
html[data-theme="dark"] .report-low-confidence-item p,
html[data-theme="dark"] .login-benefit-card p,
html[data-theme="dark"] .workbench-note p {
  color: var(--muted);
}

html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .solid-button {
  background: linear-gradient(135deg, #6ea0ff, #8bb6ff);
  color: #07111f;
}

html[data-theme="dark"] .outline-button,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .text-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

html[data-theme="dark"] a {
  color: var(--primary-deep);
}

@keyframes yp-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .page-shell {
    width: 100%;
    max-width: 100%;
    padding-right: 16px;
    padding-left: 16px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .page-main {
    width: 100%;
    max-width: 100%;
  }

  .topbar,
  .home-entry-topbar {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 90;
    margin: 0 -16px 18px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: var(--ios-topbar-bg) !important;
    box-shadow: none;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .topbar-brand-row,
  .home-entry-topbar {
    min-height: 58px;
    padding: 10px 16px;
  }

  .brand-block h1,
  .home-entry-logo-copy small,
  .home-entry-brand-meta {
    display: none !important;
  }

  .brand-mark,
  .home-entry-logo-copy strong {
    white-space: nowrap;
    font-size: 18px;
  }

  .topbar-nav,
  .home-entry-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    display: grid;
    max-height: 0;
    overflow: hidden;
    gap: 8px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 18px;
    background: var(--ios-topbar-bg);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    transition:
      max-height var(--motion-slow) var(--ease-apple),
      opacity var(--motion-mid) var(--ease-apple),
      padding var(--motion-mid) var(--ease-apple),
      border-color var(--motion-mid) var(--ease-apple);
  }

  .topbar-brand-row.is-mobile-menu-open .topbar-nav,
  .home-entry-topbar.is-mobile-menu-open .home-entry-nav {
    max-height: 360px;
    padding: 10px;
    border-color: var(--line);
    opacity: 1;
    pointer-events: auto;
  }

  .topbar-nav-link,
  .home-entry-nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    white-space: nowrap;
  }

  .yp-shell-controls {
    margin-left: auto;
  }

  .yp-menu-button {
    display: inline-grid;
  }

  .yp-mobile-tabbar {
    position: fixed;
    right: 10px;
    bottom: 8px;
    left: 10px;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: var(--ios-tabbar-bg);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .yp-mobile-tabbar a {
    display: grid;
    min-width: 0;
    min-height: 50px;
    place-items: center;
    gap: 2px;
    border-radius: 16px;
    color: var(--muted);
    text-decoration: none;
  }

  .yp-mobile-tabbar a span {
    font-size: 18px;
    line-height: 1;
  }

  .yp-mobile-tabbar a strong {
    font-size: 12px;
    line-height: 1;
  }

  .yp-mobile-tabbar a.is-active {
    background: var(--primary-soft);
    color: var(--primary-deep);
  }

  .section-card,
  .portal-card,
  .service-hall-card,
  .promo-panel,
  .control-panel,
  .service-form-section,
  .service-upload-card,
  .report-center-card,
  .report-center-empty,
  .report-detail-card,
  .report-document-card,
  .auth-card,
  .task-card {
    max-width: 100%;
    border-radius: 20px;
  }

  .primary-button,
  .solid-button,
  .outline-button,
  .secondary-button,
  .text-button,
  button,
  .text-input,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .home-entry-hero,
  .home-page-hero,
  .service-hall-header,
  .report-page-head,
  .report-summary-grid,
  .workbench-grid,
  .service-upload-grid,
  .login-shell,
  .task-card-head,
  .task-motion,
  .page-loading-card {
    grid-template-columns: 1fr !important;
  }

  .home-entry-hero,
  .home-page-hero {
    min-height: auto;
    padding: 42px 18px 28px;
  }

  .home-entry-hero h1,
  .home-page .home-entry-hero h1,
  .service-hall-header h1 {
    font-size: clamp(36px, 11vw, 50px);
    line-height: 1.05;
  }

  .home-page-hero-description,
  .section-text {
    font-size: 16px;
    line-height: 1.7;
  }

  .marketing-hero-actions,
  .home-page-hero-actions,
  .service-hall-card-actions,
  .report-card-actions,
  .inline-tools,
  .task-actions {
    display: grid;
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  .marketing-hero-actions a,
  .home-page-hero-actions a,
  .service-hall-card-actions a,
  .report-card-actions a,
  .report-card-actions button,
  .inline-tools a,
  .task-actions a {
    width: 100%;
  }

  .home-entry-hero-visual,
  .home-page-hero-visual {
    min-height: 180px;
    transform: none;
  }

  .portal-grid,
  .home-feature-grid,
  .promo-grid,
  .service-hall-grid,
  .report-center-grid,
  .report-metric-grid,
  .task-meta-grid,
  .metric-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .service-hall-card-top {
    flex-wrap: wrap;
    gap: 10px;
  }

  .service-hall-card-body p {
    display: block;
    overflow: visible;
  }

  .service-layout {
    display: block;
  }

  .section-sidebar.service-menu-panel,
  .service-upload-page .service-menu-panel,
  body.is-service-upload-route .service-menu-panel {
    position: static;
    width: 100%;
    margin: 0 0 16px;
  }

  .section-nav,
  #upload-menu {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 10px;
    scrollbar-width: none;
  }

  .section-nav::-webkit-scrollbar,
  #upload-menu::-webkit-scrollbar {
    display: none;
  }

  .section-nav-group {
    display: flex;
    gap: 8px;
  }

  .section-nav-label {
    display: none;
  }

  .section-nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .service-form-section,
  .control-panel,
  .service-submit-panel {
    padding: 18px;
  }

  .field-block,
  .service-form-section-body {
    min-width: 0;
  }

  .text-input,
  textarea,
  .upload-box,
  .mode-group,
  .choice-grid {
    width: 100%;
  }

  textarea,
  body.is-service-upload-route textarea {
    min-height: 160px;
  }

  .upload-box {
    min-height: 190px;
    padding: 24px 16px;
  }

  .consent-check {
    align-items: flex-start;
    gap: 10px;
    line-height: 1.65;
  }

  #service-submit-button,
  .service-submit-panel .primary-button,
  .workbench-side .primary-button {
    width: 100%;
    min-height: 48px;
  }

  .task-progress-track {
    width: 100%;
  }

  .task-step-list li {
    align-items: flex-start;
    white-space: normal;
    line-height: 1.5;
  }

  .report-card-topline,
  .report-meta-list,
  .report-document-meta,
  .report-result-list,
  .report-stat-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .report-comparison-table {
    display: grid;
    gap: 12px;
    overflow: visible;
  }

  .report-comparison-head {
    display: none;
  }

  .report-comparison-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
  }

  .report-comparison-index {
    width: fit-content;
  }

  .report-source-cell,
  .report-source-cell strong,
  .report-source-cell p,
  .report-source-cell a,
  .report-original-text {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .report-screen-actions .primary-button,
  .report-screen-actions .outline-button {
    width: 100%;
  }

  .login-shell {
    justify-items: center;
    gap: 18px;
  }

  .auth-card {
    width: 100%;
    max-width: 420px;
  }

  .auth-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    white-space: nowrap;
  }

  .auth-switcher .outline-button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .page-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar,
  .home-entry-topbar {
    margin-right: -14px;
    margin-left: -14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

html[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-soft: #eff6ff;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #dbe4ee;
  --line-soft: #e8eef5;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --primary-deep: #1e3a8a;
  --text-soft: #334155;
  --muted-soft: #94a3b8;
  --success: #2f9d67;
  --warning: #da9a19;
  --danger: #d85353;
}

html[data-theme="dark"] {
  --bg: #121a26;
  --bg-soft: #172232;
  --panel: #192434;
  --panel-soft: #1f2d41;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #edf2f7;
  --muted: #b5c0d0;
  --primary: #8db4ff;
  --primary-soft: rgba(141, 180, 255, 0.15);
  --success: #65d2a0;
  --warning: #f1c86c;
  --danger: #f08f8f;
}

html[data-theme="dark"] .match-card,
html[data-theme="dark"] .risk-card {
  box-shadow: 0 12px 28px rgba(6, 10, 18, 0.18);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(34, 48, 76, 0.36), rgba(18, 26, 38, 0) 24%),
    radial-gradient(circle at top, rgba(87, 124, 197, 0.12), transparent 32%),
    var(--bg);
}

html[data-theme="dark"] .topbar {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(120deg, #1d2a40 0%, #203554 54%, #244166 100%);
  box-shadow: 0 20px 48px rgba(7, 12, 20, 0.24);
}

html[data-theme="dark"] .section-sidebar {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1c2a40 0%, #233754 48%, #29476a 100%);
  box-shadow: 0 26px 54px rgba(6, 10, 18, 0.26);
}

html[data-theme="dark"] .section-nav-link {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(237, 242, 247, 0.94);
}

html[data-theme="dark"] .section-nav-link:hover {
  border-color: rgba(141, 180, 255, 0.24);
  background: rgba(141, 180, 255, 0.12);
}

html[data-theme="dark"] .section-nav-link.is-active {
  color: #edf2f7;
  border-color: rgba(141, 180, 255, 0.34);
  background: rgba(141, 180, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(141, 180, 255, 0.16);
}

html[data-theme="dark"] .section-nav-icon {
  background: rgba(141, 180, 255, 0.16);
}

html[data-theme="dark"] .section-nav-link.is-active .section-nav-icon {
  color: #cfe0ff;
  background: rgba(141, 180, 255, 0.24);
}

html[data-theme="dark"] .sidebar-account,
html[data-theme="dark"] .control-panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .promo-panel,
html[data-theme="dark"] .preview-box,
html[data-theme="dark"] .progress-box,
html[data-theme="dark"] .summary-metric,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .risk-output {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .upload-box {
  background: linear-gradient(180deg, rgba(141, 180, 255, 0.08), rgba(255, 255, 255, 0.02));
  border-color: rgba(141, 180, 255, 0.36);
}

html[data-theme="dark"] .service-chip,
html[data-theme="dark"] .task-fact,
html[data-theme="dark"] .status-tag {
  background: rgba(141, 180, 255, 0.12);
  border-color: rgba(141, 180, 255, 0.22);
  color: #cfe0ff;
}

html[data-theme="dark"] .workbench-note {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .workbench-note strong {
  color: #e7eefb;
}

html[data-theme="dark"] .workbench-note p {
  color: #b7c3d6;
}

html[data-theme="dark"] .business-overview-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .business-overview-card p {
  color: #b7c3d6;
}

html[data-theme="dark"] .portal-section {
  background:
    linear-gradient(180deg, rgba(26, 37, 54, 0.96), rgba(23, 33, 48, 0.94)),
    var(--panel);
}

html[data-theme="dark"] .portal-card {
  border-color: rgba(141, 180, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(141, 180, 255, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(35, 49, 71, 0.94), rgba(28, 39, 58, 0.94));
  box-shadow: 0 18px 36px rgba(5, 10, 18, 0.22);
  color: #edf2f7;
}

html[data-theme="dark"] .portal-card:hover {
  border-color: rgba(141, 180, 255, 0.22);
  box-shadow: 0 24px 46px rgba(5, 10, 18, 0.28);
}

html[data-theme="dark"] .portal-card--planned:hover {
  border-color: rgba(141, 180, 255, 0.12);
  box-shadow: none;
}

html[data-theme="dark"] .portal-icon {
  background: rgba(141, 180, 255, 0.16);
  color: #dce8ff;
}

html[data-theme="dark"] .portal-arrow {
  border-color: rgba(141, 180, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #d2e1ff;
}

html[data-theme="dark"] .portal-card-body p {
  color: #b8c4d6;
}

html[data-theme="dark"] .portal-badge {
  background: rgba(141, 180, 255, 0.14);
  color: #d7e4ff;
}

html[data-theme="dark"] .portal-badge--planned {
  background: rgba(255, 255, 255, 0.08);
  color: #b8c4d6;
}

html[data-theme="dark"] .guest-quota-card {
  border-color: rgba(141, 180, 255, 0.2);
  background: rgba(141, 180, 255, 0.06);
}

html[data-theme="dark"] .service-type-option {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(237, 242, 247, 0.92);
}

html[data-theme="dark"] .service-type-option:hover {
  border-color: rgba(141, 180, 255, 0.24);
  background: rgba(141, 180, 255, 0.12);
}

html[data-theme="dark"] .service-type-option.is-active {
  border-color: rgba(141, 180, 255, 0.32);
  background: rgba(141, 180, 255, 0.16);
  color: #dbe8ff;
}

html[data-theme="dark"] .task-fact.is-active {
  background: rgba(141, 180, 255, 0.18);
}

html[data-theme="dark"] .primary-button {
  background: linear-gradient(135deg, #5f8fe8, #7aa4f0);
  color: #f8fbff;
}

html[data-theme="dark"] .outline-button {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #edf2f7;
}

html[data-theme="dark"] .topbar-nav-link {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(237, 242, 247, 0.88);
}

html[data-theme="dark"] .topbar-nav-link:hover,
html[data-theme="dark"] .topbar-nav-link.is-active {
  background: rgba(141, 180, 255, 0.12);
  border-color: rgba(141, 180, 255, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-family);
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.page-shell {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.page-main {
  display: grid;
  gap: 28px;
  padding-top: 30px;
}

.page-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.content-column {
  display: grid;
  gap: 28px;
}

.portal-section {
  padding: 30px;
  background: var(--panel);
}

body.is-home-route .topbar,
body.is-home-route .section-sidebar {
  display: none;
}

body.is-home-route .page-shell {
  width: min(100%, 100%);
  max-width: none;
  padding: 0 0 80px;
}

body.is-home-route .page-main {
  gap: 0;
  padding-top: 0;
}

body.is-home-route .page-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body.is-home-route .content-column {
  gap: 0;
}

body.is-home-route #home-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.home-entry-shell {
  display: grid;
  gap: 26px;
}

.home-entry-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 36px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
}

.home-entry-brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.home-entry-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-entry-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e83a3a, #f15a5a);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 30px rgba(232, 58, 58, 0.22);
}

.home-entry-logo-copy {
  display: grid;
  gap: 2px;
}

.home-entry-logo-copy strong {
  font-size: 30px;
  line-height: 1.05;
  color: #283548;
}

.home-entry-logo-copy small {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #607089;
}

.home-entry-brand-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 22px;
  border-left: 1px solid rgba(62, 91, 144, 0.16);
}

.home-entry-brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #41556f;
}

.home-entry-brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.94));
  border: 1px solid rgba(61, 109, 214, 0.12);
  color: #3e67b7;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(29, 65, 126, 0.08);
}

.home-entry-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.home-entry-nav,
.home-entry-auth {
  display: flex;
  align-items: center;
  gap: 18px;
}

.home-entry-nav-link,
.home-entry-auth-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #58697e;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition), opacity var(--transition);
}

.home-entry-nav-link:hover,
.home-entry-auth-link:hover {
  color: #225fd8;
}

.home-entry-auth-divider {
  color: rgba(88, 105, 126, 0.55);
}

.home-entry-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  align-items: center;
  gap: 24px;
  min-height: 430px;
  padding: 44px 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(75, 167, 255, 0.3), transparent 22%),
    radial-gradient(circle at bottom right, rgba(56, 119, 255, 0.24), transparent 24%),
    linear-gradient(130deg, #0d4cdf 0%, #0c44cc 38%, #173de0 68%, #1c5fe7 100%);
}

.home-entry-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.08) 18%, rgba(255, 255, 255, 0.08) 20%, transparent 20%),
    linear-gradient(120deg, transparent 38%, rgba(255, 255, 255, 0.07) 38%, rgba(255, 255, 255, 0.07) 40%, transparent 40%);
  opacity: 0.75;
  pointer-events: none;
}

.home-entry-hero-copy,
.home-entry-hero-visual {
  position: relative;
  z-index: 1;
}

.home-entry-hero-kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-entry-hero h1 {
  margin: 0 0 18px;
  color: #fff;
  max-width: 820px;
  font-size: 64px;
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.home-entry-hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.85;
}

.home-entry-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.home-entry-hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.home-guest-quota {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-guest-quota strong {
  font-size: 14px;
}

.home-guest-quota span {
  color: rgba(255, 255, 255, 0.88);
}

.home-entry-hero-visual {
  min-height: 260px;
  opacity: 0.86;
}

.home-entry-hero-card {
  position: absolute;
  right: 96px;
  top: 58px;
  width: 216px;
  height: 164px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(224, 248, 255, 0.72));
  box-shadow: 0 20px 48px rgba(9, 35, 108, 0.28);
}

.home-entry-hero-card-line {
  display: block;
  height: 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(55, 159, 236, 0.28), rgba(42, 110, 227, 0.68));
}

.home-entry-hero-card-line.short {
  width: 72%;
}

.home-entry-hero-lens {
  position: absolute;
  right: 34px;
  bottom: 28px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 12px solid rgba(168, 245, 255, 0.88);
  box-shadow: 0 0 0 12px rgba(94, 219, 255, 0.12);
}

.home-entry-hero-lens::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -52px;
  width: 88px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(196, 250, 255, 0.96), rgba(96, 218, 255, 0.9));
  transform: rotate(48deg);
  transform-origin: center;
}

.home-entry-hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border-radius: 999px;
  background: rgba(15, 45, 136, 0.24);
  color: rgba(255, 255, 255, 0.88);
  font-size: 34px;
}

.home-entry-hero-arrow--left {
  left: 22px;
}

.home-entry-hero-arrow--right {
  right: 22px;
}

.home-entry-hero-progress {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  z-index: 1;
}

.home-entry-services {
  display: grid;
  gap: 28px;
  padding: 8px 0 0;
}

.home-entry-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 24px 0;
}

.home-entry-section-icon {
  position: relative;
  width: 18px;
  height: 18px;
}

.home-entry-section-icon::before,
.home-entry-section-icon::after {
  content: "";
  position: absolute;
  border-radius: 2px;
}

.home-entry-section-icon::before {
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  background: #1e8df3;
}

.home-entry-section-icon::after {
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  background: #7fd3ff;
}

.home-entry-section-title h2 {
  margin: 0;
  color: #4b5667;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.1;
}

.portal-head {
  align-items: end;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portal-card {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 214px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.portal-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.portal-card:focus-visible {
  outline: 0;
  border-color: rgba(45, 104, 217, 0.32);
  box-shadow: 0 0 0 3px rgba(45, 104, 217, 0.12);
}

.portal-card--planned {
  cursor: not-allowed;
  opacity: 0.82;
  box-shadow: none;
}

.portal-card--planned:hover {
  transform: none;
  border-color: rgba(45, 104, 217, 0.12);
  box-shadow: none;
}

.portal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
}

.portal-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(45, 104, 217, 0.18);
  color: var(--primary);
  font-size: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.portal-card-body {
  display: grid;
  gap: 10px;
}

.portal-card-body strong {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.portal-card-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}

.portal-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: auto;
}

.portal-enter-button {
  min-width: 118px;
}

.portal-badge {
  align-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.portal-badge--planned {
  background: rgba(99, 115, 140, 0.14);
  color: #50627f;
}

.is-route-hidden {
  display: none !important;
}

.mobile-bottom-nav {
  display: none;
}

.section-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
  padding: 18px 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-nav {
  display: grid;
  gap: 18px;
  padding: 8px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.section-nav-group {
  display: grid;
  gap: 10px;
}

.section-nav-label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.section-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-soft);
  background: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: transform var(--transition), border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.section-nav-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  color: var(--primary);
  background: var(--primary-soft);
}

.section-nav-link.is-active {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  background: var(--primary-soft);
  box-shadow: none;
}

.section-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  color: inherit;
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.section-nav-link.is-active .section-nav-icon {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.12);
}

.sidebar-account,
.sidebar-account-head,
.account-shortcuts,
.account-utility,
.topbar,
.section-head,
.compact-head,
.metric-topline,
.summary-topline,
.source-topline,
.action-row,
.download-row,
.admin-toolbar,
.subsection-head,
.field-topline,
.inline-tools,
.upload-row,
.risk-actions,
.shortcut-row {
  display: flex;
  align-items: center;
}

.topbar,
.section-head,
.compact-head,
.metric-topline,
.summary-topline,
.source-topline,
.subsection-head,
.field-topline {
  justify-content: space-between;
}

.topbar {
  gap: 12px;
  margin-top: 18px;
  padding: 22px 28px 20px;
  border: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  color: var(--text);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}

.topbar-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), color var(--transition);
}

.topbar-nav-link:hover,
.topbar-nav-link.is-active {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: var(--primary-soft);
}

.topbar-nav-link:hover {
  transform: translateY(-1px);
}

.topbar-nav span {
  white-space: nowrap;
}

.sidebar-account {
  display: grid;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
}

.sidebar-account-head {
  justify-content: space-between;
  gap: 10px;
}

.sidebar-account-head strong {
  font-size: 16px;
}

.brand-block h1,
.section-head h2,
.subsection-head h3,
.summary-card h3 {
  margin: 0;
}

.brand-mark {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-block h1 {
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2;
}

.topbar-note,
.section-text,
.upload-meta,
.feedback-text,
.empty-text,
.privacy-footnote,
.summary-time,
.download-tip,
.stat-card p,
.match-card p,
.source-card p,
.risk-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.topbar .topbar-note {
  color: rgba(255, 255, 255, 0.82);
}

.topbar-actions,
.action-row,
.download-row,
.admin-toolbar,
.shortcut-row,
.inline-tools,
.risk-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.brand-block {
  display: grid;
  gap: 1px;
}

.account-shortcuts .outline-button,
.account-utility .outline-button,
.account-utility .status-tag,
.action-row .primary-button,
.action-row .outline-button {
  border-radius: 12px;
}

.account-shortcuts,
.account-utility {
  gap: 10px;
  flex-wrap: wrap;
}

.account-shortcuts .outline-button,
.account-utility .outline-button,
.account-utility .status-tag {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.account-shortcuts .outline-button {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
}

.account-utility {
  justify-content: space-between;
}

.account-utility .outline-button {
  flex: 1 1 auto;
}

.account-utility .status-tag {
  min-width: 88px;
}

.account-shortcuts .outline-button.is-hidden,
.account-utility .outline-button.is-hidden,
.account-utility .status-tag.is-hidden,
.topbar-note.is-hidden {
  display: none !important;
}

.section-card,
.notice-banner,
.summary-card,
.metric-panel,
.stat-card,
.source-card,
.match-card,
.chart-panel,
.dialog-box,
.risk-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-card,
.notice-banner,
.chart-panel {
  padding: 30px;
}

.hero-card {
  padding: 34px;
}

.tool-card-top {
  padding-top: 24px;
  padding-bottom: 24px;
}

.tool-grid-top {
  margin-top: 8px;
}

.section-head {
  gap: 24px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.hero-head {
  align-items: end;
}

.section-label {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.35;
}

.hero-editor {
  width: min(100%, 920px);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.hero-service-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.business-overview {
  margin-bottom: 24px;
}

.business-overview-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(45, 104, 217, 0.05), rgba(255, 255, 255, 0.92));
}

.business-overview-card strong {
  font-size: 14px;
  color: var(--text);
}

.business-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.guest-quota-card {
  border-style: dashed;
}

.guest-quota-card strong {
  color: var(--primary);
}

.service-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: default;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.82fr);
  gap: 26px;
  align-items: start;
}

.workbench-editor,
.workbench-side {
  display: grid;
  gap: 22px;
}

.control-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(45, 104, 217, 0.04), rgba(255, 255, 255, 0.96));
}

.workbench-section-block {
  display: grid;
  gap: 12px;
}

.mini-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.workbench-profile-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-action-row {
  margin-top: 0;
}

.workbench-note {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.workbench-note strong {
  font-size: 14px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
}

.consent-check input {
  margin-top: 4px;
  flex: 0 0 auto;
}

.consent-check a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  color: var(--primary);
  margin: 0 4px;
  background: rgba(37, 99, 235, 0.055);
  font-weight: 700;
  line-height: 1.2;
}

.risk-disclaimer {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(183, 121, 94, 0.16);
  border-radius: 16px;
  color: #b7795e;
  background: #fffaf7;
  line-height: 1.8;
}

.marketing-page .page-shell {
  max-width: 1440px;
}

.marketing-hero-section {
  overflow: hidden;
}

.marketing-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.marketing-hero-primary {
  min-width: 176px;
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(14, 42, 110, 0.18);
}

.marketing-hero-secondary {
  min-width: 168px;
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.marketing-hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.home-entry-hero-footnote {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.7;
}

.marketing-footer {
  text-align: center;
}

.home-page .home-page-topbar {
  border-radius: var(--radius-lg);
  margin-top: 0;
}

.home-page .home-feature-section {
  display: none !important;
}

.home-page .home-entry-brand-meta {
  gap: 12px;
}

.home-page .home-entry-brand-pill {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.home-page .home-page-hero {
  grid-template-columns: minmax(0, 1.24fr) minmax(280px, 0.76fr);
  min-height: 420px;
  padding: 48px 54px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
}

.home-page .home-page-hero::before {
  opacity: 0.42;
}

.home-page .home-page-hero-copy {
  gap: 18px;
}

.home-page .home-entry-hero-kicker {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.home-page .home-entry-hero h1 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.06;
}

.home-page .home-page-hero-description {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.85;
}

.home-page .home-page-hero-actions {
  margin-top: 8px;
}

.home-page .marketing-hero-primary {
  min-width: 188px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.home-page .marketing-hero-secondary {
  min-width: 168px;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.home-page .marketing-hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.home-page .home-page-hero-footnote {
  max-width: 700px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.75;
}

.home-page .home-page-hero-visual {
  min-height: 220px;
  opacity: 0.58;
}

.home-page .home-entry-hero-card {
  right: 54px;
  top: 52px;
  width: 196px;
  height: 146px;
}

.home-page .home-entry-hero-lens {
  right: 18px;
  bottom: 24px;
  width: 120px;
  height: 120px;
}

.home-page .home-section-head {
  align-items: end;
}

.home-page .home-feature-grid {
  align-items: stretch;
}

.home-page .home-feature-card {
  min-height: 240px;
}

.home-page .home-feature-card .portal-card-top {
  margin-bottom: 4px;
}

.home-page .home-feature-card .portal-card-body {
  gap: 12px;
}

.home-page .home-feature-card .portal-card-body strong {
  font-size: 24px;
}

.home-page .home-feature-card .portal-card-body p {
  font-size: 15px;
  line-height: 1.8;
}

.home-page .home-feature-card .portal-card-actions {
  margin-top: auto;
}

.home-page .home-process-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.home-page .home-process-card {
  min-height: 190px;
}

.home-page .home-process-card h3,
.home-page .home-privacy-card h3,
.home-page .home-faq-card h3,
.home-page .home-footer-card h3 {
  font-size: 18px;
  line-height: 1.45;
}

.home-page .home-process-card p,
.home-page .home-privacy-card p,
.home-page .home-faq-card p,
.home-page .home-footer-card p {
  font-size: 15px;
  line-height: 1.8;
}

.home-page .home-privacy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-page .home-faq-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-page .home-faq-card {
  padding-top: 22px;
  padding-bottom: 22px;
}

.home-page .home-footer-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-page .home-footer-card {
  box-shadow: none;
  border-style: solid;
}

.home-footer-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.055);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.home-footer-card a:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.field-block {
  display: grid;
  gap: 12px;
}

.service-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-type-option {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.service-type-option:hover {
  border-color: rgba(45, 104, 217, 0.32);
  background: rgba(45, 104, 217, 0.06);
}

.service-type-option.is-active {
  border-color: rgba(45, 104, 217, 0.42);
  background: rgba(45, 104, 217, 0.12);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(45, 104, 217, 0.08);
}

.field-block label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.field-error,
.form-error,
.input-error {
  color: #dc2626;
  font-size: 12px;
  line-height: 1.6;
}

.text-input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: var(--panel);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.text-input {
  min-height: 48px;
  padding: 0 16px;
}

textarea {
  min-height: 240px;
  padding: 16px;
  line-height: 1.8;
  resize: vertical;
}

.text-input::placeholder,
textarea::placeholder {
  color: var(--muted-soft);
}

.text-input:focus,
textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.field-count {
  color: var(--muted);
  font-size: 14px;
}

.upload-box {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  min-height: 170px;
  padding: 28px;
  border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--line));
  border-radius: var(--radius-md);
  background: #f8fbff;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.upload-box:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

#file-input {
  display: none;
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--panel) 82%, var(--primary-soft));
  font-size: 14px;
  font-weight: 700;
}

.upload-title {
  font-size: 20px;
  font-weight: 700;
}

.upload-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
}

.loading-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

.preview-box {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-soft);
}

.preview-text {
  max-height: 320px;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.95;
}

#ai-tool-output {
  min-height: 260px;
  max-height: 60vh;
  overflow: auto;
  font-size: 16px;
  line-height: 2;
}

.is-hidden {
  display: none !important;
}

.mode-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mode-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-soft);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.mode-item:hover {
  transform: translateY(-1px);
}

.mode-item input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.mode-item:has(input:checked) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent);
}

.mode-help-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--panel));
  font-size: 13px;
  font-weight: 800;
}

.mode-help-button:hover {
  transform: translateY(-1px);
}

.progress-box {
  display: grid;
  gap: 14px;
  padding: 24px;
  margin-top: 26px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-soft);
}

.progress-box-hero {
  margin-top: 10px;
}

.task-facts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.task-fact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 14px;
  font-weight: 700;
}

.task-fact.is-active {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  background: var(--primary-soft);
}

.progress-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.progress-track,
.bar-track {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 82%, transparent);
}

.progress-bar,
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #8eb4ff);
}

.progress-bar {
  width: 0;
  transition: width 0.32s ease;
}

.ai-progress-box {
  margin: 0 0 8px;
  padding: 18px 20px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.progress-steps span {
  padding: 12px;
  border-radius: 16px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
  font-size: 14px;
}

.progress-steps .is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.feedback-text {
  min-height: 30px;
}

.feedback-text.is-error {
  color: var(--danger);
}

.feedback-text.is-actionable {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 12px;
  background: color-mix(in srgb, #fee2e2 70%, var(--panel));
  color: #991b1b;
  line-height: 1.55;
}

.action-row {
  margin-top: 8px;
}

.action-row .primary-button,
.action-row .outline-button,
.action-row .danger-button {
  min-width: 190px;
}

.primary-button,
.danger-button,
.outline-button,
.solid-button,
.text-button,
.status-tag,
.grade-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  line-height: 1.15;
  text-align: center;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.primary-button:hover,
.danger-button:hover,
.outline-button:hover,
.solid-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.danger-button:disabled,
.outline-button:disabled,
.solid-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.primary-button {
  border: 0;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.primary-button:hover {
  background: #1d4ed8;
}

.danger-button {
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
  color: #ffffff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 86%, #8a2339), color-mix(in srgb, var(--danger) 68%, #b84e69));
}

.outline-button {
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--line));
  color: var(--primary);
  background: #ffffff;
}

.text-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.055);
  font-weight: 600;
  line-height: 1.15;
  box-shadow: none;
}

.small-button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

.status-tag,
.grade-tag {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
}

.status-tag {
  color: var(--primary);
  background: var(--primary-soft);
}

.grade-low {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.grade-medium {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 18%, transparent);
}

.grade-high {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, transparent);
}

.summary-card {
  padding: 28px;
}

.empty-card,
.empty-placeholder {
  border-style: dashed;
  color: var(--muted);
  background: var(--panel-soft);
}

.empty-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}

.summary-topline {
  gap: 20px;
}

.summary-label,
.metric-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.summary-time {
  font-size: 14px;
}

.summary-metrics,
.result-grid,
.stats-grid,
.chart-grid {
  display: grid;
  gap: 22px;
}

.metric-grid,
.metric-grid-primary,
.metric-grid-secondary {
  display: grid;
}

.metric-grid {
  gap: 20px;
  margin-top: 10px;
}

.metric-grid-primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.metric-grid-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.summary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.summary-metric,
.metric-panel,
.stat-card,
.source-card,
.match-card,
.risk-card {
  padding: 22px;
  border-radius: 22px;
}

.metric-card {
  display: grid;
  gap: 12px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-soft);
}

.metric-card > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.metric-card > strong {
  font-size: clamp(20px, 2.4vw, 34px);
  line-height: 1.12;
}

.metric-card > .status-tag {
  justify-self: start;
  margin-top: 2px;
}

.metric-card > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
}

.risk-card p,
.duplicate-card p,
.duplicate-sentence,
.workbench-note p,
.metric-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.heatmap-list {
  display: grid;
  gap: 14px;
}

.heatmap-sentence {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.heatmap-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.heatmap-score {
  font-size: 13px;
  font-weight: 700;
}

.heatmap-sentence p {
  margin: 0;
  line-height: 1.9;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.metric-card-emphasis {
  gap: 14px;
  padding: 28px 30px;
}

.metric-card-emphasis > strong {
  font-size: clamp(24px, 2.8vw, 38px);
}

.summary-metric {
  background: var(--panel-soft);
}

.summary-metric span,
.stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.summary-metric strong,
.metric-panel strong,
.stat-card strong {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.1;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.promo-card {
  overflow: hidden;
}

.promo-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.promo-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.promo-panel:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.promo-panel h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.promo-panel p,
.promo-list {
  margin: 0;
  color: var(--muted);
  line-height: 1.95;
}

.promo-list {
  padding-left: 22px;
}

.promo-list li + li {
  margin-top: 10px;
}

.promo-intro {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 72%, var(--panel)), color-mix(in srgb, var(--panel) 94%, var(--panel-soft)));
}

.promo-slogans {
  margin-top: 18px;
}

.slogan-grid {
  display: grid;
  gap: 14px;
}

.slogan-grid p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  color: var(--text);
  background: var(--panel-soft);
  line-height: 1.85;
}

.auth-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.auth-switcher .outline-button {
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
}

.auth-switcher .outline-button.is-selected {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.auth-panel {
  display: grid;
  gap: 18px;
}

.login-page .page-main {
  padding-top: 34px;
}

.login-topbar {
  margin-top: 18px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 520px);
  gap: 24px;
  align-items: stretch;
}

.login-intro-panel,
.login-auth-card {
  min-width: 0;
}

.login-intro-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: var(--shadow);
}

.login-intro-panel h2 {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: clamp(40px, 4vw, 58px);
  line-height: 1.06;
}

.login-intro-panel > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.login-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-benefit-grid article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.login-benefit-grid span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.login-benefit-grid strong {
  color: var(--text);
  font-size: 16px;
}

.login-benefit-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.login-auth-card {
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 28px;
}

.login-auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.login-auth-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1.2;
}

.login-home-link {
  flex: 0 0 auto;
}

.auth-submit-button {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
  font-weight: 800;
}

.apple-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #111827;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out),
    background var(--motion-fast) var(--ease-out);
}

.apple-login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-inline-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-mode-link {
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
  white-space: nowrap;
}

.login-page .feedback-text {
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  font-size: 14px;
}

.login-page .feedback-text:empty {
  display: none;
}

.login-page .feedback-text.is-error {
  border-color: rgba(220, 38, 38, 0.24);
  color: #b91c1c;
  background: #fef2f2;
}

.login-page .feedback-text.is-success {
  border-color: rgba(22, 163, 74, 0.2);
  color: #166534;
  background: #f0fdf4;
}

.account-body,
.auth-body {
  min-width: min(760px, calc(100vw - 40px));
}

#account-profile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.account-section {
  display: grid;
  gap: 16px;
}

.account-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#recovery-code-output {
  text-align: left;
}

#recovery-code-output p {
  margin: 8px 0 0;
}

.recovery-code-list {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.recovery-code-list li {
  color: var(--text);
  font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
  letter-spacing: 0.06em;
}

.small-input {
  min-width: 144px;
}

.metric-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.metric-topline {
  gap: 16px;
  margin-bottom: 0;
}

.metric-panel p {
  margin: 0;
  line-height: 2;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.stat-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, var(--panel-soft));
}

.stat-card strong {
  font-size: clamp(24px, 3vw, 42px);
}

.subsection {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.subsection-head {
  gap: 20px;
  margin-bottom: 18px;
}

.subsection-head h3 {
  font-size: 22px;
}

.stack {
  display: grid;
  gap: 20px;
}

.stack.is-collapsed .risk-card:nth-child(n + 4) {
  display: none;
}

.source-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.source-card a:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.duplicate-card {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.duplicate-sentence {
  margin: 0;
  padding: 18px 20px;
  border-radius: 16px;
  font-weight: 700;
  line-height: 2;
}

.source-card p {
  line-height: 2;
}

.source-card strong {
  line-height: 1.5;
}

.source-topline {
  gap: 16px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.source-topline strong,
.risk-card strong {
  font-size: 16px;
}

.match-card,
.risk-card {
  position: relative;
  overflow: hidden;
}

.match-card::before,
.risk-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: currentColor;
  opacity: 0.55;
}

.risk-card p {
  white-space: pre-wrap;
  word-break: break-word;
}

.risk-output {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

.download-row {
  margin-top: 26px;
}

.download-tip {
  margin-top: 12px;
}

.privacy-footnote {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.notice-banner {
  color: var(--text);
  background: var(--primary-soft);
}

.admin-panel {
  margin-top: 32px;
}

.small-input {
  max-width: 220px;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 12px;
  align-items: center;
}

.trend-svg {
  width: 100%;
  height: auto;
}

.trend-svg polyline {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-labels {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.dialog-box {
  width: min(780px, calc(100vw - 32px));
  padding: 0;
}

.dialog-body {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.dialog-box::backdrop {
  background: rgba(8, 12, 20, 0.48);
}

.tool-button.is-selected {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent);
}

.is-loading {
  position: relative;
  pointer-events: none;
}

.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.72s linear infinite;
}

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

@media (max-width: 1180px) {
  .page-shell {
    padding: 0 16px 98px;
  }

  .page-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .content-column {
    gap: 24px;
  }

  .section-sidebar {
    display: none;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    box-shadow: 0 14px 36px rgba(10, 18, 30, 0.16);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-height: 64px;
    padding: 8px 6px;
    border: 0;
    border-radius: 18px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background var(--transition), color var(--transition), transform var(--transition);
  }

  .mobile-nav-item:hover,
  .mobile-nav-item.is-active,
  .mobile-nav-item:active {
    color: var(--primary);
    background: var(--primary-soft);
  }

  .mobile-nav-button {
    cursor: pointer;
  }

  .mobile-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 16%, transparent);
    font-size: 12px;
    font-weight: 800;
  }

  .section-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 2px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    scrollbar-width: none;
  }

  .section-nav::-webkit-scrollbar {
    display: none;
  }

  .section-nav-group {
    display: contents;
  }

  .section-nav-label {
    display: none;
  }

  .sidebar-account {
    gap: 12px;
    padding: 16px;
  }

  .sidebar-account-head {
    align-items: center;
    flex-direction: row;
  }

  .topbar {
    padding: 18px 18px 16px;
    border-radius: 0 0 26px 26px;
  }

  .topbar-brand-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-nav {
    gap: 12px 18px;
  }

  .home-entry-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 24px;
  }

  .home-entry-links {
    width: 100%;
    justify-content: space-between;
    gap: 18px;
  }

  .home-entry-hero {
    grid-template-columns: minmax(0, 1fr) 260px;
    min-height: 390px;
    padding: 38px 64px;
  }

  .home-page .home-process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .home-privacy-grid,
  .home-page .home-faq-grid,
  .home-page .home-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-entry-hero h1 {
    font-size: 52px;
  }

  .home-entry-hero p {
    font-size: 18px;
  }

  .home-entry-hero-card {
    right: 58px;
    width: 214px;
  }

  .home-entry-hero-lens {
    right: 12px;
    width: 128px;
    height: 128px;
  }

  .topbar,
  .section-head,
  .field-topline,
  .metric-topline,
  .summary-topline,
  .subsection-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-card,
  .hero-card,
  .notice-banner,
  .chart-panel,
  .summary-card {
    padding: 22px;
  }

  .hero-editor {
    width: 100%;
  }

  .mode-group,
  .portal-grid,
  .workbench-grid,
  .promo-layout,
  .result-grid,
  .stats-grid,
  .summary-metrics,
  .metric-grid-primary,
  .metric-grid-secondary {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    grid-template-columns: 1fr 1fr;
  }

  textarea {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .topbar {
    margin-top: 12px;
    padding: 20px 16px 18px;
    border-radius: 0 0 22px 22px;
  }

  .section-nav-link {
    min-height: 44px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .hero-card {
    padding: 24px;
  }

  .portal-section {
    padding: 22px 18px;
  }

  body.is-home-route .page-shell {
    padding-bottom: 72px;
  }

  .home-entry-shell {
    gap: 18px;
  }

  .home-entry-topbar {
    padding: 18px 16px;
  }

  .home-entry-brand,
  .home-entry-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-entry-links {
    gap: 14px;
  }

  .home-entry-nav,
  .home-entry-auth {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .home-entry-auth-divider {
    display: none;
  }

  .home-entry-logo-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 20px;
  }

  .home-entry-logo-copy strong {
    font-size: 25px;
  }

  .home-entry-brand-meta {
    padding-left: 0;
    border-left: 0;
  }

  .home-entry-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 32px 24px 58px;
  }

  .home-page .home-page-hero {
    padding: 34px 22px 44px;
  }

  .home-entry-hero h1 {
    font-size: 34px;
  }

  .home-entry-hero p {
    font-size: 16px;
    line-height: 1.75;
  }

  .home-page .home-process-grid,
  .home-page .home-privacy-grid,
  .home-page .home-faq-grid,
  .home-page .home-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-page .home-feature-card,
  .home-page .home-process-card {
    min-height: auto;
  }

  .home-entry-hero-visual,
  .home-entry-hero-arrow {
    display: none;
  }

  .home-guest-quota {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
  }

  .home-entry-section-title h2 {
    font-size: 30px;
  }

  .portal-card {
    min-height: auto;
    padding: 18px;
    border-radius: var(--radius-lg);
  }

  .portal-card-body strong {
    font-size: 24px;
  }

  .portal-card-body p {
    font-size: 15px;
  }

  .section-nav-icon {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .mobile-bottom-nav {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 8px;
    border-radius: 20px;
  }

  .mobile-nav-item {
    min-height: 60px;
    gap: 5px;
    padding: 8px 4px;
    font-size: 11px;
  }

  .mobile-nav-icon {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .brand-block h1 {
    font-size: 30px;
  }

  .section-head h2 {
    font-size: 26px;
  }

  .text-input {
    min-height: 56px;
  }

  textarea {
    min-height: 280px;
    padding: 18px;
  }

  .upload-box {
    min-height: 156px;
    padding: 22px 18px;
  }

  .primary-button,
  .danger-button,
  .outline-button,
  .solid-button,
  .text-button {
    width: 100%;
    min-height: 44px;
  }

  .topbar-actions .outline-button,
  .topbar-actions .status-tag,
  .action-row .primary-button,
  .action-row .danger-button,
  .action-row .outline-button {
    min-width: 0;
  }

  .download-row,
  .action-row,
  .shortcut-row,
  .auth-switcher {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-utility {
    display: grid;
    grid-template-columns: 1fr;
  }

  .duplicate-card {
    padding: 22px;
  }

  .account-body,
  .auth-body {
    min-width: 0;
  }

  .bar-item {
    grid-template-columns: 1fr;
  }

  .mode-help-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
  }

  .mode-group,
  .metric-grid,
  .metric-grid-primary,
  .metric-grid-secondary,
  .summary-metrics,
  .progress-box,
  .progress-track,
  .progress-meta,
  .progress-steps {
    min-width: 0;
  }

  .progress-track,
  .bar-track {
    width: 100%;
  }

  .risk-card,
  .duplicate-card,
  .metric-card,
  .summary-card {
    overflow: hidden;
  }

  .risk-card {
    padding: 18px;
  }

  .risk-card p,
  .duplicate-card p,
  .duplicate-sentence {
    line-height: 1.8;
  }
}

.topbar-plain {
  margin-top: 18px;
}

.service-center-hero,
.service-detail-card,
.service-upload-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.96));
}

.service-hall-page .service-hall-shell {
  display: grid;
  gap: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
}

.service-hall-page .service-hall-topbar {
  margin-bottom: 2px;
}

.service-hall-page .home-entry-nav-link.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.16);
}

.service-hall-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.service-hall-header-copy {
  max-width: 760px;
}

.service-hall-header-copy h1 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
}

.service-hall-header-copy .section-text {
  max-width: 680px;
  margin-top: 14px;
}

.service-hall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-hall-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 292px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-hall-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.service-hall-card.is-priority {
  border-color: rgba(37, 99, 235, 0.16);
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.98));
}

.service-hall-card.is-muted {
  opacity: 0.88;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.service-hall-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-hall-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.service-hall-card-body {
  display: grid;
  gap: 12px;
}

.service-hall-card-body strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.22;
}

.service-hall-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.service-hall-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.service-hall-card-actions .portal-enter-button {
  min-width: 124px;
}

.service-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.service-menu-panel {
  position: sticky;
  top: 24px;
}

.service-upload-page .service-menu-card {
  display: grid;
  gap: 18px;
}

.service-upload-page .service-menu-head {
  display: grid;
  gap: 10px;
}

.service-upload-page .service-menu-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.service-bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.service-upload-grid {
  align-items: start;
  gap: 24px;
}

.service-upload-grid select.text-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  padding: 14px 16px;
}

.service-accent-blue {
  background: var(--panel);
}

.service-accent-purple {
  background: var(--panel);
}

.service-accent-green {
  background: var(--panel);
}

.service-accent-cyan {
  background: var(--panel);
}

.service-accent-yellow {
  background: var(--panel);
}

.service-accent-rose {
  background: var(--panel);
}

.service-accent-slate {
  background: var(--panel);
}

.service-accent-soft {
  background: var(--panel);
}

.is-disabled-link {
  pointer-events: none;
  opacity: 0.68;
}

.service-detail-card {
  display: grid;
  gap: 24px;
  overflow: hidden;
}

.service-upload-page .service-upload-card {
  display: grid;
  gap: 24px;
}

.service-upload-page .service-upload-intro {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.service-upload-page .service-upload-intro-copy {
  max-width: 760px;
}

.service-upload-page .service-upload-intro-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.08;
}

.service-upload-page .service-upload-intro-copy .section-text {
  margin-top: 14px;
}

.service-upload-page .service-form-shell {
  gap: 18px;
}

.service-upload-page .service-form-section {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-upload-page .service-form-section-head {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.service-upload-page .service-form-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
}

.service-upload-page .service-form-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.service-upload-page .service-form-section-body {
  display: grid;
  gap: 18px;
}

.service-upload-page .field-block {
  gap: 10px;
}

.service-upload-page .field-block label,
.service-upload-page .mini-label,
.service-upload-page .option-fieldset legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.service-upload-page .text-input {
  min-height: 50px;
}

.service-upload-page textarea {
  min-height: 220px;
}

.service-upload-page .upload-box {
  min-height: 188px;
  gap: 12px;
  padding: 30px 24px;
}

.service-upload-page .upload-title {
  font-size: 18px;
}

.service-upload-page .upload-meta {
  color: var(--muted);
  line-height: 1.75;
}

.service-upload-page .service-submit-panel {
  position: sticky;
  top: 24px;
  gap: 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.service-upload-page .service-submit-panel .primary-button {
  min-height: 48px;
}

.service-upload-page .service-submit-panel .primary-button:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
}

.service-upload-page .service-upload-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

body.is-service-upload-route .service-upload-card {
  display: grid;
  gap: 24px;
}

body.is-service-upload-route .service-form-section {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

body.is-service-upload-route .service-form-section-head {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

body.is-service-upload-route .service-form-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
}

body.is-service-upload-route .service-form-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

body.is-service-upload-route .service-form-section-body {
  display: grid;
  gap: 18px;
}

body.is-service-upload-route .field-block {
  gap: 10px;
}

body.is-service-upload-route .field-block label,
body.is-service-upload-route .mini-label,
body.is-service-upload-route .option-fieldset legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

body.is-service-upload-route .text-input,
body.is-service-upload-route textarea {
  border-color: var(--line);
  border-radius: 14px;
  background: #ffffff;
}

body.is-service-upload-route .text-input {
  min-height: 52px;
  padding-right: 42px;
}

body.is-service-upload-route select.text-input {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 22px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    #ffffff;
}

body.is-service-upload-route textarea {
  min-height: 220px;
}

body.is-service-upload-route .textarea-input {
  min-height: 118px;
  resize: vertical;
}

body.is-service-upload-route .upload-box {
  min-height: 188px;
  gap: 12px;
  padding: 30px 24px;
  border-color: rgba(37, 99, 235, 0.22);
  background: #f8fbff;
}

body.is-service-upload-route .upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

body.is-service-upload-route .upload-title {
  font-size: 18px;
}

body.is-service-upload-route .upload-meta {
  color: var(--muted);
  line-height: 1.75;
}

body.is-service-upload-route .workbench-side .control-panel {
  position: sticky;
  top: 24px;
  gap: 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
}

body.is-service-upload-route .workbench-side .primary-button {
  min-height: 48px;
}

body.is-service-upload-route .workbench-side .primary-button:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
}

body.is-service-upload-route .primary-button.is-development-disabled {
  background: #d2d2d7;
  border-color: #d2d2d7;
  color: #ffffff;
}

body.is-service-upload-route .workbench-side .primary-button.is-development-disabled:disabled {
  background: #d2d2d7;
  border-color: #d2d2d7;
  color: #ffffff;
}

.service-development-dialog {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
}

.service-development-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.32);
  backdrop-filter: blur(10px);
}

.service-development-dialog-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid var(--apple-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.service-development-dialog-card h2,
.service-development-dialog-card p {
  margin: 0;
}

.service-development-dialog-card h2 {
  color: var(--apple-text);
  font-size: 28px;
  line-height: 1.18;
}

.service-development-dialog-card p:not(.section-label) {
  color: var(--apple-muted);
  line-height: 1.75;
}

.service-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.service-detail-copy {
  display: grid;
  gap: 16px;
}

.service-detail-copy h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.service-detail-subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.8;
}

.service-detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-detail-summary {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-detail-summary-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.service-detail-summary strong {
  font-size: 28px;
  line-height: 1.18;
}

.service-detail-summary-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.service-detail-actions {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.service-detail-disclaimer {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid rgba(183, 121, 94, 0.16);
  border-radius: 16px;
  background: #fffaf7;
  color: #b7795e;
  line-height: 1.75;
}

.service-detail-panel {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 24px;
}

.service-detail-panel--wide {
  grid-column: span 2;
}

.service-detail-panel h3 {
  margin: 0;
}

.service-detail-body {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.service-bullet-list-accent,
.service-bullet-list-caution {
  padding-left: 20px;
}

.service-bullet-list-accent li,
.service-bullet-list-caution li {
  line-height: 1.85;
}

.service-detail-bottomline {
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 980px) {
  .service-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-menu-panel {
    position: static;
  }

  .service-detail-hero,
  .service-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-detail-panel--wide {
    grid-column: span 1;
  }
}

.option-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.option-fieldset legend {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.choice-chip input {
  margin: 0;
}

.switch-stack {
  display: grid;
  gap: 12px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-soft);
  font-weight: 600;
}

.switch-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.upload-box--muted {
  background: #f8fafc;
}

.report-card,
.report-detail-panel {
  border: 1px solid var(--line-soft);
}

.report-center-page .report-center-shell,
.report-detail-page .report-detail-shell {
  display: grid;
  gap: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
}

.report-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.report-page-head h2 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
}

.report-page-head .section-text {
  max-width: 700px;
  margin-top: 12px;
}

.report-center-banner,
.report-center-empty,
.report-detail-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.report-detail-card--soft {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
}

.report-center-banner h3,
.report-center-empty h3,
.report-detail-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
}

.report-center-banner p,
.report-center-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.report-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.report-center-card {
  display: grid;
  gap: 16px;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.report-center-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.report-card-body {
  display: grid;
  gap: 14px;
}

.report-card-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.3;
}

.report-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-center-list-section {
  display: grid;
  gap: 16px;
}

.report-center-footnote,
.report-detail-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.report-detail-hero-main {
  display: grid;
  gap: 12px;
}

.report-detail-mode {
  margin: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.report-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.report-metric-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.5), rgba(255, 255, 255, 0.98));
}

.report-metric-card .metric-value {
  font-size: 34px;
  line-height: 1;
}

.report-risk-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.report-risk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-risk-head strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

.report-risk-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.status-tag-neutral {
  background: var(--primary-soft);
  color: var(--primary);
}

.report-card-topline,
.risk-card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.status-tag-muted {
  background: var(--panel-soft);
  color: var(--muted);
}

.report-meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.report-meta-list div {
  display: grid;
  gap: 4px;
}

.report-meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-meta-list dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.report-meta-list-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card-compact {
  gap: 10px;
  min-height: 142px;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-value {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
}

.risk-list {
  display: grid;
  gap: 14px;
}

.risk-card-inline {
  padding: 18px 20px;
}

.risk-card-inline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-suggestion-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.8;
}

.report-suggestion-list li + li {
  margin-top: 8px;
}

.report-document {
  display: grid;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 0 6px;
  color: var(--text);
}

.report-document-title {
  display: grid;
  gap: 8px;
  text-align: center;
}

.report-document-title p,
.report-document-title h3 {
  margin: 0;
}

.report-document-title p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.report-document-title h3 {
  font-size: 34px;
  line-height: 1.2;
}

.report-document-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.report-section-badge {
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 30px;
  align-items: stretch;
}

.report-document-meta,
.report-result-list {
  display: grid;
  gap: 13px;
  margin: 0;
}

.report-document-meta div,
.report-result-list div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.report-document-meta dt,
.report-result-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.report-document-meta dd,
.report-result-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.report-result-list dd.is-primary {
  color: #ef4444;
  font-size: 18px;
  font-weight: 850;
}

.report-summary-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding-left: 30px;
  border-left: 1px dashed rgba(148, 163, 184, 0.7);
}

.report-summary-result.is-image-report {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: stretch;
}

.report-result-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
}

.report-stamp {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border: 8px solid #dc2626;
  border-radius: 50%;
  color: #dc2626;
  transform: rotate(-12deg);
  text-align: center;
}

.report-stamp span,
.report-stamp strong {
  display: block;
  transform: rotate(12deg);
}

.report-stamp span {
  font-size: 22px;
  font-weight: 900;
}

.report-stamp strong {
  font-size: 20px;
}

.report-stat-strip {
  grid-template-columns: repeat(3, minmax(0, auto)) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.report-stat-strip div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.report-stat-strip span,
.report-stat-strip p {
  color: var(--muted);
  font-size: 14px;
}

.report-stat-strip p {
  margin: 0;
  text-align: right;
}

.report-stat-strip strong {
  color: #ef4444;
  font-size: 16px;
}

.report-image-summary {
  gap: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #3b82f6 8%, transparent), transparent 58%),
    var(--card);
}

.report-image-summary p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.7;
}

.report-image-summary p + p {
  color: var(--muted);
  font-weight: 650;
}

.report-comparison-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.report-comparison-head,
.report-comparison-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 0.72fr) minmax(0, 1fr);
}

.report-comparison-head {
  background: #f1f5f9;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.report-comparison-head > div,
.report-comparison-row > div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.report-comparison-head > div:last-child,
.report-comparison-row > div:last-child {
  border-right: 0;
}

.report-comparison-row {
  border-top: 1px solid var(--line);
  background: #fff;
}

.report-comparison-index {
  color: var(--text);
  font-weight: 800;
  text-align: center;
}

.report-original-cell,
.report-source-cell {
  display: grid;
  gap: 12px;
  align-content: start;
}

.report-original-text,
.report-source-cell p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.9;
}

.report-original-text.is-high {
  color: #dc2626;
}

.report-original-text.is-medium {
  color: #c2410c;
}

.report-original-text.is-low {
  color: #374151;
}

.report-similarity-pill {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-similarity-pill.is-high {
  background: #fee2e2;
  color: #b91c1c;
}

.report-similarity-pill.is-medium {
  background: #ffedd5;
  color: #9a3412;
}

.report-source-cell strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.report-source-meta {
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 750;
}

.report-source-advice {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.report-source-cell a {
  justify-self: start;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.report-low-confidence {
  border: 1px dashed rgba(148, 163, 184, 0.58);
  border-radius: 14px;
  background: #f8fafc;
}

.report-low-confidence summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 850;
}

.report-low-confidence-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.report-low-confidence-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.report-low-confidence-item strong {
  color: var(--text);
}

.report-low-confidence-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.report-low-confidence-item a {
  justify-self: start;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.task-page .page-main {
  max-width: 980px;
}

.task-shell {
  display: block;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
}

.task-card--failed {
  max-width: 760px;
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.task-card h2 {
  margin: 8px 0 12px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.task-percent {
  flex: 0 0 auto;
  color: var(--primary-deep);
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 800;
  line-height: 1;
}

.task-motion,
.page-loading-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  padding: 18px;
}

.task-motion strong,
.page-loading-card h2 {
  display: block;
  margin: 0 0 6px;
  color: var(--text);
}

.task-motion p,
.page-loading-card p {
  margin: 0;
}

.task-motion-orb,
.page-loading-orb {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
}

.task-motion-orb::before,
.page-loading-orb::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 3px solid rgba(37, 99, 235, 0.16);
  border-top-color: var(--primary);
  border-radius: inherit;
  animation: task-spin 1s linear infinite;
}

.task-motion-orb::after,
.page-loading-orb::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.12);
  animation: task-pulse 1.4s ease-in-out infinite;
}

.task-motion-orb span,
.page-loading-orb span {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: inherit;
  animation: task-ripple 1.8s ease-in-out infinite;
}

.task-motion-orb span:nth-child(2),
.page-loading-orb span:nth-child(2) {
  animation-delay: 0.25s;
}

.task-motion-orb span:nth-child(3),
.page-loading-orb span:nth-child(3) {
  animation-delay: 0.5s;
}

.task-motion.is-complete .task-motion-orb::before {
  animation: none;
  border-color: var(--success);
}

.task-motion.is-complete .task-motion-orb::after {
  background: var(--success);
  box-shadow: 0 0 0 10px rgba(47, 157, 103, 0.13);
}

.task-progress-track {
  height: 12px;
  overflow: hidden;
  margin: 28px 0;
  border-radius: 999px;
  background: var(--line-soft);
}

.task-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #52a4ff);
  transition: width 0.45s ease;
}

.task-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-meta-grid div,
.task-estimate {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--panel-soft);
  padding: 16px;
}

.task-meta-grid span,
.task-estimate p {
  color: var(--muted);
}

.task-meta-grid span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.task-meta-grid strong,
.task-estimate strong {
  color: var(--text);
  font-size: 16px;
}

.task-estimate {
  margin-top: 14px;
}

.task-estimate p {
  margin: 8px 0 0;
  line-height: 1.7;
}

.task-step-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.task-step-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
}

.task-step-list span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.task-step-list li.is-active {
  color: var(--primary-deep);
}

.task-step-list li.is-active span {
  animation: task-pulse 1.35s ease-in-out infinite;
}

.task-step-list li.is-active span,
.task-step-list li.is-done span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.task-step-list li.is-done {
  color: var(--text-soft);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.task-actions .primary-button,
.task-actions .secondary-button {
  min-height: 46px;
  padding-inline: 22px;
  text-decoration: none;
}

.primary-button.is-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-button.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: task-spin 0.8s linear infinite;
}

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

@keyframes task-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes task-ripple {
  0% {
    opacity: 0.65;
    transform: scale(0.72);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.report-empty-block {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  background: #f8fafc;
}

.report-empty-block h4,
.report-empty-block p,
.report-legend-card ol {
  margin: 0;
}

.report-empty-block h4 {
  color: var(--text);
  font-size: 16px;
}

.report-empty-block p,
.report-legend-card li {
  color: var(--muted);
  line-height: 1.8;
}

.report-legend-card ol {
  padding-left: 22px;
}

@media (max-width: 1180px) {
  .service-hall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-service-detail-route .section-sidebar.service-menu-panel,
  body.is-service-upload-route .section-sidebar.service-menu-panel {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.is-service-detail-route .section-nav,
  body.is-service-upload-route .section-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 2px;
  }

  body.is-service-detail-route .section-nav-group,
  body.is-service-upload-route .section-nav-group {
    display: contents;
  }

  body.is-service-detail-route .section-nav-label,
  body.is-service-upload-route .section-nav-label {
    display: none;
  }

  body.is-service-detail-route .section-nav-link,
  body.is-service-upload-route .section-nav-link {
    white-space: nowrap;
  }

  .service-upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-upload-page .service-upload-intro {
    display: grid;
  }

  .report-meta-list-wide,
  .metric-grid,
  .report-metric-grid,
  .report-center-grid,
  .report-summary-grid,
  .report-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-summary-result {
    padding-left: 0;
    border-left: 0;
  }

  .report-stat-strip p {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .report-page-head {
    display: grid;
  }

  .report-center-grid,
  .report-metric-grid,
  .report-meta-list-wide,
  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-center-card,
  .report-center-banner,
  .report-center-empty,
  .report-detail-card {
    padding: 20px;
  }

  .report-document {
    padding-top: 18px;
  }

  .report-document-title h3 {
    font-size: 26px;
  }

  .report-document-card {
    padding: 18px;
    border-radius: 14px;
  }

  .report-summary-grid,
  .report-summary-result,
  .report-stat-strip,
  .report-comparison-head,
  .report-comparison-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-report-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .image-report-thumb {
    width: 100%;
    min-height: 190px;
  }

  .image-report-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .image-risk-badge {
    justify-self: start;
  }

  .image-report-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-bottom-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .report-summary-result {
    gap: 18px;
  }

  .report-summary-result.is-image-report {
    padding-left: 0;
    border-left: 0;
  }

  .image-risk-summary {
    justify-self: stretch;
    width: 100%;
  }

  .report-stamp {
    justify-self: start;
    width: 118px;
    height: 118px;
  }

  .report-stamp span {
    font-size: 18px;
  }

  .report-status-card {
    justify-self: start;
    width: 100%;
    min-height: auto;
    border-radius: 20px;
  }

  .report-document-meta div,
  .report-result-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .report-comparison-head {
    display: none;
  }

  .report-comparison-row > div {
    border-right: 0;
  }

  .report-comparison-index {
    padding-bottom: 0;
    text-align: left;
  }

  .service-upload-page .service-menu-panel {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .service-upload-page .service-menu-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .service-upload-page .service-menu-head {
    gap: 6px;
  }

  .service-upload-page .section-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
  }

  .service-upload-page .section-nav::-webkit-scrollbar {
    display: none;
  }

  .service-upload-page .section-nav-group {
    display: contents;
  }

  .service-upload-page .section-nav-link {
    white-space: nowrap;
  }

  .service-upload-page .service-upload-card {
    gap: 20px;
  }

  .service-upload-page .service-form-section,
  .service-upload-page .service-submit-panel {
    padding: 20px;
  }

  .service-upload-page .service-submit-panel .primary-button {
    width: 100%;
  }

  .service-hall-header {
    display: grid;
  }

  .service-hall-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-hall-card {
    min-height: auto;
    padding: 22px;
  }

  .service-hall-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .service-hall-card-actions .portal-enter-button {
    width: 100%;
  }

  .service-detail-copy h2 {
    font-size: 34px;
  }

  .service-detail-subtitle {
    font-size: 16px;
    line-height: 1.75;
  }

  .service-detail-summary {
    padding: 20px;
    border-radius: 20px;
  }

  .service-detail-panel {
    padding: 20px;
  }

  .choice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .choice-chip,
  .switch-row {
    width: 100%;
  }

  .risk-card-inline {
    padding: 16px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body,
  .page-shell,
  .page-main,
  .report-detail-page .report-detail-shell,
  .report-document-card,
  .report-comparison-row {
    background: #fff !important;
    box-shadow: none !important;
  }

  .topbar,
  .report-screen-actions {
    display: none !important;
  }

  .page-shell,
  .page-main,
  .report-detail-page .report-detail-shell {
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .report-document {
    max-width: none;
    gap: 12px;
    padding: 0;
  }

  .report-document-title h3 {
    font-size: 24px;
  }

  .report-document-card {
    gap: 12px;
    padding: 16px;
    border-color: #d1d5db;
    border-radius: 10px;
    break-inside: avoid;
  }

  .report-section-badge {
    border-color: #d1d5db;
  }

  .report-stamp {
    width: 108px;
    height: 108px;
    border-width: 6px;
  }

  .report-stamp span {
    font-size: 17px;
  }

  .report-stamp strong {
    font-size: 16px;
  }

  .report-comparison-head,
  .report-comparison-row {
    grid-template-columns: 54px minmax(0, 0.72fr) minmax(0, 1fr);
  }

  .report-comparison-head > div,
  .report-comparison-row > div {
    padding: 10px;
  }

  .report-original-text,
  .report-source-cell p {
    font-size: 11px;
    line-height: 1.7;
  }

  .report-source-cell strong {
    font-size: 12px;
  }

  .report-source-cell a {
    color: #111827;
  }

  .primary-button,
  .outline-button {
    display: none !important;
  }
}

/* Apple-like homepage + macOS-style business pages */
:root {
  --apple-bg: #f5f5f7;
  --apple-panel: #ffffff;
  --apple-text: #1d1d1f;
  --apple-muted: #6e6e73;
  --apple-soft: #86868b;
  --apple-line: rgba(0, 0, 0, 0.08);
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-radius: 28px;
  --apple-control-radius: 12px;
  --apple-shadow: 0 18px 46px rgba(0, 0, 0, 0.06);
}

body,
.marketing-page {
  background: var(--apple-bg);
  color: var(--apple-text);
}

.page-shell {
  width: min(100%, 1440px);
  padding-left: 28px;
  padding-right: 28px;
}

.section-card,
.portal-section,
.promo-panel,
.service-hall-card,
.service-form-section,
.service-submit-panel,
.report-center-card,
.report-center-banner,
.report-center-empty,
.report-detail-card {
  border-color: var(--apple-line);
  border-radius: var(--apple-radius);
  background: var(--apple-panel);
  box-shadow: var(--apple-shadow);
}

.topbar,
.home-entry-topbar {
  border-color: var(--apple-line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.home-entry-logo-mark {
  background: #1d1d1f;
  box-shadow: none;
}

.brand-block h1,
.home-entry-logo-copy strong,
.section-head h2,
.service-hall-header-copy h1,
.service-upload-page .service-upload-intro-copy h2,
.report-page-head h2 {
  color: var(--apple-text);
  letter-spacing: 0;
}

.home-entry-logo-copy small,
.home-entry-brand-title,
.section-text,
.portal-card-body p,
.service-hall-card-body p,
.service-form-section-head p,
.report-center-banner p,
.report-center-empty p,
.report-risk-card p,
.report-center-footnote,
.report-detail-footnote,
.service-upload-page .service-upload-footnote {
  color: var(--apple-muted);
}

.home-entry-nav-link,
.topbar-nav-link {
  color: var(--apple-muted);
}

.home-entry-nav-link:hover,
.topbar-nav-link:hover {
  color: var(--apple-blue);
}

.text-button {
  border-color: rgba(0, 113, 227, 0.2);
  background: rgba(0, 113, 227, 0.055);
  color: var(--apple-blue);
}

.text-button:hover {
  border-color: rgba(0, 113, 227, 0.32);
  background: rgba(0, 113, 227, 0.09);
  color: var(--apple-blue);
}

.primary-button,
.solid-button,
.marketing-hero-primary {
  border-color: var(--apple-blue);
  border-radius: 999px;
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: none;
}

.primary-button:hover,
.solid-button:hover,
.marketing-hero-primary:hover {
  border-color: var(--apple-blue-hover);
  background: var(--apple-blue-hover);
  color: #ffffff;
}

.outline-button,
.marketing-hero-secondary {
  border-color: rgba(0, 113, 227, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--apple-blue);
  box-shadow: none;
}

.outline-button:hover,
.marketing-hero-secondary:hover {
  border-color: var(--apple-blue);
  background: rgba(0, 113, 227, 0.06);
  color: var(--apple-blue);
}

.status-tag,
.portal-badge {
  border: 0;
  border-radius: 999px;
  background: #f5f5f7;
  color: var(--apple-muted);
}

.section-label {
  color: var(--apple-soft);
  letter-spacing: 0.08em;
}

.home-page .home-page-topbar {
  border-radius: 0;
  margin-top: 0;
}

.home-page .home-entry-brand-pill,
.home-page .home-entry-brand-meta {
  display: none;
}

.home-page .home-page-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  min-height: 620px;
  padding: 92px 86px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.home-page .home-page-hero::before {
  display: none;
}

.home-page .home-entry-hero-kicker {
  color: var(--apple-soft);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.home-page .home-entry-hero h1 {
  max-width: 820px;
  color: var(--apple-text);
  font-size: clamp(68px, 7.4vw, 112px);
  line-height: 0.96;
  font-weight: 800;
}

.home-page .home-page-hero-description {
  max-width: 720px;
  color: var(--apple-muted);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.45;
}

.home-page .home-page-hero-actions {
  gap: 12px;
  margin-top: 18px;
}

.home-page .marketing-hero-primary,
.home-page .marketing-hero-secondary {
  min-height: 46px;
  min-width: 150px;
}

.home-page .home-page-hero-footnote {
  max-width: 680px;
  color: var(--apple-soft);
  font-size: 12px;
}

.home-page .home-page-hero-visual {
  opacity: 0.42;
  filter: grayscale(1);
}

.home-page .home-entry-hero-card {
  background: #f5f5f7;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.home-page .home-entry-hero-card-line {
  background: #d2d2d7;
}

.home-page .home-entry-hero-lens {
  border-color: #d2d2d7;
  box-shadow: none;
}

.home-page .home-entry-hero-lens::after {
  background: #d2d2d7;
}

.home-page .home-feature-section,
.home-page .home-process-section,
.home-page .home-privacy-section,
.home-page .home-faq-section,
.home-page .home-footer-section {
  margin-top: 18px;
  padding: 80px 72px;
  border: 0;
  box-shadow: none;
}

.home-page .home-section-head {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-page .home-section-head h2 {
  font-size: clamp(44px, 4.8vw, 72px);
  line-height: 1;
}

.home-page .home-section-head .section-text {
  max-width: 720px;
}

.portal-card,
.home-page .home-feature-card,
.home-page .home-process-card,
.home-page .home-privacy-card,
.home-page .home-faq-card,
.home-page .home-footer-card {
  border-color: var(--apple-line);
  background: #ffffff;
  box-shadow: none;
}

.portal-card:hover,
.service-hall-card:hover,
.report-center-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 113, 227, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.portal-icon,
.service-hall-icon,
.section-nav-icon {
  background: #f5f5f7;
  color: var(--apple-text);
}

.service-hall-page .service-hall-shell {
  gap: 56px;
  width: 100%;
  min-width: 0;
  padding: 72px;
  border: 0;
  background: #ffffff;
  box-shadow: none;
}

.service-hall-header {
  justify-content: center;
  text-align: center;
}

.service-hall-header-copy {
  max-width: 820px;
}

.service-hall-header-copy h1 {
  font-size: clamp(56px, 6vw, 92px);
  line-height: 0.98;
}

.service-hall-header-copy .section-text {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: 22px;
  line-height: 1.5;
}

.service-hall-grid {
  gap: 24px;
}

.service-hall-card {
  min-height: 330px;
  padding: 30px;
}

.service-hall-card.is-priority {
  background: #ffffff;
}

.service-hall-card.is-muted {
  background: #fafafa;
  box-shadow: none;
}

.service-hall-card-body strong {
  font-size: 28px;
}

body.is-service-upload-route .topbar,
.service-upload-page .topbar,
.report-center-page .topbar,
.report-detail-page .topbar {
  border-radius: 0 0 24px 24px;
}

body.is-service-upload-route .service-menu-panel,
body.is-service-upload-route .service-form-section,
body.is-service-upload-route .workbench-side .control-panel,
.service-upload-page .service-menu-card,
.service-upload-page .service-form-section,
.service-upload-page .service-submit-panel,
.report-center-page .report-center-shell,
.report-detail-page .report-detail-shell,
.report-center-banner,
.report-center-empty,
.report-center-card,
.report-detail-card {
  border-color: var(--apple-line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--apple-shadow);
}

body.is-service-upload-route .service-upload-card,
.service-upload-page .service-upload-card,
.report-center-page .report-center-shell,
.report-detail-page .report-detail-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.is-service-upload-route .section-head h2,
.service-upload-page .service-upload-intro-copy h2,
.report-page-head h2 {
  font-size: clamp(44px, 4.8vw, 72px);
  line-height: 1;
}

body.is-service-upload-route .service-layout,
.service-upload-page .service-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}

body.is-service-upload-route .service-menu-panel,
.service-upload-page .service-menu-panel {
  border-color: var(--apple-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
}

.section-nav-link {
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.section-nav-link:hover,
.section-nav-link.is-active {
  transform: none;
  background: #f5f5f7;
  color: var(--apple-text);
  box-shadow: none;
}

body.is-service-upload-route .text-input,
body.is-service-upload-route textarea,
.service-upload-page .text-input,
.service-upload-page textarea {
  border-color: var(--apple-line);
  border-radius: 12px;
  background: #ffffff;
}

body.is-service-upload-route .upload-box,
.service-upload-page .upload-box {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fafafa;
}

body.is-service-upload-route .upload-box:hover,
.service-upload-page .upload-box:hover {
  border-color: var(--apple-blue);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.06);
}

body.is-service-upload-route .service-form-section,
body.is-service-upload-route .workbench-side .control-panel {
  border: 1px solid var(--apple-line);
  border-radius: 28px;
}

body.is-service-upload-route .text-input,
body.is-service-upload-route textarea {
  border: 1px solid var(--apple-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--apple-text);
}

body.is-service-upload-route select.text-input {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #6e6e73 50%) calc(100% - 22px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #6e6e73 50%, transparent 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    #ffffff;
}

body.is-service-upload-route .mode-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.is-service-upload-route .mode-item {
  min-height: 56px;
  border: 1px solid var(--apple-line);
  border-radius: 18px;
  background: #ffffff;
}

body.is-service-upload-route .mode-item:hover,
body.is-service-upload-route .mode-item:has(input:checked) {
  border-color: rgba(0, 113, 227, 0.32);
  background: rgba(0, 113, 227, 0.055);
  color: var(--apple-blue);
}

body.is-service-upload-route .upload-box {
  border: 1px dashed rgba(0, 113, 227, 0.32);
  border-radius: 24px;
  background: #fafafa;
}

body.is-service-upload-route .upload-icon {
  color: var(--apple-blue);
  background: rgba(0, 113, 227, 0.075);
}

body.is-service-upload-route .section-nav-link {
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
}

body.is-service-upload-route .section-nav-link:hover,
body.is-service-upload-route .section-nav-link.is-active {
  border-color: rgba(0, 113, 227, 0.16);
  background: #f5f5f7;
}

.consent-check {
  border-color: var(--apple-line);
  background: #f5f5f7;
}

.report-center-page .report-center-shell,
.report-detail-page .report-detail-shell {
  gap: 34px;
}

.report-page-head {
  align-items: center;
}

.report-page-head .section-text {
  font-size: 20px;
  line-height: 1.5;
}

.report-center-card,
.report-detail-card {
  padding: 30px;
}

.report-card-body h3,
.report-detail-card h3 {
  font-size: 28px;
}

.report-metric-card {
  border-color: var(--apple-line);
  background: #ffffff;
  box-shadow: none;
}

.report-metric-card .metric-value {
  color: var(--apple-text);
  font-size: 42px;
}

.report-risk-card {
  border-color: var(--apple-line);
  background: #fafafa;
}

.status-tag-neutral {
  background: #f5f5f7;
  color: var(--apple-muted);
}

@media (max-width: 1180px) {
  .home-page .home-page-hero {
    grid-template-columns: 1fr;
    padding: 80px 48px;
  }

  .home-page .home-page-hero-visual {
    display: none;
  }

  .service-hall-page .service-hall-shell {
    padding: 54px 34px;
  }
}

@media (max-width: 720px) {
  .task-card {
    border-radius: 18px;
    padding: 22px;
  }

  .task-card-head,
  .task-motion,
  .page-loading-card,
  .task-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .task-percent {
    font-size: 42px;
  }

  .task-meta-grid {
    grid-template-columns: 1fr;
  }

  .task-actions .primary-button,
  .task-actions .secondary-button {
    width: 100%;
  }

  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-page .home-page-hero {
    min-height: 560px;
    padding: 64px 24px;
  }

  .home-page .home-entry-hero h1 {
    font-size: 56px;
  }

  .home-page .home-page-hero-description {
    font-size: 20px;
  }

  .home-page .home-feature-section,
  .home-page .home-process-section,
  .home-page .home-privacy-section,
  .home-page .home-faq-section,
  .home-page .home-footer-section {
    padding: 54px 22px;
  }

  .service-hall-page .service-hall-shell {
    padding: 46px 20px;
  }

  .service-hall-header-copy h1,
  body.is-service-upload-route .section-head h2,
  .service-upload-page .service-upload-intro-copy h2,
  .report-page-head h2 {
    font-size: 44px;
  }

  .service-hall-header-copy .section-text,
  .report-page-head .section-text {
    font-size: 18px;
  }

  body.is-service-upload-route .service-layout,
  .service-upload-page .service-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-service-upload-route .mode-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-card-actions,
  .home-page .home-page-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-page .home-page-topbar {
    align-items: stretch;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
  }

  .home-page .home-entry-brand {
    align-items: flex-start;
    gap: 12px;
  }

  .home-page .home-entry-brand-meta {
    display: none;
  }

  .home-page .home-entry-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .home-page .home-entry-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--apple-line);
    border-radius: 999px;
    background: #f5f5f7;
    color: var(--apple-text);
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
  }

  .home-page .home-entry-nav-link[href="/service"] {
    grid-column: span 2;
  }

  .home-page .home-page-hero {
    min-height: auto;
    padding: 48px 24px;
    border-radius: 28px;
  }

  .home-page .home-entry-hero h1 {
    font-size: 46px;
    line-height: 1.02;
  }

  .home-page .home-page-hero-description {
    font-size: 18px;
    line-height: 1.55;
  }

  .home-page .home-page-hero-actions {
    gap: 10px;
  }

  .home-page .marketing-hero-primary,
  .home-page .marketing-hero-secondary {
    min-height: 48px;
  }
}

/* Login page final responsive polish */
.login-page .brand-mark {
  color: var(--muted);
}

.login-page .topbar {
  background: rgba(255, 255, 255, 0.96);
}

.login-page .text-input {
  min-height: 52px;
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-intro-panel {
    align-content: start;
  }

  .login-intro-panel h2 {
    font-size: 48px;
  }
}

@media (max-width: 720px) {
  .login-page .page-main {
    padding-top: 22px;
  }

  .login-shell {
    gap: 18px;
  }

  .login-intro-panel,
  .login-auth-card {
    padding: 22px;
    border-radius: 24px;
  }

  .login-intro-panel h2 {
    font-size: 36px;
    line-height: 1.08;
  }

  .login-intro-panel > p {
    font-size: 15px;
    line-height: 1.8;
  }

  .login-benefit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-benefit-grid article {
    min-height: auto;
  }

  .login-auth-head {
    display: grid;
  }

  .login-auth-head h2 {
    font-size: 30px;
  }

  .login-home-link {
    justify-self: start;
  }

  .auth-switcher {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .auth-switcher .outline-button {
    min-height: 44px;
    border-color: var(--line);
    background: #ffffff;
  }

  .auth-switcher .outline-button.is-selected {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
  }

  .auth-inline-tip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .auth-inline-tip span {
    color: var(--muted);
  }

  .login-page .text-button,
  .login-page .primary-button,
  .login-page .outline-button,
  .login-page .solid-button {
    width: 100%;
    min-height: 46px;
  }

  .login-page .text-button {
    border-radius: 14px;
    background: #ffffff;
  }

  .login-page .topbar-nav-link {
    min-height: 44px;
  }
}

/* Login dark-mode fix: remove overexposed intro panel. */
html[data-theme="dark"] .login-page .topbar {
  background: var(--ios-topbar-bg) !important;
}

html[data-theme="dark"] .login-intro-panel {
  border-color: var(--line) !important;
  background:
    radial-gradient(circle at 18% 12%, rgba(110, 160, 255, 0.12), transparent 30%),
    linear-gradient(145deg, #182335 0%, #121a26 62%, #101722 100%) !important;
  color: var(--text) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] .login-intro-panel h2,
html[data-theme="dark"] .login-intro-panel strong {
  color: var(--text) !important;
}

html[data-theme="dark"] .login-intro-panel > p,
html[data-theme="dark"] .login-benefit-grid p {
  color: var(--muted) !important;
}

html[data-theme="dark"] .login-benefit-grid article {
  border-color: var(--line) !important;
  background: rgba(31, 45, 65, 0.78) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .login-benefit-grid span {
  color: var(--primary-deep) !important;
}

html[data-theme="dark"] .login-auth-card {
  border-color: var(--line) !important;
  background: var(--panel) !important;
}

html[data-theme="dark"] .apple-login-button {
  border-color: rgba(142, 180, 255, 0.26) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .auth-switcher .outline-button.is-selected {
  border-color: rgba(142, 180, 255, 0.38) !important;
  background: rgba(110, 160, 255, 0.18) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .login-page .text-button {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--primary-deep) !important;
}

@media (min-width: 1181px) {
  .login-shell {
    grid-template-columns: minmax(0, 0.86fr) minmax(400px, 560px);
    gap: 28px;
  }

  .login-intro-panel {
    padding: 52px !important;
  }

  .login-auth-card {
    padding: 34px !important;
  }
}

/* Late shell overrides keep the motion/theme/mobile layer above legacy page rules. */
html[data-theme="dark"] body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .home-entry-topbar {
  background: var(--ios-topbar-bg) !important;
}

html[data-theme="dark"] .section-card,
html[data-theme="dark"] .portal-card,
html[data-theme="dark"] .service-hall-card,
html[data-theme="dark"] .promo-panel,
html[data-theme="dark"] .control-panel,
html[data-theme="dark"] .service-form-section,
html[data-theme="dark"] .service-upload-card,
html[data-theme="dark"] .report-center-card,
html[data-theme="dark"] .report-detail-card,
html[data-theme="dark"] .report-document-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .task-card {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .text-input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .upload-box,
html[data-theme="dark"] .mode-item {
  border-color: var(--line) !important;
  background: var(--panel-soft) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .section-text,
html[data-theme="dark"] .upload-meta,
html[data-theme="dark"] .report-source-meta,
html[data-theme="dark"] .report-source-cell p,
html[data-theme="dark"] .workbench-note p {
  color: var(--muted) !important;
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }

  .page-shell {
    max-width: 100%;
    padding-right: 16px !important;
    padding-left: 16px !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }

  .topbar,
  .home-entry-topbar {
    position: sticky !important;
    top: env(safe-area-inset-top);
    z-index: 90;
    margin-right: -16px !important;
    margin-left: -16px !important;
    border-radius: 0 !important;
    background: var(--ios-topbar-bg) !important;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .topbar-nav,
  .home-entry-nav {
    position: absolute !important;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    display: grid !important;
    max-height: 0;
    overflow: hidden;
    gap: 8px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 18px;
    background: var(--ios-topbar-bg) !important;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .topbar-brand-row.is-mobile-menu-open .topbar-nav,
  .home-entry-topbar.is-mobile-menu-open .home-entry-nav {
    max-height: 360px;
    padding: 10px;
    border-color: var(--line);
    opacity: 1;
    pointer-events: auto;
  }

  .yp-menu-button {
    display: inline-grid !important;
  }

  .yp-mobile-tabbar {
    display: grid !important;
  }

  .service-layout,
  .service-upload-grid,
  .workbench-grid,
  .login-shell,
  .report-summary-grid,
  .home-entry-hero,
  .home-page-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .service-upload-page .service-upload-card,
  body.is-service-upload-route .service-upload-card {
    padding: 16px !important;
  }

  .service-upload-page .service-form-section,
  body.is-service-upload-route .service-form-section,
  .service-upload-page .service-submit-panel,
  body.is-service-upload-route .service-submit-panel {
    padding: 18px !important;
  }

  .service-upload-page .service-form-section-body,
  body.is-service-upload-route .service-form-section-body,
  .service-upload-page .field-block,
  body.is-service-upload-route .field-block,
  .service-upload-page .text-input,
  body.is-service-upload-route .text-input,
  .service-upload-page textarea,
  body.is-service-upload-route textarea,
  .service-upload-page .upload-box,
  body.is-service-upload-route .upload-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .service-upload-page .mode-item,
  body.is-service-upload-route .mode-item,
  .service-upload-page .text-input,
  body.is-service-upload-route .text-input,
  .service-upload-page textarea,
  body.is-service-upload-route textarea,
  .service-upload-page .upload-box,
  body.is-service-upload-route .upload-box,
  .service-upload-page .consent-check,
  body.is-service-upload-route .consent-check,
  #service-submit-button {
    scroll-margin-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .section-sidebar.service-menu-panel {
    position: static !important;
    width: 100% !important;
    margin-bottom: 16px !important;
  }

  #upload-menu,
  .section-nav {
    display: flex !important;
    overflow-x: auto !important;
    gap: 8px;
    padding-bottom: 10px;
  }

  .section-nav-group {
    display: flex !important;
    gap: 8px;
  }

  .section-nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .portal-grid,
  .service-hall-grid,
  .report-center-grid,
  .task-meta-grid,
  .report-stat-strip,
  .report-result-list,
  .report-document-meta {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .report-comparison-head {
    display: none !important;
  }

  .report-comparison-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
  }

  .primary-button,
  .solid-button,
  .outline-button,
  .secondary-button,
  .text-button,
  .text-input,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  #service-submit-button,
  .task-actions a,
  .report-card-actions a,
  .report-card-actions button,
  .auth-submit-button {
    width: 100% !important;
  }
}

/* Dark-mode hardening and lighter motion pass. */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] .page-shell,
html[data-theme="dark"] .page-main,
html[data-theme="dark"] .portal-section,
html[data-theme="dark"] .service-hall-shell,
html[data-theme="dark"] .report-page-shell,
html[data-theme="dark"] .report-detail-panel,
html[data-theme="dark"] .auth-shell,
html[data-theme="dark"] .login-shell,
html[data-theme="dark"] .task-shell {
  background: transparent !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  .section-card,
  .portal-card,
  .feature-card,
  .process-card,
  .faq-card,
  .service-hall-card,
  .home-entry-hero-tags,
  .home-entry-hero-tags span,
  .home-entry-section-icon,
  .business-overview-card,
  .control-panel,
  .metric-card,
  .promo-panel,
  .preview-box,
  .progress-box,
  .summary-metric,
  .stat-card,
  .risk-output,
  .service-type-option,
  .guest-quota-card,
  .service-menu-card,
  .service-form-section,
  .service-submit-panel,
  .service-upload-card,
  .report-center-card,
  .report-center-empty,
  .report-card,
  .report-detail-card,
  .report-document-card,
  .report-metric-card,
  .report-risk-card,
  .report-comparison-row,
  .report-low-confidence,
  .report-low-confidence-item,
  .report-empty-block,
  .auth-card,
  .login-benefit-card,
  .task-card,
  .task-meta-grid div,
  .task-estimate,
  .page-loading-card,
  .workbench-note
) {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] :where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .brand-mark,
  .portal-card-body strong,
  .service-hall-card h2,
  .report-card-body h3,
  .report-detail-card h3,
  .metric-value,
  .task-percent,
  label,
  legend,
  dt,
  strong
) {
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  p,
  li,
  dd,
  small,
  span,
  .section-text,
  .section-label,
  .topbar-subtitle,
  .upload-meta,
  .report-meta-list,
  .report-source-meta,
  .report-source-cell p,
  .report-detail-footnote,
  .login-benefit-card p,
  .workbench-note p,
  .task-estimate p
) {
  color: var(--muted) !important;
}

html[data-theme="dark"] :where(
  input,
  select,
  textarea,
  .text-input,
  .upload-box,
  .mode-item,
  .choice-chip,
  .consent-check,
  .auth-switcher,
  .auth-switcher .outline-button
) {
  border-color: var(--line) !important;
  background: var(--panel-soft) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(input::placeholder, textarea::placeholder) {
  color: rgba(210, 222, 238, 0.52) !important;
}

html[data-theme="dark"] :where(a, .text-button, .topbar-nav-link, .home-entry-nav-link) {
  color: var(--primary-deep) !important;
}

html[data-theme="dark"] :where(.primary-button, .solid-button, button[type="submit"]) {
  background: linear-gradient(135deg, #6ea0ff, #8bb6ff) !important;
  color: #07111f !important;
  border-color: rgba(142, 180, 255, 0.32) !important;
}

html[data-theme="dark"] :where(.primary-button, .solid-button, button[type="submit"]) * {
  color: #07111f !important;
}

html[data-theme="dark"] :where(.outline-button, .secondary-button) {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(table, thead, tbody, tr, th, td) {
  border-color: var(--line) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(th, .report-comparison-head) {
  background: var(--panel-soft) !important;
}

html[data-theme="dark"] .home-page .home-page-hero {
  background:
    radial-gradient(circle at 18% 12%, rgba(110, 160, 255, 0.16), transparent 30%),
    linear-gradient(145deg, #182335 0%, #121a26 56%, #101722 100%) !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .home-page .home-entry-hero-kicker {
  color: var(--primary-deep) !important;
}

html[data-theme="dark"] .home-page .home-entry-hero h1 {
  color: var(--text) !important;
}

html[data-theme="dark"] .home-page .home-page-hero-description,
html[data-theme="dark"] .home-page .home-page-hero-footnote {
  color: var(--muted) !important;
}

html[data-theme="dark"] .home-page .home-page-hero-visual {
  opacity: 0.32 !important;
  filter: none !important;
}

html[data-theme="dark"] .home-page .home-entry-hero-card {
  background: rgba(31, 45, 65, 0.86) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .home-page .home-entry-hero-card-line,
html[data-theme="dark"] .home-page .home-entry-hero-lens::after {
  background: rgba(142, 180, 255, 0.28) !important;
}

html[data-theme="dark"] .home-page .home-entry-hero-lens {
  border-color: rgba(142, 180, 255, 0.28) !important;
}

html[data-theme="dark"] .report-source-advice {
  border: 1px solid var(--line) !important;
  background: var(--panel-soft) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .report-similarity-pill {
  background: rgba(142, 180, 255, 0.14) !important;
  color: var(--primary-deep) !important;
}

html[data-theme="dark"] .report-original-text.is-low {
  color: var(--muted) !important;
}

/* Home hero final tuning: calmer headline, clearer primary action. */
.home-page .home-entry-hero h1 {
  max-width: 760px !important;
  font-size: clamp(48px, 5.2vw, 78px) !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
}

.home-page .home-page-hero-description {
  max-width: 780px !important;
  font-size: clamp(19px, 1.55vw, 24px) !important;
  line-height: 1.58 !important;
}

.home-page .home-page-hero-actions {
  gap: 16px !important;
  margin-top: 28px !important;
}

.home-page .marketing-hero-primary {
  min-width: 190px !important;
  min-height: 58px !important;
  padding: 0 34px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  box-shadow: 0 16px 36px rgba(69, 130, 255, 0.28) !important;
}

  .home-page .marketing-hero-secondary {
    min-height: 54px !important;
    padding: 0 30px !important;
    font-size: 17px !important;
  }

html[data-theme="light"] .home-page .home-page-hero-actions,
body:not([data-theme]) .home-page .home-page-hero-actions {
  align-items: center !important;
}

html[data-theme="light"] .home-page .marketing-hero-primary,
body:not([data-theme]) .home-page .marketing-hero-primary {
  min-width: 220px !important;
  min-height: 56px !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: linear-gradient(180deg, #0a84ff 0%, #0071e3 100%) !important;
  box-shadow: 0 16px 36px rgba(0, 113, 227, 0.22) !important;
}

html[data-theme="light"] .home-page .marketing-hero-secondary,
body:not([data-theme]) .home-page .marketing-hero-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 180px !important;
  min-height: 52px !important;
  border: 1px solid rgba(0, 113, 227, 0.28) !important;
  border-radius: 999px !important;
  color: #0066cc !important;
  background: rgba(0, 113, 227, 0.06) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

html[data-theme="light"] .home-page .marketing-hero-secondary:hover,
body:not([data-theme]) .home-page .marketing-hero-secondary:hover {
  border-color: rgba(0, 113, 227, 0.4) !important;
  background: rgba(0, 113, 227, 0.1) !important;
  transform: translateY(-1px);
}

html[data-theme="light"] .home-page .home-page-hero-footnote,
body:not([data-theme]) .home-page .home-page-hero-footnote {
  color: #6b7280 !important;
}

/* Home lower sections: content-sized cards with calmer borders. */
.home-page .home-feature-section,
.home-page .home-process-section,
.home-page .home-privacy-section,
.home-page .home-faq-section,
.home-page .home-footer-section {
  margin-top: 28px !important;
  padding: 52px 56px !important;
  border-radius: 26px !important;
}

.home-page .home-process-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  align-items: start !important;
  gap: 16px !important;
}

.home-page .home-privacy-grid,
.home-page .home-faq-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  align-items: start !important;
  gap: 16px !important;
}

.home-page .home-footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  align-items: start !important;
  gap: 14px !important;
}

.home-page .home-process-card,
.home-page .home-privacy-card,
.home-page .home-faq-card,
.home-page .home-footer-card {
  min-height: 0 !important;
  padding: 22px 24px !important;
  border-radius: 18px !important;
  align-self: start !important;
}

.home-page .home-process-card h3,
.home-page .home-privacy-card h3,
.home-page .home-faq-card h3,
.home-page .home-footer-card h3 {
  margin-bottom: 10px !important;
  font-size: 17px !important;
  line-height: 1.42 !important;
}

.home-page .home-process-card p,
.home-page .home-privacy-card p,
.home-page .home-faq-card p,
.home-page .home-footer-card p {
  font-size: 14px !important;
  line-height: 1.68 !important;
}

.yp-user-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.yp-user-link,
.yp-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.yp-logout-button {
  cursor: pointer;
  color: var(--muted) !important;
}

.yp-logout-button:hover,
.yp-user-link:hover {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-deep) !important;
}

@media (max-width: 768px) {
  .home-page .home-entry-hero h1 {
    font-size: clamp(38px, 11vw, 48px) !important;
    line-height: 1.08 !important;
  }

  .home-page .home-page-hero-description {
    font-size: 18px !important;
    line-height: 1.62 !important;
  }

  .home-page .marketing-hero-primary,
  .home-page .marketing-hero-secondary {
    width: 100% !important;
    min-height: 54px !important;
  }

  .home-page .home-feature-section,
  .home-page .home-process-section,
  .home-page .home-privacy-section,
  .home-page .home-faq-section,
  .home-page .home-footer-section {
    padding: 28px 18px !important;
    border-radius: 22px !important;
  }

  .home-page .home-process-card,
  .home-page .home-privacy-card,
  .home-page .home-faq-card,
  .home-page .home-footer-card {
    padding: 18px 20px !important;
    border-radius: 16px !important;
  }

  .yp-user-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .yp-user-link,
  .yp-logout-button {
    width: 100%;
    min-height: 44px;
  }
}

.section-card,
.portal-card,
.service-hall-card,
.report-center-card,
.report-detail-card,
.service-form-section,
.service-upload-card,
.auth-card,
.task-card {
  animation-duration: 240ms !important;
}

.pricing-shell,
.checkout-shell,
.billing-shell,
.payment-result-shell {
  display: grid;
  gap: 24px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: stretch;
  gap: 20px;
}

.pricing-page .pricing-shell {
  gap: 22px;
}

.pricing-usage-card {
  display: block;
}

.pricing-usage-panel {
  display: grid;
  gap: 2px;
  max-width: 540px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--panel-soft) 92%, transparent), color-mix(in srgb, var(--text) 5%, transparent)),
    var(--panel);
  box-shadow: var(--shadow-soft);
}

.pricing-usage-head {
  padding-inline: 12px;
}

.pricing-usage-row,
.pricing-usage-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 38px;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
}

.pricing-usage-row span,
.pricing-usage-action span:first-child {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-usage-row strong {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  white-space: nowrap;
}

.pricing-usage-row small {
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}

.pricing-usage-action {
  grid-template-columns: minmax(0, 1fr) auto;
  color: var(--text);
  text-decoration: none;
  transition: background 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.pricing-usage-action:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transform: translateY(-1px);
}

.pricing-usage-panel p {
  margin: 8px 12px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.pricing-plan-card {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 24px;
  min-height: 560px;
  padding: 30px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 8%, color-mix(in srgb, var(--text) 8%, transparent), transparent 26%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--text) 6%), var(--panel));
  box-shadow: var(--shadow);
  transition: border-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out), transform 240ms var(--ease-out);
}

.pricing-plan-card:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  box-shadow: 0 26px 70px color-mix(in srgb, var(--shadow-color) 80%, transparent);
  transform: translateY(-3px);
}

.pricing-plan-pro {
  border-color: color-mix(in srgb, #6c7dff 38%, var(--line));
  background:
    radial-gradient(circle at 18% 8%, rgba(94, 116, 255, 0.18), transparent 34%),
    linear-gradient(160deg, #fbfcff 0%, #eef3ff 46%, #d7dffc 100%);
  box-shadow: 0 28px 80px rgba(76, 93, 156, 0.16);
}

.pricing-plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pricing-plan-eyebrow,
.pricing-plan-credit {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.pricing-plan-card h3 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 820;
  line-height: 1.05;
}

.pricing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
}

.pricing-plan-price span {
  color: var(--muted);
  font-size: 28px;
  font-weight: 700;
}

.pricing-plan-price strong {
  font-size: clamp(56px, 5.4vw, 76px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.95;
}

.pricing-plan-price small {
  color: var(--muted);
  font-weight: 850;
}

.pricing-plan-tagline,
.pricing-plan-note {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.pricing-plan-card .pricing-buy-button {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 850;
}

.pricing-plan-go .pricing-buy-button,
.pricing-plan-plus .pricing-buy-button,
.pricing-plan-business .pricing-buy-button {
  background: color-mix(in srgb, var(--text) 92%, transparent) !important;
  color: var(--bg) !important;
  border-color: transparent !important;
}

.pricing-feature-list {
  display: grid;
  align-content: start;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-feature-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.45;
}

.pricing-feature-list li span:first-child {
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.45;
}

.checkout-summary,
.billing-order-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.billing-redeem-section {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.billing-redeem-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.billing-redeem-form .primary-button {
  white-space: nowrap;
}

.billing-credit-grid,
.payment-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.payment-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.billing-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

.billing-order-card strong,
.billing-order-card p {
  margin: 0;
}

.billing-order-card p,
.billing-order-card small {
  color: var(--muted);
}

.yp-site-footer {
  width: min(100%, 1440px);
  margin: 34px auto 0;
  padding: 0 28px calc(26px + env(safe-area-inset-bottom));
  color: var(--muted);
}

.yp-site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.yp-site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.yp-site-footer p {
  margin: 0 0 6px;
  line-height: 1.7;
}

.yp-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.yp-site-footer a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: none;
}

.service-credit-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

#service-side-fee {
  display: grid;
  gap: 0;
}

.usage-popover {
  display: grid;
  gap: 2px;
  width: 100%;
  overflow: hidden;
  padding: 8px 0 4px;
  border-radius: 16px;
  color: var(--text);
}

.usage-popover-head,
.usage-row,
.usage-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  gap: 10px;
  padding: 0 10px;
  border-radius: 12px;
}

.usage-row {
  grid-template-columns: minmax(82px, 0.85fr) max-content minmax(0, 1fr);
}

.usage-popover-head {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  color: var(--text);
}

.usage-popover-head strong,
.usage-row span,
.usage-action span:first-child {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-popover-head > span:not(.usage-gauge):not(.usage-chevron),
.usage-row small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-gauge {
  --usage-percent: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    conic-gradient(var(--primary) calc(var(--usage-percent) * 1%), color-mix(in srgb, var(--line) 84%, transparent) 0),
    var(--panel-soft);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--panel) 76%, transparent);
}

.usage-chevron {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.usage-row strong {
  color: var(--text);
  font-weight: 900;
  min-width: max-content;
  text-align: right;
  white-space: nowrap;
}

.usage-action {
  grid-template-columns: minmax(0, 1fr) auto;
  color: var(--text);
  text-decoration: none;
  transition: background 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.usage-action:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transform: translateY(-1px);
}

.usage-action-primary {
  margin-top: 4px;
  background: color-mix(in srgb, var(--text) 9%, transparent);
}

.usage-note {
  margin: 8px 10px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.home-feature-section,
.home-process-section,
.home-privacy-section,
.home-faq-section,
.report-document,
.report-comparison-table {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

@media (max-width: 768px) {
  .topbar,
  .home-entry-topbar,
  .topbar-nav,
  .home-entry-nav,
  .yp-mobile-tabbar {
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  }

  .section-card,
  .portal-card,
  .service-hall-card,
  .report-center-card,
  .report-detail-card,
  .service-form-section,
  .service-upload-card,
  .auth-card,
  .task-card {
    animation-duration: 200ms !important;
  }

  .pricing-grid,
  .billing-credit-grid,
  .payment-result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-page .pricing-shell {
    gap: 16px;
    padding: 18px;
  }

  .pricing-page .section-head {
    align-items: stretch;
    gap: 12px;
  }

  .pricing-page .section-head h2 {
    font-size: 28px;
    line-height: 1.12;
  }

  .pricing-usage-panel {
    max-width: none;
    padding: 10px;
    border-radius: 18px;
  }

  .pricing-usage-head,
  .pricing-usage-row,
  .pricing-usage-action {
    min-height: 36px;
    gap: 8px;
    padding-inline: 10px;
  }

  .pricing-usage-panel p {
    margin: 8px 10px 0;
    font-size: 14px;
  }

  .pricing-plan-card {
    min-height: auto;
    gap: 16px;
    padding: 24px;
    border-radius: 22px;
  }

  .pricing-plan-top {
    gap: 12px;
  }

  .pricing-plan-eyebrow,
  .pricing-plan-credit {
    min-height: 30px;
    padding: 0 11px;
    font-size: 0.82rem;
  }

  .pricing-plan-card h3 {
    max-width: 220px;
    margin-top: 10px;
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1.04;
  }

  .pricing-plan-price span {
    font-size: 24px;
  }

  .pricing-plan-price strong {
    font-size: clamp(58px, 18vw, 76px);
  }

  .pricing-plan-tagline,
  .pricing-plan-note {
    font-size: 16px;
    line-height: 1.55;
  }

  .pricing-plan-card .pricing-buy-button {
    min-height: 50px;
    font-size: 16px;
  }

  .pricing-feature-list {
    gap: 12px;
  }

  .pricing-feature-list li {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    font-size: 15px;
  }

  .usage-popover {
    padding: 4px 0 2px;
  }

  .usage-popover-head,
  .usage-row,
  .usage-action {
    min-height: 34px;
    gap: 8px;
    padding-inline: 8px;
  }

  .usage-popover-head strong,
  .usage-row span,
  .usage-row strong,
  .usage-action span:first-child {
    font-size: 15px;
  }

  .usage-note {
    margin: 6px 8px 0;
    font-size: 13px;
  }

  .billing-redeem-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .billing-order-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .yp-site-footer {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .yp-site-footer-inner,
  .yp-site-footer nav {
    display: grid;
    justify-content: stretch;
  }

  .yp-site-footer nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final dark-mode leak plug: keep late legacy white blocks from surfacing. */
html[data-theme="dark"] :where(
  .section-card,
  .portal-section,
  .portal-card,
  .feature-card,
  .process-card,
  .faq-card,
  .home-process-card,
  .home-privacy-card,
  .home-faq-card,
  .home-footer-card,
  .home-entry-hero-tags,
  .home-entry-hero-tags span,
  .pricing-card,
  .pricing-plan-card,
  .pricing-usage-panel,
  .checkout-summary,
  .billing-redeem-section,
  .billing-order-section,
  .billing-order-card,
  .service-hall-card,
  .business-overview-card,
  .service-detail-card,
  .service-upload-card,
  .service-menu-panel,
  .service-menu-card,
  .service-form-section,
  .service-form-section-body,
  .service-submit-panel,
  .control-panel,
  .workbench-side .control-panel,
  .report-center-card,
  .report-center-empty,
  .report-card,
  .report-detail-card,
  .report-document,
  .report-document-card,
  .report-metric-card,
  .report-risk-card,
  .report-comparison-row,
  .report-source-cell,
  .report-original-cell,
  .report-source-advice,
  .report-low-confidence,
  .report-low-confidence-item,
  .report-empty-block,
  .task-card,
  .task-meta-grid div,
  .task-estimate,
  .login-auth-card,
  .login-benefit-grid article,
  .auth-card,
  .page-loading-card,
  .empty-state,
  .empty-card,
  .empty-placeholder,
  .upload-box--muted,
  .notice-banner,
  .download-tip,
  .preview-box,
  .progress-box,
  .summary-metric,
  .stat-card,
  .risk-output,
  .mode-item,
  .choice-chip,
  .consent-check
) {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(.yp-site-footer) {
  color: var(--muted) !important;
}

html[data-theme="dark"] :where(.yp-site-footer-inner) {
  border-color: var(--line) !important;
}

html[data-theme="dark"] :where(.yp-site-footer strong) {
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  input,
  select,
  textarea,
  .text-input,
  .upload-box,
  .auth-switcher,
  .auth-switcher .outline-button,
  .section-nav,
  .section-nav-link
) {
  border-color: var(--line) !important;
  background: var(--panel-soft) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  .feedback-text,
  .login-page .feedback-text,
  .form-feedback,
  .auth-feedback,
  .upload-meta,
  .field-help,
  .inline-tip
) {
  border-color: var(--line) !important;
  background: rgba(122, 167, 255, 0.09) !important;
  color: var(--text-soft) !important;
}

html[data-theme="dark"] :where(.feedback-text.is-error, .login-page .feedback-text.is-error) {
  border-color: rgba(248, 113, 113, 0.42) !important;
  background: rgba(127, 29, 29, 0.28) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] :where(.feedback-text.is-actionable) {
  border-color: rgba(248, 113, 113, 0.28) !important;
  background: rgba(127, 29, 29, 0.28) !important;
  color: #fee2e2 !important;
}

html[data-theme="dark"] :where(.feedback-text.is-success, .login-page .feedback-text.is-success) {
  border-color: rgba(74, 222, 128, 0.34) !important;
  background: rgba(20, 83, 45, 0.24) !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] :where(
  table,
  thead,
  tbody,
  tr,
  th,
  td,
  .report-comparison-table,
  .report-comparison-head
) {
  border-color: var(--line) !important;
  background-color: transparent !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(th, .report-comparison-head, .report-comparison-table th) {
  background: var(--panel-soft) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  .muted,
  .section-text,
  .section-label,
  .upload-meta,
  .download-tip,
  .report-meta-list,
  .report-source-meta,
  .report-source-cell p,
  .report-original-text,
  .task-estimate p,
  .auth-inline-tip,
  .auth-inline-tip span,
  .login-benefit-grid p
) {
  color: var(--muted) !important;
}

html[data-theme="dark"] :where(.login-intro-panel) {
  background:
    radial-gradient(circle at 18% 12%, rgba(110, 160, 255, 0.12), transparent 30%),
    linear-gradient(145deg, #182335 0%, #121a26 62%, #101722 100%) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(.topbar, .home-entry-topbar, .yp-mobile-tabbar) {
  background: var(--ios-topbar-bg) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  .service-hall-shell,
  .service-center-hero,
  .service-detail-card,
  .service-detail-summary,
  .service-detail-panel,
  .service-hall-card.is-priority,
  .service-hall-card.is-muted
) {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(
  .portal-icon,
  .service-hall-icon,
  .section-nav-icon,
  .mobile-nav-icon,
  .home-entry-section-icon,
  .upload-icon,
  .brand-mark
) {
  border-color: rgba(142, 180, 255, 0.18) !important;
  background: rgba(122, 167, 255, 0.14) !important;
  color: var(--primary-deep) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(
  .portal-badge,
  .portal-badge--planned,
  .status-tag,
  .grade-tag,
  .status-tag-neutral,
  .status-tag-muted,
  .report-section-badge,
  .home-entry-brand-pill
) {
  border-color: rgba(142, 180, 255, 0.18) !important;
  background: rgba(122, 167, 255, 0.13) !important;
  color: var(--primary-deep) !important;
}

html[data-theme="dark"] :where(
  .risk-disclaimer,
  .service-detail-disclaimer,
  .service-upload-footnote,
  .home-entry-hero-footnote,
  .home-page-hero-footnote,
  .report-center-footnote,
  .report-detail-footnote,
  .privacy-footnote
) {
  border-color: rgba(142, 180, 255, 0.16) !important;
  background: rgba(122, 167, 255, 0.08) !important;
  color: var(--muted) !important;
}

html[data-theme="dark"] :where(.report-empty-block h4, .empty-title) {
  color: var(--text) !important;
}

html[data-theme="dark"] :where(.report-empty-block p, .empty-text, .empty-placeholder p) {
  color: var(--muted) !important;
}

html[data-theme="dark"] :where(
  .outline-button,
  .text-button,
  .small-button,
  .portal-enter-button,
  .yp-user-link,
  .yp-logout-button,
  .yp-icon-button
) {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--primary-deep) !important;
}

html[data-theme="dark"] .pricing-plan-pro {
  border-color: color-mix(in srgb, #8078ff 54%, var(--line)) !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(134, 126, 255, 0.24), transparent 32%),
    linear-gradient(160deg, #34345f 0%, #262845 46%, #192437 100%) !important;
}

.admin-page .page-shell {
  width: 100%;
  max-width: none;
  padding: 24px;
  overflow-x: hidden;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-sidebar,
.admin-topbar,
.admin-content,
.admin-stat-card {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.admin-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: calc(100vh - 48px);
  padding: 20px;
  border-radius: 24px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.admin-brand span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--panel-soft);
  font-weight: 900;
}

.admin-menu {
  display: grid;
  gap: 8px;
}

.admin-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.admin-menu a:hover,
.admin-menu a.is-active {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--text);
}

.admin-main {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
}

.admin-topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 48px);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-topbar-actions .yp-icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  line-height: 1;
}

.admin-email {
  max-width: 280px;
  overflow: hidden;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .feedback-text:empty {
  display: none;
}

.admin-content {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-stat-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  box-shadow: none;
}

.admin-stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.admin-stat-card strong {
  font-size: 32px;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
  border: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 88%, var(--primary-soft)) 0%, var(--panel) 58%, var(--panel-soft) 100%);
}

.admin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: stretch;
}

.admin-dashboard-copy,
.admin-dashboard-ring,
.admin-visual-panel,
.admin-metric-tile {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: var(--shadow);
}

.admin-dashboard-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 28px;
  border-radius: 28px;
}

.admin-dashboard-kicker,
.admin-panel-head span,
.admin-metric-tile span {
  color: var(--muted);
  font-weight: 900;
}

.admin-dashboard-copy strong {
  color: var(--text);
  font-size: clamp(64px, 9vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
}

.admin-dashboard-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.admin-dashboard-ring {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 220px;
  border-radius: 28px;
  background:
    radial-gradient(circle closest-side, var(--panel) 66%, transparent 67%),
    conic-gradient(var(--primary) calc(var(--ring) * 1%), var(--panel-soft) 0);
}

.admin-dashboard-ring span {
  color: var(--text);
  font-size: 44px;
  font-weight: 950;
}

.admin-dashboard-ring small {
  color: var(--muted);
  font-weight: 900;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-metric-tile {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 20px;
  border-radius: 22px;
}

.admin-metric-tile strong {
  color: var(--text);
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1;
}

.admin-metric-tile small {
  color: var(--muted);
  font-weight: 800;
}

.admin-dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.admin-visual-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
}

.admin-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.admin-panel-head strong {
  color: var(--text);
  font-size: 24px;
}

.admin-progress-row {
  display: grid;
  gap: 8px;
}

.admin-progress-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.admin-progress-row strong {
  color: var(--text);
}

.admin-progress-row i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}

.admin-progress-row i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 52%, #ffffff));
  content: "";
}

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

.admin-quick-grid a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.admin-quick-grid a:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  background: var(--primary-soft);
}

.admin-toolbar,
.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-stack {
  display: grid;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-section-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-section-head h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-form.is-card-form {
  margin-bottom: 0;
}

.admin-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-field {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-field .text-input {
  width: 100%;
  min-width: 0;
}

.admin-form-submit {
  width: 100%;
  min-height: 48px;
  white-space: nowrap;
}

#admin-users-table {
  min-width: 0;
  max-width: 100%;
}

.admin-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.admin-scroll-hint {
  display: none;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-table-wrap::-webkit-scrollbar {
  height: 12px;
}

.admin-table-wrap::-webkit-scrollbar-track {
  background: var(--panel-soft);
  border-radius: 999px;
}

.admin-table-wrap::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  border: 3px solid var(--panel-soft);
  border-radius: 999px;
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.admin-table.is-compact {
  min-width: 940px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.admin-table th {
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 900;
}

.admin-table td {
  color: var(--muted);
}

.admin-table code {
  color: var(--text);
  white-space: nowrap;
}

.admin-cell-main {
  max-width: 230px;
  color: var(--text) !important;
  font-weight: 800;
}

.admin-title-cell {
  max-width: 280px;
  overflow: hidden;
  color: var(--text) !important;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-id-cell {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  white-space: nowrap;
}

.admin-id-cell code {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-id-cell-full {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.admin-id-cell-full code {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.admin-copy-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: transform var(--motion-fast) var(--ease-spring), border-color var(--motion-fast) var(--ease-spring);
}

.admin-copy-button:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--text);
  transform: translateY(-1px);
}

.admin-usage-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-usage-cell strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
}

.admin-usage-cell span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-quota-editor {
  display: grid;
  gap: 7px;
  min-width: 120px;
}

.admin-quota-editor label {
  display: inline-flex;
  align-items: center;
  width: 108px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 900;
}

.admin-quota-input {
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-weight: 900;
}

.admin-quota-editor small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-status-pill.is-verified {
  border-color: color-mix(in srgb, #34c759 34%, var(--line));
  background: color-mix(in srgb, #34c759 12%, var(--panel-soft));
  color: color-mix(in srgb, #34c759 56%, var(--text));
}

.admin-muted-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-table td .small-button {
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}

.admin-action-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.admin-users-table {
  width: max-content;
  min-width: 1840px;
  table-layout: auto;
}

.admin-users-table th,
.admin-users-table td {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

.admin-users-table th:first-child,
.admin-users-table td:first-child {
  width: 360px;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
  width: 260px;
}

.admin-users-table .admin-cell-main {
  max-width: none;
  white-space: nowrap;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
  width: 100px;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4) {
  width: 130px;
}

.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
  width: 220px;
}

.admin-users-table th:nth-child(6),
.admin-users-table td:nth-child(6),
.admin-users-table th:nth-child(9),
.admin-users-table td:nth-child(9) {
  width: 110px;
}

.admin-users-table th:nth-child(7),
.admin-users-table td:nth-child(7),
.admin-users-table th:nth-child(8),
.admin-users-table td:nth-child(8) {
  width: 150px;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child {
  width: 230px;
}

.admin-users-table .admin-inline-select {
  min-width: 112px;
}

.admin-users-table .admin-quota-editor {
  min-width: 190px;
}

.admin-users-table .admin-quota-editor label {
  width: 140px;
}

.admin-users-table .admin-quota-editor .small-button {
  width: 140px;
  justify-content: center;
}

.report-core-result {
  margin: 8px 0 14px;
  color: var(--primary);
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 900;
}

.report-stamp {
  --report-risk-color: #0f766e;
  color: var(--report-risk-color);
  border-color: color-mix(in srgb, var(--report-risk-color) 58%, transparent);
  background: color-mix(in srgb, var(--report-risk-color) 10%, transparent);
}

.report-stamp.is-low {
  --report-risk-color: #0f766e;
}

.report-stamp.is-medium {
  --report-risk-color: #d97706;
}

.report-stamp.is-high {
  --report-risk-color: #dc2626;
}

.report-stamp.is-critical {
  --report-risk-color: #b91c1c;
}

.report-stamp.is-none {
  --report-risk-color: var(--muted);
}

.report-stamp em {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  transform: rotate(12deg);
}

.report-status-card {
  width: min(240px, 100%);
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
  border-radius: 24px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 82%, transparent), color-mix(in srgb, var(--card) 96%, transparent)),
    color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: left;
}

.report-status-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.report-status-card strong {
  color: var(--text);
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
}

.report-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.report-status-card.is-none {
  border-color: color-mix(in srgb, var(--muted) 46%, transparent);
}

.report-status-card.is-low-confidence {
  border-color: color-mix(in srgb, #60a5fa 42%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, #60a5fa 9%, var(--surface)), color-mix(in srgb, var(--card) 96%, transparent)),
    var(--card);
}

.image-risk-summary {
  --image-risk-color: #64748b;
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
  min-width: 0;
  justify-self: center;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--image-risk-color) 42%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--image-risk-color) 12%, transparent), transparent 62%),
    color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: left;
}

.image-risk-summary.is-low {
  --image-risk-color: #0f766e;
}

.image-risk-summary.is-medium {
  --image-risk-color: #d97706;
}

.image-risk-summary.is-high {
  --image-risk-color: #dc2626;
}

.image-risk-summary.is-critical {
  --image-risk-color: #b91c1c;
}

.image-risk-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.image-risk-summary strong {
  color: var(--text);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.image-risk-summary em {
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--image-risk-color) 46%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--image-risk-color) 12%, transparent);
  color: color-mix(in srgb, var(--image-risk-color) 92%, var(--text));
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.image-report-card-list {
  display: grid;
  gap: 18px;
}

.image-report-card {
  --image-risk-color: #64748b;
  display: grid;
  grid-template-columns: minmax(168px, 220px) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--image-risk-color) 38%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--image-risk-color) 8%, transparent), transparent 48%),
    color-mix(in srgb, var(--card) 96%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.image-report-card.is-low {
  --image-risk-color: #0f766e;
}

.image-report-card.is-medium {
  --image-risk-color: #d97706;
}

.image-report-card.is-high {
  --image-risk-color: #dc2626;
}

.image-report-card.is-critical {
  --image-risk-color: #b91c1c;
}

.image-report-card.is-none {
  --image-risk-color: #64748b;
}

.image-report-thumb {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 68%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.image-report-thumb img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
}

.image-report-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 168px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.image-report-card-body {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.image-report-card-head {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.image-report-file {
  min-width: 0;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.image-report-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.image-risk-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--image-risk-color) 44%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--image-risk-color) 14%, transparent);
  color: var(--image-risk-color);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.image-risk-badge.is-high,
.image-risk-badge.is-critical {
  background: color-mix(in srgb, var(--image-risk-color) 12%, transparent);
  color: color-mix(in srgb, var(--image-risk-color) 92%, var(--text));
}

.image-report-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.image-report-metrics div {
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.image-report-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.image-report-metrics dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.image-report-text-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.image-report-text-block strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.image-report-text-block p,
.image-report-muted {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.image-report-reasons {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.report-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.report-disclaimer-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.report-risk-card {
  border-left: 4px solid color-mix(in srgb, var(--line-strong) 80%, transparent);
}

.report-risk-card.is-low {
  border-left-color: #0f766e;
}

.report-risk-card.is-medium {
  border-left-color: #d97706;
}

.report-risk-card.is-high {
  border-left-color: #dc2626;
}

.report-risk-card.is-none {
  border-left-color: var(--muted);
}

.status-tag.status-tag-neutral.is-low,
.report-similarity-pill.is-low,
.report-original-text.is-low {
  color: #0f766e;
  background: color-mix(in srgb, #0f766e 12%, var(--panel));
  border-color: color-mix(in srgb, #0f766e 36%, transparent);
}

.status-tag.status-tag-neutral.is-medium,
.report-similarity-pill.is-medium,
.report-original-text.is-medium {
  color: #d97706;
  background: color-mix(in srgb, #d97706 13%, var(--panel));
  border-color: color-mix(in srgb, #d97706 38%, transparent);
}

.status-tag.status-tag-neutral.is-high,
.report-similarity-pill.is-high,
.report-original-text.is-high {
  color: #dc2626;
  background: color-mix(in srgb, #dc2626 12%, var(--panel));
  border-color: color-mix(in srgb, #dc2626 38%, transparent);
}

.status-tag.status-tag-neutral.is-none {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--muted) 32%, transparent);
}

html[data-theme="dark"] .report-stamp.is-low {
  --report-risk-color: #5eead4;
}

html[data-theme="dark"] .report-stamp.is-medium {
  --report-risk-color: #fbbf24;
}

html[data-theme="dark"] .report-stamp.is-high {
  --report-risk-color: #fb7185;
}

html[data-theme="dark"] .report-stamp.is-critical {
  --report-risk-color: #f43f5e;
}

html[data-theme="dark"] .image-report-card.is-low,
html[data-theme="dark"] .image-risk-badge.is-low {
  --image-risk-color: #5eead4;
}

html[data-theme="dark"] .image-report-card.is-medium,
html[data-theme="dark"] .image-risk-badge.is-medium {
  --image-risk-color: #fbbf24;
}

html[data-theme="dark"] .image-report-card.is-high,
html[data-theme="dark"] .image-risk-badge.is-high {
  --image-risk-color: #fb7185;
}

html[data-theme="dark"] .image-report-card.is-critical,
html[data-theme="dark"] .image-risk-badge.is-critical {
  --image-risk-color: #f43f5e;
}

html[data-theme="dark"] .image-risk-summary.is-low {
  --image-risk-color: #5eead4;
}

html[data-theme="dark"] .image-risk-summary.is-medium {
  --image-risk-color: #fbbf24;
}

html[data-theme="dark"] .image-risk-summary.is-high {
  --image-risk-color: #fb7185;
}

html[data-theme="dark"] .image-risk-summary.is-critical {
  --image-risk-color: #f43f5e;
}

html[data-theme="dark"] .status-tag.status-tag-neutral.is-low,
html[data-theme="dark"] .report-similarity-pill.is-low,
html[data-theme="dark"] .report-original-text.is-low {
  color: #99f6e4 !important;
  background: rgba(20, 184, 166, 0.16) !important;
  border-color: rgba(94, 234, 212, 0.36) !important;
}

html[data-theme="dark"] .status-tag.status-tag-neutral.is-medium,
html[data-theme="dark"] .report-similarity-pill.is-medium,
html[data-theme="dark"] .report-original-text.is-medium {
  color: #fcd34d !important;
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.36) !important;
}

html[data-theme="dark"] .status-tag.status-tag-neutral.is-high,
html[data-theme="dark"] .report-similarity-pill.is-high,
html[data-theme="dark"] .report-original-text.is-high {
  color: #fda4af !important;
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: rgba(251, 113, 133, 0.38) !important;
}

.report-original-text.is-low,
.report-original-text.is-medium,
.report-original-text.is-high,
html[data-theme="dark"] .report-original-text.is-low,
html[data-theme="dark"] .report-original-text.is-medium,
html[data-theme="dark"] .report-original-text.is-high {
  background: transparent !important;
}

.admin-users-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
}

.admin-users-table th,
.admin-users-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

.admin-users-table th:first-child,
.admin-users-table td:first-child {
  width: 260px;
}

.admin-users-table .admin-cell-main {
  max-width: 220px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-users-table .admin-id-cell-full code {
  max-width: 220px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
  width: 230px;
}

.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
  width: 190px;
}

.admin-users-table th:nth-child(7),
.admin-users-table td:nth-child(7),
.admin-users-table th:nth-child(8),
.admin-users-table td:nth-child(8) {
  width: 135px;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child {
  width: 210px;
}

.admin-action-group {
  flex-wrap: wrap;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.admin-pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.admin-pagination .small-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.admin-inline-select {
  min-height: 36px;
  padding: 0 10px;
}

.admin-subtitle {
  margin: 24px 0 12px;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 13, 22, 0.48);
  backdrop-filter: blur(18px);
}

.admin-modal {
  width: min(760px, 100%);
  max-height: min(720px, 86vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

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

.admin-modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.admin-modal-head .yp-icon-button {
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 1;
}

.admin-modal pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

html[data-theme="dark"] :where(.admin-sidebar, .admin-topbar, .admin-content, .admin-stat-card, .admin-table-wrap, .admin-section-card, .admin-modal) {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .admin-content.admin-stack {
  border: 0 !important;
  background: transparent !important;
}

html[data-theme="dark"] .admin-dashboard {
  background:
    radial-gradient(circle at 10% 0%, rgba(122, 167, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #101827 0%, #172234 48%, #101722 100%) !important;
}

html[data-theme="dark"] :where(.admin-dashboard-copy, .admin-dashboard-ring, .admin-visual-panel, .admin-metric-tile) {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

html[data-theme="dark"] .admin-dashboard-ring {
  background:
    radial-gradient(circle closest-side, #172234 66%, transparent 67%),
    conic-gradient(var(--primary) calc(var(--ring) * 1%), rgba(255, 255, 255, 0.08) 0) !important;
}

html[data-theme="dark"] :where(.admin-table th) {
  background: var(--panel-soft) !important;
}

html[data-theme="dark"] :where(.admin-menu a.is-active, .admin-menu a:hover) {
  background: rgba(110, 160, 255, 0.16) !important;
}

@media (max-width: 900px) {
  .admin-page .page-shell {
    padding: max(12px, env(safe-area-inset-top)) 12px 14px;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .admin-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .admin-sidebar {
    position: static;
    gap: 14px;
    min-height: auto;
    padding: 14px;
    border-radius: 20px;
  }

  .admin-menu {
    display: flex;
    gap: 8px;
    margin: 0 -2px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
  }

  .admin-menu a {
    flex: 0 0 auto;
    min-height: 40px;
    min-width: max-content;
    padding: 0 14px;
  }

  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
    border-radius: 20px;
  }

  .admin-topbar h1 {
    font-size: clamp(30px, 11vw, 42px);
  }

  .admin-topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    justify-content: space-between;
    width: 100%;
  }

  .admin-email {
    max-width: none;
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .admin-topbar-actions .yp-icon-button {
    width: 44px;
    height: 44px;
  }

  .admin-stat-grid,
  .admin-form,
  .admin-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-dashboard {
    gap: 14px;
  }

  .admin-dashboard-hero,
  .admin-dashboard-panels {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-dashboard-copy,
  .admin-dashboard-ring,
  .admin-visual-panel,
  .admin-metric-tile {
    border-radius: 20px;
  }

  .admin-dashboard-copy {
    min-height: auto;
    padding: 22px;
  }

  .admin-dashboard-copy strong {
    font-size: clamp(56px, 20vw, 82px);
  }

  .admin-dashboard-copy p {
    font-size: 15px;
  }

  .admin-dashboard-ring {
    min-height: 180px;
  }

  .admin-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-metric-tile {
    min-height: 118px;
    padding: 16px;
  }

  .admin-metric-tile strong {
    font-size: 36px;
  }

  .admin-quick-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-panel-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-content {
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
    border-radius: 20px;
  }

  .admin-content.admin-stack {
    padding: 0;
  }

  .admin-section-card {
    padding: 14px;
    border-radius: 20px;
  }

  .admin-section-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-table-wrap {
    margin-inline: 0;
    border-radius: 16px;
  }

  .admin-scroll-hint {
    display: block;
  }

  .admin-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-pagination > div {
    width: 100%;
  }

  .admin-pagination .small-button {
    flex: 1 1 0;
  }

  .admin-table {
    min-width: 860px;
    font-size: 13px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px;
  }

  .admin-form-submit {
    min-height: 44px;
  }

  .admin-id-cell {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .admin-copy-button {
    min-height: 28px;
  }

  .admin-modal-backdrop {
    padding: 12px;
  }

  .admin-modal {
    max-height: 82vh;
    border-radius: 18px;
  }
}

@media (max-width: 430px) {
  .admin-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final mobile/dark polish: override late light-mode fragments on small screens. */
html[data-theme="dark"] :where(
  .home-page .home-entry-nav-link,
  .section-nav-link,
  body.is-service-upload-route .section-nav-link,
  .service-upload-page .section-nav-link,
  .auth-switcher .outline-button,
  .login-page .text-button,
  .pricing-plan-eyebrow,
  .pricing-plan-credit,
  .status-tag-neutral,
  .report-section-badge,
  .usage-action-primary,
  .pricing-usage-action
) {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(
  body.is-service-upload-route .text-input,
  body.is-service-upload-route textarea,
  body.is-service-upload-route select.text-input,
  body.is-service-upload-route .upload-box,
  body.is-service-upload-route .mode-item,
  body.is-service-upload-route .choice-chip,
  body.is-service-upload-route .switch-row,
  body.is-service-upload-route .consent-check,
  .service-upload-page .text-input,
  .service-upload-page textarea,
  .service-upload-page select.text-input,
  .service-upload-page .upload-box,
  .service-upload-page .mode-item,
  .service-upload-page .choice-chip,
  .service-upload-page .switch-row,
  .service-upload-page .consent-check,
  .login-page .text-input,
  .login-page .feedback-text,
  .report-metric-card,
  .report-risk-card,
  .report-empty-block,
  .empty-placeholder,
  .report-comparison-table,
  .report-comparison-row,
  .report-source-advice,
  .usage-popover,
  .pricing-usage-panel
) {
  border-color: var(--line) !important;
  background: var(--panel-soft) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(
  body.is-service-upload-route .upload-box:hover,
  .service-upload-page .upload-box:hover,
  body.is-service-upload-route .mode-item:hover,
  body.is-service-upload-route .mode-item:has(input:checked),
  body.is-service-upload-route .choice-chip:hover,
  body.is-service-upload-route .choice-chip:has(input:checked),
  body.is-service-upload-route .switch-row:hover,
  body.is-service-upload-route .switch-row:has(input:checked),
  .service-upload-page .mode-item:hover,
  .service-upload-page .mode-item:has(input:checked),
  .service-upload-page .choice-chip:hover,
  .service-upload-page .choice-chip:has(input:checked),
  .service-upload-page .switch-row:hover,
  .service-upload-page .switch-row:has(input:checked),
  .section-nav-link:hover,
  .section-nav-link.is-active
) {
  border-color: rgba(142, 180, 255, 0.34) !important;
  background: rgba(110, 160, 255, 0.14) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] :where(
  body.is-service-upload-route .choice-chip input,
  body.is-service-upload-route .switch-row input,
  .service-upload-page .choice-chip input,
  .service-upload-page .switch-row input
) {
  accent-color: #8eb4ff;
}

html[data-theme="dark"] :where(
  .usage-row small,
  .usage-note,
  .pricing-plan-note,
  .pricing-plan-tagline,
  .report-empty-block p,
  .empty-placeholder p,
  .login-page .feedback-text
) {
  color: var(--muted) !important;
}

html[data-theme="dark"] :where(.feedback-text.is-error, .login-page .feedback-text.is-error) {
  border-color: rgba(248, 113, 113, 0.42) !important;
  background: rgba(127, 29, 29, 0.28) !important;
  color: #fecaca !important;
}

@media (max-width: 768px) {
  .auth-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .auth-switcher .outline-button {
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    white-space: nowrap !important;
    font-size: 14px !important;
  }

  .login-auth-card,
  .login-intro-panel {
    border-radius: 22px !important;
  }

  .pricing-plan-card {
    gap: 14px !important;
    padding: 20px !important;
  }

  .pricing-plan-card h3 {
    max-width: 190px !important;
    font-size: clamp(30px, 9.5vw, 38px) !important;
  }

  .pricing-plan-price span {
    font-size: 22px !important;
  }

  .pricing-plan-price strong {
    font-size: clamp(50px, 15vw, 64px) !important;
  }

  .pricing-plan-tagline,
  .pricing-plan-note {
    font-size: 14px !important;
  }

  .pricing-feature-list {
    gap: 10px !important;
  }

  .pricing-feature-list li {
    font-size: 14px !important;
  }

  .usage-popover-head,
  .usage-row,
  .usage-action,
  .pricing-usage-head,
  .pricing-usage-row,
  .pricing-usage-action {
    min-height: 38px !important;
  }

  .usage-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    row-gap: 2px !important;
  }

  .usage-row small {
    grid-column: 1 / -1 !important;
    justify-self: start !important;
    text-align: left !important;
    white-space: normal !important;
  }

  .report-comparison-head {
    display: none !important;
  }

  .report-comparison-row {
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }

  .report-comparison-row > div {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .report-comparison-row > div:last-child {
    border-bottom: 0 !important;
  }

html[data-theme="dark"] .yp-mobile-tabbar {
    background: rgba(14, 22, 33, 0.82) !important;
    color: var(--text) !important;
  }
}

.yp-mobile-brand-copy {
  display: none;
}

.yp-tab-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-mobile-service-strip {
  display: none;
}

/* Reference-driven mobile app shell */
@media (max-width: 768px) {
  :root {
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --mobile-gutter: 16px;
    --mobile-topbar-height: 66px;
    --mobile-tabbar-height: 70px;
    --mobile-card-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  }

  html {
    background: #f6f8fb;
  }

  body {
    min-width: 0;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 251, 0.98) 260px),
      #f6f8fb;
    color: var(--text);
    font-size: 15px;
    padding-bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom)) !important;
  }

  html[data-theme="dark"] body {
    background:
      linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(13, 18, 27, 0.98) 260px),
      #0d121b !important;
  }

  .page-shell {
    padding: 0 var(--mobile-gutter) calc(var(--mobile-tabbar-height) + 18px + env(safe-area-inset-bottom)) !important;
  }

  .page-main {
    gap: 14px;
  }

  .section-card,
  .portal-section,
  .service-hall-shell,
  .report-center-shell,
  .report-detail-shell,
  .billing-shell,
  .pricing-shell,
  .task-card,
  .auth-card {
    width: 100%;
    max-width: 100%;
    border-radius: 22px !important;
    box-shadow: var(--mobile-card-shadow) !important;
  }

  .topbar,
  .home-entry-topbar {
    min-height: var(--mobile-topbar-height);
    margin: 0 calc(-1 * var(--mobile-gutter)) 18px !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
    background: rgba(255, 255, 255, 0.86) !important;
  }

  html[data-theme="dark"] .topbar,
  html[data-theme="dark"] .home-entry-topbar {
    background: rgba(15, 21, 31, 0.86) !important;
  }

  .topbar-brand-row,
  .home-entry-topbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: var(--mobile-topbar-height) !important;
    padding: 11px var(--mobile-gutter) !important;
  }

  .home-entry-brand {
    flex-direction: row !important;
    align-items: center !important;
    min-width: 0;
  }

  .brand-block {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    column-gap: 9px;
  }

  .brand-block .brand-mark {
    display: grid !important;
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: 0;
    place-items: center;
    border-radius: 8px;
    background: #080b12;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  }

  .brand-block .brand-mark::after {
    content: "YP";
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .brand-block > h1 {
    display: none !important;
  }

  .yp-mobile-brand-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .yp-mobile-brand-copy strong,
  .home-entry-logo-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 13px !important;
    font-weight: 900;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .yp-mobile-brand-copy small,
  .home-entry-logo-copy small {
    display: block !important;
    overflow: hidden;
    color: var(--muted) !important;
    font-size: 10px !important;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-entry-logo {
    gap: 9px;
  }

  .home-entry-logo-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }

  .yp-shell-controls {
    gap: 6px;
  }

  .yp-icon-button,
  .yp-menu-button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: color-mix(in srgb, var(--panel) 72%, transparent) !important;
    box-shadow: none !important;
    color: var(--text) !important;
    font-size: 20px !important;
  }

  .yp-shell-controls [data-theme-toggle] {
    display: inline-grid !important;
    font-size: 16px !important;
  }

  .topbar-nav,
  .home-entry-nav {
    top: calc(100% + 6px) !important;
    right: var(--mobile-gutter) !important;
    left: var(--mobile-gutter) !important;
    border-radius: 18px !important;
  }

  .topbar-nav-link,
  .home-entry-nav-link {
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }

  .yp-mobile-tabbar {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    min-height: calc(64px + env(safe-area-inset-bottom)) !important;
    padding: 6px 18px calc(5px + env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08) !important;
  }

  html[data-theme="dark"] .yp-mobile-tabbar {
    background: rgba(15, 21, 31, 0.9) !important;
    border-top-color: rgba(226, 232, 240, 0.12) !important;
  }

  .yp-mobile-tabbar a {
    min-height: 50px !important;
    gap: 2px !important;
    border-radius: 16px !important;
    color: #475569 !important;
  }

  html[data-theme="dark"] .yp-mobile-tabbar a {
    color: #aab6c7 !important;
  }

  .yp-mobile-tabbar a strong {
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  .yp-mobile-tabbar a.is-active {
    background: transparent !important;
    color: var(--primary) !important;
  }

  .yp-mobile-tabbar a:nth-child(2) .yp-tab-icon {
    width: 25px;
    height: 25px;
    padding: 6px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    stroke: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  }

  .home-page .portal-section,
  .home-page .home-page-hero {
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .home-entry-shell {
    gap: 18px;
  }

  .home-page .home-page-hero {
    align-items: start;
    gap: 16px !important;
    padding: 18px 0 8px !important;
  }

  .home-page .home-entry-hero-kicker {
    display: none;
  }

  .home-page .home-page-hero h1 {
    max-width: 9em;
    margin: 0;
    font-size: clamp(34px, 11vw, 46px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
  }

  .home-page .home-page-hero-description {
    max-width: 25em;
    margin-top: 14px !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
  }

  .home-page .home-page-hero-visual {
    position: absolute;
    top: 94px;
    right: 2px;
    width: 112px !important;
    min-height: 112px !important;
    opacity: 0.5;
    pointer-events: none;
  }

  .home-page .home-page-hero-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin-top: 18px !important;
  }

  .home-page .home-page-hero-actions a,
  #service-submit-button,
  .pricing-buy-button {
    min-height: 50px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  .home-page .home-feature-section,
  .service-hall-shell {
    padding: 18px 14px !important;
  }

  .home-page .home-feature-grid,
  .service-hall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .home-page .home-feature-card,
  .service-hall-card {
    min-height: 136px;
    padding: 13px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  .portal-icon,
  .service-hall-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
  }

  .portal-card-body strong,
  .service-hall-card-body strong {
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .portal-card-body p,
  .service-hall-card-body p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .service-hall-header,
  .section-head {
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .section-head h2,
  .service-hall-header h1,
  .service-upload-intro h2,
  .report-page-head h2,
  .billing-shell h2 {
    font-size: 21px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
  }

  .section-label {
    font-size: 12px !important;
  }

  .section-text {
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  .service-hall-card-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
    margin-top: auto;
  }

  .service-hall-card-actions .text-button {
    display: none !important;
  }

  .service-hall-card-actions .portal-enter-button {
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  .service-layout,
  .service-upload-grid,
  .workbench-grid,
  .report-summary-grid,
  .report-center-grid,
  .billing-credit-grid {
    gap: 12px !important;
  }

  .service-menu-card,
  .service-upload-card,
  .service-form-section,
  .service-submit-panel,
  .report-center-card,
  .report-center-banner,
  .report-center-empty,
  .report-detail-card,
  .billing-order-section,
  .billing-order-card {
    border-radius: 14px !important;
    box-shadow: none !important;
  }

  .service-upload-intro {
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .mode-item,
  .upload-box,
  .text-input,
  textarea,
  select,
  input {
    border-radius: 10px !important;
  }

  .upload-box {
    min-height: 150px !important;
  }

  .consent-check {
    align-items: flex-start !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
  }

  .report-card-actions,
  .billing-order-card {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .report-center-card h3,
  .report-detail-card h3 {
    font-size: 20px !important;
  }

  .report-meta-list,
  .report-document-meta {
    gap: 7px !important;
  }

  .report-stamp {
    width: 116px !important;
    height: 116px !important;
  }

  .usage-popover,
  .pricing-usage-panel {
    border-radius: 16px !important;
  }

  .yp-site-footer,
  .home-process-section,
  .home-privacy-section,
  .home-faq-section,
  .home-footer-section {
    display: none !important;
  }
}

@media (max-width: 430px) {
  .home-page .home-feature-grid,
  .service-hall-grid {
    gap: 8px !important;
  }

  .home-page .home-feature-card,
  .service-hall-card {
    min-height: 128px;
    padding: 11px !important;
  }

  .report-card-actions,
  .billing-order-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Mobile homepage repair: keep the first screen close to the reference mockup. */
@media (max-width: 768px) {
  .home-page .home-entry-hero.home-page-hero,
  html[data-theme="dark"] .home-page .home-entry-hero.home-page-hero {
    position: relative !important;
    display: grid !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px 0 8px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .home-page .home-entry-hero.home-page-hero h1 {
    max-width: 8em !important;
    font-size: 34px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
  }

  .home-page .home-entry-hero.home-page-hero h1 span {
    display: block;
  }

  .home-page .home-entry-hero.home-page-hero .home-page-hero-description {
    max-width: 19.5em !important;
    margin-top: 14px !important;
    font-size: 15px !important;
    line-height: 1.68 !important;
  }

  .home-mobile-service-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .home-mobile-service-strip a {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 5px;
    color: var(--text);
    text-align: center;
    text-decoration: none;
  }

  .home-mobile-service-strip span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-soft) 76%, var(--panel));
    color: var(--primary);
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
  }

  .home-mobile-service-strip strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-mobile-service-strip small {
    display: none;
  }

  .home-page .home-entry-hero.home-page-hero .home-page-hero-visual {
    position: absolute !important;
    top: 8px !important;
    right: 4px !important;
    display: block !important;
    width: 108px !important;
    min-height: 108px !important;
    opacity: 0.34 !important;
    filter: none !important;
    pointer-events: none !important;
  }

  .home-page .home-entry-hero.home-page-hero .home-entry-hero-card {
    right: 18px !important;
    width: 78px !important;
    height: 54px !important;
    border-radius: 16px !important;
  }

  .home-page .home-entry-hero.home-page-hero .home-entry-hero-lens {
    right: 0 !important;
    width: 78px !important;
    height: 78px !important;
  }

  .home-page .home-entry-hero.home-page-hero .home-page-hero-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-top: 12px !important;
  }

  .home-page .home-entry-hero.home-page-hero .marketing-hero-primary,
  .home-page .home-entry-hero.home-page-hero .marketing-hero-secondary {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }

  .home-page .home-entry-hero.home-page-hero .home-page-hero-footnote {
    max-width: 25em !important;
    margin-top: 16px !important;
    padding: 11px 13px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
  }

  .login-page .page-main {
    padding-top: 0 !important;
  }

  .login-shell {
    gap: 14px !important;
  }

  .login-auth-card {
    order: 1;
    gap: 14px !important;
    padding: 18px !important;
    border-radius: 18px !important;
    box-shadow: var(--mobile-card-shadow) !important;
  }

  .login-intro-panel {
    order: 2;
    gap: 12px !important;
    padding: 18px !important;
    border-radius: 18px !important;
    box-shadow: none !important;
  }

  .login-intro-panel h2 {
    max-width: 10em !important;
    font-size: 26px !important;
    line-height: 1.16 !important;
  }

  .login-intro-panel > p {
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  .login-benefit-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .login-benefit-grid article {
    min-height: 0 !important;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .login-benefit-grid article span {
    grid-row: 1 / span 2;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
  }

  .login-benefit-grid article strong {
    font-size: 14px !important;
  }

  .login-benefit-grid article p {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  .login-auth-head {
    gap: 8px !important;
  }

  .login-auth-head h2 {
    font-size: 24px !important;
  }

  .login-home-link {
    display: none !important;
  }
}

/* Mobile UI polish pass: align the inner pages with the app-like reference. */
@media (max-width: 768px) {
  :root {
    --mobile-card-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden !important;
  }

  body *,
  body *::before,
  body *::after {
    box-sizing: border-box;
  }

  .topbar,
  .home-entry-topbar {
    position: sticky !important;
    top: 0;
    z-index: 900;
    max-width: 100vw !important;
    overflow: visible;
  }

  .topbar-brand-row,
  .home-entry-topbar {
    width: 100% !important;
    max-width: 100vw !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  .topbar-nav,
  .home-entry-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .home-entry-brand,
  .brand-block {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
  }

  .yp-shell-controls {
    grid-column: 2;
    grid-row: 1;
    flex: 0 0 auto;
    min-width: 78px;
    justify-content: flex-end;
  }

  .yp-mobile-tabbar {
    right: auto !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    grid-template-columns: repeat(4, 25vw) !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    z-index: 1200 !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
  }

  .yp-network-banner {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
    padding: 12px 42px 12px 14px;
    border-radius: 13px;
  }

.yp-mobile-tabbar a {
    position: relative;
    width: 25vw !important;
    max-width: 25vw !important;
    -webkit-tap-highlight-color: transparent;
  }

  .yp-mobile-tabbar a::before {
    position: absolute;
    inset: 6px 8px;
    border-radius: 16px;
    background: transparent;
    content: "";
    transition: background 180ms ease;
  }

  .yp-mobile-tabbar a:active::before {
    background: color-mix(in srgb, var(--primary-soft) 64%, transparent);
  }

  .yp-mobile-tabbar .yp-tab-icon,
  .yp-mobile-tabbar a strong {
    position: relative;
  }

  .service-hall-shell,
  .service-upload-card,
  .report-center-shell,
  .login-auth-card,
  .login-intro-panel {
    max-width: 100% !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    background: color-mix(in srgb, var(--panel) 94%, transparent) !important;
  }

  .home-page .home-entry-hero.home-page-hero {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .home-mobile-service-strip {
    width: 100%;
    max-width: 100%;
    gap: 6px !important;
  }

  .service-hall-shell {
    padding: 16px 14px 18px !important;
  }

  .service-hall-header {
    margin: 2px 0 14px !important;
  }

  .service-hall-header-copy h1 {
    font-size: 22px !important;
  }

  .service-hall-header-copy .section-text {
    max-width: 24em;
    font-size: 13px !important;
  }

  .service-hall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .service-hall-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 132px !important;
    padding: 13px !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: color-mix(in srgb, var(--panel) 96%, transparent) !important;
  }

  .service-hall-card-top {
    margin-bottom: 9px !important;
  }

  .service-hall-card-top .portal-badge {
    display: none !important;
  }

  .service-hall-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--primary-soft) 82%, var(--panel)) !important;
    color: var(--primary) !important;
    font-size: 13px !important;
    box-shadow: none !important;
  }

  .service-hall-card-body {
    gap: 4px !important;
  }

  .service-hall-card-body strong {
    font-size: 14px !important;
  }

  .service-hall-card-body p {
    color: var(--muted) !important;
    -webkit-line-clamp: 2;
  }

  .service-hall-card-actions {
    margin-top: 10px !important;
  }

  .service-hall-card-actions .portal-enter-button {
    min-height: 32px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  .service-upload-page .section-sidebar.service-menu-panel,
  body.is-service-upload-route .section-sidebar.service-menu-panel {
    display: none !important;
  }

  .service-upload-page .service-layout,
  body.is-service-upload-route .service-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .service-upload-card {
    padding: 16px !important;
  }

  .service-upload-intro {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .service-upload-intro-copy h2 {
    font-size: 22px !important;
  }

  .service-upload-intro-copy .section-text {
    max-width: 24em;
  }

  #upload-fee {
    align-self: start;
    min-height: 28px;
    padding: 0 9px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }

  .service-form-section,
  .service-submit-panel {
    padding: 14px !important;
    border-radius: 14px !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
  }

  .service-form-section-head {
    gap: 4px !important;
    margin-bottom: 12px !important;
  }

  .service-form-section-head h3,
  .service-submit-panel h3 {
    font-size: 16px !important;
  }

  .service-form-section-head p {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  .service-form-section-body,
  .service-form-shell,
  .field-block {
    gap: 9px !important;
  }

  .field-block label,
  .mini-label,
  .option-fieldset legend {
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .text-input,
  input,
  select,
  textarea {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  textarea {
    min-height: 132px !important;
  }

  .mode-group {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent) !important;
  }

  .mode-item {
    min-height: 38px !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    font-size: 13px !important;
  }

  .mode-item:has(input:checked) {
    background: var(--panel) !important;
    color: var(--primary) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
  }

  .upload-box {
    min-height: 128px !important;
    padding: 18px 14px !important;
    border-style: dashed !important;
    border-color: color-mix(in srgb, var(--primary) 32%, var(--line)) !important;
    background: color-mix(in srgb, var(--primary-soft) 38%, var(--panel)) !important;
  }

  .upload-icon {
    display: grid;
    min-width: 42px !important;
    width: 42px !important;
    height: 42px !important;
    place-items: center;
    border-radius: 14px !important;
    background: var(--panel) !important;
    color: var(--primary) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  .upload-title {
    font-size: 15px !important;
  }

  .upload-meta {
    max-width: 24em;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  .service-submit-panel .workbench-note {
    padding: 11px 12px !important;
    border-radius: 12px !important;
  }

  .service-submit-panel .workbench-note strong {
    font-size: 13px !important;
  }

  .service-submit-panel .workbench-note p,
  .service-upload-footnote {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  .consent-check {
    padding: 11px 12px !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--panel-soft) 72%, transparent) !important;
  }

  #service-submit-button {
    min-height: 48px !important;
  }

  .login-shell {
    gap: 12px !important;
  }

  .login-auth-card {
    padding: 16px !important;
  }

  .login-intro-panel {
    display: none !important;
  }

  .login-auth-head h2 {
    font-size: 22px !important;
  }

  .auth-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100%;
    gap: 4px !important;
    padding: 4px !important;
    overflow: hidden;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent) !important;
  }

  .auth-switcher .outline-button {
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    font-size: 12px !important;
    white-space: nowrap;
  }

  .auth-switcher .outline-button.is-selected {
    background: var(--panel) !important;
    color: var(--primary) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
  }

  .auth-panel {
    gap: 10px !important;
  }

  .auth-panel .field-block {
    gap: 6px !important;
  }

  .auth-panel .primary-button,
  .apple-login-button {
    min-height: 46px !important;
    border-radius: 10px !important;
  }

  .report-center-shell {
    padding: 16px 14px !important;
  }

  .report-page-head {
    align-items: start !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .report-page-head h2 {
    font-size: 22px !important;
  }

  .report-page-head .report-card-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .report-center-banner,
  .report-center-empty {
    padding: 14px !important;
    border-radius: 14px !important;
    box-shadow: none !important;
  }

  .report-center-empty:has(+ .report-center-list-section) {
    display: none !important;
  }

  .report-center-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .report-center-card {
    padding: 13px !important;
    border-radius: 14px !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: none !important;
  }

  .report-card-topline {
    gap: 7px !important;
  }

  .report-card-body {
    gap: 8px !important;
  }

  .report-card-body h3 {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  .report-core-result {
    font-size: 13px !important;
  }

  .report-meta-list {
    gap: 6px !important;
  }

  .report-meta-list div {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .report-card-actions {
    gap: 8px !important;
  }

  .report-card-actions .small-button {
    min-height: 36px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 380px) {
  .home-page .home-entry-hero.home-page-hero h1 {
    font-size: 31px !important;
  }

  .home-page .home-entry-hero.home-page-hero .home-page-hero-description {
    font-size: 14px !important;
  }

  .service-hall-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Unified capsule navigation for top links. */
.home-entry-nav,
.topbar-nav {
  gap: 10px !important;
}

.home-entry-nav-link,
.topbar-nav-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 15px !important;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
  color: color-mix(in srgb, var(--text) 68%, var(--muted)) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04) !important;
}

.home-entry-nav-link:hover,
.topbar-nav-link:hover,
.home-entry-nav-link.is-active,
.topbar-nav-link.is-active,
.service-hall-page .home-entry-nav-link.is-active {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line)) !important;
  background: color-mix(in srgb, var(--primary-soft) 86%, var(--panel)) !important;
  color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1) !important;
}

.home-entry-nav-link:active,
.topbar-nav-link:active {
  transform: scale(0.98);
}

html[data-theme="dark"] .home-entry-nav-link,
html[data-theme="dark"] .topbar-nav-link {
  border-color: rgba(226, 232, 240, 0.12) !important;
  background: rgba(30, 41, 59, 0.7) !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .home-entry-nav-link:hover,
html[data-theme="dark"] .topbar-nav-link:hover,
html[data-theme="dark"] .home-entry-nav-link.is-active,
html[data-theme="dark"] .topbar-nav-link.is-active,
html[data-theme="dark"] .service-hall-page .home-entry-nav-link.is-active {
  border-color: rgba(96, 165, 250, 0.32) !important;
  background: rgba(37, 99, 235, 0.18) !important;
  color: #93c5fd !important;
}

@media (max-width: 768px) {
  .topbar-nav,
  .home-entry-nav {
    gap: 8px !important;
    padding: 10px !important;
  }

  .topbar-nav-link,
  .home-entry-nav-link {
    width: 100% !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
  }
}

/* Download page */
.download-shell {
  display: grid;
  gap: 30px;
}

.download-hero {
  max-width: 760px;
}

.download-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.download-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.download-card {
  min-height: 270px;
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.download-card-icon {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0;
}

.download-card h2 {
  margin: 8px 0 10px;
  font-size: 24px;
  letter-spacing: 0;
}

.download-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.download-changelog {
  display: grid;
  gap: 10px;
  max-height: 154px;
  overflow-y: auto;
  overscroll-behavior: contain;
  direction: rtl;
  padding: 14px;
  padding-left: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 56%, transparent);
  scrollbar-color: color-mix(in srgb, var(--primary) 54%, transparent) transparent;
  scrollbar-width: thin;
}

.download-changelog::-webkit-scrollbar {
  width: 6px;
}

.download-changelog::-webkit-scrollbar-track {
  background: transparent;
}

.download-changelog::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 46%, transparent);
}

.download-changelog strong {
  direction: ltr;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.download-changelog ul {
  display: grid;
  direction: ltr;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.download-changelog li {
  overflow-wrap: anywhere;
}

.download-changelog time {
  color: var(--text);
  font-weight: 750;
}

.download-note {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(0, 102, 255, 0.18);
  border-radius: 16px;
  background: rgba(0, 102, 255, 0.06);
  color: var(--muted);
}

html[data-theme="dark"] .download-card {
  background: rgba(20, 26, 38, 0.82);
}

html[data-theme="dark"] .download-changelog {
  background: rgba(13, 18, 29, 0.5);
  border-color: rgba(129, 166, 255, 0.18);
}

html[data-theme="dark"] .download-note {
  background: rgba(71, 132, 255, 0.1);
  border-color: rgba(129, 166, 255, 0.22);
}

.samples-shell {
  display: grid;
  gap: 28px;
}

.samples-hero {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.samples-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}

.samples-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.sample-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.sample-card-icon {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary);
  font-weight: 850;
}

.sample-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.28;
  letter-spacing: 0;
}

.sample-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.sample-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.samples-note {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 102, 255, 0.18);
  border-radius: 16px;
  background: rgba(0, 102, 255, 0.06);
}

.samples-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.report-section-row,
.revision-toolbar,
.compare-panel-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.revision-workspace {
  display: grid;
  gap: 18px;
}

.revision-progress {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.revision-workspace-note,
.compare-panel-tip {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

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

.revision-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.revision-item input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--primary);
}

.revision-item-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.revision-item-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.revision-item-topline em {
  margin-left: auto;
  font-style: normal;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
}

.revision-item-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.revision-item-title,
.revision-item-detail,
.revision-item-suggestion {
  overflow-wrap: anywhere;
}

.revision-item-detail,
.revision-item-suggestion {
  color: var(--muted);
  line-height: 1.65;
}

.revision-item.is-done {
  opacity: 0.68;
}

.revision-item.is-done .revision-item-title {
  text-decoration: line-through;
}

.revision-item.is-done .revision-item-status {
  border-color: rgba(28, 160, 98, 0.25);
  background: rgba(28, 160, 98, 0.08);
  color: #15803d;
}

.report-compare-panel {
  display: grid;
  gap: 18px;
}

.report-comparison-stack {
  display: grid;
  gap: 14px;
}

.report-comparison-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
}

.report-comparison-overview div {
  display: grid;
  gap: 3px;
}

.report-comparison-overview span,
.report-comparison-overview p,
.related-report-item small {
  color: var(--muted);
}

.report-comparison-overview strong {
  color: var(--heading);
  font-size: 20px;
}

.report-comparison-overview p {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.6;
}

.compare-panel-grid > div {
  flex: 1 1 260px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.compare-panel-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.related-report-list {
  display: grid;
  gap: 10px;
}

.related-report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  text-decoration: none;
}

.related-report-item span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.related-report-item strong {
  overflow: hidden;
  color: var(--heading);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-report-item b {
  color: var(--heading);
  font-size: 18px;
}

.related-report-item.is-down b,
.related-report-item.is-down small:last-child {
  color: #15803d;
}

.related-report-item.is-up b,
.related-report-item.is-up small:last-child {
  color: #c2410c;
}

html[data-theme="dark"] .sample-card,
html[data-theme="dark"] .revision-item,
html[data-theme="dark"] .compare-panel-grid > div,
html[data-theme="dark"] .report-comparison-overview,
html[data-theme="dark"] .related-report-item {
  border-color: rgba(129, 166, 255, 0.18);
  background: rgba(13, 18, 29, 0.5);
}

@media (max-width: 960px) {
  .samples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .samples-grid {
    grid-template-columns: 1fr;
  }

  .sample-card {
    min-height: 0;
  }

  .report-comparison-overview {
    grid-template-columns: 1fr;
  }

  .related-report-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

.yp-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity var(--motion-mid) var(--ease-apple);
}

.yp-install-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.yp-install-dialog {
  position: relative;
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  transform: translateY(18px) scale(0.98);
  transition: transform var(--motion-slow) var(--ease-apple);
}

.yp-install-overlay.is-visible .yp-install-dialog {
  transform: translateY(0) scale(1);
}

.yp-install-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.yp-install-dialog h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.yp-install-dialog p,
.yp-install-dialog li,
.yp-install-tip {
  color: var(--muted);
  line-height: 1.68;
}

.yp-install-dialog ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.yp-install-dialog li::marker {
  color: var(--primary);
  font-weight: 850;
}

.yp-install-tip {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  font-size: 14px;
}

.yp-install-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

html[data-theme="dark"] .yp-install-overlay {
  background: rgba(2, 6, 23, 0.56);
}

html[data-theme="dark"] .yp-install-dialog {
  background: rgba(20, 26, 38, 0.96);
  border-color: rgba(129, 166, 255, 0.22);
}

@media (max-width: 760px) {
  .download-shell {
    gap: 22px;
  }

  .download-card-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    min-height: 240px;
    padding: 20px;
    border-radius: 16px;
  }
}

@media (max-width: 1040px) and (min-width: 761px) {
  .download-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Desktop/mobile UI stability pass: compact chrome, clearer checkout, safer mobile titles. */
@media (min-width: 769px) {
  .brand-mark {
    display: inline-grid !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    place-items: center !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--text) 88%, transparent) !important;
    color: var(--panel) !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
  }

  html[data-theme="dark"] .brand-mark {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #dbeafe !important;
  }

  .brand-block {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .brand-block h1 {
    grid-column: 2;
    font-size: clamp(25px, 2.4vw, 36px) !important;
    line-height: 1.06 !important;
  }

  .brand-block .yp-mobile-brand-copy {
    display: none !important;
  }

  .home-entry-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0;
  }

  .home-entry-brand .yp-mobile-brand-copy {
    display: grid !important;
    min-width: 0;
    gap: 2px;
  }

  .home-entry-brand .yp-mobile-brand-copy strong {
    color: var(--text);
    font-size: 17px;
    font-weight: 950;
    line-height: 1.05;
  }

  .home-entry-brand .yp-mobile-brand-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
  }

  .topbar,
  .home-entry-topbar {
    padding: 18px 24px !important;
  }

  .topbar-nav,
  .home-entry-nav {
    align-items: center !important;
    gap: 8px !important;
  }

  .topbar-nav-link,
  .home-entry-nav-link,
  .yp-user-link,
  .yp-logout-button {
    min-height: 34px !important;
    padding: 0 13px !important;
    font-size: 14px !important;
  }

  .yp-user-nav {
    gap: 8px !important;
  }

  .service-hall-page .home-entry-topbar {
    width: min(100%, 1440px) !important;
    margin: 0 auto 22px !important;
  }

  .service-hall-page .service-hall-shell {
    width: min(100%, 1440px) !important;
    margin: 0 auto !important;
    gap: 40px !important;
    padding: 56px 52px !important;
  }

  .service-hall-header-copy {
    max-width: 960px !important;
  }

  .service-hall-header-copy h1 {
    font-size: clamp(46px, 4.6vw, 72px) !important;
    line-height: 1.04 !important;
  }

  .service-hall-header-copy .section-text {
    max-width: 760px !important;
    font-size: clamp(17px, 1.25vw, 20px) !important;
  }

  .service-hall-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
    gap: 20px !important;
  }

  .service-hall-card {
    min-height: 270px !important;
    padding: 26px !important;
  }

  .checkout-page .checkout-shell {
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 560px) !important;
    align-items: start !important;
    gap: 40px !important;
    padding: clamp(34px, 4vw, 58px) !important;
  }

  .checkout-page .checkout-shell > .section-head {
    display: grid !important;
    align-content: start !important;
    justify-items: start !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .checkout-page .checkout-shell > .section-head h2 {
    max-width: 8em;
    font-size: clamp(42px, 5.2vw, 74px) !important;
    line-height: 1.02 !important;
  }

  .checkout-page .checkout-shell > .risk-disclaimer {
    max-width: 520px;
    margin: 0 !important;
    align-self: start;
  }

  .checkout-page .checkout-summary {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: 100%;
    max-width: none;
    padding: 28px !important;
  }
}

@media (max-width: 768px) {
  .download-hero h1 {
    max-width: 10em;
    font-size: clamp(32px, 9vw, 38px) !important;
    line-height: 1.08 !important;
  }

  .download-hero .section-text {
    font-size: 14px !important;
    line-height: 1.68 !important;
  }

  .download-card {
    gap: 16px !important;
  }

  .download-changelog {
    max-height: 150px;
  }

  .checkout-page .checkout-shell {
    gap: 14px !important;
    padding: 18px 16px !important;
  }

  .checkout-page .checkout-shell > .section-head {
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
  }

  .checkout-page .checkout-shell > .section-head h2 {
    font-size: 32px !important;
    line-height: 1.08 !important;
  }

  .checkout-page .checkout-summary {
    gap: 14px !important;
    padding: 18px !important;
    border-radius: 18px !important;
  }

  .checkout-page .report-meta-list div {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }
}

/* iOS mobile layout guardrails. Keep this block late so it wins over older mobile passes. */
@media (max-width: 768px) {
  html {
    min-width: 0 !important;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden !important;
  }

  body {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100svh;
    overflow-x: hidden !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    -webkit-font-smoothing: antialiased;
  }

  @supports (min-height: 100dvh) {
    body {
      min-height: 100dvh;
    }
  }

  body,
  .page-shell,
  .page-main,
  .section-card,
  .portal-section,
  .service-hall-shell,
  .service-upload-card,
  .report-center-shell,
  .report-detail-shell,
  .report-document,
  .report-document-card,
  .download-shell,
  .download-card {
    max-width: 100% !important;
  }

  .page-shell {
    overflow-x: clip !important;
    padding-right: max(var(--mobile-gutter, 16px), env(safe-area-inset-right, 0px)) !important;
    padding-left: max(var(--mobile-gutter, 16px), env(safe-area-inset-left, 0px)) !important;
  }

  .topbar,
  .home-entry-topbar {
    top: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin-right: calc(-1 * max(var(--mobile-gutter, 16px), env(safe-area-inset-right, 0px))) !important;
    margin-left: calc(-1 * max(var(--mobile-gutter, 16px), env(safe-area-inset-left, 0px))) !important;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
  }

  .topbar-brand-row,
  .home-entry-topbar {
    min-width: 0 !important;
    gap: 8px !important;
    padding-right: max(var(--mobile-gutter, 16px), env(safe-area-inset-right, 0px)) !important;
    padding-left: max(var(--mobile-gutter, 16px), env(safe-area-inset-left, 0px)) !important;
  }

  .yp-mobile-back {
    display: grid !important;
  }

  body.is-home-route .yp-mobile-back {
    display: none !important;
  }

  body.has-mobile-back .topbar-brand-row,
  body.has-mobile-back .home-entry-topbar {
    padding-left: calc(max(var(--mobile-gutter, 16px), env(safe-area-inset-left, 0px)) + 48px) !important;
  }

  .brand-block,
  .home-entry-brand,
  .home-entry-logo,
  .yp-mobile-brand-copy,
  .home-entry-logo-copy {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .yp-shell-controls {
    min-width: 74px !important;
  }

  .topbar-nav,
  .home-entry-nav {
    right: max(var(--mobile-gutter, 16px), env(safe-area-inset-right, 0px)) !important;
    left: max(var(--mobile-gutter, 16px), env(safe-area-inset-left, 0px)) !important;
    max-width: none !important;
  }

  .yp-mobile-tabbar {
    padding-right: env(safe-area-inset-right, 0px) !important;
    padding-left: env(safe-area-inset-left, 0px) !important;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }

  .yp-mobile-tabbar a {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .text-input,
  input,
  select,
  textarea {
    max-width: 100% !important;
    font-size: 16px !important;
  }

  img,
  svg,
  video,
  canvas {
    max-width: 100%;
  }

  pre,
  code,
  .report-document-meta dd,
  .report-result-list dd,
  .report-card-body h3,
  .image-report-file,
  .download-changelog li {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .report-screen-actions,
  .report-bottom-actions,
  .report-card-actions,
  .download-card .primary-button,
  .download-card .outline-button {
    width: 100% !important;
  }

  .report-screen-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .report-summary-grid,
  .report-summary-result,
  .report-stat-strip,
  .report-document-meta,
  .report-result-list,
  .image-report-metrics,
  .image-report-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .report-summary-result {
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  .image-risk-summary {
    min-width: 0 !important;
    width: 100% !important;
    justify-items: start !important;
    padding: 18px !important;
  }

  .image-risk-summary strong {
    font-size: clamp(30px, 14vw, 44px) !important;
  }

  .image-report-thumb,
  .image-report-placeholder {
    min-height: 180px !important;
  }

  .home-entry-brand > .brand-mark {
    display: grid !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    margin: 0 !important;
    place-items: center !important;
    border-radius: 9px !important;
    background: #111827 !important;
    color: #dbeafe !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
  }

  .home-entry-brand > .yp-mobile-brand-copy {
    display: grid !important;
    min-width: 0 !important;
    gap: 1px !important;
  }

  .home-entry-brand > .yp-mobile-brand-copy strong {
    color: var(--text) !important;
    font-size: 13px !important;
    line-height: 1.08 !important;
  }

  .home-entry-brand > .yp-mobile-brand-copy small {
    color: var(--muted) !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .download-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .yp-install-overlay {
    align-items: end;
    padding: 12px max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }

  .yp-install-dialog {
    max-height: min(78vh, 620px);
    overflow-y: auto;
    border-radius: 22px;
    padding: 22px 18px;
  }
}

@media (max-width: 390px) {
  .yp-shell-controls {
    min-width: 70px !important;
    gap: 3px !important;
  }

  .yp-icon-button,
  .yp-menu-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .report-document-card,
  .service-upload-card,
  .report-center-shell,
  .download-card {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }
}

.checkout-manual-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
}

.checkout-manual-panel strong {
  color: var(--text);
}

.checkout-manual-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.checkout-manual-panel.is-ready {
  border-color: color-mix(in srgb, #22c55e 34%, var(--line));
  background: color-mix(in srgb, #22c55e 8%, var(--panel));
}

.checkout-order-token,
.checkout-code-row code,
.billing-order-code {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  overflow-wrap: anywhere;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.checkout-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-order-code {
  font-size: 0.78rem;
}
