* {
    padding: 0;
    margin: 0;
    overflow-anchor: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 15vh;
}

body {
    overflow-x: hidden;
}

:root {
    --bxd: 2px 2px 10px rgba(0, 0, 0, 0.5);
    --color1: rgb(83, 112, 241) !important;
    --color2: rgb(112, 241, 153) !important;
    --primary-color: #0056b3;
    --gray-light: #f8f9fa;
    --border-color: #dee2e6;
}

a:hover {
    text-decoration: none !important;
}

::selection {
    background-color: var(--color2);
    color: white;
}

@font-face {
    font-family: f1;
    src: url(../font/WangHanZongTeHeiTiFan-1.ttf);
}

@font-face {
    font-family: f2;
    src: url(../font/DFT_Y7.TTC);
}

@font-face {
    font-family: 'cwTeXQHei';
    src: url('fonts/cwtexqh.ttf') format('truetype');
}

.f1 { font-family: f1; }
.f2 { font-family: f2; }
.f3 { font-family: 'Noto Serif TC', serif; font-weight: 400; }
.f4 { font-family: 'cwTeXQHei', sans-serif; font-weight: bold; }

.color1 { color: var(--color1) !important; }
.color2 { color: var(--color2) !important; }
.color_w { color: white !important; }
.color_g { color: #3d3d3d !important; }
.bg1 { background-color: var(--color1) !important; }
.bg2 { background-color: var(--color2) !important; }
.tsd { text-shadow: var(--bxd) !important; }
.df { display: flex !important; }
.ac { align-items: center !important; }
.jc { justify-content: center !important; }
.fc { flex-direction: column !important; }
.jsb { justify-content: space-between !important; }

/* progression */
.progression {
    height: 5px;
    width: 0;
    position: fixed;
    top: 9vh;
    left: 0;
    background: linear-gradient(45deg, var(--color2), var(--color1));
    transition: .2s;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 1049;
}

/* navbar */
.fill_nav .navbar-brand svg,
.fill_nav .navbar-brand h4,
.fill_nav .nav-link {
    color: #000000;
}

.fill_nav {
    background-color: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(15px);
    box-shadow: var(--bxd);
}

.navbar {
    height: 9vh;
    border-bottom: 1px solid white;
    transition: .3s;
}

.navbar .navbar-brand:hover {
    opacity: 0.8;
    scale: 0.95;
}

.navbar-brand h4 { margin: 0; }
.navbar-brand svg { font-size: 2rem; }
.navbar-brand { transition: .3s; font-family: f2; color: white; }
.fill_log { background-color: var(--color2); color: white !important; }
.nav-link {
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: f2;
    margin: 0 2rem;
    transition: .3s;
    color: white;
}

.nav-link span { opacity: 0.6; }
.nav-link:hover { color: var(--color1); }


/* sec1 */
#sec1 {
    position: relative;
    overflow: hidden;
}

.img_carousel .owl-dots {
    display: none !important;
}

.img_carousel img {
    height: 100vh;
    width: 100%;
    object-fit: cover;
}

.sec1_outer { position: absolute; width: 100%; top: 30%; z-index: 3; }
.sec1_h2 { -webkit-text-stroke: 2px var(--color1); color: transparent; font-family: f1; font-size: 4.5rem; }
.sec1_h1 { font-size: 6rem; color: white; font-family: f1; }

.sec1_p {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    text-align: justify;
    letter-spacing: 2px;
    line-height: 1.8;
    margin: 2rem 0;
    width: 50%;
}

.sec1_line {
    position: absolute;
    top: 0;
    right: 0;
    width: 8%;
    height: 100vh;
    z-index: 4;
    border-left: 1px solid white;
}

.sec1_item img { height: 10rem; width: 50%; object-fit: cover; border-radius: 15px; }
.sec1_item {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 25px 25px 0 0;
    padding: 1rem;
    backdrop-filter: blur(20px);
    transition: .3s;
}

.sec1_item:hover {
    background-color: rgba(56, 196, 221, 0.6);
    transform: translate(0, 10px);
}

.w-50 { width: 50%; }

/* sec2 */
#sec2 { 
    position: relative; 
    background-color: #ffffff; 
    overflow: hidden;
    min-height: 100dvh !important; 
}
.sec2_deco1 {
    background: linear-gradient(45deg, var(--color1), var(--color2));
    position: absolute;
    animation: border1 6s infinite;
    top: 10%;
    right: 10%;
    height: 20rem;
    width: 20rem;
    z-index: 4;
    opacity: 0.5;
}

.sec2_deco2 {
    background: linear-gradient(45deg, var(--color1), var(--color2));
    position: absolute;
    animation: border2 8s infinite;
    bottom: -10%;
    left: -5%;
    height: 30rem;
    width: 40rem;
    z-index: 4;
    opacity: 0.5;
}

.sec2_brick { height: 7rem; width: 5px; background-color: var(--color1); border-radius: 25px; }
.sec2_h1 { font-size: 4rem; font-weight: bold; font-family: f4 !important; color: #000000; }
.sec2_h2 { font-size: 3rem; font-family: f3; color: #000000; }

.sec2_p {
    font-size: 1.3rem;
    font-weight: bold;
    color: #555;
    width: 80%;
    text-align: justify;
    letter-spacing: 1.2px;
    line-height: 1.8;
    margin: 2rem 0;
}

.sec2_item {
    display: flex;
    align-items: center;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    margin: 1rem 0;
    padding: 1rem;
    transition: .3s;
}

.sec2_item:hover { transform: translate(0, -10px); box-shadow: var(--bxd); }
.sec2_item_p { font-size: 1.2rem; font-weight: bold; text-align: justify; color: #555; }
.sec2_item img { height: 10rem; width: 10rem; min-width: 10rem; border-radius: 15px; object-fit: cover; margin-right: 2rem; }
.hashtag { font-size: 1.3rem; font-family: f1; color: white; background: linear-gradient(45deg, #0056b3, var(--color1)); border-radius: 25px; padding: 0.25rem 1.2rem; }

.sec2_btn {
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    border: 2px solid var(--color2);
    color: var(--color2);
    font-family: f1;
    font-size: 1.3rem;
    transition: .3s;
}

.sec2_btn:hover { background-color: var(--color2); color: white; }
.count { font-size: 5rem; margin-right: 1rem; }

/* footer */
footer { background-color: #252525; }
footer .line { background-color: white; width: 100%; height: 1px; margin: 2rem 0 1rem 0; }
footer a { color: white; transition: .3s; }
footer a:hover { color: var(--color1); }

.fix_box { position: fixed; bottom: 2%; right: 2%; z-index: 999; }
.fix {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border-radius: 50%;
    height: 5rem;
    width: 5rem;
    box-shadow: var(--bxd);
    background: linear-gradient(45deg, var(--color1), var(--color2));
    margin: 1rem 0;
    transition: .3s;
    cursor: pointer;
}

.fix:hover { opacity: 0.6 !important; }
.fix_box:hover .fix:not(:last-child) { opacity: 1; }
.fix:not(:last-child) { opacity: 0; }

@keyframes border1 {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 40% 60% / 38% 62% 38% 62%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes border2 {
    0% { border-radius: 50% 50% 40% 60% / 38% 62% 38% 62%; }
    50% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 50% 50% 40% 60% / 38% 62% 38% 62%; }
}

/* media rwd */
@media (max-width:1920px) { :root { font-size: 12px; } }
@media (max-width:1600px) { :root { font-size: 11px; } }
@media (max-width:992px) {
    :root { font-size: 10px; }
    .hori1_p, .sec1_p { width: 100%; }
    .rwd-wrap { display: flex; flex-direction: column; }
    .rc { display: flex; flex-direction: column-reverse; }
    #sec4 { height: 290vh; }
    .blockes, .deco { display: none !important; }
    .hori2_items { width: 80%; margin: 1rem 0; }
    #hori2 { width: 100vw; height: auto; }
}
@media (max-width:668px) { :root { font-size: 9px; } }


/* ==========================================================================
   ⚙️ ✨ 全新中古機台庫存展示專用佈局樣式（排整齊、文字浮現、大間距）
   ========================================================================== */

/* 通用控制隱藏類名 */
.mach-hidden {
    display: none !important;
}

/* 下拉選單外包裝 */
.mach-filter-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    margin-bottom: 20px;
}

.mach-select-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.mach-select-group label {
    flex: 1;
    min-width: 200px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mach-select-group select {
    width: 100%;
    padding: 10px;
    font-size: 1.2rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fff;
    outline: none;
}

.mach-select-group select:disabled {
    background-color: #e2e8f0;
    cursor: not-allowed;
}

/* 🎴 重點：限制圖片小張 250*300，且「由左至右、由上至下」絕對排整齊 */
.mach-grid-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 250px));
    gap: 25px;
    justify-content: center; /* 格線整體居中擺放 */
    width: 100%;
    margin-top: 60px !important; 
    margin-bottom: 50px;
}

/* 高級直立固定 250*300 卡片 */
.mach-card {
    position: relative;
    width: 100%;
    height:300px; /* 嚴格固定高度 300px */
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mach-card:hover {
    transform: translateY(-5px);
}

.mach-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保各種圖片尺寸塞入 250*300 時都不會被壓扁變形 */
}

/* 預設底部看得到的基本文字標籤 */
.mach-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #ffffff;
    padding: 15px 12px 12px;
    font-size: 1.3rem;
    font-weight: 500;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.mach-card:hover .mach-card-label {
    opacity: 0; /* 滑鼠移上去時淡出，讓路給黑色詳細資訊遮罩 */
}

/* ✨ 重點：滑鼠移動到照片上，浮現文字（年份、編號）的黑色遮罩 CSS 效果 */
.mach-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.92); /* 高級黑高對比色 */
    backdrop-filter: blur(4px);        /* 毛玻璃虛化效果 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
    z-index: 3;
    
    /* 初始狀態：隱形且位移在下方，等待 hover 觸發動畫 */
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mach-card:hover .mach-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* 遮罩內浮現的文字設計 */
.mach-card-overlay .overlay-year {
    font-size: 1.4rem;
    color: #4ade80; /* 精緻螢光綠顯示年份 */
    font-weight: bold;
    margin-bottom: 6px;
}

.mach-card-overlay .overlay-code {
    font-size: 1.6rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 6px;
    width: 85%;
}

.mach-card-overlay .overlay-hint {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-top: 15px;
    background: rgba(255,255,255,0.08);
    padding: 3px 10px;
    border-radius: 20px;
}

/* 📑 點擊展開的詳細大相簿與完整規格表佈局 */

.mach-main-viewer {
    width: 90%;
    height: 500px !important;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.mach-detail-card {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.mach-gallery {
    flex: 1;
    min-width: 300px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.mach-main-viewer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mach-thumbs {
    display: flex;
    flex-wrap: wrap; /* 圖片超過一列時自動換行 */
    align-content: flex-start;
    gap: 10px;
    overflow: visible;
    padding: 5px 0;
    width: 100%;
}

.mach-thumb-item {
    flex: 0 0 70px;
    width: 70px;
    height: 55px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: .2s;
    background: #f1f5f9;
}

.mach-thumb-item.active {
    border-color: #2563eb;
}

.mach-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mach-info-spec {
    flex: 1.2;
    min-width: 300px;
}

.mach-info-spec h3 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 15px;
    border-left: 4px solid #2563eb;
    padding-left: 10px;
}

.mach-spec-table {
    width: 100%;
    border-collapse: collapse;
}

.mach-spec-table th, .mach-spec-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.2rem;
}

.mach-spec-table th {
    background-color: #f8f9fa;
    color: #475569;
    text-align: left;
    width: 35%;
    font-weight: bold;
}

.mach-spec-table th small {
    display: block;
    color: #94a3b8;
    font-weight: normal;
}

.mach-spec-table td {
    color: #1e293b;
}



/* ==========================================================================\n   產品照片放大檢視與規格報告下載\n   ========================================================================== */

.mach-main-viewer {
    cursor: zoom-in;
}

.mach-main-viewer::after {
    content: "點擊放大原始比例照片";
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 1rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: .2s ease;
}

.mach-main-viewer {
    position: relative;
}

.mach-main-viewer:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.mach-main-viewer img {
    transition: transform .25s ease, opacity .25s ease;
}

.mach-main-viewer:hover img {
    transform: scale(1.015);
    opacity: .96;
}

.mach-report-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.mach-report-btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 13px 18px;
    background: linear-gradient(135deg, #2563eb, #0056b3);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.mach-report-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(37, 99, 235, .3);
}

.mach-report-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

.mach-report-note {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

.mach-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(2, 6, 23, .94);
    backdrop-filter: blur(5px);
}

.mach-lightbox.is-open {
    display: flex;
}

.mach-lightbox-content {
    width: min(96vw, 1500px);
    height: min(90vh, 1000px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.mach-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 55px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .45);
}

.mach-lightbox-caption {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.1rem;
    text-align: center;
}

.mach-lightbox-close {
    position: fixed;
    top: 18px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.mach-lightbox-close:hover {
    background: rgba(255, 255, 255, .22);
    transform: rotate(90deg);
}

body.mach-lightbox-open {
    overflow: hidden;
}

@media (max-width: 668px) {
    .mach-lightbox {
        padding: 16px;
    }

    .mach-lightbox-close {
        top: 10px;
        right: 10px;
        width: 42px;
        height: 42px;
    }

    .mach-report-btn {
        font-size: 1.2rem;
    }
}


/* ========================================================================== 
   機台列表與獨立詳細頁面切換
   ========================================================================== */
.mach-detail-toolbar {
    width: 100%;
    margin: 0 0 18px;
}

.mach-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.mach-back-btn:hover {
    transform: translateX(-3px);
    border-color: #2563eb;
    box-shadow: 0 6px 15px rgba(37, 99, 235, .15);
}

#mach-detail-view {
    width: 100%;
}

#mach-detail-view .mach-detail-card {
    margin-top: 0 !important;
}

/* 縮圖超過一列時自動換行 */
.mach-thumbs {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: flex-start;
    align-content: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    white-space: normal !important;
}

.mach-thumb-item {
    flex: 0 0 70px !important;
    width: 70px;
    height: 55px;
}

@media (max-width: 668px) {
    .mach-back-btn {
        width: 100%;
        font-size: 1.2rem;
    }

    .mach-thumb-item {
        flex-basis: 62px !important;
        width: 62px;
        height: 50px;
    }
}


/* ========================================================================== \
   20260713-6：分享連結、結果數、上一台／下一台、圖片載入狀態
   ========================================================================== */
.mach-result-summary {
    margin: 26px 0 -30px;
    padding: 12px 16px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
}

.mach-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.mach-detail-nav-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mach-nav-btn,
.mach-share-btn,
.mach-card-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.mach-nav-btn {
    padding: 9px 15px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.mach-share-btn {
    padding: 9px 15px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.mach-nav-btn:hover:not(:disabled),
.mach-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37,99,235,.18);
}

.mach-nav-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.mach-card-view-btn {
    margin-top: 14px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.65);
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 1.05rem;
}

.mach-image-shell,
.mach-main-viewer {
    position: relative;
}

.mach-image-shell::before,
.mach-main-viewer.is-loading::before {
    content: "圖片載入中…";
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-weight: 700;
}

.mach-image-shell.is-loaded::before,
.mach-image-shell.is-error::before,
.mach-main-viewer:not(.is-loading)::before {
    display: none;
}

.mach-image-error {
    object-fit: contain !important;
    background: #f8fafc;
}

.mach-copy-feedback {
    animation: machFeedback .35s ease;
}

@keyframes machFeedback {
    0% { transform: scale(.96); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .mach-detail-toolbar,
    .mach-detail-nav-actions {
        width: 100%;
    }

    .mach-detail-nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .mach-share-btn {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .mach-back-btn,
    .mach-nav-btn,
    .mach-share-btn {
        width: 100%;
    }
}


/* ========================================================================== 
   20260715：手機導覽列、照片下載與基本圖片防盜
   ========================================================================== */
.mach-photo-actions {
    width: 90%;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mach-photo-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: #0f766e;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 13px rgba(15,118,110,.2);
}

.mach-photo-download-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

.mach-photo-download-note {
    flex: 1;
    min-width: 220px;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
}

.mach-image-watermark {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 3;
    max-width: calc(100% - 28px);
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(15,23,42,.58);
    color: rgba(255,255,255,.88);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .5px;
    pointer-events: none;
    user-select: none;
}

#card-detail img,
#mach-lightbox img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

@media (max-width: 991.98px) {
    .navbar {
        height: 60px;
        min-height: 60px;
        padding: 0;
        background: rgba(255,255,255,.96);
        border-bottom-color: #e2e8f0;
        box-shadow: 0 3px 12px rgba(15,23,42,.12);
    }

    .navbar > .container {
        width: 100% !important;
        max-width: none !important;
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0 16px;
    }

    .navbar-brand,
    .navbar-brand h4,
    .navbar-toggler {
        color: #111827 !important;
    }

    .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 0;
        outline: 0 !important;
        font-size: 1.8rem;
    }

    .navbar-collapse {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
        background: rgba(255,255,255,.98);
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 10px 20px rgba(15,23,42,.12);
    }

    .navbar-nav {
        width: 100%;
        padding: 8px 16px 14px;
    }

    .navbar .nav-item {
        width: 100%;
        border-bottom: 1px solid #eef2f7;
    }

    .navbar .nav-link {
        width: 100%;
        margin: 0;
        padding: 10px 8px;
        color: #111827 !important;
        font-size: 1.45rem;
        line-height: 1.25;
    }

    .navbar .nav-link span {
        margin-top: 2px;
        font-size: 1.05rem;
    }

    .progression {
        top: 60px;
        height: 4px;
    }
}

@media (max-width: 668px) {
    .mach-main-viewer,
    .mach-photo-actions {
        width: 100%;
    }

    .mach-main-viewer {
        height: 320px !important;
    }

    .mach-photo-download-btn {
        width: 100%;
    }

    .mach-photo-download-note {
        min-width: 0;
        text-align: center;
    }
}