body {
    margin: 0;
    background: #F8F4EE;
    font-family: Inter, sans-serif;
    color: #2B2828;
}

.header {
    background: #FFFDF8;
    border-bottom: 1px solid #E8E0D5;
    padding: 20px 50px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    position: sticky;
    top: 0;
    z-index: 100;
}



.logo {
    font-size: 28px;
    font-weight: bold;
    font-family: Georgia, serif;
    color: #4F3D2C;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px;
}

.search {
    width: 420px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid #DDD4C8;
    background: white;
    padding: 0 18px;
    font-size: 16px;
    box-sizing: border-box;
}

.search:focus {
    outline: none;
    border-color: #9E7455;
}

.books-grid {
    display: grid;
    grid-template-columns:
            repeat(
                    auto-fill,
                    minmax(220px, 1fr)
            );

    gap: 28px;
}

.book-card {
    background: #FFFDF8;
    border-radius: 22px;
    overflow: hidden;

    border: 1px solid #ECE4D9;

    transition: .25s;
}

.book-card:hover {
    transform: translateY(-3px);

    box-shadow:
            0 10px 22px
            rgba(0,0,0,0.07);
}

.book-cover {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.book-info {
    padding: 18px;
}

.book-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.book-author {
    color: #7A736A;
    margin-bottom: 12px;
}

.book-price {
    font-size: 22px;
    font-weight: bold;
    color: #9E7455;
}

.buy-btn {
    background: #A65A2E;
    color: white;
    border: none;
    border-radius: 14px;

    padding: 14px 22px;
    cursor: pointer;

    font-size: 15px;
    transition: .2s;
}

.buy-btn:hover {
    background: #8C4923;
}

.secondary-btn {
    background: white;
    color: #4F3D2C;

    border:
            1px solid
            #DDD4C8;
}

.secondary-btn:hover {
    background: #F7F1EA;
}

.card {
    background: #FFFDF8;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid #ECE4D9;
}

input,
textarea,
select {
    width: 100%;
    box-sizing: border-box;
}

a {
    color: #4F3D2C;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td,
th {
    padding: 18px;
    border-bottom:
            1px solid
            #EEE5DA;
}

th {
    text-align: left;
}

.footer {
    margin-top: 80px;
    border-top: 1px solid #E8E0D5;
    background: #FFFDF8;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-text {
    color: #7A736A;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #4F3D2C;
    font-weight: 500;
    transition: .2s;
}

.footer-links a:hover {
    color: #A65A2E;
}

.qa-tooltip {

    position: fixed;

    background: #FFFDF8;

    border: 1px solid #DDD4C8;

    border-radius: 18px;

    padding: 16px;

    width: 280px;

    box-shadow:
            0 12px 32px
            rgba(0,0,0,0.12);

    z-index: 9999;

    pointer-events: none;

    opacity: 0;

    transform: translateY(8px);

    transition: .2s;
}

.qa-tooltip.visible {

    opacity: 1;

    transform: translateY(0);
}

.qa-title {

    font-size: 18px;

    font-weight: bold;

    color: #4F3D2C;

    margin-bottom: 8px;
}

.qa-desc {

    color: #7A736A;

    font-size: 14px;

    line-height: 1.5;
}

.qa-mode-highlight {

    outline:
            2px dashed
            rgba(166,90,46,0.35);

    border-radius: 8px;

    transition: .2s;
}

.qa-term {

    background:#F5EEE2;

    border:
            1px solid #E4D7C5;

    border-radius:14px;

    padding:10px 14px;

    font-size:13px;

    cursor:pointer;

    color:#5B4A39;

    transition:.2s;

    display:flex;

    align-items:center;

    gap:6px;

    white-space:nowrap;
}

.qa-term:hover {

    transform:
            translateY(-1px);

    box-shadow:
            0 4px 14px
            rgba(
                    0,0,0,.08
            );
}

.qa-title {

    font-weight:700;

    margin-bottom:8px;
}

.qa-desc {

    line-height:1.5;
}

.qa-network-panel {

    position:fixed;

    right:20px;
    bottom:20px;

    width:340px;
    max-height:420px;

    overflow:auto;

    background:white;

    border-radius:20px;

    box-shadow:
            0 12px 40px
            rgba(0,0,0,.12);

    border:
            1px solid #E8DED1;

    z-index:99999;

    padding:18px;
}

.qa-network-title {

    font-weight:700;

    margin-bottom:16px;

    font-size:18px;
}

.qa-network-item {

    padding:12px;

    border-radius:14px;

    background:#F8F5F0;

    margin-bottom:10px;

    cursor:pointer;

    transition:.2s;
}

.qa-network-item:hover {

    transform:
            translateY(-1px);
}

.qa-method {

    font-weight:700;
}

.qa-status {

    margin-top:8px;

    font-size:13px;

    color:#6B635B;
}

.qa-request-body {

    margin-top:10px;

    background:#EFE8DE;

    padding:10px;

    border-radius:10px;

    font-size:12px;

    overflow:auto;

    display:none;

    white-space:pre-wrap;
}




.book-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.book-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    min-width: 56px;
    height: 48px;
    padding: 0 18px;
}

       /* ===================================
          MOBILE HEADER + MENU CLEAN
       =================================== */

   .mobile-menu-btn {
       display: none;
   }

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    body {
        padding: 0;
        margin: 0;
    }

    /* =====================
       HEADER
    ===================== */

    #header-container {
        min-height: 72px;
    }

    .header {

        min-height: 72px;

        padding: 0 16px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        box-sizing: border-box;
    }

    .logo {
        font-size: 22px;
        white-space: nowrap;
    }

    /* =====================
       BURGER
    ===================== */

    .mobile-menu-btn {

        display: flex !important;
        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;

        border: 1px solid #E7DED3;
        border-radius: 14px;

        background: #FFFDF8;

        font-size: 22px;
        cursor: pointer;

        flex-shrink: 0;
    }

    /* =====================
       DEFAULT HIDDEN
    ===================== */

    #main-nav,
    #auth-actions {

        display: none !important;
    }

    /* =====================
       MAIN MENU
    ===================== */

    #main-nav.mobile-open {

        display: flex !important;
        flex-direction: column;

        position: fixed;

        top: 78px;
        left: 16px;
        right: 16px;

        background: #FFFDF8;

        border: 1px solid #ECE4D9;
        border-radius: 24px;

        overflow: hidden;

        box-shadow:
                0 18px 40px rgba(0,0,0,.10);

        z-index: 9999;
    }

    #main-nav.mobile-open a {

        min-height: 58px;

        display: flex;
        align-items: center;

        padding: 0 18px;

        border-bottom:
                1px solid #F1E9DF;

        text-decoration: none;
        color: inherit;

        box-sizing: border-box;
    }

    #main-nav.mobile-open a:last-child {
        border-bottom: none;
    }

    /* =====================
       AUTH MENU
    ===================== */

    #auth-actions.mobile-open {

        display: flex !important;
        flex-direction: column;

        position: fixed;

        left: 16px;
        right: 16px;
        bottom: 20px;

        background: #FFFDF8;

        border: 1px solid #ECE4D9;
        border-radius: 24px;

        overflow: hidden;

        box-shadow:
                0 18px 40px rgba(0,0,0,.10);

        z-index: 9999;
    }

    #auth-actions.mobile-open a,
    #auth-actions.mobile-open button {

        min-height: 58px;

        display: flex;
        align-items: center;

        padding: 0 18px;

        border: none;
        background: transparent;

        text-decoration: none;
        color: inherit;

        box-sizing: border-box;
    }

    /* =====================
       GUEST MOBILE
    ===================== */

    body.guest-user
    .mobile-menu-btn {

        display: none !important;
    }

    body.guest-user
    #auth-actions {

        display: flex !important;
        margin-left: auto;
    }

    body.guest-user
    #main-nav {

        display: none !important;
    }

    body.guest-user
    .guest-login-btn {

        min-height: 42px;

        padding: 0 18px;

        border-radius: 14px;
    }
}

/* ===================================
   MOBILE GLOBAL LAYOUT
=================================== */

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    /* =====================
       PAGE
    ===================== */

    .container {
        padding: 16px;
    }

    h1 {
        font-size: clamp(32px, 9vw, 48px);
        line-height: 1.08;
        margin-top: 0;
    }

    h2 {
        line-height: 1.2;
    }

    p {
        line-height: 1.6;
    }

    /* =====================
       HERO
    ===================== */

    section {

        padding: 26px !important;

        border-radius: 28px !important;

        flex-direction: column !important;
        align-items: flex-start !important;

        gap: 24px !important;
    }

    section h1 {

        font-size: 38px !important;
        line-height: 1.08;
    }

    section p {

        font-size: 17px !important;
        line-height: 1.65 !important;
    }

    section img {

        width: 100% !important;
        height: 220px !important;

        object-fit: cover;
        border-radius: 20px;
    }

    /* =====================
       SEARCH
    ===================== */

    #search-form {

        width: 100%;

        display: flex;
        flex-direction: column;

        gap: 12px;
    }

    .search {

        width: 100%;
        min-width: unset;
    }

    #search-form button,
    .buy-btn {

        width: 100%;
        box-sizing: border-box;
    }

    /* =====================
       BOOK GRID
    ===================== */

    .books-grid {

        grid-template-columns: 1fr;
        gap: 16px;
    }

    .book-card {

        border-radius: 22px;
    }

    .book-cover {

        height: 250px;
    }

    .book-info {

        padding: 16px;
    }

    .book-title {

        font-size: 20px;
        line-height: 1.3;
    }

    .book-author {

        line-height: 1.4;
    }

    .book-bottom {

        flex-wrap: wrap;
        gap: 10px;
    }

    .book-actions {

        width: 100%;
    }

    .icon-btn {
        flex: 1;
    }

    /* =====================
       CARD
    ===================== */

    .card {

        padding: 22px !important;
        border-radius: 24px;
    }

    /* =====================
       TABLES
    ===================== */

    table {
        display: block;
        overflow-x: auto;
    }
}

/* very small phones */

@media (max-width: 390px) {

    .container {
        padding: 14px;
    }

    .logo {
        font-size: 20px;
    }

    .book-cover {
        height: 220px;
    }
}

/* ===================================
   MOBILE BOOK / WISHLIST / CART
=================================== */

@media (max-width: 768px) {

    /* =====================
       BOOK PAGE
    ===================== */

    .card[style*="gap:60px"] {

        flex-direction: column !important;
        gap: 28px !important;
    }

    #book-image {

        width: 100% !important;
        height: 320px !important;

        object-fit: cover;
        border-radius: 20px;
    }

    #book-title {

        font-size: 34px !important;
        line-height: 1.08;
    }

    #book-author {

        font-size: 18px !important;
        margin-bottom: 20px !important;
    }

    #book-price {

        font-size: 30px !important;
        margin-bottom: 24px !important;
    }

    #book-description {

        font-size: 16px !important;
        line-height: 1.7 !important;
    }

    #book-actions {

        display: flex;
        flex-direction: column;

        gap: 12px;
    }

    #book-actions .buy-btn {
        width: 100%;
    }

    /* bug modal */

    #bug-modal {
        padding: 12px !important;
    }

    #bug-modal .card {

        height: 92vh !important;
        border-radius: 22px !important;
    }

    /* =====================
       WISHLIST
    ===================== */

    #wishlist-container {
        gap: 16px;
    }

    #wishlist-container .buy-btn {
        width: 100%;
    }

    /* =====================
       ORDERS
    ===================== */

    #orders-container {

        gap: 16px !important;
    }

    #orders-container .card {

        padding: 20px !important;
    }

    /* =====================
       CART
    ===================== */

    #cart-content table,
    #cart-content thead,
    #cart-content tbody,
    #cart-content tr,
    #cart-content td {

        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #cart-content thead {
        display: none;
    }

    /* cart card */

    #cart-content tr {

        background: #FFFDF8;

        border:
                1px solid #ECE4D9;

        border-radius: 22px;

        padding: 16px;
        margin-bottom: 18px;

        overflow: hidden;
    }

    #cart-content td {

        border: none;
        padding: 8px 0;
    }

    /* image + text */

    [data-qa-name="Cart Item"] {

        display: flex;

        gap: 14px !important;

        align-items:
                flex-start !important;
    }

    [data-qa-name="Cart Item"] img {

        width: 68px !important;
        height: 96px !important;

        border-radius: 12px;

        object-fit: cover;

        flex-shrink: 0;
    }

    /* title */

    [data-qa-name="Title"] {

        font-size: 18px;
        line-height: 1.35;

        word-break: break-word;
    }

    /* counter */

    [data-qa-name="Counter"] {

        display: flex;
        align-items: center;

        gap: 10px !important;

        margin-top: 10px;
    }

    [data-qa-name="Counter"]
    .buy-btn,

    [data-qa-name="Counter"]
    .secondary-btn {

        width: 52px !important;
        min-width: 52px !important;

        height: 42px !important;

        padding: 0 !important;
    }

    [data-qa-name="Counter Value"] {

        min-width: 26px;

        text-align: center;

        font-weight: 600;
    }

    /* delete */

    [data-qa-name="Delete Button"] {

        width: 100%;
        margin-top: 10px;
    }

    /* summary */

    .card[style*="width:320px"] {

        width: 100% !important;
        box-sizing: border-box;
    }

    div[style*="justify-content:flex-end"] {

        justify-content:
                stretch !important;
    }

    a[href="/checkout"] {

        width: 100%;
        box-sizing: border-box;
    }
}

/* ===================================
   MOBILE BUGS + QA BINGO
=================================== */

@media (max-width: 768px) {

    /* =====================
       BUGS PAGE
    ===================== */

    #bugs-content table,
    #bugs-content thead,
    #bugs-content tbody,
    #bugs-content tr,
    #bugs-content td {

        display: block;
        width: 100%;

        box-sizing: border-box;
    }

    #bugs-content thead {
        display: none;
    }

    /* bug card */

    #bugs-content tr {

        background: #FFFDF8;

        border:
                1px solid #ECE4D9;

        border-radius: 22px;

        padding: 18px;
        margin-bottom: 18px;

        overflow: hidden;
    }

    #bugs-content td {

        border: none;
        padding: 6px 0;
    }

    /* id */

    #bugs-content td:first-child {

        font-size: 13px;
        color: #8B8074;

        margin-bottom: 6px;
    }

    /* title */

    #bugs-content td:nth-child(2) a {

        font-size: 18px;
        line-height: 1.35;

        font-weight: 600;
    }

    /* severity + priority */

    #bugs-content td:nth-child(3),
    #bugs-content td:nth-child(4) {

        display: inline-block;

        width: auto;

        margin-right: 8px;
        margin-top: 10px;
    }

    /* status */

    #bugs-content td:nth-child(5) {

        margin-top: 10px;
        color: #7A736A;
    }

    /* author */

    #bugs-content td:nth-child(6) {

        font-size: 14px;
        color: #8B8074;
    }

    /* actions */

    #bugs-content td:last-child {

        margin-top: 14px;
    }

    #bugs-content td:last-child > div {

        display: flex;
        gap: 10px;

        justify-content:
                stretch !important;

        width: 100%;
    }

    #bugs-content td:last-child a {

        flex: 1;
        text-align: center;
    }

    /* top section */

    div[style*="justify-content:space-between"] {

        flex-direction:
                column !important;

        align-items:
                stretch !important;

        gap: 18px !important;
    }

    div[style*="justify-content:space-between"]
    .buy-btn {

        width: 100%;
    }

    /* modal */

    #bug-modal {

        padding: 12px !important;
    }

    #bug-modal > div {

        height: 92vh !important;

        border-radius:
                22px !important;
    }

    /* =====================
       QA BINGO
    ===================== */

    #bingo-grid {

        grid-template-columns:
            repeat(2, 1fr)
        !important;

        gap: 12px !important;
    }

    /* hero */

    h1[style*="font-size:42px"] {

        font-size: 34px !important;
        line-height: 1.08;
    }

    div[style*="font-size:18px"] {

        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    /* progress */

    #progress {

        font-size: 28px !important;
    }

    .card[style*="min-width:180px"] {

        min-width:
                auto !important;

        width: 100%;

        box-sizing:
                border-box;
    }

    /* bingo card */

    #bingo-grid > div {

        min-height:
                120px !important;

        padding:
                18px !important;

        border-radius:
                20px !important;

        font-size:
                15px !important;

        line-height: 1.4;
    }
}

/* small phones */

@media (max-width: 420px) {

    #bingo-grid {

        grid-template-columns:
            1fr !important;
    }
}

/* ===================================
   MOBILE QA TEST DESIGN
=================================== */

@media (max-width: 768px) {

    .qa-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* =====================
       HEADER
    ===================== */

    .page-title {

        font-size: 34px;
        line-height: 1.08;
    }

    .page-subtitle {

        font-size: 15px;
        line-height: 1.55;
    }

    /* =====================
       TABS
    ===================== */

    .technique-tabs {

        display: flex;

        overflow-x: auto;

        flex-wrap: nowrap;

        gap: 12px;

        padding-bottom: 8px;

        scrollbar-width: none;
    }

    .technique-tabs::-webkit-scrollbar {
        display: none;
    }

    .technique-tab {

        min-width: 220px;

        flex-shrink: 0;

        height: 64px;

        padding: 14px 18px;

        border-radius: 20px;
    }

    .technique-name {

        font-size: 16px;
    }

    .technique-sub {

        font-size: 12px;
    }

    /* =====================
       MAIN GRID
    ===================== */

    .exercise-card,
    .equivalence-layout,
    .boundary-layout {

        display: grid;

        grid-template-columns:
            1fr !important;

        gap: 22px !important;

        padding: 20px;

        border-radius: 28px;
    }

    /* =====================
       TEXT
    ===================== */

    .exercise-title {

        font-size: 26px;
        line-height: 1.2;
    }

    .interaction-title,
    .selection-title,
    .qa-task-title {

        font-size: 22px;
        line-height: 1.2;
    }

    /* =====================
       RIGHT PANEL
    ===================== */

    .side-panel {

        order: -1;
    }

    .box {

        padding: 18px;
        border-radius: 20px;
    }

    .recommendation-title {

        font-size: 24px;
    }

    /* =====================
       SELECTED VALUE
    ===================== */

    .selected-age {

        font-size: 28px;
    }

    /* =====================
       CARS
    ===================== */

    .cars-grid {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;
    }

    .car-card {

        min-height: 110px;

        border-radius: 18px;
    }

    .car-image {

        font-size: 34px;
    }

    .car-name {

        font-size: 14px;
        line-height: 1.3;
    }

    /* =====================
       HEADER BLOCK
    ===================== */

    .selection-header {

        display: flex;

        flex-direction: column;

        align-items: flex-start;

        gap: 14px;
    }

    .selection-counter {

        font-size: 18px;

        padding: 10px 16px;
    }

    /* =====================
       BUTTONS
    ===================== */

    .check-button {

        font-size: 20px;

        padding: 18px;

        border-radius: 20px;
    }
}

/* very small phones */

@media (max-width: 420px) {

    .cars-grid {

        grid-template-columns:
            1fr;
    }

    .technique-tab {

        min-width: 200px;
    }
}




