/* Discovery-first additions, using the atlas's existing coffee palette. */
.discovery { max-width: 1500px; padding-top: 38px; }
.discovery-heading { align-items: flex-end; padding: 0 8px 26px; }
.discovery-heading .section-kicker { margin: 0 0 14px; color: var(--accent-soft); font-size: 11px; letter-spacing: .17em; }
.discovery-heading h1 { font-size: clamp(30px, 3vw, 44px); line-height: 1.5; }
.discovery-heading h1 span { display: inline-block; }
.discovery-intro { margin: 12px 0 0; color: var(--text-2); line-height: 1.8; font-size: 14px; }
.collection-count { padding-bottom: 5px; }
.taste-launchpad { margin: 0 0 22px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.taste-launchpad-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.taste-launchpad-heading h2 { margin: 0; font-family: var(--serif); font-size: 18px; }
.taste-launchpad-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.taste-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.taste-preset { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 124px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); text-align: left; cursor: pointer; transition: border-color .16s, background .16s; }
.taste-preset:hover { border-color: var(--accent); background: var(--surface-3); }
.taste-preset[aria-pressed="true"] { border-color: var(--accent-soft); background: #352519; box-shadow: inset 0 0 0 1px var(--accent-soft); }
.preset-number { color: var(--accent-soft); font-size: 11px; letter-spacing: .14em; }
.taste-preset strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.taste-preset small { color: var(--text-2); font-size: 11px; line-height: 1.7; }
.taste-launchpad-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.taste-launchpad-footer p { margin: 0; max-width: 70%; font-size: 11px; color: var(--muted); line-height: 1.7; }
.taste-launchpad-footer button, .journey-status button { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--accent-soft); font-size: 12px; font-weight: 600; cursor: pointer; }
.journey-status { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 0 0 18px; padding: 16px 20px; border-left: 3px solid var(--accent); background: #211a13; border-radius: 0 8px 8px 0; }
.journey-status strong, .journey-status span { display: block; }
.journey-status strong { font-family: var(--serif); font-size: 17px; }
.journey-status span { margin-top: 6px; color: var(--text-2); font-size: 12px; line-height: 1.7; }
.journey-status button { flex-shrink: 0; }
.discovery-shell { grid-template-columns: minmax(0, 1.25fr) minmax(410px, 1fr); height: 700px; min-height: 600px; scroll-margin-top: calc(var(--header-h) + 18px); }
.result-toolbar { flex-wrap: wrap; gap: 6px; }
.result-toolbar { scroll-margin-top: calc(var(--header-h) + 12px); }
.saved-filter { min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text-2); font-size: 11px; cursor: pointer; }
.saved-filter[aria-pressed="true"] { color: var(--accent-soft); border-color: var(--accent); background: #302217; }
.origin-card { min-height: 104px; }
.origin-card-title { flex-wrap: wrap; }
.origin-card-title strong { font-size: 15px; }
.origin-card-country { font-size: 12px; }
.origin-flavors { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.origin-flavors span { font-size: 11px; }
.origin-card-meta { display: none; }
.card-reason { display: block; margin-top: 9px; color: var(--accent-soft); font-size: 11px; line-height: 1.7; }
.saved-badge { padding: 2px 6px; border-radius: 4px; background: #2c392c; color: #c1d9b9; font-size: 10px; }
.taste-scale-note { color: var(--text-2); font-size: 11px; line-height: 1.6; }
.taste-controls { grid-template-columns: 1fr; gap: 0; }
.taste-controls label { min-height: 30px; }
.taste-controls input { height: 36px; }
.mode-panel.taste-panel { padding-top: 5px; }
.taste-scale-note { margin: 7px 0; }
.notebook-section, .roaster-directory-section { max-width: 1456px; margin: 0 auto; padding: 60px 24px; scroll-margin-top: 80px; }
.notebook-section { border-top: 1px solid var(--line); }
.roaster-directory-section { border-top: 1px solid var(--line); padding-bottom: 80px; }
.notebook-section .section-heading, .roaster-directory-section .section-heading { max-width: 850px; }
.notebook-section .section-heading h2, .roaster-directory-section .section-heading h2 { font-size: clamp(26px, 3vw, 36px); }
.notebook-section .section-heading > p, .roaster-directory-section .section-heading > p { margin: 14px 0 28px; color: var(--text-2); max-width: 800px; }
.notebook-section .section-heading .section-kicker, .roaster-directory-section .section-heading .section-kicker { color: var(--accent-soft); font-size: 11px; letter-spacing: .14em; margin: 0 0 16px; }
.notebook-empty { padding: 28px; border: 1px dashed #66513f; border-radius: 10px; background: var(--surface); }
.notebook-empty strong { font-family: var(--serif); font-size: 20px; }
.notebook-empty p, .local-note { color: var(--muted); font-size: 12px; line-height: 1.9; }
.notebook-empty button { min-height: 44px; border: 0; background: transparent; color: var(--accent-soft); padding: 0; text-align: left; cursor: pointer; }
.local-note { margin-top: 20px; }
.notebook-grid, .roaster-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.notebook-card, .directory-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.notebook-rating { color: var(--accent-soft); font-size: 11px; margin-bottom: 12px; }
.notebook-card button { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.notebook-card button strong { display: block; font-family: var(--serif); font-size: 21px; }
.notebook-card button small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.notebook-card p { color: var(--text-2); font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-wrap; }
.notebook-card .text-action { min-height: 44px; margin-top: auto; font-size: 12px; color: var(--accent-soft); }
.directory-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.directory-toolbar label { font-size: 12px; color: var(--text-2); }
.directory-toolbar select, .shop-filters select, .journal-section select { min-height: 44px; padding: 8px 12px; border: 1px solid #65513f; border-radius: 6px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; }
.directory-toolbar span { margin-left: auto; font-size: 12px; color: var(--muted); }
.directory-card .directory-location { margin: 0 0 12px; color: var(--accent-soft); font-size: 11px; }
.directory-card h3 { margin: 0; font-family: var(--serif); font-size: 22px; }
.directory-card p { color: var(--text-2); font-size: 13px; line-height: 1.8; }
.directory-card small { display: block; margin-bottom: 16px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.directory-card a { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--accent-soft); font-size: 12px; text-decoration: none; min-height: 44px; }
.detail-drawer { width: min(580px, calc(100vw - 24px)); }
.detail-summary { font-size: 14px; line-height: 1.9; }
.detail-section h3, .purchase-section h3 { font-size: 17px; }
.detail-tabs button { min-height: 44px; font-size: 13px; }
.detail-note, .country-context > p { font-size: 13px; line-height: 1.9; }
.estimate-note { line-height: 1.8; }
.purchase-section { scroll-margin-top: 12px; }
.purchase-section > .section-kicker { font-size: 10px; color: var(--accent-soft); letter-spacing: .12em; margin: 0 0 12px; }
.purchase-section > .shop-section-intro, .shop-section-intro { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.shop-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 18px; margin: 20px 0 10px; }
.shop-filters label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--text-2); }
.shop-filters .decaf-option { flex-direction: row; align-items: center; min-height: 44px; cursor: pointer; }
.shop-filters input { width: 18px; height: 18px; accent-color: var(--accent); }
.shop-filter-note { font-size: 11px; color: var(--muted); line-height: 1.8; }
.roaster-products { display: grid; gap: 12px; margin: 16px 0; }
.roaster-product { padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.roaster-product-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.match-label { padding: 4px 7px; border: 1px solid #655442; border-radius: 4px; }
.match-label.is-exact { color: #bfdbb7; border-color: #475e40; background: #233020; }
.roaster-product h4 { margin: 16px 0 8px; font-size: 19px; font-family: var(--serif); color: var(--text); }
.roaster-product-name { color: var(--text); font-size: 14px; line-height: 1.8; margin: 0 0 10px; }
.roaster-region { color: var(--text-2); font-size: 12px; line-height: 1.8; margin: 0 0 10px; }
.roaster-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.roaster-tags span { padding: 4px 7px; border-radius: 4px; background: #2d261e; color: var(--text-2); font-size: 11px; line-height: 1.6; }
.roaster-flavors { color: var(--text-2); font-size: 12px; line-height: 1.8; }
.roaster-product-link { min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 11px 12px; gap: 12px; border: 1px solid #9b754e; border-radius: 6px; color: var(--accent-soft); text-decoration: none; font-size: 12px; line-height: 1.7; }
.roaster-product-link:hover { background: #38291b; border-color: var(--accent-soft); }
.more-shops, .same-shop-products { border-top: 1px solid var(--line); margin-top: 16px; }
.more-shops > summary, .same-shop-products > summary { padding: 14px 0; min-height: 44px; color: var(--accent-soft); font-size: 12px; line-height: 1.8; cursor: pointer; }
.same-shop-products .store-listing { padding: 16px 0; border-top: 1px solid var(--line); }
.overseas-note, .listing-note, .coverage-note { color: var(--text-2); font-size: 11px; line-height: 1.9; }
.overseas-note { padding: 9px 11px; border-left: 2px solid #b98c60; background: #30251b; }
.listing-status { color: #dfbe94; font-size: 12px; }
.directory-toolbar input[type="search"] { flex: 1; min-width: 180px; min-height: 44px; max-width: 320px; padding: 8px 12px; border: 1px solid #65513f; border-radius: 6px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; }
.directory-toolbar .directory-domestic { display: flex; align-items: center; gap: 7px; min-height: 44px; }
.directory-domestic input { width: 18px; height: 18px; accent-color: var(--accent); }
.directory-coverage { color: var(--accent-soft); font-size: 12px; line-height: 1.9; margin: 0 0 20px; }
.directory-more { min-height: 44px; padding: 12px 24px; margin: 24px auto 0; display: block; border: 1px solid #9b754e; border-radius: 6px; color: var(--accent-soft); background: var(--surface-2); cursor: pointer; }
.directory-empty { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; }
.roaster-product-name, .roaster-product h4, .directory-card h3 { overflow-wrap: anywhere; }
.content-aside { position: static; }
.purchase-card .roaster-product h4 { font-size: 18px; }
.purchase-card .roaster-product p { font-size: 12px; line-height: 1.8; }
.country-alternatives { border-top: 1px solid var(--line); margin: 20px 0; padding: 10px 0; }
.country-alternatives summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 13px; color: var(--text-2); }
.country-alternatives > p, .roaster-data-note { color: var(--muted); font-size: 11px; line-height: 1.9; }
.roaster-empty { padding: 20px; background: var(--surface-2); border: 1px dashed #685440; border-radius: 8px; margin: 18px 0; }
.roaster-empty strong { font-size: 14px; }
.roaster-empty p { color: var(--text-2); font-size: 12px; line-height: 1.8; margin-bottom: 0; }
.open-shop-search { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 0; }
.open-shop-search a { min-height: 44px; padding: 8px 0; color: var(--accent-soft); font-size: 12px; line-height: 1.8; text-underline-offset: 4px; }
.open-shop-search small { font-size: 11px; line-height: 1.8; margin: 0; color: var(--muted); }
.journal-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.journal-heading h3 { margin: 0; }
.save-origin, .journal-footer button { min-height: 44px; border: 1px solid #92714e; border-radius: 6px; background: #302317; color: var(--accent-soft); padding: 9px 16px; font-size: 12px; cursor: pointer; }
.save-origin[aria-pressed="true"] { background: #293526; border-color: #617451; color: #c7dfc0; }
.journal-section { border-top: 1px solid var(--line); padding-top: 22px; }
.journal-section form { display: flex; flex-direction: column; gap: 9px; }
.journal-section form > label { font-size: 12px; color: var(--text-2); }
.journal-section textarea { width: 100%; max-width: 100%; min-height: 100px; resize: vertical; padding: 12px; background: var(--surface-2); color: var(--text); border: 1px solid #65513f; border-radius: 6px; font: inherit; font-size: 14px; line-height: 1.8; }
.journal-section textarea::placeholder { color: #ad9c8c; }
.journal-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.journal-footer small { font-size: 11px; color: var(--muted); }
#note-feedback { color: #c1d9b9; font-size: 12px; margin: 0; }
.related-section > p { font-size: 12px; color: var(--text-2); line-height: 1.9; }
.related-origins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.related-origins button { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); text-align: left; cursor: pointer; }
.related-origins strong { font-size: 14px; color: var(--accent-soft); }
.related-origins small, .related-origins span { font-size: 11px; color: var(--text-2); line-height: 1.7; }
.quiz-results .suggestion-label { display: block; color: var(--accent-soft); font-size: 10px; margin-bottom: 6px; }
.quiz-results button em { font-size: 12px; line-height: 1.7; }
.brew-tip { padding: 16px; border-left: 2px solid var(--sage); background: #20241b; color: #d5dfce; font-size: 12px; line-height: 1.9; }
.quiz-dialog .brew-tip { margin: 4px 58px 16px; }
.quiz-dialog .estimate-note { margin: 12px 58px; }
.toast { position: fixed; left: 50%; bottom: 88px; z-index: 3000; width: max-content; max-width: calc(100vw - 32px); padding: 13px 20px; border: 1px solid #756049; border-radius: 8px; color: var(--text); background: #30251b; box-shadow: var(--shadow); font-size: 13px; line-height: 1.8; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1200px) { .roaster-directory { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .primary-nav { gap: 20px; } .header-inner { gap: 20px; } .discovery-heading h1 span { display: block; } .taste-preset { padding: 14px; } .taste-preset strong { font-size: 15px; } .roaster-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .discovery { padding: 24px 14px; }
  .discovery-heading { display: block; padding: 0 3px 24px; }
  .discovery-heading h1 { font-size: clamp(28px, 6vw, 38px); line-height: 1.6; }
  .discovery-heading h1 span { white-space: normal; }
  .discovery-heading .section-kicker { font-size: 10px; margin-bottom: 12px; }
  .discovery-intro { font-size: 13px; margin-top: 14px; }
  .collection-count { margin-top: 14px; font-size: 12px; }
  .taste-launchpad { padding: 18px 14px; }
  .taste-launchpad-heading { display: block; }
  .taste-launchpad-heading h2 { font-size: 17px; line-height: 1.7; }
  .taste-launchpad-heading p { margin-top: 6px; }
  .taste-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .taste-preset { padding: 14px 12px; min-height: 130px; }
  .taste-preset strong { font-size: 14px; line-height: 1.8; }
  .taste-preset small { font-size: 10px; }
  .taste-launchpad-footer { display: block; padding-top: 16px; }
  .taste-launchpad-footer p { max-width: 100%; font-size: 10px; }
  .taste-launchpad-footer button { margin-top: 6px; text-align: left; }
  .journey-status { align-items: flex-start; flex-direction: column; gap: 4px; padding: 16px; }
  .discovery-shell { display: flex; flex-direction: column; height: auto; min-height: 0; gap: 12px; }
  .map-stage { flex: none; }
  .explorer { min-height: 0; }
  .origin-card-title strong { font-size: 15px; }
  .notebook-section, .roaster-directory-section { padding: 42px 18px; }
  .notebook-section .section-heading h2, .roaster-directory-section .section-heading h2 { font-size: 27px; line-height: 1.6; }
  .notebook-grid, .roaster-directory { grid-template-columns: 1fr; }
  .directory-toolbar { gap: 10px; }
  .directory-toolbar label { flex-basis: 100%; }
  .directory-card { padding: 22px; }
  .detail-drawer { width: 100%; }
  .modal, .modal.is-open { transform: none; transition: opacity .18s ease; }
  .quiz-dialog .brew-tip { margin: 4px 20px 16px; }
  .quiz-dialog .estimate-note { margin: 12px 20px; }
  .detail-section h3 { font-size: 16px; }
  .roaster-product { padding: 16px; }
  .shop-filters { gap: 12px; }
  .related-origins { grid-template-columns: 1fr; }
  .toast { bottom: 80px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .taste-preset, .toast { transition: none; } }
@media (max-width: 360px) {
  .discovery-heading h1 { font-size: 24px; letter-spacing: 0; }
  .taste-launchpad-heading h2 { font-size: 16px; }
}
