/* SAHNE · ÖĞRETMEN YOKLAMASI (includes/scenes/teacher-attendance.php) — telefon ekranı, 3:4 kutu. Adımlar:
   s1 Ebru Ateş → Gelmedi · s2 bir daha → Geç · s3 Ferhat Bulut'a üç dokunuş → İzinli · s4 liste kaydırılır ·
   s5 Damla Erdem → Gelmedi · s6 Kaydet → «Yoklama kaydediliyor…» · s7 Bugün ekranı + yeşil şerit · s8 veliye bildirim.
   Ölçüler değişkenlerde: parmak (dokunuş) konumu ve kaydırma miktarı aynı değişkenlerden HESAPLANIR — kap genişliği değişse de
   parmak hedefin üstüne düşer. --sd: o adımda dokunuşun sonucunun göründüğü an (bütün durum geçişleri bunu bekler). */
@property --tat-n { syntax: '<integer>'; inherits: false; initial-value: 0; }

.tat {
  --sb: 26px; --hd: 46px; --top: calc(var(--sb) + var(--hd));
  --px: 10px; --pt: 10px; --trh: 24px; --g1: 6px; --ksh: 36px; --g2: 8px;
  --pre: calc(var(--pt) + var(--trh) + var(--g1) + var(--ksh) + var(--g2));
  --row: 38px; --rp: 10px; --bw: 66px; --stH: 26px; --bar: 50px; --svH: 34px;
  /* bunlar kullanıldıkları yerde (kökün içinde) çözülür: 100cqw = sahne genişliği, yükseklik = 4/3 genişlik */
  --H: calc(100cqw * 4 / 3);
  --vis: calc(var(--H) - var(--top) - var(--bar));
  --sc3: max(0px, round(var(--pre) + 5 * var(--row) + 4px - var(--vis), 1px));
  --sc5: round(var(--pre) + 10 * var(--row) + 6px - var(--vis), 1px);
  --stx: calc(100cqw - var(--px) - var(--rp) - var(--bw) / 2);
  --ry: calc(var(--top) + var(--pre) + var(--row) / 2);
  --tat-bg: #f5f6f8;
  --tat-p: #eff1f4; --tat-p-ink: #4a5363;
  --tat-a-50: #fdf0ee; --tat-a-ink: #b42318;
  --tat-g-50: #fff6e5; --tat-g-ink: #8f3f08;
  --tat-e-50: #ecf2fd; --tat-e-ink: #1b54ab;
  container-type: inline-size; width: 100%; height: 100%; aspect-ratio: 3 / 4;
  font-size: 11px; line-height: 1.3; color: var(--ui-text);
}
.tat-sc { position: relative; height: 100%; overflow: hidden; background: var(--tat-bg); }
.tat svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── durum çubuğu (saat · ada · sinyal, wi-fi, pil) ── */
.tat-sb { position: absolute; z-index: 5; inset: 0 0 auto; height: var(--sb); display: flex; align-items: center; justify-content: space-between; padding: 0 13px 0 19px; color: #0b1526; pointer-events: none; }
.tat-sb > b { font-size: 11px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tat-isl { position: absolute; left: 50%; top: 6px; width: 58px; height: 16px; margin-left: -29px; border-radius: 999px; background: #05070b; }
.tat-sbi { display: flex; align-items: center; gap: 3px; }
.tat-sbi svg { width: 12px; height: 12px; stroke-width: 2.4; }
.tat-sbi .tat-bat { width: 17px; height: 13px; }

/* ── üst şerit (uygulama kabuğu) ── */
.tat-hd { position: absolute; z-index: 2; inset: 0 0 auto; height: var(--top); display: flex; align-items: center; gap: 7px; padding: var(--sb) 10px 0;
  background: linear-gradient(180deg, #e3eaf4 0%, #eef2f8 70%, #f2f5f9 100%); box-shadow: inset 0 -1px 0 #d9e0ea; }
.tat-ib { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #273246;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .06), 0 1px 2px rgba(16, 37, 64, .08), inset 0 1px 0 rgba(255, 255, 255, .6); }
.tat-ib svg { width: 15px; height: 15px; }
.tat-ib--bell::after { content: ""; position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #e0352b; box-shadow: 0 0 0 1.5px #fff; }
.tat-av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .03em;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px -2px rgba(16, 37, 64, .55); }
.tat-tt { flex: 1; min-width: 0; line-height: 1.15; }
.tat-tt b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.015em; }
.tat-tt span { display: block; margin-top: 2px; font-size: 10px; font-weight: 600; color: var(--ui-muted); white-space: nowrap; }
.tat svg.tat-logo { flex: none; width: 30px; height: 30px; border-radius: 50%; stroke: none; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7), 0 2px 5px -1px rgba(16, 37, 64, .4); }

/* ── yoklama sayfası (kayan içerik) ── */
.tat-att { position: absolute; inset: 0; z-index: 1; transition: opacity .35s var(--ui-ease); }
.tat-pg { position: absolute; left: 0; right: 0; top: var(--top); bottom: 0; overflow: hidden; }
.tat-scr { padding: var(--pt) var(--px) 0; translate: 0 0; transition: translate .78s cubic-bezier(.32, .12, .2, 1) .12s; }
.tat-tr { height: var(--trh); display: flex; align-items: center; gap: 7px; }
.tat-tr > b { flex: 1; min-width: 0; font-size: 12px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.tat-seg { display: inline-flex; padding: 2px; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px var(--ui-line-2); font-size: 10px; font-weight: 800; }
.tat-seg > * { display: grid; place-items: center; height: 18px; padding: 0 7px; border-radius: 5px; color: var(--ui-muted); }
.tat-seg > b { background: var(--navy); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.tat-all { font-size: 10px; font-weight: 700; color: var(--navy-soft); white-space: nowrap; }

/* dört sayaç — ileri sayar (@property) */
.tat-ks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; height: var(--ksh); margin-top: var(--g1); }
.tat-k { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(16, 37, 64, .045); }
.tat-k b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; counter-reset: n var(--tat-n); transition: --tat-n .3s linear; transition-delay: var(--sd, 0s); }
.tat-k b::after { content: counter(n); }
.tat-k > span { font-size: 10px; font-weight: 700; letter-spacing: .01em; }
.tat-k--p { background: var(--tat-p); color: var(--tat-p-ink); }
.tat-k--a { background: var(--tat-a-50); color: var(--tat-a-ink); }
.tat-k--g { background: var(--tat-g-50); color: var(--tat-g-ink); }
.tat-k--e { background: var(--tat-e-50); color: var(--tat-e-ink); }
.tat-k--p b { --tat-n: 20; }

/* öğrenci listesi */
.tat-list { margin-top: var(--g2); border-radius: 12px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(16, 37, 64, .05), 0 12px 26px -18px rgba(16, 37, 64, .35); }
.tat-r { position: relative; height: var(--row); display: flex; align-items: center; gap: 8px; padding: 0 var(--rp) 0 4px; box-shadow: inset 0 -1px 0 #eef0f3;
  transition: background-color .22s var(--ui-ease), box-shadow .22s var(--ui-ease); transition-delay: var(--sd, 0s); }
.tat-no { flex: none; width: 28px; text-align: right; font-size: 10.5px; font-weight: 800; color: #788192; font-variant-numeric: tabular-nums; }
.tat-nm { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 600; letter-spacing: -.005em; color: #1a2233; white-space: nowrap; overflow: hidden; }
.tat-st { position: relative; flex: none; display: grid; width: var(--bw); height: var(--stH); border-radius: 8px; background: var(--tat-p); color: var(--tat-p-ink); font-size: 10.5px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); transition: background-color .2s var(--ui-ease), color .2s var(--ui-ease), box-shadow .2s var(--ui-ease); transition-delay: var(--sd, 0s); }
.tat-st > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap;
  transition: opacity .18s var(--ui-ease), translate .26s var(--ui-ease); transition-delay: var(--sd, 0s); }
.tat-st > span:not(.p) { opacity: 0; translate: 0 5px; }
.tat-st svg { width: 10px; height: 10px; stroke-width: 2.6; opacity: .72; }
/* gelmedi / geç satırı: solda renkli şerit + hafif ton (attendance.php:412–413); izinli satır soluklaşmaz */

/* kaydırma çubuğu ipucu */
.tat-thumb { position: absolute; right: 2px; top: 3px; width: 3px; height: round(calc(var(--vis) * .26), 1px); border-radius: 2px; background: rgba(16, 37, 64, .34); opacity: 0;
  transition: translate .78s cubic-bezier(.32, .12, .2, 1) .12s; }

/* yapışkan Kaydet (özet düğmenin içinde) */
.tat-bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: var(--bar); padding: 8px var(--px) 0; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(16, 37, 64, .08); }
.tat-save { position: relative; display: grid; height: var(--svH); border-radius: 10px; color: #fff; background: linear-gradient(180deg, #1b4b80, var(--navy));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(16, 37, 64, .22), 0 8px 16px -10px rgba(16, 37, 64, .6); transition: scale .2s var(--ui-ease), filter .2s var(--ui-ease); }
.tat-sv { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; font-size: 12px; font-weight: 800; letter-spacing: -.005em;
  opacity: 0; translate: 0 6px; transition: opacity .22s var(--ui-ease), translate .32s var(--ui-ease); transition-delay: var(--sd, 0s); }
.tat-sv svg { width: 13px; height: 13px; stroke-width: 2.8; }
.tat-sv em { font-style: normal; font-size: 11px; font-weight: 700; opacity: .82; }
.tat-sv.v0 { opacity: 1; translate: 0 0; }

/* «Yoklama kaydediliyor…» katmanı (footer.php data-busy) */
.tat-busy { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 0 18px; background: rgba(18, 22, 31, .62); opacity: 0; transition: opacity .28s var(--ui-ease); }
.tat-busy__c { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 220px; padding: 14px 12px 13px; border-radius: 16px; background: #fff; text-align: center;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .06), 0 2px 4px rgba(0, 0, 0, .08), 0 24px 40px -16px rgba(0, 0, 0, .55); scale: .9; transition: scale .5s cubic-bezier(.34, 1.56, .64, 1); }
.tat-busy__c b { margin-top: 9px; font-size: 12.5px; font-weight: 800; color: var(--ui-text); }
.tat-busy__c span { margin-top: 3px; font-size: 10px; font-weight: 700; line-height: 1.35; color: var(--ui-muted); text-wrap: balance; }
.tat-spin { width: 26px; height: 26px; color: var(--navy-soft); stroke-width: 3; }
.tat-spin circle { opacity: .2; }

/* ── «Bugün» ekranı (kayıttan sonra /ogretmen) ── */
.tat-home { position: absolute; inset: 0; z-index: 2; background: var(--tat-bg); opacity: 0; scale: 1.025; transition: opacity .4s var(--ui-ease), scale .55s var(--ui-ease); }
.tat-hm { position: absolute; left: 0; right: 0; top: var(--top); padding: var(--pt) var(--px) 0; }
.tat-hm > * { opacity: 0; translate: 0 10px; transition: opacity .35s var(--ui-ease), translate .55s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(.2s + var(--i) * 110ms); }
.tat-id { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .07), 0 1px 2px rgba(16, 37, 64, .05), 0 10px 22px -16px rgba(16, 37, 64, .3), inset 0 1px 0 rgba(255, 255, 255, .6); }
.tat-id__av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .03em;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 3px 8px -3px rgba(16, 37, 64, .55); }
.tat-id__t { min-width: 0; line-height: 1.2; }
.tat-id__t small { display: block; font-size: 10px; font-weight: 700; color: var(--ui-muted); white-space: nowrap; }
.tat-id__t b { display: block; font-size: 14px; font-weight: 800; letter-spacing: -.015em; }
.tat-id__t span { display: block; font-size: 10px; font-weight: 700; color: var(--ui-text-2); white-space: nowrap; }
.tat-fl { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; padding: 8px 10px; border-radius: 11px; background: #e9f8ef; color: #0d6b3a; font-size: 10.5px; font-weight: 700; line-height: 1.38;
  text-wrap: pretty; box-shadow: inset 0 0 0 1px rgba(13, 107, 58, .1); }
.tat-fl svg { flex: none; width: 13px; height: 13px; margin-top: 1px; stroke-width: 2.4; }
.tat-now { display: block; margin-top: 8px; padding: 10px 12px 11px; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .07), 0 1px 2px rgba(16, 37, 64, .05), 0 12px 24px -16px rgba(16, 37, 64, .32), inset 0 1px 0 rgba(255, 255, 255, .6); }
.tat-now > span { display: block; }
.tat-now > .tat-now__h { display: flex; align-items: center; gap: 6px; }
.tat-now__h b { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--navy-soft); white-space: nowrap; }
.tat-now__h i { font-style: normal; padding: 2px 7px; border-radius: 999px; background: #e3f6ea; color: #0f6b3b; font-size: 10px; font-weight: 700; white-space: nowrap; }
.tat-now__h em { margin-left: auto; font-style: normal; padding: 2px 6px; border-radius: 6px; background: #e3f6ea; color: #0f6b3b; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tat-now__t { margin-top: 7px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: #121a2b; }
.tat-now__t b { margin-right: 7px; color: var(--navy-soft); font-variant-numeric: tabular-nums; }
.tat-now__s { margin-top: 5px; font-size: 11px; font-weight: 700; color: #4d5666; }
.tat-now__r { margin-top: 1px; font-size: 10px; font-weight: 600; color: var(--ui-muted); }
.tat-now > .tat-now__a { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 10.5px; font-weight: 800; color: var(--navy-soft); }
.tat-now__a svg { width: 12px; height: 12px; stroke-width: 2.4; }
/* alt sekmeler */
.tat-tab { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; height: 48px; padding: 4px 4px 0;
  background: #fff; box-shadow: inset 0 1px 0 rgba(16, 37, 64, .08), 0 -6px 14px -10px rgba(16, 37, 64, .25); }
.tat-tab > * { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 40px; border-radius: 10px; color: #5b6475; font-size: 10px; font-weight: 700; white-space: nowrap; }
.tat-tab > b { background: var(--navy); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 10px -6px rgba(16, 37, 64, .7); }
.tat-tab svg { width: 15px; height: 15px; }

/* ── parmak (dokunuş) ── */
.tat-touch, .tat-swipe { position: absolute; z-index: 4; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .75), rgba(226, 233, 243, .5) 70%);
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .3), 0 2px 5px rgba(16, 37, 64, .25), 0 10px 18px -8px rgba(16, 37, 64, .45); opacity: 0; }
.tat-touch { --tx: calc(var(--stx) + 18px); --ty: calc(var(--ry) + var(--row) + 24px);
  translate: var(--tx) var(--ty); transition: translate .45s var(--ui-ease), opacity .25s var(--ui-ease); }
.tat-touch i { position: absolute; inset: -1px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(16, 37, 64, .28); opacity: 0; }
.tat-swipe { translate: 46cqw calc(var(--top) + var(--vis) - 34px); }

/* ── veliye giden bildirim ── */
.tat-nt { position: absolute; z-index: 6; left: 8px; right: 8px; top: 4px; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; padding: 9px 10px 10px 9px; border-radius: 15px;
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .08), 0 2px 4px rgba(16, 37, 64, .08), 0 20px 36px -14px rgba(16, 37, 64, .55), inset 0 1px 0 rgba(255, 255, 255, .7);
  font-size: 10.5px; font-weight: 500; line-height: 1.36; color: var(--ui-text-2); opacity: 0; translate: 0 -120%; transition: opacity .3s var(--ui-ease), translate .7s cubic-bezier(.34, 1.4, .64, 1); }
.tat-nt img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(16, 37, 64, .08); }
.tat-nt__h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 1px; }
.tat-nt__h b { flex: 1; min-width: 0; font-size: 11px; font-weight: 800; color: var(--ui-text); letter-spacing: -.005em; }
.tat-nt__h em { flex: none; font-style: normal; font-size: 10px; color: var(--ui-muted); }
.tat-nt__tag { position: absolute; right: 10px; bottom: -10px; display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 8px 0 6px; border-radius: 999px;
  background: var(--sun); color: var(--sun-ink, #2a1c00); font-size: 10px; font-weight: 800; white-space: nowrap; box-shadow: 0 0 0 1.5px #fff, 0 4px 10px -4px rgba(16, 37, 64, .45);
  opacity: 0; scale: .7; transition: opacity .3s var(--ui-ease), scale .45s cubic-bezier(.34, 1.56, .64, 1); }
.tat-nt__tag svg { width: 11px; height: 11px; stroke-width: 2.4; }

/* ══ ADIMLAR ══ */
.tat.s1 { --sd: .55s; } .tat.s2 { --sd: .35s; } .tat.s3 { --sd: 1.15s; } .tat.s4 { --sd: 0s; } .tat.s5 { --sd: .55s; } .tat.s6 { --sd: .5s; } .tat.s7 { --sd: 0s; }
/* açılış: «Geldi» sayacı 0'dan 20'ye */
.tat:not(.s1) .tat-k--p b { animation: tat-say .8s var(--ui-ease) .2s both; }
@keyframes tat-say { from { --tat-n: 0; } }

/* parmak: konum (adım adım) */
.tat.s1 .tat-touch { --tx: var(--stx); --ty: calc(var(--ry) + var(--row)); opacity: 1; }
.tat.s3 .tat-touch { --ty: calc(var(--ry) + 4 * var(--row) - var(--sc3)); }
.tat.s4 .tat-touch { --tx: calc(var(--stx) + 18px); --ty: calc(var(--ry) + 9 * var(--row) - var(--sc5) + 24px); opacity: 0; }
.tat.s5 .tat-touch { --tx: var(--stx); --ty: calc(var(--ry) + 9 * var(--row) - var(--sc5)); opacity: 1; }
.tat.s6 .tat-touch { --tx: 50cqw; --ty: calc(var(--H) - var(--bar) + 8px + var(--svH) / 2); }
.tat.s6 .tat-touch { opacity: 0; transition: translate .45s var(--ui-ease), opacity .25s var(--ui-ease) .85s; }
/* parmak: basma + halka dalgası (iki ad sırayla: ad değişince canlandırma yeniden başlar) */
.tat.s1 .tat-touch { animation: tat-basA .38s var(--ui-ease) .4s both, tat-kalkA .35s var(--ui-ease) .95s forwards; }
.tat.s1 .tat-touch i { animation: tat-dalgaA .55s ease-out .47s both; }
.tat.s2 .tat-touch { animation: tat-gelB .2s ease backwards, tat-basB .38s var(--ui-ease) .2s both, tat-kalkB .35s var(--ui-ease) .75s forwards; }
.tat.s2 .tat-touch i { animation: tat-dalgaB .55s ease-out .27s both; }
.tat.s3 .tat-touch { animation: tat-gelA .2s ease backwards, tat-basA .3s var(--ui-ease) .45s 3 both, tat-kalkA .35s var(--ui-ease) 1.42s forwards; }
.tat.s3 .tat-touch i { animation: tat-dalgaA .3s ease-out .5s 3 both; }
.tat.s4 .tat-touch, .tat.s4 .tat-touch i { animation: none; }
.tat.s5 .tat-touch { animation: tat-basA .38s var(--ui-ease) .4s both, tat-kalkA .35s var(--ui-ease) .95s forwards; }
.tat.s5 .tat-touch i { animation: tat-dalgaA .55s ease-out .47s both; }
.tat.s6 .tat-touch { animation: tat-gelB .2s ease backwards, tat-basB .38s var(--ui-ease) .38s both; }
.tat.s6 .tat-touch i { animation: tat-dalgaB .55s ease-out .45s both; }
@keyframes tat-basA { 0%, 100% { scale: 1; } 35% { scale: .76; } }
@keyframes tat-basB { 0%, 100% { scale: 1; } 35% { scale: .76; } }
/* parmak kalkar: hafifçe kayıp söner (etiket okunur); sonraki adımda eski yerinden hedefe kayarak gelir */
@keyframes tat-gelA { from { opacity: 0; } }
@keyframes tat-gelB { from { opacity: 0; } }
@keyframes tat-kalkA { to { opacity: 0; transform: translate(8px, 10px); } }
@keyframes tat-kalkB { to { opacity: 0; transform: translate(8px, 10px); } }
@keyframes tat-dalgaA { 0% { opacity: .95; scale: .7; } 100% { opacity: 0; scale: 2.3; } }
@keyframes tat-dalgaB { 0% { opacity: .95; scale: .7; } 100% { opacity: 0; scale: 2.3; } }

/* s1–s2: Ebru Ateş → Gelmedi → Geç */
.tat.s1 .tat-r--eb .p { opacity: 0; translate: 0 -5px; }
.tat.s1:not(.s2) .tat-r--eb { background: #fef4f3; box-shadow: inset 3px 0 0 var(--ui-bad), inset 0 -1px 0 #f7e1de; }
.tat.s1:not(.s2) .tat-r--eb .tat-st { background: var(--ui-bad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 10px -5px rgba(194, 38, 29, .7); }
.tat.s1:not(.s2) .tat-r--eb .a { opacity: 1; translate: 0 0; }
.tat.s2 .tat-r--eb .a { opacity: 0; translate: 0 -5px; }
.tat.s2 .tat-r--eb { background: #fffaf0; box-shadow: inset 3px 0 0 var(--ui-warn), inset 0 -1px 0 #f5e8d0; }
.tat.s2 .tat-r--eb .tat-st { background: var(--ui-warn); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 10px -5px rgba(180, 83, 9, .7); }
.tat.s2 .tat-r--eb .g { opacity: 1; translate: 0 0; }
/* s3: Ferhat Bulut — üç dokunuş: Gelmedi → Geç → İzinli (son durum; ara durumlar canlandırmada) */
.tat.s3 .tat-r--fe .p { opacity: 0; translate: 0 -5px; }
.tat.s3 .tat-r--fe .e { opacity: 1; translate: 0 0; }
.tat.s3 .tat-r--fe .tat-st { background: var(--ui-info); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 10px -5px rgba(29, 95, 196, .7); }
.tat.s3 .tat-r--fe { animation: tat-fe-r .8s linear .5s both; }
.tat.s3 .tat-r--fe .tat-st { animation: tat-fe-st .8s linear .5s both; }
.tat.s3 .tat-r--fe .p { animation: tat-fe-p .8s linear .5s both; }
.tat.s3 .tat-r--fe .a { animation: tat-fe-a .8s linear .5s both; }
.tat.s3 .tat-r--fe .g { animation: tat-fe-g .8s linear .5s both; }
.tat.s3 .tat-r--fe .e { animation: tat-fe-e .8s linear .5s both; }
@keyframes tat-fe-st {
  0%, 5% { background-color: var(--tat-p); color: var(--tat-p-ink); }
  8%, 42% { background-color: var(--ui-bad); color: #fff; }
  46%, 79% { background-color: var(--ui-warn); color: #fff; }
  83%, 100% { background-color: var(--ui-info); color: #fff; }
}
@keyframes tat-fe-r {
  0%, 5% { background-color: #fff; box-shadow: inset 0 0 0 transparent, inset 0 -1px 0 #eef0f3; }
  8%, 42% { background-color: #fef4f3; box-shadow: inset 3px 0 0 var(--ui-bad), inset 0 -1px 0 #f7e1de; }
  46%, 79% { background-color: #fffaf0; box-shadow: inset 3px 0 0 var(--ui-warn), inset 0 -1px 0 #f5e8d0; }
  83%, 100% { background-color: #fff; box-shadow: inset 0 0 0 transparent, inset 0 -1px 0 #eef0f3; }
}
@keyframes tat-fe-p { 0%, 5% { opacity: 1; translate: 0 0; } 8%, 100% { opacity: 0; translate: 0 -5px; } }
@keyframes tat-fe-a { 0%, 5% { opacity: 0; translate: 0 5px; } 8%, 42% { opacity: 1; translate: 0 0; } 46%, 100% { opacity: 0; translate: 0 -5px; } }
@keyframes tat-fe-g { 0%, 42% { opacity: 0; translate: 0 5px; } 46%, 79% { opacity: 1; translate: 0 0; } 83%, 100% { opacity: 0; translate: 0 -5px; } }
@keyframes tat-fe-e { 0%, 79% { opacity: 0; translate: 0 5px; } 83%, 100% { opacity: 1; translate: 0 0; } }
/* s3 ara durumlar: sayaçlar ve Kaydet özeti her dokunuşta değişir (Gelmedi → Geç → İzinli) */
.tat.s3:not(.s4) .tat-k--p b { animation: tat-fe-kp .8s linear .5s both; }
.tat.s3:not(.s4) .tat-k--a b { animation: tat-fe-ka .8s linear .5s both; }
.tat.s3:not(.s4) .tat-k--g b { animation: tat-fe-kg .8s linear .5s both; }
.tat.s3:not(.s4) .tat-k--e b { animation: tat-fe-ke .8s linear .5s both; }
@keyframes tat-fe-kp { 0%, 5% { --tat-n: 19; } 8%, 100% { --tat-n: 18; } }
@keyframes tat-fe-ka { 0%, 5% { --tat-n: 0; } 8%, 42% { --tat-n: 1; } 46%, 100% { --tat-n: 0; } }
@keyframes tat-fe-kg { 0%, 42% { --tat-n: 1; } 46%, 79% { --tat-n: 2; } 83%, 100% { --tat-n: 1; } }
@keyframes tat-fe-ke { 0%, 79% { --tat-n: 0; } 83%, 100% { --tat-n: 1; } }
.tat.s3:not(.s4) .tat-sv.v2 { animation: tat-fe-v2 .8s linear .5s both; }
.tat.s3:not(.s4) .tat-sv.v5 { animation: tat-fe-v5 .8s linear .5s both; }
.tat.s3:not(.s4) .tat-sv.v6 { animation: tat-fe-v6 .8s linear .5s both; }
.tat.s3:not(.s4) .tat-sv.v3 { animation: tat-fe-v3 .8s linear .5s both; }
@keyframes tat-fe-v2 { 0%, 4% { opacity: 1; translate: 0 0; } 9%, 100% { opacity: 0; translate: 0 -6px; } }
@keyframes tat-fe-v5 { 0%, 4% { opacity: 0; translate: 0 6px; } 9%, 41% { opacity: 1; translate: 0 0; } 46%, 100% { opacity: 0; translate: 0 -6px; } }
@keyframes tat-fe-v6 { 0%, 41% { opacity: 0; translate: 0 6px; } 46%, 78% { opacity: 1; translate: 0 0; } 83%, 100% { opacity: 0; translate: 0 -6px; } }
@keyframes tat-fe-v3 { 0%, 78% { opacity: 0; translate: 0 6px; } 83%, 100% { opacity: 1; translate: 0 0; } }
/* s3 (dar kapta): Ferhat görünür olsun diye gerektiği kadar kayar; s4: Damla Erdem'e kadar kaydırılır (parmak sürükler) */
.tat.s3 .tat-scr { translate: 0 calc(-1 * var(--sc3)); transition-delay: 0s; transition-duration: .45s; }
.tat.s4 .tat-scr { translate: 0 calc(-1 * var(--sc5)); transition-delay: .12s; transition-duration: .78s; }
.tat.s4 .tat-thumb { translate: 0 round(calc(var(--sc5) * .26), 1px); animation: tat-cubuk 1s ease .05s both; }
.tat.s4:not(.s5) .tat-swipe { animation: tat-surukle .9s cubic-bezier(.32, .12, .2, 1) .02s both; }
@keyframes tat-cubuk { 0% { opacity: 0; } 18%, 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tat-surukle {
  0% { opacity: 0; scale: .85; }
  14% { opacity: 1; scale: 1; translate: 46cqw calc(var(--top) + var(--vis) - 34px); }
  86% { opacity: 1; translate: 46cqw calc(var(--top) + var(--vis) - 34px - var(--sc5) + var(--sc3)); }
  100% { opacity: 0; translate: 46cqw calc(var(--top) + var(--vis) - 34px - var(--sc5) + var(--sc3)); }
}
/* s5: Damla Erdem → Gelmedi */
.tat.s5 .tat-r--da .p { opacity: 0; translate: 0 -5px; }
.tat.s5 .tat-r--da .a { opacity: 1; translate: 0 0; }
.tat.s5 .tat-r--da { background: #fef4f3; box-shadow: inset 3px 0 0 var(--ui-bad), inset 0 -1px 0 #f7e1de; }
.tat.s5 .tat-r--da .tat-st { background: var(--ui-bad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 10px -5px rgba(194, 38, 29, .7); }
/* sayaçlar */
.tat.s1 .tat-k--p b { --tat-n: 19; }
.tat.s3 .tat-k--p b { --tat-n: 18; }
.tat.s5 .tat-k--p b { --tat-n: 17; }
.tat.s1:not(.s2) .tat-k--a b, .tat.s5 .tat-k--a b { --tat-n: 1; }
.tat.s2 .tat-k--g b { --tat-n: 1; }
.tat.s3 .tat-k--e b { --tat-n: 1; }
/* Kaydet özeti: eskisi yukarı kayıp söner, yenisi aşağıdan gelir */
.tat.s1 .tat-sv.v0 { opacity: 0; translate: 0 -6px; }
.tat.s1:not(.s2) .tat-sv.v1 { opacity: 1; translate: 0 0; }
.tat.s2 .tat-sv.v1 { opacity: 0; translate: 0 -6px; }
.tat.s2:not(.s3) .tat-sv.v2 { opacity: 1; translate: 0 0; }
.tat.s3 .tat-sv.v2 { opacity: 0; translate: 0 -6px; }
.tat.s3:not(.s5) .tat-sv.v3 { opacity: 1; translate: 0 0; }
.tat.s5 .tat-sv.v3 { opacity: 0; translate: 0 -6px; }
.tat.s5 .tat-sv.v4 { opacity: 1; translate: 0 0; }
/* s6: Kaydet'e basılır → kaydediliyor katmanı */
.tat.s6 .tat-save { animation: tat-dugme .4s var(--ui-ease) .38s both; }
@keyframes tat-dugme { 0%, 100% { scale: 1; filter: none; } 40% { scale: .97; filter: brightness(.86); } }
.tat.s6:not(.s7) .tat-busy { opacity: 1; transition-delay: .62s; }
.tat.s6:not(.s7) .tat-busy__c { scale: 1; transition-delay: .62s; }
.tat.s6:not(.s7) .tat-spin { animation: tat-don .8s linear infinite; }
@keyframes tat-don { to { rotate: 360deg; } }
/* s7: Bugün ekranı — yeşil şerit + «Yoklama alındı» */
.tat.s7 .tat-att { opacity: 0; }
.tat.s7 .tat-home { opacity: 1; scale: 1; }
.tat.s7 .tat-hm > * { opacity: 1; translate: 0 0; }
/* s8: veliye giden bildirim yukarıdan kayar */
.tat.s8 .tat-nt { opacity: 1; translate: 0 0; transition-delay: .15s; }
.tat.s8 .tat-nt__tag { opacity: 1; scale: 1; transition-delay: .75s; }

/* ══ DAR KAP (telefonda bento, ~220–270 px) ══ */
@container (max-width: 270px) {
  .tat { --sb: 22px; --hd: 40px; --px: 8px; --pt: 8px; --trh: 22px; --g1: 5px; --ksh: 32px; --g2: 6px; --row: 34px; --rp: 8px; --bw: 58px; --stH: 24px; --bar: 44px; --svH: 30px; }
  .tat-sb { padding: 0 10px 0 15px; }
  .tat-sb > b { font-size: 10px; }
  .tat-isl { top: 5px; width: 48px; height: 14px; margin-left: -24px; }
  .tat-sbi svg { width: 10px; height: 10px; }
  .tat-sbi .tat-bat { width: 14px; height: 11px; }
  .tat-hd { gap: 6px; padding: var(--sb) 8px 0; }
  .tat-ib, .tat-av, .tat svg.tat-logo { width: 26px; height: 26px; }
  .tat-ib svg { width: 13px; height: 13px; }
  .tat-ib--bell::after { top: 3px; right: 4px; width: 6px; height: 6px; }
  .tat-av { font-size: 10px; }
  .tat-tt b { font-size: 13px; }
  .tat-tr { gap: 5px; }
  .tat-tr > b { font-size: 11px; }
  .tat-seg > * { height: 16px; padding: 0 5px; }
  .tat-k { gap: 2px; border-radius: 8px; }
  .tat-k b { font-size: 13px; }
  .tat-r { gap: 6px; padding-left: 2px; }
  .tat-no { width: 24px; font-size: 10px; }
  .tat-nm { font-size: 10.5px; }
  .tat-st { font-size: 10px; border-radius: 7px; }
  .tat-st svg { width: 9px; height: 9px; }
  .tat-bar { padding-top: 7px; }
  .tat-save { border-radius: 9px; }
  .tat-sv { gap: 4px; font-size: 11px; }
  .tat-sv svg { width: 11px; height: 11px; }
  .tat-sv em { font-size: 10px; }
  .tat-busy { padding: 0 12px; }
  .tat-busy__c { padding: 12px 10px 11px; }
  .tat-busy__c b { font-size: 11.5px; }
  .tat-id { padding: 8px 9px; gap: 8px; border-radius: 12px; }
  .tat-id__av { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
  .tat-id__t b { font-size: 12.5px; }
  .tat-id__t span { display: none; }
  .tat-fl { margin-top: 6px; padding: 7px 8px; font-size: 10px; }
  .tat-now { margin-top: 6px; padding: 9px 10px 10px; border-radius: 12px; }
  .tat-now__h em { display: none; }
  .tat-now__t { font-size: 16px; margin-top: 6px; }
  .tat-tab { height: 42px; padding: 3px 3px 0; }
  .tat-tab > * { height: 36px; font-size: 0; gap: 0; }
  .tat-tab > b { font-size: 10px; gap: 1px; }
  .tat-tab svg { width: 14px; height: 14px; }
  .tat-nt { left: 6px; right: 6px; top: 3px; grid-template-columns: 22px minmax(0, 1fr); gap: 7px; padding: 8px 8px 9px 8px; border-radius: 13px; font-size: 10px; }
  .tat-nt img { width: 22px; height: 22px; border-radius: 6px; }
  .tat-nt__h b { font-size: 10.5px; }
  .tat-nt__tag { right: 8px; }
}

/* round() desteklemeyen tarayıcı (Safari < 15.4, Firefox < 118 vb.): yuvarlamasız aynı hesap — liste yine kayar,
   parmak yine hedefe düşer; yalnız yarım piksel keskinliği kaybolur (denetim 29.10, MOT-08) */
@supports not (width: round(1px, 1px)) {
  .tat { --sc3: max(0px, calc(var(--pre) + 5 * var(--row) + 4px - var(--vis))); --sc5: calc(var(--pre) + 10 * var(--row) + 6px - var(--vis)); }
  .tat-thumb { height: calc(var(--vis) * .26); }
  .tat.s4 .tat-thumb { translate: 0 calc(var(--sc5) * .26); }
}
