/* Colours and type follow 72shemot.com (estilos.css): red #B80A00, orange #EF7D00,
   greys #E6E6E6 / #E0E0E0 / #F2F2F2, text #666, Trebuchet MS. */
:root {
  --bg: #E6E6E6;
  --paper: #FFFFFF;
  --ink: #333333;
  --ink-2: #666666;
  --line: #666666;
  --line-2: #B3B3B3;
  --red: #B80A00;
  --orange: #EF7D00;
  --grey1: #E0E0E0;
  --grey2: #F2F2F2;
  --accent: #B80A00;
  --hl: #B80A00;
  --sans: 'Trebuchet MS', Arial, Helvetica, sans-serif;
  --serif: 'Trebuchet MS', Arial, Helvetica, sans-serif;
  --hebrew: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --sym: 'Noto Sans Symbols', 'Segoe UI Symbol', 'Apple Symbols', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
.he { font-family: var(--hebrew); direction: rtl; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site { max-width: 1280px; margin: 0 auto; background: var(--paper); min-height: 100vh; }

/* ---------- header (as 72shemot.com) ---------- */
.cabecera { border-top: 5px solid var(--red); margin: 0 16px; padding: 12px 8px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.cabecera .logo { font-size: clamp(30px, 5vw, 40px); color: var(--red); line-height: 1.1; text-decoration: none; }
.cabecera .logo:hover { text-decoration: underline; }
.cabecera .logo-he { font-family: var(--hebrew); font-size: clamp(26px, 4vw, 34px); color: #8A8A8A; font-weight: 700; }
.cabecera p { flex-basis: 100%; margin: 0; color: var(--ink-2); font-size: 15px; }
.botonera { margin: 0 16px; background: var(--red); border-radius: 0 0 22px 22px; padding: 6px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.botonera h1 { margin: 0 auto 0 8px; color: #fff; font-size: 17px; font-weight: normal; }
.tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.btn { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; }
.btn:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.botonera .btn { background: transparent; border-color: transparent; color: #fff; }
.botonera .btn:hover { color: #FFD9B0; }
.botonera .btn[aria-pressed="true"] { background: #fff; color: var(--red); }
.btn[aria-pressed="true"] { background: var(--red); color: #fff; border-color: var(--red); }
.btn:focus-visible, .name:focus-visible, .name-card:focus-visible, .lang button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; overflow: hidden; }
.lang button { min-height: 44px; min-width: 46px; border: 0; background: transparent; color: #fff; cursor: pointer; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--red); font-weight: bold; }
.top-plain { display: flex; justify-content: flex-end; padding: 12px 16px; max-width: 1280px; margin: 0 auto; }
.top-plain .lang { border-color: var(--line-2); }
.top-plain .lang button { color: var(--ink); }
.top-plain .lang button[aria-pressed="true"] { background: var(--red); color: #fff; }

/* ---------- wheel ---------- */
main { padding: 16px 16px 32px; }
.wheel-wrap { width: min(100%, 1100px); margin: 0 auto; aspect-ratio: 1; }
#wheel { width: 100%; height: 100%; display: block; }
#wheel text { font-family: var(--serif); }
#wheel text:not([fill]) { fill: var(--ink); }
#wheel .heb { font-family: var(--hebrew); font-weight: 700; }
#wheel .sym { font-family: var(--sym); }
.name { cursor: pointer; }
.name .hit { fill: transparent; }
.name:hover .hit, .name:focus .hit { fill: rgba(184, 10, 0, .14); }
.hint { text-align: center; color: var(--ink-2); font-size: 16px; margin: 8px 0 0; }

/* ---------- list ---------- */
.list { direction: rtl; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 24px; }
.name-card { direction: ltr; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 6px; background: var(--grey2); cursor: pointer; text-align: left; }
.name-card:nth-child(even) { background: var(--grey1); }
.name-card:hover { box-shadow: inset 0 0 0 2px var(--red); }
.name-card .num { color: var(--ink-2); font-size: 14px; min-width: 22px; }
.name-card .he { font-size: 24px; font-weight: 700; color: var(--accent); }
.name-card .t { font-size: 14px; color: var(--ink-2); line-height: 1.25; }

/* ---------- ficha ---------- */
dialog.ficha { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); }
dialog.ficha::backdrop { background: rgba(31, 27, 22, .55); }
.f-head { display: flex; align-items: center; gap: 16px; padding: 14px 20px; position: sticky; top: 0; background: var(--red); color: #fff; z-index: 1; }
.f-num { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--red); display: grid; place-items: center; font-size: 24px; font-style: italic; flex: none; }
.f-name { font-size: 54px; line-height: 1; color: #fff; font-weight: 700; }
.f-title { flex: 1; min-width: 0; }
.f-title h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.f-title p { margin: 2px 0 0; color: #FFE3D6; font-size: 15px; }
.f-close { margin-left: auto; min-width: 44px; min-height: 44px; border: 1px solid #fff; background: transparent; color: #fff; border-radius: 8px; cursor: pointer; font-size: 22px; line-height: 1; }
.f-body { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.f-cell { background: var(--grey2); border-radius: 8px; padding: 8px 12px; }
.f-cell dt { font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .6px; }
.f-cell dd { margin: 0; font-size: 18px; }
.f-cell .he { font-size: 22px; }
.f-sec h3 { margin: 0 0 6px; font-size: 15px; color: var(--red); font-weight: normal; }
.f-app { font-size: 19px; margin: 0; }
.verse { font-size: 30px; line-height: 1.7; text-align: right; margin: 0; }
.verse .hl { color: var(--hl); font-size: 1.25em; }
.translit { font-style: italic; margin: 4px 0 0; }
.trans { margin: 4px 0 0; color: var(--ink-2); }
.f-note { font-size: 14px; color: var(--ink-2); }
.f-foot { font-size: 12px; color: #6F7071; border-top: 1px solid #EDEDED; padding-top: 10px; }

footer { max-width: 1280px; margin: 0 auto; padding: 14px 16px; font-size: 12px; color: #6F7071; background: var(--bg); text-align: center; }
footer p { margin: 4px 0; }

/* ---------- login / admin ---------- */
.card { max-width: 420px; margin: 8vh auto; padding: 28px 24px; background: var(--paper); border-top: 5px solid var(--red); border-radius: 0 0 12px 12px; }
.card h1 { margin: 0 0 4px; font-size: 28px; color: var(--red); font-weight: normal; }
.card p { margin: 0 0 16px; color: var(--ink-2); }
label { display: block; font-size: 15px; margin: 12px 0 4px; }
input, textarea { width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 17px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 140px; font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.primary { width: 100%; margin-top: 18px; justify-content: center; background: var(--red); color: #fff; border-color: var(--red); }
.primary:hover { background: #8F0800; color: #fff; }
.msg { min-height: 24px; margin-top: 12px; color: var(--hl); }
.msg.ok { color: #2F6B2F; }
.admin h1 { color: var(--red); font-weight: normal; }
.admin { max-width: 900px; margin: 0 auto; padding: 16px; }
.admin table { width: 100%; border-collapse: collapse; background: var(--paper); }
.admin th { background: var(--red); color: #fff; font-weight: normal; }
.admin th, .admin td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #fff; }
.admin tbody tr:nth-child(odd) { background: var(--grey1); }
.admin tbody tr:nth-child(even) { background: var(--grey2); }
.admin .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel { background: var(--paper); border: 1px solid var(--grey1); border-radius: 12px; padding: 16px; margin: 16px 0; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .f-name { font-size: 42px; }
  .verse { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* ---------- month card ---------- */
.f-num.sym-big { font-family: var(--sym); font-style: normal; font-size: 30px; }
.perm-big { text-align: center; background: linear-gradient(180deg, #03050C 0%, #0E1F45 50%, #1D428C 100%); border-radius: 10px; padding: 22px 12px 16px; color: #fff; }
.perm-big .perm { margin: 0; font-size: clamp(64px, 15vw, 120px); line-height: 1.2; color: #fff; font-weight: 700; display: flex; justify-content: center; gap: .14em; }
.perm-big .pl { position: relative; display: inline-block; padding-top: .28em; }
.perm-big .flame { position: absolute; top: .2em; left: 50%; width: .12em; height: .4em; transform: translateX(-50%); transform-origin: 50% 100%; filter: drop-shadow(0 0 .08em rgba(255, 190, 70, .8)); animation: flicker 2.2s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: translateX(-50%) scale(1, 1) rotate(0deg); } 25% { transform: translateX(-50%) scale(.94, 1.06) rotate(-2deg); } 50% { transform: translateX(-50%) scale(1.03, .96) rotate(1.5deg); } 75% { transform: translateX(-50%) scale(.97, 1.04) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { .perm-big .flame { animation: none; } }
.perm-big .perm-tr { margin: 4px 0 0; font-size: 22px; font-style: italic; color: #fff; }
.perm-big .perm-label { margin: 2px 0 0; font-size: 13px; color: #D6E0F5; text-transform: uppercase; letter-spacing: .6px; }
.f-cell .letter-big { font-size: 40px; font-weight: 700; color: var(--red); line-height: 1.1; }
.six { direction: rtl; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.phrase { background: var(--grey2); border-radius: 8px; padding: 12px 16px; margin-top: 10px; text-align: center; }
.phrase .ph-he { margin: 0; font-size: 26px; line-height: 1.5; }
.phrase .ph-perm { color: var(--red); font-weight: 700; }
.phrase .ph-tr { margin: 2px 0 0; font-style: italic; color: var(--ink-2); }
.phrase .ph-tr strong { color: var(--red); font-style: normal; }
