#bean-dialog{width:min(780px,94vw);border-radius:20px}#bean-dialog .close{background:#faf9f5e8;position:sticky;float:right;margin:16px 16px -55px 0;top:16px;right:auto}.story-hero{background:var(--paper);padding:42px 42px 30px}.story-kicker{font-size:10px;letter-spacing:1.6px;color:#67765d;margin:0 0 20px}.story-hero h2{font-size:17px;line-height:1.5;margin:0 0 18px;font-weight:500;max-width:85%}.story-headline{font-size:27px;line-height:1.65;letter-spacing:-.6px;margin:0 0 18px;font-weight:500}.story-provenance{font-size:10px;line-height:1.7;color:#67765d;margin:0}.story-flavors{padding:30px 42px 26px;border-bottom:1px solid #183c2b12}.story-flavor-family{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:9px 0}.story-tag{font-size:12px;line-height:1.5;padding:6px 11px;border-radius:20px;border:1px solid color-mix(in srgb,var(--tag) 40%,transparent);background:color-mix(in srgb,var(--tag) 14%,#faf9f5);color:#253726}.story-tag.parent{font-weight:600;border-left:5px solid var(--tag);padding-left:9px}.story-tag.child{font-size:11px}.story-journey{padding:30px 42px}.story-journey h3{font-size:19px;font-weight:500;margin:0 0 28px}.story-timeline{border-left:1px solid #183c2b30;margin-left:12px}.story-step{margin:0 0 4px 0;padding-left:25px;position:relative}.story-step:before{content:'';position:absolute;left:-4px;top:21px;background:#faf9f5;border:1px solid #70836a;width:7px;height:7px;border-radius:50%}.story-step summary{cursor:pointer;list-style:none;display:grid;grid-template-columns:26px 140px 1fr;gap:10px;padding:17px 0;align-items:start;border-bottom:1px solid #183c2b15}.story-step summary::-webkit-details-marker{display:none}.step-number{font-size:10px;color:#8a9582;padding-top:3px}.step-heading{font-size:13px}.step-heading small{display:block;font-size:10px;color:#728269;margin-top:5px}.step-value{font-size:12px;line-height:1.7;padding-right:16px}.step-value:after{content:'＋';position:absolute;right:-3px;font-size:12px}.story-step[open] .step-value:after{content:'−'}.step-content{padding:2px 0 20px 36px}.step-content p{font-size:12px;line-height:1.9;color:#65745d}.story-index{padding:7px 0;border:0;border-bottom:1px solid #8f9f83;color:#314c36;background:none;font-size:11px}.story-actions{padding:22px 42px;background:#edf0e6;border:0;display:flex;gap:10px;flex-wrap:wrap;align-items:center}.story-actions>div{margin-right:auto}.story-actions>div span{display:block;font-size:8px;letter-spacing:1px;color:#6d7b62}.story-actions time{display:block;font-size:12px;margin-top:6px;color:#294530}.story-actions button{padding:10px 18px;border:1px solid #183c2b30;border-radius:25px;background:transparent;color:#183c2b;font-size:12px}.story-actions #save-coffee{background:#183c2b;color:white}.story-actions button:disabled{opacity:.5;cursor:wait}.story-actions #card-action-status{flex-basis:100%;max-width:none;font-size:11px;line-height:1.6;margin:3px 0 0}#coffee-info{width:min(570px,92vw);padding:38px;border-radius:18px}#coffee-info h2{font-size:22px;line-height:1.5}#coffee-info p{font-size:13px;line-height:1.9}#coffee-info .story-kicker{font-size:9px;margin-top:15px}.info-close{float:right;border:0;background:#e9edde;padding:7px 12px;border-radius:20px;color:#183c2b;font-size:11px}.info-value{font-weight:500}.info-link{display:inline-block;border-bottom:1px solid;padding-bottom:5px;font-size:12px;margin-top:16px}.info-provenance{font-size:10px!important;color:#6a7a61}#coffee-info figure{margin:20px 0}#coffee-info img,#coffee-info video,#coffee-info audio{max-width:100%;border-radius:8px}#coffee-info figcaption{font-size:11px;color:#69765f;margin-top:7px}@media(max-width:600px){.story-hero{padding:35px 23px 24px}.story-headline{font-size:23px}.story-flavors,.story-journey{padding:25px 23px}.story-step summary{grid-template-columns:20px 1fr;gap:6px}.step-value{grid-column:2}.step-heading small{display:inline;margin-left:8px}.step-content{padding-left:26px}.story-actions{padding:22px 23px;flex-direction:row;align-items:center}.story-actions button{padding:10px 14px}#coffee-info{padding:25px}.story-hero h2{max-width:80%}}
/* Inline field index, no standalone introduction entry or in-page date stamp. */
.field-info{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;margin-left:7px;border:1px solid #7c8f6d;border-radius:50%;background:transparent;color:#526b42;font-size:12px;font-weight:600;vertical-align:middle;cursor:pointer}.field-info:hover{background:#e5eadb}.field-info:focus-visible{outline:2px solid #183c2b;outline-offset:3px}#card-action-status:empty{display:none}.story-actions>div span{line-height:1.8}
/* Shared mapped-color identity and continuous Flavor Story. */
.bean-card,.family-card,.color-card{border-top:3px solid var(--accent,#183c2b)}
#bean-dialog{width:min(920px,94vw)}
.story-hero{position:relative;background:var(--hero);padding:44px 44px 32px;border-top:6px solid var(--accent)}
.story-hero .story-kicker{font-size:9px;letter-spacing:2px;margin-bottom:27px;font-weight:500}.story-heading{display:flex;align-items:flex-start;gap:20px;justify-content:space-between}.story-heading #dialog-title{font-family:Georgia,'Songti SC','STSong',serif;font-size:clamp(27px,3vw,39px);font-weight:400;letter-spacing:-.7px;line-height:1.22;max-width:80%;margin:0}.hero-family{font-size:10px;border:1px solid color-mix(in srgb,var(--accent) 50%,transparent);border-radius:24px;padding:7px 13px;white-space:nowrap;margin-top:4px;background:#ffffff30}.hero-estate{font-size:10px;letter-spacing:.3px;line-height:1.8;color:#586b54;margin:12px 0 23px}.story-headline{font-size:23px;line-height:1.8;font-weight:400;letter-spacing:.1px;max-width:720px;margin:0 0 18px}.story-provenance{font-size:9px}.story-flavors{padding:27px 44px;display:flex;flex-wrap:wrap;gap:2px 18px}.story-flavors>.story-kicker{width:100%;margin-bottom:10px}.story-flavor-family{margin:5px 0}.story-journey{padding:35px 44px 36px}.journey-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.journey-heading .story-kicker{font-size:9px;letter-spacing:1.7px;margin-bottom:11px}.journey-heading h3{margin:0;font-weight:400;font-size:22px;font-family:Georgia,'Songti SC','STSong',serif}.journey-hint{font-size:10px;color:#75846b}.flavor-storyboard{display:grid;grid-template-columns:218px minmax(0,1fr);border:1px solid #183c2b14;border-radius:14px;overflow:hidden;min-height:385px;background:#f5f5ed}.chapter-rail{display:flex;flex-direction:column;background:var(--paper)}.chapter-tab{display:flex;align-items:center;gap:12px;flex:1;min-height:74px;width:100%;text-align:left;border:0;border-bottom:1px solid #faf9f580;padding:17px 16px;background:var(--chapter-tone);color:#142417;position:relative}.chapter-tab:last-child{border-bottom:0}.chapter-number{font:10px Georgia,serif;opacity:.65}.chapter-tab strong{display:block;font-size:13px;font-weight:500;line-height:1.5}.chapter-tab small{display:block;font-family:Georgia,serif;font-style:italic;font-size:11px;margin-top:4px;opacity:.75}.chapter-tab[aria-selected=true]{box-shadow:inset 4px 0 var(--accent)}.chapter-tab[aria-selected=true] strong{font-weight:650}.chapter-indicator{width:6px;height:6px;border:1px solid currentColor;border-radius:50%;margin-left:auto;flex-shrink:0}.chapter-tab[aria-selected=true] .chapter-indicator{background:currentColor}.chapter-tab:focus-visible{outline-offset:-4px}.chapter-reader{padding:25px 28px 19px;display:flex;flex-direction:column;min-width:0}.reader-progress{display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.5px;color:#7c8b72;padding-bottom:20px;border-bottom:1px solid #183c2b17}.reader-label{font-size:10px;line-height:1.6;color:#738068;margin:25px 0 10px}.chapter-reader h4{font-family:Georgia,'Songti SC','STSong',serif;font-size:25px;line-height:1.5;font-weight:400;letter-spacing:-.5px;margin:0 0 17px}.reader-fact{font-size:12px;line-height:1.9;color:#233f2b;margin:0 0 17px}.reader-story{font-size:12px;line-height:2;color:#627159;margin:0 0 24px;white-space:pre-line}.reader-nav{display:flex;justify-content:space-between;gap:15px;margin-top:auto;border-top:1px solid #183c2b15;padding-top:16px}.reader-nav button{font-size:11px;background:transparent;border:0;padding:7px 0;color:#183c2b}.reader-nav button:disabled{opacity:.3;cursor:default}.reader-nav button:last-child{border-bottom:1px solid var(--accent)}.reader-flavors{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:15px}.reader-flavors span{border-left:3px solid var(--tag);padding:3px 7px;font-size:10px}.reader-source{font-size:9px;color:#7b8770;margin-bottom:18px}.story-actions{padding-left:44px;padding-right:44px}
@media(max-width:600px){.story-hero{padding:33px 23px 25px}.story-heading #dialog-title{font-size:29px;max-width:76%}.story-heading{gap:10px}.hero-family{padding:6px 9px;font-size:9px}.hero-estate{font-size:9px;margin-bottom:18px}.story-headline{font-size:20px;line-height:1.85}.story-flavors,.story-journey{padding:26px 23px}.journey-hint{display:none}.journey-heading h3{font-size:20px}.flavor-storyboard{grid-template-columns:1fr}.chapter-rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.chapter-tab{min-height:67px;padding:12px 10px;gap:7px}.chapter-tab strong{font-size:11px}.chapter-tab small{font-size:9px}.chapter-tab:last-child:nth-child(odd){grid-column:1/-1}.chapter-reader{padding:23px 19px;min-height:375px}.chapter-reader h4{font-size:23px}.reader-story{font-size:12px}.story-actions{padding:22px 23px}}
/* Global preview identity: visible filled header independent of border overrides. */
body .bean-card,body .family-card,body .color-card{border-style:solid!important;isolation:isolate}
.preview-color-head{display:block;position:absolute;top:0;left:0;right:0;height:37px;background:var(--accent);opacity:.32;border-radius:3px 3px 0 0;z-index:-1;pointer-events:none}
body .bean-card .card-index,body .family-card .card-index,body .color-card .card-index{position:relative;margin-bottom:20px}
/* Neutral cards are stable across canvases; only the small flavor marks carry color. */
body .bean-card,body .family-card,body .color-card{background:#faf9f5!important;border-top-color:#d6d3ca!important}
.preview-color-head{height:4px;opacity:1}
body .bean-card .card-index,body .family-card .card-index,body .color-card .card-index{margin-bottom:12px}
.story-hero{background:#faf9f5}.chapter-tab{background:#f2f0e9}.chapter-tab[aria-selected=true]{background:color-mix(in srgb,var(--accent) 9%,#faf9f5)}
.card-tags,.card-keywords,.card-match{line-height:1.65!important}
#coffee-save-preview{position:fixed;inset:auto 0 0;width:min(640px,100%);max-width:100%;max-height:86dvh;margin:0 auto;padding:0;border:0;border-radius:24px 24px 0 0;background:#f5f2eb;color:#183c2b;box-sizing:border-box;overflow:auto}
#coffee-save-preview::backdrop{background:#132a2480;backdrop-filter:blur(4px)}
.save-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:22px 28px;background:#faf9f5;position:sticky;top:0;z-index:1}.save-sheet-head h2{font:25px Georgia,'Songti SC',serif;margin:0}.save-sheet-head .story-kicker{margin-bottom:7px}.save-sheet-head button{border:1px solid #183c2b30;border-radius:20px;padding:9px 15px;background:transparent;color:inherit;cursor:pointer}
.save-image-wrap{padding:24px;display:flex;justify-content:center}.save-image-wrap img{width:min(100%,330px);height:auto;display:block;box-shadow:0 12px 30px #183c2b20;user-select:auto;-webkit-touch-callout:default}
.save-sheet-foot{position:sticky;bottom:0;background:#faf9f5;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 28px max(18px,env(safe-area-inset-bottom))}.save-sheet-foot p{font-size:11px;color:#69735f;margin:0;line-height:1.7}.save-sheet-foot a{white-space:nowrap;background:#183c2b;color:white;border-radius:24px;padding:13px 22px;font-size:12px;text-decoration:none}
.share-formats{display:flex;justify-content:center;gap:8px;padding:15px 20px 0}.share-formats button,.preview-share{border:1px solid #183c2b30;border-radius:24px;background:transparent;color:#183c2b;padding:10px 16px;font-size:12px;cursor:pointer}.share-formats button[aria-pressed=true]{background:#183c2b;color:white}.share-preview-status{font-size:11px;text-align:center;color:#6b7864;margin:0 15px 15px}.preview-share:disabled{opacity:.4}.save-sheet-foot{flex-wrap:wrap}.save-sheet-foot p{margin-right:auto}.save-image-wrap img{max-height:48dvh;width:auto;max-width:100%;object-fit:contain}

.share-preview-status:empty{display:none}.story-actions{justify-content:flex-end}

/* Compact icon controls retain textual labels for assistive technology. */
#bean-dialog .close,.save-sheet-head button,.story-actions button{display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%}
#bean-dialog .close{border:1px solid #183c2b1f;background:#faf9f5e8}
#bean-dialog .close img,.save-sheet-head button img,.story-actions button img{width:18px;height:18px;object-fit:contain}
.story-actions{gap:8px}.story-actions #save-coffee{background:#183c2b}.story-actions #save-coffee img{filter:brightness(0) invert(1)}
.story-actions button:hover,.story-actions button:focus-visible{transform:translateY(-1px);box-shadow:0 4px 12px #183c2b1f}
.chapter-reader.is-cup{justify-content:center}.chapter-reader.is-cup .reader-flavors{margin:10px 0 17px}.chapter-reader.is-cup .reader-source{margin:0}

@font-face{font-family:Amiri;src:url('./fonts/amiri-regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
#coffee-info .info-close{float:right;display:grid;place-items:center;width:40px;height:40px;padding:10px;border:1px solid #183c2b26;border-radius:50%;background:transparent}
#coffee-info .info-close img{width:16px;height:16px;border-radius:0}
#coffee-save-preview{max-height:78dvh;border-radius:24px 24px 0 0;background:#eeeae3}
#coffee-save-preview .save-sheet-head{padding:16px 22px;background:#faf9f5}
#coffee-save-preview .save-sheet-head h2{font-size:21px}
#coffee-save-preview .save-image-wrap{padding:16px 24px 20px}
#coffee-save-preview .save-image-wrap img{max-height:43dvh;box-shadow:0 10px 24px #183c2b22;border-radius:4px}
#coffee-save-preview .save-sheet-foot{justify-content:center;padding:14px 22px max(16px,env(safe-area-inset-bottom));background:#faf9f5;gap:12px}
#coffee-save-preview .save-sheet-foot p{display:none}
#coffee-save-preview .preview-download{display:block;width:100%;max-width:420px;text-align:center;font-size:14px;padding:13px 20px}
/* The download preview is a quiet mat around the collectible cover. */
#coffee-save-preview .save-image-wrap{padding:24px 28px;background:linear-gradient(145deg,#dedbd2,#f0ede5)}
#coffee-save-preview .save-image-wrap img{max-height:48dvh;border-radius:0;box-shadow:0 14px 30px #14201930,0 1px 2px #14201933}
