/* ===========================================================================
   responsive.css — phones and tablets
   ===========================================================================

   The theme was built for a fixed 1000px desktop page (style5cbc pins
   `.container` to min-width:1000px and bootstrapf463 forces the desktop navbar
   at every width). This sheet is loaded last and only acts below 1024px, so
   the desktop page is untouched.

     ≤ 1023px  the container follows the viewport instead of scrolling sideways
     ≤  991px  app chrome: top bar with drawer menu + search, bottom tab bar
     ≤  767px  phones: one column, larger touch targets, swipeable tab strips

   Markup hooks live in layouts/app.blade.php (.mobil-*), behaviour in
   assets/js/mobil.js. Drawer/search state is a class on <html>.

   Contents
     - Tokens
     - Desktop: hide the app chrome
     - Fluid container (≤1023)
     - App chrome (≤991): top bar, drawer, search, tab bar
     - Layout (≤991)
     - Phones (≤767): grid, panels, tabs, cards, forms, modals, footer
     - Small phones (≤374)
   =========================================================================== */

:root {
    --mobil-bar: 56px;
    --mobil-sekme: 58px;
    --mobil-guvenli-alt: env(safe-area-inset-bottom, 0px);
    --mobil-guvenli-ust: env(safe-area-inset-top, 0px);
    --mobil-zemin: #222;
    --mobil-cekmece: #fff;
    --mobil-cekmece-yazi: #333;
    --mobil-cekmece-cizgi: #eee;
    --mobil-vurgu: #d9534f;
}

body.dark {
    --mobil-zemin: #23252c;
    --mobil-cekmece: #1e2026;
    --mobil-cekmece-yazi: #c5c8ce;
    --mobil-cekmece-cizgi: #2e3039;
}

/* ---- desktop: none of the app chrome ---- */

#site .mobil-ust-btn,
#site .mobil-logo,
#site .mobil-perde,
#site .mobil-sekme,
#site .mobil-cekmece-baslik,
#site .mobil-etiket,
#site .anime-detay .izle-devam {
    display: none;
}

/* ---- fluid container: below the theme's 1000px floor ---- */

@media (max-width: 1023px) {
    #site .container {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
    }

    html,
    body#site {
        overflow-x: hidden;
    }

    #site img,
    #site video,
    #site iframe,
    #site embed {
        max-width: 100%;
    }

    #site img {
        height: auto;
    }

    #page {
        min-height: 0;
    }
}

/* ===========================================================================
   App chrome (phones and tablets)
   =========================================================================== */

@media (max-width: 991px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body#site {
        padding-top: calc(var(--mobil-bar) + var(--mobil-guvenli-ust));
        padding-bottom: calc(var(--mobil-sekme) + var(--mobil-guvenli-alt));
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    #site a,
    #site button,
    #site .btn,
    #site [data-toggle] {
        touch-action: manipulation;
    }

    /* ---- top bar ---- */

    #site > header.navbar {
        height: calc(var(--mobil-bar) + var(--mobil-guvenli-ust)) !important;
        min-height: 0;
        margin: 0;
        padding-top: var(--mobil-guvenli-ust);
        border: 0;
        border-radius: 0;
        background: var(--mobil-zemin) !important;
    }

    #site > header.navbar > .container {
        display: flex;
        align-items: center;
        height: var(--mobil-bar);
        padding: 0 4px;
        padding-left: max(4px, env(safe-area-inset-left));
        padding-right: max(4px, env(safe-area-inset-right));
    }

    #site .mobil-ust-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #e6e6e6;
        font-size: 18px;
        cursor: pointer;
    }

    .mobil-ust-btn:active {
        background: rgba(255, 255, 255, .12);
    }

    /* hamburger that turns into an × while the drawer is open */
    .mobil-menu-cizgi,
    .mobil-menu-cizgi::before,
    .mobil-menu-cizgi::after {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .25s ease, background-color .25s ease;
    }

    .mobil-menu-cizgi {
        position: relative;
    }

    .mobil-menu-cizgi::before,
    .mobil-menu-cizgi::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .mobil-menu-cizgi::before { top: -6px; }
    .mobil-menu-cizgi::after { top: 6px; }

    .mobil-menu-acik .mobil-menu-cizgi { background-color: transparent; }
    .mobil-menu-acik .mobil-menu-cizgi::before { transform: translateY(6px) rotate(45deg); }
    .mobil-menu-acik .mobil-menu-cizgi::after { transform: translateY(-6px) rotate(-45deg); }

    #site .mobil-logo {
        display: flex;
        align-items: center;
        flex: 0 1 auto;
        min-width: 0;
        height: 100%;
        margin-right: auto;
        padding: 0 6px;
    }

    .mobil-logo img {
        width: auto;
        max-width: 120px;
        height: 40px !important;
        object-fit: contain;
    }

    /* the right-hand group: theme toggle and the account controls */
    #site > header .navbar-right {
        display: flex;
        align-items: center;
        float: none !important;
        margin: 0 !important;
    }

    #site > header .navbar-right > li {
        float: none !important;
        position: static;
    }

    #site > header .navbar-right > li > a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        height: 44px;
        padding: 0 10px !important;
        line-height: 1;
    }

    #site > header .navbar-right .misafir-baglanti {
        display: none;
    }

    #site > header .navbar-right .theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0 !important;
        margin: 0;
    }

    /* the account and notification dropdowns become sheets under the bar */
    #site > header .navbar-right .dropdown-menu {
        position: fixed !important;
        top: calc(var(--mobil-bar) + var(--mobil-guvenli-ust)) !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-height: calc(100vh - var(--mobil-bar) - var(--mobil-sekme) - 24px);
        max-height: calc(100dvh - var(--mobil-bar) - var(--mobil-sekme) - var(--mobil-guvenli-ust) - var(--mobil-guvenli-alt) - 16px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
    }

    #site > header .navbar-right .dropdown-menu > li > a {
        padding: 12px 16px;
    }

    /* ---- search: drops down under the bar ---- */

    #site > header #search {
        position: fixed;
        top: calc(var(--mobil-bar) + var(--mobil-guvenli-ust));
        left: 0;
        right: 0;
        z-index: 1029;
        display: block;
        float: none !important;
        margin: 0;
        padding: 10px 12px;
        border: 0;
        background: var(--mobil-zemin);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
        transform: translateY(-110%);
        visibility: hidden;
        transition: transform .22s ease, visibility 0s linear .22s;
    }

    .mobil-arama-acik #site > header #search {
        transform: none;
        visibility: visible;
        transition: transform .22s ease;
    }

    #site > header #search form {
        margin: 0;
    }

    #site > header #search input[type="search"],
    #site > header #search input[type="search"]:focus {
        width: 100% !important;
        height: 44px !important;
        padding: 0 14px 0 38px !important;
        border-radius: 22px;
        background-position: 13px center;
        /* 16px keeps iOS from zooming in on focus */
        font-size: 16px;
    }

    .mobil-arama-acik .mobil-arama-btn {
        color: #fff;
    }

    /* ---- drawer: the configured main menu ---- */

    #site > header #mobil-cekmece {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        display: block;
        float: none !important;
        width: 82vw;
        max-width: 320px;
        margin: 0 !important;
        padding: var(--mobil-guvenli-ust) 0 calc(16px + var(--mobil-guvenli-alt));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: var(--mobil-cekmece);
        box-shadow: 4px 0 24px rgba(0, 0, 0, .35);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s;
    }

    .mobil-menu-acik #site > header #mobil-cekmece {
        transform: none;
        visibility: visible;
        transition: transform .26s cubic-bezier(.2, .8, .2, 1);
    }

    #site > header #mobil-cekmece > li {
        float: none !important;
        display: block;
        border-bottom: 1px solid var(--mobil-cekmece-cizgi);
    }

    #site > header #mobil-cekmece > li.mobil-cekmece-baslik {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 116px;
        padding: 12px 20px;
        background: var(--mobil-zemin);
        border: 0;
    }

    #site .mobil-cekmece-baslik img {
        width: auto;
        max-width: 100%;
        height: 88px !important;
        object-fit: contain;
    }

    #site > header #mobil-cekmece > li > a {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 50px;
        padding: 12px 20px !important;
        color: var(--mobil-cekmece-yazi) !important;
        background: transparent !important;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
        text-transform: none;
    }

    #site > header #mobil-cekmece > li.active > a {
        color: var(--mobil-vurgu) !important;
        box-shadow: inset 4px 0 0 var(--mobil-vurgu);
    }

    #site > header #mobil-cekmece > li > a:active {
        background: rgba(127, 127, 127, .15) !important;
    }

    #site > header #mobil-cekmece > li > a .caret {
        margin-left: auto;
        transition: transform .2s ease;
    }

    #site > header #mobil-cekmece > li.open > a .caret {
        transform: rotate(180deg);
    }

    /* the home link carries only an icon on desktop */
    #site > header #mobil-cekmece > li > a > .nav-icon {
        font-size: 18px;
    }

    #site > header #mobil-cekmece .mobil-etiket {
        display: inline;
        margin-left: 4px;
    }

    #site > header #mobil-cekmece .nav-rozet {
        position: static;
        margin-left: 6px;
    }

    #site > header #mobil-cekmece .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin: 0;
        padding: 0 0 6px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    #site > header #mobil-cekmece .dropdown-menu > li > a {
        padding: 11px 20px 11px 36px !important;
        color: var(--mobil-cekmece-yazi) !important;
        font-size: 14px;
        line-height: 1.4;
        background: transparent !important;
    }

    #site .mobil-perde {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: block;
        background: rgba(0, 0, 0, .5);
        opacity: 0;
        transition: opacity .26s ease;
    }

    #site .mobil-perde[hidden] {
        display: none;
    }

    .mobil-menu-acik .mobil-perde {
        opacity: 1;
    }

    .mobil-menu-acik body {
        overflow: hidden;
    }

    /* the drawer and its backdrop live inside the header's stacking context;
       lift the whole header over the tab bar while it is open */
    .mobil-menu-acik #site > header.navbar {
        z-index: 1045;
    }

    /* ---- bottom tab bar ---- */

    #site .mobil-sekme {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: flex;
        height: calc(var(--mobil-sekme) + var(--mobil-guvenli-alt));
        padding: 0 env(safe-area-inset-right, 0) var(--mobil-guvenli-alt) env(safe-area-inset-left, 0);
        background: var(--mobil-zemin);
        border-top: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
    }

    .mobil-sekme > a {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        color: #9aa0aa;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
    }

    .mobil-sekme > a > .fa {
        font-size: 20px;
    }

    .mobil-sekme > a > span {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .mobil-sekme > a:hover,
    .mobil-sekme > a:focus {
        color: #e6e6e6;
        text-decoration: none;
    }

    .mobil-sekme > a.aktif {
        color: #fff;
    }

    .mobil-sekme > a.aktif > .fa {
        color: var(--mobil-vurgu);
    }

    .mobil-sekme > a:active {
        background: rgba(255, 255, 255, .06);
    }

    /* the floating "to top" button sits above the tab bar */
    #site .back-to-top,
    #site .back-to-top:hover {
        right: 14px;
        bottom: calc(var(--mobil-sekme) + var(--mobil-guvenli-alt) + 14px);
        transform: scale(.85);
    }

    /* ---- page frame ---- */

    #site > .container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }

    #page {
        padding: 8px 4px 0;
        box-shadow: none !important;
    }

    /* the top bar shows the logo; the masthead keeps it for screen readers (it is
       the home page's <h1>) and only the banner slot stays visible */
    .logo-satiri .logo-kutusu {
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .logo-satiri .logo-banner {
        float: none;
        width: 100%;
    }

    .logo-satiri .logo-banner:not(:has(*)) {
        display: none;
    }

    /* A–Z strip: one swipeable row */
    .logo-satiri {
        margin-top: 0 !important;
    }

    #site .harf-seridi {
        min-height: 0;
        margin: 0 0 8px;
    }

    #site .harf-seridi .harf-seridi-govde {
        padding: 6px 0;
    }

    #site .harf-seridi .btn-group {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        padding: 0 6px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    #site .harf-seridi .btn-group::-webkit-scrollbar {
        display: none;
    }

    #site .harf-seridi .harf-btn {
        flex: 0 0 auto;
        float: none;
        min-width: 40px;
        height: 38px;
        line-height: 26px;
        scroll-snap-align: start;
    }

    /* every horizontal tab strip scrolls sideways instead of wrapping or stacking */
    #site .nav-tabs,
    #site .panel-tabs {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    #site .nav-tabs::-webkit-scrollbar,
    #site .panel-tabs::-webkit-scrollbar {
        display: none;
    }

    #site .nav-tabs > li,
    #site .panel-tabs > li {
        display: block;
        flex: 0 0 auto;
        float: none;
        width: auto;
        scroll-snap-align: start;
    }

    #site .nav-tabs > li > a,
    #site .panel-tabs > li > a {
        display: flex;
        align-items: center;
        min-height: 44px;
        margin: 0;
        white-space: nowrap;
    }

    /* a justified strip ("Bölümler · Tam Liste · …", "Site Yorumlar") stays as on the
       desktop: its tabs share the whole bar, labels centred — a narrow bar (the
       tablet sidebar) wraps a label onto two lines rather than cutting the last tab */
    #site .panel-tabs.nav-justified > li {
        flex: 1 1 auto;
        min-width: 0;
    }

    #site .panel-tabs.nav-justified > li > a {
        justify-content: center;
        padding-left: 6px;
        padding-right: 6px;
        text-align: center;
        white-space: normal;
    }

    /* "Beğen": the thumb (reactionf463.css) is pinned 2px from the top, which centres
       it in the desktop's 30px button; the taller touch-size button left it high */
    #site .reactions {
        background-position: left 5px center !important;
    }

    /* the comments bar: title and count on the left, the sort on the right, in one
       row while they fit (comments.css stacks them below 992px) */
    #site .site-comment-summary {
        align-items: center;
    }

    #site .site-comment-summary-main {
        flex: 1 1 auto;
    }

    #site .site-comment-sort {
        margin-left: auto;
    }

    /* wide content scrolls inside its own box rather than the page */
    #site .table-responsive,
    #site .panel-body > table,
    #site .panel-body > .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* SİTE İSTATİSTİKLERİ, a short label : value table, never needs to scroll: kept a
       table, so its rows fill the panel instead of stopping short of its right edge */
    #site .panel-body > table.istatistik-tablo {
        display: table;
        overflow: visible;
    }

    /* the member card's three-row table fits its box: as a block its rows stopped
       short of the right edge, leaving an empty unstriped strip */
    #site .panel-body > .uye-kart-tablo {
        display: table;
        table-layout: fixed;
        overflow: visible;
    }

    #site .uye-kart-tablo > tbody > tr > td:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #site .uye-kart-tablo .menum-bilgi {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }

    #site pre {
        white-space: pre-wrap;
        word-break: break-word;
    }

    /* modals become bottom-anchored sheets */
    #site .modal {
        -webkit-overflow-scrolling: touch;
    }

    #site .modal-dialog,
    #site .modal-dialog.modal-dar {
        width: auto !important;
        max-width: none !important;
        margin: 12px;
        margin-top: calc(12px + var(--mobil-guvenli-ust));
    }

    /* .modal's 30px and the dialog's own margin above: left free below too */
    #site .modal-dialog.modal-ortali {
        min-height: calc(100vh - 84px - 2 * var(--mobil-guvenli-ust));
    }

    /* bootstrapf463 zooms the dialog in from top:300px and pulls it back up by
       300px; on a short screen that leaves the top half off-screen. Slide up instead. */
    #site .modal.fade .modal-dialog {
        top: 0;
        opacity: 0;
        -webkit-transform: translate3d(0, 40px, 0);
        transform: translate3d(0, 40px, 0);
    }

    #site .modal.fade.in .modal-dialog {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }

    #site .modal-content {
        border-radius: 14px;
        overflow: hidden;
    }

    /* form controls at 16px so iOS does not zoom in on focus */
    #site input[type="text"],
    #site input[type="search"],
    #site input[type="email"],
    #site input[type="password"],
    #site input[type="url"],
    #site input[type="number"],
    #site input[type="tel"],
    #site input[type="date"],
    #site select,
    #site textarea,
    #site .form-control {
        font-size: 16px;
    }

    /* footer clears the tab bar and centres */
    #site > footer {
        margin-top: 8px;
    }

    #site > footer .copyright,
    #site > footer .footer-nav {
        float: none;
        width: 100%;
        padding: 0 8px;
        text-align: center;
    }

    #site > footer .footer-nav ul.footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px 14px;
        float: none;
        margin: 8px 0 0;
        font-size: 12px;
    }

    #site > footer .footer-nav ul.footer-links > li {
        float: none;
    }

    #site > footer .footer-nav ul.footer-links > li a {
        display: inline-block;
        padding: 6px 0;
        color: #9aa0aa;
    }

    #site > footer .footer-nav ul.footer-links > li::after {
        content: none;
    }

    .ozel-html {
        overflow-x: auto;
    }
}

/* ===========================================================================
   Phones and tablets: content blocks
   =========================================================================== */

@media (max-width: 991px) {
    /* ---- watch page: a 16:9 player and wrapping source buttons ---- */

    /* the frame itself is 16:9 and the player fills it: the theme's 60% + 30px box
       would leave a dark band under a 16:9 video */
    #site .video-frame {
        height: auto;
        padding: 0;
        aspect-ratio: 16 / 9;
    }

    #site .video-frame iframe {
        width: 100% !important;
        height: 100% !important;
    }

    #site .fragman-kutu iframe {
        display: block;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    #site .izle-govde {
        padding-left: 0;
        padding-right: 0;
    }

    #site .izle-govde > .btn-group,
    #site .izle-govde .btn-group.pull-right {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 0 8px 8px;
    }

    #site .izle-govde > .btn-group > .btn,
    #site .izle-govde .btn-group.pull-right > .btn {
        float: none;
        flex: 1 1 auto;
        margin: 0;
        border-radius: 8px !important;
    }

    /* the links under the player stay as on the desktop: small, side by side from
       the left and wrapping, 2px apart, square but for the row's two ends */
    #site .izle-govde > .btn-group:not(.izle-fansublar):not(.pull-right) {
        display: block;
        margin: 0;
    }

    #site .izle-govde > .btn-group:not(.izle-fansublar):not(.pull-right) > .btn {
        float: left;
        min-height: 0;
        margin: 2px;
        border-radius: 0 !important;
    }

    #site .izle-govde > .btn-group:not(.izle-fansublar):not(.pull-right) > .btn:first-child {
        border-top-left-radius: 3px !important;
        border-bottom-left-radius: 3px !important;
    }

    #site .izle-govde > .btn-group:not(.izle-fansublar):not(.pull-right) > .btn:last-child {
        border-top-right-radius: 3px !important;
        border-bottom-right-radius: 3px !important;
    }

    /* the fansubs stay as on the desktop: small, in the right corner, flush with the
       player under them; one joined group with the theme's small corners */
    #site .izle-govde .btn-group.izle-fansublar {
        justify-content: flex-end;
        gap: 0;
        width: fit-content;
        max-width: 100%;
        margin: 0 0 0 auto;
        /* the desktop's inline group leaves 2px above and below its buttons */
        padding: 2px 0;
    }

    #site .izle-govde .btn-group.izle-fansublar > .btn {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 0 !important;
    }

    #site .izle-govde .btn-group.izle-fansublar > .btn + .btn {
        margin-left: -1px;
    }

    #site .izle-govde .btn-group.izle-fansublar > .btn:first-child {
        border-top-left-radius: 3px !important;
        border-bottom-left-radius: 3px !important;
    }

    #site .izle-govde .btn-group.izle-fansublar > .btn:last-child {
        border-top-right-radius: 3px !important;
        border-bottom-right-radius: 3px !important;
    }

    /* the sponsor and news widgets take the main column's full width */
    #site .ana-kolon > [class*="col-"] {
        width: 100%;
    }

    /* the floating "FILLER" word is centred across the row on desktop; in a
       narrow list (the tablet sidebar, a phone) it ran into the name and the
       date, so it follows the name instead */
    #site .filler-yuzen {
        position: static;
        display: inline-flex;
        margin-left: 6px;
        font-size: 10px;
        letter-spacing: .15em;
        vertical-align: middle;
        transform: none;
    }

    #site .filler-yuzen > span {
        margin-right: -.15em;
    }

    #site .filler-yuzen::before,
    #site .filler-yuzen::after {
        content: none;
    }

    /* an ad space with nothing booked is a blank screenful on a phone or tablet */
    #site [class*="col-"]:has(> .panel > .reklam-govde):not(:has(.reklam-govde *)) {
        display: none;
    }

    /* ---- the anime page's "İzle" / "Devam Et" button (phones and tablets) ---- */
    #site .anime-detay .izle-devam {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        margin: 0 0 10px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 700;
        white-space: normal;
    }

    /* in the tablet's desktop layout it heads the poster column, level with the menu */
    #site .anime-detay-sol .izle-devam {
        margin-right: 5px;
    }
}

/* ===========================================================================
   Tablets in portrait (iPad mini, iPad, Galaxy Tab): the anime detail block
   keeps the desktop layout, with a poster column that does not get squeezed
   =========================================================================== */

@media (min-width: 768px) and (max-width: 991px) {
    #site .anime-detay-yerlesim > tbody > tr > .anime-detay-sol {
        width: 180px;
        min-width: 180px;
    }

    #site .anime-detay-afis > .anime-detay-afis-gorsel,
    #site .anime-detay-afis .poster > .anime-detay-afis-gorsel {
        width: 170px;
        height: auto;
        aspect-ratio: 221 / 325;
        object-fit: cover;
    }

    #site .anime-detay .izle-devam {
        min-height: 42px;
        padding: 8px 10px;
        font-size: 14px;
        line-height: 1.25;
    }

    /* the social buttons are one-line; in the ~240px sidebar the longer names
       ran out of the button, so they wrap inside it instead */
    #site .social_links a {
        min-height: 36px;
        padding: 7px 8px 7px 10px;
        white-space: normal;
        line-height: 1.25;
    }

    #site .social_links a img {
        flex: 0 0 auto;
        margin-right: 8px;
    }

    /* the theme pulls the menu up under the poster; under the button it needs its room */
    #site .anime-detay .izle-devam + .detail-menu {
        margin-top: 0;
    }
}

/* ===========================================================================
   Phones: the anime detail block, stacked
   =========================================================================== */

@media (max-width: 767px) {
    /* ---- anime detail block (anime page, "Günün Animesi") ----
       phones only — a tablet keeps the desktop layout: the poster, the section
       menu as a grid of buttons, the info table full width below */

    #site .anime-detay.table-responsive {
        overflow: visible;
        border: 0;
        margin-bottom: 0;
    }

    #site .anime-detay-yerlesim,
    #site .anime-detay-yerlesim > tbody,
    #site .anime-detay-yerlesim > tbody > tr,
    #site .anime-detay-yerlesim > tbody > tr > td {
        display: block;
        width: 100% !important;
        max-width: none;
    }

    #site .anime-detay-sol > table,
    #site .anime-detay-sol > table > tbody,
    #site .anime-detay-sol > table > tbody > tr,
    #site .anime-detay-sol > table > tbody > tr > td {
        display: block;
        width: 100%;
    }

    #site .anime-detay-afis {
        float: none !important;
        display: block;
        width: 160px;
        margin: 0 auto 10px;
    }

    #site .anime-detay-afis > .anime-detay-afis-gorsel,
    #site .anime-detay-afis .poster > .anime-detay-afis-gorsel {
        width: 100%;
        height: auto;
        aspect-ratio: 221 / 325;
        object-fit: cover;
    }

    /* a fixed grid, not a sideways strip: nothing to drag left and right */
    #site .anime-detay .detail-menu {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 6px;
        margin: 0 0 10px;
        padding: 0;
        overflow: visible;
    }

    #site .anime-detay .detail-menu > .list-group-item {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        min-height: 42px;
        margin: 0;
        padding: 8px 10px;
        border-radius: 8px !important;
        font-size: 13px;
        line-height: 1.25;
        text-align: left;
    }

    #site .anime-detay .detail-menu > .list-group-item > .fa {
        flex: 0 0 auto;
        width: auto;
        margin: 0;
    }

    /* each row reads label above value, so a value (the like / watchlist
       group, a long studio list) gets the full width */
    #site .anime-bilgi,
    #site .anime-bilgi > tbody,
    #site .anime-bilgi > tbody > tr,
    #site .anime-bilgi > tbody > tr > td {
        display: block;
        width: 100% !important;
        border: 0;
    }

    #site .anime-bilgi {
        margin-bottom: 0;
        border-radius: 8px;
        overflow: hidden;
    }

    #site .anime-bilgi > tbody > tr {
        padding: 8px 12px;
        border-bottom: 1px solid rgba(127, 127, 127, .15);
    }

    #site .anime-bilgi > tbody > tr > td {
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        overflow-wrap: anywhere;
    }

    #site .anime-bilgi > tbody > tr:nth-of-type(odd) {
        background: rgba(127, 127, 127, .07);
    }

    #site .anime-bilgi > tbody > tr > td:nth-child(2):not([colspan]) {
        display: none;
    }

    #site .anime-bilgi > tbody > tr > td:first-child:not([colspan]) {
        margin-bottom: 3px;
        font-size: 11px;
        letter-spacing: .03em;
        text-transform: uppercase;
        opacity: .7;
    }

    #site .anime-bilgi > tbody > tr > td[height] {
        height: auto;
    }

    #site .anime-etiket {
        min-height: 30px;
        padding: 5px 9px;
    }

    #site .anime-detay-sol .izle-devam {
        margin-right: 0;
    }
}

/* ===========================================================================
   Phones
   =========================================================================== */

@media (max-width: 767px) {
    /* the theme's forced desktop navbar (bootstrapf463/mobilf463) */
    #site .navbar {
        height: auto;
    }

    #site > .container {
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    #site .row {
        margin-left: -4px;
        margin-right: -4px;
    }

    /* ---- one column, in reading order ----
       shell.blade.php's two columns are flattened (display: contents) into one
       flex list: the board and news, the page, the episode list, the comments,
       then the rest of the sidebar. */

    #site .sayfa-izgara {
        display: flex;
        flex-direction: column;
    }

    #site .sayfa-izgara > .col-sm-8,
    #site .sayfa-izgara > aside,
    #site .ana-kolon,
    #site .yan-kolon {
        display: contents;
    }

    #site .sayfa-izgara::before,
    #site .sayfa-izgara::after {
        display: none;
    }

    #site .ana-kolon > *,
    #site .yan-kolon > * {
        order: 3;
        width: 100%;
    }

    #site .yan-kolon > .duyuru-kolonu {
        order: 1;
    }

    #site .ana-kolon > .haber-kolonu {
        order: 2;
    }

    #site .yan-kolon > .katalog-kolonu {
        order: 4;
    }

    #site .ana-kolon > .yorum-kolonu {
        order: 5;
    }

    #site .yan-kolon > :not(.duyuru-kolonu):not(.katalog-kolonu) {
        order: 6;
    }

    #site [class*="col-xs-"],
    #site [class*="col-sm-"],
    #site [class*="col-md-"] {
        padding-left: 4px;
        padding-right: 4px;
    }

    #site .panel {
        margin-bottom: 10px;
        border-radius: 10px;
        overflow: hidden;
    }

    #site .panel-body {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* big, comfortable buttons; a small group stays compact */
    #site .btn {
        min-height: 40px;
    }

    #site .btn-sm,
    #site .btn-group-sm > .btn {
        min-height: 34px;
    }

    #site .btn-xs,
    #site .btn-group-xs > .btn {
        min-height: 30px;
    }

    /* bootstrapf463 sets `.btn { white-space: normal !important }`, so a group's
       labels broke onto a second line; a group stays one row of one-line buttons */
    #site .btn-group {
        display: inline-flex;
        flex-wrap: nowrap;
        max-width: 100%;
        vertical-align: middle;
    }

    #site .btn-group.pull-right {
        display: flex;
    }

    #site .btn-group > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        float: none;
        white-space: nowrap !important;
    }

    #site .harf-seridi .btn-group {
        display: flex !important;
    }

    /* member card: the three buttons share the row evenly */
    #site .uye-kart-butonlar {
        display: flex;
        width: 100%;
    }

    #site .uye-kart-butonlar > .btn {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 4px;
        padding-right: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #site .uye-kart-butonlar > .btn > .fa {
        flex: 0 0 auto;
        width: auto;
    }

    /* ---- watch page header: crumbs and the prev / cinema / next buttons on one
       compact row, no empty band beneath ---- */

    #site .izle-ust {
        align-items: center;
        min-height: 0;
        padding-top: 8px;
        padding-bottom: 8px;
        line-height: 18px;
    }

    #site .izle-gezinme {
        flex: 0 0 auto;
        margin: 0;
    }

    #site .izle-gezinme > .btn {
        width: 38px;
        min-height: 36px;
        padding: 0;
    }

    #site .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    #site .pagination > li > a,
    #site .pagination > li > span {
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px !important;
        margin: 0;
    }

    #site .btn-toolbar {
        float: none !important;
    }

    /* long titles and links never push the page wider */
    #site h1,
    #site h2,
    #site h3,
    #site .panel-title,
    #site .media-heading {
        overflow-wrap: anywhere;
    }

    #site .media,
    #site .media-body {
        overflow: visible;
    }

    /* ---- side widgets with desktop-sized fixed heights ---- */

    /* the board and the news feed share style5cbc's 270px #news-feed box;
       an empty board shrinks to its message */
    #site .pano-govde,
    #site .pano-govde > #news-feed {
        height: auto;
        max-height: 320px;
    }

    #site .bos-durum {
        padding: 22px 16px;
    }

    /* ---- forms: Bootstrap's horizontal form gutters bleed past the panel ---- */

    #site .form-alani {
        margin: 10px 4px;
    }

    #site .form-horizontal .form-group {
        margin-left: 0;
        margin-right: 0;
    }

    #site .form-alani .btn-primary.pull-right {
        float: none !important;
        width: 100%;
    }

    /* ---- admin panel (/yonetim) ----
       the 172px side menu left the forms ~140px; the menu becomes a two-column
       grid of buttons above the section, which gets the full width */

    #site .yonetim {
        flex-direction: column;
    }

    #site .yonetim-menu {
        flex: none;
        padding: 10px;
        border-right: 0;
        border-bottom: 1px solid #ddd;
    }

    #site.dark .yonetim-menu {
        border-bottom-color: #17191f;
    }

    #site .yonetim-menu .link-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        max-height: none;
        border: 0 !important;
    }

    #site .yonetim-menu .link-list li,
    #site .yonetim-menu .link-list li:last-child,
    #site .yonetim-menu .link-list li.yonetim-menu-ayri {
        margin: 0;
        border: 1px solid #ddd !important;
        border-radius: 8px;
        overflow: hidden;
    }

    #site.dark .yonetim-menu .link-list li,
    #site.dark .yonetim-menu .link-list li:last-child,
    #site.dark .yonetim-menu .link-list li.yonetim-menu-ayri {
        border-color: #2e3039 !important;
    }

    #site .yonetim-menu .link-list li > a {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 8px 10px;
        font-size: 13px;
    }

    #site .yonetim-menu .link-list li.active {
        border-color: var(--mobil-vurgu) !important;
    }

    #site .yonetim-menu .link-list li.active > a {
        color: var(--mobil-vurgu);
        font-weight: 700;
    }

    #site .yonetim-icerik {
        padding: 12px 10px;
    }

    #site .yonetim-kutu {
        padding: 10px 10px 2px;
    }

    #site .ayar-kaydet > .btn,
    #site .yonetim-dugmeler > .btn {
        flex: 1 1 auto;
    }

    #site .yonetim-dugmeler {
        flex-wrap: wrap;
    }

    #site .yonetim-anahtarlar {
        gap: 12px;
    }

    /* the panel is the page here: news and the board go below it */
    #site .sayfa-izgara:has(.yonetim) .haber-kolonu,
    #site .sayfa-izgara:has(.yonetim) .duyuru-kolonu {
        order: 6;
    }

    /* ---- profile header ---- */

    #site .profil-panel {
        height: auto;
    }

    #site .profil-kapak-cerceve,
    #site .profil-kapak-gorsel {
        height: 140px;
    }

    #site .profile-cover {
        height: 140px;
    }

    #site .profile-avatar {
        width: 92px;
        height: 92px;
        margin-top: -56px;
    }

    #site .profil-avatar-cerceve,
    #site .profile-avatar img {
        width: 86px;
        height: 86px;
        object-fit: cover;
    }

    #site .profil-kimlik {
        left: 112px;
        bottom: 0;
        right: 8px;
        margin: 0 0 6px;
        font-size: 22px;
        overflow-wrap: anywhere;
    }

    #site .profil-kimlik p {
        margin: 2px 0 0;
    }

    /* profile tabs: one swipeable row, the follow/message actions beneath */
    #site .profil-panel .navbar-transparent {
        display: flex;
        flex-direction: column;
        height: auto !important;
        min-height: 0;
        margin: 0;
        border-radius: 0;
    }

    #site .profil-panel .navbar-header {
        float: none;
    }

    #site .profil-panel .navbar-nav {
        flex-shrink: 0;
        display: flex;
        flex-wrap: nowrap;
        float: none !important;
        margin: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    #site .profil-panel .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    #site .profil-panel .navbar-nav > li {
        flex: 0 0 auto;
        float: none !important;
    }

    #site .profil-panel .navbar-nav > li > a {
        display: flex;
        align-items: center;
        gap: 4px;
        min-height: 44px;
        padding: 10px 12px;
        white-space: nowrap;
    }

    #site .profil-panel .navbar-nav.pull-right {
        border-top: 1px solid rgba(127, 127, 127, .2);
    }

    #site .profil-panel .navbar-nav.pull-right > li {
        flex: 1 1 0;
    }

    #site .profil-panel .navbar-nav.pull-right > li > a {
        justify-content: center;
    }

}

/* ===========================================================================
   Small phones (iPhone SE 1st gen, Galaxy Fold folded)
   =========================================================================== */

@media (max-width: 374px) {
    .mobil-logo img {
        max-width: 92px;
    }

    .mobil-sekme > a {
        font-size: 10px;
    }

    #site > header .navbar-right > li > a,
    #site > header .navbar-right .theme-toggle {
        min-width: 38px;
        width: auto;
        padding: 0 6px !important;
    }
}

/* the tab bar hidden from the admin panel (Görünüm → Genel): no room kept for it */
@media (max-width: 991px) {
    body#site:not(:has(> .mobil-sekme)) {
        padding-bottom: var(--mobil-guvenli-alt);
    }
}

/* ---- listing cards on phones and tablets (components/episode-card, anime-card) ---- */
@media (max-width: 991px) {
    /* ---- listing cards: as on the desktop — the poster at the left, the title
       and the lines beside it, the buttons pinned to the bottom right, level with
       the poster's foot. A grid rather than the theme's fixed 150px and floated
       buttons, so a long credit line makes the card taller instead of running
       under the buttons ---- */

    #site .kart-govde {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        column-gap: 8px;
        height: auto;
        min-height: 150px;
        /* the buttons stand 5px off the right edge, as on the desktop */
        padding-right: 5px;
        overflow: visible;
    }

    /* Bootstrap's clearfix on .panel-body would take grid cells of its own */
    #site .kart-govde::before,
    #site .kart-govde::after {
        display: none;
    }

    #site .kart-govde > .kart-afis {
        grid-column: 1;
        grid-row: 1 / 3;
        float: none !important;
        align-self: start;
        margin: 0;
    }

    #site .kart-govde > .kart-baslik {
        grid-column: 2;
        grid-row: 1;
    }

    #site .kart-govde > .kart-satir {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        min-width: 0;
        margin: 0;
    }

    #site .kart-alan {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    /* the desktop's "margin: 0 auto" would centre the group in the text column;
       held to the right edge instead, as the desktop's right: 5px */
    #site .kart-aksiyon {
        position: static;
        display: flex;
        align-self: stretch;
        justify-content: flex-end;
        margin: auto 0 0;
        padding-top: 8px;
    }

    #site .kart-aksiyon > .btn-group {
        float: none !important;
    }
}

/* tablets: two cards to a row leave the text column narrow, so the "Beğen" button
   shows its thumb alone and the button group fits beside the poster */
@media (min-width: 768px) and (max-width: 991px) {
    /* four buttons (Beğen, its count, Listeye Ekle, İzledim) on one row of the
       narrow column: tighter sides */
    #site .kart-aksiyon > .btn-group {
        display: flex;
        flex-wrap: nowrap;
    }

    #site .kart-aksiyon > .btn-group > .btn {
        float: none;
        padding-left: 5px;
        padding-right: 5px;
    }

    #site .kart-aksiyon .reactions > span {
        width: 24px;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        text-indent: 100px;
    }
}

/* ---- watch page: the footer under the player. Too narrow for the date and the
   buttons side by side, the floated date ran under the Beğen / Listeye Ekle row;
   the date gets its own line, the buttons the next one, at the right — on a
   tablet too, where the buttons ran over the date ---- */
@media (max-width: 991px) {
    #site .panel-footer:has(> .izle-tarih) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    #site .panel-footer:has(> .izle-tarih)::before,
    #site .panel-footer:has(> .izle-tarih)::after {
        display: none;
    }

    #site .panel-footer > .izle-tarih {
        float: none !important;
        flex: 1 0 100%;
        top: 0;
    }

    #site .panel-footer:has(> .izle-tarih) > .btn-group {
        float: none !important;
        max-width: 100%;
        /* one row, at the right; only a screen narrower than any phone's lets the
           last buttons go to a next line rather than out of the panel */
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 4px;
    }

    /* to keep the row on one line, "Birlikte İzle" is its icon alone (the title
       and aria-label still name it); a phone does the same below */
    #site .panel-footer:has(> .izle-tarih) .izle-w2g .btn > span {
        display: none;
    }
}

/* ---- comments bar on a phone: too narrow for the title and the sort side by side,
   the sort takes the next line whole — its three buttons in equal parts ---- */
@media (max-width: 767px) {
    #site .site-comment-sort {
        flex: 1 1 100%;
        margin-left: 0;
    }

    #site .site-comment-sort > .btn {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 4px;
        padding-right: 4px;
        text-align: center;
        white-space: nowrap;
    }
}

/* ---- watch page footer on a phone: one row — "OP & ED" and "Listeye Ekle" their
   icons alone as well ("Beğen" keeps its word), the buttons a little narrower ---- */
@media (max-width: 767px) {
    #site .panel-footer:has(> .izle-tarih) .izle-dugme-etiket,
    #site .panel-footer:has(> .izle-tarih) .liste-ekle-btn > span {
        display: none;
    }

    #site .panel-footer:has(> .izle-tarih) > .btn-group .btn {
        padding-left: 8px;
        padding-right: 8px;
    }
}
