/**
 * maker.nlink.kr - Pieter Levels (@levelsio) style Minimalist Theme
 * Clean, ultra-fast, high signal-to-noise ratio, Dark/Light mode
 */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Dark Mode Defaults (Levelsio Vercel aesthetic) */
    --bg: #090a0f;
    --bg-surface: #11131a;
    --bg-card: #161822;
    --bg-card-hover: #1c1f2d;
    --bg-subtle: #212536;
    
    --border: #282d40;
    --border-hover: #3b425d;
    --border-focus: #6366f1;

    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.12);

    --accent-green: #10b981;
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    --accent-orange: #f59e0b;
    --accent-orange-bg: rgba(245, 158, 11, 0.1);
    --accent-purple: #8b5cf6;
    --accent-purple-bg: rgba(139, 92, 246, 0.1);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.65);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-subtle: #e2e8f0;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #4f46e5;

    --text: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.08);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* Native App Touch & Selection Rules (AGENTS.md) */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
}

input, textarea, [contenteditable="true"], .selectable, .selectable-text {
    -webkit-user-select: text;
    user-select: text;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.9);
}

.header-inner {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.3px;
    color: var(--text);
}

.brand-badge {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-icon:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

/* Hero Section */
.hero-section {
    padding: 32px 0 20px;
    text-align: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 14.5px;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 20px;
    line-height: 1.55;
    word-break: keep-all;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Navigation Tabs */
.tabs-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-top: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.tabs-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: max-content;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-badge {
    background: var(--bg-subtle);
    color: var(--text-dim);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.tab-btn.active .tab-badge {
    background: var(--primary-light);
    color: var(--primary);
}

/* Filter Tag Pills */
.filter-pills-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.filter-pills-bar::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.filter-pill:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.filter-pill:active {
    transform: scale(0.96);
}

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

/* Feed Cards List */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

/* Maker Showcase Card (Levelsio style) */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    gap: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.project-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 54px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.vote-box:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.vote-box.voted {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.vote-arrow {
    font-size: 11px;
    line-height: 1;
    margin-bottom: 2px;
}

.vote-count {
    font-size: 13px;
    font-weight: 800;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-header-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-title a:hover {
    color: var(--primary);
}

.card-domain {
    font-size: 11.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.card-tagline {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.45;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--text-dim);
}

.ai-tool-pill {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 11px;
}

.duration-pill {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 11px;
}

.ai-badge-pill {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 11px;
}

/* AI Review Card Box */
.ai-review-box {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

.ai-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--primary);
    font-size: 12px;
    margin-bottom: 6px;
}

.ai-score-tag {
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

/* Toolkit Card */
.toolkit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: all 0.2s ease;
}

.toolkit-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.toolkit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.toolkit-icon {
    font-size: 20px;
}

.toolkit-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.toolkit-summary {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 12px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.btn-close-modal {
    color: var(--text-muted);
    font-size: 20px;
    padding: 4px;
    line-height: 1;
}

.btn-close-modal:hover {
    color: var(--text);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    background: var(--bg-card);
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-hint {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.4;
}

.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.tools-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tool-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tool-chip-label input[type="checkbox"] {
    accent-color: var(--primary);
}

.tool-chip-label:hover {
    border-color: var(--border-hover);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Live Floating App Update Banner (AGENTS.md) */
.update-banner {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 19, 26, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    font-size: 13px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translate(-50%, -10px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 24px 0;
    background: var(--bg-surface);
    font-size: 12.5px;
    color: var(--text-dim);
    text-align: center;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-links a:hover {
    color: var(--text);
}

/* ==========================================================================
   In-App Legal Modal Styles (Terms of Service & Privacy Policy)
   ========================================================================== */
.legal-modal-card {
    max-width: 640px;
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.legal-tabs-nav {
    display: flex;
    gap: 8px;
}

.legal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.legal-tab-btn:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

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

.legal-modal-close-btn {
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    padding: 4px;
    cursor: pointer;
}

.legal-modal-close-btn:hover {
    color: var(--text);
}

.legal-notice-box {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.5;
}

.legal-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.legal-section h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.legal-section p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.highlight-clause {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.highlight-clause h4 {
    color: var(--accent-orange);
}

/* ==========================================================================
   Project Detail Modal & Component Styles
   ========================================================================== */
.detail-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-title-col {
    flex: 1;
    min-width: 0;
}

.detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.detail-tagline {
    font-size: 14px;
    color: var(--text-muted);
    word-break: keep-all;
    line-height: 1.45;
}

.detail-visit-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13.5px;
}

.detail-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

/* Mobile Quick Floating Action Button (FAB) */
.mobile-fab-submit {
    display: none;
}

/* Responsive Hide/Show Helpers */
.hide-desktop {
    display: none !important;
}

@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
    .hide-desktop {
        display: inline-flex !important;
    }
}

/* ==========================================================================
   Mobile-First Responsive System (Galaxy S24 / iPhone / Small Viewports)
   ========================================================================== */
@media (max-width: 640px) {
    /* Base Container */
    .container {
        padding: 0 12px;
    }

    /* Header Compact Mode */
    .site-header {
        border-bottom-color: var(--border);
    }
    .header-inner {
        height: 52px;
        gap: 8px;
    }
    .brand-logo {
        font-size: 15.5px;
        gap: 5px;
    }
    .brand-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
    .header-actions {
        gap: 6px;
    }
    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .header-actions .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: var(--radius-sm);
    }

    /* Hero Section */
    .hero-section {
        padding: 18px 0 12px;
    }
    .hero-tag {
        font-size: 11px;
        padding: 3px 10px;
        margin-bottom: 8px;
    }
    .hero-title {
        font-size: 18px;
        line-height: 1.35;
        letter-spacing: -0.4px;
        word-break: keep-all;
        margin-bottom: 6px;
    }
    .hero-subtitle {
        font-size: 12.5px;
        line-height: 1.45;
        margin-bottom: 12px;
        word-break: keep-all;
        padding: 0 4px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 11px 16px !important;
        font-size: 13.5px !important;
    }

    /* Tabs & Filters */
    .tabs-container {
        margin-top: 6px;
        margin-bottom: 12px;
    }
    .tab-btn {
        padding: 8px 10px;
        font-size: 12.5px;
        gap: 4px;
    }
    .tab-badge {
        font-size: 10px;
        padding: 1px 5px;
    }
    .filter-pills-bar {
        padding-bottom: 8px;
        margin-bottom: 12px;
        gap: 5px;
    }
    .filter-pill {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* Feed List & Cards */
    .feed-list {
        gap: 10px;
        margin-bottom: 80px; /* Space for Mobile Floating Action Button */
    }
    .project-card {
        padding: 12px;
        gap: 10px;
        border-radius: var(--radius-md);
    }
    .vote-box {
        min-width: 40px;
        height: 48px;
        border-radius: var(--radius-sm);
    }
    .vote-arrow {
        font-size: 10px;
    }
    .vote-count {
        font-size: 12px;
    }
    .card-header-row {
        gap: 5px;
        margin-bottom: 3px;
    }
    .card-title {
        font-size: 14.5px;
        line-height: 1.35;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .card-domain {
        font-size: 11px;
    }
    .card-tagline {
        font-size: 12.5px;
        line-height: 1.45;
        margin-bottom: 8px;
        word-break: keep-all;
    }
    .card-meta-row {
        gap: 4px;
        row-gap: 6px;
    }
    .ai-tool-pill, .duration-pill, .ai-badge-pill {
        font-size: 10px;
        padding: 2px 5px;
    }
    .card-meta-row .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
    .ai-review-box {
        padding: 10px 12px;
        margin-top: 8px;
        font-size: 12px;
        border-radius: var(--radius-sm);
    }
    .ai-review-header {
        font-size: 11.5px;
        margin-bottom: 4px;
    }

    /* Detail Modal Mobile */
    .detail-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .detail-title {
        font-size: 18px;
    }
    .detail-tagline {
        font-size: 13px;
    }
    .detail-visit-btn {
        width: 100%;
        padding: 10px !important;
        justify-content: center;
    }
    .detail-card-box {
        padding: 12px;
    }

    /* Bottom-Sheet Style Modals for Mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        background: rgba(0, 0, 0, 0.8);
    }
    .modal-card {
        border-radius: 20px 20px 0 0;
        max-height: 90dvh;
        max-height: 90vh;
        border-bottom: none;
        border-left: none;
        border-right: none;
        animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes sheetSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-header h3 {
        font-size: 15px;
    }
    .modal-body {
        padding: 14px 16px;
    }
    .modal-footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        flex-direction: column-reverse;
        width: 100%;
        gap: 8px;
    }
    .modal-footer .btn {
        width: 100%;
        padding: 11px;
        font-size: 13.5px;
    }

    /* Prevent mobile auto-zoom on input focus */
    .form-control, input, select, textarea {
        font-size: 15.5px !important;
    }
    .tools-checkbox-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .tool-chip-label {
        padding: 6px 8px;
        font-size: 11.5px;
        justify-content: flex-start;
    }

    /* Floating Action Button (FAB) */
    .mobile-fab-submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        background: linear-gradient(135deg, var(--primary), #8b5cf6);
        color: #ffffff;
        padding: 12px 18px;
        border-radius: var(--radius-full);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
        font-size: 13.5px;
        font-weight: 700;
        z-index: 1000;
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        cursor: pointer;
        transition: transform 0.15s ease;
    }
    .mobile-fab-submit:active {
        transform: scale(0.95);
    }

    /* Footer */
    .site-footer {
        padding: 20px 0 80px; /* Room for FAB */
        font-size: 11.5px;
    }
    .footer-links {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Extra Tight Viewports (Galaxy S24 / 360px) */
@media (max-width: 380px) {
    .container {
        padding: 0 10px;
    }
    .brand-logo span:nth-child(2) {
        font-size: 14.5px;
    }
    .header-actions .btn-sm {
        padding: 5px 6px;
        font-size: 11px;
    }
    .vote-box {
        min-width: 36px;
        height: 44px;
    }
    .project-card {
        padding: 10px;
        gap: 8px;
    }
    .tools-checkbox-group {
        grid-template-columns: 1fr;
    }
}
