/*
 * Today's Coffee Pick - fixed side panel.
 * Inherits the theme palette (--bg, --ink, --muted, --line, --accent,
 * --card, --tint) defined in style.css :root.
 */

.hcj-cp,
.hcj-cp * { box-sizing: border-box; }

/* ---- Panel shell ---- */
.hcj-cp {
  position: fixed;
  top: 84px;
  right: 16px;
  width: 320px;
  max-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e7e0d5);
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(43, 39, 36, 0.13);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  z-index: 1000;
  overflow: hidden;
}

.hcj-cp-scroll {
  overflow-y: auto;
  padding: 16px 16px 18px;
  -webkit-overflow-scrolling: touch;
}

/* ---- Header ---- */
.hcj-cp-kicker {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent, #8a5a2b); font-weight: 700;
}
.hcj-cp-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px; margin: 3px 0 0; color: var(--ink, #2b2724);
}
.hcj-cp-weather {
  margin-top: 6px; font-size: 12px; color: var(--muted, #857c70);
  display: flex; align-items: center; gap: 6px; min-height: 16px;
}
.hcj-cp-weather .hcj-cp-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #8a5a2b);
  flex: none;
}

/* ---- Section labels ---- */
.hcj-cp-sec {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted, #857c70); font-weight: 700;
  margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--line, #e7e0d5);
}
.hcj-cp-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 16px; }

.hcj-cp-reason {
  font-size: 12px; color: #6b6256; line-height: 1.5;
  background: var(--tint, #f1ebe0); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 12px;
}

/* ---- Coffee card ---- */
.hcj-cp-card {
  border: 1px solid var(--line, #e7e0d5); border-radius: 11px;
  padding: 12px 13px 13px; margin-bottom: 10px; background: var(--card, #fff);
}
.hcj-cp-card:last-child { margin-bottom: 0; }
.hcj-cp-card-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.hcj-cp-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px; font-weight: 700; color: var(--ink, #2b2724); margin: 0;
  line-height: 1.3;
}
.hcj-cp-origin { font-size: 11.5px; color: var(--muted, #857c70); margin: 2px 0 0; }
.hcj-cp-roast {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 20px;
  color: #fff8ee; white-space: nowrap;
}
.hcj-cp-roast.r-light { background: #c89b5b; }
.hcj-cp-roast.r-medium-light { background: #b07f3e; }
.hcj-cp-roast.r-medium { background: #8a5a2b; }
.hcj-cp-roast.r-medium-dark { background: #5f3d1e; }
.hcj-cp-roast.r-dark { background: #3a2615; }

.hcj-cp-notes { margin: 9px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.hcj-cp-chip {
  font-size: 10.5px; color: #5f574a; background: var(--tint, #f1ebe0);
  border-radius: 5px; padding: 2px 7px;
}
.hcj-cp-blurb {
  font-size: 12.5px; line-height: 1.55; color: #4a443d; margin: 9px 0 0;
}
.hcj-cp-meta {
  margin: 9px 0 0; font-size: 11px; color: var(--muted, #857c70);
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}
.hcj-cp-meta b { color: #5f574a; font-weight: 600; }
.hcj-cp-buy {
  display: block; margin-top: 10px; text-align: center;
  background: var(--accent, #8a5a2b); color: #fff8ee; text-decoration: none;
  font-size: 12px; font-weight: 700; padding: 7px 10px; border-radius: 7px;
}
.hcj-cp-buy:hover { background: #6f4621; }

/* ---- Filters ---- */
.hcj-cp-search {
  width: 100%; font: inherit; font-size: 12.5px; padding: 7px 10px;
  border: 1px solid var(--line, #e7e0d5); border-radius: 8px;
  color: var(--ink, #2b2724); background: var(--bg, #faf7f2); margin-bottom: 10px;
}
.hcj-cp-fgroup { margin-bottom: 9px; }
.hcj-cp-flabel {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted, #857c70); font-weight: 700; margin-bottom: 5px;
}
.hcj-cp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.hcj-cp-fchip {
  font: inherit; font-size: 11px; cursor: pointer;
  border: 1px solid var(--line, #e7e0d5); background: var(--card, #fff);
  color: #5f574a; border-radius: 20px; padding: 4px 10px;
}
.hcj-cp-fchip:hover { border-color: var(--accent, #8a5a2b); }
.hcj-cp-fchip.is-on {
  background: var(--accent, #8a5a2b); color: #fff8ee; border-color: var(--accent, #8a5a2b);
}
.hcj-cp-count { font-size: 11px; color: var(--muted, #857c70); margin: 4px 0 10px; }
.hcj-cp-reset {
  font: inherit; font-size: 11px; cursor: pointer; background: none; border: 0;
  color: var(--accent, #8a5a2b); text-decoration: underline; padding: 0;
}
.hcj-cp-empty {
  font-size: 12px; color: var(--muted, #857c70); text-align: center;
  padding: 18px 6px; line-height: 1.5;
}

/* ---- Close button (overlay mode) ---- */
.hcj-cp-close {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px;
  border: 0; background: var(--tint, #f1ebe0); border-radius: 50%;
  cursor: pointer; font-size: 16px; line-height: 1; color: #5f574a;
  display: none;
}

/* ---- Launcher button + backdrop (narrow screens) ---- */
.hcj-cp-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 1000;
  display: none; align-items: center; gap: 7px;
  background: var(--accent, #8a5a2b); color: #fff8ee;
  border: 0; border-radius: 26px; padding: 11px 16px; cursor: pointer;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(43, 39, 36, 0.28);
}
.hcj-cp-backdrop {
  position: fixed; inset: 0; background: rgba(43, 39, 36, 0.4);
  z-index: 999; display: none;
}

/* ===== Narrow screens: hide fixed panel, use launcher + slide-in ===== */
@media (max-width: 1431px) {
  .hcj-cp-toggle { display: inline-flex; }
  .hcj-cp {
    top: 0; right: 0; bottom: 0; width: 332px; max-width: 88vw;
    max-height: none; border-radius: 0; border-width: 0 0 0 1px;
    transform: translateX(105%); transition: transform .26s ease;
  }
  .hcj-cp-close { display: block; }
  .hcj-cp-scroll { padding-top: 46px; }
  body.hcj-cp-open .hcj-cp { transform: translateX(0); }
  body.hcj-cp-open .hcj-cp-backdrop { display: block; }
  body.hcj-cp-open .hcj-cp-toggle { display: none; }
}

/* Hidden until JS marks it ready, to avoid a flash before data loads. */
.hcj-cp:not(.is-ready),
.hcj-cp-toggle:not(.is-ready) { display: none; }
@media (max-width: 1431px) {
  .hcj-cp-toggle.is-ready { display: inline-flex; }
  .hcj-cp.is-ready { display: flex; }
}

/* ===== Full-page catalog (.hcj-cp-page) - comfortable on phone and desktop ===== */
.hcj-cp-page {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.hcj-cp-page .hcj-cp-weather {
  font-size: 13px; margin: 6px 0 0;
}
.hcj-cp-page .hcj-cp-sec {
  font-size: 12px; margin: 30px 0 14px; padding-top: 20px;
}
.hcj-cp-page [data-reason] { margin-bottom: 16px; font-size: 13px; }
.hcj-cp-page [data-reco],
.hcj-cp-page [data-list] {
  display: grid; gap: 13px;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
}
.hcj-cp-page .hcj-cp-card { margin-bottom: 0; }
.hcj-cp-page .hcj-cp-search { max-width: 340px; font-size: 13.5px; }
.hcj-cp-page .hcj-cp-fgroup { margin-bottom: 12px; }
.hcj-cp-page .hcj-cp-count { margin: 2px 0 14px; font-size: 12px; }

/* Coffee flavor wheel — interactive: hover a flavor segment and its
   sub-flavors spring out into the outer ring.
   Breaks out of the narrow .wrap column; the SVG viewBox is cropped tight
   to the tertiary ring. A thin divider separates it from today's picks. */
.hcj-cp-page .hcj-fw-divide {
  border: 0; height: 0; border-top: 1px solid var(--line, #e7e0d5);
  margin: 24px 0 0;
}
.hcj-cp-page .hcj-fw {
  margin: 14px 0 0; text-align: center;
  width: 95vw; max-width: 900px;
  margin-left: 50%; transform: translateX(-50%);
}
.hcj-fw-wrap { position: relative; display: inline-block; width: 100%; max-width: 900px; }
.hcj-fw-wrap .fw-svg { width: 100%; height: auto; display: block; }
.fw-svg .fw-sec { cursor: default; }
/* the hovered secondary wedge grows a little */
.fw-svg .fw-secarc {
  transform-box: view-box; transform-origin: 322px 322px;
  transition: transform .26s cubic-bezier(.34, 1.5, .6, 1);
}
.fw-svg .fw-sec:hover .fw-secarc { transform: scale(1.055); }
/* tertiary ring — collapsed + hidden until its secondary is hovered,
   then it springs outward */
.fw-svg .fw-tert {
  opacity: 0; pointer-events: none;
  transform: scale(.7); transform-box: view-box; transform-origin: 322px 322px;
  transition: transform .42s cubic-bezier(.34, 1.62, .5, 1), opacity .26s ease;
}
.fw-svg .fw-sec:hover .fw-tert { opacity: 1; transform: scale(1); pointer-events: auto; }
/* center button -> full 3-ring wheel in a new tab. Sized to nearly fill the
   wheel's small hub so there is little wasted space inside the rings. */
.hcj-fw-full {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 17%; max-width: 154px; aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  background: var(--accent, #8a5a2b); color: #fff8ee; text-decoration: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center;
  box-shadow: 0 3px 11px rgba(138, 90, 43, 0.42);
  transition: background .15s ease, transform .12s ease;
}
.hcj-fw-full:hover { background: #6f4621; transform: translate(-50%, -50%) scale(1.05); }
/* plain cream-white arrow drawn inline (no emoji glyph, no blue box) */
.hcj-fw-arrow { width: 15px; height: 15px; display: block; }
.hcj-fw-detail {
  font-size: 12.5px; color: var(--muted, #857c70); line-height: 1.55;
  margin: 6px auto 0; max-width: 470px;
}

/* Single column on phones. */
@media (max-width: 560px) {
  .hcj-cp-page [data-reco],
  .hcj-cp-page [data-list] { grid-template-columns: 1fr; }
}

/* ===== Clickable cards ===== */
.hcj-cp-card {
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease, transform .1s ease;
}
.hcj-cp-card:hover {
  border-color: var(--accent, #8a5a2b);
  box-shadow: 0 4px 14px rgba(43, 39, 36, 0.1);
}
.hcj-cp-card:active { transform: scale(.995); }
.hcj-cp-card:focus-visible { outline: 2px solid var(--accent, #8a5a2b); outline-offset: 2px; }
.hcj-cp-more {
  display: inline-block; margin-top: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent, #8a5a2b);
}

/* ===== Coffee detail modal ===== */
.hcj-modal {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.hcj-modal[hidden] { display: none; }
.hcj-modal-backdrop {
  position: absolute; inset: 0; background: rgba(43, 39, 36, 0.55);
}
.hcj-modal-card {
  position: relative; background: var(--card, #fff);
  border-radius: 14px; width: 560px; max-width: 100%; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(43, 39, 36, 0.4);
}
.hcj-modal-scroll { overflow-y: auto; padding: 22px 24px 26px; -webkit-overflow-scrolling: touch; }
.hcj-modal-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
  border: 0; background: var(--tint, #f1ebe0); border-radius: 50%;
  cursor: pointer; font-size: 19px; line-height: 1; color: #5f574a; z-index: 2;
}
.hcj-modal-close:hover { background: #e3d8c6; }
body.hcj-modal-open { overflow: hidden; }

.hcj-md-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-right: 30px; }
.hcj-md-kicker {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent, #8a5a2b); font-weight: 700; margin: 0;
}
.hcj-md-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px; margin: 3px 0 0; color: var(--ink, #2b2724); line-height: 1.25;
}
.hcj-md-region { font-size: 12.5px; color: var(--muted, #857c70); margin: 4px 0 0; }
.hcj-md-notes { margin-top: 12px; }
.hcj-md-detail { font-size: 13.5px; line-height: 1.6; color: #4a443d; margin: 13px 0 0; }
.hcj-md-defs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; margin: 16px 0 0;
}
.hcj-md-def { margin: 0; }
.hcj-md-def dt {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted, #857c70); font-weight: 700;
}
.hcj-md-def dd { margin: 2px 0 0; font-size: 13px; color: #4a443d; line-height: 1.4; }
.hcj-md-sec {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted, #857c70); font-weight: 700;
  margin: 20px 0 9px; padding-top: 15px; border-top: 1px solid var(--line, #e7e0d5);
}
.hcj-md-roasts { display: flex; flex-direction: column; gap: 7px; }
.hcj-md-roast-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px; border-radius: 8px; background: var(--bg, #faf7f2); opacity: .5;
}
.hcj-md-roast-row.is-on { opacity: 1; background: var(--tint, #f1ebe0); }
.hcj-md-roast-tag {
  flex: none; width: 80px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; padding: 4px 0;
  border-radius: 20px; color: #fff8ee; text-align: center;
}
.hcj-md-roast-tag.r-light { background: #c89b5b; }
.hcj-md-roast-tag.r-medium { background: #8a5a2b; }
.hcj-md-roast-tag.r-dark { background: #3a2615; }
.hcj-md-roast-txt { font-size: 12.5px; line-height: 1.5; color: #4a443d; }
.hcj-md-foot { font-size: 11px; color: var(--muted, #857c70); margin: 8px 0 0; }
.hcj-md-brew { font-size: 13px; line-height: 1.6; color: #4a443d; margin: 0; }
.hcj-md-brewchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.hcj-md-brewchip {
  font-size: 11px; color: #5f574a; background: var(--tint, #f1ebe0);
  border-radius: 5px; padding: 3px 9px;
}
.hcj-md-buy { margin-top: 18px; }

/* ===== Roasting & brewing guide (Coffee Picks page) ===== */
.hcj-guide { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hcj-guide-intro {
  font-size: 13.5px; line-height: 1.65; color: #4a443d;
  margin: 0 0 6px; max-width: 700px;
}
.hcj-guide-block { margin-top: 20px; }
.hcj-guide-h {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px; color: var(--ink, #2b2724); margin: 0 0 11px;
}
.hcj-guide-roasts { display: flex; flex-direction: column; gap: 8px; }
.hcj-guide-row { display: flex; gap: 12px; align-items: flex-start; }
.hcj-guide-row .hcj-cp-roast {
  flex: none; width: 96px; text-align: center; padding-top: 4px; padding-bottom: 4px;
}
.hcj-guide-row p { margin: 1px 0 0; font-size: 13px; line-height: 1.55; color: #4a443d; }
.hcj-guide-brews {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.hcj-guide-brew {
  background: var(--card, #fff); border: 1px solid var(--line, #e7e0d5);
  border-radius: 10px; padding: 12px 14px;
}
.hcj-guide-brew b { font-size: 13px; color: var(--accent, #8a5a2b); }
.hcj-guide-brew p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.55; color: #4a443d; }

@media (max-width: 560px) {
  .hcj-md-defs { grid-template-columns: 1fr; }
  .hcj-modal-scroll { padding: 20px 16px 22px; }
  .hcj-guide-row { flex-direction: column; gap: 3px; }
  .hcj-guide-row .hcj-cp-roast { width: auto; align-self: flex-start; }
}

/* ===== Side-panel CTA → full Coffee Picks page ===== */
.hcj-cp-cta {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 4px; padding: 11px 13px;
  background: var(--accent, #8a5a2b); color: #fff8ee; text-decoration: none;
  border-radius: 10px; box-shadow: 0 3px 10px rgba(138, 90, 43, 0.32);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.hcj-cp-cta:hover {
  background: #6f4621; transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(138, 90, 43, 0.44);
}
.hcj-cp-cta-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.hcj-cp-cta-main b { font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.hcj-cp-cta-main small { font-size: 10.5px; opacity: .82; line-height: 1.35; }
.hcj-cp-cta-arrow { flex: none; width: 18px; height: 18px; transition: transform .15s ease; }
.hcj-cp-cta:hover .hcj-cp-cta-arrow { transform: translateX(3px); }
