@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');


/* FILM LOG — CSS Design System */
:root {
  --color-bg: #0e1c26;
  --color-surface: #11161b;
  --color-surface-raised: #171d23;
  --color-surface-soft: #202830;
  --color-border: #303a43;
  --color-border-strong: #505c65;
  --color-danger: #e26868;
  --color-text: #f2f4f2;
  --color-text-muted: #98a2a8;
  --color-text-faint: #68747c;
  --color-shelf: #6ca7ff;
  --color-loaded: #f2994a;
  --color-queue: #ae82eb;
  --color-developing: #e5b95d;
  --color-finished: #64ca89;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-float: 0 16px 40px rgb(0 0 0 / 48%);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --duration-fast: 160ms;
  --duration-base: 220ms;
  --duration-sheet: 280ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { width: 100%; min-width: 0; height: 100%; min-height: 100%; margin: 0; overflow-x: clip; overflow-y: hidden; background: #0e1c26; }
body { width: 100%; min-width: 0; height: 100%; min-height: 100%; margin: 0; overflow-x: clip; overflow-y: hidden; background: #0e1c26; color: var(--color-text); }
html { scrollbar-width: none; }
html { scrollbar-color: #0e1c26 #0e1c26; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; background: #0e1c26; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: #0e1c26; }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background: #0e1c26; }
body { position: relative; font: 14px/1.4 Inter, system-ui, sans-serif; }
body::before, body::after { display: none; }
button, input, textarea, select { font: inherit; }
button { appearance: none; -webkit-appearance: none; border: 0; color: inherit; background: transparent; cursor: pointer; }
button:active { transform: scale(.97); }

/* App shell */
.page-background { position: fixed; z-index: 0; inset: 0; pointer-events: none; background-color: #0e1c26; background-image: radial-gradient(ellipse 80% 70% at 0% 0%, rgb(85 124 147 / 20%) 0%, transparent 70%), radial-gradient(ellipse 80% 70% at 100% 100%, rgb(42 69 75 / 25%) 0%, transparent 70%); background-repeat: no-repeat; background-size: cover; }
#fab-root { position: fixed; z-index: 7; inset: 0; pointer-events: none; }
#fab-root .fab { pointer-events: auto; }
#selection-root { position: fixed; z-index: 8; inset: 0; pointer-events: none; }
#selection-root .selection-bar { pointer-events: auto; }
#app-shell { position: relative; z-index: 1; width: min(100%, 760px); max-width: 760px; height: 100%; min-width: 0; margin: 0 auto; padding: 22px 0 calc(104px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
#app-shell::-webkit-scrollbar { display: none; width: 0; height: 0; }
.route-enter { animation: screen-enter 240ms var(--ease-out) both; }
@keyframes screen-enter { from { opacity: .2; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding: 0 18px; }
.brand { color: #aeb7bc; font: 700 12px/1 Inter, sans-serif; letter-spacing: .18em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.count-pill { border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 7px 10px; color: #cbd1d4; background: transparent; font-size: 12px; cursor: pointer; transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease; }
.count-pill:hover { color: #fff; border-color: #fff; }
.icon-btn { position: relative; display: block; width: 36px; height: 36px; border: 0; border-radius: 0; background: transparent; font-size: 0; }
.icon-btn::before { position: absolute; top: 50%; left: 50%; width: 22px; height: 3px; border-radius: 999px; background: var(--color-text); box-shadow: 0 7px 0 var(--color-text), 0 -7px 0 var(--color-text); content: ''; transform: translate(-50%, -50%); }
.side-menu-backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / 44%); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.side-menu-backdrop.open { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; display: flex; width: min(360px, 92%); flex-direction: column; border-left: 1px solid var(--color-border-strong); background: var(--color-surface); box-shadow: none; transform: translateX(calc(100% + 24px)); transition: transform 280ms var(--ease-sheet), box-shadow 220ms ease; }
.side-menu.open { transform: translateX(0); box-shadow: -20px 0 60px rgb(0 0 0 / 42%); }
.side-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 18px 18px; }
.side-menu-head strong { color: #aeb7bc; font-size: 12px; letter-spacing: .18em; }
.side-menu-body { flex: 1; overflow-y: auto; padding: 4px 18px; }
.side-menu-item { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border); background: transparent; color: var(--color-text); text-align: left; }
.side-menu-chevron { color: var(--color-text-muted); transition: transform 220ms var(--ease-out); }
.side-menu-item.active .side-menu-chevron { transform: rotate(180deg); }
.settings-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 260ms var(--ease-out), opacity 180ms ease; }
.settings-panel::before { min-height: 0; content: ''; }
.settings-panel.open { grid-template-rows: 1fr; min-height: 96px; opacity: 1; }
.settings-subitem { padding-left: 12px; color: var(--color-text-muted); }
.settings-subitem.active { color: var(--color-text); }
.sort-options { display: grid; grid-template-rows: 0fr; padding-left: 12px; opacity: 0; transition: grid-template-rows 240ms var(--ease-out), opacity 180ms ease; }
.sort-options.open { grid-template-rows: 1fr; opacity: 1; }
.sort-options::before { min-height: 0; content: ''; }
.sort-option { display: flex; min-height: 42px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgb(80 92 101 / 45%); color: var(--color-text-muted); text-align: left; }
.sort-option.active { color: var(--color-text); }
.sort-option i { width: 16px; height: 16px; border: 1px solid #68747c; border-radius: 50%; }
.sort-option.active i { border-color: var(--color-shelf); background: var(--color-shelf); box-shadow: inset 0 0 0 4px var(--color-surface); }
.side-menu-about { padding: 0 18px 28px; }
.side-menu-divider { height: 1px; margin-bottom: 18px; background: linear-gradient(90deg, transparent, var(--color-border-strong) 18%, var(--color-border-strong) 82%, transparent); }
.side-menu-about h2 { margin: 0 0 10px; color: var(--color-text-muted); font-size: 13px; font-weight: 500; }
.side-menu-link { display: flex; min-height: 46px; align-items: center; justify-content: space-between; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0 14px; background: var(--color-surface-raised); color: var(--color-text); text-decoration: none; }
.side-menu-link:hover { border-color: var(--color-border-strong); background: var(--color-surface-soft); }

/* Main collection header */
.hero-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 0 18px; }
.film-menu-title { margin-bottom: 12px; }
.collection-title { position: relative; top: -10px; margin: 0; padding: 0; color: var(--color-text); background: transparent; font: 800 34px/1 Inter, sans-serif; letter-spacing: -.04em; }
.collection-title:hover { color: #fff; }

/* Full-bleed horizontal tabs */
.tabs { display: flex; box-sizing: border-box; width: 100%; max-width: 100%; margin: 0; padding: 0 16px; gap: 16px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid #252a31; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; overscroll-behavior-y: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex: 0 0 auto; min-width: max-content; padding: 0 4px 11px; border: 0; background: transparent; color: var(--color-text-faint); font-size: 14px; font-weight: 500; text-align: center; white-space: nowrap; transition: color var(--duration-fast) ease, font-size 240ms var(--ease-out), font-weight 240ms ease; }
.tabs button:hover { color: var(--color-text-muted); }
.tabs button.active { color: var(--color-text); }
.tabs button::after { display: none; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 999px; background: currentColor; content: ''; }
.tabs button.active::after { display: block; }
.tabs.tab-has-selection button.active { font-size: calc(1em + 1px); font-weight: 700; transform: scale(1.01); transform-origin: center bottom; animation: tab-select-pop 420ms cubic-bezier(.2,.9,.25,1.2) both; }
.tabs.tab-has-selection button { transition: color var(--duration-fast) ease, font-size 240ms var(--ease-out), font-weight 240ms ease, transform 240ms var(--ease-out); }
@keyframes tab-select-pop { 0% { transform: scale(.86); } 55% { transform: scale(1.08); } 100% { transform: scale(1.01); } }
.tabs .tab-shelf.active, .tabs .tab-shelf:hover { color: var(--color-shelf); }
.tabs .tab-loaded.active, .tabs .tab-loaded:hover { color: var(--color-loaded); }
.tabs .tab-queue.active, .tabs .tab-queue:hover { color: var(--color-queue); }
.tabs .tab-developing.active, .tabs .tab-developing:hover { color: var(--color-developing); }
.tabs .tab-finished.active, .tabs .tab-finished:hover { color: var(--color-finished); }

/* Film list and cards */
.film-list { width: 100%; min-width: 0; margin-top: 4px; padding: 0 18px; }
.film-card { position: relative; display: grid; width: 100%; min-width: 0; grid-template-columns: 28px minmax(0, 1fr) 44px; gap: 12px; align-items: start; padding: 18px 0; }
.film-card::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--color-border) 18%, var(--color-border) 82%, transparent); content: ''; }
.film-main { min-width: 0; overflow: hidden; }
.film-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.film-title { min-width: 0; color: var(--color-text); font-size: 15px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.select-dot { display: grid; width: 22px; height: 22px; margin: 2px auto 0; place-items: center; border: 1.5px solid #6b747a; border-radius: 50%; background: transparent; color: #0c0e11; font-size: 0; line-height: 1; }
.select-dot.selected { border-color: var(--color-text); background: var(--color-text); }
.select-dot:focus-visible { outline: 2px solid var(--color-shelf); outline-offset: 3px; }
.status { border: 1px solid currentColor; border-radius: 7px; padding: 5px 9px; font-size: 10px; white-space: nowrap; }
.status.shelf { color: var(--color-shelf); }
.status.loaded { color: var(--color-loaded); }
.status.queue { color: var(--color-queue); }
.status.developing { color: var(--color-developing); }
.status.finished { color: var(--color-finished); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; color: #a2aaaf; font-size: 12px; }
.meta .format { color: var(--color-loaded); font: 500 13px/1 Inter, sans-serif; }
.meta .sep { color: #4d555a; }
.film-secondary { gap: 8px; }
.card-exposure, .card-year { display: inline-flex; align-items: center; gap: 5px; border: 1px solid currentColor; border-radius: 7px; padding: 4px 8px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.card-push { border-color: #328e9b; background: #102d35; color: #5bdce5; }
.card-pull { border-color: #7655a2; background: #2b2040; color: #d1b4ff; }
.card-year { border-color: #59676e; background: #20292e; color: #c8d0d3; }
.exposure-icon { color: #f4c95f; font-size: 13px; }
.year-icon { color: #aebbc0; font-size: 12px; }
.dots { display: grid; width: 44px; height: 44px; margin-top: -5px; place-items: center; border: 0; background: transparent; color: #6e7a82; font-size: 0; }
.dots::before { content: '•••'; font-size: 10px; letter-spacing: 2px; }
.empty { padding: 60px 0; color: var(--color-text-muted); text-align: center; }

/* Floating actions and navigation */
.fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 4; display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; background: #f3f4f1; color: #0b0d0f; font-size: 30px; box-shadow: var(--shadow-float); }
.bottom-nav { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); left: max(14px, env(safe-area-inset-left)); z-index: 5; display: flex; width: auto; max-width: 400px; height: 64px; margin: auto; align-items: center; justify-content: space-around; border: 1px solid #384149; border-radius: 23px; background: rgb(23 28 33 / 94%); box-shadow: var(--shadow-float); backdrop-filter: blur(18px); }
.nav-item { display: flex; min-width: 72px; flex-direction: column; align-items: center; gap: 4px; border: 0; background: transparent; color: #727d83; transition: color var(--duration-fast) ease; }
.nav-icon { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; transition: transform var(--duration-base) var(--ease-out), color var(--duration-fast) ease; }
.nav-item:hover .nav-icon { transform: translateY(-1px); }
.nav-item small { font-size: 10px; }
.nav-item.active { color: #fff; }
.add-nav { display: none; }
.gear-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gear-heading h2 { margin: 0; font-size: 18px; }
.gear-heading button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-raised); color: var(--color-text); font-size: 20px; }
.gear-grid { display: grid; gap: 10px; min-width: 0; padding: 2px 1px 8px; }
.gear-columns { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 0 18px; }
.gear-columns::before { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(180deg, transparent, var(--color-border) 14%, var(--color-border) 86%, transparent); content: ''; transform: translateX(-50%); }
.gear-columns .gear-section + .gear-section { margin-top: 0; }
.gear-columns .gear-section + .gear-section::before { display: none; }
.gear-card { display: flex; width: 100%; min-width: 0; height: 142px; flex-direction: column; align-items: flex-start; justify-content: space-between; border: 1px solid #334654; border-radius: 16px; padding: 16px; background: #17232c; color: var(--color-text); text-align: left; touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.gear-card-bottom { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.gear-card-edit { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #765d42; border-radius: 10px; background: #3b3025; color: #e3a563; }
.gear-card-edit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.gear-card-edit:active { transform: scale(.94); }
.gear-card-copy { width: 100%; min-width: 0; overflow: hidden; }
.gear-card strong { display: block; max-width: 100%; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.gear-card-copy > span { display: block; max-width: 100%; margin-top: 5px; overflow: hidden; color: var(--color-text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gear-card-icon, .gear-info-main-icon { display: none; }
.gear-card-more { display: grid; width: 36px; height: 36px; align-self: flex-end; place-items: center; color: var(--color-text-muted); font-size: 16px; letter-spacing: 2px; }
.gear-action-menu { position: fixed; z-index: 30; min-width: 170px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 5px; background: var(--color-surface-raised); box-shadow: var(--shadow-float); }
.gear-action-menu button { display: block; width: 100%; padding: 11px 12px; border-radius: 8px; color: var(--color-text); text-align: left; }
.gear-action-menu button:hover { background: var(--color-surface-soft); }
.gear-action-menu button[data-action="delete"] { color: var(--color-danger); }
.gear-svg-icon { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.gear-empty { min-width: 100%; padding: 28px 0; color: var(--color-text-muted); font-size: 13px; }
.gear-header { margin: 0 0 22px; padding: 0 18px; }
.gear-header h1 { position: relative; top: -10px; margin: 0; padding: 0; color: var(--color-text); background: transparent; font: 800 34px/1 Inter, sans-serif; letter-spacing: -.04em; }
.gear-header-labels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 9px; color: var(--color-text-muted); font-size: 13px; font-weight: 800; }
.gear-header-labels span:last-child { text-align: left; }
.gear-header-rule { height: 1px; margin-top: 13px; background: linear-gradient(90deg, var(--color-border-strong), var(--color-border), transparent); }
.gear-heading h2[aria-hidden="true"] { visibility: hidden; }
.gear-section + .gear-section { position: relative; margin-top: 42px; }
.gear-section + .gear-section::before { position: absolute; top: -22px; right: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent 0%, var(--color-border) 18%, var(--color-border) 82%, transparent 100%); content: ''; }
.section-title small { color: var(--color-text-muted); font-size: 11px; font-weight: 400; }
.compat-list { margin-top: 10px; }
.compat-row { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border); background: transparent; color: var(--color-text); text-align: left; }
.compat-row i { width: 20px; height: 20px; border: 1px solid #66737b; border-radius: 50%; background: transparent; }
.compat-row.active i { border-color: var(--color-shelf); background: var(--color-shelf); box-shadow: inset 0 0 0 5px var(--color-surface); }
.segment-row { position: relative; display: flex; width: 100%; gap: 4px; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 4px; background: var(--color-surface-raised); isolation: isolate; }
.segment-row::before { position: absolute; top: 4px; bottom: 4px; left: 4px; z-index: -1; width: calc((100% - 12px) / 2); border: 1px solid var(--color-border-strong); border-radius: 9px; background: var(--color-surface-soft); content: ''; transform: translateX(0); transition: transform 260ms var(--ease-out); }
.segment-row:has(.segment:nth-child(2).active)::before { transform: translateX(calc(100% + 4px)); }
.segment { position: relative; z-index: 1; flex: 1 1 0; min-height: 42px; border-radius: 9px; background: transparent; color: var(--color-text-muted); transition: color 180ms ease, transform 180ms var(--ease-out); }
.segment.active { background: transparent; color: var(--color-text); }
.segment:active { transform: scale(.97); }
.focal-pair { display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.focal-pair.open { display: grid; }
.focal-single-wrap { position: relative; display: flex; align-items: center; }
.focal-single-wrap.hidden { display: none; }
.focal-single-wrap > span, .unit-input > span { position: absolute; top: 50%; right: 14px; color: var(--color-text-muted); pointer-events: none; transform: translateY(-50%); }
.focal-single { padding-right: 42px; text-align: left; }
.unit-input { position: relative; }
.unit-input .input { padding-right: 40px; text-align: left; }
.aperture-block { margin-top: 4px; }

/* Gear info sheet */
.gear-info-sheet { height: auto; max-height: 82vh; }
.gear-info-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.gear-info-kicker { color: var(--color-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gear-info-head h1 { margin: 6px 0 0; color: var(--color-text); font-size: 25px; line-height: 1.08; overflow-wrap: anywhere; }
.gear-info-main-icon, .gear-card-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; color: #e3a563; }
.gear-info-main-icon svg, .gear-card-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.gear-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-border); }
.gear-info-row { min-height: 72px; padding: 13px; background: var(--color-surface); }
.gear-info-row span { display: block; color: var(--color-text-muted); font-size: 11px; }
.gear-info-row strong { display: block; margin-top: 8px; color: var(--color-text); font-size: 16px; overflow-wrap: anywhere; }
.gear-info-related { margin-top: 18px; }
.gear-info-related h3 { margin: 0 0 9px; color: var(--color-text-muted); font-size: 12px; }
.gear-info-related > div { display: flex; flex-wrap: wrap; gap: 7px; }
.gear-info-related span { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; background: var(--color-surface-raised); color: var(--color-text); font-size: 12px; }

.modal { position: fixed; inset: 0; z-index: 10; display: grid; align-items: end; overflow: hidden; background: transparent; opacity: 1; backdrop-filter: none; touch-action: auto; overscroll-behavior: none; }
.modal.is-opening { animation: backdrop-in 220ms ease-out both; }
.modal.is-closing { pointer-events: none; animation: backdrop-out 180ms ease-in both; }
.sheet { width: 100%; max-width: 760px; height: 70vh; max-height: 82vh; margin: 0 auto; padding: 20px 18px 28px; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--color-border-strong); border-bottom: 0; border-radius: 24px 24px 0 0; background: var(--color-surface); box-shadow: 0 -18px 60px rgb(0 0 0 / 60%); touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal.is-opening .sheet { animation: sheet-in var(--duration-sheet) var(--ease-sheet) both; }
.modal.is-closing .sheet { animation: sheet-out 180ms ease-in both; }
.sheet-open .selection-bar { display: none; }
.sheet-handle { width: 40px; height: 4px; margin: 0 auto 20px; border-radius: 4px; background: #697278; }
.form-head { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; }
.form-head h1 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.back { width: 38px; height: 38px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-raised); font-size: 20px; }
.form-grid { display: grid; gap: 12px; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; outline: none; background: var(--color-surface); color: var(--color-text); }
.input:focus, .textarea:focus, .select:focus { border-color: #9ba9b0; }
.textarea { min-height: 80px; resize: vertical; }
.field-label { margin: 8px 0 5px; color: #879197; font-size: 11px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.camera-picker { display: flex; min-width: 0; align-items: center; gap: 12px; }
.camera-picker .field-label { margin: 0; white-space: nowrap; }
.camera-picker .chips { margin: 0; }
.camera-list { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.chips { display: flex; min-width: 0; gap: 8px; margin-top: 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.camera-list-scroll .chips { scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
.camera-list-scroll .chips::-webkit-scrollbar { display: block; height: 7px; }
.camera-list-scroll .chips::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--color-border-strong); }
.film-name-field { position: relative; z-index: 8; }
.suggestions { position: absolute; right: 0; bottom: calc(100% + 8px); left: 0; z-index: 20; display: none; height: 76px; max-height: 76px; flex-direction: row; gap: 7px; margin: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 8px; background: var(--color-surface-raised); box-shadow: 0 -16px 40px rgb(0 0 0 / 42%); scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.suggestions:not(:empty) { display: flex; }
.suggestions::-webkit-scrollbar { height: 7px; }
.suggestions::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--color-border-strong); }
.suggestion { flex: 0 0 230px; min-width: 230px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 12px; background: var(--color-surface); color: var(--color-text-muted); text-align: left; text-overflow: ellipsis; white-space: nowrap; }

.suggestion:hover, .suggestion:focus-visible { border-color: var(--color-border-strong); background: var(--color-surface-soft); color: var(--color-text); }
.chip { flex: 0 0 auto; border: 1px solid #424c53; border-radius: 9px; padding: 9px 12px; background: #232a30; color: #b9c0c3; white-space: nowrap; }
.chip.active { border-color: #aeb8bf; background: #2b343b; color: var(--color-text); }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.status-btn { min-height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 11px 8px; background: var(--color-surface-raised); color: var(--color-text-muted); font-size: 12px; line-height: 1.2; transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease, color var(--duration-fast) ease; }
.status-btn[data-status="shelf"] { color: var(--color-shelf); }
.status-btn[data-status="loaded"] { color: var(--color-loaded); }
.status-btn[data-status="queue"] { color: var(--color-queue); }
.status-btn[data-status="developing"] { color: var(--color-developing); }
.status-btn[data-status="finished"] { color: var(--color-finished); }
.status-btn.active { border-color: currentColor; background: color-mix(in srgb, currentColor 18%, var(--color-surface-raised)); }
.format-picker { position: relative; display: flex; width: 100%; min-width: 100%; gap: 4px; overflow: hidden; border: 1px solid #34424c; border-radius: var(--radius-md); padding: 4px; background: #1b242c; isolation: isolate; }
.format-picker::before { position: absolute; top: 4px; bottom: 4px; left: 4px; z-index: -1; width: calc((100% - 12px) / 2); border: 1px solid #aeb8bf; border-radius: 10px; background: #2b343b; content: ''; transform: translateX(0); transition: transform 260ms var(--ease-out); }
.format-picker:has(.format-chip:nth-child(2).active)::before { transform: translateX(calc(100% + 4px)); }
.format-chip { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; width: 50%; border: 0; border-radius: 10px; padding: 13px 8px; background: transparent; color: #cbd2d5; text-align: center; transition: color 180ms ease, transform 180ms var(--ease-out); }
.format-chip.active { background: transparent; color: var(--color-text); }
.format-chip:active { transform: scale(.97); }
.lens-params .segment-row { margin-top: 6px; }
.lens-params .field-label { margin-top: 18px; }
.lens-params .focal-single-wrap, .lens-params .focal-pair { margin-top: 8px; }
.lens-params .aperture-heading { margin-top: 22px; color: var(--color-text-muted); font-size: 13px; }
.lens-params .aperture-block .field-label { margin-top: 8px; }
.section-box { margin-top: 22px; border: 1px solid var(--color-border); border-radius: 15px; padding: 14px; background: var(--color-surface); }
.section-title { display: flex; width: 100%; justify-content: space-between; border: 0; padding: 0; background: transparent; color: #fff; font-weight: 700; text-align: left; }
.shooting-settings { display: none; }
.shooting-settings.open { display: block; }
.exposure-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; border: 1px solid #21465b; border-radius: 14px; padding: 14px; background: #0d1822; }
.exposure-summary strong { display: block; margin-top: 7px; color: #54e1ec; font-size: 23px; }
.exposure-summary span { color: #a8b7bc; font-size: 12px; }
.note-action { border: 1px solid #45dce5; border-radius: 12px; padding: 11px; background: #102431; color: #51e0e8; white-space: nowrap; }
.process-row { display: flex; justify-content: space-between; margin: 18px 0 10px; color: #aab3b7; }
.push-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.push-btn, .expiry-btn { border: 1px solid #2d5870; border-radius: 10px; padding: 11px 4px; background: #141e29; color: #d4dbdd; }
.push-btn.active { border-color: #47dce6; background: #47dce6; color: #071115; }
.expiry-input { width: 100%; }
.primary { width: 100%; margin-top: 22px; border: 1px solid #aeb8bf; border-radius: 13px; padding: 15px 18px; background: var(--color-surface-soft); color: var(--color-text); font-weight: 800; }
.primary:hover { background: #303b44; }
.danger-action { width: 100%; margin-top: 10px; border: 1px solid var(--color-danger); border-radius: 13px; padding: 14px 18px; background: transparent; color: var(--color-danger); font-weight: 700; }
.danger-action:hover { background: rgb(226 104 104 / 10%); }
.close { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-raised); color: var(--color-text); font-size: 20px; }

/* Selection bar */
.selection-bar { position: fixed; right: 14px; bottom: 91px; left: 14px; z-index: 8; display: flex; min-height: 112px; max-height: 112px; flex-direction: column; gap: 6px; align-items: stretch; border: 1px solid var(--color-border-strong); border-radius: 17px; padding: 8px 14px; background: rgb(23 28 33 / 96%); box-shadow: var(--shadow-float); backdrop-filter: blur(18px); }
.selection-head { position: relative; display: flex; height: 36px; flex: 0 0 36px; align-items: center; justify-content: center; gap: 8px; }
.selection-label { color: #d8dcdd; font-size: 12px; }
.selection-count { color: #fff; font-size: 14px; }
.selection-back, .selection-delete { position: absolute; top: 50%; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; background: transparent; line-height: 1; transform: translateY(-50%); }
.selection-back { left: 0; color: var(--color-text-muted); font-size: 21px; }
.selection-delete { right: 0; color: var(--color-danger); font-size: 22px; }
.selection-actions { display: flex; height: 44px; min-height: 44px; flex: 0 0 44px; align-items: center; gap: 7px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior-x: contain; }
.selection-actions .status-btn { flex: 0 0 auto; padding: 9px 12px; white-space: nowrap; }

#auth-error { margin: 10px 15px 0; border: 1px solid rgb(226 104 104 / 50%); border-radius: 10px; padding: 10px 12px; background: rgb(226 104 104 / 12%); color: #ffb2b2; font-size: 12px; text-align: center; }

/* Screenshot-matched Gear info cards */
.gear-info-modal { align-items: end; padding: 0; background: transparent; }
.gear-info-modal .gear-info-sheet { position: relative; width: 100%; max-width: 760px; min-height: 0; height: 60vh; max-height: 60vh; margin: 0 auto; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--color-border-strong); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 20px 18px 28px; background: var(--color-surface); box-shadow: 0 -18px 60px rgb(0 0 0 / 60%); }
.gear-info-title-row { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.gear-info-title-row h1 { margin: 0; color: var(--color-text); font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; text-transform: none; }
.gear-info-status-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--color-text-muted); }
.gear-info-title-row .gear-info-main-icon { position: absolute; top: 48px; right: 58px; width: 64px; height: 64px; color: #66666b; }
.gear-info-title-row .gear-info-main-icon svg { width: 64px; height: 64px; }
.gear-info-content { display: grid; gap: 16px; margin-top: 20px; color: var(--color-text-muted); font-size: 14px; }
.gear-info-line { display: flex; align-items: stretch; gap: 16px; min-height: 42px; }
.gear-info-line > div { min-width: 0; flex: 1 1 0; }
.gear-info-line > div:first-child { flex-basis: 0; }
.gear-info-divider { width: 1px; flex: 0 0 1px; background: #414146; }
.gear-info-stat > span { display: block; color: var(--color-text-muted); font-size: 12px; font-weight: 500; line-height: 1; }
.gear-info-stat > div { display: flex; align-items: center; gap: 8px; margin-top: 7px; white-space: nowrap; }
.gear-info-stat strong { color: var(--color-text); font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.gear-info-stat small { display: block; max-width: 100%; margin-top: 5px; overflow: hidden; color: #77777e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gear-info-divider-line { height: 1px; margin: 24px 0 18px; background: var(--color-border); }
.gear-info-edit { position: relative; right: auto; bottom: auto; z-index: 2; display: grid; width: 42px; height: 42px; margin: 0 -16px 0 auto; place-items: center; border: 1px solid var(--color-border-strong); border-radius: 11px; background: var(--color-surface-raised); color: var(--color-text); }
.gear-info-edit svg, .gear-card-edit svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.gear-info-edit:active { transform: scale(.95); }
@media (max-width: 600px) { .gear-info-modal { padding: 0; } .gear-info-modal .gear-info-sheet { height: 60vh; max-height: 60vh; border-radius: 24px 24px 0 0; padding: 20px 18px 28px; } .gear-info-title-row { gap: 10px; } .gear-info-title-row h1 { max-width: calc(100% - 40px); font-size: 22px; } .gear-info-status-dot { width: 8px; height: 8px; flex-basis: 8px; } .gear-info-title-row .gear-info-main-icon { display: none; } .gear-info-content { margin-top: 18px; font-size: 14px; } .gear-info-line { gap: 12px; } .gear-info-stat > div { gap: 6px; } .gear-info-edit { right: auto; bottom: auto; width: 42px; height: 42px; border-width: 1px; } .gear-info-edit svg { width: 22px; height: 22px; } }

@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheet-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(24px); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .route-enter { animation-name: screen-fade; } @keyframes screen-fade { from { opacity: .65; } to { opacity: 1; } } }

/* Phone geometry */
@media (max-width: 480px) { #app-shell { padding-right: 0; padding-left: 0; } .topbar, .hero-row { padding-right: 15px; padding-left: 15px; } .film-list { padding-right: 15px; padding-left: 15px; } .route-enter { animation-duration: 280ms; } @keyframes screen-enter { from { opacity: .15; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } } .two-col { gap: 8px; } .camera-picker { align-items: flex-start; flex-wrap: wrap; } .camera-picker .chips { width: 100%; } .status-grid { grid-template-columns: repeat(2, 1fr); } .tabs { width: 100%; margin: 0; padding-right: 16px; padding-left: 16px; } .tabs button { font-size: 12px; font-weight: 500; padding-right: 2px; padding-bottom: 9px; padding-left: 2px; } }
@media (max-width: 480px) { .gear-header { padding-right: 15px; padding-left: 15px; } .gear-columns { grid-template-columns: 1fr 1fr; gap: 12px; padding-right: 15px; padding-left: 15px; } .gear-columns::before { left: 50%; } .gear-card { height: 132px; padding: 12px; } .gear-card strong { font-size: 14px; } }
