@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Merriweather+Sans:ital,wght@0,300;0,400;0,700;0,800;1,300;1,400;1,700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Core Craft Design System */
:root {
    --primary-color: #77052b; /* Deep Burgundy */
    --primary-hover: #54031e;
    --primary-light: #f6ecf0;
    --secondary-color: #5c7f51; /* Sage Green */
    --secondary-hover: #436039;
    --accent-color: #c49610;
    
    /* Light Mode Palette */
    --bg-color: #fcf8f9;
    --card-bg: #faf9f6;
    --text-color: #1e1e1e; /* Deep Charcoal */
    --text-muted: #4d4d4d;
    --border-color: rgba(119, 5, 43, 0.12);
    --border-strong: rgba(119, 5, 43, 0.25);
    --shadow-color: rgba(119, 5, 43, 0.04);
    
    /* Loom styling */
    --loom-wood: linear-gradient(135deg, #a2623a 0%, #78350f 100%);
    --loom-wood-inner: #451a03;
    --pin-color: radial-gradient(circle at 30% 30%, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
    --pin-shadow: rgba(0, 0, 0, 0.3);
    
    /* Warp/Weft default colors */
    --warp-color-default: #ffffff; /* White */
    --weft-color-default: #333333; /* Dark Grey */
    
    --transition-speed: 0.2s;
    --border-radius: 0px; /* Flat corners matching the hat app */
}


/* Scoped Defaults to prevent overriding WordPress theme breadcrumbs and layouts */
.container,
.container *,
.pin-loom-designer-wp-wrapper,
.pin-loom-designer-wp-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: url('https://knitting-and.com/wp-content/uploads/2018/09/knit1.png');
    background-repeat: repeat;
    background-attachment: fixed;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    padding-bottom: 40px;
}

.container, .pin-loom-designer-wp-wrapper {
    font-family: 'Merriweather Sans', 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.5;
}

.container h1, .container h2, .container h3, .container h4, .container h5, .container h6,
.pin-loom-designer-wp-wrapper h1, .pin-loom-designer-wp-wrapper h2, .pin-loom-designer-wp-wrapper h3, .pin-loom-designer-wp-wrapper h4, .pin-loom-designer-wp-wrapper h5, .pin-loom-designer-wp-wrapper h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Container & Header */
.container, .pin-loom-designer-wp-wrapper {
    max-width: 1020px;
    margin: 30px auto;
    padding: 40px;
    background-color: #faf9f6 !important;
    border: 1px solid var(--border-strong);
    box-shadow: 0 12px 30px -5px rgba(119, 5, 43, 0.08);
}

@media (max-width: 768px) {
    .container, .pin-loom-designer-wp-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 10px 0 0 0 !important;
    }
    .card {
        padding: 16px !important;
        margin-bottom: 15px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    .dashboard {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Modern App Header */
.app-header {
    background: linear-gradient(135deg, #77052b 0%, #4c021a 100%);
    color: #ffffff;
    padding: 65px 20px;
    text-align: center;
    box-shadow: 0 24px 50px -10px rgba(119, 5, 43, 0.16);
    position: relative;
    overflow: hidden;
    border-bottom: none;
    margin-bottom: 45px;
    width: 100%;
    box-sizing: border-box;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 208, 66, 0.15) 0%, transparent 80%);
    pointer-events: none;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #5c7f51 0%, #436039 100%);
}

.app-header h1 {
    color: #ffffff !important;
    font-size: 2.75rem;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.75px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    display: block;
    text-align: center;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}

.app-header p {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.92;
    font-style: italic;
    font-weight: 300;
    color: #ffffff;
    text-align: center;
}

/* Theme Toggle Button */
.btn-theme {
    font-family: 'Outfit', sans-serif;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 0 !important; /* Flat corners matching the hat app */
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    box-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.1);
}
.btn-theme:hover {
    background: var(--border-color);
    transform: translateY(-1.5px);
    box-shadow: 0 4.5px 6px rgba(0, 0, 0, 0.1);
}
.btn-theme:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 1020px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Editor Section */
.workspace-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* The Loom Frame container */
.loom-frame {
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 5px 30px; /* Space for row labels only */
    box-shadow: none;
    display: inline-block;
    user-select: none;
}

.loom-inner {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* The 31x31 Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(31, 14px);
    grid-template-rows: repeat(31, 14px);
    gap: 1px;
    background-color: #666666; /* thin grey lines */
    touch-action: none;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        position: static !important;
    }
    .loom-workstation {
        overflow: visible !important;
    }
    .loom-frame {
        padding: 20px;
    }
    .grid-container {
        grid-template-columns: repeat(31, 8px);
        grid-template-rows: repeat(31, 8px);
    }
}

/* Grid Cells styling */
.cell {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    transition: background-color 0.1s;
    position: relative;
    touch-action: none;
}

/* Editable cells */
.cell.editable {
    cursor: pointer;
}

/* Locked/Read-only cells */
.cell.locked {
    /* Allow pointer events for selection dragging and pasting anchors */
    pointer-events: auto;
}
.cell.editable:hover {
    filter: brightness(0.9);
    outline: 1px solid #111;
    z-index: 10;
}

/* Warp Thread (Under) - Soft White */
.cell.warp-thread {
    background-color: #faf9f6;
}

/* Weft Thread (Over) - Solid Dark Grey */
.cell.weft-thread {
    background-color: #333333;
}

/* Fixed Warped cells (background structure) */
.cell.fixed-warp {
    background-color: #faf9f6;
}
.cell.fixed-weft {
    background-color: #cccccc; /* Light Grey */
}

/* Loom Pins - Hidden */
.pin {
    display: none !important;
}

/* Row and Column Numbers */
.row-label {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-label.left {
    left: 4px;
    width: 20px;
}

.row-label.right {
    right: 4px;
    width: 20px;
}

/* Preset & Control Options */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.btn {
    font-family: 'Outfit', sans-serif;
    background-color: var(--card-bg);
    border: 1.5px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 0 !important; /* Flat corners matching the hat app */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: var(--border-color);
    transform: translateY(-1.5px);
    box-shadow: 0 4.5px 6px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(119, 5, 43, 0.25) !important;
}

.btn-primary {
    font-family: 'Outfit', sans-serif !important;
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border: 1.5px solid var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(119, 5, 43, 0.2) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2.5px) !important;
    box-shadow: 0 8px 16px rgba(119, 5, 43, 0.35) !important;
}
.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 8px rgba(119, 5, 43, 0.2) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-secondary {
    font-family: 'Outfit', sans-serif !important;
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border: 1.5px solid var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(119, 5, 43, 0.2) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-secondary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2.5px) !important;
    box-shadow: 0 8px 16px rgba(119, 5, 43, 0.35) !important;
}
.btn-secondary:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 8px rgba(119, 5, 43, 0.2) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Help Guide Button */
.help-link-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.help-link {
    font-family: 'Outfit', sans-serif !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: 1.5px solid var(--primary-color) !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    height: 46px !important;
    box-sizing: border-box !important;
    font-size: 1rem !important;
    padding: 0 32px !important;
    line-height: 1 !important;
    text-transform: none !important;
    box-shadow: 0 4px 10px rgba(119, 5, 43, 0.2) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-link:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2.5px) !important;
    box-shadow: 0 8px 16px rgba(119, 5, 43, 0.35) !important;
    color: #ffffff !important;
}

.help-link:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 8px rgba(119, 5, 43, 0.2) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Configuration & Customization Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    background: var(--bg-color);
}

.color-picker {
    border: none;
    outline: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker::-webkit-color-swatch {
    border: 1px solid var(--border-color);
    border-radius: 50%;
}

.color-code {
    font-family: monospace;
    font-size: 0.9rem;
    flex-grow: 1;
}

/* Written Instructions List */
.instruction-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
}

.instruction-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    border-left: 4px solid transparent; /* reserve space so active state causes no shift */
    cursor: pointer;
    transition: background-color var(--transition-speed), border-left-color var(--transition-speed);
}

.instruction-row:last-child {
    border-bottom: none;
}

.instruction-row:hover {
    background-color: rgba(0,0,0,0.02);
}

.instruction-row.active {
    background-color: rgba(120, 7, 44, 0.08);
    border-left-color: var(--primary-color); /* colour only — width already set */
}

.instruction-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.instruction-text {
    flex-grow: 1;
}

.instruction-row.checked .instruction-text {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.6;
}

.instruction-direction {
    font-size: 1.7rem;
    font-weight: 700;
    padding: 0 6px;
    height: 28px;
    border-radius: 4px;
    margin-left: 10px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 65px !important;
    min-width: 65px !important;
    box-sizing: border-box !important;
}

.direction-rtl {
    background-color: rgba(120, 7, 44, 0.1);
    color: var(--primary-color);
}

.direction-ltr {
    background-color: rgba(140, 186, 121, 0.15);
    color: #4b7839;
}

/* Fabric Preview Panel */
.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Layer colour picker row */
.layer-color-pickers {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.layer-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.layer-color-item label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.layer-color-item .color-picker {
    width: 40px !important;
    height: 40px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    padding: 2px !important;
    background-color: #fad4de !important;
    background-image: none !important;
    box-sizing: border-box !important;
    transition: border-color var(--transition-speed), transform var(--transition-speed) !important;
    box-shadow: none !important;
    outline: none !important;
}

.layer-color-item .color-picker:hover {
    border-color: var(--primary-color);
    transform: scale(1.12);
}

.fabric-canvas {
    border-radius: 8px;
    background-color: inherit;
    max-width: 100%;
    height: auto;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Help & Notes Info */
.info-box {
    background: rgba(13, 148, 136, 0.05);
    border-left: 4px solid var(--secondary-color);
    padding: 16px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-bottom: 20px;
}

.info-box h4 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 6px;
}

/* Selection Toolbar & Marquee Styles */
.toolbar-card {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 0;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    border: none;
}

.toolbar-section {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toolbar-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    width: 70px;
    text-align: right;
    margin-right: 10px;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

@media (max-width: 768px) {
    .toolbar-card {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 20px !important;
        box-sizing: border-box !important;
    }
    .toolbar-section {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .toolbar-divider {
        display: none !important;
    }
    .toolbar-label {
        width: auto !important;
        text-align: center !important;
        margin: 0 8px 0 0 !important;
        display: inline-block !important;
    }
    .btn-chart-action .btn-text-part {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
    }
    .btn-chart-action .btn-icon-part {
        padding: 6px 6px !important;
    }
    /* Generate buttons stack and stretch full width */
    #generate-btn-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    #generate-btn-wrapper .btn-chart-action {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    #generate-btn-wrapper .btn-chart-action .btn-text-part {
        flex: 1 !important;
        font-size: 0.8rem !important;
    }
    /* Workstation card overflow fix */
    .loom-workstation {
        overflow: visible !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .workspace-wrapper {
        max-width: 100% !important;
        overflow-x: auto !important;
    }
    .preset-selection-wrapper {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .select-preset {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

.btn-tool, .btn-action {
    padding: 6px 14px;
    font-size: 0.9rem;
    border-radius: 6px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-tool:hover, .btn-action:hover:not(:disabled) {
    background-color: var(--border-color);
}

.btn-tool.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Selection Visual Marquee */
.cell.in-selection::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(37, 99, 235, 0.25) !important;
    pointer-events: none;
    z-index: 2;
}

.cell.sel-border-top {
    border-top: 2px dashed #2563eb !important;
}

.cell.sel-border-bottom {
    border-bottom: 2px dashed #2563eb !important;
}

.cell.sel-border-left {
    border-left: 2px dashed #2563eb !important;
}

.cell.sel-border-right {
    border-right: 2px dashed #2563eb !important;
}

/* Custom Cursors */
.cell.can-grab {
    cursor: grab !important;
}

.cell.grabbing {
    cursor: grabbing !important;
}

.cell.pasting-preview {
    cursor: crosshair !important;
    background-color: rgba(51, 51, 51, 0.65) !important;
    outline: 1px dashed var(--primary-color) !important;
    z-index: 5;
}

/* Print View Styles - only the chart and weaving instructions */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide theme layout elements and controls */
    header, footer, .site-header, .site-footer, #site-header, #site-footer,
    #page-titlebar, #page-breadcrumb, .help-link-container, #header-menu-sidebar,
    .app-header, .print-hide-controls, #generate-btn-wrapper, .help-link, .widget-area {
        display: none !important;
    }

    /* Make sure all parents are visible and unboxed */
    body, #page, #content, .customify-container, .customify-grid, #main, .content-area, .content-inner, article, .entry-content {
        display: block !important;
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    body {
        background: #fff !important;
    }

    .card {
        background: transparent !important;
        background-color: transparent !important;
    }

    .container,
    .pin-loom-designer-wp-wrapper {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .dashboard {
        display: block !important;
        padding: 0 !important;
    }

    /* Show the loom workstation card */
    .dashboard > .card:has(#loom-frame),
    .dashboard > .card:has(.loom-frame) {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;          /* no gap below chart card */
        page-break-inside: avoid;
        overflow: visible !important;
        text-align: center !important;
    }

    /* Hide generate buttons */
    #generate-btn-wrapper {
        display: none !important;
    }

    /* Show card title for the Workstation card so the design name input prints */
    .dashboard > .card:has(#loom-frame) > .card-title {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        border: none !important;
        margin: 0 auto 15px auto !important;
        padding: 0 !important;
    }



    /* Style the design name input to look like a clean, centered text title */
    #design-name-input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #000 !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 1.5rem !important;
        font-weight: 800 !important;
        text-align: center !important;
        width: 100% !important;
        pointer-events: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide the dropdown, tools, and action buttons when printing */
    .print-hide-controls {
        display: none !important;
    }

    /* Only display the fabric preview card if it has been generated on screen */
    #fabric-preview-card {
        display: none !important;
    }
    #fabric-preview-card:not([style*="display: none"]):not([style*="display:none"]) {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 auto 20px auto !important;
        page-break-inside: avoid;
        text-align: center !important;
        width: 100% !important;
    }
    #fabric-preview-card:not([style*="display: none"]):not([style*="display:none"]) .layer-color-pickers,
    #fabric-preview-card:not([style*="display: none"]):not([style*="display:none"]) .subtitle,
    #fabric-preview-card:not([style*="display: none"]):not([style*="display:none"]) .card-title {
        display: none !important;
    }
    #fabric-preview-card:not([style*="display: none"]):not([style*="display:none"]) .preview-container {
        display: inline-block !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    #fabric-preview-card:not([style*="display: none"]):not([style*="display:none"]) canvas {
        display: block !important;
        width: 337px !important;
        height: 310px !important;
        margin: 0 auto !important;
    }

    /* Instructions card: flush under the chart / preview, no extra spacing */
    #instructions-card {
        display: none !important;
    }
    #instructions-card:not([style*="display: none"]):not([style*="display:none"]) {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;          /* sit directly below chart/preview */
        page-break-inside: auto !important;
    }

    /* Hide the print button and subtitle inside the instructions header */
    #btn-print,
    #instructions-card .subtitle {
        display: none !important;
    }

    /* Loom frame & grid */
    .loom-frame {
        box-shadow: none !important;
        background: #f3f4f6 !important;
        padding: 20px !important;
        border: 1px solid #ccc !important;
        display: block !important;
        margin: 0 auto 20px auto !important;
        width: 380px !important;
        position: relative !important;
    }

    .loom-inner {
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .grid-container {
        grid-template-columns: repeat(31, 10px) !important;
        grid-template-rows: repeat(31, 10px) !important;
        background: #ccc !important;
    }

    .cell.editable {
        outline: none !important;
    }

    .cell.weft-thread  { background: #000 !important; }
    .cell.warp-thread  { background: #fff !important; }
    .cell.fixed-warp   { background: #fff !important; opacity: 0.5 !important; }
    .cell.fixed-weft   { background: #ddd !important; }

    .pin { display: none !important; }

    /* Precision alignment of chart numbers to print grid rows */
    .row-label {
        position: absolute !important;
        font-size: 8px !important;
        font-weight: 700 !important;
        color: #000 !important;
        height: 10px !important;
        line-height: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .row-label.left {
        left: 4px !important;
        width: 14px !important;
    }
    .row-label.right {
        right: 4px !important;
        width: 14px !important;
    }
    .row-label:nth-of-type(1)  { top: 20px !important; }
    .row-label:nth-of-type(2)  { top: 42px !important; }
    .row-label:nth-of-type(3)  { top: 64px !important; }
    .row-label:nth-of-type(4)  { top: 86px !important; }
    .row-label:nth-of-type(5)  { top: 108px !important; }
    .row-label:nth-of-type(6)  { top: 130px !important; }
    .row-label:nth-of-type(7)  { top: 152px !important; }
    .row-label:nth-of-type(8)  { top: 174px !important; }
    .row-label:nth-of-type(9)  { top: 196px !important; }
    .row-label:nth-of-type(10) { top: 218px !important; }
    .row-label:nth-of-type(11) { top: 240px !important; }
    .row-label:nth-of-type(12) { top: 262px !important; }
    .row-label:nth-of-type(13) { top: 284px !important; }
    .row-label:nth-of-type(14) { top: 306px !important; }
    .row-label:nth-of-type(15) { top: 328px !important; }
    .row-label:nth-of-type(16) { top: 350px !important; }

    /* Instructions list */
    .instruction-container {
        max-height: none !important;
        border: none !important;
        background: transparent !important;
    }

    .instruction-row {
        padding: 6px 0 !important;
        border-bottom: 1px solid #eee !important;
    }

    .instruction-checkbox { display: none !important; }
}

/* Custom Windows-style Color Picker Modal Overlay */
.custom-color-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Modal Window Container */
.custom-color-modal-window {
  background-color: #f0f0f0;
  border: 1px solid #999999;
  border-radius: 4px;
  width: 520px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  user-select: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* Green Header Bar */
.custom-color-modal-header {
  background-color: var(--primary-color) !important;
  padding: 8px 12px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  position: relative !important;
  color: #ffffff !important;
}

.custom-color-modal-title {
  font-size: 0.95rem;
  font-weight: bold;
  text-align: center !important;
}

.custom-color-modal-close-btn {
  position: absolute !important;
  right: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 1.3rem !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

.custom-color-modal-close-btn:hover {
  color: #ff3b30;
}

/* Modal Body */
.custom-color-modal-body {
  padding: 15px;
  display: flex;
  gap: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(119, 5, 43, 0.12) transparent;
}

.modal-left-panel {
  width: 220px;
  display: flex;
  flex-direction: column;
}

.modal-right-panel {
  width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal-label {
  font-size: 0.85rem;
  color: #000000;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Basic and Custom Grid */
.basic-colors-grid {
  display: grid;
  grid-template-columns: repeat(8, 22px);
  grid-gap: 4px;
}

.custom-colors-grid {
  display: grid;
  grid-template-columns: repeat(8, 22px);
  grid-gap: 4px;
}

/* Small square swatches in modal */
.modal-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid #808080;
  cursor: pointer;
  box-sizing: border-box;
}

.modal-swatch:hover {
  border-color: #000000;
}

.custom-swatch-slot.empty {
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  cursor: default;
}

/* Action Buttons OK / Cancel */
.modal-action-buttons {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 10px;
}

.modal-action-buttons button {
  flex: 1 !important;
  height: 38px !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
  transition: all var(--transition-speed) !important;
}

.modal-action-buttons .btn-modal-ok {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--primary-color) !important;
}

.modal-action-buttons .btn-modal-ok:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1.5px) !important;
}

.modal-action-buttons .btn-modal-cancel {
  background-color: #ffffff !important;
  color: var(--text-color) !important;
  border: 1.5px solid var(--border-strong) !important;
}

.modal-action-buttons .btn-modal-cancel:hover {
  background-color: #f3f4f6 !important;
  border-color: var(--text-color) !important;
  transform: translateY(-1.5px) !important;
}

/* Picker and Slider container */
.picker-and-slider {
  display: flex;
  gap: 12px;
}

.gradient-picker-container {
  position: relative;
  width: 220px;
  height: 180px;
  border: 1px solid #808080;
  cursor: crosshair;
  touch-action: none;
}

.gradient-picker-canvas {
  display: block;
  touch-action: none;
}

.gradient-picker-crosshair {
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
  font-size: 14px;
  font-weight: bold;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lightness-slider-container {
  position: relative;
  width: 16px;
  height: 180px;
  border: 1px solid #808080;
  cursor: pointer;
  touch-action: none;
}

.lightness-slider-canvas {
  display: block;
  touch-action: none;
}

.lightness-slider-pointer {
  position: absolute;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #000000;
  pointer-events: none;
}

/* Color details */
.color-details-container {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: flex-start;
}

.color-preview-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

.color-preview-box {
  width: 60px;
  height: 42px;
  border: 1px solid #808080;
  background-color: #000000;
}

.color-preview-text {
  font-size: 0.75rem;
  color: #000000;
  margin-top: 4px;
  text-align: center;
}

/* Add to Custom Colours button */
.btn-add-to-custom {
  margin-top: 12px !important;
  height: 38px !important;
  font-size: 0.9rem !important;
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--primary-color) !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  transition: all var(--transition-speed) !important;
}

.btn-add-to-custom:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1.5px) !important;
}

/* Media query for mobile responsive custom color modal */
@media (max-width: 768px) {
  .custom-color-modal-window {
    width: 95% !important;
    max-width: 450px !important;
    box-sizing: border-box !important;
  }
  
  .custom-color-modal-body {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px;
    box-sizing: border-box;
  }
  
  .modal-left-panel,
  .modal-right-panel {
    display: contents;
  }
  
  .picker-and-slider {
    order: 1;
    width: 100%;
    justify-content: center;
  }
  
  .color-details-container {
    order: 2;
  }
}

/* Select Preset Dropdown */
.select-preset {
    font-family: 'Outfit', sans-serif;
    background-color: var(--card-bg);
    border: 1.5px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 16px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-speed);
    width: 100%;
    margin-bottom: 0;
    box-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.05);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2377052b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    height: 42px;
    box-sizing: border-box;
}

.select-preset:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4.5px 6px rgba(0, 0, 0, 0.05);
}

.select-preset:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(119, 5, 43, 0.15);
}

/* Preset controls layout */
.preset-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
}

.preset-container .btn-preset {
    flex-shrink: 0;
    height: 42px;
    white-space: nowrap;
    box-sizing: border-box;
}

.preset-container .select-preset {
    flex-grow: 1;
}

/* Split button styling from hat app colour-chart.html */
.btn-chart-action {
  display: inline-flex !important;
  align-items: stretch !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  cursor: pointer !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
  margin: 0 !important;
  position: relative !important;
  filter: drop-shadow(0 2.5px 0 rgba(0, 0, 0, 0.12)) !important;
  transition: transform 0.05s ease, filter 0.05s ease !important;
  box-shadow: none !important;
  text-shadow: none !important;
  height: auto !important;
  gap: 0 !important;
  column-gap: 0 !important;
}

.btn-chart-action:active {
  transform: translateY(1.5px);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.12));
}

.btn-chart-action .btn-icon-part {
  background: #ffffff !important;
  padding: 6px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  border: 1.5px solid rgba(0, 0, 0, 0.15) !important;
  border-right: none !important;
  box-sizing: border-box !important;
  height: auto !important;
  margin: 0 !important;
}

.btn-chart-action .btn-icon-part svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
}

.btn-chart-action .btn-text-part {
  color: #ffffff !important;
  padding: 6px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  border-radius: 0 !important;
  border: 1.5px solid rgba(0, 0, 0, 0.15) !important;
  border-left: none !important;
  box-sizing: border-box !important;
  height: auto !important;
  margin: 0 !important;
}

/* Set 1: Undo (Slate/Charcoal theme) */
.btn-undo-tool .btn-text-part {
  background: #555555;
  border-color: #555555;
}
.btn-undo-tool .btn-icon-part {
  border-color: #bbbbbb;
}
.btn-undo-tool .btn-icon-part svg {
  fill: none;
  stroke: #555555;
}
.btn-undo-tool:hover .btn-text-part {
  background: #222222;
}

/* Set 2: Copy & Paste (Burgundy theme) */
.btn-copy-tool .btn-text-part, .btn-paste-tool .btn-text-part {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-copy-tool .btn-icon-part, .btn-paste-tool .btn-icon-part {
  border-color: var(--border-strong);
}
.btn-copy-tool .btn-icon-part svg, .btn-paste-tool .btn-icon-part svg {
  fill: none;
  stroke: var(--primary-color);
}
.btn-copy-tool:hover .btn-text-part, .btn-paste-tool:hover .btn-text-part {
  background: #3a0113;
}

/* Set 3: Clear (Dark Rust theme) */
.btn-clear-tool .btn-text-part, .btn-clear-selection-tool .btn-text-part {
  background: #8c2d19;
  border-color: #8c2d19;
}
.btn-clear-tool .btn-icon-part, .btn-clear-selection-tool .btn-icon-part {
  border-color: rgba(140, 45, 25, 0.25);
}
.btn-clear-tool .btn-icon-part svg, .btn-clear-selection-tool .btn-icon-part svg {
  fill: none;
  stroke: #8c2d19;
}
.btn-clear-tool:hover .btn-text-part, .btn-clear-selection-tool:hover .btn-text-part {
  background: #501509;
}

/* Set 4: Draw & Select Tools (Sage Green theme) */
.btn-draw-tool .btn-text-part, .btn-select-tool .btn-text-part {
  background: #436039;
  border-color: #436039;
}
.btn-draw-tool .btn-icon-part, .btn-select-tool .btn-icon-part {
  border-color: rgba(92, 127, 81, 0.25);
}
.btn-draw-tool .btn-icon-part svg, .btn-select-tool .btn-icon-part svg {
  fill: none;
  stroke: #436039;
}
.btn-draw-tool:hover .btn-text-part, .btn-select-tool:hover .btn-text-part {
  background: #1b2917;
}

/* Active tool state */
.btn-chart-action.active {
  box-shadow: 0 0 0 3px var(--primary-color), 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  z-index: 10;
}
.btn-chart-action.active .btn-text-part {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 700;
}
.btn-chart-action.active .btn-icon-part {
  border-color: var(--primary-color) !important;
  background: #fbf2f4 !important;
}
.btn-chart-action.active .btn-icon-part svg {
  stroke: var(--primary-color) !important;
}

/* Disabled action state */
.btn-chart-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}

/* Set 6: Design Preview (Sage Green theme) */
.btn-preview-action .btn-text-part {
  background: #436039;
  border-color: #436039;
}
.btn-preview-action .btn-icon-part {
  border-color: rgba(92, 127, 81, 0.25);
}
.btn-preview-action .btn-icon-part svg {
  fill: none;
  stroke: #436039;
}
.btn-preview-action:hover .btn-text-part {
  background: #1b2917;
}

/* Set 7: Create Written Instructions (Burgundy theme) */
.btn-instructions-action .btn-text-part {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-instructions-action .btn-icon-part {
  border-color: var(--border-strong);
}
.btn-instructions-action .btn-icon-part svg {
  fill: none;
  stroke: var(--primary-color);
}
.btn-instructions-action:hover .btn-text-part {
  background: #3a0113;
}

/* Global high-contrast hover border & translate for accessibility */
.btn-chart-action:hover .btn-icon-part,
.btn-chart-action:hover .btn-text-part {
  border-color: #000000 !important;
}
.btn-chart-action:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)) !important;
}

/* Set 8: Print Button (Navy Blue theme) */
.btn-print-action .btn-text-part {
  background: #1a4f72;
  border-color: #1a4f72;
}
.btn-print-action .btn-icon-part {
  border-color: rgba(26, 79, 114, 0.25);
}
.btn-print-action .btn-icon-part svg {
  fill: none;
  stroke: #1a4f72;
}
.btn-print-action:hover .btn-text-part {
  background: #11354e;
}

/* Global Print Blocked style for browser print menu overrides */
@media print {
  body.print-blocked {
    display: none !important;
  }
}

/* Inline Styles Replacement */
.loom-workstation {
    overflow: auto;
    text-align: center;
}
.workstation-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
#design-name-input {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 6px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 0;
    min-width: 250px;
    text-align: center;
    color: var(--text-color);
    background-color: var(--card-bg);
}
.preset-selection-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding-bottom: 10px;
}
.select-preset {
    max-width: 400px;
    width: 100%;
}
#generate-btn-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
    margin-bottom: 5px;
}
.toolbar-divider-horizontal {
    width: 100%;
    border-top: 1.5px dashed var(--border-color);
    margin: 5px 0 15px 0;
}
#fabric-preview-card {
    display: none;
    margin-top: 25px;
}
.preview-subtitle {
    margin-top: -10px;
    margin-bottom: 18px;
}
.color-picker {
    background-color: #fad4de;
}
.reset-button-wrapper {
    justify-content: flex-end;
    padding-top: 18px;
}
#btn-reset-colors {
    height: 46px;
    padding: 0 32px;
    font-size: 1rem;
}
#instructions-card {
    display: none;
    margin-top: 25px;
}
.instructions-title-wrapper {
    margin-bottom: 15px;
}
.instructions-title {
    margin-bottom: 0;
}
#btn-print {
    margin: 0;
}

/* Help Guide Page Styles */
.guide-card {
  margin: 40px auto;
  max-width: 1020px;
  background-color: var(--card-bg);
  border: none;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(119, 5, 43, 0.08);
  transition: none !important;
}
.guide-card:hover {
  transform: none !important;
  box-shadow: 0 10px 30px rgba(119, 5, 43, 0.08) !important;
}
.guide-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 25px;
  padding-bottom: 12px;
  text-align: center;
}
.guide-step {
  margin-bottom: 28px;
}
.guide-step:last-of-type {
  margin-bottom: 0;
}
.guide-step h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
  padding-bottom: 4px;
}
.guide-step p {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-color);
  margin-bottom: 12px;
}
.guide-step p:last-child {
  margin-bottom: 0;
}
.guide-card strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}
.guide-step h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 18px;
  margin-bottom: 8px;
}
.guide-footer {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding-top: 25px;
}
.btn-close-tab {
  font-family: 'Outfit', sans-serif;
  background-color: var(--primary-color);
  color: #ffffff;
  border: 1.5px solid var(--primary-color);
  padding: 0 32px;
  height: 46px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.btn-close-tab:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2.5px);
  box-shadow: 0 8px 16px rgba(119, 5, 43, 0.35);
}
.btn-close-tab:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(119, 5, 43, 0.2);
}

/* Guide Page Container Override */
.guide-container {
    max-width: 1020px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


