* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #080808; color: #f6f5f0; }
html { min-height: 100%; background: #080808; }
body { min-height: 100vh; margin: 0; background: #080808; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.offline-banner { position: fixed; z-index: 100; top: 0; left: 0; right: 0; padding: 8px 16px; background: #ffda57; color: #080808; text-align: center; font-size: 12px; font-weight: 800; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 20%,#222 0,#080808 46%); }
.login-card { width: min(100%,390px); padding: 28px; border: 1px solid #292929; border-radius: 22px; background: rgba(15,15,15,.96); box-shadow: 0 32px 90px rgba(0,0,0,.55); }
.login-brand, .app-brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { position: relative; display: inline-block; width: 46px; height: 45px; color: #fff; overflow: hidden; }
.brand-mark span { position: absolute; left: 0; top: 50%; font-family: Arial Black, Impact, sans-serif; font-weight: 900; line-height: 1; transform: translateY(-50%); }
.brand-mark span:nth-child(1) { font-size: 45px; color: transparent; -webkit-text-stroke: 1.5px #fff; }
.brand-mark span:nth-child(2) { left: 8px; font-size: 31px; color: transparent; -webkit-text-stroke: 1.5px #fff; }
.brand-mark span:nth-child(3) { left: 15px; font-size: 18px; color: #fff; }
.brand-mark-large { width: 66px; height: 63px; }
.brand-mark-large span:nth-child(1) { font-size: 62px; }
.brand-mark-large span:nth-child(2) { left: 11px; font-size: 43px; }
.brand-mark-large span:nth-child(3) { left: 21px; font-size: 24px; }
.brand-name { font-size: 12px; font-weight: 900; line-height: 1.05; letter-spacing: 1.8px; }
.brand-name span { display: block; }
.eyebrow { margin: 28px 0 6px; color: #7f7f79; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
.login-card h1 { margin: 0 0 24px; font-size: 30px; line-height: 1.02; letter-spacing: -1px; }
.login-form { display: grid; gap: 9px; }
.login-form label, .edit-dialog label { color: #a0a09a; font-size: 11px; font-weight: 700; }
.login-form input, .edit-dialog input, .edit-dialog textarea { width: 100%; margin-top: 6px; border: 1px solid #343434; border-radius: 7px; outline: none; background: #151515; color: #fff; }
.login-form input { height: 47px; padding: 0 13px; }
.login-form input:focus, .edit-dialog input:focus, .edit-dialog textarea:focus { border-color: #76d7ff; box-shadow: 0 0 0 3px rgba(118,215,255,.12); }
.login-form button, .add-form button, .save-button { border: 0; border-radius: 6px; background: #b8ff5a; color: #071005; font-weight: 900; }
.login-form button { height: 47px; margin-top: 5px; }
.form-error { min-height: 17px; margin: 0; color: #ff7d9f; font-size: 12px; }
.app-shell { min-height: 100vh; padding-bottom: 96px; background: #080808; }
.app-header { position: sticky; z-index: 10; top: 0; padding: max(20px,env(safe-area-inset-top)) max(18px,calc((100vw - 760px)/2)) 16px; border-bottom: 1px solid rgba(255,255,255,.04); background: rgba(8,8,8,.9); backdrop-filter: blur(20px); }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.quiet-button { padding: 8px 10px; border: 1px solid #343434; border-radius: 6px; background: #131313; color: #b8ff5a; font-size: 11px; font-weight: 800; }
.avatar-button { width: 37px; height: 37px; border: 1px solid #343434; border-radius: 50%; background: #161616; color: #fff; font-weight: 800; }
.app-header h1 { margin: 0; font-size: clamp(30px,8vw,46px); line-height: .98; letter-spacing: -1.6px; }
.app-header h1 em { font-style: normal; background: linear-gradient(90deg,#ff6b9a,#ffda57,#76d7ff); background-clip: text; -webkit-background-clip: text; color: transparent; }
.summary { margin: 10px 0 0; color: #85857f; font-size: 12px; }
.add-form { display: flex; align-items: center; gap: 9px; max-width: 680px; margin-top: 20px; padding: 7px 7px 7px 13px; border: 1px solid #2d2d2d; border-radius: 8px; background: #141414; }
.add-form > span { color: #76d7ff; font-size: 20px; }
.add-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font-size: 13px; }
.add-form input::placeholder { color: #666; }
.add-form button { height: 40px; padding: 0 15px; background: #ffda57; color: #080808; }
.add-form button:disabled { opacity: .55; cursor: wait; }
.app-content { width: min(100%,796px); margin: 0 auto; padding: 18px; }
.toolbar { display: grid; gap: 8px; margin-bottom: 22px; }
.search-field { display: flex; align-items: center; gap: 8px; height: 43px; padding: 0 12px; border: 1px solid #292929; border-radius: 7px; background: #111; color: #777; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #fff; }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.select-row select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #292929; border-radius: 7px; background: #111; color: #aaa; font-size: 11px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.section-title h2 { margin: 0; font-size: 17px; }
.section-title span { color: #696964; font-size: 10px; letter-spacing: .4px; text-transform: uppercase; }
.wishlist-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.wish-card { position: relative; display: grid; grid-template-columns: 112px 1fr; min-height: 142px; overflow: hidden; border: 1px solid #292929; border-radius: 10px; background: #111; }
.wish-image { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,#ffda57,#d9773d); }
.wish-image.color-high { background: linear-gradient(145deg,#ff6b9a,#713f99); }
.wish-image.color-normal { background: linear-gradient(145deg,#ffda57,#d9773d); }
.wish-image.color-someday { background: linear-gradient(145deg,#76d7ff,#294b8b); }
.wish-image img { width: 100%; height: 100%; object-fit: cover; }
.wish-image .fallback-icon { font-size: 38px; }
.priority-badge { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 4px 6px; border-radius: 4px; background: #fff; color: #080808; font-size: 8px; font-weight: 900; letter-spacing: .4px; }
.wish-copy { min-width: 0; padding: 13px; }
.wish-number { color: #656560; font-size: 9px; font-weight: 800; letter-spacing: .6px; }
.wish-title { margin: 5px 0 0; font-size: 13px; line-height: 1.3; font-weight: 800; }
.wish-title a { color: #f7f7f4; text-decoration: none; }
.wish-meta { margin-top: 6px; color: #777772; font-size: 10px; text-transform: uppercase; }
.wish-price { margin-top: 13px; font-size: 16px; font-weight: 900; }
.wish-actions { display: flex; align-items: center; gap: 5px; margin-top: 12px; }
.wish-actions button, .wish-actions select { min-height: 31px; border: 1px solid #303030; border-radius: 5px; background: #171717; color: #aaa; font-size: 9px; }
.wish-actions button { padding: 0 9px; }
.wish-actions select { min-width: 0; flex: 1; padding: 0 5px; }
.empty-state { grid-column: 1/-1; padding: 54px 20px; border: 1px dashed #303030; border-radius: 10px; color: #777; text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: #fff; font-size: 17px; }
.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: max(12px,env(safe-area-inset-bottom)); width: min(calc(100% - 24px),470px); height: 68px; display: grid; grid-template-columns: repeat(3,1fr); transform: translateX(-50%); border: 1px solid #303030; border-radius: 12px; background: rgba(18,18,18,.96); box-shadow: 0 18px 45px rgba(0,0,0,.6); backdrop-filter: blur(18px); }
.bottom-nav button { display: grid; place-content: center; gap: 4px; border: 0; background: transparent; color: #70706b; font-size: 9px; font-weight: 800; }
.bottom-nav button span { font-size: 20px; line-height: 1; }
.bottom-nav button[aria-current="page"] { color: #b8ff5a; }
.stats-view { display: grid; gap: 10px; }
.stats-hero { padding: 28px; border-radius: 14px; background: linear-gradient(135deg,#ff6b9a 0,#ffda57 51%,#76d7ff 100%); color: #080808; }
.stats-hero span { font-size: 9px; font-weight: 900; letter-spacing: 1.2px; }
.stats-hero strong { display: block; margin: 8px 0 4px; font-size: clamp(34px,10vw,60px); line-height: 1; letter-spacing: -2px; }
.stats-hero small { font-size: 11px; font-weight: 700; }
.category-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.category-row { padding: 15px; border: 1px solid #292929; border-radius: 9px; background: #111; }
.category-row span { color: #7d7d77; font-size: 10px; }
.category-row strong { display: block; margin-top: 5px; font-size: 17px; }
.edit-dialog { width: min(calc(100% - 24px),480px); padding: 0; border: 1px solid #363636; border-radius: 16px; background: #111; color: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.edit-dialog::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(5px); }
.edit-dialog form { display: grid; gap: 12px; padding: 20px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; }
.dialog-head .eyebrow { margin: 0 0 5px; }
.dialog-head h2 { margin: 0; }
.dialog-head button { border: 0; background: transparent; color: #888; font-size: 27px; }
.edit-dialog input, .edit-dialog textarea { padding: 11px; resize: vertical; }
.dialog-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.save-button { height: 46px; margin-top: 4px; }
.toast { position: fixed; z-index: 110; left: 50%; bottom: 95px; max-width: calc(100% - 32px); padding: 11px 15px; transform: translate(-50%,20px); border: 1px solid #3a3a3a; border-radius: 8px; background: #181818; color: #fff; opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; }
.toast.visible { transform: translate(-50%,0); opacity: 1; }
@media (max-width:680px) {
  .app-header { padding-left: 18px; padding-right: 18px; }
  .wishlist-grid { grid-template-columns: 1fr; }
}
@media (max-width:420px) {
  .wish-card { grid-template-columns: 96px 1fr; }
  .select-row, .dialog-row, .category-stats { grid-template-columns: 1fr; }
  .app-brand .brand-name { display: none; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }
