/* The Lab: index cards and the three experiments (Zodiac Window, Your Triangle, Interactive Triangles). */
.lab-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; margin-top: 28px; }
.lab-card { display: grid; gap: 10px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--night-2); min-width: 0; }
.lab-card h3 { font-family: var(--ar-display); font-size: 26px; font-weight: 400; margin: 0; }
.lab-card p { margin: 0; color: var(--mist); }
.lab-card svg { width: 64px; height: 64px; }
.lab-card .btn { justify-self: start; }
.lab-exp { display: grid; gap: 18px; min-width: 0; }
.lab-exp .eyebrow { margin: 0; }
.lab-exp h2 { font-family: var(--ar-display); font-size: clamp(34px, 5vw, 54px); font-weight: 400; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Zodiac Window ── */
.zw { display: grid; gap: 18px; min-width: 0; }
.zw-head { display: grid; gap: 6px; }
.zw-head h2 { font-family: var(--ar-display); font-size: clamp(34px, 5vw, 54px); font-weight: 400; margin: 0; }
.zw-intro { margin: 0; color: var(--mist); font-size: 18px; }
.zw-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 24px; align-items: start; }
.zw-scene { display: grid; gap: 10px; min-width: 0; position: sticky; top: 76px; }
.zw-stage { position: relative; min-width: 0; }
.zw-canvas { display: block; width: 100%; max-height: calc(100vh - 120px); aspect-ratio: 1000 / 1240; object-fit: contain; border-radius: 18px; touch-action: manipulation; outline-offset: 4px; }
.zw-skip, .zw-options { position: absolute; inset-block-end: 14px; inset-inline-end: 14px; }
.zw-tools { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; display: flex; gap: 8px; }
.zw-tools[hidden] { display: none; }
.zw-tool { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--night) 70%, transparent); color: var(--ink); cursor: pointer; }
.zw-tool:hover, .zw-tool[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.zw-tool:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.zw[data-look="1"] .zw-tools { display: none; }
.zw-skip, .zw-options, .zw-btn, .zw-chip, .zw-tab, .zw-close, .zw-link { font: inherit; color: var(--ink); background: color-mix(in srgb, var(--veil) 88%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
/* compact controls in every lab (v26b): smaller type and padding, still a comfortable 36px to tap */
.zw-chip, .zw-btn, .zw-link { font-size: 14px; padding: 6px 12px; min-height: 36px; }
.zw-sec input[type="range"], .mo-look input[type="range"] { height: 18px; }
.zw-chip[aria-pressed="true"], .zw-tab[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.zw-primary { background: var(--gold); color: var(--night); border-color: var(--gold); }
.zw-link { background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; color: var(--lilac); padding-inline: 0; }
.zw-btn:disabled { opacity: .5; cursor: default; }
.zw-artnote { margin: 0; font-size: 13px; color: var(--dim, var(--mist)); }
.zw-panel { display: grid; gap: 14px; min-width: 0; }
.zw-sec { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--night-2); min-width: 0; }
.zw-sec h3 { margin: 0; font-size: 18px; font-weight: 500; }
.zw-eyebrow { margin: 0; color: var(--lilac); font-size: 14px; }
.zw-sign { display: flex; align-items: baseline; gap: 12px; font-family: var(--ar-display); font-size: 34px; font-weight: 400; }
.zw-sym { font-family: "Segoe UI Symbol", "Noto Sans Symbols", serif; color: var(--gold); }
.zw-meta { margin: 0; color: var(--gold); }
.zw-desc { margin: 0; }
.zw-note { margin: 0; font-size: 14px; color: var(--mist); }
.zw-sub { margin: 4px 0 0; font-size: 15px; color: var(--mist); }
.zw-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.zw-color { display: inline-flex; align-items: center; gap: 8px; }
.zw-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #ffffff55; flex: none; }
.zw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
/* the sign card: back (gem cosmos) turns to front (the sign's window) when the sign is revealed; it leans and shimmers under the hand */
.zt { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%; position: relative; display: block; width: min(240px, 72%); aspect-ratio: 2 / 3; margin: 6px auto 10px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1100px; border-radius: 18px; }
.zt:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.zt-tilt, .zt-inner, .zt-face { position: absolute; inset: 0; transform-style: preserve-3d; }
.zt-tilt { transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.zt-inner { transition: transform 1.2s cubic-bezier(.3, .9, .25, 1); }
.zt--back .zt-inner { transform: rotateY(180deg); }
.zt-face { border-radius: 18px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 26px 50px -22px #000, 0 0 46px -14px color-mix(in srgb, var(--gold) 55%, transparent); }
.zt-back { transform: rotateY(180deg); }
.zt-img { display: block; width: 100%; height: 100%; }
.zt-shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0; transition: opacity .5s;
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), #ffffff70, #fff0 40%),
    linear-gradient(115deg, transparent 22%, #ff78c855 36%, #78dcff55 46%, #fff08c55 56%, transparent 70%);
  background-size: 100% 100%, 240% 240%; background-position: center, var(--mx) var(--my); }
.zt--lit .zt-shine, .zt:focus-visible .zt-shine { opacity: .75; }
/* the illustrated card: the picture, and under it a parchment plate with the sign's dates and Suliman's signature */
.zt--photo { aspect-ratio: 600 / 999; width: min(280px, 80%); }
.zt-photo { display: grid; grid-template-rows: 1fr auto; background: #ecd6a6; }
.zt-art { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.zt-plate { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 7%; height: 10%; min-height: 28px; color: #2a2016; border-top: 1px solid #2a201666; font-family: Amiri, var(--ar-display), serif; font-size: 15px; }
.zt-sig { font-style: italic; font-size: 1.1em; }
.zt-sig img { display: block; height: 1.6em; width: auto; }
.zt-back .zt-img { object-fit: cover; }
.zw-grid--cards { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.zt-mini { display: grid; gap: 6px; justify-items: center; padding: 6px 4px 8px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; transition: transform .3s, border-color .3s; }
.zt-mini .zt-img { width: 100%; max-width: 84px; height: auto; border-radius: 8px; box-shadow: 0 10px 20px -12px #000; }
.zt-mini:hover { transform: translateY(-3px); }
.zt-mini[aria-pressed="true"] { border-color: var(--gold); }
.zt-mini:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .zt-tilt, .zt-inner, .zt-mini { transition: none; } .zt-tilt { transform: none; } .zt-mini:hover { transform: none; } }
.zw-browse summary { cursor: pointer; color: var(--lilac); min-height: 40px; display: flex; align-items: center; }
.zw-date { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; }
.zw-label { color: var(--mist); font-size: 15px; display: grid; gap: 6px; }
.zw-select, .zw-input { font: inherit; color: var(--ink); background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 42px; min-width: 0; width: 100%; }
.zw-error { margin: 0; color: #f0a0a0; min-height: 1em; }
.zw-radio, .zw-check { display: flex; gap: 10px; align-items: center; min-height: 40px; }
.zw-preview { width: 100%; max-width: 260px; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.zw-legacy { display: grid; gap: 8px; padding: 14px; border: 1px dashed var(--gold); border-radius: 14px; }
.zw-legacy p { margin: 0; }
.zw-status { min-height: 1.4em; margin: 0; color: var(--mist); font-size: 14px; }
.zw-mini, .zw-tabs, .zw-close { display: none; }
.zw[data-look="1"] .zw-head, .zw[data-look="1"] .zw-panel, .zw[data-look="1"] .zw-tabs, .zw[data-look="1"] .zw-mini, .zw[data-look="1"] .zw-artnote, .zw[data-look="1"] .zw-status { display: none !important; }
.zw[data-look="1"] .zw-layout { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 759px) {
  .zw-layout { grid-template-columns: minmax(0, 1fr); }
  /* the scene stays on screen (sticky) while the chosen controls open in a drawer right under the tabs,
     so every change is seen at once; nothing is position:fixed, so the page still scrolls normally */
  .zw-scene { position: static; }
  .zw-canvas { height: min(56vh, calc((100vw - 32px) * 1.24)); width: auto; max-width: 100%; max-height: none; margin-inline: auto; }
  /* with a drawer open: a smaller scene on top, the drawer scrolls inside the rest of the screen */
  .zw.zw--drawer .zw-canvas { height: 36vh; }
  .zw.zw--drawer .zw-panel { max-height: calc(64vh - 120px); overflow: auto; overscroll-behavior: contain; }
  .zw-mini { display: flex; gap: 6px; align-items: baseline; justify-content: center; font-size: 17px; }
  .zw-mini .zw-sym { font-size: 20px; }
  .zw-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .zw-tab { padding: 6px 4px; font-size: 14px; min-height: 44px; }
  .zw-artnote { display: none; }
  .zw-chip, .zw-btn { font-size: 15px; padding: 6px 12px; }
  .zw-panel:not(.zw-panel--form) { padding: 12px 14px 18px; background: var(--veil); border: 1px solid var(--line); border-radius: 18px; }
  .zw-panel[data-open=""]:not(.zw-panel--form), .zw-panel:not([data-open]):not(.zw-panel--form) { display: none; }
  .zw-panel:not(.zw-panel--form) .zw-sec, .zw-panel:not(.zw-panel--form) .zw-legacy { display: none; }
  .zw-panel[data-open="sign"] .zw-sec[data-sec="sign"], .zw-panel[data-open="view"] .zw-sec[data-sec="view"], .zw-panel[data-open="flowers"] .zw-sec[data-sec="flowers"],
  .zw-panel[data-open="save"] .zw-sec[data-sec="save"], .zw-panel[data-open="sign"] .zw-legacy { display: grid; }
  .zw-panel .zw-close { display: inline-flex; justify-self: end; }
  .zw-panel .zw-sec { border: 0; padding: 4px 0; background: none; }
}
@media (prefers-reduced-motion: reduce) { .zw-panel { transition: none !important; } }

/* ── birthday pickers: month tiles and a day calendar (radio groups) ── */
.zw-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.zw-pick legend { color: var(--mist); font-size: 15px; margin-bottom: 6px; padding: 0; }
.zw-pick-grid { display: grid; gap: 6px; }
.zw-months .zw-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zw-days .zw-pick-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.zw-tile { display: grid; place-items: center; gap: 2px; min-height: 44px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--night); cursor: pointer; text-align: center; }
.zw-tile b { font-weight: 400; font-size: 15px; }
.zw-tile small { color: var(--gold); font-family: "Segoe UI Symbol", "Noto Sans Symbols", serif; font-size: 13px; letter-spacing: .1em; }
.zw-tile:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--night)); }
.zw-tile:has(input:focus-visible) { outline: 2px solid var(--lilac); outline-offset: 2px; }
.zw-tile:has(input:disabled) { opacity: .25; cursor: default; }
.zw-preview-sign { margin: 0; font-family: var(--ar-display); font-size: 26px; color: var(--gold); text-align: center; }

/* ── «اصنع منها بطاقة» ── */
.lc { display: grid; gap: 8px; min-width: 0; }
.lc h3 { margin: 0; }
/* four calm colour swatches: each a two-colour blend; the fourth follows the site's theme */
.lc-swatches { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lc-swatch { display: grid; gap: 4px; justify-items: center; padding: 0; border: 0; background: none; color: var(--mist); font: inherit; font-size: 12px; cursor: pointer; min-width: 56px; }
.lc-chip { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ffffff22; transition: transform .25s; }
.lc-swatch--site .lc-chip { box-shadow: inset 0 0 0 3px var(--night); outline: 1px dashed var(--line); outline-offset: 2px; }
.lc-swatch[aria-pressed="true"] { color: var(--ink); }
.lc-swatch[aria-pressed="true"] .lc-chip { outline: 2px solid var(--gold); outline-offset: 3px; transform: scale(1.04); }
.lc-swatch:focus-visible { outline: none; } .lc-swatch:focus-visible .lc-chip { outline: 2px solid var(--lilac); outline-offset: 3px; }
.lc-row { display: flex; flex-wrap: wrap; gap: 10px; }
.lc { display: grid; gap: 14px; }
.lc-preview { width: 100%; max-width: 300px; height: auto; justify-self: center; border-radius: 10px; }

/* ── Interactive Triangles (experiment 01) ── */
.mo { display: grid; gap: 12px; min-width: 0; }
.mo-stage { position: relative; min-width: 0; }
/* «ملء الشاشة» (v27): the button sits in the stage's corner; full screen shows the canvas as large as fits, on the night */
.lc-full { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 2; }
.lc-full.lc-full--on { position: fixed; inset-block-start: max(16px, env(safe-area-inset-top)); inset-inline-start: 16px; width: auto; height: 40px; padding: 0 16px; gap: 8px; display: inline-flex; align-items: center; border-radius: 999px; font: inherit; font-size: 15px; border-color: var(--gold); color: var(--gold); }
:is(.mo-stage, .zw-stage):fullscreen, .lc-is-full { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: var(--night); padding: 12px; margin: 0; }
:is(.mo-stage, .zw-stage):fullscreen canvas, .lc-is-full canvas { width: min(100%, calc(100vh - 24px)) !important; height: auto !important; max-height: calc(100vh - 24px); aspect-ratio: 1 / 1; }
.lc-is-full { height: 100dvh; }
html.lc-lock, html.lc-lock body { overflow: hidden; }
.mo-canvas { display: block; width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--veil) 80%, transparent), var(--night-2)); touch-action: none; outline-offset: 4px; }
.mo-help { margin: 0; font-size: 14px; color: var(--mist); }
.mo-controls { display: grid; gap: 12px; }
.mo-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.mo-mode { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--night-2); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; min-height: 36px; }
.mo-mode svg { width: 20px; height: 20px; color: var(--lilac); }
.mo-mode[aria-pressed="true"] { border-color: var(--gold); }
.mo-mode[aria-pressed="true"] svg { color: var(--gold); }
.mo-mode[aria-disabled="true"] { opacity: .5; cursor: default; }
.mo-pad, .mo-look { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mo-look { display: grid; }
.mo input[type=range] { width: 100%; accent-color: var(--gold); }

/* ── Your Triangle (shares the Zodiac Window layout and controls) ── */
.yt-canvas { aspect-ratio: 1 / 1; touch-action: none; }
.yt-sub { margin: 0; color: var(--gold); font-family: var(--ar-display); font-size: 22px; }
.yt-card { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--gold); border-radius: 14px; background: var(--night-2); }
.yt-card b { font-weight: 400; font-size: 18px; }
.yt-card small { color: var(--mist); font-family: var(--latin, serif); direction: ltr; text-align: start; }
.yt-zoom { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.yt-zoom .yt-size { flex: 1; min-width: 160px; }
/* (v27) one calm panel: sections divided by hairlines, buttons at their own size in rows, a small eyebrow per section */
.yt .yt-panel { gap: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--night-2); overflow: hidden; align-self: start; }
.yt .yt-panel > .zw-sec { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; padding: 16px 18px; }
.yt .yt-panel > .zw-sec:first-child { border-top: 0; }
.yt .yt-panel > .zw-sec > :is(h3, p, details, ol, label, div, section, .yt-progress) { flex-basis: 100%; }
.yt .yt-panel .zw-sec h3 { font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--mist); text-transform: uppercase; margin: 0 0 2px; }
.yt-top { display: flex !important; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.yt-acts { display: flex; gap: 14px; }
.yt-acts .zw-link, .yt .yt-panel .zw-link { border: 0; background: none; min-height: 0; padding: 4px 2px; font-size: 13px; }
.yt-acts .zw-link[aria-disabled="true"] { opacity: .45; }
.yt-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--night); }
.yt-seg .zw-chip { border: 0; background: none; min-height: 32px; padding: 4px 16px; }
.yt-seg .zw-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.yt-confirm { display: flex !important; flex-wrap: wrap; gap: 10px; align-items: center; }
.yt .yt-panel details > .zw-seg, .yt .yt-panel details > label { margin-top: 10px; }
.yt-progress { display: flex !important; gap: 5px; }
.yt-progress span { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.yt-progress span.on { background: linear-gradient(90deg, var(--gold), var(--gold-deep)); }
.yt-notebook { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.yt-notebook li { line-height: 1.5; font-size: 15px; }
.yt-notebook li::marker { color: var(--gold-deep); font-family: var(--latin, serif); }
.yt-notebook .zw-link { margin-inline-start: 10px; }
.yt-notebook b { color: var(--gold); font-weight: 500; }
.yt input[type=range] { width: 100%; accent-color: var(--gold); }
@media (max-width: 759px) {
  .yt .yt-canvas { height: auto; width: 100%; max-height: none; }
  .yt .zw-panel { display: grid !important; padding: 0; background: none; border: 0; }
  .yt .zw-panel .zw-sec { display: grid !important; border: 1px solid var(--line); padding: 14px; background: var(--night-2); }
  .yt .zw-artnote { display: block; }
}
