:root {
  --background: #f3f0e9;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --text: #1c1c1e;
  --muted: #77746f;
  --faint: #aaa69e;
  --border: #e5e0d7;
  --accent: #1f7058;
  --accent-dark: #195b49;
  --accent-soft: #e5f0eb;
  --blue-soft: #e8eef4;
  --shadow: 0 18px 55px rgba(56, 48, 34, .08);
  --radius-xl: 30px;
  --radius-lg: 23px;
  --radius-md: 17px;
  --ease: cubic-bezier(.2,.75,.25,1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--background); }
body { min-height: 100vh; margin: 0; overflow-x:hidden; background: radial-gradient(circle at 50% -15%, #fffdf8 0, var(--background) 48%); }
.auth-loading .app-shell { visibility:hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(31,112,88,.22); outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { width: 100%; max-width: 560px; min-height: 100vh; margin: 0 auto; position: relative; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) 22px 0; }
.wordmark { border: 0; background: none; padding: 10px; margin-left: -10px; font-weight: 750; font-size: 22px; letter-spacing: -.8px; cursor: pointer; }
.wordmark span { color: var(--accent); }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: rgba(255,255,255,.65); display: grid; place-items: center; cursor: pointer; transition: .2s var(--ease); }
.icon-button:hover { background: #fff; transform: translateY(-1px); }
.icon-button svg { width: 20px; }
.back-button { position: absolute; left: 20px; z-index: 2; }
.back-button + .wordmark { transition: opacity .2s; }
.topbar:has(.back-button:not([hidden])) .wordmark { opacity: 0; pointer-events: none; }
.settings-button { border-color: transparent; background: transparent; color: var(--muted); }

main { position: relative; }
.screen { display: none; padding: 46px 24px calc(36px + env(safe-area-inset-bottom)); animation: enter .42s var(--ease) both; }
.screen.is-active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
h1, h2, p { margin: 0; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 720; text-transform: uppercase; letter-spacing: 1.25px; }
.hero-copy h1, .screen-intro h1, .empty-copy h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.7px; font-weight: 680; }

.home-screen { padding-top: 42px; }
.auth-screen { padding-top:42px; }
.auth-copy p { margin-top:14px; color:var(--muted); font-size:16px; line-height:1.45; }
.auth-copy h1 { font-size:32px; line-height:1.15; letter-spacing:-.8px; }
.auth-form { display:grid; gap:14px; margin-top:42px; }
.auth-field { display:grid; gap:7px; color:var(--muted); font-size:12px; font-weight:650; }
.auth-field input { width:100%; height:58px; padding:0 16px; border:1px solid var(--border); border-radius:17px; outline:0; background:var(--surface-strong); color:var(--text); font-size:16px; font-weight:450; }
.auth-field input:focus { border-color:rgba(31,112,88,.5); box-shadow:0 0 0 3px rgba(31,112,88,.1); }
.auth-error { padding:12px 14px; border:1px solid #ead7d1; border-radius:13px; background:#fff9f7; color:#8f4539; font-size:13px; line-height:1.4; }
.auth-form .primary-button { margin-top:4px; }
.auth-switch { width:100%; min-height:48px; margin-top:8px; border:0; background:transparent; color:var(--muted); font-size:14px; font-weight:650; cursor:pointer; }
.account-screen { padding-top:42px; }
.account-card { padding:20px; border:1px solid var(--border); border-radius:var(--radius-lg); background:rgba(255,255,255,.78); }
.account-card small, .account-card strong { display:block; }
.account-card small { color:var(--muted); font-size:12px; }
.account-card strong { margin-top:8px; overflow-wrap:anywhere; font-size:17px; }
.account-logout { margin-top:14px; }
.admin-panel { margin-top:36px; }
.admin-heading h2 { font-size:22px; letter-spacing:-.4px; }
.admin-heading p { margin-top:7px; color:var(--muted); font-size:14px; }
.admin-create-form { display:grid; gap:12px; margin-top:20px; padding:18px; border:1px solid var(--border); border-radius:var(--radius-lg); background:rgba(255,255,255,.78); }
.admin-create-form .auth-field input { height:52px; border-radius:15px; }
.admin-create-button { min-height:52px; border-radius:16px; font-size:15px; box-shadow:none; }
.admin-user-list { display:grid; gap:10px; margin-top:22px; }
.admin-user-list.is-loading { color:var(--muted); font-size:14px; }
.admin-user-card { padding:16px; border:1px solid var(--border); border-radius:18px; background:rgba(255,255,255,.78); }
.admin-user-card.is-inactive { background:rgba(255,255,255,.45); }
.admin-user-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.admin-user-header strong, .admin-user-header small { display:block; }
.admin-user-header strong { overflow-wrap:anywhere; font-size:16px; }
.admin-user-header small { margin-top:4px; color:var(--muted); font-size:12px; }
.admin-text-button { min-height:38px; padding:0 10px; border:0; background:transparent; color:var(--accent); font-size:12px; font-weight:680; cursor:pointer; }
.admin-text-button.is-danger { color:#a24b3c; }
.admin-password-form { display:grid; grid-template-columns:1fr auto; gap:8px; margin-top:14px; }
.admin-password-form input { min-width:0; height:44px; padding:0 12px; border:1px solid var(--border); border-radius:13px; background:#f8f6f2; outline:0; }
.admin-password-form input:focus { border-color:rgba(31,112,88,.5); background:#fff; box-shadow:0 0 0 3px rgba(31,112,88,.1); }
.admin-password-form button { min-height:44px; padding:0 14px; border:1px solid #cec8bd; border-radius:13px; background:#fff; font-size:13px; font-weight:680; cursor:pointer; }
.admin-password-form button:disabled, .admin-text-button:disabled { opacity:.5; cursor:wait; }
.search-form { position:relative; margin-top:44px; }
.search-box { height: 66px; display: flex; align-items: center; gap: 12px; background: var(--surface-strong); border: 1px solid rgba(217,211,201,.78); border-radius: 21px; padding: 0 18px; box-shadow: 0 12px 38px rgba(57,47,31,.07); transition: .2s; }
.search-box:focus-within { border-color: rgba(31,112,88,.45); box-shadow: 0 16px 40px rgba(31,112,88,.11); transform: translateY(-1px); }
.search-box > svg { width: 23px; color: var(--muted); flex: 0 0 auto; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 18px; }
.search-box input::placeholder { color: #9b9892; }
.clear-search { width: 28px; height: 28px; padding: 0 0 2px; border: 0; border-radius: 50%; background: #ebe8e2; color: #77736c; font-size: 19px; line-height: 1; cursor: pointer; }
.clear-search.visible { display: block; }
.search-suggestions { position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:8; overflow:hidden; border:1px solid var(--border); border-radius:18px; background:rgba(255,255,255,.98); box-shadow:0 18px 48px rgba(57,47,31,.14); }
.search-suggestion { width:100%; min-height:70px; display:flex; align-items:center; gap:12px; padding:9px 13px; border:0; border-bottom:1px solid var(--border); background:transparent; text-align:left; cursor:pointer; }
.search-suggestion:last-child { border-bottom:0; }
.search-suggestion:hover, .search-suggestion.is-active { background:var(--accent-soft); }
.search-suggestion .search-suggestion-thumb { width:50px; height:50px; flex:0 0 50px; border-radius:12px; }
.search-suggestion-copy { min-width:0; flex:1; }
.search-suggestion strong, .search-suggestion small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.search-suggestion strong { font-size:15px; }
.search-suggestion small { margin-top:5px; color:var(--muted); font-size:11px; }
.search-suggestion .chevron { flex:0 0 auto; }

.primary-button, .secondary-button { min-height: 62px; border-radius: 20px; border: 0; font-weight: 680; font-size: 17px; cursor: pointer; transition: .2s var(--ease); }
.primary-button { width: 100%; background: var(--accent); color: white; box-shadow: 0 12px 28px rgba(31,112,88,.22); }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(31,112,88,.25); }
.primary-button:active { transform: scale(.985); }
.primary-button:disabled { background:#a9b7b1; box-shadow:none; cursor:not-allowed; transform:none; }
.scan-home-button { margin-top: 14px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.button-icon { width: 26px; height: 26px; display: grid; place-items: center; }
.button-icon svg { width: 23px; }
.chevron { width: 17px; color: #a5a29c; }
.inventory-home-button { width:100%; min-height:54px; margin-top:10px; padding:0 17px; display:grid; grid-template-columns:1fr auto 17px; gap:10px; align-items:center; border:0; border-radius:17px; background:transparent; text-align:left; cursor:pointer; }
.inventory-home-button:hover { background:rgba(255,255,255,.6); }
.inventory-home-button > span:first-child { font-size:15px; font-weight:680; }
.inventory-home-button > span:nth-child(2) { color:var(--muted); font-size:12px; }

.inventory-screen { padding-top:42px; }
.inventory-intro { margin-bottom:24px; }
.inventory-intro .intro-copy { margin-top:12px; font-size:14px; }
.inventory-tree { display:grid; gap:12px; }
.inventory-tree details > summary { list-style:none; cursor:pointer; }
.inventory-tree details > summary::-webkit-details-marker { display:none; }
.inventory-tree summary { min-width:0; display:grid; grid-template-columns:1fr auto 17px; gap:10px; align-items:center; }
.inventory-tree summary strong { min-width:0; overflow-wrap:anywhere; }
.inventory-tree summary > span { color:var(--muted); font-size:11px; white-space:nowrap; }
.inventory-tree summary .chevron { transition:transform .18s var(--ease); }
.inventory-tree details[open] > summary > .chevron { transform:rotate(90deg); color:var(--accent); }
.inventory-place { overflow:hidden; border:1px solid var(--border); border-radius:21px; background:rgba(255,255,255,.76); }
.inventory-place > summary { min-height:66px; padding:0 17px; }
.inventory-place > summary strong { font-size:18px; letter-spacing:-.2px; }
.inventory-furniture-list { border-top:1px solid var(--border); }
.inventory-furniture { border-bottom:1px solid var(--border); }
.inventory-furniture:last-child { border-bottom:0; }
.inventory-furniture > summary { min-height:58px; padding:0 17px 0 29px; background:rgba(247,245,240,.48); }
.inventory-furniture > summary strong { font-size:15px; }
.inventory-furniture-content { padding:0 12px 12px 29px; background:rgba(247,245,240,.48); }
.inventory-storage { border-top:1px solid var(--border); }
.inventory-storage > summary { min-height:54px; padding:0 5px; }
.inventory-storage > summary strong { font-size:14px; font-weight:650; }
.inventory-storage-content { padding:0 0 10px; }
.inventory-item { width:100%; min-height:64px; display:grid; grid-template-columns:48px 1fr 17px; gap:11px; align-items:center; padding:7px 5px; border:0; border-top:1px solid rgba(229,224,215,.75); background:transparent; text-align:left; cursor:pointer; }
.inventory-item:hover { background:#fff; }
.inventory-item .inventory-item-thumb { width:48px; height:48px; border-radius:11px; }
.inventory-item-copy { min-width:0; }
.inventory-item-copy strong, .inventory-item-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inventory-item-copy strong { font-size:14px; }
.inventory-item-copy small { margin-top:4px; color:var(--muted); font-size:11px; }
.inventory-storage-empty { padding:12px 5px; border-top:1px solid rgba(229,224,215,.75); color:var(--muted); font-size:12px; }
.inventory-delete-action { min-height:38px; margin:7px 4px 0; padding:0; border:0; background:transparent; color:#9a5549; font-size:12px; font-weight:650; cursor:pointer; }
.inventory-furniture-content > .inventory-delete-action { margin-top:10px; }
.inventory-delete-confirmation { margin:8px 4px 2px; padding:13px; border:1px solid #ead7d1; border-radius:14px; background:#fff9f7; }
.inventory-delete-confirmation p { color:#71453e; font-size:12px; line-height:1.45; }
.inventory-delete-confirmation > div { display:flex; justify-content:flex-end; gap:8px; margin-top:11px; }
.inventory-delete-confirmation button { min-height:38px; padding:0 11px; border:1px solid #dfd8cf; border-radius:11px; background:#fff; font-size:12px; font-weight:680; cursor:pointer; }
.inventory-delete-confirmation button.is-danger { border-color:#a24b3c; background:#a24b3c; color:#fff; }
.inventory-delete-confirmation button:disabled { opacity:.6; cursor:wait; }
.inventory-empty { padding:24px 18px; border:1px solid var(--border); border-radius:21px; background:rgba(255,255,255,.7); text-align:center; }
.inventory-empty p { margin-bottom:18px; color:var(--muted); font-size:14px; }
.inventory-empty .primary-button { min-height:54px; border-radius:17px; font-size:15px; }

.search-screen { padding-top: 42px; }
.compact-search-wrap { margin-bottom: 46px; }
.compact-search { height: 58px; box-shadow: none; background: rgba(255,255,255,.8); }
.results-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.results-heading h1 { font-size: 28px; letter-spacing: -.7px; line-height: 1.15; }
.results-heading > p { color: var(--muted); font-size: 13px; padding-bottom: 3px; }
.results-heading > p strong { color: var(--text); }
.result-list { display: grid; gap: 12px; }
.search-empty { margin-top:18px; color:var(--muted); font-size:15px; line-height:1.45; }
.item-card { border: 1px solid var(--border); background: rgba(255,255,255,.82); border-radius: var(--radius-lg); padding: 12px; display: grid; grid-template-columns: 78px 1fr 17px; gap: 15px; align-items: center; text-align: left; cursor: pointer; transition: .22s var(--ease); }
.item-card:hover { transform: translateY(-2px); border-color: #d5cfc4; box-shadow: var(--shadow); background: white; }
.item-visual { width: 78px; height: 84px; border-radius: 16px; background: #ece9e3; position: relative; overflow: hidden; display: block; }
.real-item-visual img { width:100%; height:100%; display:block; object-fit:cover; }
.cable-visual { background: linear-gradient(145deg,#e8e5df,#d9d5cd); }
.cable-loop { position: absolute; width: 47px; height: 47px; border: 5px solid #303234; border-radius: 50%; left: 14px; top: 15px; transform: rotate(-17deg); box-shadow: inset 1px 2px 1px #8c8d8e; }
.cable-loop:after { content:""; position:absolute; width:17px; height:9px; background:#272829; border-radius:2px; right:-8px; bottom:-2px; transform:rotate(40deg); }
.adapter-visual { background: linear-gradient(145deg,#e5e7e8,#cdd1d2); }
.adapter-visual span { position:absolute; width:46px; height:22px; border-radius:5px; background:#f8f8f7; box-shadow:0 4px 9px #9ba0a2; left:16px; top:31px; transform:rotate(-12deg); }
.adapter-visual span:after { content:""; position:absolute; width:24px; height:4px; background:#393b3c; right:-20px; top:9px; }
.network-visual { background:linear-gradient(145deg,#e4e1da,#cdc8be); }
.network-visual span { position:absolute; width:46px; height:46px; left:16px; top:19px; border:5px solid #5a6d72; border-radius:50%; transform:rotate(26deg); }
.network-visual span:after { content:""; position:absolute; width:15px; height:12px; right:-8px; top:0; border-radius:3px; background:#a4b6b8; transform:rotate(30deg); }
.remote-visual { background:linear-gradient(145deg,#e1dfda,#c9c5bd); }
.remote-visual span { position:absolute; width:26px; height:62px; left:27px; top:11px; border-radius:9px; background:#343536; transform:rotate(8deg); box-shadow:0 4px 9px rgba(0,0,0,.22); }
.remote-visual span:before, .remote-visual span:after { content:""; position:absolute; border-radius:50%; background:#aaa9a5; }
.remote-visual span:before { width:7px; height:7px; left:9px; top:10px; }
.remote-visual span:after { width:5px; height:5px; left:10px; top:26px; box-shadow:0 10px #aaa9a5, 0 20px #aaa9a5; }
.unknown-visual { background:linear-gradient(145deg,#ebe4d9,#d8cdbd); }
.unknown-visual span { position:absolute; width:44px; height:44px; left:17px; top:20px; border:5px dashed #706b64; border-radius:50%; transform:rotate(23deg); }
.item-copy { min-width: 0; }
.item-copy strong { display:block; font-size:17px; margin:0 0 11px; letter-spacing:-.2px; }
.item-copy strong { overflow-wrap:anywhere; }
.item-description { display:-webkit-box; margin:-5px 0 10px; overflow:hidden; color:var(--muted); font-size:12px; line-height:1.35; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.path { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; }
.path i { font-style: normal; color: #b3afa8; }
.path b { color: #4f4d49; font-weight: 650; }

.detail-screen { padding-top: 42px; max-width:680px; }
.detail-heading { margin-bottom:22px; }
.detail-heading h1 { min-width:0; margin:0; font-size:28px; line-height:1.18; letter-spacing:-.7px; overflow-wrap:anywhere; }
.detail-photo-button { width:100%; margin:0; padding:0; border:0; background:transparent; display:block; text-align:left; line-height:0; cursor:pointer; }
.detail-photo-button .hero-image { display:block; transition:transform .2s var(--ease), box-shadow .2s var(--ease); }
.detail-photo-button:hover .hero-image { transform:translateY(-1px); box-shadow:inset 0 1px rgba(255,255,255,.7), 0 12px 36px rgba(56,48,34,.08); }
.hero-image { width:100%; height:auto; aspect-ratio:4 / 3; border-radius:20px; background: linear-gradient(145deg,#eae6df,#d4d0c8); position: relative; overflow: hidden; box-shadow: inset 0 1px rgba(255,255,255,.7); }
.real-detail-photo img { width:100%; height:100%; display:block; object-fit:cover; }
.hero-image.adapter-photo .big-loop { display:none; }
.hero-image.adapter-photo .plug { display:none; }
.hero-image.adapter-photo:before { content:""; position:absolute; width:42%; height:21%; left:31%; top:38%; border-radius:14px; background:#f8f8f7; box-shadow:0 9px 22px rgba(90,95,95,.25), inset -8px -8px 14px #d6d6d2; transform:rotate(-12deg); }
.hero-image.adapter-photo:after { content:""; position:absolute; width:18%; height:3%; right:22%; top:49%; border-radius:99px; background:#393b3c; }
.big-loop { position:absolute; width:clamp(145px,35vw,220px); height:clamp(145px,35vw,220px); border:13px solid #292b2c; border-radius:50%; left:50%; top:46%; transform:translate(-50%,-50%) rotate(-15deg); box-shadow:inset 3px 3px 2px #737576, 2px 5px 10px rgba(0,0,0,.18); }
.plug { position:absolute; width:49px; height:27px; background:linear-gradient(#323435,#18191a); border-radius:5px 5px 3px 3px; box-shadow:0 5px 9px rgba(0,0,0,.2); }
.plug:after { content:""; position:absolute; width:30px; height:15px; background:#b6b4ae; left:9px; top:-11px; clip-path:polygon(15% 0,85% 0,100% 100%,0 100%); }
.plug-one { left:25%; bottom:29px; transform:rotate(-23deg); }
.plug-two { right:23%; top:25px; transform:rotate(145deg); }
.detail-inline-editor { margin-top:24px; padding-top:22px; border-top:1px solid var(--border); }
.detail-inline-editor h2 { font-size:18px; line-height:1.2; letter-spacing:-.3px; }
.detail-inline-editor .editor-fields { margin-top:18px; }
.secondary-button { width:100%; background:transparent; border:1px solid #cec8bd; color:#4e4b46; margin-top:14px; }
.secondary-button:hover { background:#fff; }

.scan-start-screen { padding-top: 42px; }
.screen-intro { margin-bottom:36px; }
.location-picker { width:100%; min-height:102px; border:1px solid var(--border); background:rgba(255,255,255,.8); border-radius:var(--radius-lg); display:grid; grid-template-columns:43px 1fr 17px; gap:13px; align-items:center; padding:16px; text-align:left; cursor:pointer; }
.pin-icon { width:43px; height:43px; background:var(--accent-soft); color:var(--accent); border-radius:14px; display:grid; place-items:center; }
.pin-icon svg { width:21px; }
.location-picker small, .location-picker strong, .location-picker > span > span { display:block; }
.location-picker small { color:var(--muted); font-size:11px; margin-bottom:5px; }
.location-picker strong { font-size:17px; }
.location-picker > span > span { color:var(--muted); font-size:13px; margin-top:3px; }
.location-picker i { font-style:normal; padding:0 3px; }
.camera-card { width:100%; height:240px; margin-top:14px; border:1px dashed #a9a49b; border-radius:var(--radius-xl); background:rgba(255,255,255,.35); display:flex; flex-direction:column; justify-content:center; align-items:center; cursor:pointer; position:relative; overflow:hidden; }
.camera-card:before { content:""; position:absolute; inset:0; background:radial-gradient(circle at center,rgba(255,255,255,.85),transparent 60%); }
.camera-circle { width:70px; height:70px; border-radius:50%; background:var(--text); color:#fff; display:grid; place-items:center; position:relative; margin-bottom:16px; box-shadow:0 9px 23px rgba(28,28,30,.2); }
.camera-circle svg { width:31px; }
.camera-card strong, .camera-card small { position:relative; }
.camera-card strong { font-size:17px; }
.camera-card small { color:var(--muted); margin-top:5px; }
.choose-photo-button { width:100%; min-height:46px; margin-top:7px; border:0; background:transparent; color:var(--muted); font-size:14px; font-weight:620; cursor:pointer; }
.scan-corners:before, .scan-corners:after { content:""; position:absolute; width:35px; height:35px; border-color:var(--accent); border-style:solid; z-index:1; opacity:.55; }
.scan-corners:before { top:20px; left:20px; border-width:2px 0 0 2px; border-radius:8px 0 0 0; }
.scan-corners:after { right:20px; bottom:20px; border-width:0 2px 2px 0; border-radius:0 0 8px 0; }
.helper-text { text-align:center; color:var(--muted); font-size:13px; line-height:1.5; margin-top:8px; }

.scan-review-screen { padding-top:42px; }
.review-intro { margin-bottom:28px; }
.captured-photo { width:100%; height:auto; aspect-ratio:4 / 3; margin:0; position:relative; overflow:hidden; border:1px solid #d2cdc4; border-radius:18px; background:#d1cbc2; }
.captured-photo:before { content:""; position:absolute; inset:0; background:linear-gradient(150deg,#ded9d1,#c6beb3); }
.captured-photo img { width:100%; height:100%; display:block; position:relative; z-index:2; object-fit:contain; background:#171716; }
.captured-photo.has-real-photo:before,
.captured-photo.has-real-photo .photo-object { display:none; }
.photo-box-edge { display:none; }
.photo-object { position:absolute; display:block; z-index:1; filter:drop-shadow(0 5px 5px rgba(35,31,28,.25)); }
.object-cable { width:104px; height:104px; left:11%; top:18%; border:11px solid #292b2c; border-radius:50%; transform:rotate(-15deg); }
.object-cable:after { content:""; position:absolute; width:31px; height:17px; right:-18px; bottom:1px; border-radius:4px; background:#202223; transform:rotate(35deg); }
.object-power { width:64px; height:67px; right:14%; top:18%; border-radius:12px; background:#f2f1ed; transform:rotate(9deg); box-shadow:inset -5px -5px 10px #cac7c0; }
.object-power:after { content:""; position:absolute; width:34px; height:6px; right:-28px; top:32px; background:#4b4d4d; border-radius:3px; }
.object-remote { width:38px; height:112px; right:28%; bottom:9%; border-radius:12px; background:#303233; transform:rotate(18deg); }
.object-remote:after { content:""; position:absolute; width:9px; height:9px; left:18px; top:18px; border-radius:50%; background:#b6b4ae; box-shadow:0 22px #777874,0 41px #777874,0 60px #777874; }
.object-network { width:72px; height:72px; left:37%; bottom:10%; border:8px solid #536b6f; border-radius:50%; transform:rotate(28deg); }
.model-field { width:100%; margin:24px 0 0; }
.model-field-heading { display:flex; justify-content:space-between; align-items:center; margin:0 2px 8px; }
.model-field-heading label { color:#4f4d49; font-size:13px; font-weight:650; }
.model-field-heading span { color:var(--muted); font-size:11px; }
.model-field select { width:100%; height:56px; padding:0 44px 0 15px; border:1px solid var(--border); border-radius:15px; appearance:none; background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2377746f' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat calc(100% - 15px) center; color:var(--text); font-size:15px; font-weight:600; cursor:pointer; }
.review-actions { width:100%; display:flex; flex-direction:column; gap:4px; margin:18px 0 0; }
.recognition-error { margin:10px 2px 4px; padding:12px 14px; border:1px solid #ead7d1; border-radius:13px; background:#fff9f7; color:#8f4539; font-size:13px; line-height:1.4; }
.review-actions .primary-button:disabled,
.retake-button:disabled,
.model-field select:disabled { opacity:.62; cursor:wait; transform:none; }
.retake-button { min-height:48px; border:0; background:transparent; color:var(--muted); font-size:14px; font-weight:620; cursor:pointer; }

.scan-location-screen { padding-top:42px; padding-bottom:118px; }
.location-intro { margin-bottom:36px; }
.intro-copy { margin-top:18px; color:var(--muted); font-size:16px; line-height:1.45; }
.saved-location-label { margin:0 2px 9px; color:var(--muted); font-size:12px; font-weight:650; }
.location-builder { overflow:hidden; border:1px solid var(--border); border-radius:22px; background:rgba(255,255,255,.78); }
.location-level { min-height:82px; display:grid; grid-template-columns:34px 1fr; gap:12px; align-items:center; padding:12px 16px; border-bottom:1px solid var(--border); cursor:pointer; }
.location-level:last-child { border-bottom:0; }
.level-index { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-size:13px; font-weight:750; }
.level-control { min-width:0; display:block; }
.level-control small { display:block; margin-bottom:5px; color:var(--muted); font-size:11px; }
.level-control select { width:100%; height:27px; padding:0 30px 0 0; border:0; outline:0; appearance:none; background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%2377746f' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 3.5 3.5L11 6'/%3E%3C/svg%3E") no-repeat right center; color:var(--text); font-size:16px; font-weight:650; cursor:pointer; }
.level-control input { width:100%; height:44px; margin-top:8px; padding:0 12px; border:1px solid var(--border); border-radius:12px; background:#f8f6f2; color:var(--text); font-size:15px; outline:0; }
.level-control input:focus { border-color:rgba(31,112,88,.5); background:#fff; box-shadow:0 0 0 3px rgba(31,112,88,.1); }

.scan-result-screen { padding-top:42px; padding-bottom:118px; }
.scan-heading { align-items:center; }
.scan-heading h1 { font-size:28px; line-height:1.15; letter-spacing:-.7px; }
.count-badge { width:48px; height:48px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); border-radius:16px; font-size:19px; font-weight:750; }
.scan-subtitle { color:var(--muted); font-size:14px; margin:20px 0 13px; }
.result-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:20px 0 13px; }
.result-meta .scan-subtitle { margin:0; }
.result-meta > span { flex:0 0 auto; padding:7px 9px; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-size:10px; }
.result-meta > span strong { font-weight:750; }
.scan-photo-summary { width:100%; min-height:76px; margin-bottom:12px; padding:9px 13px 9px 9px; display:grid; grid-template-columns:58px 1fr 17px; gap:12px; align-items:center; border:1px solid var(--border); border-radius:18px; background:rgba(255,255,255,.68); text-align:left; cursor:pointer; }
.summary-photo { width:58px; height:58px; position:relative; overflow:hidden; border-radius:12px; background:linear-gradient(145deg,#d8d1c7,#a99f93); }
.summary-photo img { width:100%; height:100%; display:block; position:relative; z-index:2; object-fit:cover; }
.summary-photo.has-real-photo:before,
.summary-photo.has-real-photo i,
.summary-photo.has-real-photo b,
.summary-photo.has-real-photo em { display:none; }
.summary-photo:before { content:""; position:absolute; width:28px; height:28px; left:7px; top:7px; border:4px solid #303233; border-radius:50%; transform:rotate(-15deg); }
.summary-photo i { position:absolute; width:13px; height:35px; right:9px; bottom:5px; border-radius:4px; background:#343536; transform:rotate(13deg); }
.summary-photo b { position:absolute; width:17px; height:18px; right:7px; top:7px; border-radius:4px; background:#efede8; transform:rotate(8deg); }
.summary-photo em { position:absolute; width:24px; height:24px; left:16px; bottom:4px; border:3px solid #586d70; border-radius:50%; }
.scan-photo-summary small, .scan-photo-summary strong { display:block; }
.scan-photo-summary small { color:var(--muted); font-size:11px; margin-bottom:4px; }
.scan-photo-summary strong { font-size:14px; }
.detected-list { background:rgba(255,255,255,.78); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; }
.detected-item { border-bottom:1px solid var(--border); }
.detected-item:last-child { border-bottom:0; }
.detected-row { width:100%; border:0; background:transparent; min-height:78px; display:grid; grid-template-columns:30px 52px 1fr 17px; gap:11px; align-items:center; padding:10px 14px; text-align:left; cursor:pointer; }
.detected-row:hover, .detected-item.is-open .detected-row { background:#fff; }
.detected-row .chevron { transition:transform .2s var(--ease); }
.detected-row[aria-expanded="true"] .chevron { transform:rotate(90deg); color:var(--accent); }
.detected-copy strong { display:block; }
.detected-copy { min-width:0; }
.detected-row strong { font-size:15px; overflow-wrap:anywhere; }
.detected-copy p { display:-webkit-box; margin-top:4px; overflow:hidden; color:var(--muted); font-size:11px; line-height:1.3; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.check-mark { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-weight:800; }
.detected-thumb { width:52px; height:56px; display:block; position:relative; overflow:hidden; border-radius:13px; background:linear-gradient(145deg,#e7e4de,#d3cfc8); box-shadow:inset 0 1px rgba(255,255,255,.65); }
.real-detected-thumb img { width:100%; height:100%; display:block; object-fit:cover; }
.detected-thumb i { position:absolute; display:block; }
.thumb-hdmi i, .thumb-network i, .thumb-unknown i { width:31px; height:31px; left:10px; top:10px; border:4px solid #363839; border-radius:50%; transform:rotate(-18deg); }
.thumb-hdmi i:after { content:""; position:absolute; width:12px; height:7px; border-radius:2px; background:#252728; right:-7px; bottom:-2px; transform:rotate(38deg); }
.thumb-power { background:linear-gradient(145deg,#e3e5e5,#cbd0d0); }
.thumb-power i { width:29px; height:29px; left:11px; top:14px; border-radius:7px; background:#f7f7f5; box-shadow:0 4px 8px rgba(70,75,75,.25); transform:rotate(-10deg); }
.thumb-power i:after { content:""; position:absolute; width:12px; height:3px; right:-9px; top:13px; background:#6d7070; }
.thumb-network { background:linear-gradient(145deg,#e4e1da,#cdc8be); }
.thumb-network i { border-color:#5a6d72; }
.thumb-network i:after { content:""; position:absolute; width:10px; height:8px; right:-6px; top:-1px; border-radius:2px; background:#a4b6b8; transform:rotate(30deg); }
.thumb-remote { background:linear-gradient(145deg,#e1dfda,#c9c5bd); }
.thumb-remote i { width:18px; height:43px; left:17px; top:6px; border-radius:7px; background:#343536; transform:rotate(8deg); box-shadow:0 3px 7px rgba(0,0,0,.25); }
.thumb-remote i:before, .thumb-remote i:after { content:""; position:absolute; border-radius:50%; background:#aaa9a5; }
.thumb-remote i:before { width:5px; height:5px; left:6px; top:7px; }
.thumb-remote i:after { width:3px; height:3px; left:7px; top:18px; box-shadow:0 7px #aaa9a5, 0 14px #aaa9a5; }
.thumb-unknown { background:linear-gradient(145deg,#ebe4d9,#d8cdbd); }
.thumb-unknown i { border-color:#706b64; border-style:dashed; transform:rotate(23deg); }
.uncertain .check-mark { background:#f5ebd9; color:#956a25; }
.scan-empty { padding:24px 20px; border:1px solid var(--border); border-radius:var(--radius-lg); background:rgba(255,255,255,.72); text-align:center; }
.scan-empty strong { display:block; font-size:16px; }
.scan-empty p { margin-top:8px; color:var(--muted); font-size:13px; line-height:1.45; }
.detected-inline-editor { padding:0 14px 16px 107px; background:#fff; animation:inline-editor-in .2s var(--ease) both; }
.detected-expanded-preview { width:100%; max-width:440px; aspect-ratio:4 / 3; display:grid; place-items:center; margin-bottom:16px; overflow:hidden; border-radius:16px; background:#f1eee8; color:var(--muted); font-size:12px; }
.detected-expanded-preview img { width:100%; height:100%; display:block; object-fit:cover; }
.detected-inline-editor .field-label { display:block; margin:0 0 7px; }
.detected-inline-editor .editor-input { height:50px; background:#fbfaf7; }
.detected-inline-editor .editor-textarea { height:76px; }
.detected-inline-editor .field-label:not(:first-child) { margin-top:10px; }
.detected-inline-editor .editor-hint { margin-top:10px; }
.inline-editor-actions { display:grid; grid-template-columns:auto 1fr; gap:10px; margin-top:14px; }
.inline-editor-actions .primary-button, .inline-editor-actions .remove-button { min-height:50px; border-radius:15px; font-size:14px; }
@keyframes inline-editor-in { from { opacity:0; transform:translateY(-4px); } }
.sticky-action { position:fixed; width:calc(100% - 48px); max-width:512px; bottom:max(22px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); z-index:3; }
.sticky-action:hover { transform:translateX(-50%) translateY(-2px); }
.primary-button.sticky-action:disabled { transform:translateX(-50%); }

.item-editor { position:fixed; inset:0; z-index:20; display:flex; align-items:flex-end; justify-content:center; }
.editor-backdrop { position:absolute; inset:0; width:100%; border:0; background:rgba(28,28,30,.38); backdrop-filter:blur(3px); cursor:pointer; }
.editor-sheet { position:relative; width:100%; max-width:560px; padding:10px 22px calc(22px + env(safe-area-inset-bottom)); border-radius:28px 28px 0 0; background:var(--surface-strong); box-shadow:0 -18px 60px rgba(28,28,30,.18); animation:sheet-in .28s var(--ease) both; }
@keyframes sheet-in { from { transform:translateY(30px); opacity:0; } }
.sheet-handle { width:38px; height:5px; margin:0 auto 21px; border-radius:3px; background:#d4d0ca; }
.editor-header { display:grid; grid-template-columns:64px 1fr 38px; gap:14px; align-items:center; }
.editor-preview { width:64px; height:68px; border-radius:16px; }
.editor-preview.thumb-hdmi i, .editor-preview.thumb-network i, .editor-preview.thumb-unknown i { width:38px; height:38px; left:12px; top:13px; }
.editor-header h2 { margin:5px 0 0; font-size:21px; letter-spacing:-.4px; }
.editor-close { align-self:start; width:36px; height:36px; border:0; border-radius:50%; background:#efede8; color:#716e68; font-size:23px; line-height:1; cursor:pointer; }
.editor-fields { display:grid; gap:8px; margin-top:24px; }
.field-label { margin-top:7px; color:var(--muted); font-size:12px; font-weight:680; }
.editor-input { width:100%; height:54px; padding:0 15px; border:1px solid var(--border); border-radius:15px; background:#f8f6f2; color:var(--text); font-size:16px; outline:0; }
.editor-textarea { min-height:88px; padding:13px 15px; resize:vertical; line-height:1.4; }
.editor-input:focus { border-color:rgba(31,112,88,.5); background:#fff; box-shadow:0 0 0 3px rgba(31,112,88,.1); }
.editor-hint { margin-top:14px; color:var(--muted); font-size:13px; line-height:1.4; }
.editor-actions { display:grid; grid-template-columns:auto 1fr; gap:10px; margin-top:22px; }
.editor-actions .primary-button { min-height:56px; border-radius:17px; font-size:15px; }
.remove-button { min-height:56px; padding:0 17px; border:1px solid #ead7d1; border-radius:17px; background:#fff9f7; color:#a24b3c; font-size:14px; font-weight:650; cursor:pointer; }
.detail-editor-section-label { margin:16px 0 0; color:var(--text); font-size:14px; font-weight:700; }
.compact-field { display:grid; grid-template-columns:145px 1fr; gap:12px; align-items:center; }
.compact-field > span { color:var(--muted); font-size:12px; }
.compact-field select { appearance:none; padding-right:36px; background:#f8f6f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%2377746f' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 3.5 3.5L11 6'/%3E%3C/svg%3E") no-repeat calc(100% - 12px) center; }
.detail-editor-actions { display:grid; grid-template-columns:auto 1fr; gap:10px; margin-top:22px; }
.detail-editor-actions .primary-button { min-height:56px; border-radius:17px; font-size:15px; }
.delete-item-button { min-height:56px; padding:0 15px; border:0; background:transparent; color:#a24b3c; font-size:13px; font-weight:650; cursor:pointer; }

.photo-preview-modal { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:24px; }
.photo-preview-backdrop { position:absolute; inset:0; width:100%; border:0; background:rgba(28,28,30,.55); backdrop-filter:blur(5px); cursor:pointer; }
.photo-preview-sheet { position:relative; width:min(100%,720px); padding:18px; border-radius:26px; background:var(--surface-strong); box-shadow:0 24px 80px rgba(0,0,0,.25); animation:photo-preview-in .22s var(--ease) both; }
.photo-preview-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.photo-preview-header h2 { font-size:18px; letter-spacing:-.3px; }
.photo-preview-close { width:38px; height:38px; border:0; border-radius:50%; background:#efede8; color:#716e68; font-size:24px; line-height:1; cursor:pointer; }
.preview-photo { border-radius:20px; }
@keyframes photo-preview-in { from { opacity:0; transform:scale(.97); } }

.empty-screen { padding-top:42px; text-align:center; }
.empty-illustration { width:190px; height:165px; margin:0 auto 38px; position:relative; }
.empty-box { position:absolute; width:112px; height:82px; background:#e2ded6; border:2px solid #bdb7ad; border-radius:8px 8px 17px 17px; left:39px; bottom:8px; transform:perspective(300px) rotateX(-3deg); }
.empty-box:before, .empty-box:after { content:""; position:absolute; width:57px; height:43px; background:#eeebe5; border:2px solid #bdb7ad; top:-35px; }
.empty-box:before { left:-3px; transform:skewY(-24deg); transform-origin:bottom right; }
.empty-box:after { right:-3px; transform:skewY(24deg); transform-origin:bottom left; }
.empty-box i { position:absolute; width:31px; height:24px; background:#c9d9d2; left:39px; bottom:26px; border-radius:4px; }
.spark { position:absolute; color:var(--accent); font-size:19px; }
.spark-one { top:3px; right:15px; }
.spark-two { top:41px; left:9px; font-size:12px; }
.empty-copy p { margin:20px 0 38px; color:var(--muted); line-height:1.5; font-size:17px; }

.toast { position:fixed; left:50%; top:24px; transform:translate(-50%,-20px); z-index:10; min-width:260px; padding:12px 16px; display:flex; align-items:center; gap:10px; border-radius:16px; background:rgba(28,28,30,.92); color:white; box-shadow:0 12px 35px rgba(0,0,0,.18); opacity:0; pointer-events:none; transition:.3s var(--ease); backdrop-filter:blur(14px); }
.toast.is-visible { opacity:1; transform:translate(-50%,0); }
.toast span { color:#7ed0ae; font-weight:800; }
.toast p { font-size:14px; }

@media (min-width: 760px) {
  body { padding:42px; }
  .app-shell { min-height:calc(100vh - 84px); max-width:1050px; background:rgba(247,245,240,.58); border:1px solid rgba(222,216,206,.72); border-radius:38px; box-shadow:0 30px 90px rgba(58,49,35,.12); overflow:hidden; }
  .topbar { padding:20px 36px 0; }
  .back-button { left:34px; }
  .screen { max-width:680px; margin:0 auto; padding-left:36px; padding-right:36px; }
  .home-screen { max-width:680px; padding:42px 36px calc(36px + env(safe-area-inset-bottom)); }
  .hero-copy h1 { font-size:32px; letter-spacing:-.9px; }
  .search-form { margin-top:38px; }
  .sticky-action { max-width:608px; }
  .editor-sheet { margin-bottom:24px; border-radius:28px; }
}

@media (max-width: 390px) {
  .screen { padding-left:19px; padding-right:19px; }
  .hero-copy h1, .screen-intro h1, .empty-copy h1 { font-size:28px; }
  .item-card { grid-template-columns:68px 1fr 14px; gap:11px; }
  .item-visual { width:68px; }
  .sticky-action { width:calc(100% - 38px); }
  .editor-sheet { padding-left:18px; padding-right:18px; }
  .editor-actions { grid-template-columns:1fr; }
  .remove-button { order:2; }
  .detected-inline-editor { padding-left:14px; }
  .inline-editor-actions { grid-template-columns:1fr; }
  .inline-editor-actions .remove-button { order:2; }
  .compact-field { grid-template-columns:1fr; gap:5px; }
  .detail-editor-actions { grid-template-columns:1fr; }
  .delete-item-button { order:2; }
  .inventory-furniture > summary { padding-left:18px; }
  .inventory-furniture-content { padding-left:18px; }
}

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