/* ============================================================
   ЦОЛЬКИН — древний камень: охра, нефрит, терракота, кость
   ============================================================ */

:root {
  --bg: #171209;
  --bg2: #1f1810;
  --stone: #262017;
  --stone2: #2e261a;
  --line: #4a3d28;
  --bone: #e8dcc2;
  --bone-dim: #b7a888;
  --gold: #d9a441;
  --jade: #57b894;
  --terra: #cf5b40;
  --lapis: #6d9cbf;
  --maxw: 1060px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--bone);
  font-family: 'Spectral', Georgia, serif;
  font-weight: 300;
  line-height: 1.65;
  /* каменная фактура */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, #2a2013 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
h1, h2, h3, .p-kin, .mc-head { font-family: 'Marcellus', 'Spectral', serif; font-weight: 400; }
a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 600; color: var(--bone); }

/* ─── цветовые семьи ─── */
.fam-red    { color: var(--terra); }
.fam-white  { color: var(--bone); }
.fam-blue   { color: var(--lapis); }
.fam-yellow { color: var(--gold); }
.fam-t-red    { color: var(--terra); }
.fam-t-white  { color: var(--bone); }
.fam-t-blue   { color: var(--lapis); }
.fam-t-yellow { color: var(--gold); }
.fam-b-red    { border-color: rgba(207,91,64,.45) !important; }
.fam-b-white  { border-color: rgba(232,220,194,.4) !important; }
.fam-b-blue   { border-color: rgba(109,156,191,.45) !important; }
.fam-b-yellow { border-color: rgba(217,164,65,.45) !important; }

/* ─── глифы ─── */
.glyph { display: block; }
.glyph .g-cart {
  fill: rgba(0,0,0,.25); stroke: currentColor; stroke-width: 4.5;
}
.glyph .g-cart-in {
  fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .45;
}
.glyph .g-line {
  fill: none; stroke: currentColor; stroke-width: 4.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.glyph .g-w6 { stroke-width: 6; }
.glyph .g-w7 { stroke-width: 7; }
.glyph .g-w9 { stroke-width: 9; }
.glyph .g-fill { fill: currentColor; stroke: none; }
.glyph-xl  { width: 190px; height: 190px; filter: drop-shadow(0 0 18px rgba(0,0,0,.6)); }
.glyph-m   { width: 76px;  height: 76px; }
.glyph-s   { width: 54px;  height: 54px; }
.glyph-xs  { width: 32px;  height: 32px; }
.glyph-hero{ width: 46px;  height: 46px; opacity: .8; }

/* ─── майяские цифры ─── */
.maya-num { display: block; margin: 0 auto; }
.maya-num .mn-dot  { fill: var(--gold); }
.maya-num .mn-bar  { fill: var(--gold); }
.maya-num .mn-shell{ fill: none; stroke: var(--gold); stroke-width: 3; }

/* ─── hero ─── */
.hero {
  min-height: 92vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  position: relative; overflow: hidden; padding: 60px 20px 40px;
  border-bottom: 1px solid var(--line);
}
.hero-sun {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(217,164,65,.14) 0%, transparent 45%);
}
.hero-inner { position: relative; max-width: 800px; }
.hero-glyphs {
  display: flex; gap: 14px; justify-content: center; margin-bottom: 34px;
  flex-wrap: wrap;
}
.hero-glyphs .glyph-hero:nth-child(odd)  { transform: translateY(6px); }
.hero h1 {
  font-size: clamp(52px, 10vw, 108px); letter-spacing: .18em;
  color: var(--gold); text-shadow: 0 0 40px rgba(217,164,65,.25);
  margin-bottom: 20px;
}
.hero-sub { font-size: 18px; color: var(--bone-dim); font-style: italic; margin-bottom: 28px; }
.hero-nav {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-top: 30px;
  font-family: 'Jost', sans-serif; font-weight: 300; font-size: 14px; letter-spacing: .06em;
}
.hero-nav a { color: var(--bone-dim); border-bottom: 1px dotted var(--line); padding-bottom: 2px; }
.hero-nav a:hover { color: var(--gold); text-decoration: none; border-color: var(--gold); }
.hero-scroll { position: absolute; bottom: 18px; color: var(--bone-dim); animation: bob 2.4s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.today-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 22px; border: 1px solid var(--line); border-radius: 40px;
  background: rgba(0,0,0,.3); font-family: 'Jost', sans-serif; font-size: 15px;
  color: var(--bone);
}
.today-badge .glyph-xs { flex: none; }

/* ─── секции ─── */
.sec { max-width: var(--maxw); margin: 0 auto; padding: 76px 22px 30px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.sec-num {
  color: var(--gold); font-size: 24px; line-height: 1;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  background: rgba(0,0,0,.25); min-width: 46px; text-align: center;
}
.sec h2 { font-size: clamp(26px, 4vw, 36px); color: var(--bone); letter-spacing: .04em; }
.lead { color: var(--bone-dim); max-width: 62em; margin-bottom: 26px; }
.prose p { margin-bottom: 16px; max-width: 66em; }
.prose i { color: var(--jade); }
.hint { color: var(--bone-dim); font-style: italic; padding: 18px 4px; }

/* ─── контролы ─── */
.calc-controls {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-bottom: 10px;
}
.date-field { display: flex; flex-direction: column; gap: 6px; }
.date-field.grow { flex: 1 1 220px; }
.date-field span {
  font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--bone-dim);
}
.date-field input {
  background: var(--stone); color: var(--bone); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-family: 'Jost', sans-serif;
  font-size: 16px; outline: none; min-width: 190px;
}
.date-field input:focus { border-color: var(--gold); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(.4); cursor: pointer; }

.mode-switch { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mode-switch button, .btn {
  background: var(--stone); color: var(--bone-dim); border: none; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 14px; letter-spacing: .05em;
  padding: 13px 22px; transition: all .2s;
}
.mode-switch button.on { background: var(--gold); color: #241a08; font-weight: 500; }
.mode-switch button:not(.on):hover { color: var(--gold); }
.btn { border: 1px solid var(--line); border-radius: 10px; }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.mode-note { font-size: 14px; color: var(--bone-dim); font-style: italic; margin-bottom: 18px; max-width: 60em; }

/* ─── портрет кина ─── */
.calc-out { margin-top: 8px; }
.portrait {
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(217,164,65,.05), transparent 40%),
    var(--bg2);
  box-shadow: 0 20px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(232,220,194,.06);
}
.p-main { display: flex; gap: 34px; padding: 34px 34px 20px; flex-wrap: wrap; }
.p-glyph { flex: none; text-align: center; }
.p-tone-num { margin-top: 16px; }
.p-titles { flex: 1 1 340px; min-width: 0; }
.p-kin {
  font-family: 'Jost', sans-serif; font-size: 13px; letter-spacing: .34em;
  color: var(--gold); margin-bottom: 6px;
}
.p-name { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; margin-bottom: 8px; }
.p-yuc { font-size: 17px; color: var(--jade); margin-bottom: 4px; }
.p-yuc span { color: var(--bone-dim); font-style: italic; font-size: 15px; }
.p-fam { font-family: 'Jost', sans-serif; font-size: 13px; letter-spacing: .08em; color: var(--bone-dim); margin-bottom: 16px; }
.p-keys { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.p-keys span { font-family: 'Jost', sans-serif; font-size: 13.5px; color: var(--bone-dim); }
.p-keys b { color: var(--gold); font-weight: 500; margin-right: 5px; }
.p-text { color: var(--bone); max-width: 58em; }
.p-text-tone { margin-top: 10px; color: var(--bone-dim); }

/* оракул */
.p-oracle { border-top: 1px dashed var(--line); padding: 26px 30px 30px; }
.ora-grid {
  display: grid; grid-template-columns: repeat(3, minmax(96px, 150px));
  gap: 10px; justify-content: center; margin-bottom: 22px;
}
.ora-cell {
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px 12px;
  text-align: center; background: rgba(0,0,0,.22);
}
.ora-cell .glyph-s { margin: 4px auto; }
.ora-center { background: rgba(217,164,65,.07); box-shadow: inset 0 0 30px rgba(0,0,0,.35); }
.ora-label {
  display: block; font-family: 'Jost', sans-serif; font-size: 10.5px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--bone-dim);
}
.ora-tone { display: block; margin: 4px 0 2px; }
.ora-name { font-size: 12.5px; line-height: 1.35; display: block; }
.ora-name i { color: var(--bone-dim); font-size: 11.5px; }

.ora-cell[data-role] { cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.ora-cell[data-role]:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.45); }
.ora-cell.sel { outline: 2px solid var(--gold); outline-offset: 2px; }
.ora-hint {
  text-align: center; font-size: 13px; font-style: italic; color: var(--bone-dim);
  max-width: 46em; margin: 0 auto 16px;
}
.ora-detail {
  max-width: 700px; margin: 0 auto 22px; padding: 20px 24px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 14px; background: rgba(0,0,0,.28);
}
.ora-detail p { font-size: 14.5px; color: var(--bone-dim); margin-bottom: 10px; }
.ora-detail p:last-child { margin-bottom: 0; }
.ora-detail p b { color: var(--gold); font-weight: 600; }
.ora-d-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.ora-d-head .glyph-m { flex: none; width: 64px; height: 64px; }
.ora-d-role {
  display: block; font-family: 'Jost', sans-serif; font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px;
}
.ora-d-head b { font-family: 'Marcellus', serif; font-weight: 400; font-size: 18px; display: block; }
.ora-d-head i { color: var(--bone-dim); font-size: 12.5px; display: block; }
.ora-d-seal { border-top: 1px dashed var(--line); padding-top: 10px; }
.ora-d-seal b { color: var(--jade) !important; }

.p-wave {
  font-size: 14.5px; color: var(--bone-dim); max-width: 62em; margin: 0 auto;
  text-align: center; padding: 0 6px;
}
.p-wave b { color: var(--jade); }

/* лента 13 дней волны */
.wave-strip {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  margin: 16px auto 6px; max-width: 720px;
}
.ws-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px 6px;
  min-width: 44px; background: rgba(0,0,0,.2); cursor: help;
}
.ws-chip span {
  font-family: 'Jost', sans-serif; font-size: 9.5px; letter-spacing: .04em;
  color: var(--bone-dim); text-transform: uppercase;
}
.ws-chip.on { border-color: var(--gold); background: rgba(217,164,65,.10); }
.ws-chip.on span { color: var(--gold); }
.ws-note {
  text-align: center; font-size: 12.5px; font-style: italic;
  color: var(--bone-dim); margin-bottom: 4px;
}

/* личные ритмы */
.p-personal { margin-top: 20px; }
.pp-title {
  text-align: center; font-family: 'Jost', sans-serif; font-size: 11.5px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.pp-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px; max-width: 760px; margin: 0 auto;
}
.pp-grid > div {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px;
  background: rgba(0,0,0,.22);
}
.pp-grid b {
  display: block; font-family: 'Jost', sans-serif; font-size: 10.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim);
  font-weight: 400; margin-bottom: 4px;
}
.pp-grid span { font-size: 14.5px; color: var(--bone); }

.classic-panel {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px;
}
.classic-panel > div {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 20px;
  background: rgba(0,0,0,.22); text-align: center; font-family: 'Jost', sans-serif;
}
.classic-panel b {
  display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bone-dim); font-weight: 400; margin-bottom: 3px;
}
.classic-panel span { color: var(--gold); font-size: 17px; letter-spacing: .06em; }

.hunab .p-main { padding-bottom: 34px; }

/* ─── совместимость ─── */
.match-pair {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  flex-wrap: wrap; margin: 26px 0;
}
.match-kin {
  border: 1px solid var(--line); border-radius: 18px; padding: 20px 30px;
  text-align: center; background: var(--bg2); min-width: 210px;
}
.match-kin .glyph-m { margin: 0 auto 10px; }
.match-kin b { display: block; font-family: 'Jost', sans-serif; letter-spacing: .2em; color: var(--gold); font-size: 13px; }
.match-kin span { font-size: 15px; }
.match-x { font-size: 34px; color: var(--bone-dim); }
.match-rels { max-width: 760px; margin: 0 auto 26px; display: grid; gap: 12px; }
.rel { border-left: 3px solid var(--gold); padding: 10px 18px; background: rgba(0,0,0,.2); border-radius: 0 12px 12px 0; }
.rel b { color: var(--gold); font-family: 'Jost', sans-serif; font-weight: 500; letter-spacing: .05em; }
.rel p { color: var(--bone-dim); font-size: 15px; margin-top: 4px; }
.match-comb {
  border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px;
  text-align: center; background: var(--bg2); max-width: 760px; margin: 0 auto;
}
.match-comb .glyph-m { margin: 12px auto; }
.mc-head { color: var(--gold); letter-spacing: .2em; font-size: 15px; text-transform: uppercase; }
.mc-name { font-family: 'Marcellus', serif; font-size: 24px; margin-bottom: 10px; }
.match-comb p { color: var(--bone-dim); font-size: 15px; max-width: 56em; margin: 0 auto; }

/* ─── мои кины ─── */
.people-form { margin-bottom: 20px; }
.people-list { display: grid; gap: 10px; max-width: 760px; }
.person {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px;
  background: var(--bg2);
}
.person .glyph-xs { flex: none; }
.person-info { flex: 1; min-width: 0; }
.person-info b { display: block; }
.person-info span { font-size: 13.5px; color: var(--bone-dim); }
.person-btns { display: flex; gap: 6px; }
.person-btns button {
  background: var(--stone); border: 1px solid var(--line); color: var(--bone-dim);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-family: 'Jost', sans-serif;
  font-size: 13px;
}
.person-btns button:hover { color: var(--gold); border-color: var(--gold); }

/* ─── матрица ─── */
.matrix-wrap { overflow-x: auto; padding-bottom: 8px; }
.matrix-grid {
  display: grid; grid-template-columns: 44px repeat(13, minmax(30px, 1fr));
  gap: 3px; min-width: 560px; max-width: 860px; margin: 0 auto;
}
.mx-corner, .mx-colhead {
  font-family: 'Jost', sans-serif; font-size: 12px; color: var(--bone-dim);
  text-align: center; align-self: end; padding-bottom: 4px;
}
.mx-rowhead { display: flex; align-items: center; justify-content: center; }
.mx-cell {
  aspect-ratio: 1; border-radius: 5px; cursor: pointer; position: relative;
  border: 1px solid transparent; transition: transform .12s, box-shadow .12s;
}
.fam-c-red    { background: rgba(207,91,64,.30); }
.fam-c-white  { background: rgba(232,220,194,.22); }
.fam-c-blue   { background: rgba(109,156,191,.30); }
.fam-c-yellow { background: rgba(217,164,65,.30); }
.mx-mystic { box-shadow: inset 0 0 0 1px rgba(87,184,148,.5); }
.mx-cell:hover { transform: scale(1.25); z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.mx-cell.on { outline: 2px solid var(--gold); outline-offset: 1px; z-index: 1; }
.mx-cell.today::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 6px; height: 6px; border-radius: 50%; background: var(--jade);
}
#matrix-out { margin-top: 26px; scroll-margin-top: 24px; }

/* ─── печати ─── */
.seals-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.seal-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px;
  background: var(--bg2);
}
.seal-card header { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.seal-card header b { display: block; font-size: 18px; font-family: 'Marcellus', serif; font-weight: 400; }
.seal-card header span { display: block; color: var(--gold); font-size: 14px; }
.seal-card header i { display: block; color: var(--bone-dim); font-size: 12.5px; }
.seal-keys { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.seal-keys span {
  font-family: 'Jost', sans-serif; font-size: 11.5px; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px; color: var(--bone-dim);
}
.seal-card p { font-size: 14.5px; color: var(--bone-dim); }

/* ─── тоны ─── */
.tones-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tone-card {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--bg2);
}
.tone-num { flex: none; width: 56px; padding-top: 4px; }
.tone-card b { font-family: 'Marcellus', serif; font-weight: 400; font-size: 17px; display: block; }
.tone-card span { color: var(--gold); font-size: 13.5px; font-family: 'Jost', sans-serif; display: block; margin: 2px 0 6px; }
.tone-card p { font-size: 14px; color: var(--bone-dim); }

/* ─── загадка 260 ─── */
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; margin: 10px 0 22px;
}
.why-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--bg2); }
.why-card b { color: var(--gold); font-family: 'Marcellus', serif; font-weight: 400; font-size: 18px; }
.why-card p { font-size: 14.5px; color: var(--bone-dim); margin-top: 6px; }

/* ─── footer ─── */
.footer {
  margin-top: 90px; padding: 50px 20px 60px; text-align: center;
  border-top: 1px solid var(--line); color: var(--bone-dim);
}
.footer-glyph { display: flex; justify-content: center; margin-bottom: 18px; color: var(--gold); }
.footer-glyph .glyph-m { width: 64px; height: 64px; }
.footer p { font-family: 'Jost', sans-serif; font-size: 14px; letter-spacing: .1em; }
.footer-note { font-size: 12.5px; margin-top: 8px; letter-spacing: .02em; max-width: 46em; margin-left: auto; margin-right: auto; }

/* ─── высекание глифа ─── */
@media (prefers-reduced-motion: no-preference) {
  .glyph-xl .g-cart, .glyph-xl .g-cart-in, .glyph-xl .g-line {
    stroke-dasharray: 460; stroke-dashoffset: 460;
    animation: carve 1s ease-out forwards;
  }
  .glyph-xl .g-cart-in { animation-delay: .25s; }
  .glyph-xl .g-line { animation-delay: .45s; animation-duration: .9s; }
  .glyph-xl .g-fill { opacity: 0; animation: carve-fill .5s ease .85s forwards; }
}
@keyframes carve { to { stroke-dashoffset: 0; } }
@keyframes carve-fill { to { opacity: 1; } }

/* ─── нагуаль и сила тона ─── */
.p-naw {
  margin-top: 10px; padding: 10px 16px;
  border-left: 3px solid var(--jade); background: rgba(87,184,148,.06);
  border-radius: 0 10px 10px 0; color: var(--bone-dim);
}
.p-naw b { color: var(--jade); font-weight: 600; }
.seal-naw {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 13.5px !important; color: var(--bone-dim);
}
.seal-naw b { color: var(--jade); font-weight: 600; }
.tone-str {
  display: inline-block; margin-top: 8px;
  font-family: 'Jost', sans-serif; font-style: normal; font-size: 11.5px;
  letter-spacing: .08em; color: var(--gold);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px;
}
.jade { color: var(--jade); }

/* ─── режимы матрицы ─── */
.mx-modes {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  font-family: 'Jost', sans-serif;
}
.mx-modes span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-dim); }
.mx-modes button {
  background: var(--stone); color: var(--bone-dim); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 16px; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 13.5px; transition: all .2s;
}
.mx-modes button.on { background: var(--gold); color: #241a08; border-color: var(--gold); }
.mx-modes button:not(.on):hover { color: var(--gold); border-color: var(--gold); }

/* ─── шестерёнки ─── */
.gears-box {
  max-width: 760px; margin: 18px auto 34px; padding: 22px 18px 18px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--bg2);
  text-align: center;
}
#gears-svg { width: 100%; height: auto; display: block; }
.gear-rim  { fill: rgba(0,0,0,.25); stroke: var(--gold); stroke-width: 2.5; }
.gear-rim2 { fill: none; stroke: var(--line); stroke-width: 1; }
.gear-hub  { fill: var(--gold); }
.gear-tick { stroke: var(--bone-dim); stroke-width: 2; }
.gear-num  { font: 15px 'Jost', sans-serif; fill: var(--bone-dim); }
.gear-num.on  { font-size: 19px; fill: var(--gold); font-weight: 600; }
.gear-name { font: 11.5px 'Jost', sans-serif; fill: var(--bone-dim); }
.gear-name.on { font-size: 14px; fill: var(--gold); font-weight: 600; }
.gear-mark   { fill: none; stroke: var(--jade); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gear-mark-t { font: 12px 'Jost', sans-serif; fill: var(--jade); letter-spacing: .1em; }
.gears-info { margin: 12px 0 14px; font-size: 15.5px; color: var(--bone-dim); }
.gears-info b { color: var(--gold); }
.gears-ctl { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gears-note { margin-top: 14px; font-size: 13.5px; font-style: italic; color: var(--bone-dim); }

/* ─── стела ─── */
.stela-row { text-align: center; margin-top: 18px; }
.stela-box { margin: 18px auto 0; max-width: 340px; }
.stela-box .stela-svg {
  width: 100%; height: auto; display: block;
  border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.stela-box .stela-dl { margin-top: 12px; }

/* ─── глоссарий ─── */
.term {
  border-bottom: 1px dotted var(--gold); cursor: help;
  text-decoration: none; color: inherit; outline: none;
}
.term:hover, .term:focus { color: var(--gold); border-bottom-style: solid; }
#gloss-tip {
  position: absolute; z-index: 50; max-width: 340px;
  background: #241c11; border: 1px solid var(--gold); border-radius: 12px;
  padding: 12px 16px; font-size: 13.5px; line-height: 1.55; color: var(--bone-dim);
  box-shadow: 0 14px 40px rgba(0,0,0,.6); pointer-events: none;
}
#gloss-tip b {
  display: block; font-family: 'Jost', sans-serif; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 4px; font-weight: 500;
}

/* ─── жизнь ролей оракула ─── */
.ora-life {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin: 12px 0;
}
.ora-life > div {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  background: rgba(0,0,0,.2);
}
.ora-life b {
  display: block; font-family: 'Jost', sans-serif; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  font-weight: 500; margin-bottom: 4px;
}
.ora-life p { font-size: 13.5px; color: var(--bone-dim); margin: 0 !important; }

/* ─── крест майя ─── */
.cross-block { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 22px; }
.cross-block .ora-grid { margin-bottom: 14px; }
.cross-detail {
  max-width: 700px; margin: 0 auto; padding: 18px 22px;
  border: 1px solid var(--line); border-left: 3px solid var(--jade);
  border-radius: 14px; background: rgba(0,0,0,.28);
}
.cross-detail p { font-size: 14.5px; color: var(--bone-dim); margin-bottom: 10px; }
.cross-detail p:last-child { margin-bottom: 0; }
.cross-detail .ora-d-seal b { color: var(--jade) !important; }
.cross-cell.sel { outline: 2px solid var(--jade); outline-offset: 2px; }

/* ─── ГАП-бейдж ─── */
.gap-badge {
  display: inline-block; margin: 2px 0 10px;
  font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: .06em;
  color: var(--jade); border: 1px solid rgba(87,184,148,.5); border-radius: 20px;
  padding: 4px 14px; background: rgba(87,184,148,.08);
}

/* ─── адаптив ─── */
@media (max-width: 720px) {
  .p-main { padding: 24px 20px 14px; gap: 22px; justify-content: center; }
  .p-titles { text-align: center; }
  .p-keys { justify-content: center; }
  .p-oracle { padding: 20px 12px 24px; }
  .ora-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .glyph-xl { width: 150px; height: 150px; }
  .sec { padding: 56px 16px 20px; }
  .br-wide { display: none; }
  .match-x { width: 100%; text-align: center; }
}
