
    .collection-ui{
      --ink:#271c1c;--wine:#5d2434;--wine2:#7e3449;--brass:#ad7b32;
      --cream:#f7f1e8;--paper:#fffdf9;--line:#e5d8c8;--muted:#766b63;
      --green:#4e735e;--shadow:0 12px 32px #3c23231a;--tap:48px;--nav-h:82px;
    }
    .collection-ui *,.collection-ui *::before,.collection-ui *::after{box-sizing:border-box}
    .collection-ui{-webkit-text-size-adjust:100%;text-size-adjust:100%}
    .collection-ui,.collection-ui{min-width:0;max-width:100%;margin:0}
    .collection-ui{background:var(--cream);color:var(--ink);font:17px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
    .collection-ui button,.collection-ui input,.collection-ui select,.collection-ui textarea{font:inherit;font-size:16px;max-width:100%}
    .collection-ui button{cursor:pointer;border:0;color:inherit;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}
    .collection-ui img,.collection-ui svg,.collection-ui video,.collection-ui canvas{display:block;max-width:100%;height:auto}

    .collection-ui .app{width:100%;margin:auto;padding:0 16px calc(var(--nav-h) + 22px + env(safe-area-inset-bottom,0px))}
    .collection-ui .topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:68px;padding:12px 0;background:#f7f1e8ed;backdrop-filter:blur(12px);border-bottom:1px solid #e5d8c899}
    .collection-ui .brand-wrap{display:flex;align-items:center;gap:10px;min-width:0}
    .collection-ui .brand-mark{display:grid;flex:0 0 42px;width:42px;height:42px;place-items:center;border-radius:12px;background:var(--wine);box-shadow:inset 0 0 0 1px #fff4;color:var(--cream);font:700 26px/1 Georgia,serif}
    .collection-ui .brand{min-width:0;color:var(--wine);font:700 21px/1.05 Georgia,serif;letter-spacing:-.3px;overflow-wrap:anywhere}
    .collection-ui .brand small{display:block;margin-top:4px;color:var(--muted);font:12px system-ui}
    .collection-ui .lang{flex:0 0 auto;min-height:44px;padding:7px 9px;border:1px solid var(--line);border-radius:99px;background:var(--paper);color:var(--wine)}
    .collection-ui .view{min-width:0;padding-top:16px}

    .collection-ui .hero{padding:22px 18px;border-radius:18px;background:linear-gradient(130deg,#5d2434,#8b3b4f);box-shadow:var(--shadow);color:#fff}
    .collection-ui .hero h1{margin:0 0 7px;font:700 31px/1.1 Georgia,serif}.collection-ui .hero p{margin:0;color:#ffeeda;font-size:16px}
    .collection-ui .quick,.collection-ui .stats{display:grid;gap:10px;margin:14px 0}.collection-ui .quick{grid-template-columns:1fr}.collection-ui .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
    .collection-ui .quick button,.collection-ui .stat,.collection-ui .card,.collection-ui .panel{border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:var(--shadow)}
    .collection-ui .quick button{min-height:88px;padding:17px 16px;color:var(--wine);font-size:19px;font-weight:700;line-height:1.18;text-align:left;overflow-wrap:anywhere}
    .collection-ui .quick button span{display:block;margin-top:7px;color:var(--muted);font-size:14px;font-weight:400}
    .collection-ui .stat{min-width:0;min-height:82px;padding:14px;overflow-wrap:anywhere}.collection-ui .stat b{display:block;color:var(--wine);font:700 29px/1 Georgia,serif}.collection-ui .stat span{color:var(--muted);font-size:14px}
    .collection-ui .stat-action{width:100%;text-align:left;color:var(--ink)}.collection-ui .stat-action:active,.collection-ui .bottle-details:active{background:#f8f1e7}
    .collection-ui .city-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0 14px}.collection-ui .city-summary .stat{width:100%;min-height:94px;border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:var(--shadow);text-align:left;color:var(--ink)}.collection-ui .city-summary .stat b{font-size:22px}.collection-ui .city-summary .stat strong{display:block;margin-bottom:5px;color:var(--wine);font-size:16px;overflow-wrap:anywhere}.collection-ui .value-card{margin:10px 0 18px;padding:15px}.collection-ui .value-card b{display:block;color:var(--wine);font-size:17px}.collection-ui .value-lines{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.collection-ui .value-lines span{padding:6px 8px;border-radius:9px;background:#f4eee5;color:var(--wine);font-weight:700}
    .collection-ui .section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:21px 0 11px}.collection-ui .section-head h2{margin:0;color:var(--wine);font:700 25px/1 Georgia,serif}
    .collection-ui .primary,.collection-ui .secondary,.collection-ui .danger{min-height:var(--tap);padding:11px 14px;border-radius:10px;font-weight:700}
    .collection-ui .primary{background:var(--wine);color:#fff}.collection-ui .secondary{background:#f2e7d9;color:var(--wine)}.collection-ui .danger{background:#9f3c3c;color:#fff}
    .collection-ui .search{width:100%;min-height:var(--tap);margin-bottom:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
    .collection-ui .filters{display:flex;gap:8px;max-width:100%;padding-bottom:8px;overflow-x:auto;overscroll-behavior-x:contain}.collection-ui .filter{flex:0 0 auto;min-height:42px;padding:8px 11px;border-radius:99px;background:#efe4d4;color:var(--wine);white-space:nowrap}.collection-ui .filter.active{background:var(--wine);color:#fff}
    .collection-ui .cards{display:grid;grid-template-columns:1fr;gap:10px}.collection-ui .card{min-width:0;padding:11px;border-radius:16px}
    .collection-ui .bottle-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:center;min-height:84px}.collection-ui .bottle-details{display:grid;grid-template-columns:minmax(0,1fr) 45px;gap:12px;align-items:center;min-width:0;min-height:74px;padding:0;border-radius:11px;background:transparent!important;color:var(--ink)!important;text-align:left}
    .collection-ui .cover{display:grid;width:64px;height:74px;place-items:center;overflow:hidden;border:0;border-radius:10px;background:linear-gradient(145deg,#dfcfb7,#b58a56);color:#fff;font:27px Georgia,serif}.collection-ui .photo-trigger{padding:0;cursor:zoom-in}.collection-ui .photo-trigger:active{opacity:.7}.collection-ui .cover img,.collection-ui .details-cover img{width:100%;height:100%;object-fit:cover}
    .collection-ui .bottle-title{color:var(--ink);font-size:18px;font-weight:800;line-height:1.2;overflow-wrap:anywhere}.collection-ui .bottle-name{margin-top:3px;color:var(--muted);font-size:15px;line-height:1.22;overflow-wrap:anywhere}
    .collection-ui .badges,.collection-ui .wheel-options,.collection-ui .wheel-nav,.collection-ui .step,.collection-ui .actions{display:flex;flex-wrap:wrap;gap:8px}.collection-ui .badges{margin-top:6px;gap:5px}
    .collection-ui .badge{padding:4px 7px;border-radius:99px;background:#f1e5d5;color:var(--wine);font-size:12px}.collection-ui .badge.open{background:#e5f0e7;color:#2e6544}
    .collection-ui .score{color:var(--wine);font:700 24px Georgia,serif;text-align:right}.collection-ui .score small{display:block;margin-top:2px;color:var(--muted);font:10px system-ui}
    .collection-ui .empty{padding:30px 16px;border:1px dashed #c9b69e;border-radius:15px;color:var(--muted);text-align:center}

    .collection-ui .bottom-nav{position:fixed;z-index:10;right:0;bottom:0;left:0;min-height:var(--nav-h);padding:4px 0 env(safe-area-inset-bottom,0px);border-top:1px solid var(--line);background:#fffdf9fa;backdrop-filter:blur(12px)}
    .collection-ui .bottom-nav-inner{display:flex;width:100%;padding:0 4px}.collection-ui .nav-btn{display:grid;flex:1 1 0;min-width:0;min-height:78px;padding:8px 2px;place-items:center;background:none;color:var(--muted);font-size:14px;font-weight:700;line-height:1.1;text-align:center}.collection-ui .nav-btn b{display:block;font-size:26px;line-height:29px}.collection-ui .nav-btn.active{color:var(--wine)}.collection-ui .nav-full,.collection-ui .nav-direct-extra{display:none}.collection-ui .nav-short,.collection-ui .nav-more{display:block}

    .collection-ui .modal{position:fixed;z-index:20;inset:0;display:none;align-items:flex-end;justify-content:center;background:#28181878}.collection-ui .modal.show{display:flex}
    .collection-ui .sheet{width:100%;min-width:0;max-height:92dvh;padding:16px 16px calc(12px + env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain;border-radius:20px 20px 0 0;background:var(--paper);-webkit-overflow-scrolling:touch}
    .collection-ui .sheet-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;padding:8px 0 10px;background:var(--paper)}.collection-ui .sheet h2{min-width:0;margin:0;color:var(--wine);font:700 22px/1.1 Georgia,serif;overflow-wrap:anywhere}
    .collection-ui .close{flex:0 0 var(--tap);width:var(--tap);min-height:var(--tap);padding:0;background:none;color:var(--wine);font-size:27px}
    .collection-ui .form-grid{display:grid;grid-template-columns:1fr;gap:0;min-width:0}.collection-ui .field{display:grid;gap:5px;min-width:0;margin-bottom:10px}.collection-ui .field.full{grid-column:auto}.collection-ui .field label{color:var(--muted);font-size:14px;font-weight:700;overflow-wrap:anywhere}
    .collection-ui .field input,.collection-ui .field select,.collection-ui .field textarea{width:100%;min-width:0;min-height:var(--tap);padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:#fff}.collection-ui .field textarea{min-height:88px;resize:vertical}
    .collection-ui .actions{position:sticky;bottom:0;z-index:2;align-items:stretch;justify-content:flex-end;margin-top:12px;padding:12px 0 4px;background:var(--paper)}.collection-ui .actions>button{flex:1 1 136px;min-width:0;white-space:normal;overflow-wrap:anywhere}
    .collection-ui .details-cover{display:grid;width:100%;height:145px;place-items:center;overflow:hidden;border:0;border-radius:14px;background:linear-gradient(145deg,#dfcfb7,#b58a56);color:#fff;font:64px Georgia,serif}.collection-ui .photo-preview{display:block;width:100%;max-height:calc(100dvh - 150px);object-fit:contain;border-radius:12px;background:#171111}
    .collection-ui .stock-row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.collection-ui .stock{flex:1 1 120px;min-width:0;padding:10px;border-radius:10px;background:#f4eee5;text-align:center;overflow-wrap:anywhere}.collection-ui .stock b{display:block;color:var(--wine);font-size:18px}
    .collection-ui .divider{margin:18px 0;border:0;border-top:1px solid var(--line)}.collection-ui .mini{color:var(--muted);font-size:14px}.collection-ui .timeline{margin:0;padding:0;list-style:none}.collection-ui .timeline li{padding:9px 0;border-bottom:1px solid var(--line)}
    .collection-ui .step{align-items:center}.collection-ui .step input{flex:1 1 160px;min-width:0}.collection-ui .wheel-path{min-width:0;margin:7px 0;padding:10px;border-radius:10px;background:#f8f1e7;overflow-wrap:anywhere}.collection-ui .wheel-options{margin:10px 0}.collection-ui .wheel-option{min-height:var(--tap);padding:9px 12px;border-radius:99px;background:#efe4d4;color:var(--wine);font-weight:700}.collection-ui .wheel-option.selected{background:var(--wine);color:#fff}.collection-ui .wheel-nav{margin:9px 0}.collection-ui .wheel-nav .secondary{min-height:44px;padding:8px 11px}
    .collection-ui .score-grid{display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:8px;align-items:center}.collection-ui .score-grid input{width:78px;min-width:0;text-align:center}.collection-ui .total{padding:14px;border-radius:12px;background:#f4e7d9;color:var(--wine);font:700 22px Georgia,serif;text-align:center}
    .collection-ui .notice{position:fixed;z-index:30;bottom:calc(var(--nav-h) + 22px + env(safe-area-inset-bottom,0px));left:50%;display:none;width:calc(100% - 28px);max-width:560px;padding:10px 14px;transform:translateX(-50%);border-radius:10px;background:#2f2723;box-shadow:var(--shadow);color:#fff;font-size:15px;text-align:center}.collection-ui .notice.show{display:block}
    .collection-ui .score-row{margin:10px 0;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff}.collection-ui .score-help{margin-top:8px;color:var(--muted);font-size:15px}.collection-ui .score-help summary{cursor:pointer;color:var(--wine);font-size:16px;font-weight:700}.collection-ui .score-help ul{margin:8px 0 0;padding-left:18px}.collection-ui .score-help li{margin:5px 0}
    .collection-ui .external-tasting{margin-top:10px;padding:12px;border-radius:12px;background:#f8f1e7}.collection-ui .external-tasting[hidden]{display:none}.collection-ui .tasting-bottle-results{display:grid;gap:6px;margin-top:8px}.collection-ui .tasting-bottle-result{width:100%;min-height:var(--tap);padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:700;text-align:left}.collection-ui .tasting-bottle-result small{display:block;margin-top:2px;color:var(--muted);font-weight:400}.collection-ui .tasting-bottle-choice{margin-top:7px}
    .collection-ui .note-badge{display:inline-flex;align-items:center;min-height:36px;gap:5px;max-width:100%;border:0;cursor:pointer;overflow-wrap:anywhere}.collection-ui .note-badge span{font-size:16px;font-weight:800;line-height:11px}.collection-ui .tasting-row{display:block;width:100%;min-height:var(--tap);padding:2px 0;background:none;color:var(--ink);text-align:left}.collection-ui .tasting-row:active{opacity:.65}.collection-ui .tasting-scores{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.collection-ui .tasting-scores .stock:last-child{grid-column:1/-1}
    .collection-ui .more-menu{display:grid;gap:12px}.collection-ui .more-menu button{min-height:64px;font-size:18px;text-align:left}
    .collection-ui .photo-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.collection-ui .photo-thumb{position:relative;display:grid;aspect-ratio:1;place-items:center;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--cream);font-size:26px}.collection-ui .photo-expand{display:grid;width:100%;height:100%;place-items:center;padding:0;border:0;background:transparent}.collection-ui .photo-image,.collection-ui .photo-image img{display:block;width:100%;height:100%}.collection-ui .photo-thumb img{width:100%;height:100%;object-fit:cover}.collection-ui .photo-remove{position:absolute;top:4px;right:4px;width:32px;min-height:32px;padding:0;border-radius:50%;background:#5d2434;color:#fff;font-size:22px;line-height:1}

    @media (min-width:700px) and (hover:hover){
      .collection-ui .app{max-width:1100px;padding-inline:16px}.collection-ui .quick,.collection-ui .stats{grid-template-columns:repeat(4,minmax(0,1fr))}.collection-ui .quick button{min-height:unset;padding:16px 12px;font-size:15px}.collection-ui .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
      .collection-ui .modal{align-items:center}.collection-ui .sheet{width:min(700px,100%);padding:18px;border-radius:22px}.collection-ui .sheet-head,.collection-ui .actions{position:static;padding:0}.collection-ui .actions>button{flex:0 0 auto}.collection-ui .form-grid{grid-template-columns:1fr 1fr;gap:10px}.collection-ui .field.full{grid-column:1/-1}
      .collection-ui .nav-full,.collection-ui .nav-direct-extra{display:block}.collection-ui .nav-short,.collection-ui .nav-more{display:none}.collection-ui .bottom-nav-inner{max-width:720px}.collection-ui .nav-btn{min-height:58px;font-size:12px}.collection-ui .nav-btn b{font-size:19px;line-height:22px}
    }
  
.collection-ui [data-inline-style="1"]{margin-top:8px}
.collection-ui [data-inline-style="2"]{margin:10px 0}
.collection-ui [data-inline-style="3"]{margin-top:12px}
.collection-ui [data-inline-style="4"]{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.collection-ui [data-inline-style="5"]{margin-top:10px}
.collection-ui [data-inline-style="6"]{justify-content:start;flex-wrap:wrap}
.collection-ui [data-inline-style="7"]{margin-top:6px}
.collection-ui [data-inline-style="8"]{margin-top:4px}
/* A compact keyboard-first date, not a calendar requiring year-by-year scrolling. */
.collection-ui fieldset.bottling-date{margin:0;padding:0;border:0;min-width:0}
.collection-ui .bottling-date legend{padding:0;margin-bottom:6px;font-size:14px;color:var(--muted)}
.collection-ui .bottling-date-parts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr);gap:8px}
.collection-ui .bottling-date-parts label{display:block;min-width:0;margin:0}
.collection-ui .bottling-date-parts label>span{display:block;margin-bottom:4px;font-size:13px;color:var(--muted)}
.collection-ui .bottling-date input:not([type="hidden"]){width:100%;min-width:0;min-height:44px;font-size:16px}
.collection-ui .bottling-date [hidden]{display:none}
.collection-ui .bottling-date .mini{margin:6px 0;overflow-wrap:anywhere}
.collection-ui .bottling-date-toggle{min-height:44px;max-width:100%;white-space:normal;text-align:left;overflow-wrap:anywhere}

/* Every current city stays visible; long location names wrap instead of scrolling. */
.collection-ui .bottle-storage{display:grid;gap:5px;margin-top:8px;min-width:0}
.collection-ui .bottle-storage-row{display:flex;flex-wrap:wrap;gap:3px 8px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;background:#f4eee5;font-size:13px;line-height:1.4;overflow-wrap:anywhere;min-width:0}
.collection-ui .bottle-storage-row>strong,.collection-ui .bottle-storage-row>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
.collection-ui .bottle-storage-row>span{color:var(--muted)}
.collection-ui .storage-heading{display:block;margin-top:14px}

/* Tasting-only presentation. Keep stage identity independent of UI language. */
.collection-ui .sheet.tasting-sheet > .sheet-head{position:static}
.collection-ui [data-tasting-stage="aroma"]{
  --stage-accent:#875000;--stage-surface:#fff7e8;--stage-choice:#f8e5c4;--stage-border:#b67622;
}
.collection-ui [data-tasting-stage="palate"]{
  --stage-accent:#166760;--stage-surface:#edf8f5;--stage-choice:#d4eee7;--stage-border:#2c8175;
}
.collection-ui [data-tasting-stage="finish"]{
  --stage-accent:#654479;--stage-surface:#f7f0fb;--stage-choice:#e8dcef;--stage-border:#8b68a0;
}
.collection-ui .wheel-path.tasting-stage{
  margin:18px 0;padding:12px;border:1px solid var(--stage-border);
  border-inline-start:5px solid var(--stage-accent);border-radius:14px;background:var(--stage-surface);
}
.collection-ui .score-row.tasting-stage{
  border-color:var(--stage-border);border-inline-start:5px solid var(--stage-accent);background:var(--stage-surface);
}
.collection-ui .tasting-stage-title{display:block;font-size:19px;line-height:1.35;color:var(--stage-accent)}
.collection-ui .tasting-stage .score-grid>label{color:var(--stage-accent);font-weight:700}
.collection-ui .tasting-stage .wheel-option{
  border:1px solid var(--stage-border);background:var(--stage-choice);color:var(--stage-accent);
}
.collection-ui .selected-notes-title{
  display:flex;align-items:center;gap:8px;margin:12px 0 6px;color:var(--stage-accent);font-size:14px;font-weight:700;
}
.collection-ui .selected-notes-count{
  display:inline-grid;min-width:24px;min-height:24px;padding:1px 6px;place-items:center;
  border:1px solid var(--stage-border);border-radius:99px;background:#fff;
}
.collection-ui .tasting-stage .note-badge{
  gap:8px;min-height:44px;max-width:100%;padding:9px 10px;border:2px solid var(--stage-accent);
  border-radius:12px;background:var(--stage-accent);color:#fff;text-align:left;
}
.collection-ui .tasting-stage .note-badge .selected-note-label{
  min-width:0;font-size:14px;font-weight:600;line-height:1.35;overflow-wrap:anywhere;
}
.collection-ui .tasting-stage .selected-note-check{flex:none;align-self:center;font-size:18px;line-height:1}
/* Whiskybase score copied by hand next to the person's own tasting total. */
.collection-ui .whiskybase-block{margin:12px 0;padding:12px;border:1px solid rgba(0,0,0,.12);border-radius:12px}
.collection-ui .whiskybase-block .actions{margin-top:8px;flex-wrap:wrap}
.collection-ui .whiskybase-block .actions button{white-space:normal}
.collection-ui .whiskybase-compare .stock span{overflow-wrap:anywhere}
.collection-ui .whiskybase-failed,.collection-ui .whiskybase-error:not(:empty){color:#9b1c1c;font-weight:600}
.collection-ui .whiskybase-score-form .field{max-width:220px}

/* Gallery community surfaces. Private stock/photo/draft layouts stay scoped. */
.collection-ui .community-home-entry{margin:0 0 14px;width:100%}
.collection-ui .community-public-shell{max-width:700px;margin:auto;padding:20px max(16px,env(safe-area-inset-left)) 35px;min-width:0}
.collection-ui .community-public-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:22px}
.collection-ui .community-public-head h1{font-size:24px;margin:0;flex:1;min-width:0}
.collection-ui .community-public-head select{max-width:95px}
.collection-ui .community-post{background:var(--paper);border-radius:22px;padding:17px;margin:14px 0;min-width:0;overflow-wrap:anywhere}
.collection-ui .community-author{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--muted);margin-bottom:13px}
.collection-ui .community-photo{display:block;width:100%;max-height:330px;object-fit:contain;background:#dfe9e0;border-radius:16px;margin-bottom:16px}
.collection-ui .community-post h3{font-size:21px;line-height:1.25;margin:0 0 9px;overflow-wrap:anywhere}
.collection-ui .community-score{font-size:29px;font-weight:500;margin:12px 0}
.collection-ui .community-score small,.collection-ui .community-average small{font-size:15px;color:var(--muted);font-weight:400}
.collection-ui .community-note-row{border-top:1px solid var(--line);padding:11px 0;font-size:14px}
.collection-ui .community-note-row b{font-weight:500;color:var(--wine)}
.collection-ui .community-note-row p{margin:5px 0 0}
.collection-ui .community-comment{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.55}
.collection-ui .community-tabs,.collection-ui .community-reader-head{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}
.collection-ui .community-tabs>button{flex:1 1 110px;min-width:0;max-width:100%;white-space:normal}
.collection-ui .community-tabs button[aria-pressed=true],.collection-ui .community-note-filter[aria-pressed=true]{background:var(--wine);color:var(--paper)}
.collection-ui .community-neutral{display:flex;align-items:center;gap:14px;border-radius:22px;background:#dfe9e0;padding:20px;margin:15px 0;min-width:0}
.collection-ui .community-neutral>span{font:40px Georgia,serif;color:var(--wine)}
.collection-ui .community-neutral>div{min-width:0;overflow-wrap:anywhere}
.collection-ui .community-neutral h3{font-size:21px;margin:0}
.collection-ui .community-neutral p{margin:5px 0}
.collection-ui .community-average{font-size:48px;font-weight:500;letter-spacing:-1.5px;line-height:1.1;margin:13px 0}
.collection-ui .community-votes{padding:0;list-style:none}
.collection-ui .community-votes li{margin:6px 0}
.collection-ui .community-frequency,.collection-ui .community-note-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;align-items:center;margin:13px 0;font-size:14px;min-width:0}
.collection-ui .community-frequency meter,.collection-ui .community-note-filter meter{grid-column:1/-1;width:100%;height:10px;accent-color:var(--wine)}
.collection-ui .community-note-filter{width:100%;text-align:left;border:0;border-radius:10px;background:var(--paper);color:var(--ink);padding:10px 12px;min-height:55px}
.collection-ui .community-note-filter span{overflow-wrap:anywhere;min-width:0}
.collection-ui .community-choice{display:flex;align-items:flex-start;gap:10px;min-height:44px;margin:8px 0;padding:8px 0;font-size:16px}
.collection-ui .community-choice input{flex:none;width:20px;height:20px;min-height:0;margin:2px 0 0;accent-color:var(--wine)}
.collection-ui .community-choice small{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.collection-ui [data-community-share-form] fieldset{border:1px solid var(--line);border-radius:16px;padding:12px 15px;min-width:0;margin:13px 0}
.collection-ui [data-community-share-form] legend{font-weight:500;padding:0 5px;max-width:100%;overflow-wrap:anywhere}
.collection-ui [data-community-private] input:not([type=checkbox]):not([type=radio]),.collection-ui [data-community-private] select{font-size:16px;min-height:48px;min-width:0;max-width:100%;width:100%}
.collection-ui [data-community-private] .actions{flex-wrap:wrap}
.collection-ui [data-community-private] .actions button{flex:1 1 120px;min-width:0}
.collection-ui .community-release details summary{min-height:44px;padding:10px 0;overflow-wrap:anywhere}
/* Compact Gallery feed: comfortable typography and targets, details on opening. */
.collection-ui .community-post-compact{padding:14px;margin:12px 0;border:1px solid var(--line)}
.collection-ui .community-post-preview{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;align-items:start;width:100%;max-width:100%;padding:0;border:0;border-radius:12px;background:transparent;color:var(--ink);text-align:left;font:inherit}
.collection-ui .community-thumbnail{display:flex;align-items:center;justify-content:center;width:88px;height:112px;overflow:hidden;border-radius:13px;background:#dfe9e0;color:var(--wine);font:32px Georgia,serif}
.collection-ui .community-thumbnail img{display:block;width:100%;height:100%;object-fit:contain}
.collection-ui .community-preview-copy{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}
.collection-ui .community-preview-title{font-size:18px;font-weight:600;line-height:1.3}
.collection-ui .community-preview-score{font-size:22px;font-weight:600;color:var(--wine)}
.collection-ui .community-preview-score small{font-size:13px;font-weight:400;color:var(--muted)}
.collection-ui .community-preview-notes{font-size:14px;color:var(--muted);line-height:1.4}
.collection-ui .community-excerpt{font-size:15px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.collection-ui .community-profile-link{border:0;background:transparent;color:var(--wine);text-align:left;min-height:44px;padding:3px 0;font:inherit;max-width:100%;overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:3px}
.collection-ui .community-author>time{flex-shrink:0}
.collection-ui .community-reactions{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;padding-top:10px;margin-top:10px;border-top:1px solid var(--line)}
.collection-ui .community-reactions>button{font-size:14px;min-height:44px;padding:6px 3px;border:0;background:transparent;color:var(--muted);min-width:44px;max-width:100%;overflow-wrap:anywhere;white-space:normal}
.collection-ui .community-reactions>button[aria-pressed=true]{color:var(--wine);font-weight:600}
.collection-ui .community-reactions>button>span{font-size:23px;vertical-align:middle}
.collection-ui .community-profile-card{text-align:center;background:var(--paper);padding:24px 16px;border-radius:22px;border:1px solid var(--line);overflow-wrap:anywhere}
.collection-ui .community-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:64px;height:64px;background:#dfe9e0;color:var(--wine);font-size:28px}
.collection-ui .community-discussion{padding:16px 0}
.collection-ui .community-discussion textarea,.collection-ui [data-community-profile-form] textarea{width:100%;max-width:100%;min-width:0;display:block;font-size:16px;line-height:1.5;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--paper);color:var(--ink);margin-top:8px;resize:vertical}
.collection-ui .community-discussion-comment{padding:14px;background:var(--paper);border-radius:16px;border:1px solid var(--line);margin:12px 0;min-width:0;overflow-wrap:anywhere}
.collection-ui .community-comment-body{white-space:pre-wrap;font-size:16px;line-height:1.5;margin:8px 0}
.collection-ui .community-comment-actions{display:flex;flex-wrap:wrap;gap:8px}
.collection-ui .community-comment-actions button{font-size:14px;min-height:44px;max-width:100%;padding:6px 3px;color:var(--wine);background:transparent;border:0;white-space:normal;overflow-wrap:anywhere}
.collection-ui .community-reply-label{border-left:3px solid var(--line);padding-left:9px}
.collection-ui .community-home-controls{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.collection-ui .community-home-controls>button{flex:1 1 150px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.collection-ui .community-unread{display:inline-flex;align-items:center;justify-content:center;min-width:23px;min-height:23px;border-radius:20px;background:var(--wine);color:var(--paper);padding:2px 6px;font-size:13px;margin-left:4px}
.collection-ui .community-unread[hidden]{display:none}
.collection-ui .community-notification{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:12px;margin:12px 0;min-width:0;overflow-wrap:anywhere}
.collection-ui .community-notification.is-unread{border-left:4px solid var(--wine)}
.collection-ui .community-notification-open{display:block;width:100%;max-width:100%;border:0;background:transparent;color:var(--ink);font:inherit;text-align:left;line-height:1.5;padding:4px;overflow-wrap:anywhere}
.collection-ui .community-notification-open span,.collection-ui .community-notification-open time{display:block;margin-top:5px}
.collection-ui [data-community-profile-form] .field{display:block;margin:15px 0}
@media(max-width:360px){.collection-ui .community-post-preview{grid-template-columns:72px minmax(0,1fr);gap:10px}.collection-ui .community-thumbnail{width:72px;height:98px}.collection-ui .community-preview-title{font-size:17px}}

/* Gallery: shared presentation only. Existing form controls and photo hooks stay live. */
body.is-collection{background:#f1f4f1}
.collection-ui{
  --ink:#142c23;--wine:#234d3c;--wine2:#2d604a;--cream:#f1f4f1;--paper:#fff;
  --line:#dbe3dd;--muted:#627168;--green:#234d3c;--shadow:none;--nav-h:86px;
  color:var(--ink);background:var(--cream);font:16px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.collection-ui .app{max-width:1060px;padding-inline:max(18px,env(safe-area-inset-left,0px));padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))}
.collection-ui .topbar{position:static;min-height:76px;padding-block:16px 12px;background:var(--cream);border:0;backdrop-filter:none}
.collection-ui .brand-wrap{gap:9px}
.collection-ui .brand-mark{flex-basis:36px;width:36px;height:36px;border-radius:50%;background:var(--wine);box-shadow:none;font:500 24px/1 Georgia,serif;color:#fff}
.collection-ui .brand{font:500 15px/1.3 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.2px;color:var(--ink)}
.collection-ui .brand small{font-size:11px;line-height:1.3;color:var(--muted)}
.collection-ui .header-tools{gap:2px}
.collection-ui .header-settings,.collection-ui .lang{border:0;border-radius:50%;background:transparent;color:var(--ink);font-size:16px;padding:7px}
.collection-ui .header-settings{width:44px;min-height:44px}
.collection-ui .header-settings.active{background:var(--wine);color:#fff}
.collection-ui .gallery-icon{width:21px;height:21px;flex:none;display:inline-block;vertical-align:middle}
.collection-ui .view{padding-top:7px}
.collection-ui .gallery-page-heading{margin:6px 0 20px}
.collection-ui .gallery-page-heading h1,.collection-ui .gallery-page-heading h2{font:600 31px/1.17 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);letter-spacing:-.9px;margin:0;overflow-wrap:anywhere}
.collection-ui .gallery-overview{background:#fff;border-radius:25px;padding:17px 18px;margin-bottom:13px}
.collection-ui .gallery-overview .stats{grid-template-columns:1.2fr 1fr 1fr;gap:11px 10px;margin:0}
.collection-ui .gallery-overview .stat{padding:0;border:0;border-radius:0;background:none;box-shadow:none;min-height:0}
.collection-ui .gallery-overview .stat b{font:500 24px/1.1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);letter-spacing:-.6px}
.collection-ui .gallery-overview .stat span{display:block;margin-top:4px;font-size:12px;line-height:1.35}
.collection-ui .gallery-overview .stat:first-child{grid-row:span 2;align-self:center}
.collection-ui .gallery-overview .stat:first-child b{font-size:49px;letter-spacing:-2px}
.collection-ui .gallery-overview .stat:last-child{grid-column:2/-1;display:flex;align-items:center;gap:8px}
.collection-ui .gallery-overview .stat:last-child b{font-size:19px;letter-spacing:-.3px}
.collection-ui .gallery-overview .stat:last-child span{margin:0}
.collection-ui .gallery-overview .value-card{border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;padding:13px 0 0;margin:14px 0 0;background:transparent}
.collection-ui .value-card>b{font-size:13px;font-weight:500;color:var(--muted)}
.collection-ui .value-lines{gap:6px 12px;margin-top:7px}
.collection-ui .value-lines span{padding:0;border-radius:0;background:none;font-size:17px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.collection-ui .value-card .mini{font-size:11px;line-height:1.5}
.collection-ui .quick.quick-two{gap:9px;margin:0 0 21px}
.collection-ui .quick.quick-two button{min-height:53px;display:flex;align-items:center;justify-content:center;gap:6px;padding:11px 9px;border:1px solid var(--line);border-radius:99px;background:#fff;font-size:14px;font-weight:500;text-align:center;box-shadow:none}
.collection-ui .quick.quick-two button:first-child{background:var(--wine);color:#fff;border-color:var(--wine)}
.collection-ui .quick.quick-two .gallery-icon{width:17px;height:17px}
.collection-ui .section-head{margin:20px 0 12px}
.collection-ui .section-head h2{font:600 20px/1.3 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);letter-spacing:-.4px}
.collection-ui .section-head.gallery-page-heading h2{font-size:31px;line-height:1.17;letter-spacing:-.9px}
.collection-ui .section-head>button{display:inline-flex;align-items:center;justify-content:center;gap:4px;font-size:13px;font-weight:500;min-width:0;max-width:55%;padding:8px 11px;min-height:44px;border-radius:99px}
.collection-ui .section-head>.secondary{background:transparent;padding-inline:0;color:var(--wine);border:0}
.collection-ui .city-summary{grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:8px;margin:10px 0 17px}
.collection-ui .city-summary .stat{padding:11px 10px;min-height:78px;border-radius:17px;border:0;box-shadow:none;background:#fff}
.collection-ui .city-summary .stat strong{color:var(--ink);font-size:13px;font-weight:500;margin:0 0 5px}
.collection-ui .city-summary .stat b{font:500 21px/1.15 system-ui,sans-serif;color:var(--ink)}
.collection-ui .city-summary .stat span{display:block;font-size:11px;line-height:1.4;margin-top:4px}
.collection-ui .gallery-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.collection-ui .gallery-cards>.card{position:relative;padding:0;margin:0;border:0;border-radius:20px;background:#fff;box-shadow:none;overflow:hidden}
.collection-ui .gallery-bottle-image{position:relative;background:#dfe9e0;min-width:0}
.collection-ui .gallery-bottle-image .cover{width:100%;height:145px;min-height:145px;display:grid;place-items:center;border:0;border-radius:0;background:transparent;color:var(--wine)}
.collection-ui .gallery-bottle-image .cover img,.collection-ui .gallery-bottle-image .cover [data-bottle-photo]{width:100%;height:100%;object-fit:contain}
.collection-ui .gallery-bottle-image .cover img{padding:7px}
.collection-ui .gallery-bottle-image .cover>span,.collection-ui .gallery-detail-hero .details-cover>span{display:grid;width:100%;height:100%;place-items:center}
.collection-ui .gallery-bottle-image .cover>.gallery-icon,.collection-ui .gallery-detail-hero .details-cover>.gallery-icon{width:44px;height:44px;opacity:.65}
.collection-ui .gallery-card-score{position:absolute;pointer-events:none;right:9px;top:9px;border-radius:99px;padding:4px 8px;background:#fff;color:var(--ink);font-size:12px;font-weight:600;max-width:calc(100% - 18px);overflow-wrap:anywhere}
.collection-ui .gallery-cards .bottle-details{display:block;width:100%;min-width:0;min-height:0;padding:0;text-align:left;border-radius:0;border:0;background:transparent}
.collection-ui .gallery-card-body{padding:12px}
.collection-ui .gallery-bottle-card>.photo-retry{top:8px;bottom:auto}
.collection-ui .gallery-cards .bottle-title{font-size:16px;font-weight:600;line-height:1.25;letter-spacing:-.25px}
.collection-ui .gallery-cards .bottle-name{font-size:13px;line-height:1.4;margin-top:3px}
.collection-ui .gallery-card-facts{font-size:12px;line-height:1.5;margin-top:5px;overflow-wrap:anywhere}
.collection-ui .gallery-cards .badges{gap:4px;margin:8px 0 0}
.collection-ui .badge{background:#e9eeea;color:var(--wine);font-size:12px}
.collection-ui .badge.sealed{background:#edf4fb;color:#234b73;border:1px solid #95b3d0}
.collection-ui .badge.open{background:#9c4f0d;color:#fff;border:1px solid #9c4f0d}
.collection-ui .gallery-cards .bottle-storage{gap:4px;border-top:1px solid var(--line);padding-top:7px;margin-top:8px}
.collection-ui .gallery-cards .bottle-storage-row{display:flex;flex-wrap:wrap;padding:0;gap:1px 6px;border:0;border-radius:0;background:transparent;font-size:11px;line-height:1.5}
.collection-ui .gallery-cards .bottle-storage-row strong{font-weight:500}
.collection-ui .gallery-search{display:flex;gap:8px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:15px;margin-bottom:12px;padding:0 12px;min-width:0}
.collection-ui .gallery-search>.gallery-icon{color:var(--muted);width:18px;height:18px}
.collection-ui .gallery-search .search{border:0;margin:0;background:transparent;padding:12px 0;min-width:0;min-height:48px}
.collection-ui .filters{flex-wrap:wrap;overflow:visible;padding:0;margin:0 0 9px;gap:6px}
.collection-ui .filter{min-height:40px;padding:8px 11px;background:#fff;border:1px solid var(--line);color:var(--muted);font-size:13px;font-weight:500;white-space:normal;overflow-wrap:anywhere}
.collection-ui .filter.active{background:var(--wine);border-color:var(--wine);color:#fff}
.collection-ui .filter-toggle{border:1px solid var(--line);background:#fff;border-radius:13px;font-size:13px;min-height:42px;margin-bottom:12px}
.collection-ui .filter-panel{padding:13px;border:1px solid var(--line);border-radius:18px;background:#fff;margin-bottom:13px}
.collection-ui .filter-panel .search{margin-bottom:9px;border-radius:12px}
.collection-ui .filter-panel .search:last-child{margin-bottom:0}
.collection-ui .results-line{margin:0 0 13px;font-size:12px;gap:6px}
.collection-ui .sort-select{min-width:0;max-width:100%}
.collection-ui .sort-select select{background:transparent;border:0;border-radius:0;font-size:13px;max-width:100%;padding-inline:0}
.collection-ui .bottom-nav{min-height:86px;border:0;background:transparent;backdrop-filter:none;padding:8px max(10px,env(safe-area-inset-left,0px)) calc(8px + env(safe-area-inset-bottom,0px));pointer-events:none}
body.is-collection.has-collection-shell{padding:0;overflow:hidden}
.collection-ui[data-viewport-nav]{position:relative;display:flex;flex-direction:column;height:var(--collection-shell-height,100dvh);min-height:0;padding-top:env(safe-area-inset-top,0px);overflow:hidden}
.collection-ui[data-viewport-nav] .bottom-nav{position:static;flex:none}
.collection-ui[data-viewport-nav] .app{flex:1 1 auto;min-height:0;margin:0 auto;padding-bottom:18px;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
.collection-ui[data-viewport-nav] .notice,.collection-ui[data-viewport-nav] .download-ready{bottom:calc(var(--collection-nav-height,86px) + 8px)}
.collection-ui .bottom-nav-inner{max-width:680px;margin:auto;background:#fff;border:1px solid var(--line);border-radius:23px;padding:6px 4px;box-shadow:0 4px 22px #142c2312;pointer-events:auto}
.collection-ui .nav-btn{display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:62px;padding:5px 2px;font-size:14px;line-height:1.25;font-weight:500}
.collection-ui .nav-btn .gallery-icon{width:24px;height:24px}
.collection-ui .nav-btn span{font-size:14px;white-space:normal;text-overflow:clip;overflow:visible;line-height:1.25;overflow-wrap:anywhere}
.collection-ui .nav-btn.active{color:var(--wine)}
.collection-ui .primary{background:var(--wine);color:#fff;border:1px solid var(--wine);font-weight:500}
.collection-ui .secondary{background:#fff;color:var(--wine);border:1px solid var(--line);font-weight:500}
.collection-ui .primary,.collection-ui .secondary,.collection-ui .danger{border-radius:14px;min-height:48px;white-space:normal;overflow-wrap:anywhere}
.collection-ui .card,.collection-ui .panel{border-color:var(--line);box-shadow:none;background:#fff}
.collection-ui .sheet{background:var(--cream);padding:16px max(18px,env(safe-area-inset-left,0px)) calc(18px + env(safe-area-inset-bottom,0px));border-radius:25px 25px 0 0}
.collection-ui .sheet-head{background:var(--cream);padding:6px 0 12px}
.collection-ui .sheet h2{color:var(--ink);font:600 25px/1.25 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.5px}
.collection-ui .field label{font-size:14px;font-weight:500;color:var(--muted)}
.collection-ui .field input,.collection-ui .field select,.collection-ui .field textarea{font-size:16px;background:#fff;border-color:var(--line);border-radius:13px;min-height:48px}
.collection-ui .actions{background:var(--cream);gap:8px}
.collection-ui .bottle-sheet,.collection-ui .tasting-sheet{max-height:100dvh;min-height:min(92dvh,800px)}
.collection-ui .gallery-detail-hero{position:relative;border-radius:25px;overflow:hidden;background:#dfe9e0;margin-bottom:20px}
.collection-ui .gallery-detail-hero .details-cover{height:245px;width:100%;border:0;border-radius:0;background:transparent;color:var(--wine)}
.collection-ui .gallery-detail-hero .details-cover img{object-fit:contain;padding:10px}
.collection-ui .gallery-bottle-image .cover,.collection-ui .gallery-detail-hero .details-cover{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.collection-ui .gallery-bottle-image .cover>span,.collection-ui .gallery-detail-hero .details-cover>span{min-width:0;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.collection-ui .gallery-bottle-image img,.collection-ui .gallery-detail-hero img{min-width:0;min-height:0;max-height:100%}
.collection-ui .gallery-detail-score{position:absolute;top:15px;right:15px;pointer-events:none;background:#fff;border-radius:15px;padding:10px 13px;color:var(--ink);text-align:center;max-width:calc(100% - 30px)}
.collection-ui .gallery-detail-score b{font-size:23px;font-weight:600;line-height:1.15;display:block}
.collection-ui .gallery-detail-score span{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.collection-ui .gallery-detail-brand{font:600 31px/1.15 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.8px;overflow-wrap:anywhere;margin:0 0 5px}
.collection-ui .gallery-detail-name{color:var(--muted);font-size:16px;margin:0 0 15px;overflow-wrap:anywhere}
.collection-ui .gallery-detail-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;background:#fff;border-radius:16px;padding:14px;margin:0 0 10px}
.collection-ui .gallery-detail-facts>div{min-width:0;overflow-wrap:anywhere}
.collection-ui .gallery-detail-facts b{font-size:15px;font-weight:500;display:block}
.collection-ui .gallery-detail-facts span{font-size:11px;color:var(--muted);display:block;margin-top:3px}
.collection-ui .gallery-bottling-date{font-size:13px;margin:10px 0 17px;overflow-wrap:anywhere}
.collection-ui .taste-bottle{display:flex;align-items:center;justify-content:center;gap:7px;border-radius:99px;min-height:52px;font-size:15px}
.collection-ui .gallery-bottle-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:18px 0}
.collection-ui .gallery-bottle-tabs button{background:#fff;border:1px solid var(--line);border-radius:99px;padding:8px 12px;min-height:44px;font-size:13px;min-width:0}
.collection-ui .gallery-bottle-tabs button[aria-selected=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.collection-ui .gallery-bottle-detail .stock-row{display:block;background:#fff;border-radius:18px;padding:2px 14px;margin:10px 0 15px}
.collection-ui .gallery-bottle-detail .stock{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;text-align:left;background:transparent;border-radius:0;border-bottom:1px solid var(--line);padding:12px 0;font-size:14px}
.collection-ui .gallery-bottle-detail .stock:last-child{border:0}
.collection-ui .gallery-bottle-detail .stock>b{font:500 16px system-ui,sans-serif;text-align:right}
.collection-ui .gallery-bottle-detail .stock>.mini{grid-column:1/-1;font-size:12px}
.collection-ui .gallery-bottle-actions{position:static;flex-wrap:wrap;padding:6px 0;margin:8px 0}
.collection-ui .gallery-bottle-actions>button{flex:1 1 140px;font-size:14px}
.collection-ui .gallery-purchases{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.collection-ui .gallery-stage-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 15px}
.collection-ui .gallery-stage-tabs>button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:53px;padding:9px 6px;border:1px solid var(--line);border-radius:15px;background:#fff;color:var(--muted);font-size:14px;font-weight:500;overflow-wrap:anywhere}
.collection-ui .gallery-stage-tabs>button::before{content:'';display:block;flex:none;width:5px;height:5px;border-radius:50%;background:var(--stage-accent)}
.collection-ui .gallery-stage-tabs>button[aria-selected=true]{background:var(--stage-choice);border-color:var(--stage-border);color:var(--stage-accent)}
.collection-ui .sheet.tasting-sheet form{display:flex;flex-direction:column;min-width:0}
.collection-ui .tasting-sheet form>.form-grid,.collection-ui .tasting-sheet form>.external-tasting{order:0}
.collection-ui .tasting-sheet form>.divider{display:none}
.collection-ui .tasting-sheet #wheel-fields{order:2;margin-top:10px}
.collection-ui .tasting-sheet #score-fields{order:0;grid-column:1/-1}
.collection-ui .tasting-sheet form>.field{order:3}
.collection-ui .tasting-sheet form>.actions{order:4;position:static}
.collection-ui .gallery-score-block{background:#fff;border-radius:22px;padding:14px;margin-bottom:18px}
.collection-ui .gallery-score-block>h3{font-size:18px;font-weight:600;margin:0 0 12px}
.collection-ui .gallery-score-block .score-row{border-radius:13px;margin:8px 0;padding:10px;border-width:0 0 0 3px;box-shadow:none}
.collection-ui .gallery-score-block .score-row:not(.tasting-stage){background:var(--cream)}
.collection-ui .score-grid{grid-template-columns:minmax(0,1fr) 78px}
.collection-ui .score-grid label{font-size:14px;font-weight:500}
.collection-ui .score-grid input{font-size:16px;min-height:44px;border:1px solid var(--line);border-radius:12px;padding:8px;background:#fff;color:var(--ink)}
.collection-ui .score-help summary{font-size:13px;font-weight:500;min-height:32px;display:flex;align-items:center}
.collection-ui .score-help ul{font-size:13px;line-height:1.55;padding-inline-start:20px}
.collection-ui .total{font:600 22px/1.4 system-ui,sans-serif;background:var(--cream);color:var(--ink);margin-top:12px;border-radius:14px}
.collection-ui .wheel-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.collection-ui .wheel-option,.collection-ui .wheel-option.has-hint{min-width:0;width:100%;border-radius:15px;font-size:14px;font-weight:500;line-height:1.4;white-space:normal;overflow-wrap:anywhere;min-height:48px;padding:11px;text-align:left}
.collection-ui .wheel-hint{font-size:12px;line-height:1.45;margin-top:5px;opacity:1;color:var(--muted)}
.collection-ui .wheel-nav{display:flex;flex-wrap:wrap;gap:7px}
.collection-ui .wheel-nav>.secondary{font-size:13px;min-height:44px;min-width:0;max-width:100%}
.collection-ui .gallery-custom-note{margin-top:17px}
.collection-ui .gallery-custom-note .step{display:flex;flex-wrap:wrap}
.collection-ui .gallery-custom-note input{flex:1 1 150px;min-width:0}
.collection-ui .gallery-custom-note button{flex:0 1 auto;max-width:100%;font-size:14px}
.collection-ui .gallery-wheel-help{font-size:12px;line-height:1.55;margin:7px 0 12px}
.collection-ui .gallery-tasting-picker details{background:#fff;border:1px solid var(--line);border-radius:19px;padding:0 12px}
.collection-ui .gallery-tasting-picker summary{display:flex;align-items:center;gap:11px;min-height:65px;list-style:none;font-size:15px;font-weight:500;cursor:pointer}
.collection-ui .gallery-tasting-picker summary::-webkit-details-marker{display:none}
.collection-ui .gallery-picker-body{padding:0 0 13px}
.collection-ui .gallery-choice-thumb{display:grid;place-items:center;flex:0 0 43px;width:43px;height:57px;min-width:0;min-height:0;overflow:hidden;margin:9px 0;border-radius:10px;background:#dfe9e0;grid-template-rows:minmax(0,1fr)}
.collection-ui .gallery-choice-thumb>span{display:grid;min-width:0;min-height:0;grid-template-rows:minmax(0,1fr);width:100%;height:100%}
.collection-ui .gallery-choice-thumb img{width:100%;height:100%;min-height:0;object-fit:contain}
.collection-ui .gallery-choice-name{flex:1;min-width:0;overflow-wrap:anywhere}
.collection-ui .gallery-choice-name strong{display:block;font-size:15px;font-weight:600}
.collection-ui .gallery-choice-name>span{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.collection-ui .gallery-choice-change{font-size:12px;color:var(--wine);max-width:35%;overflow-wrap:anywhere}
.collection-ui .gallery-note-panel .wheel-search{margin-top:13px}
.collection-ui .wheel-path.gallery-note-panel{margin:0 0 20px;padding:0;border:0;background:transparent}
.collection-ui .gallery-note-panel .wheel-search input{font-size:16px}
.collection-ui .gallery-note-panel .selected-notes-title{font-size:13px;font-weight:500}
.collection-ui .gallery-note-panel .tasting-stage-title{font-size:17px;font-weight:600;color:var(--ink)}
.collection-ui .gallery-note-panel .wheel-option{background:#fff;border-color:var(--line);color:var(--ink)}
.collection-ui .gallery-note-panel .note-badge{border-radius:99px;border:0;background:var(--stage-choice);color:var(--stage-accent);padding:8px 11px;font-size:13px}
.collection-ui .gallery-note-panel .selected-note-label{font-size:13px;font-weight:500}
.collection-ui .timeline{overflow-wrap:anywhere}
.collection-ui .timeline .tasting-row{font-size:15px;padding:9px 0}
.collection-ui .photo-primary{min-height:44px;width:44px}
.collection-ui .photo-remove{min-height:44px;width:44px}
.collection-ui .photo-gallery-grid{grid-template-columns:repeat(auto-fit,minmax(112px,1fr))}
.collection-ui .photo-primary.active{background:var(--wine);color:#fff}
.collection-ui .download-ready{background:#fff;border-color:var(--line)}
@media(max-width:359px){
  .collection-ui .app{padding-inline:12px}.collection-ui .header-tools{gap:0}.collection-ui .brand{font-size:13px}.collection-ui .brand small{font-size:11px}
  .collection-ui .gallery-page-heading h1,.collection-ui .gallery-page-heading h2{font-size:27px}.collection-ui .gallery-cards{gap:9px}
  .collection-ui .section-head.gallery-page-heading h2{font-size:27px}
  .collection-ui .gallery-cards .bottle-details{padding:10px}.collection-ui .gallery-cards .bottle-title{font-size:15px}
  .collection-ui .gallery-bottle-image .cover{height:126px;min-height:126px}.collection-ui .nav-btn span{font-size:13px}
  .collection-ui .gallery-stage-tabs>button{font-size:13px}.collection-ui .gallery-overview{padding:15px 13px}
}
@media(min-width:700px) and (hover:hover){
  .collection-ui .gallery-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.collection-ui .gallery-home .gallery-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
  .collection-ui .gallery-bottle-image .cover{height:195px;min-height:195px}.collection-ui .sheet{max-width:700px}
  .collection-ui .gallery-overview .stats{grid-template-columns:repeat(4,minmax(0,1fr))}.collection-ui .gallery-overview .stat:first-child{grid-row:auto}
  .collection-ui .gallery-overview .stat:last-child{grid-column:auto;display:block}.collection-ui .gallery-overview .stat:last-child b{font-size:24px}
  .collection-ui .gallery-overview .stat:last-child span{margin-top:4px}.collection-ui .city-summary{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
}
/* Local drafts and read-only tasting insights share the approved Gallery layout. */
.collection-ui .insight-entry{margin:12px 0;white-space:normal;max-width:100%}
.collection-ui .bottle-insights{min-width:0;overflow-wrap:anywhere}
.collection-ui .bottle-insights h2{font-size:22px;line-height:1.3;margin:12px 0 20px}
.collection-ui .bottle-insights h3{font-size:18px;line-height:1.4;margin:24px 0 10px}
.collection-ui .insight-chart{position:relative;min-width:0;width:100%;height:245px;margin:16px 0}
.collection-ui .insight-radar{height:300px}
.collection-ui .insight-timeline{list-style:none;margin:12px 0;padding:0;display:flex;gap:8px;flex-wrap:wrap}
.collection-ui .insight-timeline button{white-space:normal;font-size:14px;min-height:44px}
.collection-ui .comparison-selects{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.collection-ui .comparison-selects label{display:grid;gap:6px;min-width:0;font-size:14px}
.collection-ui .comparison-selects select{width:100%;min-width:0;max-width:100%;min-height:48px;font-size:16px}
.collection-ui .comparison-table-wrap{max-width:100%;margin-top:20px}
.collection-ui .comparison-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;overflow-wrap:anywhere}
.collection-ui .comparison-table caption{text-align:left;font-weight:700;font-size:17px;margin-bottom:12px}
.collection-ui .comparison-table th,.collection-ui .comparison-table td{padding:12px 4px;border-bottom:1px solid #dce4dc;text-align:center;vertical-align:middle}
.collection-ui .comparison-table th:first-child{width:34%;text-align:left}
.collection-ui .comparison-table th small{display:block;font-weight:400;color:#667267}
.collection-ui .comparison-notes{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:20px 0}
.collection-ui .comparison-notes article{min-width:0;border:1px solid #dce4dc;border-radius:16px;padding:14px;background:#f5f7f3}
.collection-ui .comparison-notes h4{margin:0 0 12px;font-size:16px}
.collection-ui .comparison-comment{white-space:pre-wrap;overflow-wrap:anywhere}
.collection-ui .draft-list{margin:4px 0 24px;padding:16px;border:1px solid #dce4dc;border-radius:18px;background:#f5f7f3}
.collection-ui .draft-list h3{font-size:18px;margin:0 0 8px}
.collection-ui .draft-card{padding:14px 0;border-top:1px solid #dce4dc;overflow-wrap:anywhere}
.collection-ui .draft-actions{display:flex;gap:8px;flex-wrap:wrap}
.collection-ui .draft-actions button{min-height:44px;white-space:normal;flex:1 1 120px}
.collection-ui .draft-status{padding:10px 12px;background:#edf2ed;border-radius:10px;overflow-wrap:anywhere}
@media (min-width:700px) and (hover:hover){
  .collection-ui .comparison-selects,.collection-ui .comparison-notes{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.collection-ui .gallery-bottle-image,.collection-ui .photo-thumb{position:relative}
.collection-ui .photo-retry{position:absolute;left:8px;bottom:8px;width:44px;min-height:44px;padding:4px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--wine);font-size:22px;z-index:2}

/* Tasting context: bottle imagery and venue without leaving the open form. */
.collection-ui .tasting-source{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
.collection-ui .tasting-source button{flex:1 1 140px;min-width:0;white-space:normal;overflow-wrap:anywhere}
.collection-ui .tasting-source [aria-pressed="true"]{background:#234d3c;color:#fff;border-color:#234d3c}
.collection-ui .tasting-current-photo:empty{display:none}
.collection-ui .tasting-current-photo{margin:12px 0}
.collection-ui .tasting-photo-button{display:grid;gap:8px;justify-items:center;width:100%;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:16px;background:#edf2ed;color:var(--wine);min-width:0;height:auto}
.collection-ui .tasting-photo-button>span:first-child{display:grid;place-items:center;min-width:0;width:100%;height:160px}
.collection-ui .tasting-photo-button img{display:block;width:100%;height:100%;object-fit:contain;min-height:0}
.collection-ui .tasting-photo-button.expanded>span:first-child{height:auto;min-height:160px}
.collection-ui .tasting-photo-button.expanded img{height:auto;max-height:65dvh;object-fit:contain}
.collection-ui .tasting-place-detail{overflow-wrap:anywhere;font-size:14px;color:var(--muted)}

.collection-ui .disposal-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.collection-ui .disposal-actions button{flex:1 1 110px;min-width:0;white-space:normal;overflow-wrap:anywhere}
.collection-ui .disposal-history{margin:16px 0;padding:12px;border:1px solid var(--line);border-radius:14px}
.collection-ui .disposal-history summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}
.collection-ui .disposal-history li{overflow-wrap:anywhere}
.collection-ui .disposal-reversed{opacity:.7}

.collection-ui .tasting-photo-input{margin:16px 0;min-width:0}
.collection-ui .tasting-photo-input>label{font-weight:600}
.collection-ui .tasting-photo-input input[type="file"]{max-width:100%;width:100%;font-size:16px}
.collection-ui .tasting-photo-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.collection-ui .tasting-photo-previews figure{margin:0;min-width:0;padding:10px;border:1px solid var(--line);border-radius:14px;background:#edf2ed}
.collection-ui .tasting-photo-previews img{display:block;width:100%;height:150px;object-fit:contain}
.collection-ui .tasting-photo-previews figcaption{overflow-wrap:anywhere;font-size:12px;margin:8px 0}
.collection-ui .tasting-photo-previews button{white-space:normal;min-height:44px;max-width:100%;width:100%;overflow-wrap:anywhere}

/* Reuse collection tags in both new and existing bottle forms. */
.collection-ui [data-tag-picker]{min-width:0;margin-top:8px}
.collection-ui .tag-picker-hint{margin:0 0 8px;line-height:1.5}
.collection-ui [data-tag-picker] .tag-chips{display:flex;flex-wrap:wrap;gap:7px;max-height:260px;overflow-y:auto;padding:2px}
.collection-ui [data-tag-picker] .filter{display:inline-flex;align-items:center;gap:5px;min-height:44px;max-width:100%;font-size:14px;white-space:normal;overflow-wrap:anywhere;text-align:left}
.collection-ui [data-tag-picker] .filter[hidden]{display:none}
.collection-ui .tag-check{flex:none;width:15px;text-align:center;font-size:16px}
.collection-ui .tag-picker-search{width:100%;max-width:100%;min-width:0;font-size:16px;margin-bottom:8px}

/* Personal valuation choices remain comfortable touch targets on small screens. */
.collection-ui .currency-choices{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.collection-ui .currency-choice{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid var(--line,#d8e2dc);border-radius:12px;cursor:pointer}
.collection-ui .currency-choice input{width:20px;height:20px;min-height:20px;margin:0;accent-color:#234d3c}
.collection-ui .value-card>.secondary{margin-top:12px}

/* Tasting workflow: native disclosure, never sticky; score inputs stay mounted. */
.collection-ui .tasting-score-editor{border:1px solid var(--line,#d9e2dc);border-radius:18px;background:#fff;padding:14px;margin-bottom:18px;min-width:0}
.collection-ui .tasting-score-editor>summary{cursor:pointer;display:flex;flex-wrap:wrap;gap:10px;align-items:center;min-height:44px;overflow-wrap:anywhere}
.collection-ui .score-edit-label{margin-left:auto;color:#234d3c;text-decoration:underline}
.collection-ui .score-summary-parts{display:flex;flex-wrap:wrap;gap:6px 12px;flex-basis:100%;font-size:14px;color:#526259}
.collection-ui .tasting-place-choices{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.collection-ui .tasting-place-choices button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.collection-ui .tasting-continuations{margin:20px 0}
.collection-ui .tasting-continuation-list{display:grid;gap:12px}
.collection-ui .tasting-continuation-list article{background:#fff;border-radius:18px;padding:16px;min-width:0;overflow-wrap:anywhere}
.collection-ui .tasting-continuations .actions,.collection-ui .tasting-sheet .actions{flex-wrap:wrap}
.collection-ui .tasting-continuations .actions>button,.collection-ui .tasting-sheet .actions>button{flex:1 1 136px;min-width:0;white-space:normal;overflow-wrap:anywhere}
.collection-ui .tasting-quick-score{margin:0 0 12px}
