body:not([data-route="cases"]) .legal-footer,
body[data-case-view="detail"] .legal-footer { display: none; }

.legal-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 24px 14px 0;
  padding-top: 12px;
  border-top: 1px solid #70482f66;
  font-size: 12px;
  text-align: center;
}

.legal-footer a {
  color: #efc39b;
  line-height: 1.5;
  text-underline-offset: 3px;
}

.legal-footer a { padding: 8px 0; }
.legal-text-button { border: 0; background: none; color: #efc39b; padding: 8px 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.legal-gate textarea { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #815035; border-radius: 12px; background: #21150e; color: #fff0e1; font: inherit; resize: vertical; }
.legal-gate [data-feedback-close] { margin-top: 8px; }

.legal-gate {
  width: min(calc(100% - 24px), 450px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: clamp(16px, 5vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #815035;
  border-radius: 24px;
  background: linear-gradient(145deg, #372216, #1c1310);
  box-shadow: 0 18px 64px #0009;
  color: #fff0e1;
}

.legal-gate::backdrop { background: #120a06e8; }
.legal-gate h1 { margin: 8px 0; font-size: clamp(21px, 6vw, 28px); }
.legal-gate p { margin: 0 0 14px; line-height: 1.45; color: #e1bc9f; }
.payment-terms { margin: 0; border: 0; padding: 4px 0; font-size: 13px; }
.payment-terms[hidden] { display: none; }
.payment-terms label { display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; }
.payment-terms input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: #ff9147; }
.legal-submit { min-height: 44px; width: 100%; margin-top: 12px; border: 1px solid #ffc17e; border-radius: 14px; background: linear-gradient(95deg, #ffb667, #ff7644); color: #2b140b; font: inherit; font-weight: 700; cursor: pointer; }
.legal-submit:disabled { opacity: .55; cursor: default; }
.legal-gate [role="status"] { margin: 10px 0 0; color: #ffd3ab; font-size: 13px; }
.legal-gate [role="status"]:empty { display: none; }

.legal-page { margin: 0; padding: 0; background: #1c1310; color: #fff0e1; font: 16px/1.65 system-ui, sans-serif; }
.legal-page main { min-height: auto; max-width: 760px; padding: 28px 20px 52px; margin: auto; }
.legal-page h1, .legal-page h2 { line-height: 1.25; }
.legal-page h1 { margin: 22px 0 8px; font-size: clamp(24px, 6vw, 38px); }
.legal-page h2 { margin: 28px 0 8px; font-size: 20px; }
.legal-page p, .legal-page ul, .legal-page dl { margin: 0 0 14px; }
.legal-page li { margin-bottom: 6px; }
.legal-page dt { font-weight: 700; }
.legal-page dd { margin: 0 0 12px; }
.legal-page a { color: #ffc08e; overflow-wrap: anywhere; text-underline-offset: 3px; }
.legal-page .legal-revision { color: #d7ac88; }
