/* vakitadasi.app v2 — tüm renkler uygulama paletinin rollerinden gelir (js/boot.js ayarlar):
   --bg --card --sheet --stroke --text --dim --track --fill --hl --dot --accent --on
   Sabit renk yok; yerel font (SIL OFL 1.1), dış istek yok. */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  /* JS çalışmazsa: Orman / Aydınlık (uygulamanın varsayılanı) */
  --bg: #F0F7F1; --card: #FBFDFB; --sheet: #FBFDFB; --stroke: #D7E7DA; --text: #122616; --dim: #738C78;
  --track: #CCE0D0; --fill: #4DCB66; --hl: #DFF6E4; --dot: #A2B9A7; --accent: #29993F; --on: #FFFFFF;
  --r: 22px; --r-sm: 14px;
  --ui: "Poppins", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[dir="rtl"] { --ui: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: var(--ui); color: var(--text); background: var(--bg); line-height: 1.5; overflow-wrap: anywhere; }
h1, h2, p, ol, dl, dd { margin: 0; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--accent); color: var(--on); padding: 8px 14px; border-radius: 10px; z-index: 9; }
.skip:focus { top: 10px; }

/* ---------- üst çubuk ---------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--stroke); }
.top__in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark__icon { border-radius: 11px; flex: none; }
.mark__name { font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; direction: ltr; unicode-bidi: isolate; }
.chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 3px 10px; border-radius: 99px; }
.chip--demo { background: var(--hl); color: var(--accent); white-space: nowrap; }
.chip--sample { color: var(--dim); border: 1px dashed var(--dot); white-space: nowrap; }
.lang { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--dim); }
.lang select { appearance: none; -webkit-appearance: none; background-color: var(--card); color: var(--text); border: 1px solid var(--stroke);
  border-radius: 12px; padding: 7px 34px 7px 12px; min-height: 40px; font-size: .9rem; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .lang select { padding: 7px 12px 7px 34px; background-position: 17px 52%, 12px 52%; }

/* ---------- segment (uygulamadaki segment$main) ---------- */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: var(--r-sm); background: var(--sheet); border: 1px solid var(--stroke); max-width: 100%; }
.seg--full { width: 100%; }
.seg__b { flex: 1 1 0; min-width: 0; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; min-height: 40px;
  font-size: .86rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg__b[aria-pressed="true"] { background: var(--accent); color: var(--on); }

/* ---------- giriş ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hero { position: relative; margin: 22px 0 18px; border-radius: 28px; overflow: hidden; background: var(--card); border: 1px solid var(--stroke); min-height: 300px; display: flex; }
.hero__art { position: absolute; inset: auto 0 0 0; width: 100%; height: 72%; }
[dir="rtl"] .hero__art { transform: scaleX(-1); }
.art-sun { fill: var(--hl); }
.art-h1 { fill: color-mix(in srgb, var(--fill) 45%, var(--card)); }
.art-h2 { fill: color-mix(in srgb, var(--accent) 60%, var(--card)); }
.art-h3 { fill: color-mix(in srgb, var(--accent) 82%, var(--card)); }
.hero__txt { position: relative; padding: 34px 34px 120px; max-width: 640px; min-width: 0; }
.hero__brand { font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.05; font-weight: 600; letter-spacing: -.025em; }
.hero__tag { margin-top: 10px; font-size: clamp(1rem, 2vw, 1.2rem); color: var(--dim); max-width: 34ch; }
.notice { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--sheet); border: 1px solid var(--stroke); display: grid; gap: 6px; justify-items: start; font-size: .92rem; }
.notice__sub { color: var(--dim); font-size: .86rem; }

/* ---------- kart ızgarası ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); padding-bottom: 28px; }
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card--times { grid-column: span 7; }
.card--theme { grid-column: span 5; }
.card--widget { grid-column: span 6; }
.card--zikir { grid-column: span 6; align-items: center; text-align: center; }
.card--zikir .card__head { align-self: stretch; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card h2 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
.hint { font-size: .82rem; color: var(--dim); }
.sec { font-size: .72rem; font-weight: 600; letter-spacing: .08em; color: var(--dim); margin-top: 4px; }

/* vakitler */
.dates { font-size: .9rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: 0 6px; }
.city { font-weight: 500; font-size: .95rem; }
.count { background: var(--hl); border-radius: 18px; padding: 16px 18px; display: grid; gap: 4px; }
.count__lbl { font-size: .9rem; color: var(--dim); }
.count__val { font-size: clamp(2.1rem, 6vw, 3.2rem); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.15; text-align: start; }
[dir="rtl"] .count__val { text-align: right; }
.count__bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.count__bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.count__next { font-size: .86rem; color: var(--dim); }
.times { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.times button { width: 100%; border: 1px solid var(--stroke); background: var(--sheet); border-radius: var(--r-sm); padding: 10px 12px; text-align: start; display: grid; gap: 2px; min-height: 58px; }
.times .t__n { font-size: .82rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.times .t__v { font-weight: 600; font-variant-numeric: tabular-nums; }
.times button.is-next { border-color: var(--accent); }
.times button[aria-pressed="true"] { background: var(--accent); color: var(--on); border-color: var(--accent); }
.times button[aria-pressed="true"] .t__n { color: inherit; }

/* palet ızgarası (uygulamadaki paintTile: zemin=BG, kenar=seçiliyse ACCENT 2px yoksa STROKE 1px, noktalar ACCENT/FILL/HL) */
.pals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pal { border: 0; background: none; padding: 0; display: grid; gap: 6px; justify-items: stretch; text-align: center; min-width: 0; border-radius: 16px; }
.pal__pv { height: 60px; border-radius: 16px; border: 1px solid; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pal[aria-pressed="true"] .pal__pv { border-width: 2px; }
.pal__d { width: 16px; height: 16px; border-radius: 50%; border: 1px solid; }
.pal__n { font-size: .8rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal[aria-pressed="true"] .pal__n { color: var(--text); font-weight: 600; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 8px 4px; min-height: 40px; }
.link--start { align-self: flex-start; }

/* widget */
.wstage { flex: 1; display: grid; place-items: center; padding: 22px 12px; border-radius: 18px; min-height: 230px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 78%, var(--bg)), color-mix(in srgb, var(--accent) 55%, var(--text))); }
.widget { width: min(100%, 340px); border-radius: 26px; padding: 16px 18px; display: grid; gap: 4px; min-width: 0; }
.widget__top { display: flex; align-items: center; gap: 8px; font-size: .82rem; min-width: 0; }
.widget__ic { border-radius: 8px; flex: none; }
.widget__next { font-size: .95rem; font-weight: 500; margin-top: 4px; }
.widget__cd { font-size: 2.1rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; text-align: start; }
[dir="rtl"] .widget__cd { text-align: right; }
.widget__row { list-style: none; padding: 0; margin-top: 8px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; text-align: center; }
.widget__row li { font-size: .58rem; line-height: 1.2; border-radius: 9px; padding: 5px 1px; display: flex; flex-direction: column; justify-content: space-between; gap: 2px;
  overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
.widget__row b { display: block; font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.w--classic { background: var(--card); color: var(--text); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--text) 50%, transparent); }
.w--classic .widget__cd { color: var(--accent); }
.w--classic .widget__row li.on { background: var(--accent); color: var(--on); }
.w--soft { background: color-mix(in srgb, var(--card) 62%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text); border-radius: 34px; }
.w--soft .widget__row li.on { background: var(--hl); color: var(--accent); }
.w--framed { background: transparent; border: 2px solid var(--on); color: var(--on); border-radius: 20px; }
.w--framed .widget__row li.on { background: var(--on); color: var(--accent); }

/* zikirmatik */
.targets { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tg { border: 1px solid var(--stroke); background: var(--sheet); border-radius: 99px; padding: 7px 16px; min-height: 40px; min-width: 52px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tg[aria-pressed="true"] { background: var(--accent); color: var(--on); border-color: var(--accent); }
.tap { position: relative; width: 200px; height: 200px; max-width: 100%; border-radius: 50%; border: 0; background: var(--hl); display: grid; place-content: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; transition: transform .08s; }
.tap:active { transform: scale(.97); }
.tap__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .tap__ring { transform: rotate(-90deg) scaleY(-1); }
.tap__bg { fill: none; stroke: var(--track); stroke-width: 6; }
.tap__fg { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .2s; }
.tap__n { position: relative; font-size: 3.4rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tap__l { position: relative; font-size: .86rem; color: var(--dim); margin-top: 6px; }
.zstats { display: flex; gap: 28px; justify-content: center; }
.zstats dt { font-size: .7rem; letter-spacing: .06em; color: var(--dim); }
.zstats dd { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* alt bilgi */
.foot { max-width: 1180px; margin: 0 auto; padding: 8px 20px 40px; display: grid; gap: 4px; color: var(--dim); font-size: .82rem; }
.foot__p { font-weight: 600; color: var(--text); }
.foot a { color: var(--accent); display: inline-block; padding: 3px 0; min-height: 24px; }

/* ---------- duyarlı ---------- */
@media (max-width: 980px) {
  .card--times, .card--theme { grid-column: span 12; }
}
@media (max-width: 720px) {
  .top { position: static; }
  .top__in { padding: 8px 14px; }
  .mark { width: 100%; }
  .chip--demo { white-space: normal; text-align: center; line-height: 1.25; }
  .lang { width: 100%; }
  .lang select { flex: 1; }
  main { padding: 0 14px; }
  .hero { margin-top: 14px; min-height: 0; border-radius: 22px; }
  .hero__txt { padding: 24px 18px 96px; }
  .hero__art { height: 46%; }
  .grid { gap: 12px; }
  .card { padding: 16px; }
  .card--widget, .card--zikir { grid-column: span 12; }
  .times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  main { padding: 0 10px; }
  .card { padding: 14px; }
  .hero__txt { padding: 20px 14px 90px; }
  .mark__name { font-size: .98rem; }
  .seg__b { padding: 8px 4px; font-size: .8rem; }
  .pals { gap: 6px; }
  .pal__d { width: 13px; height: 13px; }
  .pal__pv { gap: 4px; }
  .tap { width: 172px; height: 172px; }
  .widget { padding: 14px 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
