@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#302744;--muted:#80768f;--purple:#8056d9;--purple-dark:#6841bf;--lavender:#f1eafa;--pale:#fbf8ff;--line:#eae2f3;--peach:#ffe7db;--white:#fff;--shadow:0 15px 40px rgba(83,48,123,.08)}
*{box-sizing:border-box}html{min-height:100%;background:var(--pale)}body{margin:0;color:var(--ink);font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased}h1,h2,h3{font-family:Manrope,system-ui,sans-serif;letter-spacing:-.045em}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}a{color:var(--purple)}.hidden{display:none!important}.eyebrow{font-size:.76rem;letter-spacing:.15em;text-transform:uppercase;font-weight:800;color:#956fcf}.subtle,.fineprint{color:var(--muted);line-height:1.7}.fineprint{font-size:.78rem}.auth-layout{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,1fr);gap:0}.auth-decoration{background:radial-gradient(circle at 20% 25%,#c5a1ef,transparent 55%),linear-gradient(145deg,#8c64d9,#6e4cc6);color:white;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:clamp(32px,8vw,130px);overflow:hidden;position:relative}.auth-decoration h1{font-size:clamp(4.7rem,10vw,9rem);margin:0;line-height:1.15}.auth-decoration p{font-size:clamp(1.15rem,2.6vw,1.9rem);line-height:1.55;font-weight:500}.sparkle{font-size:6rem}.decoration-stickers{display:flex;gap:18px;font-size:3.6rem;transform:rotate(-10deg);margin-top:25px}.auth-panel{padding:40px clamp(25px,7vw,115px);display:flex;flex-direction:column;justify-content:center;max-width:700px;width:100%;margin:auto}.auth-panel h2{font-size:clamp(2rem,4vw,3.1rem);margin:10px 0}.auth-switch{display:flex;gap:8px;background:#eee8f6;padding:5px;border-radius:15px;margin:22px 0}.auth-switch button{flex:1;background:transparent;border:0;padding:13px;border-radius:12px;color:#806d9a;font-weight:700}.auth-switch button.active{background:white;color:var(--ink);box-shadow:0 3px 10px #59418015}.stack-form{display:grid;gap:18px}.stack-form label,.modal-fields label{font-weight:700;font-size:.9rem;display:grid;gap:9px}.stack-form input,.modal-fields input,.modal-fields textarea,.space-control select{width:100%;background:white;border:1px solid #ddd3ea;border-radius:13px;padding:14px 16px;color:var(--ink);outline:0}.stack-form input:focus,.modal-fields input:focus,.modal-fields textarea:focus,.space-control select:focus{border-color:#9a77de;box-shadow:0 0 0 3px #ac8ce12e}.primary-btn,.secondary-btn{border:0;padding:13px 20px;min-height:46px;border-radius:14px;font-weight:800;transition:transform .15s,background .15s;white-space:nowrap}.primary-btn{background:var(--purple);color:white}.primary-btn:hover{background:var(--purple-dark);transform:translateY(-1px)}.secondary-btn{background:white;color:var(--purple);border:1px solid var(--line)}.secondary-btn:hover{background:var(--lavender)}.wide{width:100%;display:flex;align-items:center;justify-content:space-between;margin-top:8px}.text-btn{background:none;border:0;color:var(--muted);font-weight:700}.text-btn:hover{color:var(--purple)}.topbar{max-width:1200px;margin:auto;padding:24px 30px;display:flex;justify-content:space-between;align-items:center}.logo{font-size:2rem;color:var(--purple);font-weight:800;font-family:Manrope;letter-spacing:-.07em;white-space:nowrap}.logo span{color:var(--ink)}.topbar-right{display:flex;align-items:center;gap:15px}.user-pill{font-size:.82rem;padding:10px 13px;border-radius:35px;background:white;border:1px solid var(--line);max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container{max-width:1200px;margin:auto;padding:0 30px 80px}.hero{border-radius:28px;display:flex;justify-content:space-between;align-items:center;background:radial-gradient(circle at 72% 35%,#e2d4fa 0,#f1eafa 35%,#faeefa 100%);padding:clamp(25px,5vw,55px);min-height:260px;overflow:hidden;position:relative}.hero h1{font-size:clamp(2.2rem,4.5vw,3.9rem);line-height:1.16;margin:18px 0}.hero h1 em{color:var(--purple);font-style:normal}.hero p{color:#756c85;max-width:440px;line-height:1.7;margin-bottom:0}.hero-gift{font-size:clamp(6rem,12vw,10rem);filter:drop-shadow(6px 18px 8px #8a5cb326);transform:rotate(-11deg);margin-right:2vw}.spacebar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:28px 0;border-bottom:1px solid var(--line)}.space-control{display:flex;align-items:center;gap:12px}.space-control label{color:var(--muted);font-weight:800}.space-control select{min-width:210px;padding:10px 13px;background:white}.space-actions{display:flex;gap:10px;flex-wrap:wrap}.section-head{display:flex;justify-content:space-between;align-items:end;margin:34px 0 20px}.section-head h2{margin:7px 0 0;font-size:1.7rem}.member-counter{font-size:.8rem;color:var(--muted);background:white;padding:9px 12px;border:1px solid var(--line);border-radius:20px}.member-tabs{display:flex;gap:12px;overflow-x:auto;padding:3px 0 14px;scrollbar-color:#d8c9ed transparent}.member-tab{display:flex;align-items:center;gap:11px;background:white;color:var(--ink);padding:9px 15px 9px 9px;border:1px solid var(--line);border-radius:100px;min-width:max-content;font-weight:800}.member-tab.active{border-color:#9271cf;background:#f3edfd;box-shadow:0 0 0 3px #e8ddf7}.avatar{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#ddcef3;color:#673da8;font-weight:800}.member-tab:nth-child(3n) .avatar{background:#ffddd1;color:#b06a51}.member-tab:nth-child(3n+2) .avatar{background:#d9ece9;color:#35796d}.wishlist-heading{margin:34px 0 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}.wishlist-heading h2{margin:0 0 6px;font-size:1.6rem}.wishlist-heading p{margin:0;color:var(--muted)}.wishes-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}.wish-card{display:flex;flex-direction:column;min-width:0;background:white;border-radius:21px;border:1px solid #eee6f5;overflow:hidden;box-shadow:var(--shadow)}.wish-media{height:185px;background:linear-gradient(135deg,#f0e7ff,#fce8eb);display:flex;align-items:center;justify-content:center;position:relative}.wish-media img{width:100%;height:100%;object-fit:cover}.wish-placeholder{font-size:4.5rem;transform:rotate(-10deg)}.wish-label{position:absolute;top:12px;left:12px;background:#ffffffea;color:#7e5aaa;font-size:.74rem;font-weight:800;padding:8px 12px;border-radius:99px;backdrop-filter:blur(6px)}.wish-label.reserved{background:#fff2df;color:#9e692b}.wish-body{padding:19px;display:flex;flex-direction:column;flex:1}.wish-title{font-size:1.16rem;margin:0 0 8px;overflow-wrap:anywhere}.wish-notes{font-size:.88rem;line-height:1.6;color:var(--muted);margin:0 0 12px;overflow-wrap:anywhere;flex:1}.wish-price{font-size:1.02rem;font-weight:800;color:#805bbd;margin-bottom:16px}.wish-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.wish-actions .primary-btn,.wish-actions .secondary-btn{flex:1;min-height:42px;padding:11px}.small-link{display:inline-flex;gap:5px;align-items:center;text-decoration:none;font-size:.84rem;font-weight:800;color:var(--purple)}.small-link:hover{text-decoration:underline}.empty-space,.empty-wishes{border:1px dashed #d7c8ee;background:#fff9ff;text-align:center;padding:55px 22px;border-radius:24px;margin-top:27px}.empty-space h2,.empty-wishes h3{font-size:1.6rem;margin:9px}.empty-space p,.empty-wishes p{color:var(--muted);line-height:1.7;max-width:460px;margin:10px auto 22px}.empty-icon{font-size:3.5rem}.footer{border-top:1px solid var(--line);text-align:center;color:#9e94aa;font-size:.85rem;padding:24px}.toast{position:fixed;bottom:26px;left:50%;transform:translate(-50%,25px);z-index:100;background:#3f3059;color:white;padding:13px 19px;border-radius:13px;max-width:min(90vw,500px);opacity:0;pointer-events:none;transition:all .25s;box-shadow:0 10px 30px #21122a30;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:#9c425d}.modal{border:0;padding:0;background:transparent;max-width:min(94vw,520px);width:100%;overflow:visible}.modal::backdrop{background:#261b3b92;backdrop-filter:blur(5px)}.modal-card{border-radius:22px;padding:27px;background:white;box-shadow:0 25px 80px #21133b38;max-height:90vh;overflow-y:auto}.modal-head{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:20px}.modal-head h2{margin:0;font-size:1.6rem}.close-btn{background:#f3edf8;border:0;border-radius:50%;width:36px;height:36px;flex:none;color:var(--muted)}.modal-fields{display:grid;gap:16px}.modal-fields textarea{resize:vertical;min-height:85px}.modal-fields p{margin:0;color:var(--muted);line-height:1.6}.modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:23px;flex-wrap:wrap}.danger-btn{border:0;background:#fff0f1;color:#bb5262;font-weight:800;border-radius:12px;padding:13px}.notice{margin-top:15px;background:#efe7fa;border-radius:14px;padding:14px;line-height:1.6}.tiny-help{font-size:.78rem;color:var(--muted);line-height:1.6}.loading{color:var(--muted);padding:30px}.status-line{font-size:.82rem;color:#8c779e;margin-top:8px}.linkbox{font-size:.8rem;color:#806f94;overflow-wrap:anywhere;background:#faf6fd;padding:12px;border-radius:12px;border:1px solid var(--line)}
@media(max-width:940px){.wishes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-gift{font-size:7rem}.auth-decoration{padding:38px}}@media(max-width:640px){.auth-layout{grid-template-columns:1fr}.auth-decoration{min-height:170px;padding:25px 25px 15px}.auth-decoration h1{font-size:3.6rem}.auth-decoration p{font-size:.95rem;margin:0}.sparkle,.decoration-stickers{display:none}.auth-panel{padding:30px 24px 50px}.topbar{padding:20px}.logo{font-size:1.6rem}.user-pill{display:none}.container{padding:0 17px 60px}.hero{padding:26px;min-height:220px}.hero h1{font-size:2.2rem}.hero-gift{font-size:4.5rem;position:absolute;right:0;bottom:-17px;opacity:.42}.hero p{position:relative;max-width:78%;font-size:.87rem}.spacebar{align-items:stretch}.space-control{justify-content:space-between}.space-control select{min-width:0;flex:1}.space-actions{display:grid;grid-template-columns:repeat(2,1fr)}.space-actions #invite-btn{grid-column:span 2}.space-actions .secondary-btn{padding:12px 8px;font-size:.81rem}.section-head{align-items:center}.section-head h2{font-size:1.25rem}.member-counter{font-size:.72rem}.wishlist-heading{align-items:flex-start}.wishlist-heading h2{font-size:1.3rem}.wishlist-heading .primary-btn{font-size:.8rem;padding:11px}.wishes-grid{grid-template-columns:1fr}.wish-media{height:210px}.modal-card{padding:20px}}

/* Денежные желания: цель накоплений, прогресс и предпочтение вместо вещей. */
.wish-type-switch{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.wish-type-pill{display:flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;padding:11px 8px;border:1px solid #e4d7ef;border-radius:13px;background:#f9f5ff;color:#66527c;font-weight:750;text-align:center;font-size:.86rem}
.wish-type-pill:has(input:checked){border-color:#aa78de;background:#efe5fc;color:#7040a8;box-shadow:inset 0 0 0 1px #aa78de}
.wish-type-pill input{width:auto;accent-color:#8d5ac1;margin:0 3px 0 0}
.wish-kind-fields{display:grid;gap:16px}
.fund-card .wish-media{background:linear-gradient(130deg,#ece2ff,#fbe5f1 60%,#fff2d8)}
.fund-card .wish-placeholder{transform:none}
.fund-goal{font-weight:850;color:#7d55b2;font-size:1.03rem;margin:4px 0 10px}
.fund-progress{height:10px;border-radius:99px;background:#ede2fa;overflow:hidden;margin:4px 0 7px}
.fund-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#c17bec,#8d5cc6);transition:width .2s ease}
.fund-progress-note{font-size:.8rem;color:#786888;margin-bottom:14px}
.fund-preference{background:#faf2ff;border:1px solid #ead8f7;border-radius:13px;padding:12px;font-size:.86rem;line-height:1.45;color:#754c9a;margin-bottom:14px}
@media(max-width:380px){.wish-type-switch{grid-template-columns:1fr}}


/* Версия 2: компактные адаптивные карточки без потери функциональности */
.wish-label{position:static;align-self:flex-start;display:inline-flex;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 10px;border-radius:999px;background:#f5ecff;color:#8057ad;backdrop-filter:none;font-size:.69rem;line-height:1.3;margin-bottom:9px}
.wish-label.reserved{background:#fff1df;color:#98632d}
.wish-title{line-height:1.4}
.wish-notes{flex:initial}
.wish-expand{display:none;background:none;border:0;padding:0;color:#8a63bf;font-size:.72rem;font-weight:800;line-height:1.4;text-align:left}
.wish-actions{margin-top:auto}

@media(max-width:640px){
  .wishlist-heading{margin:24px 0 14px;align-items:center;gap:9px}
  .wishlist-heading h2{font-size:1.18rem;margin-bottom:4px}
  .wishlist-heading p{font-size:.77rem;line-height:1.35}
  .wishlist-heading .primary-btn{min-height:40px;padding:10px 12px;font-size:.75rem;border-radius:12px}
  .wishes-grid{grid-template-columns:1fr;gap:12px}
  .wish-card{display:grid;grid-template-columns:100px minmax(0,1fr);border-radius:17px;box-shadow:0 7px 19px rgba(83,48,123,.06)}
  .wish-media{width:100px;height:auto;min-height:151px;align-self:stretch;background:linear-gradient(140deg,#eee4fb,#fbe8ed)}
  .wish-placeholder{font-size:2.85rem;transform:rotate(-8deg)}
  .fund-card .wish-placeholder{transform:none}
  .wish-body{padding:12px 12px 11px;gap:0;min-width:0}
  .wish-label{font-size:.61rem;padding:4px 8px;margin-bottom:6px}
  .wish-title{font-size:.94rem;line-height:1.34;letter-spacing:-.03em;font-weight:800;margin:0 0 6px}
  .wish-title.clamped:not(.expanded){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .wish-expand{display:inline-flex;align-self:flex-start;margin:-3px 0 5px}
  .wish-notes{font-size:.72rem;line-height:1.35;margin:0 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .wish-price{font-size:.91rem;font-weight:850;margin:0 0 9px}
  .wish-actions{gap:6px;flex-wrap:wrap;margin-top:auto}
  .wish-actions .primary-btn,.wish-actions .secondary-btn{font-size:.74rem;min-height:36px;border-radius:11px;padding:8px 9px;flex:0 1 auto}
  .wish-actions .small-link{font-size:.73rem;white-space:nowrap}
  .fund-goal{font-size:.8rem;margin:1px 0 5px}
  .fund-progress{height:6px;margin:2px 0 5px}
  .fund-progress-note{font-size:.68rem;line-height:1.4;margin-bottom:7px}
  .fund-preference{padding:7px 8px;font-size:.69rem;line-height:1.35;border-radius:9px;margin-bottom:8px}
  .spacebar{padding:17px 0}
}
@media(max-width:365px){
  .wish-card{grid-template-columns:86px minmax(0,1fr)}
  .wish-media{width:86px;min-height:140px}
  .wish-body{padding:10px}
  .wish-actions .primary-btn,.wish-actions .secondary-btn{font-size:.69rem}
  .wishlist-heading .primary-btn{font-size:.7rem;padding:9px 10px}
}
