﻿/* =============================================================
   XCORE ONLINE CHECK-IN — KIOSK
   Dokunmatik kiosk (dikey 1080x1920 öncelikli; yatay/tablet uyumlu)
   Yerleşim: üst bar + adım göstergesi + kaydırılabilir içerik + klavye
   (klavye akış içinde → açıldığında içerik alanı küçülür, hiçbir şey örtülmez)
============================================================= */

/* ========================= TOKENS ========================= */
:root {
    --navy: #111827;
    --navy-2: #020617;
    --gold: #bfa46f;
    --gold-2: #d6c193;
    --gold-soft: rgba(191, 164, 111, .18);
    --bg1: #eef0f3;
    --bg2: #e3e6eb;
    --card: #ffffff;
    --text: #111827;
    --text-2: #374151;
    --muted: #6b7280;
    --border: #e5e7eb;
    --field-bg: #f9fafb;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --ok: #22c55e;
    --ok-soft: #f0fdf4;

    --kb-bg: #0b1220;
    --kb-key: #1f2937;
    --kb-key-2: #111827;

    --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;

    --content-w: 1040px;
    --gutter: clamp(12px, 2vmin, 28px);
    --touch: 56px;
    --input-h: max(66px, 3.5rem);
    --btn-h: max(66px, 3.5rem);
    --radius: 16px;
    --radius-card: clamp(20px, 2.6vmin, 32px);

    /* klavye */
    --kb-w: 1180px;
    --kgap: clamp(5px, .8vmin, 10px);
    --key-h: clamp(56px, 6.6vmin, 84px);
    --key-fs: clamp(20px, 2.7vmin, 32px);
}

/* Tipografi ölçeği ekranın kısa kenarına göre (1080 → ~19px, 768 → ~16px) */
html {
    font-size: clamp(15px, calc(8px + 1vmin), 20px);
}

@media (orientation: portrait) and (min-height: 1500px) {
    html { font-size: 21px; }
}

/* ========================= RESET & BASE ========================= */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 640px at 100% -12%, rgba(191, 164, 111, .12), transparent 62%),
        linear-gradient(180deg, var(--bg1), var(--bg2));
    background-color: var(--bg1);
    -webkit-font-smoothing: antialiased;
    /* kiosk: seçim / uzun basma menüsü / çift dokunma yakınlaştırma yok */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

button {
    font-family: inherit;
    color: inherit;
    cursor: pointer;
}

a { color: inherit; }

.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ========================= SHELL ========================= */
.shell {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================= TOP BAR ========================= */
.topbar {
    flex: none;
    align-self: center;
    width: min(var(--content-w), calc(100% - 2 * var(--gutter)));
    margin: var(--gutter) var(--gutter) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(8px, 1.1vmin, 14px) clamp(12px, 1.8vmin, 24px);
    border-radius: 22px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(15, 23, 42, .08);
}

.brand {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.6vmin, 18px);
    min-width: 0;
}

.brand-logo {
    height: clamp(40px, 6vmin, 72px);
    width: auto;
    max-width: min(240px, 34vw);
    object-fit: contain;
    flex: none;
}

.brand-mark {
    width: clamp(40px, 6vmin, 64px);
    height: clamp(40px, 6vmin, 64px);
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold);
    font-weight: 800;
    font-size: 1.4rem;
    flex: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: clamp(10px, 1.6vmin, 18px);
    border-left: 2px solid var(--border);
}

.brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    white-space: nowrap;
}

.brand-sub {
    font-size: .85rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-switch {
    display: flex;
    gap: clamp(6px, .9vmin, 10px);
    flex: none;
}

.lang-btn {
    min-width: var(--touch);
    height: var(--touch);
    padding: 0 .65rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--muted);
    transition: border-color .15s, background .15s, color .15s;
}

    .lang-btn img {
        width: 28px;
        height: 19px;
        border-radius: 4px;
        object-fit: cover;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
    }

    .lang-btn[aria-pressed="true"] {
        border-color: var(--gold);
        background: #fbf8f1;
        color: var(--navy);
    }

    .lang-btn:active { transform: scale(.96); }

/* ========================= STEPPER ========================= */
.stepper {
    --dot: clamp(30px, 3.8vmin, 46px);
    flex: none;
    align-self: center;
    width: min(var(--content-w), calc(100% - 2 * var(--gutter)));
    margin: clamp(10px, 1.6vmin, 22px) auto 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.st {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    color: var(--muted);
}

    /* bağlantı çizgisi */
    .st::before {
        content: "";
        position: absolute;
        top: calc(var(--dot) / 2 - 1.5px);
        right: calc(50% + var(--dot) / 2 + 8px);
        left: calc(-50% + var(--dot) / 2 + 8px);
        height: 3px;
        border-radius: 3px;
        background: #d5d9e0;
    }

    .st:first-child::before { display: none; }
    .st.done::before, .st.active::before { background: var(--gold); }

.st-dot {
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 2px solid #d5d9e0;
    font-weight: 700;
    font-size: .95rem;
    color: var(--muted);
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.st-check {
    display: none;
    width: 58%;
    height: 58%;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.st-label {
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
    max-width: 100%;
    padding: 0 4px;
}

.st.active .st-dot {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    box-shadow: 0 0 0 5px var(--gold-soft);
}

.st.active .st-label { color: var(--text); }

.st.done .st-dot {
    background: var(--gold);
    border-color: var(--gold);
}

    .st.done .st-num { display: none; }
    .st.done .st-check { display: block; }
.st.done .st-label { color: var(--text-2); }

/* ========================= APP (kaydırılabilir içerik) ========================= */
.app {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--gutter);
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: none;
}

    .app::-webkit-scrollbar { display: none; }

    /* Kart üst üçte birde durur; içerik taşarsa boşluklar 0'a iner (üst kırpılmaz) */
    .app::before { content: ""; flex: 1 1 0; }
    .app::after { content: ""; flex: 2 1 0; }

/* ========================= CARD ========================= */
.card {
    flex: none;
    width: min(var(--content-w), 100%);
    margin: 0 auto;
    background: var(--card);
    border-radius: var(--radius-card);
    padding: clamp(22px, 4vmin, 52px);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .04);
    animation: enter .24s ease;
}

.card-rez, .card-done, .card-setup {
    width: min(780px, 100%);
}

@keyframes enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.card-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.card-head-text { min-width: 0; }

/* ========================= TYPOGRAPHY ========================= */
.eyebrow {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .45rem;
}

h1 {
    margin: 0 0 .35rem;
    font-size: clamp(1.6rem, calc(1.1rem + 1.5vmin), 2.4rem);
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--text);
}

.subtitle {
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--muted);
}

.hint {
    margin: 1.2rem 0 0;
    text-align: center;
    font-size: .92rem;
    color: var(--muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    border-radius: 99px;
    background: var(--gold-soft);
    color: #7a6235;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    vertical-align: middle;
}

/* ========================= FIELDS ========================= */
.field {
    margin-bottom: 1.1rem;
    min-width: 0;
}

.field-label {
    display: block;
    margin-bottom: .45rem;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-2);
}

.req { color: var(--danger); font-weight: 700; }

.input {
    width: 100%;
    height: var(--input-h);
    padding: 0 1rem;
    font-family: inherit;
    font-size: 1.3rem;
    color: var(--text);
    background: var(--field-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    caret-color: transparent;
    cursor: pointer;
    text-overflow: ellipsis;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-user-select: none;
    user-select: none;
}

    .input::placeholder { color: #b3b9c3; letter-spacing: normal; }

    .input.focused {
        border-color: var(--gold);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(191, 164, 111, .22);
    }

.input-xl {
    height: max(76px, 4.2rem);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: .14em;
    font-variant-numeric: tabular-nums;
}

    .input-xl::placeholder { font-size: 1.35rem; font-weight: 500; }

.input-code { letter-spacing: .06em; }

.input-mono {
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}

.field-error {
    display: none;
    margin-top: .45rem;
    font-size: .92rem;
    font-weight: 600;
    color: #b91c1c;
}

.field.invalid .input {
    border-color: var(--danger);
    background: #fff7f7;
}

    .field.invalid .input.focused { box-shadow: 0 0 0 4px rgba(239, 68, 68, .16); }
.field.invalid .field-error { display: block; }
.field.invalid .segmented { border-color: var(--danger); }

.field-hint {
    margin-top: .4rem;
    font-size: .88rem;
    color: var(--muted);
}

    .field-hint:empty { display: none; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 1.2rem;
}

@media (min-width: 1000px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
}

/* Kimlik türü seçimi */
.segmented {
    height: var(--input-h);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius);
    background: #f3f4f6;
    border: 2px solid var(--border);
}

.seg {
    min-height: 0;
    height: 100%;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--muted);
    transition: background .15s, color .15s, box-shadow .15s;
    padding: 0 .5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .seg.active {
        background: var(--navy);
        color: #fff;
        box-shadow: 0 6px 16px rgba(2, 6, 23, .22);
    }

/* Doğum tarihi: GG . AA . YYYY */
.dob {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1.6fr;
    align-items: center;
    gap: .4rem;
}

    .dob .input {
        text-align: center;
        letter-spacing: .1em;
        font-variant-numeric: tabular-nums;
        padding: 0 .4rem;
    }

.dob-sep {
    color: #c3c8d0;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Çocuk notu */
.note {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    padding: .85rem 1rem;
    margin-bottom: 1.1rem;
    border-radius: 14px;
    background: #faf6ee;
    border: 1px solid #eadfc6;
    color: #6b5a33;
    font-size: .95rem;
    line-height: 1.4;
}

.note-ic {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
    font-family: Georgia, serif;
}

/* Misafir sayacı */
.guest-title-of { color: var(--muted); font-weight: 600; }

.guest-dots {
    display: flex;
    gap: .45rem;
    align-items: center;
    padding-bottom: .7rem;
    flex: none;
}

.gdot {
    width: .75rem;
    height: .75rem;
    border-radius: 99px;
    background: #d5d9e0;
    transition: width .2s, background .2s;
}

    .gdot.done { background: var(--gold); }
    .gdot.current { width: 2rem; background: var(--navy); }

/* ========================= ALERT ========================= */
.alert {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin-top: 1rem;
    padding: .9rem 1.1rem;
    border-radius: 14px;
    background: var(--danger-soft);
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    animation: shake .32s ease;
}

    .alert::before {
        content: "!";
        flex: none;
        width: 1.6rem;
        height: 1.6rem;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: var(--danger);
        color: #fff;
        font-weight: 800;
        font-size: .95rem;
    }

@keyframes shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================= BUTTONS ========================= */
.btnrow {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: .9rem;
    margin-top: 1.4rem;
}

    .btnrow.single { grid-template-columns: 1fr; }

.btn {
    position: relative;
    min-height: var(--btn-h);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 0 1.3rem;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border: 0;
    border-radius: var(--radius);
    transition: transform .08s ease, box-shadow .15s, opacity .15s;
}

    .btn:active { transform: scale(.98); }
    .btn:focus { outline: none; }
    .btn:focus-visible { box-shadow: 0 0 0 4px rgba(191, 164, 111, .45); }

.btn-primary {
    background: linear-gradient(135deg, #111827, #020617);
    color: #fff;
    box-shadow: 0 12px 28px rgba(2, 6, 23, .22);
}

    .btn-primary .btn-ic { stroke: var(--gold); }

.btn-secondary {
    background: #fff;
    color: var(--navy);
    border: 2px solid var(--border);
}

.btn-ic {
    width: 1.35em;
    height: 1.35em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn.loading { pointer-events: none; }
    .btn.loading > * { visibility: hidden; }

    .btn.loading::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 1.5rem;
        height: 1.5rem;
        margin: -.75rem 0 0 -.75rem;
        border-radius: 50%;
        border: 3px solid rgba(255, 255, 255, .3);
        border-top-color: var(--gold);
        animation: spin .8s linear infinite;
    }

.btn-secondary.loading::after {
    border-color: rgba(17, 24, 39, .15);
    border-top-color: var(--gold);
}

.spinner {
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    border: 3px solid rgba(17, 24, 39, .12);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.spinner-lg {
    width: 3.2rem;
    height: 3.2rem;
    border-width: 4px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========================= SUMMARY ========================= */
.rez-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: .6rem;
    margin-bottom: 1rem;
}

    .rez-strip:empty { display: none; }

.rez-cell {
    padding: .6rem .9rem;
    border-radius: 14px;
    background: var(--field-bg);
    border: 1px solid var(--border);
    min-width: 0;
}

    .rez-cell .k {
        display: block;
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .rez-cell .v {
        display: block;
        font-size: 1.1rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        overflow-wrap: anywhere;
    }

.sum-list {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 1.1rem;
}

    .sum-list:empty { display: none; }

.sum-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .9rem;
    padding: .75rem 1rem;
    background: #fff;
}

    .sum-item + .sum-item { border-top: 1px solid #eef0f3; }

.sum-idx {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    color: var(--muted);
    font-weight: 700;
}

.sum-name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

    .sum-name .tag { margin-left: .4rem; }

.sum-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem 1.2rem;
    margin-top: .2rem;
    font-size: .95rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

    .sum-meta b {
        font-weight: 600;
        color: var(--text-2);
        margin-right: .35rem;
    }

.sum-edit {
    min-width: var(--touch);
    min-height: var(--touch);
    padding: 0 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--navy);
    font-size: .95rem;
    font-weight: 600;
}

    .sum-edit svg {
        width: 1.2rem;
        height: 1.2rem;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .sum-edit:active { transform: scale(.96); }

.sum-item.incomplete .sum-idx { background: var(--danger-soft); color: var(--danger); }

/* Onay kutuları (tüm satır dokunulabilir) */
.consents {
    display: grid;
    gap: .7rem;
}

@media (min-width: 1000px) {
    .consents { grid-template-columns: 1fr 1.6fr; }   /* satır 2 (ticari izin) metni daha uzun */
}

.consents.single { grid-template-columns: 1fr; }   /* ticari metni yoksa KVKK tek başına */

/* İsteğe bağlı satır: belirgin etiket */
.opt-tag {
    display: inline-block;
    padding: .1rem .6rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: #f3f4f6;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: .08em;
}

.check.check-optional:not(.checked) { background: #fcfcfd; }

.check {
    position: relative;
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: max(64px, 3.4rem);
    padding: .7rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--text-2);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

    .check input {
        position: absolute;
        opacity: 0;
        width: 1px;
        height: 1px;
        pointer-events: none;
    }

.check-box {
    flex: none;
    width: 2rem;
    height: 2rem;
    min-width: 32px;
    min-height: 32px;
    border-radius: 9px;
    border: 2px solid #c6cbd3;
    background: #fff;
    display: grid;
    place-items: center;
    transition: background .15s, border-color .15s;
}

    .check-box svg {
        width: 72%;
        height: 72%;
        fill: none;
        stroke: var(--gold);
        stroke-width: 3.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        opacity: 0;
    }

.check.checked {
    border-color: var(--gold);
    background: #fcf9f3;
    color: var(--text);
}

    .check.checked .check-box {
        background: var(--navy);
        border-color: var(--navy);
    }

        .check.checked .check-box svg { opacity: 1; }

.check.invalid { border-color: var(--danger); }

/* ========================= DONE ========================= */
.card-done { text-align: center; }

.done-icon {
    width: clamp(88px, 12vmin, 136px);
    height: clamp(88px, 12vmin, 136px);
    margin: .4rem auto 1.4rem;
    border-radius: 50%;
    box-shadow: 0 0 0 12px rgba(34, 197, 94, .12);
    animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both;
}

    .done-icon svg { width: 100%; height: 100%; display: block; }
    .done-icon circle { fill: var(--ok); }

    .done-icon path {
        fill: none;
        stroke: #fff;
        stroke-width: 4;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-dasharray: 40;
        stroke-dashoffset: 40;
        animation: draw .5s .25s ease forwards;
    }

@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.countdown {
    max-width: 30rem;
    margin: 1.4rem auto 0;
}

.countdown-bar {
    height: 8px;
    border-radius: 99px;
    background: #eef0f3;
    overflow: hidden;
}

    .countdown-bar span {
        display: block;
        height: 100%;
        width: 100%;
        border-radius: 99px;
        background: linear-gradient(90deg, var(--gold), var(--gold-2));
        transition: width 1s linear;
    }

.countdown-text {
    margin: .7rem 0 0;
    font-size: 1rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ========================= KEYBOARD ========================= */
.keyboard {
    flex: none;
    display: none;
    padding: clamp(8px, 1.2vmin, 14px) var(--gutter) calc(clamp(10px, 1.4vmin, 18px) + env(safe-area-inset-bottom, 0px));
    background: var(--kb-bg);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .3);
    touch-action: none;
}

    .keyboard.show {
        display: block;
        animation: kbIn .18s ease-out;
    }

@keyframes kbIn {
    from { transform: translateY(30px); }
    to { transform: none; }
}

.kb-top {
    max-width: var(--kb-w);
    margin: 0 auto var(--kgap);
    display: flex;
    align-items: center;
    gap: 10px;
}

.keyboard[data-type="alnum"] .kb-top { max-width: 1000px; }
.keyboard[data-type="num"] .kb-top { max-width: 560px; }

.kb-field {
    flex: 1;
    min-width: 0;
    height: var(--touch);
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 0 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
}

.kb-label {
    flex: none;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
}

/* Uzun değerde sonu görünür (başı soldan kırpılır) */
.kb-value {
    flex: 0 1 auto;
    min-width: 0;
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    font-size: 1.3rem;
    color: #fff;
}

    .kb-value > span:first-child {
        flex: none;
        white-space: pre;
    }

.kb-caret {
    flex: none;
    width: 2px;
    height: 1.35em;
    margin-left: 2px;
    background: var(--gold);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.kb-close {
    flex: none;
    height: var(--touch);
    padding: 0 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
}

    .kb-close svg {
        width: 1.3rem;
        height: 1.3rem;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.kb-keys {
    --cols: 12;
    max-width: var(--kb-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--kgap);
}

    .kb-keys.layout-alnum { --cols: 10; max-width: 1000px; }
    .kb-keys.layout-num { --cols: 3; max-width: 560px; }

.krow {
    display: flex;
    justify-content: center;
    gap: var(--kgap);
}

/* Genişlik: sütun birimi × --w (+ aradaki boşluklar) */
.key {
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--kgap)) / var(--cols) * var(--w, 1) + var(--kgap) * (var(--w, 1) - 1));
    min-width: 0;
    height: var(--key-h);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 0;
    border-radius: 12px;
    background: var(--kb-key);
    color: #f9fafb;
    font-family: inherit;
    font-size: var(--key-fs);
    font-weight: 500;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
    white-space: nowrap;
}

    .key.pressed {
        background: #3b4656;
        transform: translateY(1px);
        box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .35);
    }

    .key.k-fn {
        background: var(--kb-key-2);
        color: #d1d5db;
        font-size: calc(var(--key-fs) * .66);
        font-weight: 600;
    }

    .key.k-back { background: rgba(239, 68, 68, .9); color: #fff; }
    .key.k-back.pressed { background: #dc2626; }

    .key.k-enter {
        background: linear-gradient(135deg, var(--gold-2), var(--gold));
        color: var(--navy);
        font-size: calc(var(--key-fs) * .7);
        font-weight: 700;
    }

        .key.k-enter.pressed { background: var(--gold); }

    .key.k-shift.on { background: var(--gold); color: var(--navy); }
    .key.off { opacity: .25; pointer-events: none; }

    .key svg {
        width: 1.05em;
        height: 1.05em;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex: none;
    }

/* ========================= OVERLAY / MODAL / TOAST ========================= */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: var(--gutter);
    background: rgba(2, 6, 23, .36);
    backdrop-filter: blur(3px);
}

    /* kısa isteklerde yanıp sönmesin: görünürlük gecikmeli, dokunma engeli anında */
    .overlay:not(.hidden) { animation: fadeIn .2s ease .35s both; }

.overlay-box {
    min-width: min(18rem, 100%);
    padding: 1.8rem 2.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
    text-align: center;
}

    .overlay-box p {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
    }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: grid;
    place-items: center;
    padding: var(--gutter);
    background: rgba(2, 6, 23, .55);
    backdrop-filter: blur(4px);
    animation: fadeIn .2s ease both;
}

.modal {
    width: min(580px, 100%);
    padding: clamp(24px, 4vmin, 44px);
    border-radius: 28px;
    background: #fff;
    text-align: center;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .35);
    animation: enter .24s ease;
}

    .modal h2 {
        margin: 1rem 0 .4rem;
        font-size: 1.7rem;
    }

    .modal p {
        margin: 0 0 .4rem;
        font-size: 1.05rem;
        color: var(--muted);
        line-height: 1.45;
    }

.modal .btnrow { grid-template-columns: 1fr 1fr; }

.idle-ring {
    --p: 1;
    position: relative;
    width: 6.4rem;
    height: 6.4rem;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--gold) calc(var(--p) * 360deg), #eef0f3 0);
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

    .idle-ring::before {
        content: "";
        position: absolute;
        inset: 8px;
        border-radius: 50%;
        background: #fff;
    }

    .idle-ring span { position: relative; }

/* Yedek bildirim (toastr yüklenemezse) */
.toast-host {
    position: fixed;
    top: calc(var(--gutter) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    width: min(560px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.ktoast {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    border-left: 6px solid var(--gold);
    background: var(--navy);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 18px 50px rgba(2, 6, 23, .3);
    animation: enter .2s ease;
}

    .ktoast.success { border-left-color: var(--ok); }
    .ktoast.error { border-left-color: var(--danger); }
    .ktoast.warning { border-left-color: #f59e0b; }

/* toastr görünümü (kiosk ölçeği) */
#toast-container.toast-top-center {
    top: calc(var(--gutter) + 6px);
}

    #toast-container.toast-top-center > div {
        width: min(560px, calc(100vw - 32px));
        margin: 8px auto 0;
        padding: 18px 22px 18px 62px;
        border-radius: 16px;
        font-family: var(--font);
        font-size: 1.05rem;
        font-weight: 600;
        opacity: 1;
        background-color: var(--navy);
        background-position: 22px center;
        box-shadow: 0 18px 50px rgba(2, 6, 23, .3);
        border-left: 6px solid var(--gold);
    }

#toast-container > .toast-success { border-left-color: var(--ok) !important; }
#toast-container > .toast-error { border-left-color: var(--danger) !important; }
#toast-container > .toast-warning { border-left-color: #f59e0b !important; }
#toast-container .toast-progress { background: var(--gold); opacity: .6; }

/* ========================= KVKK AYDINLATMA METNİ ========================= */
/* Onay satırındaki bağlantı: dokunmak kutuyu işaretlemez (JS) */
.legal-link {
    display: inline;
    margin: -.6rem 0;
    padding: .6rem .1rem;              /* görünmez geniş dokunma alanı */
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: #7a6235;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    cursor: pointer;
}

    .legal-link svg {
        width: 1.05em;
        height: 1.05em;
        margin-right: .25em;
        vertical-align: -.15em;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .legal-link:active { color: var(--navy); }

#legalModal { z-index: 240; }          /* hareketsizlik uyarısı (250) üstte kalır */

.modal-legal {
    width: min(920px, 100%);
    max-height: min(calc(100dvh - 2 * var(--gutter)), 1400px);
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: clamp(20px, 3.4vmin, 40px);
}

.legal-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--border);
}

    .legal-head h2 {
        margin: 0;
        font-size: 1.5rem;
        line-height: 1.25;
    }

.legal-ic {
    flex: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--gold-soft);
}

    .legal-ic svg {
        width: 60%;
        height: 60%;
        fill: none;
        stroke: #7a6235;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* Kaydırılabilir gövde (parmakla sürükleme) */
.legal-body {
    flex: 1 1 auto;
    min-height: 8rem;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    padding: 1.1rem .9rem 1.1rem 0;
    font-size: 1.08rem;
    line-height: 1.65;
    color: var(--text-2);
    overflow-wrap: anywhere;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

    .legal-body::-webkit-scrollbar { width: 10px; }
    .legal-body::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

    /* altta devamı varsa solarak bit */
    .legal-body.more {
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
        mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
    }

    .legal-body > :first-child { margin-top: 0; }
    .legal-body h1, .legal-body h2, .legal-body h3,
    .legal-body h4, .legal-body h5, .legal-body h6 {
        margin: 1.2em 0 .5em;
        line-height: 1.3;
        color: var(--text);
    }
    .legal-body h1 { font-size: 1.4rem; }
    .legal-body h2 { font-size: 1.28rem; }
    .legal-body h3 { font-size: 1.16rem; }
    .legal-body h4, .legal-body h5, .legal-body h6 { font-size: 1.05rem; }
    .legal-body p { margin: 0 0 .9em; }
    .legal-body ul, .legal-body ol { margin: 0 0 1em; padding-left: 1.6em; }
    .legal-body li { margin: .3em 0; }
    .legal-body b, .legal-body strong { color: var(--text); }

    .legal-body table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        margin: 0 0 1em;
        font-size: .95rem;
    }

    .legal-body th, .legal-body td {
        padding: .45em .6em;
        border: 1px solid var(--border);
        text-align: left;
        vertical-align: top;
    }

    .legal-body th { background: var(--field-bg); color: var(--text); }

    .legal-body blockquote {
        margin: 0 0 1em;
        padding: .6em 1em;
        border-left: 4px solid var(--gold);
        background: #faf6ee;
    }

    .legal-body hr {
        margin: 1.2em 0;
        border: 0;
        border-top: 1px solid var(--border);
    }

.legal-loading, .legal-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
    padding: 2.4rem 0;
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.modal-legal .btnrow { flex: none; margin-top: 1rem; }

/* ========================= RESPONSIVE ========================= */

/* Dar ekran (tablet kiosk 800 px) */
@media (max-width: 860px) {
    .brand-text { padding-left: 10px; }
    .brand-name { font-size: 1.05rem; }
    .lang-btn { padding: 0 .45rem; }
    .sum-edit span { display: none; }
    .sum-edit { padding: 0; }
    .btnrow { grid-template-columns: 1fr 1.4fr; }
}

/* Kısa ekran (1366x768 vb.) */
@media (max-height: 860px) {
    .stepper { --dot: 30px; }
    .st-label { font-size: .8rem; }
    .subtitle { margin-bottom: 1.1rem; font-size: 1rem; }
    .card { padding: clamp(18px, 3.2vmin, 40px); }
    .btnrow { margin-top: 1.1rem; }
    .field { margin-bottom: .9rem; }

    .topbar { padding-top: 6px; padding-bottom: 6px; }
    .brand-logo, .brand-mark { height: 42px; }
    #stepSummary .subtitle { display: none; }
    .rez-strip { margin-bottom: .7rem; }
    .rez-cell { padding: .4rem .8rem; }
    .sum-item { padding: .45rem 1rem; }
    .sum-list { margin-bottom: .8rem; }
    .check { min-height: 58px; padding: .5rem 1rem; }

    /* klavye açıkken yer kazan */
    body.kb-open .stepper { display: none; }
    body.kb-open .card .subtitle,
    body.kb-open .card .hint { display: none; }
}

/* Çok kısa ekran */
@media (max-height: 700px) {
    .topbar { margin-top: 10px; }
    .stepper { margin-top: 8px; }
    .st-label { display: none; }
}
