:root {
  --bg: #05070d;
  --ink: #e8eef8;
  --muted: #9aa8bd;
  --glass: rgba(8, 12, 22, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --green: #3dd68c;
  --yellow: #f0c45a;
  --red: #ff4d4d;
  --cyan: #7ec8ff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
html { color-scheme: dark; }
body {
  font-family: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.01em;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 8px; z-index: 40; background: #000; padding: 8px; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: calc(10px + var(--safe-top)) 18px 10px;
  padding-left: calc(18px + var(--safe-left));
  padding-right: calc(18px + var(--safe-right));
  background: linear-gradient(180deg, rgba(5,7,13,.92), rgba(5,7,13,.35) 70%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #7ec8ff, #16324d 42%, #071018 70%),
    radial-gradient(circle at 72% 28%, #ff4d4d, transparent 40%);
  box-shadow: 0 0 16px rgba(62, 214, 140, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 14px; margin-left: auto; font-size: 13px; }
.nav a { color: var(--muted); }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); text-decoration: none; }
.top-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sound-btn, .lang summary, .cookie button, .btn {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 12px;
}
.sound-btn.is-on { border-color: rgba(126,200,255,.45); color: var(--cyan); }
#globe.is-explore { cursor: grab; }
#globe.is-explore:active { cursor: grabbing; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; }
.lang summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 220px; max-height: 60vh; overflow: auto;
  background: #0c1220; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 2px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink); }
.lang-menu a[aria-current="true"], .lang-menu a:hover { background: rgba(126,200,255,.12); text-decoration: none; }

.is-live { overflow: hidden; height: 100dvh; }
.is-live .top { position: absolute; width: 100%; background: linear-gradient(180deg, rgba(5,7,13,.75), transparent); }
.stage { position: relative; height: 100dvh; overflow: hidden; }
#globe { display: block; width: 100%; height: 100%; cursor: pointer; }
.vignette {
  pointer-events: none; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(5,7,13,.55) 100%);
}
.feed {
  position: absolute; top: 72px; left: calc(16px + var(--safe-left)); bottom: 72px;
  width: min(360px, calc(100vw - 32px));
  z-index: 6;
  background: var(--glass); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(18px); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
[dir="rtl"] .feed { left: auto; right: calc(16px + var(--safe-right)); }
.feed-head { padding: 18px 18px 8px; }
.kicker { margin: 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.feed h1 { margin: 8px 0 6px; font-size: 28px; line-height: 1.05; letter-spacing: -0.03em; }
.lede, .feed-meta { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.feed-title { margin: 0; padding: 0 18px 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.feed-filters {
  display: grid; gap: 8px; padding: 0 14px 10px; flex-shrink: 0;
}
.feed-filters-title {
  margin: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan);
}
.feed-filters label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.feed-filters select {
  width: 100%; appearance: none; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(8,12,22,.85); color: var(--ink); font: inherit; font-size: 12px;
  padding: 8px 28px 8px 10px;
  background-image: linear-gradient(45deg, transparent 50%, #9aa8bd 50%), linear-gradient(135deg, #9aa8bd 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.feed-filters select:focus { outline: 1px solid rgba(126,200,255,.45); }
.quake-list { list-style: none; margin: 0; padding: 0 10px 8px; overflow: auto; display: grid; gap: 8px; flex: 1; }
.day-head {
  margin: 6px 4px 0; padding: 6px 4px 2px; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cyan); border-bottom: 1px solid var(--line);
}
.list-more { padding: 8px 14px 16px; }
.list-more button {
  width: 100%; appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--ink); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; font-size: 12px;
}
.list-more button:hover { background: rgba(126,200,255,.12); }
.list-more button:disabled { opacity: .55; cursor: default; }
.quake-card {
  width: 100%; display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start;
  text-align: inherit; border: 1px solid transparent; border-radius: 14px; padding: 10px; cursor: pointer;
  background: rgba(255,255,255,.03); color: inherit; font: inherit;
}
.quake-card:hover, .quake-card.is-active { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.quake-card.is-flash {
  animation: eqw-flash 0.7s ease-in-out 1;
}
@keyframes eqw-flash {
  0%, 100% { border-color: transparent; background: rgba(255,255,255,.03); box-shadow: none; }
  50% { border-color: #fff; background: rgba(255,255,255,.2); box-shadow: 0 0 0 1px #fff, 0 0 18px rgba(255,255,255,.4); }
}
.mag {
  display: grid; place-items: center; font-weight: 700; font-size: 18px; border-radius: 12px; height: 48px;
}
.q-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.q-body strong { font-size: 13px; line-height: 1.3; }
.q-meta, .q-rev { font-size: 11px; color: var(--muted); }
.q-rev.is-reviewed { color: var(--green); }
.q-rev.is-auto { color: #8b97a8; }
.badge-net {
  display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 10px; letter-spacing: .04em; color: var(--cyan);
}
.is-green .mag { background: rgba(61,214,140,.18); color: var(--green); }
.is-yellow .mag { background: rgba(240,196,90,.18); color: var(--yellow); }
.is-red .mag { background: rgba(255,77,77,.2); color: var(--red); box-shadow: inset 0 0 0 1px rgba(255,77,77,.35); }
.q-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.q-body strong { font-size: 13px; line-height: 1.3; }
.q-meta { font-size: 11px; color: var(--muted); }
.empty { color: var(--muted); padding: 12px; }
.legend {
  position: absolute; right: calc(16px + var(--safe-right)); bottom: 148px;
  display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
[dir="rtl"] .legend { right: auto; left: calc(16px + var(--safe-left)); }
.lg { font-size: 11px; padding: 6px 10px; border-radius: 999px; background: rgba(8,12,22,.65); border: 1px solid var(--line); }
.lg.green { color: var(--green); }
.lg.yellow { color: var(--yellow); }
.lg.red { color: var(--red); }
.watch {
  position: absolute; left: 50%; top: 78px; transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(8,12,22,.7); border: 1px solid var(--line);
  font-size: 13px; max-width: min(520px, 70vw); text-align: center;
}
.sound-hint {
  position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%);
  margin: 0; font-size: 12px; color: var(--muted); background: rgba(8,12,22,.55); padding: 6px 12px; border-radius: 999px;
}
.sound-hint[hidden], .watch[hidden] { display: none; }
.quake-pop {
  position: absolute;
  z-index: 9;
  width: min(308px, calc(100vw - 28px));
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.45));
}
.quake-pop[hidden] { display: none; }
.quake-pop-card {
  pointer-events: auto;
  position: relative;
  background: rgba(9, 14, 26, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px 10px;
  backdrop-filter: blur(18px);
}
.quake-pop-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(9, 14, 26, 0.94);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quake-pop-x {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.06); color: var(--ink);
  cursor: pointer; font: inherit; font-size: 18px; line-height: 1;
}
.quake-pop-pager {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 28px 8px 0; font-size: 12px; color: var(--muted);
}
.quake-pop-pager button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--ink); cursor: pointer; font: inherit;
}
.quake-pop-mag { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.quake-pop-mag em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.quake-pop-mag.is-green { color: var(--green); }
.quake-pop-mag.is-yellow { color: var(--yellow); }
.quake-pop-mag.is-red { color: var(--red); }
.quake-pop-card h3 { margin: 0 0 10px; font-size: 14px; line-height: 1.35; padding-right: 22px; }
.quake-pop-card dl { margin: 0; display: grid; gap: 7px; }
.quake-pop-card dl div { display: grid; grid-template-columns: 88px 1fr; gap: 8px; font-size: 12px; }
.quake-pop-card dt { color: var(--muted); }
.quake-pop-card dd { margin: 0; }
.quake-pop-card dd span { color: var(--muted); }
.quake-pop-link { display: inline-block; margin-top: 10px; font-size: 12px; }
.quake-pop-stack {
  list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line);
  max-height: 132px; overflow: auto; display: grid; gap: 6px;
}
.quake-pop-item {
  width: 100%; display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center;
  text-align: left; border: 1px solid transparent; border-radius: 10px; padding: 6px;
  background: rgba(255,255,255,.03); color: inherit; font: inherit; cursor: pointer;
}
.quake-pop-item .mag { height: 34px; font-size: 13px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; }
.quake-pop-item small { display: block; color: var(--muted); font-size: 11px; }
.quake-pop-item.is-active, .quake-pop-item:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.credits {
  position: absolute; left: calc(16px + var(--safe-left)); bottom: 10px; margin: 0; font-size: 10px; color: #6d7b90; max-width: 46%;
}
.foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px 22px calc(18px + var(--safe-bottom));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.foot-live {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; border: 0;
  background: linear-gradient(0deg, rgba(5,7,13,.8), transparent); justify-content: flex-end;
}
.foot-live p { display: none; }
.foot nav { display: flex; gap: 12px; }
.prose { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
.prose h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -0.04em; margin: 0 0 12px; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: #c5d0e0; line-height: 1.65; }
.lead { font-size: 1.15rem; color: var(--ink) !important; }
.muted { color: var(--muted); }
.btn { display: inline-block; margin-top: 12px; }
.cookie {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; max-width: 360px;
  background: #10182a; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.is-live .cookie { bottom: 20px; }
.cookie p { margin: 0 0 10px; font-size: 13px; color: #d5deea; }
.cookie-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.menu-btn { display: none; }
.feed-handle { display: none; }
.site-menu[hidden] { display: none !important; }
.menu-btn {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.06);
  color: var(--ink); border-radius: 999px; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 13px;
  align-items: center; gap: 8px; min-height: 40px;
}
.menu-bars { width: 16px; height: 12px; display: inline-block; position: relative; }
.menu-bars::before, .menu-bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
}
.menu-bars::before { top: 0; box-shadow: 0 5px 0 currentColor; }
.menu-bars::after { bottom: 0; }
.site-menu { position: fixed; inset: 0; z-index: 50; }
.site-menu-backdrop { position: absolute; inset: 0; border: 0; width: 100%; background: rgba(0,0,0,.55); cursor: pointer; }
.site-menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
  background: #0b1220; border-left: 1px solid var(--line);
  padding: calc(16px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  overflow: auto; box-shadow: -20px 0 50px rgba(0,0,0,.4);
}
[dir="rtl"] .site-menu-panel { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--line); }
.site-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.menu-close {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.06);
  color: var(--ink); border-radius: 999px; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 13px; min-height: 40px;
}
.site-menu-nav { display: grid; gap: 6px; }
.site-menu-nav a {
  display: block; padding: 13px 12px; border-radius: 12px; color: var(--ink); font-size: 16px;
  background: rgba(255,255,255,.04);
}
.site-menu-nav a[aria-current="page"], .site-menu-nav a:hover { background: rgba(126,200,255,.16); text-decoration: none; }
.site-menu-k { margin: 18px 4px 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.site-menu-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.site-menu-langs a {
  display: block; padding: 11px 8px; border-radius: 10px; color: var(--ink); font-size: 13px;
  background: rgba(255,255,255,.04); text-align: center;
}
.site-menu-langs a[aria-current="true"] { background: rgba(126,200,255,.16); text-decoration: none; }
.feed-handle {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  width: 100%; padding: 10px 12px 2px; cursor: pointer; font: inherit; font-size: 12px;
  flex-direction: column; align-items: center; gap: 6px;
}
.feed-handle-bar { width: 42px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.32); }
body.is-menu-open { overflow: hidden; }
@media (max-width: 860px) {
  .is-page .top-tools { display: none; }
  .menu-btn { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .brand-text em { display: none; }
  .brand-text strong { font-size: 12px; letter-spacing: .06em; }
  .top {
    gap: 10px; padding: calc(8px + var(--safe-top)) 10px 8px;
    padding-left: calc(10px + var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
  }
  .sound-btn, .menu-btn, .lang summary, .cookie button, .btn {
    min-height: 42px; padding: 8px 11px; font-size: 12px;
  }
  .is-live .top { z-index: 12; }
  .is-live .top-tools {
    position: absolute;
    top: calc(100% + 8px);
    right: calc(8px + var(--safe-right));
    left: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    width: min(118px, 34vw);
  }
  .is-live .top-tools .sound-btn { width: 100%; justify-content: center; text-align: center; }
  .is-live header.top { display: flex; align-items: center; justify-content: space-between; }
  .watch {
    left: 12px; right: 132px; top: calc(58px + var(--safe-top)); transform: none;
    max-width: none; font-size: 12px; z-index: 7;
  }
  .feed {
    top: auto; left: 0; right: 0; width: auto; bottom: 0;
    height: var(--feed-h, 28vh); border-radius: 18px 18px 0 0;
    z-index: 10;
    padding-bottom: var(--safe-bottom);
  }
  [dir="rtl"] .feed { right: 0; left: 0; }
  .feed.is-open { height: min(78vh, 640px); }
  .feed-handle { display: flex; }
  .feed-head { padding: 6px 16px 4px; }
  .feed h1, .lede { display: none; }
  .feed-title { padding: 0 16px 6px; }
  .feed-filters { padding: 0 12px 8px; gap: 6px; grid-template-columns: 1fr 1fr; }
  .feed-filters-title { display: none; }
  .feed-filters label:first-of-type { grid-column: 1 / -1; }
  .feed-filters select { min-height: 38px; padding: 7px 24px 7px 8px; }
  .feed-meta { font-size: 12px; margin-bottom: 4px; }
  .legend {
    display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px;
    left: 8px; right: 130px; bottom: calc(var(--feed-h, 28vh) + 8px);
    pointer-events: none;
  }
  html.feed-open .legend { bottom: calc(min(78vh, 640px) + 8px); }
  .lg { font-size: 10px; padding: 5px 8px; }
  .quake-pop.is-docked,
  .quake-pop {
    left: 10px !important; right: 10px; width: auto; max-width: none;
    top: auto !important; bottom: calc(var(--feed-h, 28vh) + 10px);
    transform: none; max-height: 38vh; overflow: auto; z-index: 11;
  }
  html.feed-open .quake-pop.is-docked,
  html.feed-open .quake-pop {
    bottom: calc(min(78vh, 640px) + 8px);
    max-height: 22vh;
  }
  .quake-pop-card::after { display: none; }
  .is-live .cookie { left: 8px; right: 8px; max-width: none; bottom: calc(var(--feed-h, 28vh) + 10px); }
  html.feed-open .is-live .cookie { bottom: calc(min(78vh, 640px) + 10px); }
  .prose { padding: 20px 16px 48px; }
  .prose h1 { font-size: 32px; }
  .quake-list { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
  .list-more button { min-height: 44px; }
}
