/* public_html/assets/css/style.css */

/* ── Reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Warm "Fresh Market" palette */
    --color-bg:          #FEF9F3;
    --color-surface:     #FFFFFF;
    --color-primary:     #D95030;
    --color-primary-d:   #B83A1F;
    --color-primary-soft:#FDEAE5;
    --color-green:       #2D6A4F;
    --color-green-soft:  #D8F3DC;
    --color-gold:        #E9A820;
    --color-gold-soft:   #FFF5D6;
    --color-danger:      #C1292E;
    --color-checked:     #9CA3AF;
    --color-border:      #E8DDD0;
    --color-text:        #1C1917;
    --color-muted:       #8A8077;
    --color-tag:         #F5EDE4;

    --radius:            12px;
    --radius-sm:         8px;
    --radius-pill:       100px;
    --shadow-sm:         0 1px 3px rgba(28,25,23,.06);
    --shadow-md:         0 4px 20px rgba(28,25,23,.08);
    --shadow-lg:         0 8px 40px rgba(28,25,23,.12);
    --transition:        .22s cubic-bezier(.4,0,.2,1);
    --bounce:            .4s cubic-bezier(.34,1.56,.64,1);

    --safe-bottom:       env(safe-area-inset-bottom, 0px);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg:          #161211;
        --color-surface:     #231F1D;
        --color-primary:     #EF7B5C;
        --color-primary-d:   #F4957D;
        --color-primary-soft:#3D2119;
        --color-green:       #52B788;
        --color-green-soft:  #1B3A2A;
        --color-gold:        #F0C050;
        --color-gold-soft:   #3A2E10;
        --color-danger:      #F87171;
        --color-checked:     #6B6560;
        --color-border:      #3A3430;
        --color-text:        #F5F0EB;
        --color-muted:       #9A928A;
        --color-tag:         #2E2925;
        --shadow-sm:         0 1px 3px rgba(0,0,0,.2);
        --shadow-md:         0 4px 20px rgba(0,0,0,.3);
        --shadow-lg:         0 8px 40px rgba(0,0,0,.4);
    }
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utilities ──────────────────────────────────────────────────────── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pop {
    0%   { transform: scale(.85); opacity: 0; }
    60%  { transform: scale(1.04); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes strikethrough {
    from { width: 0; }
    to   { width: 100%; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-2deg); }
    75%      { transform: rotate(2deg); }
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1rem 6rem;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.25rem;
    background: var(--color-primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-header .logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .5rem;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.app-header .logo:hover { text-decoration: none; }

.app-header .logo svg {
    width: 1.3rem;
    height: 1.3rem;
    stroke: #fff;
}

.app-header .btn-outline {
    border-color: rgba(255,255,255,.4);
    color: #fff;
    font-weight: 600;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,.1);
}
.app-header .btn-outline:hover {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ── Card / Panel ───────────────────────────────────────────────────── */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 2px solid var(--color-border);
    padding: 1.75rem 1.5rem;
    margin-top: 1.25rem;
    animation: fadeSlideUp .35s ease both;
}

/* ── Home / Create form ─────────────────────────────────────────────── */
#home-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(80vh - 60px);
    min-height: calc(80dvh - 60px);
}

#home-screen .card {
    text-align: center;
    max-width: 420px;
    width: 100%;
    border: none;
    background: transparent;
    animation: pop .5s ease both;
}

#home-screen h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: .75rem;
    color: var(--color-text);
}

/* Colored word accent */
#home-screen h1 .accent {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

#home-screen h1 .accent::after {
    content: '';
    position: absolute;
    bottom: .05em;
    left: -.05em;
    right: -.05em;
    height: .3em;
    background: var(--color-primary-soft);
    z-index: -1;
    border-radius: 2px;
    transform: rotate(-.5deg);
}

#home-screen p.subtitle {
    color: var(--color-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.form-row input[type="text"] {
    width: 100%;
    padding: .9rem 1.1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1.05rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--color-surface);
    color: var(--color-text);
    text-align: center;
}

.form-row input[type="text"]::placeholder { color: var(--color-muted); }

.form-row input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.form-row .btn {
    width: 100%;
    justify-content: center;
    padding: .9rem 1.2rem;
    font-size: 1.05rem;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.15rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform .15s ease, box-shadow var(--transition);
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}

.btn:active { transform: scale(.96); }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217,80,48,.25);
}
.btn-primary:hover {
    background: var(--color-primary-d);
    box-shadow: 0 4px 16px rgba(217,80,48,.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-soft); }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { opacity: .85; }

.btn-sm { padding: .4rem .8rem; font-size: .82rem; border-radius: var(--radius-pill); }

/* ── List view header ───────────────────────────────────────────────── */
#list-screen { display: none; }

#list-screen .card {
    border: none;
    padding: 0;
    background: transparent;
}

.list-header {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: 1rem 0 .75rem;
    border-bottom: 3px solid var(--color-primary);
    flex-wrap: wrap;
}

#list-title {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 900;
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--color-text);
    cursor: text;
    min-width: 100px;
    letter-spacing: -.03em;
    padding: .15rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition);
}

#list-title:focus {
    border-bottom-color: var(--color-primary);
}

#list-title:hover {
    border-bottom: 2px dashed var(--color-muted);
}

/* ── Add-item bar ───────────────────────────────────────────────────── */
.add-item-bar {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
    padding: .75rem;
    background: var(--color-tag);
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.add-item-bar:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
    background: var(--color-surface);
}

.add-item-bar input[type="text"] {
    flex: 1;
    padding: .55rem .75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: transparent;
    color: var(--color-text);
}

.add-item-bar input[type="text"]::placeholder { color: var(--color-muted); }
.add-item-bar input[type="text"]:focus { outline: none; }

.add-item-bar .btn {
    border-radius: var(--radius-sm);
    padding: .55rem 1rem;
}

/* ── Item list ──────────────────────────────────────────────────────── */
#item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#item-list li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem .85rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), transform var(--transition), opacity var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeSlideIn .3s ease both;
    -webkit-user-select: none;
    user-select: none;
}

/* Stagger animation for initial load */
#item-list li:nth-child(1)  { animation-delay: .02s; }
#item-list li:nth-child(2)  { animation-delay: .04s; }
#item-list li:nth-child(3)  { animation-delay: .06s; }
#item-list li:nth-child(4)  { animation-delay: .08s; }
#item-list li:nth-child(5)  { animation-delay: .10s; }
#item-list li:nth-child(6)  { animation-delay: .12s; }
#item-list li:nth-child(7)  { animation-delay: .14s; }
#item-list li:nth-child(8)  { animation-delay: .16s; }
#item-list li:nth-child(9)  { animation-delay: .18s; }
#item-list li:nth-child(10) { animation-delay: .20s; }

/* Left color stripe */
#item-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-green);
    border-radius: 4px 0 0 4px;
    opacity: .7;
    transition: background var(--transition), opacity var(--transition);
}

#item-list li:hover {
    background: var(--color-tag);
    transform: translateX(2px);
}

#item-list li.checked {
    opacity: .55;
}

#item-list li.checked::before {
    background: var(--color-checked);
    opacity: .3;
}

#item-list li.checked .item-name {
    color: var(--color-checked);
    position: relative;
}

/* Animated strikethrough */
#item-list li.checked .item-name::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--color-checked);
    animation: strikethrough .3s ease forwards;
}

/* Removing animation */
#item-list li.removing {
    transform: translateX(100%);
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    transition: transform .3s ease, opacity .3s ease,
                max-height .3s ease .1s, padding .3s ease .1s;
}

/* Custom checkbox */
#item-list li input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.4rem;
    height: 1.4rem;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: grid;
    place-content: center;
    transition: background var(--transition), border-color var(--transition), transform .15s ease;
}

#item-list li input[type="checkbox"]::after {
    content: '';
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    transform: scale(0);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1);
    background: #fff;
}

#item-list li input[type="checkbox"]:checked {
    background: var(--color-green);
    border-color: var(--color-green);
}

#item-list li input[type="checkbox"]:checked::after {
    transform: scale(1);
}

#item-list li input[type="checkbox"]:active {
    transform: scale(.85);
}

.item-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.btn-delete-item {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted);
    padding: .4rem .5rem;
    border-radius: 50%;
    transition: color var(--transition), background var(--transition), transform .15s ease;
    font-size: 1.1rem;
    line-height: 1;
    display: grid;
    place-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.btn-delete-item:hover {
    color: var(--color-danger);
    background: rgba(193,41,46,.08);
}

.btn-delete-item:active { transform: scale(.85); }

/* ── Item count badge ──────────────────────────────────────────────── */
.item-count {
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-muted);
    padding: .5rem 0 .25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.item-count::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* ── Empty state ───────────────────────────────────────────────────── */
.empty-list-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-muted);
    animation: fadeSlideUp .4s ease both;
}

.empty-list-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: .75rem;
    display: block;
    animation: wiggle 2s ease-in-out infinite;
}

.empty-list-state p {
    font-size: .95rem;
    line-height: 1.5;
}

/* ── Share bar ──────────────────────────────────────────────────────── */
.share-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.5rem;
    padding: .75rem;
    background: var(--color-tag);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.share-url {
    flex: 1 1 200px;
    padding: .5rem .8rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    color: var(--color-muted);
    background: var(--color-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Sync indicator ─────────────────────────────────────────────────── */
#sync-indicator {
    font-size: .72rem;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}

.sync-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-muted);
    display: inline-block;
    transition: background .4s;
}

.sync-dot.syncing  { background: var(--color-gold); animation: spin 1s linear infinite; }
.sync-dot.synced   { background: var(--color-green); }
.sync-dot.error    { background: var(--color-danger); }

/* ── Sidebar – Recent Lists ─────────────────────────────────────────── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28,25,23,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity .25s ease;
}

#sidebar-overlay.visible { opacity: 1; }

#sidebar {
    position: fixed;
    top: 0; right: 0;
    width: min(340px, 88vw);
    height: 100%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--color-primary);
}

#sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 2px solid var(--color-border);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -.01em;
    text-transform: uppercase;
}

.sidebar-header button {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-muted);
    line-height: 1;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-content: center;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}

.sidebar-header button:hover {
    background: var(--color-tag);
    color: var(--color-text);
}

#recent-lists {
    list-style: none;
    padding: .5rem 0;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

#recent-lists li {
    padding: .85rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition), transform .15s ease;
    font-size: .95rem;
    border-left: 3px solid transparent;
    margin: 0 .5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

#recent-lists li:hover {
    background: var(--color-tag);
    border-left-color: var(--color-primary);
    transform: translateX(2px);
}

#recent-lists li:active { transform: scale(.98); }

#recent-lists li .list-item-name {
    font-weight: 700;
    display: block;
    margin-bottom: .15rem;
}

#recent-lists li .list-item-hash {
    font-size: .7rem;
    color: var(--color-muted);
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}

.empty-state {
    padding: 3rem 1.25rem;
    text-align: center;
    color: var(--color-muted);
    font-size: .9rem;
    line-height: 1.6;
}

/* ── Toast / notification ───────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: calc(1.5rem + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-text);
    color: var(--color-bg);
    padding: .7rem 1.4rem;
    border-radius: var(--radius-pill);
    font-size: .875rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s, transform .3s cubic-bezier(.34,1.56,.64,1);
    z-index: 200;
    white-space: nowrap;
    max-width: calc(100vw - 2rem);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

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

/* ── Header actions ──────────────────────────────────────────────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.user-greeting {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    white-space: nowrap;
}

/* ── Auth Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28,25,23,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 110;
    opacity: 0;
    transition: opacity .25s ease;
}

.modal-overlay.visible { opacity: 1; }

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.92);
    width: min(400px, 92vw);
    max-height: 90vh;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    opacity: 0;
    pointer-events: none;
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
    overflow-y: auto;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem .5rem;
    border-bottom: 2px solid var(--color-border);
}

.modal-tabs {
    display: flex;
    gap: 0;
}

.modal-tab {
    background: none;
    border: none;
    padding: .6rem 1rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-muted);
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-content: center;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}

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

/* Auth forms */
.auth-form {
    padding: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-muted);
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.form-group input {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.form-group input::placeholder {
    color: var(--color-muted);
}

.auth-error {
    font-size: .85rem;
    color: var(--color-danger);
    font-weight: 600;
    margin-bottom: .75rem;
    min-height: 1.2em;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: .85rem 1.2rem;
    font-size: 1rem;
}

/* ── Mobile bottom add bar ─────────────────────────────────────────── */
.mobile-bottom-bar {
    display: none;
}

/* ── Responsive: Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .container {
        padding: .75rem .75rem 5.5rem;
    }

    .card {
        padding: 1.25rem 1rem;
        border-radius: var(--radius-sm);
    }

    .list-header {
        padding: .75rem 0 .5rem;
    }

    /* Move add bar to bottom on mobile */
    #list-screen .add-item-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        background: var(--color-surface);
        border-top: 2px solid var(--color-border);
        padding: .75rem .75rem calc(.75rem + var(--safe-bottom));
        z-index: 40;
        box-shadow: 0 -4px 20px rgba(28,25,23,.08);
        animation: none;
    }

    #list-screen .add-item-bar:focus-within {
        border-color: var(--color-primary);
        box-shadow: 0 -4px 20px rgba(217,80,48,.12);
    }

    /* Touch-friendly item rows */
    #item-list li {
        padding: .9rem .85rem;
        min-height: 52px;
    }

    .btn-delete-item {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }

    #item-list li input[type="checkbox"] {
        width: 1.6rem;
        height: 1.6rem;
    }

    .share-bar {
        flex-direction: column;
    }

    .share-url { width: 100%; }

    #home-screen {
        min-height: calc(85vh - 52px);
        min-height: calc(85dvh - 52px);
    }

    #home-screen .card {
        padding: 1rem;
    }

    .form-row input[type="text"] {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .form-row .btn {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* ── Landscape phone fix ────────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    #home-screen {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* ── Tablet+ ────────────────────────────────────────────────────────── */
@media (min-width: 601px) {
    .container {
        padding: 2rem 1.5rem 4rem;
    }

    #item-list li {
        border-radius: var(--radius-sm);
    }
}

/* ── Reduce motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
