/* ============================================================================
   Bizim Köşemiz — application layout & components
   Built on the İkimiz design tokens (see tokens.css).
   ========================================================================== */

/* ------------------------------------------------------------------ page --- */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface-page);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* thin, hidden scrollbars for the in-app scroll surfaces */
.bk-scroll::-webkit-scrollbar { width: 0; height: 0; }
.bk-scroll { scrollbar-width: none; }

/* on data-update re-renders, skip entrance animations (no flashing / no scroll jump) */
.ik-noanim .ik-reveal,
.ik-noanim .ik-reveal-scale { animation: none !important; opacity: 1 !important; transform: none !important; }

@keyframes bk-drift { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

/* --------------------------------------------------------------- toolbar --- */
.toolbar {
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
}
.toolbar__brand h1 { font-size: 30px; margin: 0; }
.toolbar__brand .sub {
  font-family: var(--font-script);
  font-size: 21px;
  color: var(--accent);
  margin: 2px 0 0;
}
.toolbar__controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toolbar__group { display: flex; flex-direction: column; gap: 6px; }

/* pill segmented control (whose view) */
.seg {
  display: flex;
  gap: 4px;
  background: var(--surface-sunken);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.seg button {
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.seg button.is-active {
  background: var(--surface-raised);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.pillbtn {
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.pillbtn:hover { background: var(--accent-soft); }
.iconbtn {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-secondary);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-soft);
}
.iconbtn:hover { background: var(--accent-soft); }

/* ----------------------------------------------------------------- stage --- */
.stage {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 16px 32px;
}

/* ----------------------------------------------------------------- phone --- */
.phone {
  width: 402px;
  height: min(858px, calc(100dvh - 150px));
  background: var(--ink-900);
  border-radius: 52px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  flex: none;
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--surface-page);
  border-radius: 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.statusbar {
  height: 44px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  z-index: 20; position: relative;
}
.statusbar .notch {
  width: 120px; height: 26px;
  background: var(--ink-900);
  border-radius: 0 0 16px 16px;
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
}
.statusbar .signal { letter-spacing: 1px; }

/* ----------------------------------------------------------------- intro --- */
.intro {
  position: absolute; inset: 0;
  background: linear-gradient(165deg, var(--ink-900), var(--navy-700) 60%, var(--navy-600));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 0 40px; overflow: hidden;
  z-index: 30;
}
.intro__float { position: absolute; }
.intro .eyebrow { color: var(--apricot-300); margin-bottom: 22px; }
.intro .name { font-family: var(--font-script); font-size: 56px; color: #fff; line-height: 1; margin-bottom: 18px; }
.intro h2 { color: #F7FAFF; font-size: 30px; margin: 0 0 20px; }
.intro p { color: var(--navy-200); font-size: 16px; max-width: 280px; margin: 0 0 40px; }
.intro__cta {
  display: inline-flex; align-items: center; gap: 10px;
  border: none; cursor: pointer;
  background: var(--apricot-400); color: var(--ink-900);
  font-family: var(--font-body); font-weight: 800; font-size: 17px;
  padding: 16px 34px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-fast) var(--ease-soft);
}
.intro__cta:active { transform: scale(.96); }
.intro__sign { font-family: var(--font-script); font-size: 20px; color: var(--apricot-300); margin-top: 26px; }

/* login role selector (on the intro-style gradient) */
.loginrole {
  border: none; cursor: pointer;
  padding: 9px 22px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  background: transparent; color: var(--navy-200);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.loginrole.is-active { background: var(--apricot-400); color: var(--ink-900); box-shadow: var(--shadow-sm); }
.intro input::placeholder { color: rgba(255,255,255,.55); }
.intro input:focus { outline: none; border-color: rgba(255,255,255,.5); }

/* inline delete button (message pool) */
.linkx { border: none; background: none; cursor: pointer; padding: 2px 4px; display: grid; place-items: center; border-radius: var(--radius-sm); flex: none; }
.linkx:hover { background: var(--surface-sunken); }

/* ------------------------------------------------------------- app chrome --- */
.appview { position: absolute; inset: 0; display: flex; flex-direction: column; }
.appheader {
  flex: none;
  padding: 6px 20px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface-page) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 15;
}
.appheader .brand { display: flex; align-items: baseline; gap: 8px; }
.appheader .brand .word { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--accent); }
.appheader .brand .hitap { font-family: var(--font-script); font-size: 15px; color: var(--text-muted); }
.appheader .tools { display: flex; gap: 8px; align-items: center; }
.hbtn {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  color: var(--text-secondary);
  display: grid; place-items: center; cursor: pointer;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text-on-accent);
  display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 800; font-size: 15px;
  border: none; cursor: pointer;
}

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.screen { padding: 22px 20px 32px; }
.screen--study { background: var(--surface-study); min-height: 100%; }

/* section heading block */
.head { margin-bottom: 20px; }
.head h2 { font-size: 28px; margin: 0 0 2px; }
.head .script { font-family: var(--font-script); font-size: 21px; color: var(--accent); margin: 0; }
.head .muted { color: var(--text-secondary); font-size: 14px; margin: 0; }
.head--center { text-align: center; }

.sectitle { margin: 0 0 12px; }

/* ------------------------------------------------------------ bottom nav --- */
.bottomnav {
  flex: none;
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 6px 14px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-raised);
  z-index: 15;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.navbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: none; cursor: pointer;
  padding: 4px 6px;
  color: var(--text-muted);
  font-size: 10px; font-weight: 700; font-family: var(--font-body);
  transition: color var(--dur-fast) var(--ease-soft);
}
.navbtn.is-active { color: var(--accent); }

/* -------------------------------------------------------------- buttons ---- */
.btn {
  border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 14px;
  padding: 12px 16px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), filter var(--dur-fast) var(--ease-soft);
}
.btn:active { transform: scale(.97); }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--text-on-accent); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--study { background: var(--study); color: #fff; }
.btn--study:hover { background: var(--study-hover); }
.btn--study-soft { background: var(--study-soft); color: var(--study-hover); }
.btn--warm-soft { background: var(--warm-soft); color: var(--apricot-600); }
.btn--ghost { background: var(--surface-card); color: var(--study-hover); border: 1px solid var(--border-strong); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.05); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--pill { border-radius: var(--radius-pill); }
.btn--sm { font-size: 13px; padding: 8px 14px; }

/* --------------------------------------------------------------- cards ----- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* dual counters (home) */
.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.counter { border-radius: var(--radius-lg); padding: 18px 16px; box-shadow: var(--shadow-sm); }
.counter--love { background: linear-gradient(160deg, var(--warm-soft), var(--apricot-300)); }
.counter--study { background: var(--surface-card); border: 1px solid var(--border-soft); }
.counter .num { font-family: var(--font-mono); font-size: 34px; font-weight: 500; line-height: 1; margin: 8px 0 4px; }
.counter--love .num { color: var(--ink-900); }
.counter--study .num { color: var(--study-hover); }
.counter .lbl { font-size: 13px; font-weight: 700; }
.counter--love .lbl { color: var(--ink-800); }
.counter--study .lbl { color: var(--text-secondary); }
.counter--love .ico { color: var(--apricot-600); }
.counter--study .ico { color: var(--study); }
.togetherline { text-align: center; font-family: var(--font-script); font-size: 19px; color: var(--study-hover); margin: 0 0 22px; }

/* daily message */
.dailymsg {
  background: var(--accent); color: var(--text-on-accent);
  border-radius: var(--radius-lg); padding: 22px 20px;
  box-shadow: var(--shadow-md); margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.dailymsg .quotebg { position: absolute; right: -10px; top: -8px; opacity: .18; }
.dailymsg .eyebrow { color: var(--navy-200); margin-bottom: 10px; }
.dailymsg p { font-family: var(--font-display); font-size: 20px; line-height: 1.35; margin: 0; color: #fff; }

/* goals list (home) */
.goalrow { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.goalrow .dot { width: 26px; height: 26px; border-radius: var(--radius-pill); display: grid; place-items: center; flex: none; background: var(--surface-sunken); }
.goalrow .dot.is-done { background: var(--sage-100); }
.goalrow .txt { flex: 1; font-size: 14px; color: var(--text-primary); }
.goalrow.is-done .txt { text-decoration: line-through; color: var(--text-muted); }
.goalrow .count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

.rowbetween { display: flex; align-items: center; justify-content: space-between; }

/* quick shortcuts */
.shortcuts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.shortcut {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 1px solid var(--border-soft); background: var(--surface-card);
  color: var(--accent); padding: 16px 8px;
  border-radius: var(--radius-md); cursor: pointer;
  box-shadow: var(--shadow-xs);
  font-size: 12px; font-weight: 700; font-family: var(--font-body);
  transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}
.shortcut:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* dashed manager card (Ömer pool) */
.card--dashed { border: 1px dashed var(--border-strong); background: var(--surface-card); }
.poolitem { font-size: 13.5px; color: var(--text-secondary); padding: 8px 0; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; }
.poolitem .ico { color: var(--warm); flex: none; }

/* --------------------------------------------------------- countdown ------- */
.countdown .row { display: flex; gap: 12px; }
.countdown.is-compact .row { gap: 8px; }
.countdown .unit {
  min-width: 68px; text-align: center;
  background: var(--surface-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); padding: 12px 10px; box-shadow: var(--shadow-sm);
}
.countdown.is-compact .unit { min-width: 48px; padding: 8px 6px; }
.countdown .v { font-family: var(--font-mono); font-size: 2rem; font-weight: 500; line-height: 1; color: var(--accent); }
.countdown.tone-study .v { color: var(--study-hover); }
.countdown.is-compact .v { font-size: 1.5rem; }
.countdown .u { font-size: var(--fs-caption); color: var(--text-muted); margin-top: 4px; letter-spacing: .05em; }

/* --------------------------------------------------------- pomodoro -------- */
.pomo { display: inline-flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
.pomo .modes {
  display: inline-flex; gap: 8px;
  background: var(--surface-sunken); padding: 4px; border-radius: var(--radius-pill);
}
.pomo .modes button {
  border: none; cursor: pointer; padding: 6px 18px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-body-sm);
  background: transparent; color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease-soft);
}
.pomo .modes button.is-active { background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.pomo-durs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: -6px; }
.pomo-durs button { border: 1px solid var(--border-soft); background: var(--surface-card); color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; padding: 5px 11px; border-radius: var(--radius-pill); cursor: pointer; transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft); }
.pomo-durs button:hover { background: var(--surface-sunken); }
.pomo-durs button.is-active { background: var(--study-soft); color: var(--study-hover); border-color: var(--study); font-weight: 700; }
.pomo .dial { position: relative; }
.pomo .dial svg { transform: rotate(-90deg); display: block; }
.pomo .track { stroke: var(--progress-track); }
.pomo .fill { transition: stroke-dashoffset 1s linear, stroke var(--dur) var(--ease-soft); }
.pomo .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.pomo .clock { font-family: var(--font-mono); font-weight: 500; color: var(--text-primary); line-height: 1; }
.pomo .phase { margin-top: 8px; }
.pomo .controls { display: flex; gap: 12px; }
.pomo .go {
  border: none; cursor: pointer; padding: 12px 30px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 800; font-size: var(--fs-body);
  display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm);
}
.pomo.mode-focus .go { background: var(--study); color: var(--text-on-study); }
.pomo.mode-break .go { background: var(--accent); color: var(--text-on-accent); }
.pomo .rst {
  border: 1.5px solid var(--border-strong); background: transparent; cursor: pointer;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-body);
  color: var(--text-secondary); display: inline-flex; align-items: center; gap: 8px;
}

/* --------------------------------------------------------- goals ring ------ */
.goalring { display: flex; align-items: center; gap: 18px; }
.goalring .ring { position: relative; width: 76px; height: 76px; flex: none; }
.goalring .ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.goalring .ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 15px; color: var(--study-hover); }
.donebox { margin-top: 14px; background: var(--sage-100); color: var(--sage-600); border-radius: var(--radius-md); padding: 12px 14px; font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; }

/* --------------------------------------------------------- subject card ---- */
.subject { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft); }
.subject:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.subject__top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.subject__icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--study-soft); color: var(--study-hover); }
.subject__meta { flex: 1; min-width: 0; }
.subject__name { font-family: var(--font-body); font-weight: 800; font-size: var(--fs-body-lg); color: var(--text-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject__chapter { font-size: var(--fs-body-sm); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject__status { font-size: var(--fs-caption); font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0; }
.status-yeni  { background: var(--surface-sunken); color: var(--text-muted); }
.status-devam { background: var(--study-soft); color: var(--study-hover); }
.status-tamam { background: var(--gold-200); color: var(--gold-500); }
.subject__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: var(--fs-body-sm); color: var(--text-secondary); }
.subject__foot .pct { font-weight: 800; color: var(--study-hover); }
.subject__ctl { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.scbtn { border: 1px solid var(--border-soft); background: var(--surface-card); color: var(--text-muted); width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center; cursor: pointer; transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft); }
.scbtn:hover { background: var(--surface-sunken); color: var(--text-secondary); }

/* deneme chips (deletable net values) */
.denemechips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.denemechip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 12.5px; color: var(--study-hover); background: var(--study-soft); border-radius: var(--radius-pill); padding: 4px 6px 4px 11px; }
.denemechip__x { border: none; background: none; cursor: pointer; color: var(--study-hover); opacity: .6; display: grid; place-items: center; padding: 2px; border-radius: var(--radius-pill); }
.denemechip__x:hover { opacity: 1; background: color-mix(in srgb, var(--study) 18%, transparent); }
/* minmax(0,1fr) lets tracks shrink below content width so the grid never overflows */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
/* subject cards carry a wide horizontal row (icon + name + status) — single column
   on phones so nothing overlaps; widen to two columns only when there's room. */
.screen--study .grid2 { grid-template-columns: 1fr; }

/* --------------------------------------------------------- progress bar ---- */
.progress { height: 12px; background: var(--progress-track); border-radius: var(--radius-pill); overflow: hidden; box-shadow: var(--shadow-inset); }
.progress__fill { height: 100%; border-radius: var(--radius-pill); transition: width var(--dur-lazy) var(--ease-soft); }
.progress__fill.tone-study { background: linear-gradient(90deg, var(--sage-400), var(--sage-600)); }
.progress__fill.tone-accent { background: linear-gradient(90deg, var(--navy-400), var(--navy-600)); }
.progress__fill.tone-celebrate { background: linear-gradient(90deg, var(--gold-400), var(--gold-500)); }

/* --------------------------------------------------------- net chart ------- */
.netchart svg { width: 100%; height: auto; display: block; }
.netfoot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.netfoot .big { font-family: var(--font-mono); font-size: 22px; color: var(--study-hover); }
.netfoot .cap { font-size: 11px; color: var(--text-muted); }

/* --------------------------------------------------------- memory ---------- */
.letterbtn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}
.letterbtn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.letterbtn.is-new { border-color: var(--warm); }
.letterbtn.is-locked { opacity: .7; cursor: default; }
.letterbtn .lmeta { flex: 1; }
.letterbtn .ltitle { display: block; font-weight: 800; font-size: 14px; color: var(--text-primary); }
.letterbtn .lsub { font-size: 12.5px; color: var(--text-muted); }
.letterbtn .ltag { font-size: 11px; font-family: var(--font-mono); }

.timelineitem { display: flex; gap: 18px; }
.timelineitem .rail { display: flex; flex-direction: column; align-items: center; }
.timelineitem .marker {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--surface-card); border: 2.5px solid var(--accent);
  display: grid; place-items: center; color: var(--accent);
  box-shadow: var(--shadow-sm); z-index: 1;
}
.timelineitem .line { width: 2px; flex: 1; min-height: 24px; background: var(--border-soft); margin-top: 2px; }
.timelineitem .body { flex: 1; padding-bottom: var(--space-6); }
.timelineitem.is-last .body { padding-bottom: 0; }
.timelineitem .date { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--accent); font-weight: 500; margin-bottom: 4px; }
.timelineitem .title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 600; color: var(--text-primary); margin-bottom: 6px; line-height: 1.2; }
.timelineitem .text { color: var(--text-secondary); font-size: var(--fs-body); line-height: 1.6; }

.memcard { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft); }
.memcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.memcard__img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-sunken); }
.memcard__img > span.cover { display: block; width: 100%; height: 100%; transition: transform var(--dur-slow) var(--ease-soft); }
.memcard:hover .memcard__img > span.cover { transform: scale(1.05); }
.memcard__date { position: absolute; top: 12px; left: 12px; background: rgba(20,27,43,.72); color: var(--paper-50); font-family: var(--font-mono); font-size: var(--fs-caption); padding: 4px 10px; border-radius: var(--radius-pill); backdrop-filter: blur(4px); }
.memcard__body { padding: var(--space-5); }
.memcard__body h3 { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 600; margin: 0 0 6px; line-height: 1.2; }
.memcard__body p { margin: 0; color: var(--text-secondary); font-size: var(--fs-body-sm); line-height: 1.55; }
.memcard__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.tag { font-size: var(--fs-caption); font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: var(--radius-pill); }

.polrow { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; }
.polaroid {
  margin: 0; flex: none; width: 150px;
  background: var(--surface-raised); padding: 12px 12px 0; border-radius: 4px;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur) var(--ease-bounce), box-shadow var(--dur) var(--ease-soft);
  position: relative;
}
.polaroid__del { position: absolute; top: 18px; right: 18px; z-index: 2; width: 26px; height: 26px; border-radius: var(--radius-pill); background: rgba(20,27,43,.55); backdrop-filter: blur(3px); display: grid; place-items: center; opacity: 0; transition: opacity var(--dur-fast) var(--ease-soft); }
.polaroid:hover .polaroid__del { opacity: 1; }
@media (hover: none) { .polaroid__del { opacity: .85; } }
.polaroid:hover { transform: rotate(0deg) translateY(-4px) !important; box-shadow: var(--shadow-lg); }
.polaroid__img { aspect-ratio: 1/1; overflow: hidden; background: var(--surface-sunken); border-radius: 2px; }
.polaroid__img > span.cover { display: block; width: 100%; height: 100%; }
.polaroid figcaption { padding: 10px 4px 16px; text-align: center; }
.polaroid .cap { font-family: var(--font-script); font-size: 1.5rem; color: var(--ink-800); line-height: 1.05; }
.polaroid .date { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-muted); margin-top: 2px; }

/* gradient cover helper (used by memory cards, polaroids, memory-match) */
.cover { display: block; width: 100%; height: 100%; background-image: var(--cover, linear-gradient(135deg, var(--apricot-300), var(--apricot-500))); background-size: cover; background-position: center; background-repeat: no-repeat; }

/* --------------------------------------------------------- games ----------- */
.scoreboard { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.champ { background: linear-gradient(150deg, var(--gold-200), var(--gold-300)); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.champ .ico { color: var(--gold-500); margin-bottom: 8px; }
.champ .lbl { font-weight: 800; font-size: 14px; color: var(--ink-900); }
.champ .name { font-family: var(--font-script); font-size: 24px; color: var(--apricot-600); line-height: 1; }
.records { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.records .h { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.records .r { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-mono); }
.records .r span:first-child { font-size: 12px; color: var(--text-secondary); }
.records .r span:last-child { color: var(--accent); }

.gametile { display: flex; align-items: center; gap: 14px; background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; width: 100%; font-family: var(--font-body); transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft); }
.gametile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gametile.is-soon { border-style: dashed; border-color: var(--border-strong); opacity: .75; cursor: default; }
.gametile.is-soon:hover { transform: none; box-shadow: var(--shadow-sm); }
.gametile__ic { width: 48px; height: 48px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; }
.gametile__ic--accent { background: var(--accent-soft); color: var(--accent); }
.gametile__ic--study { background: var(--study-soft); color: var(--study-hover); }
.gametile__ic--gold { background: var(--gold-200); color: var(--gold-500); }
.gametile__t { font-weight: 800; font-size: 15px; }
.gametile__s { font-size: 12.5px; color: var(--text-muted); }

/* quiz question manager rows */
.qrow { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-md); }
.qtext { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* quiz card */
.quizcard { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-md); }
.quizcard h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; margin: 0 0 var(--space-5); line-height: 1.25; }
.quizopts { display: flex; flex-direction: column; gap: 12px; }
.quizopt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 18px; border-radius: var(--radius-md);
  background: var(--surface-raised); border: 1.5px solid var(--border-soft);
  color: var(--text-primary); font-family: var(--font-body); font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; transition: all var(--dur-fast) var(--ease-soft);
}
.quizopt:disabled { cursor: default; }
.quizopt .marker { width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--radius-pill); border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.quizopt.is-correct { background: var(--sage-100); border-color: var(--sage-500); color: var(--sage-600); }
.quizopt.is-wrong { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: var(--danger); color: var(--danger); }
.quizopt.is-dim { color: var(--text-muted); }
.quizresult { text-align: center; padding: 8px 0; }
.quizresult .big { font-family: var(--font-mono); font-size: 40px; color: var(--accent); }

/* memory-match game */
.matchgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.matchcard { aspect-ratio: 3/4; border-radius: var(--radius-md); border: none; cursor: pointer; position: relative; padding: 0; background: transparent; perspective: 600px; }
.matchcard__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform var(--dur) var(--ease-soft); border-radius: var(--radius-md); }
.matchcard.is-up .matchcard__inner, .matchcard.is-done .matchcard__inner { transform: rotateY(180deg); }
.matchcard__face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius-md); overflow: hidden; }
.matchcard__back { background: var(--accent); display: grid; place-items: center; color: var(--text-on-accent); box-shadow: var(--shadow-sm); }
.matchcard__front { transform: rotateY(180deg); box-shadow: var(--shadow-sm); }
.matchcard__front .cover { width: 100%; height: 100%; }
.matchcard.is-done { opacity: .55; }
.matchbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }

/* --------------------------------------------------------- dreams ---------- */
.dreamrow { display: flex; align-items: center; gap: 12px; background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-xs); cursor: pointer; }
.dreamrow .box { width: 24px; height: 24px; border-radius: 7px; flex: none; display: grid; place-items: center; border: 2px solid var(--border-strong); background: transparent; color: #fff; }
.dreamrow.is-done .box { background: var(--success); border-color: var(--success); }
.dreamrow .txt { flex: 1; font-size: 14.5px; color: var(--text-primary); }
.dreamrow.is-done .txt { text-decoration: line-through; color: var(--text-muted); }
.postexam { background: var(--study-soft); border-radius: var(--radius-lg); padding: 20px; }
.postexam h4 { margin: 0; color: var(--text-on-study); }
.postexam .lead { font-size: 13px; color: var(--study-hover); margin: 0 0 14px; }
.postexam .item { display: flex; align-items: center; gap: 12px; background: var(--surface-card); border-radius: var(--radius-md); padding: 12px 14px; }
.postexam .item .ico { color: var(--study); }
.postexam .item .txt { flex: 1; font-size: 14px; color: var(--text-primary); }

/* --------------------------------------------------------- badges ---------- */
.badge { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; width: 108px; text-align: center; position: relative; }
.badge__medal[data-action] { cursor: pointer; transition: transform var(--dur-fast) var(--ease-bounce); }
.badge__medal[data-action]:hover { transform: translateY(-2px); }
.badge__del { position: absolute; top: -2px; right: 14px; z-index: 2; width: 24px; height: 24px; border-radius: var(--radius-pill); background: rgba(20,27,43,.55); backdrop-filter: blur(3px); display: grid; place-items: center; opacity: 0; transition: opacity var(--dur-fast) var(--ease-soft); }
.badge:hover .badge__del { opacity: 1; }
@media (hover: none) { .badge__del { opacity: .9; } }
.badge__medal { width: 68px; height: 68px; border-radius: var(--radius-pill); display: grid; place-items: center; color: #FFF8F0; }
.badge__medal.tier-gold { background: radial-gradient(circle at 35% 30%, var(--gold-300), var(--gold-500)); border: 3px solid var(--surface-raised); box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--gold-500) 22%, transparent); }
.badge__medal.tier-sage { background: radial-gradient(circle at 35% 30%, var(--sage-300), var(--sage-500)); border: 3px solid var(--surface-raised); box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--sage-500) 22%, transparent); }
.badge__medal.is-locked { background: var(--surface-sunken); border: 2px dashed var(--border-strong); color: var(--text-muted); box-shadow: none; filter: grayscale(1) opacity(.65); }
.badge__title { font-family: var(--font-body); font-weight: 800; font-size: var(--fs-body-sm); color: var(--text-primary); }
.badge__title.is-locked { color: var(--text-muted); }

/* --------------------------------------------------------- modal ----------- */
.scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(46,27,20,.45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: var(--space-5); animation: ik-fade-in var(--dur) var(--ease-soft); }
.modal { width: 100%; max-width: 460px; background: var(--surface-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft); overflow: hidden; animation: ik-scale-in var(--dur) var(--ease-bounce); max-height: 88vh; display: flex; flex-direction: column; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6) 0; }
.modal__head h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; margin: 0; }
.modal__close { border: none; background: var(--surface-sunken); cursor: pointer; width: 34px; height: 34px; border-radius: var(--radius-pill); color: var(--text-secondary); display: grid; place-items: center; flex: none; }
.modal__body { padding: var(--space-5) var(--space-6); color: var(--text-secondary); line-height: 1.6; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 var(--space-6) var(--space-6); }
.letterhi { font-family: var(--font-script); font-size: 22px; color: var(--accent); margin: 0 0 10px; }
.letterbody { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin: 0 0 14px; white-space: pre-line; }
.lettersign { font-family: var(--font-script); font-size: 20px; color: var(--apricot-600); text-align: right; margin: 0; }

/* form fields inside modals */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 15px;
  padding: 11px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text-primary);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--border-focus); box-shadow: var(--shadow-glow); }

/* --------------------------------------------------------- confetti -------- */
@keyframes ikConfetti { 0% { transform: translate3d(0,-12vh,0) rotate(0); opacity: 0; } 8% { opacity: 1; } 100% { transform: translate3d(var(--dx),110vh,0) rotate(var(--rot)); opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2000; }
.confetti span { position: absolute; top: 0; will-change: transform, opacity; }

/* --------------------------------------------------------- toast ----------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1500; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 12px; min-width: 260px; max-width: 380px; padding: 14px 16px; background: var(--surface-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border-left: 4px solid var(--accent); animation: ik-fade-up var(--dur) var(--ease-bounce); }
.toast.tone-success { background: var(--sage-100); border-left-color: var(--success); }
.toast.tone-celebrate { background: var(--gold-200); border-left-color: var(--celebrate); }
.toast.tone-love { background: var(--warm-soft); border-left-color: var(--warm); }
.toast .ico { line-height: 1; margin-top: 1px; }
.toast.tone-success .ico { color: var(--success); }
.toast.tone-celebrate .ico { color: var(--celebrate); }
.toast.tone-love .ico { color: var(--warm); }
.toast .t { font-weight: 800; font-size: var(--fs-body-sm); color: var(--text-primary); }
.toast .m { font-size: var(--fs-body-sm); color: var(--text-secondary); line-height: 1.45; }
/* Gece: tone-success / tone-celebrate use raw light palette tints (--sage-100 / --gold-200)
   that the dark theme never overrides, leaving a light panel under near-white text —
   unreadable. Re-tint them from the dark-adapted accent over the dark card so the
   text keeps its contrast. (tone-love already uses the themed --warm-soft, so it's fine.) */
[data-theme="dark"] .toast.tone-success   { background: color-mix(in srgb, var(--success) 20%, var(--surface-card)); }
[data-theme="dark"] .toast.tone-celebrate { background: color-mix(in srgb, var(--celebrate) 20%, var(--surface-card)); }

.footnote { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 12px; text-align: center; }

/* ================================ responsive ==============================
   Three modes:
   A) Full-bleed app  — phones + tablets (≤ 900px) and landscape/short screens
   B) Desktop layout  — ≥ 901px: wide window, left sidebar nav, multi-column
   ========================================================================== */

/* ---- A) full-bleed: phones & small tablets -------------------------------- */
@media (max-width: 900px) {
  .page { height: 100dvh; overflow: hidden; }
  .toolbar { flex: none; padding: 8px 14px; gap: 10px; flex-wrap: nowrap; }
  .toolbar__brand h1 { font-size: 19px; }
  .toolbar__brand .ik-eyebrow, .toolbar__brand .sub { display: none; }
  .toolbar__controls { gap: 8px; flex-wrap: nowrap; }
  .toolbar__group { gap: 0; }
  .toolbar__group .ik-eyebrow { display: none; }
  .seg button { padding: 7px 14px; font-size: 13px; }
  .pillbtn span.label { display: none; }
  /* the "❤ name" pill is a non-interactive identity label; with its text hidden on
     mobile it degrades to a lone heart and just crowds the row — drop it here.
     (Desktop keeps the full "❤ name" label; the avatar in the app header already
     shows who you are on mobile.) */
  .pillbtn--me { display: none; }

  .stage { flex: 1; min-height: 0; padding: 0; align-items: stretch; }
  /* tighter subject cards so two fit a phone width cleanly */
  .subject { padding: 15px 14px; }
  .subject__top { gap: 9px; margin-bottom: 12px; }
  .subject__icon { width: 38px; height: 38px; }
  .subject__status { padding: 3px 8px; }
  /* countdown: units were min-width:68px with no flex-shrink, so 4 cells (gün/saat/dk/sn)
     overflowed the card on phone widths — the "sn" cell spilled outside. Let the row's
     cells share the width and shrink to fit. Desktop keeps the fixed-width cells. */
  .countdown .row { gap: 8px; }
  .countdown .unit { flex: 1 1 0; min-width: 0; padding: 12px 4px; }
  .devicewrap { width: 100%; height: 100%; gap: 0 !important; }
  .phone { width: 100%; height: 100%; border-radius: 0; padding: 0; box-shadow: none; }
  .phone__screen { border-radius: 0; }
  .statusbar { display: none; }
  .footnote { display: none; }
}

/* tablets (641–900): give the single column a comfortable, centered width */
@media (min-width: 641px) and (max-width: 900px) {
  .screen { max-width: 620px; margin: 0 auto; }
  .head--center { text-align: center; }
  .screen--study .grid2 { grid-template-columns: 1fr 1fr; }   /* enough room for two subject cards */
}

/* landscape / short viewports: reclaim vertical space (thin toolbar) */
@media (orientation: landscape) and (max-height: 600px) {
  .toolbar { padding: 5px 12px; }
  .toolbar__brand h1 { font-size: 16px; }
  .toolbar__controls .pillbtn, .toolbar__controls .iconbtn { padding: 6px 10px; }
  .bottomnav { padding: 5px 6px 6px; }
  .navbtn span { display: none; }
}

/* ---- B) desktop: wide window + sidebar nav + multi-column ------------------ */
@media (min-width: 901px) {
  .stage { align-items: flex-start; padding: 0 24px 24px; }
  .devicewrap { gap: 8px; }
  .phone {
    width: min(1080px, calc(100vw - 48px));
    height: min(880px, calc(100dvh - 128px));
    background: transparent; padding: 0; border-radius: 0; box-shadow: none;
  }
  .phone__screen { border-radius: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft); }
  .statusbar { display: none; }
  .footnote { display: none; }

  /* header + left sidebar + content grid */
  .appview {
    display: grid;
    grid-template-columns: 236px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "head head" "nav main";
  }
  .appheader { grid-area: head; padding: 14px 28px; }
  .appheader .brand .word { font-size: 26px; }
  .scroll { grid-area: main; }
  .bottomnav {
    grid-area: nav;
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    gap: 4px; padding: 18px 14px;
    border-top: none; border-right: 1px solid var(--border-soft);
    background: var(--surface-raised);
  }
  .navbtn {
    flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 13px 16px; border-radius: var(--radius-md); font-size: 14.5px;
  }
  .navbtn span { font-size: 14.5px; }
  .navbtn:hover { background: var(--surface-sunken); }
  .navbtn.is-active { background: var(--accent-soft); }

  /* content: readable centered column by default */
  .screen { max-width: 760px; margin: 0 auto; padding: 34px 40px 56px; }

  /* study — 2-column dashboard */
  .screen--study { max-width: 960px; column-count: 2; column-gap: 22px; }
  .screen--study > * { margin-top: 0 !important; break-inside: avoid; margin-bottom: 18px; }
  .screen--study > .head { column-span: all; }
  /* subject cards stack inside the dashboard column so nothing clips */
  .screen--study .grid2 { grid-template-columns: 1fr; }

  /* memory — wide photo grid, letters/timeline full width */
  .screen--memory { max-width: 940px; }
  .screen--memory .grid2 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .screen--memory .polrow { flex-wrap: wrap; }

  /* games — quiz & match side by side */
  .screen--games { max-width: 940px; }
  .screen--games .quizcard { max-width: none; }

  /* dreams / home stay centered & readable */
  .screen--home { max-width: 720px; }
  .screen--dreams { max-width: 680px; }
}

/* very wide screens: don't let the window get unwieldy */
@media (min-width: 1400px) {
  .phone { width: 1120px; }
}
