/* ============ legal.css — /terms y /privacy (worker/legal.js) ============
 * Como en web-game-2: casi todo es un documento limpio que se lee bien; el aire
 * del juego sólo en la barra de arriba (cuero), el marco de bronce del papel,
 * el fondo de la mazmorra muy oscurecido, los títulos en Bona Nova y los
 * números de los apartados en medallones. El texto, en letra normal del sistema.
 */
@font-face { font-family: 'BonaNova'; src: url('../assets/fonts/BonaNovaSC-Regular.ttf') format('truetype'); font-weight: 400 550; font-display: swap; }
@font-face { font-family: 'BonaNova'; src: url('../assets/fonts/BonaNovaSC-Bold.ttf') format('truetype'); font-weight: 551 900; font-display: swap; }

:root {
  --gold: #e8c47a; --gold-dim: #b08a4a; --ink: #2f2214; --ink-soft: #6b4f2c;
  --paper1: #f3e6c8; --paper2: #e6d2a6; --leather: #2a1d12;
}
* { box-sizing: border-box; margin: 0; }
html { background: #0b0907; }
body {
  min-height: 100vh;
  padding-bottom: 40px;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  /* La mazmorra del juego, oscurecida: se sabe dónde se está y no molesta al leer. */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(11, 9, 7, .78), rgba(11, 9, 7, .93) 70%),
    url('../assets/ui/bg.jpg') center / cover fixed no-repeat,
    #0b0907;
}

/* ── barra de arriba: cuero con borde de bronce ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 58px; padding: 0 18px;
  background: linear-gradient(180deg, rgba(14, 11, 8, .35), rgba(8, 6, 5, .8)), url('../assets/ui/leather.jpg') center / cover;
  border-bottom: 2px solid #6e4e26;
  box-shadow: 0 1px 0 #000, 0 8px 24px rgba(0, 0, 0, .5);
}
.brand {
  font-family: 'BonaNova', Georgia, serif; font-weight: 700; font-size: 21px; letter-spacing: 1.5px;
  color: var(--gold); text-decoration: none;
  text-shadow: 0 2px 0 #3b2a12, 0 3px 6px #000;
}
.back { color: #d9c7a0; font-size: 14px; font-weight: 600; text-decoration: none; text-shadow: 1px 1px 1px #000; }
.back:hover { color: var(--gold); }

/* ── el papel: pergamino con marco de bronce ── */
.paper {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 50px 60px 56px;
  background:
    radial-gradient(ellipse at center, transparent 60%, rgba(120, 80, 30, .14)),
    linear-gradient(180deg, var(--paper1), var(--paper2));
  border: 10px solid #5a3d1e;
  outline: 2px solid var(--gold-dim);
  outline-offset: -6px;
  box-shadow: 0 0 0 1px #000, 0 24px 70px rgba(0, 0, 0, .7), inset 0 0 50px rgba(110, 70, 25, .18);
  font-size: 16px;
  line-height: 1.85;
}
@media (max-width: 560px) {
  .topbar { padding: 0 12px; }
  .brand { font-size: 18px; }
  .paper { width: calc(100% - 16px); margin-top: 16px; padding: 30px 18px 36px; border-width: 7px; }
}

/* ── cabecera ── */
.head { text-align: center; margin-bottom: 26px; }
.head .game { font-family: 'BonaNova', Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: .3em; color: #8a6532; }
.head h1 {
  margin-top: 8px;
  font-family: 'BonaNova', Georgia, serif; font-size: 34px; font-weight: 700; letter-spacing: .04em; line-height: 1.25;
  color: #3a2410;
}
:lang(zh) .head h1, :lang(ja) .head h1, :lang(ko) .head h1 { font-family: inherit; font-weight: 900; letter-spacing: .12em; }
.head .sub { margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: .32em; color: #8a6532; }
.rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px auto 0; width: min(280px, 70%); color: #9a6f33; }
.rule i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #9a6f33, transparent); }

/* ── fecha, proveedor y correo ── */
.meta {
  margin: 24px 0 6px; padding: 12px 18px;
  background: rgba(90, 60, 25, .08);
  border: 1px solid rgba(90, 60, 25, .22);
  font-size: 14px;
}
.meta div { display: flex; gap: 14px; padding: 2px 0; }
.meta dt { flex: 0 0 8em; color: var(--ink-soft); font-weight: 700; }
.meta dd { min-width: 0; word-break: break-word; }

/* ── apartados ── */
h2 {
  display: flex; align-items: center; gap: 12px;
  margin: 40px 0 14px;
  font-size: 20px; font-weight: 800; color: #3a2410;
}
h2 .num {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a321b, var(--leather));
  border: 2px solid var(--gold-dim);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25), 0 2px 4px rgba(0, 0, 0, .35);
  color: var(--gold); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
}
p { margin: 12px 0; }
ol { margin: 10px 0; padding-left: 24px; }
li { margin: 8px 0; }
li::marker { color: #8a6532; font-weight: 700; }
a { color: #7a4a12; font-weight: 700; }
a:hover { color: #a5620f; }
b { color: #2a180a; }

/* ── pie: el otro documento ── */
.foot {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px solid rgba(90, 60, 25, .25);
  text-align: center; font-size: 14px; color: var(--ink-soft);
}

/* ── idiomas, debajo del papel ── */
.langs {
  width: min(900px, calc(100% - 32px)); margin: 22px auto 0;
  text-align: center; font-size: 13px; line-height: 2; color: #8f7f63;
}
.langs a { color: #c9b68f; font-weight: 500; text-decoration: none; }
.langs a:hover { color: var(--gold); }
.langs b { color: var(--gold); font-weight: 700; }
.langs .sep { margin: 0 8px; opacity: .5; }
