:root {
    --ink: #17201d;
    --muted: #6f7773;
    --line: #dedfd8;
    --paper: #f5f3ec;
    --surface: #fffef9;
    --green: #173c34;
    --green-soft: #dce9e2;
    --lime: #d8e66b;
    --orange: #e56e42;
    --red: #b64436;
    --shadow: 0 18px 50px rgba(23, 60, 52, .10);
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100dvh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 244px;
    flex-direction: column;
    padding: 32px 24px 24px;
    color: #fff;
    background: var(--green);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    font-weight: 900;
    letter-spacing: .12em;
    text-decoration: none;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.56);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .04em;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px 12px 12px 3px;
    color: var(--green);
    background: var(--lime);
    font-family: Georgia, serif;
    font-size: 24px;
    font-style: italic;
}

.side-nav { display: grid; gap: 8px; margin-top: 58px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 15px;
    border: 0;
    border-radius: 14px;
    color: rgba(255,255,255,.68);
    background: transparent;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.nav-link span { width: 20px; font-size: 21px; text-align: center; }
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255,255,255,.1); }
.nav-link.is-active span { color: var(--lime); }

.sidebar-note {
    margin-top: auto;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.06);
}

.admin-access {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 15px;
    color: #fff;
    background: rgba(255,255,255,.06);
    text-decoration: none;
}
.admin-access + .sidebar-note { margin-top: 12px; }
.admin-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--green); background: var(--lime); font-family: Georgia, serif; font-weight: 800; }
.admin-copy { min-width: 0; }
.admin-copy small, .admin-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-copy small { color: rgba(255,255,255,.5); font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.admin-copy strong { margin-top: 2px; font-size: 11px; }
.admin-access form button { padding: 0; border: 0; color: var(--lime); background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; }
.admin-access.is-authenticated { border-color: rgba(216,230,107,.25); }
.mobile-actions { display: flex; align-items: center; gap: 9px; }
.mobile-actions form { display: contents; }
.mobile-admin-button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: #fff; font-family: Georgia, serif; font-weight: 800; text-decoration: none; }
.mobile-admin-button.is-active { border-color: var(--green); color: var(--lime); background: var(--green); }
.sidebar-note .note-icon { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--green); background: var(--lime); }
.sidebar-note strong { display: block; margin-top: 14px; font-size: 13px; }
.sidebar-note p { margin: 6px 0 0; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.55; }

.main-content { min-height: 100dvh; margin-left: 244px; padding: 44px clamp(28px, 5vw, 76px) 70px; }
.mobile-header, .bottom-nav, .floating-add { display: none; }
.view-section { display: none; max-width: 1180px; margin: 0 auto; }
.view-section.is-active { display: block; animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 350px;
    padding: clamp(34px, 5vw, 64px);
    border-radius: 32px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 30%, rgba(216,230,107,.24) 0 4%, transparent 4.3%),
        radial-gradient(circle at 82% 54%, transparent 0 16%, rgba(255,255,255,.08) 16.2% 16.8%, transparent 17%),
        linear-gradient(135deg, #234c42, #13352e);
    box-shadow: var(--shadow);
}
.hero::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -125px;
    width: 330px;
    height: 330px;
    border: 54px solid rgba(216,230,107,.09);
    border-radius: 50%;
}

.eyebrow { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: 9px; color: var(--lime); }
.hero .eyebrow span { width: 22px; height: 1px; background: currentColor; }
.hero h1 { position: relative; z-index: 1; max-width: 640px; margin: 17px 0 12px; font-size: clamp(40px, 5vw, 67px); line-height: .98; letter-spacing: -.055em; }
.hero h1 em { color: var(--lime); font-family: Georgia, serif; font-weight: 500; }
.hero > p { max-width: 480px; margin: 0; color: rgba(255,255,255,.67); font-size: 15px; line-height: 1.65; }

.search-box {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: min(580px, 100%);
    min-height: 58px;
    margin-top: 30px;
    padding: 0 14px 0 18px;
    border-radius: 17px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 14px 34px rgba(0,0,0,.16);
}
.search-box input { width: 100%; padding: 0 13px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #929793; }
.search-symbol { color: var(--green); font-size: 26px; line-height: 1; }
.search-box kbd { padding: 5px 8px; border: 1px solid #e4e4df; border-radius: 7px; color: #999; background: #f7f7f3; font-family: inherit; font-size: 10px; }

.stats-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 15px; margin-top: 18px; }
.stat-card { position: relative; overflow: hidden; min-height: 132px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-card strong { display: block; margin: 8px 0 3px; color: var(--green); font-family: Georgia, serif; font-size: 34px; font-weight: 600; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat-detail { color: var(--muted); font-size: 12px; }
.stat-primary { color: #fff; border-color: var(--green); background: var(--green); }
.stat-primary strong, .stat-primary .stat-label, .stat-primary .stat-detail { color: inherit; }
.stat-primary .stat-label, .stat-primary .stat-detail { opacity: .65; }
.stat-decoration { position: absolute; right: 24px; bottom: 7px; color: var(--lime); font-size: 76px; opacity: .25; transform: rotate(-10deg); }

.section-heading, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 42px 0 20px; }
.section-heading h2, .page-heading h1 { margin: 5px 0 0; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.045em; }
.page-heading { margin-top: 8px; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.text-button { border: 0; color: var(--green); background: none; font-weight: 750; cursor: pointer; }

.button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 13px; font-weight: 750; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 9px 22px rgba(23,60,52,.18); }
.button-secondary { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.button-danger { color: #fff; background: var(--red); }

.toolbar { display: flex; align-items: center; gap: 14px; margin: 24px 0; }
.search-box-small { width: min(560px, 100%); min-height: 50px; margin: 0; border: 1px solid var(--line); box-shadow: none; }
.result-pill { white-space: nowrap; padding: 10px 14px; border-radius: 999px; color: var(--muted); background: var(--green-soft); font-size: 12px; }
.result-pill b { color: var(--green); }

.item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.item-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .18s ease, box-shadow .18s ease; }
.item-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.item-card[hidden] { display: none; }
.item-photo { position: relative; height: 190px; overflow: hidden; background: #e5e6df; }
.item-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(23,60,52,.24); background: linear-gradient(145deg, #e2e9e3, #f0eadf); font-family: Georgia, serif; font-size: 82px; font-style: italic; }
.category-chip { position: absolute; left: 13px; bottom: 13px; padding: 7px 10px; border-radius: 999px; color: #fff; background: rgba(23,32,29,.78); backdrop-filter: blur(8px); font-size: 10px; font-weight: 750; }
.item-body { padding: 17px; }
.item-title-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.item-title-row h3 { margin: 0; overflow: hidden; font-size: 16px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.more-button { padding: 0 2px; border: 0; color: #8a8f8b; background: transparent; letter-spacing: .06em; cursor: pointer; }
.location-line { margin-top: 13px; color: var(--muted); font-size: 12px; }
.location-line span { color: var(--orange); font-size: 15px; }
.location-line strong { color: var(--green); letter-spacing: .08em; }
.item-body > p { margin: 5px 0 0; color: #959996; font-size: 11px; }
.item-actions { display: flex; gap: 16px; padding-top: 15px; margin-top: 15px; border-top: 1px solid #ecece6; }
.item-actions button, .danger-link { padding: 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.item-actions .danger-link, .danger-link { color: var(--red); }

.storage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.storage-card { position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 23px; min-height: 170px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.storage-code { display: grid; align-content: center; justify-items: center; border-radius: 17px; color: var(--lime); background: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 23px; font-weight: 800; letter-spacing: .11em; }
.storage-code small { margin-bottom: 7px; color: rgba(255,255,255,.48); font-family: inherit; font-size: 8px; letter-spacing: .14em; }
.storage-info { display: grid; grid-template-columns: 62px 1fr; align-content: center; gap: 7px 8px; }
.storage-info span { color: var(--muted); font-size: 11px; }
.storage-info strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.card-menu { position: absolute; right: 18px; top: 14px; }

.category-list { display: grid; max-width: 760px; gap: 10px; }
.category-row { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 15px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.category-dot { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--green); background: var(--green-soft); font-family: Georgia, serif; font-weight: 700; }
.category-row strong, .category-row small { display: block; }
.category-row strong { font-size: 14px; }
.category-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.default-badge { padding: 6px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }

.empty-state { display: grid; max-width: 500px; justify-items: center; margin: 50px auto; padding: 32px; text-align: center; }
.empty-state.is-hidden { display: none; }
.empty-illustration { display: grid; width: 76px; height: 76px; place-items: center; border-radius: 25px 25px 25px 7px; color: var(--green); background: var(--green-soft); font-size: 37px; transform: rotate(-3deg); }
.empty-state h3 { margin: 20px 0 7px; font-size: 22px; }
.empty-state p { max-width: 380px; margin: 0 0 20px; color: var(--muted); line-height: 1.55; }

.toast { position: fixed; z-index: 80; top: 22px; right: 24px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 22px; align-items: center; gap: 10px; width: min(390px, calc(100% - 32px)); padding: 13px 15px; border: 1px solid #bdd2c6; border-radius: 15px; background: #f5fff8; box-shadow: var(--shadow); animation: toastIn .3s ease both; }
.toast > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 800; }
.toast p { margin: 0; font-size: 13px; line-height: 1.4; }
.toast button { border: 0; color: var(--muted); background: none; font-size: 20px; cursor: pointer; }
.toast-error { border-color: #efc5bd; background: #fff5f2; }
.toast-error > span { background: var(--red); }
.toast.is-leaving { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

dialog { color: var(--ink); }
.sheet-dialog, .confirm-dialog { width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 25px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.sheet-dialog::backdrop, .confirm-dialog::backdrop { background: rgba(15,29,25,.62); backdrop-filter: blur(3px); }
.sheet-dialog form { padding: 27px; }
.sheet-small { width: min(530px, calc(100% - 32px)); }
.dialog-handle { display: none; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.dialog-header h2 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.04em; }
.dialog-close { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 22px; cursor: pointer; }

.form-notice { margin-bottom: 18px; padding: 13px 15px; border-radius: 12px; color: #79501d; background: #fff0d7; font-size: 12px; line-height: 1.5; }
.form-notice strong { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }
.field-full { grid-column: 1 / -1; }
.field input, .field select { width: 100%; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: #fff; font-size: 14px; }
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,60,52,.09); }

.photo-uploader { position: relative; display: grid; min-height: 170px; place-items: center; overflow: hidden; margin-bottom: 20px; border: 1.5px dashed #b9c1ba; border-radius: 18px; background: #f7f8f3; cursor: pointer; }
.photo-uploader input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-placeholder { display: grid; justify-items: center; gap: 5px; padding: 22px; }
.photo-placeholder b { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 5px; border-radius: 50%; color: #fff; background: var(--green); font-size: 23px; }
.photo-placeholder strong { font-size: 13px; }
.photo-placeholder small { color: var(--muted); font-size: 10px; }
.photo-uploader img { display: none; width: 100%; height: 210px; object-fit: cover; }
.photo-uploader.has-photo img { display: block; }
.photo-uploader.has-photo .photo-placeholder { display: none; }
.photo-status { position: absolute; right: 10px; bottom: 10px; display: none; padding: 6px 9px; border-radius: 999px; color: #fff; background: rgba(23,60,52,.84); font-size: 9px; font-weight: 750; }
.photo-uploader.has-photo .photo-status { display: block; }

.auto-code-preview { display: grid; justify-items: center; margin-bottom: 20px; padding: 20px; border-radius: 18px; color: #fff; background: var(--green); }
.auto-code-preview span, .auto-code-preview small { color: rgba(255,255,255,.58); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; }
.auto-code-preview strong { margin: 7px 0; color: var(--lime); font-family: ui-monospace, monospace; font-size: 25px; letter-spacing: .2em; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 22px; }

.confirm-dialog { width: min(410px, calc(100% - 32px)); text-align: center; }
.confirm-dialog form { padding: 30px; }
.confirm-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto; border-radius: 50%; color: var(--red); background: #f9e1dc; font-size: 25px; font-weight: 900; }
.confirm-dialog h2 { margin: 17px 0 7px; font-size: 23px; }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.confirm-dialog .dialog-actions { justify-content: center; }

.auth-page { min-height: 100dvh; padding: 24px; color: var(--ink); background: #ebe9e1; }
.auth-shell { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); width: min(1080px, 100%); min-height: calc(100dvh - 48px); margin: 0 auto; overflow: hidden; border-radius: 30px; background: var(--surface); box-shadow: 0 30px 80px rgba(23,60,52,.15); }
.auth-brand-panel { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: 38px; color: #fff; background: var(--green); }
.auth-brand-panel::after { content: ""; position: absolute; right: -170px; bottom: -140px; width: 430px; height: 430px; border: 65px solid rgba(216,230,107,.09); border-radius: 50%; }
.auth-brand-copy { position: relative; z-index: 1; margin: auto 0; }
.auth-brand-copy .eyebrow { color: var(--lime); }
.auth-brand-copy h1 { margin: 15px 0; font-size: clamp(40px, 5vw, 62px); line-height: .98; letter-spacing: -.055em; }
.auth-brand-copy h1 em { color: var(--lime); font-family: Georgia, serif; font-weight: 500; }
.auth-brand-copy p { max-width: 390px; color: rgba(255,255,255,.62); font-size: 14px; line-height: 1.65; }
.auth-shelf { position: relative; z-index: 1; display: flex; align-items: end; gap: 11px; height: 68px; border-bottom: 8px solid rgba(255,255,255,.24); }
.auth-shelf span, .auth-shelf i, .auth-shelf b { display: block; border-radius: 5px 5px 0 0; }
.auth-shelf span { width: 76px; height: 44px; background: var(--lime); }
.auth-shelf i { width: 45px; height: 57px; background: rgba(255,255,255,.5); }
.auth-shelf b { width: 105px; height: 35px; background: var(--orange); }
.auth-form-panel { position: relative; display: grid; place-items: center; padding: 68px clamp(32px, 7vw, 92px); }
.auth-back { position: absolute; left: 34px; top: 30px; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.auth-form-wrap { width: min(390px, 100%); }
.auth-lock { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 25px; border-radius: 17px 17px 17px 5px; color: var(--green); background: var(--green-soft); font-family: Georgia, serif; font-size: 24px; font-weight: 800; }
.auth-form-wrap h2 { margin: 7px 0 8px; font-size: clamp(29px, 4vw, 39px); letter-spacing: -.05em; }
.auth-form-wrap > p { margin: 0 0 27px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-alert { display: flex; align-items: start; gap: 10px; margin-bottom: 17px; padding: 12px 14px; border: 1px solid #efc5bd; border-radius: 12px; color: #843b30; background: #fff5f2; font-size: 11px; line-height: 1.45; }
.auth-alert span { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-weight: 800; }
.auth-form { display: grid; gap: 17px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 67px; }
.password-field button { position: absolute; right: 12px; top: 50%; padding: 5px; border: 0; color: var(--green); background: transparent; font-size: 10px; font-weight: 800; transform: translateY(-50%); cursor: pointer; }
.auth-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; margin-top: 2px; padding: 0 18px; }
.auth-note { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.auth-note span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-weight: 800; }

@media (max-width: 1050px) {
    .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .storage-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 0 16px 35px; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; height: 70px; color: var(--green); }
    .mobile-header .brand-mark { width: 34px; height: 34px; font-size: 20px; }
    .icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--green); font-size: 22px; }

    .hero { min-height: 360px; padding: 32px 22px; border-radius: 25px; }
    .hero h1 { margin-top: 15px; font-size: clamp(38px, 12vw, 52px); }
    .hero > p { font-size: 13px; }
    .search-box { min-height: 54px; margin-top: 24px; }
    .search-box kbd { display: none; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-height: 112px; padding: 17px; }
    .stat-primary { grid-column: 1 / -1; }
    .stat-card strong { font-size: 29px; }
    .section-heading, .page-heading { align-items: start; margin-top: 29px; }
    .page-heading h1 { font-size: 34px; }
    .desktop-action { display: none; }
    .text-button { padding-top: 13px; font-size: 12px; }

    .item-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
    .item-photo { height: 145px; }
    .item-body { padding: 13px; }
    .item-title-row h3 { font-size: 14px; }
    .location-line { margin-top: 10px; font-size: 10px; }
    .item-body > p { font-size: 9px; }
    .item-actions { gap: 13px; padding-top: 11px; margin-top: 11px; }
    .home-items .item-card:nth-child(n+5) { display: none; }

    .storage-card { grid-template-columns: 110px 1fr; gap: 15px; min-height: 150px; padding: 14px; }
    .storage-code { font-size: 19px; }
    .storage-info { grid-template-columns: 54px 1fr; }
    .card-menu { right: 14px; top: 9px; }
    .toolbar { align-items: stretch; }
    .result-pill { display: grid; place-items: center; }

    .bottom-nav { position: fixed; z-index: 40; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); left: 12px; display: grid; grid-template-columns: repeat(4, 1fr); height: 66px; padding: 6px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; color: rgba(255,255,255,.62); background: rgba(23,60,52,.97); box-shadow: 0 16px 36px rgba(23,60,52,.3); backdrop-filter: blur(12px); }
    .bottom-nav button { display: grid; place-items: center; align-content: center; gap: 2px; border: 0; border-radius: 15px; color: inherit; background: transparent; }
    .bottom-nav button span { font-size: 20px; }
    .bottom-nav button small { font-size: 9px; }
    .bottom-nav button.is-active { color: var(--lime); background: rgba(255,255,255,.08); }

    .floating-add { position: fixed; z-index: 35; right: 20px; bottom: calc(88px + env(safe-area-inset-bottom)); display: grid; width: 54px; height: 54px; place-items: center; border: 0; border-radius: 18px 18px 18px 5px; color: var(--green); background: var(--lime); box-shadow: 0 12px 30px rgba(23,60,52,.28); font-size: 27px; font-weight: 600; }
    [data-view="home"].is-active ~ .floating-add { display: grid; }

    .toast { top: 12px; right: 16px; }
    .sheet-dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
    .sheet-dialog form { padding: 12px 19px calc(20px + env(safe-area-inset-bottom)); }
    .dialog-handle { display: block; width: 42px; height: 4px; margin: 0 auto 19px; border-radius: 99px; background: #d5d6d0; }
    .dialog-header { margin-bottom: 18px; }
    .dialog-header h2 { font-size: 24px; }
    .form-grid { gap: 13px; }
    .photo-uploader { min-height: 145px; }

    .auth-page { padding: 0; background: var(--surface); }
    .auth-shell { display: block; min-height: 100dvh; border-radius: 0; box-shadow: none; }
    .auth-brand-panel { min-height: 230px; padding: 28px 24px; }
    .auth-brand-copy { margin: 34px 0 0; }
    .auth-brand-copy h1 { margin: 10px 0; font-size: 38px; }
    .auth-brand-copy p { max-width: 310px; margin-bottom: 0; font-size: 12px; }
    .auth-shelf { display: none; }
    .auth-form-panel { display: block; padding: 52px 24px 38px; }
    .auth-back { left: 24px; top: 19px; }
    .auth-lock { width: 45px; height: 45px; margin-bottom: 18px; }
    .auth-form-wrap { margin: 0 auto; }
}

@media (max-width: 390px) {
    .item-grid { grid-template-columns: 1fr; }
    .item-photo { height: 205px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
