/* Tembo Web App Styles - Minimal for Inline SVG */

/* Brand Fonts */
@font-face {
    font-family: 'Jokker';
    src: url('https://content.musicalbeings.com/fonts/jokker/JokkerTRIAL-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Jokker';
    src: url('https://content.musicalbeings.com/fonts/jokker/JokkerTRIAL-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Haffer Mono';
    src: url('https://content.musicalbeings.com/fonts/haffer-mono/HafferXHMono-TRIAL-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-page-bg: #E8E1D4;
    --color-accent: #FF5D5D;
    --color-wood: #513B27;
    --color-white: #FFFFFF;
    --color-amber: #C5AC92;
    --color-wood-dark: #261E16;
    --color-cream: #E8E1D4;
    --color-forest: #324D39;
    --font-display: 'Jokker', 'Comic Sans MS', cursive, sans-serif;
    --font-body: 'Haffer Mono', 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-page-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.device {
    width: 689px;
    height: 555px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.device svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Cursor styles for interactive elements */
.device [id^="mute-"],
.device [id^="loop-"],
.device [id^="sample-flip-"],
.device [id="sampler-record"],
.device [id="play-stop"],
.device [id="session-record"] {
    cursor: pointer;
}

.device [id^="dry-wet-"],
.device [id="BPM"],
.device [id="Master Volume"],
.device [id="global-filter-encoder"],
.device [id="kit-selector"],
.device [id="effect selector"] {
    cursor: grab;
}

.device [id^="dry-wet-"]:active,
.device [id="BPM"]:active,
.device [id="Master Volume"]:active,
.device [id="global-filter-encoder"]:active,
.device [id="kit-selector"]:active,
.device [id="effect selector"]:active {
    cursor: grabbing;
}

/* Grid cells - cursor */
.device [id="grid"] rect {
    cursor: pointer;
}

/* Responsive */
@media (max-width: 720px) {
    .device {
        transform: scale(0.85);
        transform-origin: center;
    }
}

@media (max-width: 600px) {
    .device {
        transform: scale(0.65);
    }
}

/* Keyboard Shortcuts Toggle Button */
.shortcuts-toggle {
    position: fixed;
    top: 20px;
    right: 72px;
    width: 44px;
    height: 44px;
    background: var(--color-wood);
    border: none;
    border-radius: 8px;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.2s;
    z-index: 100;
}

.shortcuts-toggle:hover {
    background: #6b4f37;
    transform: scale(1.05);
}

/* Keyboard Shortcuts Modal */
.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.shortcuts-overlay.open {
    opacity: 1;
    visibility: visible;
}

.shortcuts-modal {
    background: #E8E1D4;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.shortcuts-overlay.open .shortcuts-modal {
    transform: scale(1);
}

.shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.shortcuts-header h2 {
    font-family: var(--font-display);
    color: var(--color-wood);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.shortcuts-close {
    background: none;
    border: none;
    color: var(--color-wood);
    font-size: 28px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.shortcuts-close:hover {
    opacity: 1;
}

.shortcuts-content {
    padding: 16px 24px 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.shortcuts-section {
    margin-bottom: 20px;
}

.shortcuts-section:last-child {
    margin-bottom: 0;
}

.shortcuts-section h3 {
    font-family: var(--font-display);
    color: #999;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(81, 59, 39, 0.1);
}

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

.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    background: var(--color-wood);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-body);
}

.shortcut-desc {
    font-family: var(--font-body);
    color: var(--color-wood-dark);
    font-size: 13px;
    margin-left: auto;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--color-wood);
    border: none;
    border-radius: 8px;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.2s;
    z-index: 100;
}

.sidebar-toggle:hover {
    background: #6b4f37;
    transform: scale(1.05);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #E8E1D4;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 200;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-family: var(--font-display);
    color: var(--color-wood);
    font-size: 18px;
    font-weight: 700;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--color-wood);
    font-size: 28px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.sidebar-close:hover {
    opacity: 1;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.sidebar-empty {
    font-family: var(--font-body);
    color: #999;
    text-align: center;
    padding: 40px 20px;
    font-size: 13px;
}

/* Recording Item */
.recording-item {
    background: white;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.recording-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recording-icon.audio {
    background: var(--color-accent);
}

.recording-icon.session {
    background: var(--color-forest);
}

.recording-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.recording-info {
    flex: 1;
    min-width: 0;
}

.recording-name {
    font-family: var(--font-display);
    color: var(--color-wood-dark);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recording-meta {
    font-family: var(--font-body);
    color: #999;
    font-size: 11px;
    margin-top: 4px;
}

.recording-download,
.recording-play {
    width: 36px;
    height: 36px;
    background: var(--color-wood);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.recording-download:hover,
.recording-play:hover {
    background: var(--color-wood-dark);
}

.recording-play.playing {
    background: var(--color-forest);
}

.recording-download svg,
.recording-play svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Kit Library Toggle Button */
.library-toggle {
    position: fixed;
    top: 20px;
    right: 124px;
    width: 44px;
    height: 44px;
    background: var(--color-wood);
    border: none;
    border-radius: 8px;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.2s;
    z-index: 100;
}

.library-toggle:hover {
    background: #6b4f37;
    transform: scale(1.05);
}

/* Kit Library Modal */
.library-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.library-overlay.open {
    opacity: 1;
    visibility: visible;
}

.library-modal {
    background: #E8E1D4;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
    position: relative;
}

.library-overlay.open .library-modal {
    transform: scale(1);
}

.library-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.library-header h2 {
    font-family: var(--font-display);
    color: var(--color-wood);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.library-close {
    background: none;
    border: none;
    color: var(--color-wood);
    font-size: 28px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.library-close:hover {
    opacity: 1;
}

.library-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.library-loading {
    color: #999;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

.library-error {
    color: var(--color-accent);
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

.library-error-detail {
    color: #999;
    font-size: 12px;
    margin-top: 8px;
}

.library-retry {
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--color-wood);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.library-retry:hover {
    background: #3d2d1d;
}

.library-empty {
    color: #999;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

/* Kit Grid */
.kit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

/* Kit Card */
.kit-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kit-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--color-wood);
    overflow: hidden;
    margin-bottom: 10px;
}

.kit-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kit-cover-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(135deg, #f5f3ef 0%, #e8e1d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.kit-cover-placeholder svg {
    width: 40px;
    height: 40px;
    fill: #999;
}

.kit-name {
    font-family: var(--font-display);
    color: var(--color-wood-dark);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kit-artist {
    font-family: var(--font-body);
    color: #999;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kit Detail View - Horizontal Card Layout */
.kit-detail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #E8E1D4;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    overflow-y: auto;
}

.kit-detail.open {
    opacity: 1;
    visibility: visible;
}

.kit-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.kit-detail-header span {
    color: var(--color-wood);
    font-size: 16px;
    font-weight: 600;
}

.kit-detail-back {
    background: transparent;
    border: none;
    color: var(--color-wood);
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.kit-detail-back:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Hero Section - Horizontal Layout */
.kit-detail-hero {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #E8E1D4;
}

.kit-detail-cover {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-wood);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kit-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.kit-detail-info h2 {
    font-family: var(--font-display);
    color: var(--color-wood-dark);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.kit-detail-artist {
    font-family: var(--font-body);
    color: var(--color-wood);
    font-size: 13px;
    margin-bottom: 8px;
}

.kit-detail-desc {
    font-family: var(--font-body);
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kit-detail-actions {
    display: flex;
    gap: 8px;
}

.kit-detail-load {
    font-family: var(--font-display);
    padding: 10px 20px;
    background: var(--color-wood);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.kit-detail-load:hover {
    background: #3d2d1d;
}

/* Section Label */
.kit-detail-section-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    padding: 0 20px;
    margin-bottom: 8px;
}

/* Sample Rows */
.kit-detail-samples {
    background: transparent;
    margin: 0 20px 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.sample-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(81, 59, 39, 0.12);
    transition: background 0.15s;
}

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

.sample-row:hover {
    background: rgba(81, 59, 39, 0.05);
}

.sample-preview-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-wood);
    border: none;
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.sample-preview-btn:hover {
    background: var(--color-wood-dark);
}

.sample-preview-btn.playing {
    background: var(--color-forest);
}

.sample-preview-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

.sample-name {
    font-family: var(--font-body);
    color: var(--color-wood-dark);
    font-size: 14px;
    font-weight: 400;
    flex: 1;
}

.sample-number {
    font-family: var(--font-body);
    color: var(--color-wood);
    font-size: 12px;
    font-weight: 400;
    width: 18px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* Slot Picker - Content Library Style */
.slot-picker {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #E8E1D4;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.slot-picker.open {
    opacity: 1;
    visibility: visible;
}

.slot-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.slot-picker-header h2 {
    font-family: var(--font-display);
    color: var(--color-wood-dark);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.slot-picker-close {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.slot-picker-close:hover {
    color: var(--color-wood);
}

/* Selected Kit Preview */
.selected-kit-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f5f3ef;
}

.selected-kit-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-wood);
    flex-shrink: 0;
}

.selected-kit-info {
    flex: 1;
    min-width: 0;
}

.selected-kit-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-wood-dark);
    margin-bottom: 2px;
}

.selected-kit-meta {
    font-family: var(--font-body);
    font-size: 12px;
    color: #999;
}

/* Section Label */
.slot-section-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    padding: 16px 20px 10px;
}

/* 4x2 Slot Grid */
.slot-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 20px;
}

/* Slot Button */
.slot-button {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.slot-button:hover {
    border-color: var(--color-wood);
}

.slot-button.selected {
    border-color: var(--color-wood);
    background: var(--color-wood);
}

.slot-button.selected .slot-letter,
.slot-button.selected .slot-status {
    color: white;
}

.slot-button.loading {
    opacity: 0.6;
    pointer-events: none;
}

.slot-letter {
    font-family: var(--font-display);
    color: var(--color-wood-dark);
    font-size: 20px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.slot-status {
    font-family: var(--font-body);
    color: #999;
    font-size: 10px;
    display: block;
}

/* Footer Buttons */
.slot-picker-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    margin-top: auto;
}

.slot-btn-cancel {
    font-family: var(--font-display);
    flex: 1;
    padding: 14px 20px;
    background: white;
    border: 1px solid #d4cfc7;
    border-radius: 10px;
    color: var(--color-wood);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.slot-btn-cancel:hover {
    background: #f5f3ef;
    border-color: #c5beb3;
}

.slot-btn-add {
    font-family: var(--font-display);
    flex: 1;
    padding: 14px 20px;
    background: var(--color-wood);
    border: 1px solid var(--color-wood);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.slot-btn-add:hover {
    background: #3d2d1d;
    border-color: #3d2d1d;
}

/* ============================================
   EXPLORE OVERLAY
   ============================================ */

/* Explore Toggle Button */
.explore-toggle {
    position: fixed;
    top: 20px;
    right: 176px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    background: var(--color-forest);
    border: none;
    padding: 0 16px;
    border-radius: 22px;
    font-family: var(--font-body);
    font-size: 13px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s;
}

.explore-toggle:hover {
    background: #3d5e45;
    transform: scale(1.05);
}

.explore-toggle-icon {
    width: 18px;
    height: 18px;
    color: white;
}

.explore-toggle-text {
    font-weight: 500;
}

/* Explore Overlay */
.explore-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.explore-overlay.open {
    opacity: 1;
    visibility: visible;
}

.explore-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    cursor: pointer;
}

/* Allow highlight to overflow SVG bounds */
.device.explore-active,
.device.explore-active svg,
.device-container:has(.explore-active),
.device-wrapper:has(.explore-active) {
    overflow: visible;
}

/* Highlight overlay - drawing animation */
.explore-highlight-overlay {
    pointer-events: none;
}

@keyframes draw-highlight {
    to {
        stroke-dashoffset: 0;
    }
}

/* Info card */
.explore-card {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 360px;
    max-width: 90vw;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: auto;
}

.explore-card.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.explore-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #eee;
}

.explore-card-number {
    width: 28px;
    height: 28px;
    background: var(--color-wood);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.explore-card-title {
    flex: 1;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-wood);
    margin: 0;
}

.explore-card-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.explore-card-close:hover {
    color: #666;
}

.explore-card-desc {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
    font-family: var(--font-body);
}

.explore-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.explore-prev {
    background: var(--color-page-bg);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s;
}

.explore-next {
    background: var(--color-forest);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s;
}

.explore-prev:hover {
    background: #d5cec1;
}

.explore-next:hover {
    background: #3d5e45;
}

.explore-prev:disabled, .explore-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.explore-progress {
    font-size: 12px;
    color: #999;
    font-family: var(--font-body);
}

/* Close tour button - positioned above the card */
.explore-close-btn {
    position: absolute;
    top: 190px;
    left: 50%;
    transform: translateX(calc(-50% + 120px));
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--color-wood);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, transform 0.2s;
}

.explore-close-btn:hover {
    background: white;
    transform: scale(1.03);
}

/* Mobile Overlay - shown only on small screens */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-page-bg);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.mobile-message {
    text-align: center;
    max-width: 320px;
}

.mobile-icon {
    width: 64px;
    height: 64px;
    color: var(--color-tan);
    margin-bottom: 24px;
}

.mobile-message h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-wood);
    margin: 0 0 12px 0;
}

.mobile-message p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-tan);
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.mobile-link {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-forest);
    text-decoration: none;
    padding: 12px 24px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Show mobile overlay on small screens */
@media (max-width: 768px) {
    .mobile-overlay {
        display: flex;
    }

    .app-container,
    .library-toggle,
    .shortcuts-toggle,
    .explore-toggle,
    .sidebar-toggle,
    .sidebar {
        display: none !important;
    }
}
