:root{
 --canvas:#f4f1e9;--surface:#fffdf7;--ink:#2d3029;--muted:#696a5e;--line:#d1ccbf;--control:#9c9b8c;
 --forest:#344d41;--on-forest:#fbf8ef;--terra:#a6412b;--pale:#e9dfc8;--flavor:#eee7d5;--focus:#a6412b;--danger:#a22f22;
 --ui:"Noto Sans CJK TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;--display:"Noto Serif CJK TC","Songti TC","Noto Serif TC",Georgia,serif;
 color-scheme:light;font-family:var(--ui);font-size:16px;color:var(--ink);background:var(--canvas)
}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button,select{color:inherit}button{border:0;background:none}button:disabled{cursor:default;opacity:.6}a{color:inherit}button svg,summary svg,.search-field svg,.favorite-check svg{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}input,textarea,select{min-width:0}input::placeholder,textarea::placeholder{color:#747568;opacity:1}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:600}h1,h2{font-family:var(--display)}.muted{color:var(--muted)}.small-caption{font-size:.75rem;color:var(--muted);letter-spacing:.08em}
.app-header{max-width:1440px;margin:0 auto;padding:0 48px;height:80px;display:flex;align-items:center;gap:28px;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-family:var(--display);font-size:2rem;font-weight:700;white-space:nowrap;line-height:1}.brand img{width:34px;height:34px}.brand-dot{color:var(--terra);padding-left:3px}
.brand-note{font-family:var(--display);font-size:.875rem;color:var(--muted);padding-left:20px;border-left:1px solid var(--line)}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:12px}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:11px 20px;border-radius:5px;font-size:.875rem;font-weight:500;line-height:1.5;white-space:nowrap}
.primary{background:var(--terra);color:#fffaf2;border:1px solid var(--terra)}.primary:hover{background:#90351f;border-color:#90351f}.secondary{border:1px solid var(--control);background:var(--surface)}.secondary:hover{background:var(--flavor)}
.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px;border-radius:5px;color:var(--muted)}.icon-button:hover{background:#e9e5db;color:var(--ink)}
.text-button{font-size:.8125rem;min-height:40px;padding:6px 8px;color:var(--terra);text-underline-offset:4px}.text-button:hover{text-decoration:underline}
.data-menu{position:relative}.data-menu summary{list-style:none;cursor:pointer;border:1px solid var(--line)}.data-menu summary::-webkit-details-marker{display:none}.data-menu[open] summary{background:var(--flavor)}
.menu-panel{position:absolute;z-index:8;right:0;top:54px;width:236px;background:var(--surface);padding:10px;border:1px solid var(--line);box-shadow:0 12px 36px #2935271c;border-radius:8px}.menu-panel>p{font-size:.75rem;color:var(--muted);padding:7px 10px 13px;border-bottom:1px solid var(--line);margin-bottom:6px}.menu-panel button{display:flex;gap:12px;align-items:center;width:100%;text-align:left;border-radius:4px;padding:11px 10px;font-size:.875rem;min-height:44px}.menu-panel button:hover{background:var(--flavor)}.menu-panel button span{margin-left:auto;color:var(--muted)}
.app-status{max-width:1344px;margin:12px auto -5px;background:var(--flavor);border-left:3px solid var(--forest);padding:10px 16px;display:flex;align-items:center;gap:12px;min-height:44px;font-size:.8125rem;line-height:1.5}.app-status button{color:var(--terra);text-decoration:underline;min-height:32px;font-weight:600}.app-status .status-close{margin-left:auto;min-width:32px;text-decoration:none}.app-status.error{border-color:var(--danger)}
.workspace{max-width:1440px;margin:0 auto;padding:28px 48px 28px;display:grid;grid-template-columns:minmax(310px,.83fr) minmax(0,1.45fr);gap:46px;align-items:start}
.list-panel{min-width:0}.list-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px}.list-heading h1{font-size:1.75rem;letter-spacing:.01em;line-height:1.4}.total-count{font:italic 1rem Georgia,serif;color:var(--terra);align-self:center}.sort-control{margin-left:auto}.sort-control select,.method-filter select{border:0;background:transparent;min-height:36px;padding:4px 23px 4px 6px;font-size:.75rem;color:var(--muted);max-width:120px;cursor:pointer}
.search-field{height:48px;border:1px solid var(--control);border-radius:5px;background:var(--surface);display:flex;align-items:center;padding:0 12px;gap:10px}.search-field>svg{width:19px;color:var(--muted)}.search-field input{width:100%;height:42px;border:0;background:none;font-size:.875rem;color:var(--ink);outline:none}.search-field:focus-within{outline:2px solid var(--focus);outline-offset:2px}.search-field .icon-button{width:32px;height:32px;padding:6px}.search-field input::-webkit-search-cancel-button{display:none}
.filter-row{display:flex;justify-content:space-between;align-items:center;gap:6px;margin:14px 0 10px;border-bottom:1px solid var(--line)}
.view-filters{display:flex;align-items:center;gap:16px}.view-filters button{display:flex;align-items:center;gap:5px;font-size:.8125rem;color:var(--muted);padding:9px 0 12px;min-height:44px;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}.view-filters button[aria-pressed=true]{border-bottom-color:var(--forest);color:var(--forest);font-weight:600}.view-filters svg{width:15px;height:15px}.view-filters span{font-size:.75rem;font-weight:400}.method-filter select{max-width:105px}
.note-list{max-height:calc(100dvh - 330px);overflow:auto;scrollbar-width:thin;scrollbar-color:#c4c1b5 transparent;padding:0 3px 0 0}
.note{position:relative;display:block;width:100%;text-align:left;padding:20px 20px 18px;border-bottom:1px solid var(--line);border-radius:3px;transition:background .16s,color .16s;color:var(--ink)}
.note:hover{background:#ebe8dc}.note.active{background:var(--forest);color:var(--on-forest);border-bottom-color:var(--forest)}.note-top{display:flex;align-items:center;gap:9px;font-size:.75rem;color:var(--muted);line-height:1.5}.note-top .note-heart{margin-left:auto;width:16px;height:16px;color:var(--terra);fill:currentColor;stroke-width:1.1}.note-top .divider{color:inherit}.note-title{font:600 1.3125rem/1.45 var(--display);margin:8px 0 7px;overflow-wrap:anywhere}.note-taste{font-size:.8125rem;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.note-bottom{display:flex;justify-content:space-between;gap:14px;margin-top:10px;font-size:.75rem;color:var(--muted);line-height:1.5}.note-roaster{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-score{display:flex;gap:4px;align-items:center;white-space:nowrap;color:var(--terra);font-variant-numeric:tabular-nums}.note-score svg{width:12px;height:12px;fill:currentColor;stroke-width:0}.note.active .note-top,.note.active .note-bottom{color:#dfdfd0}.note.active .note-score,.note.active .note-heart{color:#e9c297}.note.active .note-taste{color:#f5e7cc}
.list-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:37px;padding-top:6px;font-size:.75rem;color:var(--muted)}.list-foot button{min-height:30px;padding-right:0}
.empty-list{padding:42px 18px;min-height:260px;text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column}.empty-list svg{width:34px;height:34px;fill:none;stroke:var(--terra);stroke-width:1.3;margin-bottom:18px}.empty-list h2{font-size:1.375rem;line-height:1.5;margin-bottom:10px}.empty-list p{font-size:.875rem;line-height:1.8;color:var(--muted);max-width:24em}.empty-list button{margin-top:18px}
.detail-panel{border-left:1px solid var(--line);padding-left:46px;min-width:0;max-height:calc(100dvh - 150px);overflow:auto;scrollbar-width:thin;scrollbar-color:#c4c1b5 transparent;padding-right:3px}
.detail-top{display:flex;align-items:center;gap:10px;min-height:42px}.detail-date{font-size:.75rem;letter-spacing:.06em;color:var(--muted);font-variant-numeric:tabular-nums}.sample-tag{font-size:.75rem;padding:3px 6px;border:1px solid var(--line);color:var(--muted);border-radius:3px;letter-spacing:0}.detail-tools{display:flex;align-items:center;margin-left:auto;gap:4px}.detail-tools .icon-button{width:38px;height:38px;padding:9px}.detail-tools .text-button{padding:7px 10px;min-height:38px}.mobile-back{display:none}
.detail-cover{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:16px;align-items:center;margin-top:17px;margin-bottom:18px}.origin-line{font-size:.75rem;letter-spacing:.12em;color:var(--terra);text-transform:uppercase;margin-bottom:9px}.detail-title{font-size:clamp(2.2rem,3.2vw,3.1rem);line-height:1.35;font-weight:600;overflow-wrap:anywhere;letter-spacing:.005em}.detail-title .origin-title{display:block}.detail-meta{display:flex;flex-wrap:wrap;gap:0 10px;color:var(--muted);font-size:.8125rem;line-height:1.8;margin-top:16px}.detail-meta span+span::before{content:"·";margin-right:10px;color:#9b998b}
.coffee-art{width:180px;height:200px;display:block}.coffee-art .accent{fill:#d8b488}.coffee-art .line{fill:none;stroke:#344d41;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.coffee-art .paper{fill:#faf3df;stroke:#344d41;stroke-width:1.6}.coffee-art .steam{fill:none;stroke:#a6412b;stroke-width:1.6;stroke-linecap:round}
.taste-tags{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 18px}.taste-tag{display:inline-flex;align-items:center;gap:6px;background:var(--flavor);padding:5px 11px;border:1px solid #d7cbb2;border-radius:3px;font-size:.8125rem;line-height:1.6;min-height:31px}.taste-tag:before{content:"";width:5px;height:5px;border-radius:50%;background:var(--terra);opacity:.8}.no-taste{font-size:.8125rem;color:var(--muted)}
.preference-line{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin:0 0 22px}.detail-rating{display:flex;gap:3px;color:var(--terra);align-items:center}.detail-rating svg{width:16px;height:16px;fill:currentColor;stroke:none}.detail-rating svg.empty{color:#c9c4b5}.detail-rating span{font-size:.75rem;margin-left:8px;color:var(--muted)}
.favorite-button{display:flex;align-items:center;gap:8px;color:var(--muted);border:1px solid var(--control);border-radius:4px;padding:8px 11px;min-height:38px;font-size:.75rem;line-height:1.5}.favorite-button svg{width:16px;height:16px}.favorite-button[aria-pressed=true]{border-color:#a9b29c;background:#e6eadb;color:var(--forest)}.favorite-button[aria-pressed=true] svg{fill:var(--forest)}.favorite-button:hover{background:#e4e4d5}
.tasting-note{font-family:var(--display);font-size:1.1875rem;line-height:1.95;margin:19px 0 26px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:40em}.tasting-note .quote-mark{color:var(--terra);font-size:1.6rem;line-height:1;display:inline;margin-right:5px}
.recipe-block{border-top:1px solid var(--line);padding-top:20px}.recipe-heading{display:flex;align-items:center;gap:9px;margin-bottom:16px}.recipe-heading>svg{width:23px;height:23px;fill:none;stroke:var(--forest);stroke-width:1.5}.recipe-heading h2{font-family:var(--ui);font-weight:500;font-size:.875rem}.ratio{margin-left:auto;font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}
.recipe-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0;padding-bottom:20px;border-bottom:1px solid var(--line)}.recipe-stats dt{font-size:.75rem;color:var(--muted);margin-bottom:7px}.recipe-stats dd{margin:0;white-space:nowrap;font:1.8rem/1.2 Georgia,var(--ui);font-variant-numeric:tabular-nums}.recipe-stats dd small{font-family:var(--ui);font-size:.75rem;margin-left:3px;color:var(--muted)}
.recipe-grind{font-size:.8125rem;line-height:1.8;margin-top:15px}.recipe-grind>span{font-size:.75rem;color:var(--muted);margin-right:12px}.recipe-copy{font-size:1rem;line-height:1.8;color:var(--ink);max-width:58ch;margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere}
.detail-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:24px;padding-bottom:8px}.detail-bottom .primary{background:var(--forest);border-color:var(--forest)}.detail-bottom .primary:hover{background:#263d32}.record-label{color:var(--muted);font:italic .8125rem Georgia,serif}.detail-empty{display:flex;align-items:center;justify-content:center;text-align:center;min-height:500px;padding:30px}.detail-empty h2{font-size:2rem;margin-bottom:14px}.detail-empty p{font-size:.875rem;color:var(--muted);line-height:1.8}.detail-empty .coffee-art{margin:0 auto 30px}
dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 24px 100px #17271d4d;padding:0;width:min(720px,calc(100% - 48px));max-width:none;max-height:calc(100dvh - 48px);overflow:hidden}
dialog::backdrop{background:#26352be0;opacity:.48}dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 50px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:22px 30px 18px;border-bottom:1px solid var(--line);flex-shrink:0}.dialog-head h2{font-size:1.75rem;margin-top:4px}.dialog-head .small-caption{font-size:.75rem}.form-body{overflow:auto;padding:22px 30px;scrollbar-width:thin;overscroll-behavior:contain}.form-section+.form-section{border-top:1px solid var(--line);margin-top:24px;padding-top:21px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:17px}.section-heading h3{font-size:.9375rem;font-weight:600}.date-field{display:flex;align-items:center;gap:8px;font-size:.75rem;color:var(--muted)}.date-field input{padding:6px 8px;min-height:36px;font-size:.75rem;border:1px solid var(--control);border-radius:4px;color:var(--ink);background:transparent;max-width:140px}
.field{display:block;font-size:.8125rem;line-height:1.6;margin-bottom:16px}.field>input,.field>select,.field>textarea{display:block;width:100%;margin-top:6px;border:1px solid var(--control);background:transparent;border-radius:4px;padding:10px 12px;font-size:.9375rem;min-height:46px;color:var(--ink)}.field>textarea{resize:vertical;min-height:82px;line-height:1.7}.field>input:focus,.field>textarea:focus,.field>select:focus{background:#fff}.required-note,.unit{color:var(--muted);font-size:.75rem}.required-note{margin-left:5px}.unit{float:right}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid.four{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.form-grid .field{margin-bottom:12px}
.favorite-check{display:flex;align-items:center;gap:7px;font-size:.8125rem;cursor:pointer;position:relative;min-height:44px;border:1px solid var(--control);border-radius:4px;padding:7px 10px}.favorite-check>input{appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;border:0;border-radius:4px;cursor:pointer}.favorite-check>svg{width:17px;height:17px;pointer-events:none}.favorite-check>span{pointer-events:none}.favorite-check:has(input:checked){background:#e6eadb;color:var(--forest);border-color:#98a089}.favorite-check:has(input:checked) svg{fill:var(--forest)}.favorite-check input:focus-visible{outline:3px solid var(--focus)}
.rating-field{border:0;padding:0;margin:-6px 0 20px;display:flex;align-items:center;gap:12px;min-width:0}.rating-field>div{display:flex;gap:1px}.rating-choice{position:relative;width:42px;height:44px;display:grid;place-content:center;cursor:pointer}.rating-choice input{appearance:none;width:100%;height:100%;margin:0;position:absolute;inset:0;border:0;cursor:pointer}.rating-choice svg{width:28px;height:28px;stroke:#9b998b;stroke-width:1.3;fill:transparent;pointer-events:none}.rating-choice.selected svg{fill:var(--terra);stroke:var(--terra)}.rating-field output{font-size:.8125rem;color:var(--muted);white-space:nowrap}.rating-field .text-button{margin-left:auto;padding:4px}
.field-label{font-size:.8125rem;display:block;margin-bottom:9px}.flavor-options{display:flex;flex-wrap:wrap;gap:7px}.flavor-options button{font-size:.8125rem;border:1px solid var(--control);border-radius:4px;padding:7px 11px;min-height:38px;background:transparent}.flavor-options button[aria-pressed=true]{background:var(--forest);color:var(--on-forest);border-color:var(--forest)}.flavor-options button:hover{border-color:var(--terra)}.custom-flavor{display:flex;border:1px solid var(--control);border-radius:4px;margin:12px 0 17px;max-width:360px}.custom-flavor input{width:100%;background:transparent;border:0;padding:9px 11px;font-size:.8125rem}.custom-flavor .text-button{min-width:48px;padding:5px 10px}.recipe-fields{border-top:1px solid var(--line);padding-top:6px;margin-top:5px}.recipe-fields summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:9px;min-height:56px;font-size:.9375rem;font-weight:500}.recipe-fields summary::-webkit-details-marker{display:none}.recipe-fields summary .muted{font-size:.75rem;font-weight:400}.recipe-fields summary svg{margin-left:auto;width:18px}.recipe-fields[open] summary svg{transform:rotate(45deg)}.recipe-fields[open] summary{margin-bottom:8px}
.dialog-footer{border-top:1px solid var(--line);background:var(--surface);padding:16px 30px 20px;flex-shrink:0}.form-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}.form-actions>div{display:flex;gap:10px}.form-actions .text-button{padding-left:0}#formStatus{font-size:.8125rem;line-height:1.6;color:var(--danger);padding-bottom:11px}#formStatus.success{color:var(--forest)}
.confirm-dialog{width:440px;padding:28px}.confirm-dialog h2{font-size:1.5rem}.confirm-dialog p{font-size:.875rem;line-height:1.8;margin:15px 0 22px;color:var(--muted)}.confirm-dialog>div{display:flex;justify-content:flex-end;gap:10px}
@media(min-width:1600px){.workspace{padding-top:42px}.detail-cover{margin-top:28px}.tasting-note{margin-top:25px;margin-bottom:30px}}
@media(max-width:1180px){.app-header{padding-inline:32px}.workspace{padding:28px 32px;gap:30px;grid-template-columns:minmax(310px,.88fr) minmax(0,1.3fr)}.detail-panel{padding-left:30px}.detail-cover{grid-template-columns:1fr 120px}.coffee-art{width:120px;height:150px}.detail-title{font-size:2.25rem}.note{padding-inline:16px}.view-filters{gap:10px}.recipe-stats{gap:8px}.recipe-stats dd{font-size:1.6rem}.app-status{margin-inline:32px}}
@media(max-width:920px){.app-header{height:72px;padding-inline:24px}.brand{font-size:1.75rem}.brand-note{display:none}.workspace{display:block;max-width:680px;padding:24px}.list-heading{margin-bottom:16px}.list-heading h1{font-size:1.75rem}.list-panel{display:block}.note-list{max-height:none;overflow:visible;padding-right:0}.note{padding:19px 18px}.note-title{font-size:1.375rem}.note-taste{font-size:.875rem}.note-bottom{font-size:.8125rem;margin-top:8px}.note-top{font-size:.8125rem}.detail-panel{display:none;border:0;padding:0;max-height:none;overflow:visible}.workspace.detail-open .list-panel{display:none}.workspace.detail-open .detail-panel{display:block}.workspace.detail-open{padding-top:16px}.mobile-back{display:flex;align-items:center;gap:6px;font-size:.8125rem;min-height:40px;padding:5px 8px 5px 0;color:var(--muted)}.mobile-back svg{width:18px}.detail-top{flex-wrap:wrap;gap:7px}.detail-date{font-size:.75rem}.detail-tools{gap:0}.detail-tools .icon-button{width:36px;height:40px}.detail-cover{grid-template-columns:1fr 140px;margin-top:18px}.detail-title{font-size:2.5rem}.coffee-art{width:140px;height:160px}.detail-meta{font-size:.875rem}.tasting-note{font-size:1.125rem}.detail-bottom{padding-bottom:14px}.app-status{margin:10px 24px 0}.menu-panel{top:50px}.list-foot{margin-bottom:8px}.filter-row{margin-top:12px}.method-filter select{font-size:.8125rem}.sort-control select{font-size:.8125rem}}
@media(max-width:520px){.app-header{padding:0 20px;height:70px;gap:16px}.brand{font-size:1.6rem;gap:7px}.brand img{width:29px;height:29px}.header-actions{gap:9px}.new-note{min-height:42px;padding:9px 13px;gap:6px}.data-menu summary{width:38px;height:40px}.workspace{padding:22px 20px 25px}.list-heading h1{font-size:1.625rem}.total-count{font-size:.875rem}.list-heading{gap:10px}.sort-control select{font-size:.75rem}.filter-row{gap:5px}.view-filters{gap:17px}.view-filters button{font-size:.8125rem}.method-filter select{font-size:.75rem;width:100px;padding-right:16px}.note{padding:18px 14px}.note-title{font-size:1.25rem}.note-top{font-size:.75rem}.note-taste{font-size:.8125rem}.note-bottom{font-size:.75rem}.detail-tools .icon-button{width:32px;padding:7px}.detail-date{font-size:.75rem;letter-spacing:0}.sample-tag{font-size:.75rem;padding:2px 4px}.detail-top{column-gap:6px}.mobile-back{font-size:.8125rem;margin-right:auto}.detail-cover{grid-template-columns:minmax(0,1fr) 105px;gap:8px;margin-top:21px;margin-bottom:16px}.coffee-art{width:105px;height:140px}.detail-title{font-size:2rem;line-height:1.4}.origin-line{font-size:.75rem;letter-spacing:.08em}.detail-meta{font-size:.75rem;margin-top:11px;gap:0 6px}.detail-meta span+span::before{margin-right:6px}.taste-tags{margin-top:10px;margin-bottom:14px}.preference-line{gap:12px;margin-bottom:17px}.tasting-note{font-size:1.0625rem;line-height:1.9;margin:18px 0 22px}.recipe-block{padding-top:18px}.recipe-stats{gap:10px;padding-bottom:18px}.recipe-stats dd{font-size:1.5rem}.recipe-stats dt{font-size:.75rem}.recipe-heading{margin-bottom:14px}.ratio{font-size:.75rem}.detail-bottom{margin-top:21px}.detail-bottom .primary{width:auto;flex-grow:1;max-width:250px}.app-status{margin-inline:20px;gap:8px;font-size:.75rem;flex-wrap:wrap}.menu-panel{right:0}.detail-empty{min-height:350px}
dialog{width:100%;max-height:calc(100dvh - 12px);margin:auto 0 0;border-radius:13px 13px 0 0;border-bottom:0}dialog form{max-height:calc(100dvh - 14px)}.dialog-head{padding:17px 20px 13px}.dialog-head h2{font-size:1.5rem}.dialog-head .small-caption{font-size:.75rem}.form-body{padding:18px 20px 20px}.section-heading{gap:10px;flex-wrap:wrap;margin-bottom:14px}.section-heading h3{font-size:.875rem}.date-field{gap:5px;font-size:.75rem}.date-field input{font-size:.75rem;padding:6px;max-width:132px}.form-grid{gap:12px}.form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three .field:last-child{grid-column:1/-1}.form-grid.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field>input,.field>select,.field>textarea{font-size:1rem;padding:10px;min-height:45px}.field{font-size:.8125rem}.tasting-section .section-heading{flex-wrap:nowrap}.favorite-check{font-size:.75rem;white-space:nowrap;padding:7px 9px}.rating-field{gap:6px;flex-wrap:wrap}.rating-choice{width:39px}.rating-choice svg{width:26px}.rating-field output{font-size:.75rem}.rating-field .text-button{font-size:.75rem}.dialog-footer{padding:13px 20px max(14px,env(safe-area-inset-bottom))}.form-actions{gap:7px}.form-actions>div{gap:7px}.form-actions .primary,.form-actions .secondary{font-size:.8125rem;min-height:44px;padding:10px 12px}.form-actions .text-button{font-size:.75rem}.form-actions .primary svg{width:17px}.confirm-dialog{width:calc(100% - 36px);margin:auto;max-height:calc(100dvh - 36px);border-radius:10px;padding:24px}.confirm-dialog h2{font-size:1.375rem}}
@media(max-width:359px){.app-header{padding-inline:14px}.workspace{padding-inline:14px}.view-filters{gap:11px}.method-filter select{width:90px}.detail-cover{grid-template-columns:1fr 84px}.coffee-art{width:84px}.detail-title{font-size:1.85rem}.detail-tools{margin-left:0}.sample-tag{display:none}.dialog-footer{padding-inline:14px}.form-actions .text-button{max-width:55px;line-height:1.5;text-align:left}.rating-choice{width:36px}.rating-field{gap:4px}.date-field>span{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.filter-row{flex-wrap:wrap}.method-filter{margin-left:auto}.detail-bottom{justify-content:flex-end}.detail-cover .origin-line{display:none}

.examples-control{display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:4px 0;color:var(--terra);font-size:.75rem;white-space:nowrap}.examples-control span{font-size:1rem;line-height:1}.examples-control:hover{text-decoration:underline}

/* Let current choices grow with text, and give the recipe more of the phone. */
.list-heading{flex-wrap:wrap}
.sort-control select,.method-filter select{width:auto;max-width:none;min-width:7em}
@media(max-width:520px){
 .detail-cover{grid-template-columns:minmax(0,1fr) 80px;margin-top:14px;margin-bottom:13px}
 .detail-cover .coffee-art{width:80px;height:104px}
 .detail-title{font-size:1.8rem}
 .detail-meta,.detail-date,.recipe-stats dt{font-size:.8125rem}
 .list-heading .sort-control{max-width:100%}
 .sort-control select,.method-filter select{max-width:100%;width:auto;min-width:7em}
}
@media(max-height:500px){
 #noteDialog .dialog-head{padding:8px 16px}
 #noteDialog .dialog-head .small-caption{display:none}
 #noteDialog .dialog-head h2{margin-top:0}
 #noteDialog .dialog-footer{padding:8px 16px max(8px,env(safe-area-inset-bottom))}
 #noteDialog .form-body{padding-top:14px}
}

.app-header{flex-wrap:wrap}.header-actions{max-width:100%;margin-left:auto}

/* The header grows with text; feedback follows it in document flow. */
.app-header{height:auto;min-height:80px;padding-block:12px;row-gap:8px}
.brand{flex-shrink:0}
.detail-title{text-wrap:balance}
.note-top,.note-bottom,.sort-control select,.method-filter select,.view-filters span,.list-foot{font-size:.8125rem}
@media(min-width:921px){.view-filters button{font-size:.875rem}}
@media(max-width:920px){.app-header{min-height:72px;padding-block:10px}}
@media(max-width:520px){.app-header{min-height:70px;padding-block:10px}}

/* Refinement 3: date width follows the rendered type size. */
.date-field{flex-wrap:wrap;max-width:100%}.date-field input{width:max(132px,calc(10ch + 3em));max-width:100%;flex:0 0 auto}

/* Refinement 4: long names, nearby recipes and compact editing. */
.detail-cover.long-title{grid-template-columns:minmax(0,1fr) 84px;gap:18px}
.detail-cover.long-title .coffee-art{width:84px;height:100px}
.detail-cover.long-title .detail-title{font-size:2rem;line-height:1.45;text-wrap:pretty}
.detail-cover.long-title .detail-meta{margin-top:10px}
.recipe-heading{flex-wrap:wrap;gap:8px}
.recipe-heading>.primary{background:var(--forest);border-color:var(--forest);font-size:.8125rem;min-height:38px;padding:7px 10px;gap:6px}
.recipe-heading>.primary:hover{background:#263d32}
.recipe-heading>.primary svg{width:16px;height:16px}
.recipe-heading .ratio{white-space:nowrap}
#formKicker{display:none}
#noteDialog .dialog-head{padding-block:12px}
#noteDialog .dialog-head h2{font-size:1.25rem;line-height:1.3;margin:0}
#discardDraft{white-space:nowrap;max-width:none}
.data-menu.exported summary{width:auto;min-width:38px;padding-inline:9px;font-size:.8125rem;color:var(--forest);white-space:nowrap}
.data-menu.exported summary>svg{display:none}
@media(max-width:520px){
 .detail-cover.long-title{grid-template-columns:minmax(0,1fr) 56px;gap:12px}
 .detail-cover.long-title .coffee-art{width:56px;height:72px}
 .detail-cover.long-title .detail-title{font-size:1.5rem}
 .recipe-heading>.primary{min-height:40px}
 #noteDialog .form-actions .primary,#noteDialog .form-actions .secondary{padding-inline:10px}
}
@media(max-height:500px){#noteDialog .dialog-head{padding-block:8px}}

/* Longer names lead the cover; origin and roaster remain easy to read. */
.detail-title{word-break:keep-all;overflow-wrap:anywhere}
.detail-meta{font-size:.875rem}
.detail-cover.long-title{align-items:start}
.detail-cover.long-title .coffee-art{margin-top:3px}

/* Recipe numbers keep their units; columns follow the enlarged text width. */
.recipe-stats{grid-template-columns:repeat(auto-fit,minmax(min(100%,4em),1fr))}

/* Keep the source readable in the list and give long phone titles the full width. */
.note-bottom{font-size:.875rem;line-height:1.65;align-items:flex-start}
.note-roaster{min-width:0;overflow:visible;white-space:normal;overflow-wrap:anywhere}
.note-score{flex-shrink:0}
.detail-meta>span{display:inline-flex;gap:6px;align-items:baseline;max-width:100%;min-width:0}
.detail-meta>span+span::before{margin-right:0;flex-shrink:0}
@media(max-width:520px){
 .detail-cover.long-title{grid-template-columns:minmax(0,1fr)}
 .detail-cover.long-title>.coffee-art{display:none}
}
