:root{--berry:#B6657C;--berry-dark:#97475f;--berry-light:#f8edf0;--bg:#FAF9F7;--ink:#292629;--muted:#857d80;--line:#eee9e7;--surface:#fff;--surface-alt:#f5f1ef;--radius:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none;-webkit-tap-highlight-color:transparent}*{box-sizing:border-box}html{height:100%;scroll-behavior:smooth}body{margin:0;min-height:100%;background:var(--bg)}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #b6657c80;outline-offset:2px}button:disabled{opacity:.5;cursor:not-allowed}input,textarea{font-size:16px;width:100%;border:1px solid #e9e3e1;border-radius:13px;padding:13px 14px;color:var(--ink);background:var(--surface);outline:none;transition:border .2s,box-shadow .2s}input:focus,textarea:focus{border-color:var(--berry);box-shadow:0 0 0 3px #b6657c20}textarea{min-height:95px;resize:vertical}label{font-weight:600;font-size:13px;display:block;margin:16px 0 8px}label small{font-weight:400;color:var(--muted)}.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:.23em;font-weight:700;color:var(--berry)}.fineprint{font-size:12px;line-height:1.5;color:var(--muted);text-align:center}.auth{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:32px 20px}.auth-content{width:100%;max-width:420px}.hero-mark{font-size:65px;line-height:1;font-weight:750;letter-spacing:-.095em;color:var(--ink);margin-bottom:25px}.hero-mark span,.wordmark span{color:var(--berry)}h1{font-size:clamp(32px,8vw,43px);line-height:1.08;letter-spacing:-.055em;margin:13px 0}h2,h3,p{margin-top:0}.auth-content>.muted{line-height:1.6;font-size:14px;margin-bottom:30px}.auth-panel{background:var(--surface);border:1px solid var(--line);padding:20px;border-radius:24px;box-shadow:0 15px 50px #38222908}.switch-row{display:flex;padding:4px;border-radius:12px;background:var(--surface-alt);gap:3px}.switch{flex:1;border:0;background:transparent;padding:11px 8px;border-radius:9px;font-size:13px;font-weight:600;color:var(--muted)}.switch.active{color:var(--ink);background:white;box-shadow:0 1px 5px #0000000e}.primary{border:0;border-radius:14px;background:var(--berry);color:white;padding:15px 19px;font-weight:700;min-height:50px;box-shadow:0 4px 14px #b6657c23;transition:transform .22s cubic-bezier(.2,1.5,.5,1),background .2s}.primary:active{transform:scale(.97)}.primary:hover{background:var(--berry-dark)}.full{width:100%;margin-top:24px;display:flex;align-items:center;justify-content:center;gap:12px}.app{max-width:680px;margin:auto;min-height:100dvh;padding-bottom:calc(106px + env(safe-area-inset-bottom))}.topbar{height:77px;padding:18px 21px 12px;display:flex;align-items:center;justify-content:space-between}.wordmark{border:0;background:none;font-weight:790;font-size:32px;letter-spacing:-.075em;padding:0}.avatar{border:1px solid #e9d8df;background:var(--berry-light);color:var(--berry-dark);width:42px;height:42px;border-radius:50%;font-weight:700}.main{padding:13px 20px 40px}.page-head{margin:5px 0 21px}.page-head h1{font-size:33px;letter-spacing:-.05em;margin:6px 0}.page-head .muted{font-size:13px}.search{position:relative;margin:10px 0 20px}.search input{padding-left:44px;background:var(--surface-alt);border-color:transparent}.search:before{content:'⌕';position:absolute;left:15px;top:5px;color:var(--muted);font-size:29px}.card-list{display:flex;flex-direction:column;gap:10px}.wine-card,.feed-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 4px 20px #352c2f04}.wine-card{padding:14px;display:flex;align-items:center;gap:14px;text-align:left;width:100%;min-height:90px}.bottle-icon{width:52px;height:60px;border-radius:13px;background:var(--berry-light);display:grid;place-items:center;flex:none;color:var(--berry);font-size:28px}.wine-main{flex:1;min-width:0}.wine-name{font-weight:690;font-size:15px;line-height:1.3;overflow-wrap:anywhere}.wine-meta{font-size:12px;color:var(--muted);margin-top:5px}.wine-score{color:var(--berry-dark);font-weight:700;font-size:13px;margin-top:5px}.chev{color:#c4b8bc;font-size:23px}.bottom-nav{height:calc(72px + env(safe-area-inset-bottom));padding:7px 15px calc(7px + env(safe-area-inset-bottom));position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;gap:2px;background:#faf9f7ed;border-top:1px solid var(--line);backdrop-filter:blur(18px);z-index:5}.tab{border:0;background:none;color:#998f92;font-size:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:50px;width:90px;font-weight:600}.tab.active{color:var(--berry)}.tab-icon{font-size:25px;line-height:1}.fab{position:fixed;z-index:6;bottom:calc(89px + env(safe-area-inset-bottom));right:max(20px,calc((100vw - 640px)/2));width:62px;height:62px;border-radius:20px;background:var(--berry);color:white;border:3px solid var(--bg);box-shadow:0 12px 22px #8a3c5660;display:grid;place-items:center;transition:transform .3s cubic-bezier(.2,1.7,.5,1)}.fab span{font-weight:300;font-size:38px;line-height:1}.fab:active{transform:scale(.88) rotate(8deg)}.sheet-layer{position:fixed;inset:0;z-index:10;display:flex;align-items:flex-end;justify-content:center}.sheet-backdrop{position:absolute;inset:0;background:#20181d77;animation:fadeIn .18s ease}.sheet{position:relative;background:var(--bg);border-radius:26px 26px 0 0;width:100%;max-width:680px;max-height:94dvh;overflow-y:auto;overscroll-behavior:contain;padding:10px 20px calc(25px + env(safe-area-inset-bottom));box-shadow:0 -12px 50px #0002;animation:sheetIn .35s cubic-bezier(.2,1,.3,1)}.sheet-grab{width:35px;height:4px;border-radius:9px;background:#d8d1d1;margin:0 auto 16px}.sheet-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.sheet-top h2{font-size:24px;letter-spacing:-.04em;margin:0}.plain-btn{width:38px;height:38px;border:none;border-radius:12px;background:var(--surface-alt);color:var(--muted);font-weight:600}.subtle-btn{padding:12px;border:0;border-radius:12px;background:var(--berry-light);color:var(--berry-dark);font-weight:650}.form-row{display:flex;gap:12px}.form-row>div{flex:1;min-width:0}.stars{display:flex;justify-content:center;align-items:center;gap:0;margin:10px auto 5px;max-width:360px;touch-action:manipulation}.star-button{background:transparent;border:none;color:#d7cdcf;font-size:43px;min-height:54px;flex:1;max-width:70px;transition:transform .24s cubic-bezier(.2,1.7,.5,1),color .15s;line-height:1}.star-button.selected{color:var(--berry)}.star-button:active{transform:scale(1.3) rotate(-8deg)}.rating-label{text-align:center;color:var(--muted);font-size:12px;min-height:22px}.optional-toggle{background:transparent;border:0;color:var(--berry-dark);font-weight:650;font-size:13px;padding:14px 0}.suggestions{display:flex;flex-direction:column;gap:5px;margin-top:6px}.suggestion{border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:white;text-align:left;font-size:13px;min-height:44px}.suggestion.selected{border-color:var(--berry);background:var(--berry-light)}.pill{display:inline-flex;align-items:center;padding:4px 9px;border-radius:15px;background:var(--berry-light);color:var(--berry-dark);font-size:11px;font-weight:650}.feed-card{padding:16px;margin:12px 0}.feed-author{display:flex;align-items:center;gap:10px;margin-bottom:15px}.mini-avatar{width:36px;height:36px;background:var(--berry-light);border-radius:50%;color:var(--berry-dark);display:grid;place-items:center;font-weight:700;flex:none}.feed-author strong{display:block;font-size:13px}.feed-author .muted{font-size:11px;margin-top:3px}.feed-content{display:flex;gap:13px;align-items:center;cursor:pointer}.feed-content .bottle-icon{height:67px;width:55px}.feed-note{font-size:13px;line-height:1.5;margin:10px 0}.feed-actions{display:flex;align-items:center;gap:7px;margin-top:14px;border-top:1px solid var(--line);padding-top:12px}.like-btn{border:0;background:transparent;font-size:25px;color:var(--muted);padding:2px 6px 2px 0;min-height:38px;transition:transform .28s cubic-bezier(.2,1.8,.5,1)}.like-btn.liked{color:var(--berry)}.like-btn.pop{animation:heartPop .35s}.feed-actions .muted{font-size:12px}.note-private{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-top:7px}.detail-title{font-size:24px;margin:0 0 7px;letter-spacing:-.04em}.detail-tasting{border:1px solid var(--line);background:white;border-radius:15px;padding:14px;margin:10px 0}.detail-tasting .muted{font-size:12px}.detail-note{font-size:13px;margin:8px 0 0;line-height:1.5}.detail-buttons{display:flex;gap:8px;margin-top:10px}.detail-buttons button{flex:1}.empty{margin-top:25px;padding:35px 18px;text-align:center;background:var(--surface);border-radius:20px;border:1px dashed #e9dade}.empty .big{font-size:42px;color:var(--berry);margin:4px 0 18px}.empty h3{margin:0 0 8px}.empty p{font-size:13px;color:var(--muted);line-height:1.55}.toast{position:fixed;top:calc(13px + env(safe-area-inset-top));left:50%;transform:translate(-50%,-130%);transition:transform .4s cubic-bezier(.2,1.3,.5,1);background:var(--ink);color:white;padding:12px 18px;border-radius:14px;font-size:13px;z-index:20;max-width:90%;text-align:center;pointer-events:none}.toast.show{transform:translate(-50%,0)}.checkline{display:flex;align-items:center;gap:10px;margin:18px 0}.checkline input{width:19px;height:19px;accent-color:var(--berry)}.checkline label{margin:0;font-weight:500;flex:1}.profile-row{display:flex;align-items:center;gap:12px;padding:15px;background:var(--surface);border-radius:15px}.profile-row strong{font-size:18px}.signout{margin-top:15px;background:transparent;border:0;color:var(--muted);padding:15px}.error-line{font-size:12px;color:#a63652;min-height:18px;margin-top:8px}.soft-success{animation:successPulse .5s}.small-link{border:0;background:none;color:var(--berry);padding:0;font-weight:650}.section-title{font-size:13px;font-weight:750;margin:21px 0 10px}.meta-line{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}.meta-line span:first-child{color:var(--muted)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes sheetIn{from{transform:translateY(45px);opacity:.5}to{transform:translateY(0);opacity:1}}@keyframes heartPop{0%{transform:scale(1)}45%{transform:scale(1.38) rotate(-12deg)}100%{transform:scale(1)}}@keyframes successPulse{0%{transform:scale(.95)}55%{transform:scale(1.04)}100%{transform:scale(1)}}@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}@media(max-width:355px){.main{padding-left:14px;padding-right:14px}.sheet{padding-left:14px;padding-right:14px}.star-button{font-size:37px}}

/* Wine 0.1.2 – account recovery */
.auth-helper{display:block;margin:12px auto 0;border:0;background:transparent;color:var(--berry-dark);font-size:13px;font-weight:650;padding:11px 12px;min-height:44px}
#reset-form .fineprint,#password-change-form .fineprint,#admin-users+.fineprint{text-align:left}
#admin-users select{width:100%;min-height:48px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px;color:var(--ink);font-size:16px}
#admin-reset-result{margin-top:14px;overflow-wrap:anywhere}
#admin-reset-code,#invite-code{font-size:14px;letter-spacing:.025em}

/* Wine photo upload 0.1.3 */
.wine-thumb{width:52px;height:60px;object-fit:cover;flex:none;border-radius:13px;background:var(--berry-light)}
.feed-content .wine-thumb{height:67px;width:55px}
.photo-picker{margin:14px 0 6px}.photo-upload{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:12px 16px;border-radius:14px;background:var(--berry-light);color:var(--berry-dark);font-size:13px;font-weight:680;cursor:pointer}.photo-upload span{font-size:11px;font-weight:400;color:var(--muted)}
.visually-hidden-file{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;pointer-events:none}
.photo-preview,.detail-photo-gallery{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}
.photo-preview-item,.detail-photo{position:relative;width:76px;height:91px;border-radius:12px;overflow:hidden;background:var(--berry-light)}
.photo-preview-item img,.detail-photo img{width:100%;height:100%;object-fit:cover;display:block}
.photo-remove,.detail-photo button{position:absolute;top:3px;right:3px;width:27px;height:27px;border:0;border-radius:50%;background:#292629c9;color:white;font-size:21px;line-height:1}
.detail-photo-add{display:grid;place-items:center;position:relative;width:76px;height:91px;background:var(--berry-light);border-radius:12px;color:var(--berry-dark);font-size:12px;font-weight:650;cursor:pointer;overflow:hidden}
.detail-photo-add input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.detail-photo-add.uploading{opacity:.55;pointer-events:none}
@media(prefers-reduced-motion:reduce){.photo-preview-item,.detail-photo{transition:none}}

/* Wine 0.1.4 – soft, borderless mobile-first design */
:root{--surface-alt:#f5f1f0;--soft-shadow:0 8px 28px rgba(47,26,36,.055)}
html,body,.app,#main,.sheet,#sheet-body{max-width:100%;min-width:0}
#sheet-body,#sheet-body form,.compact-fields,.feed-content>div,.profile-row>div{min-width:0}
#sheet-body input:not([type="checkbox"]):not([type="file"]),#sheet-body textarea,#sheet-body select{max-width:100%;min-width:0}
#sheet-body form{width:100%}
.sheet{width:100%;max-width:min(680px,100vw);padding-left:clamp(15px,4.5vw,24px);padding-right:clamp(15px,4.5vw,24px);overflow-x:clip}
.auth-panel,.wine-card,.feed-card,.detail-tasting,.empty,.profile-row{border:0;box-shadow:var(--soft-shadow)}
.auth-panel,.feed-card,.wine-card,.detail-tasting{background:#fff}
.bottom-nav{border:0;box-shadow:0 -5px 30px #44303d0c}
.feed-actions{border:0;padding-top:9px}
.meta-line{border:0}
input,textarea,select{background:#f5f2f1;border:1px solid transparent;box-shadow:none;max-width:100%}
input:focus,textarea:focus,select:focus{border-color:transparent;box-shadow:0 0 0 3px #b6657c22}
.suggestion{border:0;background:#f6f2f1}
.suggestion.selected{border:0}
.empty{border:0;background:white}
.sheet-top,.feed-author,.profile-row{min-width:0}
.profile-row>div,.feed-author>div,.feed-content>div{min-width:0;overflow-wrap:anywhere}
.form-row{width:100%;min-width:0;flex-wrap:wrap}
.form-row>div{min-width:0;flex:1 1 120px}
.compact-fields{background:#fff;border-radius:18px;padding:5px 14px;margin:14px 0 20px;box-shadow:var(--soft-shadow);width:100%}
.compact-line{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:58px;min-width:0}
.compact-line+.compact-line{border-top:1px solid #29262908}
.compact-line label,.compact-caption{margin:0;font-size:13px;font-weight:580;white-space:normal;min-width:0;flex:1}
.compact-line .compact-select{width:112px;max-width:45%;min-height:43px;padding:7px 9px;background:#f7f4f3;border:0;border-radius:11px;font-size:16px;flex:none;color:var(--ink)}
.date-text{border:0;background:#f7f4f3;border-radius:11px;padding:10px 12px;min-height:42px;min-width:0;max-width:57%;font-size:14px;color:var(--berry-dark);font-weight:650;text-align:right}
.date-native{position:absolute!important;right:0;top:50%;width:1px!important;height:1px!important;opacity:0;pointer-events:none;padding:0!important;border:0!important}
.price-wrap{display:flex;align-items:center;gap:7px;flex:none;min-width:0;background:#f7f4f3;padding:0 11px;border-radius:11px;max-width:45%}
.price-wrap input{width:75px!important;max-width:calc(100% - 19px)!important;padding:10px 0!important;background:transparent!important;border:0!important;text-align:right;font-size:16px;box-shadow:none!important}
.price-wrap>span{color:var(--muted);font-weight:600}
.stars{max-width:340px;gap:3px;width:100%;margin:12px auto 7px}
.heart-button{display:grid;place-items:center;flex:1;min-width:0;min-height:57px;border:0;background:transparent;padding:7px 0;touch-action:manipulation;transition:transform .24s cubic-bezier(.22,1.55,.42,1)}
.heart-button:active{transform:scale(1.15) rotate(-5deg)}
.heart-symbol{display:inline-block;width:30px;height:36px;position:relative;flex:none;color:var(--berry)}
.heart-shape{position:absolute;inset:0;background:var(--berry);-webkit-mask:url('/assets/heart.svg') center / contain no-repeat;mask:url('/assets/heart.svg') center / contain no-repeat}
.heart-empty{background:#ded5d9}
.heart-fill{position:absolute;left:0;top:0;height:100%;width:var(--fill);overflow:hidden}
.heart-fill .heart-shape{width:30px;height:36px;inset:auto;top:0;left:0}
.heart-button .heart-symbol{width:clamp(30px,8vw,37px);height:44px}
.heart-button .heart-shape{width:100%;height:100%;-webkit-mask-size:contain;mask-size:contain}
.heart-button .heart-fill .heart-shape{width:clamp(30px,8vw,37px);height:44px}
.hearts-readonly{display:inline-flex;align-items:center;gap:2px;max-width:100%;white-space:nowrap}
.hearts-compact .heart-symbol{width:13px;height:17px}
.hearts-compact .heart-fill .heart-shape{width:13px;height:17px}
.heart-number{font-size:12px;color:var(--berry-dark);font-weight:700;padding-left:4px}
.editor-wine-name{font-size:13px;overflow-wrap:anywhere}
.wine-gallery{margin:18px 0}
.main-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.main-photo{position:relative;min-width:0}
.photo-open{display:flex;position:relative;flex-direction:column;border:0;background:#f2edeb;padding:0;min-width:0;width:100%;overflow:hidden;border-radius:13px;text-align:left}
.photo-open img{width:100%;aspect-ratio:3/4;object-fit:cover;display:block}
.photo-credit{font-size:10px;color:#594f55;line-height:1.25;padding:6px 5px;overflow-wrap:anywhere;width:100%;min-height:32px}
.photo-main-remove{position:absolute;top:4px;right:4px;border:0;border-radius:50%;background:#292629c9;color:#fff;width:26px;height:26px;font-size:18px;z-index:1}
.wine-lightbox{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom)}
.lightbox-shade{position:absolute;inset:0;background:#21171dc4;backdrop-filter:blur(12px)}
.lightbox-frame{position:relative;max-width:540px;width:min(100%,540px);display:flex;align-items:center;justify-content:center;max-height:82dvh;border-radius:20px;overflow:hidden;box-shadow:0 18px 75px #160d1680;animation:lightboxAppear .22s ease-out}
.lightbox-frame img{display:block;max-width:100%;max-height:82dvh;width:auto;height:auto;object-fit:contain;border-radius:17px}
.lightbox-close{position:absolute;z-index:2;top:8px;right:8px;width:42px;height:42px;border:0;border-radius:50%;background:#282026b8;color:#fff;font-size:28px;line-height:1}
@keyframes lightboxAppear{from{opacity:.4;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
@media(max-width:370px){.main-photo-grid{gap:6px}.compact-fields{padding:4px 9px}.compact-line{gap:5px}.compact-line .compact-select{width:100px}.price-wrap{padding:0 7px}.heart-button{min-width:0}}
@media(prefers-reduced-motion:reduce){.lightbox-frame{animation:none}}
/* Native iOS date picker hit area matches the visible date text. */
.compact-line+.compact-line{border-top:0}
.date-native{right:0;top:50%;transform:translateY(-50%);width:min(145px,57%)!important;height:44px!important;opacity:.001;pointer-events:auto;padding:0!important;z-index:2;cursor:pointer}
@supports (overflow:clip){.sheet{overflow-x:clip}}
