/* Réplica visual de LegalScreen (Material 3 / Flutter web) */
:root {
  --scaffold: #fafafa;
  --surface: #ffffff;
  --on-surface: #1c1b1f;
  --on-surface-variant: #49454f;
  --primary: #1976d2;
  --outline: #79747e;
  --appbar: #1976d2;
  --appbar-on: #ffffff;
  --body-size: 14px;
  --body-height: 1.5;
  --pad: 16px;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  font-size: var(--body-size);
  line-height: var(--body-height);
  color: var(--on-surface);
  background: var(--scaffold);
}

a {
  color: var(--primary);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 0 4px 0 8px;
  background: var(--appbar);
  color: var(--appbar-on);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.app-bar__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
}

.app-bar__back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.app-bar__back[hidden] {
  display: none;
}

.app-bar__title {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-bar__logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.safe-area {
  flex: 1;
  padding: var(--pad);
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.view[hidden] {
  display: none !important;
}

.legal-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 12px;
  margin-top: 8px;
}

.legal-card__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.legal-card__hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--on-surface-variant);
  line-height: 1.45;
}

.lang-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lang-row__label {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--outline);
  border-radius: 8px;
  overflow: hidden;
}

.lang-toggle button {
  border: none;
  background: var(--surface);
  color: var(--on-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: rgba(25, 118, 210, 0.12);
  color: var(--primary);
}

.lang-toggle button + button {
  border-left: 1px solid var(--outline);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.btn-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.btn-outlined:hover {
  background: rgba(25, 118, 210, 0.06);
}

.hub-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--on-surface-variant);
}

.hub-footer a {
  font-weight: 600;
}

.legal-body {
  margin: 0;
  font-size: var(--body-size);
  line-height: var(--body-height);
  white-space: pre-wrap;
  word-wrap: break-word;
  user-select: text;
  -webkit-user-select: text;
}

@media (prefers-reduced-motion: reduce) {
  .btn-outlined,
  .app-bar__back,
  .lang-toggle button {
    transition: none;
  }
}
