:root {
    color-scheme: light;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5f5;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --accent-50: #f0f9ff;
    --accent-100: #e0f2fe;
    --accent-200: #bae6fd;
    --accent-300: #7dd3fc;
    --accent-400: #38bdf8;
    --accent-500: #0ea5e9;
    --accent-600: #0284c7;
    --accent-700: #0369a1;
    --accent-800: #075985;

    --accent-blue: #0ea5e9;
    --accent-gold: #fbbf24;
    --danger: #dc2626;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.18);
    --transition: 0.2s ease;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100vw;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(120% 120% at 10% 0%, rgba(14, 165, 233, 0.18) 0%, transparent 60%),
                radial-gradient(120% 120% at 90% 0%, rgba(59, 130, 246, 0.16) 0%, transparent 55%),
                var(--gray-50);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 15;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 8px clamp(20px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.branding i {
    font-size: 40px;
    color: var(--accent-500);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.08));
    border-radius: 16px;
    padding: 12px;
}

.branding h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--gray-900);
}

.branding p {
    margin: 2px 0 0;
    color: var(--gray-500);
    font-size: 0.95rem;
}

.settings-btn {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
}

.settings-btn i {
    font-size: 1.4rem;
}

.app-header.box-open .branding {
    display: none;
}

.settings-btn {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
}

.settings-btn i {
    font-size: 1.4rem;
}

.app-header.hidden {
    display: none;
}

.app-main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (max-width: 720px) {
    .app-main {
        max-width: 100%;
        padding: 16px;
    }

    .box-grid {
        grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 45vw, 240px), 1fr));
        gap: clamp(12px, 2vw, 18px);
    }
}

.search-panel {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border var(--transition);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.search-box:focus-within {
    box-shadow: var(--shadow-md);
    border-color: rgba(16, 185, 129, 0.4);
}

.search-box i {
    font-size: 20px;
    color: var(--accent-500);
    margin-right: 12px;
}

.search-box input {
    flex: 1 1 auto;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    color: var(--gray-800);
    min-width: 0;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.stats {
    display: flex;
    gap: 18px;
}

.stat {
    flex: 1;
    min-width: 140px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
}

.box-list .empty-state,
.box-detail .empty-state {
    background: white;
    border-radius: var(--radius-lg);
    padding: clamp(40px, 6vw, 72px);
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-md);
    display: grid;
    gap: 18px;
    justify-items: center;
}

.empty-state i {
    font-size: clamp(2.8rem, 4vw, 3.5rem);
    color: var(--accent-500);
    background: var(--accent-50);
    width: clamp(80px, 12vw, 96px);
    height: clamp(80px, 12vw, 96px);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.empty-state h2,
.empty-state h3 {
    margin: 0;
    color: var(--gray-800);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

.empty-state p {
    margin: 0;
    color: var(--gray-500);
    max-width: 440px;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-400), var(--accent-600));
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.primary-btn.outline {
    background: white;
    color: var(--accent-600);
    border: 1px solid rgba(14, 165, 233, 0.45);
    box-shadow: none;
}

.primary-btn.ghost {
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-600);
    box-shadow: none;
}

.ghost {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: rgba(148, 163, 184, 0.12);
    color: var(--gray-600);
    font-weight: 500;
}

.ghost:hover {
    background: rgba(148, 163, 184, 0.18);
}

.ghost-icon {
    background: rgba(148, 163, 184, 0.12);
    color: var(--gray-500);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
}

.ghost-icon:hover {
    background: rgba(148, 163, 184, 0.18);
    color: var(--gray-700);
}

.ghost-icon.danger {
    color: var(--danger);
}

.box-grid {
    display: grid;
    gap: clamp(18px, 3vw, 28px);
    grid-template-columns: repeat(auto-fit, minmax(clamp(240px, 40vw, 280px), 1fr));
}

.box-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: grid;
    gap: 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    min-height: 220px;
}

.box-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(16, 185, 129, 0.35);
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.box-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--accent-50);
    color: var(--accent-500);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
}

.box-body h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--gray-800);
}

.box-body p {
    margin: 0;
    color: var(--gray-500);
    min-height: 42px;
}

.box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--gray-500);
}

.box-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bulk-voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-600);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: all var(--transition);
    cursor: pointer;
}

.bulk-voice-btn:hover {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

.voice-unavailable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-400);
    font-size: 0.85rem;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 19;
}

.menu {
    position: absolute;
    top: 36px;
    right: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    min-width: 180px;
    padding: 6px;
    z-index: 20;
}

.menu button {
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--gray-600);
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 500;
}

.menu button:hover {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-600);
}

.menu button.danger:hover {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.floating-actions {
    position: fixed;
    bottom: 32px;
    right: 20px;
    z-index: 12;
}

.box-detail {
    display: grid;
    gap: 24px;
}

.box-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.04));
    min-height: 200px;
    cursor: pointer;
}

.box-hero__image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.box-hero__placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--accent-600);
    font-weight: 600;
}

.box-hero__placeholder i {
    font-size: 2rem;
}

.box-hero__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.box-hero__actions .ghost-icon {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

.box-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.04));
    height: 200px;
    cursor: pointer;
}

.box-hero__image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.box-hero__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--accent-600);
    font-weight: 600;
}

.box-hero__placeholder i {
    font-size: 2rem;
}

.box-hero__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.box-hero__actions .ghost-icon {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

.box-hero__item-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.item-count__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.item-count__label {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.detail-title h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-title p {
    margin: 4px 0 0;
    color: var(--gray-500);
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.detail-meta > div {
    background: white;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-sm);
}

.detail-meta .label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    text-transform: uppercase;
}

.detail-meta .value {
    display: block;
    margin-top: 8px;
    font-size: 1.1rem;
    color: var(--gray-800);
    font-weight: 600;
}

.detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.item-card {
    display: grid;
    grid-template-columns: 56px 1fr min-content;
    align-items: center;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 14px 14px;
    box-shadow: var(--shadow-sm);
    column-gap: 12px;
    row-gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-self: stretch;
}

.item-thumb {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-500);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    justify-self: start;
}

.item-card.has-thumb .item-thumb i {
    display: none;
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    position: relative;
}

.item-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: var(--shadow-md);
}

.item-info {
    min-width: 0;
    overflow: hidden;
}

.item-info h3 {
    margin: 0 0 6px;
    color: var(--gray-800);
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.tag {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 90;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: min(420px, 100%);
    padding: 24px;
    display: grid;
    gap: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(148, 163, 184, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.modal label {
    display: grid;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.modal input,
.modal textarea,
.modal select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 12px 14px;
    background: rgba(249, 250, 251, 0.8);
    color: var(--gray-800);
    transition: border var(--transition), box-shadow var(--transition);
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    background: white;
}

.modal textarea {
    resize: vertical;
    min-height: 96px;
}

.photo-preview {
    margin-top: 12px;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

/* Move Item Modal Styles */
.move-item-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.move-item-content .item-info {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.move-item-content .item-info h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.move-item-content .item-info p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.destination-selection h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.existing-boxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.box-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.box-option:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.box-option.selected {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
}

.box-option .box-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.box-option .box-icon i {
    font-size: 18px;
    color: var(--gray-600);
}

.box-option .box-info {
    flex: 1;
    min-width: 0;
}

.box-option .box-info h5 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.box-option .box-info p {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.box-option .box-info small {
    font-size: 12px;
    color: var(--gray-500);
}

.selection-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.new-box-section {
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
}

.new-box-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.new-box-toggle:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.new-box-toggle i {
    font-size: 18px;
}

.new-box-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.new-box-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.new-box-form input,
.new-box-form textarea {
    padding: 10px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.new-box-form input:focus,
.new-box-form textarea:focus {
    outline: none;
    border-color: var(--gray-900);
}

.modal-actions {
    display: flex;
}

/* Confirmation Modal */
.confirm-modal {
    max-width: 400px;
}

.confirm-modal.danger {
    border-top: 4px solid #dc3545;
}

.confirm-modal.warning {
    border-top: 4px solid #ffc107;
}

.confirm-modal.info {
    border-top: 4px solid #17a2b8;
}

.confirm-modal header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirm-modal header h3 i {
    font-size: 1.2rem;
}

.confirm-modal.danger header h3 i {
    color: #dc3545;
}

.confirm-modal.warning header h3 i {
    color: #ffc107;
}

.confirm-modal.info header h3 i {
    color: #17a2b8;
}

.confirm-modal .modal-content {
    padding: 1rem 0;
}

.confirm-modal .modal-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.confirm-modal .modal-actions {
    margin-top: 1.5rem;
}

.confirm-modal .primary-btn.danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.confirm-modal .primary-btn.danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.confirm-modal .primary-btn.warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.confirm-modal .primary-btn.warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.confirm-modal .primary-btn.info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.confirm-modal .primary-btn.info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.bulk-status {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(16, 185, 129, 0.25);
}

.bulk-status .transcript {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-700);
    font-weight: 600;
}

.bulk-status .transcript i {
    font-size: 1.4rem;
    color: var(--accent-500);
}

.bulk-status .recent {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bulk-status .recent li {
    background: white;
    border-radius: 999px;
    padding: 4px 12px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent-600);
    font-size: 0.85rem;
}

.bulk-status .count {
    margin: 0;
    color: var(--gray-600);
    font-weight: 500;
}

.bulk-controls {
    display: flex;
    justify-content: center;
    margin: 8px 0 4px;
}

.primary-btn.mic {
    width: 180px;
    justify-content: center;
    font-weight: 600;
    position: relative;
}

/* Bulk review mode */
.bulk-review {
    margin-top: 20px;
}

.bulk-review h4 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
}

.bulk-review .muted.small {
    margin: 0 0 16px;
    color: var(--gray-500);
}

.review-items {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    background: rgba(249, 250, 251, 0.5);
}

.review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-sm);
}

.review-item:last-child {
    margin-bottom: 0;
}

.item-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--danger);
    padding: 4px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background var(--transition);
    width: 28px;
    height: 28px;
}

.remove-item-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

.remove-item-btn i {
    font-size: 0.9rem;
}

.no-items {
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
    margin: 20px 0;
}

.primary-btn.mic.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Language selector styles */
.language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin-top: 12px;
}

.language-selector label {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
    margin: 0;
}

.language-select {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: white;
    color: var(--gray-800);
    font-size: 0.9rem;
    min-width: 140px;
    cursor: pointer;
    transition: border-color var(--transition);
}

.language-select:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
    margin: 0;
    min-width: 100px;
}

.settings-drawer {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: end;
    padding: 0;
    z-index: 80;
}

.drawer {
    width: min(360px, 92vw);
    background: white;
    height: 100vh;
    padding: 28px 24px;
    display: grid;
    gap: 24px;
    border-left: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: -30px 0 60px rgba(15, 23, 42, 0.12);
    overflow-y: auto;
}

.drawer header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer h3 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--gray-900);
}

.drawer section {
    display: grid;
    gap: 14px;
}

.drawer section h4 {
    margin: 0;
    color: var(--gray-700);
    font-size: 1.05rem;
}

.drawer .muted {
    color: var(--gray-500);
    margin: 0;
}

.drawer .muted.small {
    font-size: 0.9rem;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.08);
    padding: 10px 12px;
    border-radius: var(--radius-md);
}

.toggle input {
    width: 18px;
    height: 18px;
}

.about-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.about-list li {
    display: flex;
    justify-content: space-between;
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Data Storage Info */
.data-storage-info {
    display: grid;
    gap: 16px;
}

.storage-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.storage-item i {
    font-size: 1.4rem;
    color: var(--accent-500);
    margin-top: 2px;
    flex-shrink: 0;
}

.storage-item strong {
    display: block;
    color: var(--gray-800);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.storage-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(148, 163, 184, 0.25);
    max-width: min(420px, 90vw);
    z-index: 120;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.error {
    border-color: rgba(220, 38, 38, 0.3);
}

.toast i {
    font-size: 1.4rem;
    margin-top: 2px;
}

.toast.success i {
    color: var(--accent-500);
}

.toast.error i {
    color: var(--danger);
}

.toast strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.toast p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(249, 250, 251, 0.75);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    flex-direction: column;
    gap: 12px;
    z-index: 130;
    color: var(--gray-700);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(16, 185, 129, 0.15);
    border-top-color: var(--accent-500);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification */
.notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    max-width: min(420px, 90vw);
    width: 100%;
    margin-top: 80px; /* Account for the fixed header */
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.notification-icon {
    font-size: 1.4rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: var(--accent-500);
}

.notification.error .notification-icon {
    color: var(--danger);
}

.notification.info .notification-icon {
    color: var(--accent-500);
}

.notification-message {
    flex: 1;
    color: var(--gray-900);
    font-weight: 600;
    font-size: 0.95rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    padding: 4px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all var(--transition);
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.notification-close:hover {
    color: var(--gray-700);
    background: rgba(148, 163, 184, 0.1);
}

/* Responsive adjustments */
@media (max-width: 720px) {
    .app-header {
        flex-direction: row;
        gap: 18px;
        align-items: center;
        justify-content: space-between;
    }

    .branding {
        flex: 1;
        min-width: 0;
    }

    .branding h1 {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
    }

    .branding p {
        font-size: 0.85rem;
    }

    .settings-btn {
        flex-shrink: 0;
    }

    .detail-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .detail-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }

    .search-panel {
        gap: 14px;
    }

    .floating-actions {
        position: fixed;
        bottom: 20px;
        right: 20px;
    }

    .drawer {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Screen reader only class for hiding elements visually but keeping them accessible */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Separation instruction styling */
.separation-instruction {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    margin: 12px 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.separation-instruction i {
    color: var(--accent-500);
    font-size: 1rem;
    flex-shrink: 0;
}

.separation-instruction span {
    line-height: 1.3;
}

/* Box detail screen styles */
.box-detail {
    position: fixed;
    inset: 0;
    background: var(--gray-50);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.box-detail-header {
    position: sticky;
    top: 0;
    z-index: 15;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px clamp(20px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.box-detail-header .branding {
    flex: 1;
    margin-right: 16px;
}

.box-detail-header .branding i {
    font-size: 32px;
    color: var(--accent-500);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.08));
    border-radius: 12px;
    padding: 8px;
}

.box-detail-header .branding h1 {
    margin: 0 0 2px;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--gray-900);
}

.box-detail-header .branding p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.box-detail-main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.box-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.04));
    min-height: 120px;
    cursor: pointer;
}

.box-hero__image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    min-height: 240px;
}

.box-hero__placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--accent-600);
    font-weight: 600;
}

.box-hero__placeholder i {
    font-size: 2.5rem;
}

.box-hero__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.box-hero__actions .ghost-icon {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}


/* Item detail screen styles */
.item-detail-screen {
    position: fixed;
    inset: 0;
    background: var(--gray-50);
    z-index: 60;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.item-detail-header {
    position: sticky;
    top: 0;
    z-index: 15;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px clamp(20px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-detail-header .branding {
    flex: 1;
    margin-right: 16px;
}

.item-detail-header .branding i {
    font-size: 32px;
    color: var(--accent-500);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.08));
    border-radius: 12px;
    padding: 8px;
}

.item-detail-header .branding h1 {
    margin: 0 0 2px;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--gray-900);
}

.item-detail-header .branding p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.item-detail-main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    min-height: 0;
}

.item-detail-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.04));
    min-height: 120px;
    cursor: pointer;
}

.item-detail-hero__image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    min-height: 120px;
}

.item-detail-hero__placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: grid;
    place-items: center;
    gap: 4px;
    color: var(--accent-600);
    font-weight: 600;
}

.item-detail-hero__placeholder i {
    font-size: 1.4rem;
}

.item-detail-hero__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.item-detail-hero__actions .ghost-icon {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

.item-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.item-detail-meta > div {
    background: white;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-sm);
}

.item-detail-meta {
    margin-bottom: 24px;
}

.item-detail-meta .label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    text-transform: uppercase;
}

.item-detail-meta .value {
    display: block;
    margin-top: 8px;
    font-size: 1.1rem;
    color: var(--gray-800);
    font-weight: 600;
}

.item-detail-info {
    display: grid;
    gap: 24px;
}

.info-section h4 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
}

.info-section p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.5;
}

.info-section .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.info-section .tag {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-600);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.item-detail-description {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-sm);
}

.item-detail-description h4 {
    margin: 0 0 12px;
    color: var(--gray-800);
    font-size: 1.1rem;
}

.item-detail-description p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.5;
}

.item-detail-info {
    display: grid;
    gap: 24px;
}

.info-section h4 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
}

.info-section p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.5;
}

.info-section .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.info-section .tag {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-600);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.item-detail-form {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 16px;
}

.item-detail-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.item-detail-form input,
.item-detail-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 12px 14px;
    background: rgba(249, 250, 251, 0.8);
    color: var(--gray-800);
    transition: border var(--transition), box-shadow var(--transition);
}

.item-detail-form input:focus,
.item-detail-form textarea:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    background: white;
}

.item-detail-form textarea {
    resize: vertical;
    min-height: 96px;
}

/* Photo Modal */
.photo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.photo-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.photo-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s;
}

.photo-modal__close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.photo-modal__image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    object-fit: contain;
}

/* Onboarding Modal */
.onboarding-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 1000;
}

.onboarding-modal {
    background: white;
    border-radius: var(--radius-lg);
    width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    max-height: 90vh;
    padding: 16px 12px;
    display: grid;
    gap: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    overflow: hidden;
    box-sizing: border-box !important;
}

/* Desktop: Make onboarding modal narrower */
@media (min-width: 768px) {
    .onboarding-modal {
        width: min(600px, calc(100vw - 48px)) !important;
        max-width: min(600px, calc(100vw - 48px)) !important;
    }
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    cursor: pointer;
    transition: background var(--transition);
}

.progress-dot.active {
    background: var(--accent-500);
}

.onboarding-content {
    display: block;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.onboarding-page {
    display: grid;
    width: 100%;
    padding: 0 16px;
    gap: 16px;
    align-content: start;
    min-width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: white;
    color: var(--gray-900);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.onboarding-illustration {
    display: grid;
    place-items: center;
    height: 100px;
    color: var(--accent-500);
}

.onboarding-illustration i {
    font-size: 3.5rem;
}

.illustration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.illustration-item {
    display: grid;
    gap: 6px;
    place-items: center;
    padding: 12px;
    background: rgba(14, 165, 233, 0.08);
    border-radius: var(--radius-md);
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.illustration-item i {
    font-size: 2rem;
}

.illustration-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
}

.onboarding-modal h2 {
    margin: 0;
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    color: var(--gray-900);
    text-align: center;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.2;
}

.onboarding-description {
    margin: 0;
    color: var(--gray-600);
    text-align: center;
    line-height: 1.4;
    font-size: clamp(0.9rem, 3vw, 1rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.onboarding-features {
    display: grid;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.15);
    max-width: 100%;
    overflow: hidden;
}

.feature-item i {
    font-size: 1.1rem;
    color: var(--accent-500);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item span {
    color: var(--gray-700);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.onboarding-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    gap: 12px;
}

.spacer {
    flex: 1;
}

.onboarding-navigation .ghost {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.onboarding-navigation .primary-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .box-detail-main,
    .item-detail-main {
        max-width: 100%;
        padding: 16px;
    }

    .box-detail-header,
    .item-detail-header {
        padding: 16px;
    }

    .box-detail-header .branding h1,
    .item-detail-header .branding h1 {
        font-size: 1.4rem;
    }

    /* Onboarding modal mobile optimizations */
    .onboarding-backdrop {
        padding: 6px !important;
    }

    .onboarding-modal {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        padding: 12px 8px !important;
        gap: 12px !important;
        max-height: 85vh !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .onboarding-page {
        padding: 0 1px !important;
        gap: 8px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .onboarding-illustration {
        height: 60px !important;
    }

    .onboarding-illustration i {
        font-size: 2rem !important;
    }

    .illustration-grid {
        gap: 6px !important;
    }

    .illustration-item {
        padding: 6px !important;
        gap: 2px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .illustration-item i {
        font-size: 1.2rem !important;
    }

    .illustration-item span {
        font-size: 0.65rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    .onboarding-modal h2 {
        font-size: 1.1rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.2 !important;
    }

    .onboarding-description {
        font-size: 0.8rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.3 !important;
        max-width: 100% !important;
        hyphens: auto !important;
    }

    .onboarding-features {
        gap: 4px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .feature-item {
        padding: 4px 6px !important;
        gap: 4px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .feature-item i {
        font-size: 0.8rem !important;
        margin-top: 1px !important;
    }

    .feature-item span {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    .onboarding-navigation {
        padding-top: 8px !important;
        gap: 4px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .onboarding-navigation .ghost,
    .onboarding-navigation .primary-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        white-space: nowrap !important;
    }
}