/* Karaköy Kart — müşteri ekranı */

.screen { min-height: 100vh; min-height: 100dvh; }
.dark-screen { background: var(--ink); color: var(--paper); }
.center-screen { display: grid; place-items: center; }

/* ---------- Karşılama */
.welcome {
  max-width: 440px; margin: 0 auto; min-height: 100dvh;
  padding: calc(36px + var(--safe-t)) 24px calc(28px + var(--safe-b));
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.welcome .logo { width: 140px; height: auto; margin-bottom: auto; }
.welcome-plates { width: 100%; max-width: 330px; margin: 40px 0 36px; }
.welcome .eyebrow { color: var(--muted-dark); margin-bottom: 14px; }
.welcome-title { font-size: clamp(38px, 11vw, 52px); line-height: 1.02; margin-bottom: 16px; }
.welcome-text { color: #cfcfcc; font-size: 16px; max-width: 330px; margin-bottom: 32px; }
.welcome-actions { width: 100%; display: grid; gap: 12px; margin-top: auto; }
.welcome-note { margin-top: 16px; font-size: 13px; color: var(--muted-dark); }
.welcome-title em { font-style: italic; font-weight: 500; }
.welcome-note-rule { font-size: 12.5px; color: var(--muted-dark); margin: -18px 0 28px; max-width: 330px; }

/* ---------- Formlar */
.form-screen { background: var(--paper); }
.bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  height: calc(56px + var(--safe-t)); padding: var(--safe-t) 12px 0; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 15px;
}
.back { width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 34px; line-height: 1; cursor: pointer; padding: 0 0 4px; }
.bar span:first-child { padding-left: 12px; }
.panel { max-width: 440px; margin: 0 auto; padding: 28px 22px calc(40px + var(--safe-b)); }
.panel h2 { font-size: 30px; line-height: 1.1; margin-bottom: 8px; }
.panel .lead { margin-bottom: 26px; font-size: 15px; }
.switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.switch .link { color: var(--ink); font-weight: 600; }
.done-msg { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--paper-2); font-size: 15px; }

/* ---------- Kart ekranı */
.card-screen { padding-bottom: calc(24px + var(--safe-b)); max-width: 520px; margin: 0 auto; }
.card-top {
  background: var(--ink); padding: calc(18px + var(--safe-t)) 20px 90px; display: flex; justify-content: center;
}
.card-top .logo { width: 104px; height: auto; }

.loyalty {
  margin: -70px 16px 0; padding: 22px 20px 20px; border-radius: 24px;
  background: var(--ink-2); color: var(--paper);
  border: 1px solid var(--line-dark);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.45);
  position: relative; overflow: hidden;
}
.loyalty::before {
  /* hafif doku: ince çerçeve çizgisi, logodaki dikdörtgene gönderme */
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; pointer-events: none;
}
.loyalty-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.loyalty-head .eyebrow { color: var(--muted-dark); }
.holder { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { font-size: 58px; line-height: 1; margin: 14px 0 20px; }
.count .of { font-size: 26px; color: var(--muted-dark); }
.loyalty .plates { gap: 10px; }
.loyalty-foot { margin-top: 18px; font-size: 15px; color: #d7d7d4; }
.loyalty-foot strong { color: var(--paper); }
.loyalty-note { margin-top: 8px; font-size: 12.5px; color: var(--muted-dark); }
.loyalty.ready .count { font-size: 40px; }
.loyalty.ready { background: var(--ink); }

.qr-panel {
  margin: 16px; padding: 22px 20px 18px; border-radius: 24px; background: var(--paper);
  text-align: center; border: 1px solid var(--line);
}
.qr-title { font-weight: 600; font-size: 17px; margin-bottom: 14px; }
.qr { width: min(62vw, 230px); margin: 0 auto; aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; }
.qr { position: relative; }
.qr.stale #c-qr { filter: blur(7px); opacity: .25; }
.qr-refresh { position: absolute; inset: 0; margin: auto; width: 80%; height: 64px; border-radius: 16px; border: 0; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; cursor: pointer; }
.qr-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.qr-code { margin: 16px auto 0; display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--paper-2); }
.qr-code span { font-size: 12.5px; color: var(--muted); text-align: left; max-width: 150px; line-height: 1.35; }
.qr-code strong { font-size: 30px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.qr-panel.stale .qr-code strong { filter: blur(6px); opacity: .3; }
.qr-panel.ready { background: var(--paper); border: 2px solid var(--ink); }
.qr-panel.ready .qr-title { font-family: var(--serif); font-size: 22px; }

.install {
  margin: 0 16px 16px; padding: 14px 44px 14px 16px; border-radius: 18px; background: var(--paper);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; position: relative; font-size: 14px;
}
.install > div { flex: 1; }
.install p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.install-x { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }

.block-sec { margin: 0 16px 16px; padding: 20px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); }
.sec-title { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.how { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.history li:first-child { border-top: 0; padding-top: 0; }
.history .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.history .plus { font-weight: 600; }
.history .gift { font-weight: 700; }
.history .empty { color: var(--muted); }
.stats { margin-top: 12px; }

.account dl { margin: 0 0 18px; display: grid; gap: 10px; }
.account dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.account dt { color: var(--muted); }
.account dd { margin: 0; font-weight: 500; text-align: right; word-break: break-all; }
.account-actions { display: grid; gap: 14px; justify-items: center; }
.danger-link { color: var(--danger); }

.foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 10px 16px 8px; }

/* Ödül anı */
.celebrate {
  position: fixed; inset: 0; z-index: 60; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px;
  animation: fadein .4s var(--e);
}
.celebrate .big-plate { width: 150px; margin-bottom: 28px; animation: pop 1s var(--e) both; }
.celebrate h2 { font-family: var(--serif); font-size: 40px; line-height: 1.05; margin-bottom: 12px; }
.celebrate p { color: #cfcfcc; margin-bottom: 30px; max-width: 320px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Damga eklendi — kısa tam ekran kutlama */
.stamp-pop {
  position: fixed; inset: 0; z-index: 70; background: rgba(11,11,11,.96); color: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 32px 24px; animation: fadein .25s ease both; cursor: pointer;
  transition: opacity .4s ease;
}
.stamp-pop.out { opacity: 0; }
.sp-plus { font-size: 92px; line-height: 1; animation: plusin .7s var(--e) both; }
.sp-title { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.1; margin: 10px 0 28px; animation: plusin .7s .08s var(--e) both; }
.sp-plates { width: min(84vw, 340px); gap: 10px; }
.sp-sub { margin-top: 26px; font-size: 15px; color: #d7d7d4; max-width: 320px; animation: plusin .7s .25s var(--e) both; }
.sp-sub strong { color: var(--paper); }
@keyframes plusin { from { transform: translateY(18px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* Alt bölümler: açılır kapanır sekmeler */
.acc { margin: 0 16px 16px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 0 20px; cursor: pointer; font-weight: 600; font-size: 16px; -webkit-tap-highlight-color: transparent;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary small { font-weight: 400; font-size: 13px; margin-left: 6px; }
.acc-item summary i { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--e); flex: none; }
.acc-item[open] summary i { transform: rotate(-135deg) translate(-2px, -2px); }
.acc-body { padding: 0 20px 20px; animation: fadein .25s ease; }
.acc .account dl, .acc-item.account dl { margin-top: 2px; }
