@font-face { font-family: "Cairo"; src: url("fonts/cairo-arabic-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cairo"; src: url("fonts/cairo-latin-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }

:root {
  --ground: #f4efff;
  --card: #ffffff;
  --ink: #1e1433;
  --soft: #5e5478;
  --line: #ddd4f2;
  --accent: #f59f00;
  --on-accent: #1e1433;
  --ui: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ground: #120e1f; --card: #1c1630; --ink: #f4efff; --soft: #ada3c7; --line: #2f2750; color-scheme: dark; }
}
:root[data-theme="dark"] { --ground: #120e1f; --card: #1c1630; --ink: #f4efff; --soft: #ada3c7; --line: #2f2750; color-scheme: dark; }

/* Board themes */
.th-0 { --b-bg: #0b1430; --b-card: #16224a; --b-digit: #f2cf6e; --b-label: #a9b4d6; --b-title: #ffffff; }
.th-1 { --b-bg: #f3e3c3; --b-card: #fff6e3; --b-digit: #9a3b1b; --b-label: #7a5a3a; --b-title: #4a2410; }
.th-2 { --b-bg: #0f3d2e; --b-card: #165a43; --b-digit: #c8f7dc; --b-label: #9fd3b8; --b-title: #ffffff; }
.th-3 { --b-bg: #fde4ec; --b-card: #fff4f7; --b-digit: #8e1840; --b-label: #9c5a70; --b-title: #5c0f2a; }
.th-4 { --b-bg: #0d0d0d; --b-card: #1c1c1c; --b-digit: #ffffff; --b-label: #9a9a9a; --b-title: #ffffff; }
.th-5 { --b-bg: #0e7c86; --b-card: #12939e; --b-digit: #ffffff; --b-label: #d2f3f5; --b-title: #ffffff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; background: var(--ground); color: var(--ink); font: 400 16px/1.6 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.make { display: flex; flex-direction: column; min-height: 100dvh; }
.bar { display: flex; align-items: baseline; gap: 4px 20px; flex-wrap: wrap; padding: 16px 28px 6px; }
.brand { margin: 0; font-size: 28px; font-weight: 800; }
.purpose { flex: 1; margin: 0; font-size: 18px; color: var(--soft); font-weight: 600; }
.bar-meta { color: var(--soft); font-size: 13px; }
.bar-meta .lang { margin-inline-start: 12px; unicode-bidi: isolate; }
.theme { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-start: 10px; padding: 0; border: 1.5px solid var(--line); border-radius: 999px; background: none; color: var(--ink); cursor: pointer; vertical-align: middle; }
.theme:hover { border-color: var(--accent); color: var(--accent); }
.theme svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun, .theme[data-dark="true"] .moon { display: none; }
.theme[data-dark="true"] .sun { display: block; }

.studio { flex: 1; display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 18px; padding: 8px 28px 20px; }
.panel { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.label { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--soft); }

.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.preset { display: grid; gap: 0; padding: 8px 6px; border: 2px solid var(--line); border-radius: 12px; background: none; text-align: center; line-height: 1.3; }
.preset b { font-size: 15px; }
.preset small { color: var(--soft); font-size: 12px; }
.preset:hover { border-color: var(--accent); }
.preset[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.name { height: 42px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--ground); }
.name:focus { outline: none; border-color: var(--accent); }
/* Date picker: three steps, one grid at a time */
.picker { display: grid; gap: 6px; }
.steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--ground); }
.steps button { display: grid; gap: 0; padding: 4px 6px; border: 0; border-radius: 9px; background: none; line-height: 1.25; }
.steps small { color: var(--soft); font-size: 11px; font-weight: 700; }
.steps b { font-size: 16px; }
.steps button[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 4px rgb(0 0 0 / 0.14), inset 0 -3px 0 var(--accent); }
.choices { display: grid; gap: 4px; min-height: 196px; align-content: start; }
.choices.year { grid-template-columns: repeat(3, 1fr); }
.choices.month { grid-template-columns: repeat(3, 1fr); }
.choices.day { grid-template-columns: repeat(7, 1fr); gap: 2px; }
.choices button { height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--ground); font-size: 15px; font-weight: 700; }
.choices.day button { height: 30px; font-size: 14px; font-weight: 600; background: none; }
.choices button:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--accent); }
.choices button:disabled { opacity: 0.3; cursor: default; }
.choices button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.choices .dow { color: var(--soft); font-size: 12px; text-align: center; }
.time-row { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--soft); font-size: 14px; }
.time-row input { height: 38px; padding: 0 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--ground); font-weight: 700; }
.themes { display: flex; gap: 8px; }
.look { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--b-bg) 50%, var(--b-digit) 50%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15); }
.look[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.link { padding: 0; border: 0; background: none; color: var(--soft); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.reset { align-self: flex-start; margin-top: 4px; }

.side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.primary { height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.ghost { display: inline-flex; align-items: center; height: 46px; padding: 0 16px; border: 2px solid var(--line); border-radius: 12px; background: none; font-weight: 700; text-decoration: none; }
.ghost:hover { border-color: var(--ink); }
.hint { margin: 0; color: var(--soft); font-size: 14px; }

/* The board */
.board-wrap { flex: 1; display: grid; place-items: center; min-height: 360px; padding: 28px 20px; border-radius: 24px; background: var(--b-bg); color: var(--b-title); transition: background 0.3s; overflow: hidden; position: relative; }
.board { display: grid; justify-items: center; gap: 14px; width: 100%; text-align: center; }
.board h2 { margin: 0; font-size: clamp(26px, 3.4vw, 46px); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.units { display: flex; gap: clamp(8px, 1.4vw, 18px); }
.unit { display: grid; gap: 6px; justify-items: center; }
.digits { display: flex; justify-content: center; direction: ltr; min-width: clamp(64px, 8.5vw, 130px); padding: 8px 10px; border-radius: 16px; background: var(--b-card); color: var(--b-digit); font: 800 clamp(40px, 6vw, 92px)/1.1 var(--ui); font-variant-numeric: tabular-nums; box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.15); }
.unit > span { color: var(--b-label); font-weight: 700; font-size: clamp(13px, 1.2vw, 17px); }
.digits .d { display: inline-block; width: 0.62em; text-align: center; }
.digits .d.tick { animation: tick 0.28s ease-out; }
@keyframes tick { from { transform: translateY(-10%); opacity: 0.35; } }
.when { margin: 0; color: var(--b-label); font-size: clamp(14px, 1.3vw, 18px); }
.done h2 { font-size: clamp(34px, 5vw, 72px); color: var(--b-digit); }
.spark { position: absolute; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; }

/* Viewing a shared one */
.view { display: flex; flex-direction: column; min-height: 100dvh; background: var(--b-bg); }
.board-wrap.big { border-radius: 0; min-height: 0; }
.board-wrap.big .board h2 { font-size: clamp(30px, 5vw, 70px); }
.board-wrap.big .digits { min-width: clamp(70px, 13vw, 210px); font-size: clamp(44px, 9.5vw, 150px); border-radius: 22px; }
.board-wrap.big .unit > span { font-size: clamp(14px, 1.8vw, 24px); }
.view-foot { display: flex; justify-content: space-between; margin: 0; padding: 12px 24px; color: var(--b-label); font-size: 14px; }
.view-foot a { color: var(--b-title); font-weight: 700; }

.manual { width: min(560px, calc(100vw - 24px)); padding: 18px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); }
.manual::backdrop { background: rgb(0 0 0 / 0.45); }
.manual p { margin: 0 0 10px; }
.manual input { width: 100%; height: 42px; padding: 0 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--ground); font-size: 13px; }
.manual form { display: flex; justify-content: flex-end; margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--ground); font-weight: 700; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 5; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { padding: 4px 10px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .digits .d.tick { animation: none; }
  .toast, .board-wrap { transition: none; }
}

@media (max-width: 900px) {
  .bar, .studio { padding-inline: 16px; }
  .purpose { flex-basis: 100%; order: 3; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .side { order: -1; }
  .board-wrap { min-height: 260px; padding: 20px 12px; }
  .share > * { flex: 1 1 40%; justify-content: center; }
  .view-foot { flex-direction: column; align-items: center; gap: 4px; }
}

/* Questions under the tool: for people who scroll, and for search engines */
.faq { max-width: 920px; margin: 0 auto; padding: 56px 20px 64px; }
.faq h2 { margin: 0 0 20px; font: 800 22px/1.2 var(--ui); }
.faq-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px 32px; }
.faq h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.faq p { margin: 0; color: var(--soft); line-height: 1.6; }
