/* ===== Bu yazıdan: alıntı kartları (köşede / paragraf aralarında) ===== */
.qmini {
    --qm-bg: #1a1a20;
    --qm-text: #f3efe7;
    --qm-soft: rgba(243, 239, 231, .6);
    --qm-line: rgba(255, 255, 255, .09);
    position: relative;
    margin: 0;
    padding: 16px 18px 14px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(155, 135, 97, .22), transparent 55%),
        var(--qm-bg);
    color: var(--qm-text);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    font-family: var(--sans);
    overflow: hidden
}

[data-theme="dark"] .qmini { --qm-bg: #262631 }

.qmini__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px
}

.qmini__icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(155, 135, 97, .2);
    color: var(--gold-light)
}

.qmini__icon svg { width: 17px; height: 17px }

.qmini__kicker {
    font-family: var(--heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-light)
}

.qmini__count {
    margin-left: auto;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--qm-soft);
    font-variant-numeric: tabular-nums
}

.qmini__x {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin-left: 2px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--qm-soft);
    font-size: 1.4rem;
    cursor: pointer;
    transition: background .15s, color .15s
}

.qmini__kicker + .qmini__x { margin-left: auto }
.qmini__x:hover { background: rgba(255, 255, 255, .1); color: #fff }

.qmini__text {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.65rem;
    line-height: 1.5;
    color: var(--qm-text);
    cursor: pointer;
    white-space: pre-line;
    transition: opacity .16s
}

.qmini__text:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; border-radius: 4px }

.qmini__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--qm-line)
}

.qmini__share {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 0;
    border-radius: 99px;
    background: var(--gold);
    color: #fff;
    font-family: var(--sans);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s
}

.qmini__share:hover { background: var(--gold-dark) }

.qmini__nav { display: flex; gap: 6px }

.qmini__nav button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: transparent;
    color: var(--qm-text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color .15s, color .15s
}

.qmini__nav button:hover { border-color: var(--gold-light); color: var(--gold-light) }

.qmini button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px }

/* Geniş ekran: köşede beliren kart */
.qfloat {
    position: fixed;
    bottom: 24px;
    z-index: 800;
    width: 320px;
    max-width: calc(50vw - 40px);
    box-shadow: 0 22px 50px rgba(14, 14, 20, .28), 0 4px 12px rgba(14, 14, 20, .14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .3s, visibility 0s linear .4s
}

.qfloat .qmini__text {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal
}

.qfloat.is-swap .qmini__text { opacity: 0 }

.qfloat[data-side="right"] { right: 24px; transform: translateX(calc(100% + 40px)) }
.qfloat[data-side="left"] { left: 24px; transform: translateX(calc(-100% - 40px)) }

.qfloat.is-on {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .3s, visibility 0s
}

html:not(.qwide) .qfloat { display: none }

/* Dar ekran: paragraf aralarında */
.qinline { margin: 8px 0 28px }

.qinline[hidden],
html.qwide .qinline { display: none }

@media (min-width: 700px) and (max-width: 1099px) {
    .qinline {
        width: 46%;
        margin-top: 6px;
        margin-bottom: 18px
    }

    .qinline[data-side="right"] { float: right; margin-left: 24px }
    .qinline[data-side="left"] { float: left; margin-right: 24px }
}

/* Küçültülmüş hâl: yuvarlak düğme + alıntı sayısı */
.qbubble {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 800;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1a1a20;
    color: #fff;
    box-shadow: 0 14px 34px rgba(14, 14, 20, .3), 0 3px 8px rgba(14, 14, 20, .18);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(.4);
    transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .2s, visibility 0s linear .3s, background .2s
}

.qbubble.is-on {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .2s, visibility 0s, background .2s
}

.qbubble:hover { background: #2a2a34 }
.qbubble:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px }
[data-theme="dark"] .qbubble { background: #2c2c38 }

.qbubble svg { width: 28px; height: 28px }

.qbubble__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 99px;
    background: #c0313d;
    color: #fff;
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1
}

@media (max-width: 1099px) {
    .qbubble { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 54px; height: 54px }
    .qbubble svg { width: 24px; height: 24px }
}

@media print {
    .qfloat, .qinline, .qbubble, .qsel { display: none !important }
}

/* ===== Paylaşım kartı penceresi ===== */
html.qc-lock { overflow: hidden }

.qc[hidden] { display: none }

.qc {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    font-family: var(--sans);
    color: var(--ink)
}

.qc__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 14, 20, .62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .2s
}

.qc__panel {
    position: relative;
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transition: opacity .2s, transform .2s
}

.qc.is-open .qc__backdrop { opacity: 1 }
.qc.is-open .qc__panel { opacity: 1; transform: none }

.qc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line)
}

.qc__kicker {
    display: block;
    font-family: var(--heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold)
}

.qc__head h2 {
    margin: 2px 0 0;
    font-family: var(--heading);
    font-size: 1.9rem;
    color: var(--ink)
}

.qc__x {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--cream);
    color: var(--ink);
    font-size: 1.6rem;
    cursor: pointer
}

.qc__x:hover { background: var(--cream-dark) }

.qc__body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
    min-height: 0;
    flex: 1;
    overflow: hidden
}

.qc__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    background:
        radial-gradient(circle at 1px 1px, rgba(155, 135, 97, .18) 1px, transparent 0) 0 0 / 18px 18px,
        var(--cream);
    min-height: 0
}

.qc__stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 0
}

.qc__stage canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(62vh, 600px);
    border-radius: 6px;
    box-shadow: 0 14px 40px rgba(26, 26, 32, .22), 0 2px 6px rgba(26, 26, 32, .12);
    background: #fff
}

.qc__panel[data-size="story"] .qc__stage canvas { max-height: min(66vh, 640px) }

.qc__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    color: var(--ink-soft);
    background: var(--cream)
}

.qc__loading[hidden] { display: none }

.qc__nav {
    display: flex;
    align-items: center;
    gap: 14px
}

.qc__arrow {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--ink);
    cursor: pointer
}

.qc__arrow:hover { border-color: var(--gold); color: var(--gold) }

.qc__count {
    min-width: 48px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink-soft)
}

.qc__controls {
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 0
}

.qc__group + .qc__group { margin-top: 18px }

.qc__label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-soft)
}

.qc__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.qc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s
}

.qc-chip small {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink-soft)
}

.qc-chip:hover { border-color: var(--gold-light) }

.qc-chip[aria-pressed="true"] {
    border-color: var(--gold);
    background: color-mix(in srgb, var(--gold) 10%, var(--card-bg));
    box-shadow: inset 0 0 0 1px var(--gold)
}

.qc-ratio {
    display: inline-block;
    border: 2px solid currentColor;
    border-radius: 3px;
    opacity: .7
}

.qc__chips--size .qc-chip { flex-direction: column; gap: 4px; min-width: 70px; padding: 10px 8px }
.qc__chips--size .qc-chip .qc-ratio { margin-bottom: 2px }

.qc__chips--theme .qc-chip { flex-direction: column; gap: 6px; padding: 8px; min-width: 64px; font-size: 1.15rem }

.qc-swatch {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .1);
    background-size: cover;
    background-position: center;
    overflow: hidden
}

.qc-swatch b {
    position: absolute;
    left: 8px;
    bottom: 8px;
    width: 18px;
    height: 4px;
    border-radius: 2px
}

.qc-swatch--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(14, 14, 20, .45)
}

.qc-aa {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--ink)
}

.qc__toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px
}

.qc-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--ink);
    cursor: pointer;
    user-select: none
}

.qc-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.qc-switch span {
    position: relative;
    flex: 0 0 auto;
    width: 36px;
    height: 20px;
    border-radius: 99px;
    background: var(--line);
    transition: background .2s
}

.qc-switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s
}

.qc-switch input:checked + span { background: var(--gold) }
.qc-switch input:checked + span::after { transform: translateX(16px) }
.qc-switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px }

.qc__info {
    margin: 18px 0 0;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink-soft)
}

.qc__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    background: var(--card-bg)
}

.qc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s
}

.qc-btn:hover { border-color: var(--gold) }
.qc-btn[hidden] { display: none }

.qc-btn--primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff
}

.qc-btn--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark) }

.qc__sep { flex: 1 }

.qc__social {
    display: flex;
    gap: 6px
}

.qc__social a,
.qc__social button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--ink);
    font-size: 1.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s, color .15s
}

.qc__social a:hover,
.qc__social button:hover { border-color: var(--gold); color: var(--gold) }

.qc__toast {
    position: absolute;
    left: 50%;
    bottom: 84px;
    transform: translate(-50%, 10px);
    padding: 10px 16px;
    border-radius: 99px;
    background: var(--ink);
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis
}

.qc__toast.is-on { opacity: 1; transform: translate(-50%, 0) }

.qc button:focus-visible,
.qc a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px }

.qc__tabs { display: none }

@media (max-width: 860px) {
    .qc { padding: 0; place-items: end stretch }

    .qc__panel {
        width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        height: 100vh;
        height: 100dvh;
        border-radius: 0
    }

    .qc__head { padding: 10px 16px }
    .qc__kicker { font-size: 1rem }
    .qc__head h2 { font-size: 1.6rem }
    .qc__x { width: 34px; height: 34px }

    /* Önizleme kalan alanı doldurur; seçenekler ve düğmeler hep ekranda kalır */
    .qc__body {
        display: flex;
        flex-direction: column;
        overflow: hidden
    }

    .qc__preview {
        flex: 1 1 auto;
        min-height: 0;
        padding: 12px 16px 8px;
        gap: 8px
    }

    .qc__stage { flex: 1 1 auto; min-height: 0 }

    .qc__stage canvas,
    .qc__panel[data-size="story"] .qc__stage canvas {
        max-height: calc(100dvh - 400px);
        min-height: 180px;
        object-fit: contain
    }

    .qc__nav { gap: 10px }
    .qc__arrow { width: 30px; height: 30px }

    .qc__controls {
        flex: 0 0 auto;
        padding: 0;
        overflow: visible;
        border-top: 1px solid var(--line);
        background: var(--card-bg)
    }

    .qc__tabs {
        display: flex;
        gap: 4px;
        padding: 8px 12px 0;
        overflow-x: auto;
        scrollbar-width: none
    }

    .qc__tabs::-webkit-scrollbar { display: none }

    .qc__tabs button {
        flex: 0 0 auto;
        padding: 8px 12px;
        border: 0;
        border-bottom: 2px solid transparent;
        background: none;
        color: var(--ink-soft);
        font-family: var(--sans);
        font-size: 1.3rem;
        font-weight: 600;
        cursor: pointer
    }

    .qc__tabs button[aria-selected="true"] {
        color: var(--ink);
        border-bottom-color: var(--gold)
    }

    .qc__group,
    .qc__group + .qc__group { display: none; margin: 0; padding: 10px 16px 12px }
    .qc__group.is-active { display: block }
    .qc__group.qc__toggles.is-active { display: grid }
    .qc__label { display: none }
    .qc__info { display: none }

    /* Seçenekler tek satır, yana kaydırılır */
    .qc__chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px
    }

    .qc__chips::-webkit-scrollbar { display: none }
    .qc-chip { flex: 0 0 auto }
    .qc__chips--size .qc-chip { min-width: 72px; padding: 8px }
    .qc__chips--theme .qc-chip { min-width: 58px; padding: 6px }
    .qc-swatch { width: 34px; height: 34px }
    .qc__toggles { gap: 10px 12px }
    .qc-switch { font-size: 1.25rem }

    .qc__actions {
        flex: 0 0 auto;
        flex-wrap: wrap;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        gap: 8px
    }

    .qc__actions .qc-btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 11px 8px;
        font-size: 1.3rem;
        white-space: nowrap
    }

    .qc__sep { display: none }

    /* Sosyal ağ düğmeleri: paylaş düğmelerinin altında tek satır */
    .qc__social {
        flex: 0 0 100%;
        justify-content: center;
        gap: 8px
    }

    .qc__social a,
    .qc__social button { width: 36px; height: 36px; font-size: 1.4rem }

    .qc__toast { bottom: 130px }
}

@media (prefers-reduced-motion: reduce) {
    .qfloat, .qbubble, .qmini__text, .qc__panel, .qc__backdrop { transition: none }
}


.qc__nav[hidden] { display: none }

/* ===== Metin seçince çıkan araç çubuğu ===== */
.qsel[hidden] { display: none }

.qsel {
    position: absolute;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    font-family: var(--sans);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s;
    user-select: none;
    -webkit-user-select: none
}

[data-theme="dark"] .qsel { background: #2c2c38; color: #f0ece4 }

.qsel.is-on { opacity: 1; transform: none }

.qsel::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: inherit;
    transform: rotate(45deg);
    border-radius: 2px
}

.qsel.is-below::after { bottom: auto; top: -6px }

.qsel button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 1.35rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap
}

.qsel button:hover { background: rgba(255, 255, 255, .12) }

.qsel button[data-sel="card"] { background: var(--gold); color: #fff }
.qsel button[data-sel="card"]:hover { background: var(--gold-dark) }


.article-body ::selection { background: rgba(155, 135, 97, .3) }
