/* Globe — earthquake mechanism explanation overlay + paywall.
   Shares the site palette: paper #f1eee8, surface #fbfaf7, ink #2c2a27,
   quake #cf4f2e, tsunami #266e96, muted #8c887f. */

.ex-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(28, 26, 24, 0.46);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 16px; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.ex-overlay.show { opacity: 1; pointer-events: auto; }

.ex-panel {
  position: relative; width: 100%; max-width: 540px;
  background: #f1eee8; color: #2c2a27;
  border: 1px solid rgba(44, 42, 39, 0.16);
  box-shadow: 0 30px 80px -28px rgba(28, 26, 24, 0.6);
  padding: 26px 30px 30px;
  font-family: 'Helvetica Neue', 'Noto Sans', 'Noto Sans JP', 'Noto Sans SC', 'Noto Sans Devanagari', 'Noto Sans Arabic', system-ui, sans-serif;
  transform: translateY(8px); transition: transform .22s ease;
}
.ex-overlay.show .ex-panel { transform: translateY(0); }

.ex-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px;
  border: none; background: none; cursor: pointer; color: #8c887f;
  font-size: 22px; line-height: 1; padding: 0; border-radius: 50%;
}
.ex-close:hover { color: #2c2a27; background: rgba(44, 42, 39, 0.07); }
[dir="rtl"] .ex-close { right: auto; left: 14px; }

/* --- header --- */
.ex-eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; color: #8c887f; margin-bottom: 16px;
}
.ex-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #cf4f2e; flex: none; }

.ex-head { display: flex; align-items: baseline; gap: 12px; }
.ex-mag {
  font-size: 46px; font-weight: 700; line-height: 0.9; color: #cf4f2e;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.ex-mag .u { font-size: inherit; font-weight: 700; }
.ex-place { font-size: 17px; font-weight: 500; line-height: 1.25; text-wrap: balance; }
.ex-rule { border-top: 2px solid #2c2a27; margin: 16px 0 18px; }

/* --- meta grid --- */
.ex-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; margin-bottom: 20px; }
.ex-meta .k { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #8c887f; margin-bottom: 3px; }
.ex-meta .v { font-size: 18px; font-weight: 600; color: #2c2a27; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* --- fault block --- */
.ex-fault {
  background: #fbfaf7; border: 1px solid rgba(44, 42, 39, 0.16);
  padding: 16px 16px 14px; margin-bottom: 22px;
}
.ex-fault .diagram { width: 100%; margin-bottom: 12px; }
.ex-fault .diagram svg { display: block; width: 100%; height: auto; }
.ex-fault .fault-name { border-top: 1px solid rgba(44, 42, 39, 0.12); padding-top: 12px; }
.ex-fault .ftag { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #8c887f; font-weight: 600; margin-bottom: 5px; }
.ex-fault .fname { display: block; font-size: 21px; font-weight: 700; line-height: 1.05; }
.ex-fault .fname .reg { display: block; font-size: 15px; font-weight: 500; color: #8c887f; margin-top: 2px; }

/* --- sections --- */
.ex-sections { display: grid; gap: 18px; }
.ex-sec { display: flex; gap: 15px; }
.ex-sec .n { font-size: 13px; color: #cf4f2e; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; padding-top: 2px; min-width: 18px; }
.ex-sec .body { flex: 1; }
.ex-sec .label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #2c2a27; font-weight: 600; margin-bottom: 6px; }
.ex-sec .en { font-size: 15px; line-height: 1.45; color: #2c2a27; text-wrap: pretty; }
.ex-sec .reg { font-size: 14.5px; line-height: 1.55; color: rgba(44, 42, 39, 0.62); margin-top: 5px; text-wrap: pretty; }

/* --- tsunami --- */
.ex-tsu-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #2c2a27; font-weight: 600; margin: 22px 0 8px; }
.ex-tsunami {
  padding: 15px 17px; background: var(--trbg, rgba(38,110,150,0.08));
  border: 1px solid var(--trc, #266e96);
}
.ex-tsunami .tsu-head { display: flex; align-items: center; gap: 10px; }
.ex-tsunami .tsu-icon { width: 24px; height: 24px; color: var(--trc, #266e96); flex: none; }
.ex-tsunami .tsu-icon svg { width: 100%; height: 100%; }
.ex-tsunami .tsu-label { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; color: var(--trc, #266e96); }
.ex-tsunami .tsu-body { margin-top: 9px; padding-inline-start: 34px; }
.ex-tsunami .tsu-body .en { font-size: 14.5px; line-height: 1.5; color: #2c2a27; text-wrap: pretty; }
.ex-tsunami .tsu-body .reg { font-size: 14px; line-height: 1.55; color: rgba(44, 42, 39, 0.6); margin-top: 5px; text-wrap: pretty; }
[dir="rtl"] .ex-tsunami .tsu-body { padding-inline-start: 34px; }

/* --- disclaimer --- */
.ex-disc { border-top: 1px solid rgba(44, 42, 39, 0.16); padding-top: 14px; margin-top: 22px; }
.ex-disc .label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #8c887f; font-weight: 600; margin-bottom: 6px; }
.ex-disc .t { font-size: 12px; line-height: 1.45; color: #8c887f; }
.ex-disc .reg { margin-top: 4px; }

/* --- states --- */
.ex-loading { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 50px 0 46px; text-align: center; }
.ex-spinner { width: 30px; height: 30px; border: 2.5px solid rgba(44, 42, 39, 0.16); border-top-color: #cf4f2e; border-radius: 50%; animation: ex-spin 0.8s linear infinite; }
@keyframes ex-spin { to { transform: rotate(360deg); } }
.ex-loading .msg { font-size: 13.5px; color: #8c887f; letter-spacing: 0.02em; }
.ex-loading .sub { font-size: 11.5px; color: #aaa49a; }

.ex-error { padding: 36px 6px; text-align: center; }
.ex-error .t { font-size: 14px; color: #cf4f2e; line-height: 1.5; margin-bottom: 16px; text-wrap: pretty; }
.ex-retry { font-size: 13px; font-weight: 600; padding: 8px 18px; border: 1px solid #2c2a27; background: none; color: #2c2a27; cursor: pointer; font-family: inherit; }
.ex-retry:hover { background: #2c2a27; color: #f1eee8; }

/* --- paywall --- */
.ex-pay { padding: 14px 4px 6px; text-align: center; }
.ex-pay .lock { width: 46px; height: 46px; margin: 0 auto 18px; color: #cf4f2e; }
.ex-pay .lock svg { width: 100%; height: 100%; }
.ex-pay h3 { font-size: 21px; font-weight: 700; margin: 0 0 10px; line-height: 1.2; text-wrap: balance; }
.ex-pay p { font-size: 14px; line-height: 1.55; color: #6f6b63; margin: 0 auto 22px; max-width: 380px; text-wrap: pretty; }
.ex-pay .price { font-size: 15px; font-weight: 600; color: inherit; white-space: nowrap; }
.ex-pay-features { list-style: none; padding: 0; margin: 0 auto 24px; max-width: 320px; text-align: start; display: grid; gap: 10px; }
.ex-pay-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; color: #2c2a27; }
.ex-pay-features li svg { width: 16px; height: 16px; flex: none; color: #cf4f2e; margin-top: 1px; }
.ex-unlock {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-size: 15px; font-weight: 600; padding: 12px 26px; border: none;
  background: #2c2a27; color: #f1eee8; cursor: pointer; font-family: inherit;
  white-space: nowrap; max-width: 100%;
}
.ex-unlock:hover { background: #cf4f2e; }
.ex-unlock svg { width: 16px; height: 16px; }
.ex-pay .fine { font-size: 11.5px; color: #aaa49a; margin-top: 14px; }
.ex-pay .quota { font-size: 12px; color: #8c887f; margin-bottom: 18px; }

/* paid badge in header */
.ex-badge {
  font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700;
  color: #cf4f2e; border: 1px solid rgba(207, 79, 46, 0.5); border-radius: 999px;
  padding: 2px 8px; margin-inline-start: auto;
}

/* card explain button */
.ex-trigger {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  color: #f1eee8; background: #2c2a27; border: 1px solid #2c2a27; border-radius: 999px;
  padding: 5px 12px; cursor: pointer; font-family: inherit; line-height: 1;
}
.ex-trigger:hover { background: #cf4f2e; border-color: #cf4f2e; }
.ex-trigger svg { width: 12px; height: 12px; display: block; }
.ex-trigger .lk { display: none; }
.ex-trigger.locked .lk { display: block; }

@media (max-width: 560px) {
  .ex-panel { padding: 22px 20px 26px; }
  .ex-fault { flex-direction: column; align-items: stretch; }
  .ex-fault .diagram { flex: none; }
  .ex-mag { font-size: 40px; }
}
