@import url('themes.css');
/* ═══════════════════════════════════════════════════════════════
   SendenSana — Akşam Muhasebesi (js/EveningReview.js ile birlikte)
   Renkler YALNIZ css/themes.css belirteçlerinden; Ses Hattı görünümü
   (Sessiz Oturum / Tesbih ile aynı iskelet: sahne + yan panel).
   ═══════════════════════════════════════════════════════════════ */
.er {
  --er-display: 'Bricolage Grotesque', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --er-body: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --er-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;

  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: min(78vh, 720px);
  background: radial-gradient(80% 70% at 40% 30%, var(--th-bg2), var(--th-bg1) 74%);
  color: var(--th-ink);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--er-body);
  text-align: start;
}
.er *, .er *::before, .er *::after { box-sizing: border-box; }
.er [hidden] { display: none !important; }

.er-main { min-width: 0; padding: 34px 34px 30px; display: flex; flex-direction: column; }
.er-view { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 640px; margin-inline: auto; }

.er-head { display: grid; gap: 8px; }
.er-title {
  margin: 0; font-family: var(--er-display); font-weight: 700; font-size: clamp(1.7rem, 4.6vw, 2.3rem);
  letter-spacing: -0.02em; line-height: 1.12; color: var(--th-ink); outline: none;
}
.er-kicker {
  margin: 0; font-family: var(--er-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.01em; color: var(--th-ink); line-height: 1.2;
}
.er-tag { margin: 0; color: var(--th-soft); font-size: 1rem; line-height: 1.6; }
.er-lead { margin: 0; color: var(--th-soft); font-size: 1.08rem; line-height: 1.6; text-align: center; }
.er-src { margin: 0; color: var(--th-faint); font-size: 0.84rem; line-height: 1.5; font-style: italic; }
.er-muh {
  margin: 0; padding: 12px 14px; border-inline-start: 2px solid var(--th-hold); border-radius: 4px;
  background: var(--th-chip); color: var(--th-muted); font-size: 0.9rem; line-height: 1.55;
}

/* ── Yol kartları ── */
.er-styles { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.er-styles legend {
  margin-bottom: 10px; padding: 0; font-family: var(--er-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--th-muted);
}
.er-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.er-card { position: relative; display: block; cursor: pointer; }
.er-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.er-card__body {
  display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 16px;
  background: var(--th-panel); border: 1px solid var(--th-line); transition: border-color 0.15s, background 0.15s;
}
.er-card__name { font-family: var(--er-display); font-weight: 700; font-size: 1.08rem; color: var(--th-ink); }
.er-card__short { font-size: 0.86rem; line-height: 1.4; color: var(--th-muted); }
.er-card:hover .er-card__body { border-color: var(--th-line2); }
.er-card input:checked + .er-card__body { border-color: var(--th-in); background: var(--th-card2); box-shadow: inset 0 0 0 1px var(--th-in); }
.er-card input:focus-visible + .er-card__body { outline: 2px solid var(--th-in); outline-offset: 2px; }

/* ── Düğmeler ── */
.er-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.er-actions--sm { gap: 8px; }
.er-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border: 1px solid var(--th-line); background: var(--th-panel); color: var(--th-ink);
  font: 600 0.95rem/1.2 var(--er-body); min-height: 46px; padding: 11px 22px; border-radius: 999px; cursor: pointer;
}
.er-btn:hover { border-color: var(--th-line2); }
.er-btn--main { background: var(--th-chip-on); color: var(--th-chip-on-ink); border-color: transparent; padding-inline: 28px; }
.er-btn--main:hover { filter: brightness(1.08); }
.er-btn--danger { border-color: var(--th-hold); color: var(--th-ink); }
.er-actions--sm .er-btn { min-height: 38px; padding: 7px 16px; font-size: 0.88rem; }
.er-btn:focus-visible, .er-link:focus-visible, .er-day:focus-visible, .er-entry summary:focus-visible { outline: 2px solid var(--th-in); outline-offset: 2px; }
.er-link {
  appearance: none; background: transparent; border: 1px solid var(--th-line); color: var(--th-ink);
  font: 500 0.84rem/1.2 var(--er-body); min-height: 36px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.er-link:hover { border-color: var(--th-in); }
.er-link--danger { color: var(--th-muted); }
.er-link--danger:hover { border-color: var(--th-hold); color: var(--th-ink); }

/* ── Yazma ── */
.er-form { display: grid; gap: 18px; }
.er-fields { display: grid; gap: 18px; }
.er-field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.er-field label, .er-field legend { font-weight: 600; font-size: 1rem; line-height: 1.45; color: var(--th-ink); padding: 0; }
.er-field--list legend { margin-bottom: 8px; }
.er-numrow { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.er-num {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: 7px; border-radius: 50%;
  border: 1px solid var(--th-line2); font-family: var(--er-mono); font-size: 0.82rem; color: var(--th-hold);
}
.er textarea {
  width: 100%; min-height: 46px; resize: vertical; padding: 11px 14px; border-radius: 14px;
  border: 1px solid var(--th-line); background: var(--th-chip); color: var(--th-ink);
  font: 400 1rem/1.55 var(--er-body); overflow-wrap: anywhere;
}
.er textarea:focus { outline: none; border-color: var(--th-in); box-shadow: 0 0 0 1px var(--th-in); }
.er-opt { font-weight: 400; color: var(--th-faint); font-size: 0.86rem; }
.er-hint { margin: 0; color: var(--th-faint); font-size: 0.82rem; line-height: 1.5; }
.er-hint--care {
  padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--th-line2); color: var(--th-muted);
}
.er-field--intent { padding-top: 14px; border-top: 1px solid var(--th-line); }
.er-err { margin: 0; color: var(--th-hold); font-weight: 600; font-size: 0.9rem; }
.er-timedone {
  margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--th-chip); border: 1px solid var(--th-line);
  color: var(--th-soft); line-height: 1.55;
}

/* ── Geriye sarma ── */
.er-rewind { align-items: center; text-align: center; }
.er-rewind .er-head { justify-items: center; }
.er-rewind .er-tag { max-width: 46ch; }
.er-mins { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.er-chip { position: relative; cursor: pointer; }
.er-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.er-chip input:disabled { cursor: default; }
.er-chip span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  background: var(--th-chip); border: 1px solid var(--th-line); color: var(--th-ink); font-size: 0.88rem;
}
.er-chip input:checked + span { background: var(--th-chip-on); color: var(--th-chip-on-ink); border-color: transparent; font-weight: 600; }
.er-chip input:disabled + span { opacity: 0.55; }
.er-chip input:focus-visible + span { outline: 2px solid var(--th-in); outline-offset: 2px; }
.er-dial { position: relative; width: min(100%, 300px); aspect-ratio: 1; }
.er-ring { display: block; width: 100%; height: 100%; overflow: visible; }
.er-ring__track { fill: none; stroke: var(--th-line); stroke-width: 1.5; }
.er-ring__prog {
  fill: none; stroke: var(--th-out); stroke-width: 2.5; stroke-linecap: round;
  transform: rotate(-90deg) scaleY(-1); transform-origin: 100px 100px; transition: stroke-dashoffset 0.3s linear;
}
.er-dial__c {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20%;
}
.er-cue {
  font-family: var(--er-display); font-weight: 700; font-size: clamp(1.15rem, 3.6vw, 1.45rem); line-height: 1.25; color: var(--th-ink);
  transition: opacity 0.6s;
}
.er-time {
  font-family: var(--er-mono); font-size: 1.05rem; color: var(--th-muted); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate;
}
.er--rolling .er-ring__prog { stroke: var(--th-in); }
.er-rewind .er-actions { justify-content: center; }

/* ── Kapanış ── */
.er-closing { align-items: center; justify-content: center; text-align: center; flex: 1; gap: 16px; padding-block: 24px; }
.er-closing .er-actions { justify-content: center; }
.er-moon {
  width: 84px; aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset -14px -6px 0 0 var(--th-hold); opacity: 0.9; transform: rotate(-20deg);
}

/* ── Yan panel: geçmiş ── */
.er-panel {
  display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 26px 22px;
  background: var(--th-panel); border-inline-start: 1px solid var(--th-line);
}
.er-ptitle { margin: 0; font-family: var(--er-display); font-weight: 700; font-size: 1.2rem; color: var(--th-ink); }
.er-month { display: grid; gap: 8px; }
.er-month__label { font-family: var(--er-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--th-muted); }
.er-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; }
.er-day {
  appearance: none; display: block; aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 5px;
  border: 1px solid var(--th-line); background: transparent;
}
.er-day.on { background: var(--th-in); border-color: transparent; cursor: pointer; }
.er-day.today { box-shadow: 0 0 0 1px var(--th-hold); }
.er-list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-inline-end: 2px; }
.er-empty { margin: 0; color: var(--th-faint); font-size: 0.88rem; line-height: 1.5; }
.er-date { margin: 8px 0 0; font-family: var(--er-mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--th-hold); }
.er-entry { border-radius: 14px; border: 1px solid var(--th-line); background: var(--th-chip); }
.er-entry summary {
  display: grid; gap: 2px; padding: 10px 12px; cursor: pointer; list-style: none; border-radius: 14px;
}
.er-entry summary::-webkit-details-marker { display: none; }
.er-entry__style { font-weight: 600; font-size: 0.9rem; color: var(--th-ink); }
.er-entry__peek { font-size: 0.82rem; color: var(--th-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-entry[open] .er-entry__peek { display: none; }
.er-entry__body { display: grid; gap: 10px; padding: 0 12px 12px; }
.er-qa { display: grid; gap: 3px; }
.er-q { font-size: 0.8rem; color: var(--th-muted); line-height: 1.4; }
.er-a { font-size: 0.92rem; line-height: 1.5; color: var(--th-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.er-qa--intent { padding-top: 8px; border-top: 1px solid var(--th-line); }
.er-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.er-confirm { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--th-hold); background: var(--th-chip); }
.er-confirm p { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--th-ink); }
.er-status { margin: 0; min-height: 1.2em; font-size: 0.84rem; color: var(--th-in); }
.er-note { margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--th-line); color: var(--th-muted); font-size: 0.78rem; line-height: 1.5; }

/* ── Dar ekran ── */
@media (max-width: 860px) {
  .er { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 20px; }
  .er-main { padding: 26px 16px 24px; }
  .er-panel { border-inline-start: 0; border-top: 1px solid var(--th-line); background: transparent; padding: 22px 16px; }
  .er-list { max-height: none; }
}
@media (max-width: 520px) {
  .er-cards { grid-template-columns: minmax(0, 1fr); }
  .er-dial { width: min(100%, 250px); }
}
@media (prefers-reduced-motion: reduce) {
  .er-ring__prog, .er-cue, .er-card__body { transition: none; }
}
.er--still .er-ring__prog, .er--still .er-cue { transition: none; }
/* Bitişik / hece yazılarında harf aralığı ve eş-genişlikli yazı kelimeyi koparır → gövde yazısı */
.er:is(:lang(ar), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) :is(.er-styles legend, .er-month__label, .er-date) {
  letter-spacing: 0; font-family: var(--er-body); text-transform: none; font-size: 0.82rem;
}
.er:is(:lang(ar), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) :is(.er-title, .er-kicker) { letter-spacing: 0; }
.er:lang(ar) .er-src { font-style: normal; }
