/* Illustrated art is opt-in through the café's asset manifest. */
.dialogue-addon-illustrated-icon { display: block; width: 64px; height: 64px; object-fit: contain; mix-blend-mode: multiply; flex: none; }
.coffee-mission-card .dialogue-addon-mission-check { width: 68px; height: 68px; background: transparent; }
.coffee-mission-card .dialogue-addon-illustrated-icon { width: 68px; height: 68px; }
.dialogue-addon-prep > summary > .dialogue-addon-illustrated-icon { width: 42px; height: 42px; }
.dialogue-addon-prep-stamp:has(.dialogue-addon-illustrated-icon) { width: 48px; height: 48px; background: transparent !important; transform: none !important; }
.dialogue-addon-prep-stamp .dialogue-addon-illustrated-icon { width: 48px; height: 48px; }
.dialogue-addon-illustrated-icon[data-illustrated-icon="small-cup"] { transform: scale(.88); }

/* These controls are shared. Their contents and existing actions stay intact. */
.f6-tur.f6-conversation .chat-help { gap: 10px; padding: 10px 12px; }
.f6-tur.f6-conversation .chat-help .tur-help-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 66px; min-width: 0; padding: 5px 13px; border: 1.5px solid #acc5c1;
  border-radius: 15px; color: #254d54; background: #fffefa;
  box-shadow: 0 3px 0 #c5d8d3; font-weight: 700; cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .16s;
}
.f6-tur.f6-conversation .chat-help .tur-help-toggle:hover { background: #f2f8f2; border-color: #608b7b; transform: translateY(-1px); }
.f6-tur.f6-conversation .chat-help .tur-help-toggle:active { transform: translateY(2px); box-shadow: 0 1px 0 #c5d8d3; }
.f6-tur.f6-conversation .chat-help .tur-help-toggle[aria-pressed="true"] { border-color: #3d8b72; background: #e3f4e8; color: #205c49; box-shadow: 0 3px 0 #9dc7b2; }
.f6-tur.f6-conversation .chat-help .tur-help-toggle:focus-visible { outline: 3px solid #e5af40; outline-offset: 3px; }
.f6-tur.f6-conversation .chat-help .chat-toggle-sign,
.f6-tur.f6-conversation .chat-help .tur-help-toggle::after { display: none; }
.f6-tur.f6-conversation .chat-help :is(.chat-lily,.chat-michael,.chat-carl-pronunciation) { width: 54px; height: 54px; }

.tur-poses[data-pose-transition] { transform-origin: center bottom; animation: dialogue-pose-pop 280ms cubic-bezier(.2,.75,.3,1) var(--pose-delay,0ms) both; }
@keyframes dialogue-pose-pop {
  0% { transform: translateY(4px) scale(.985); opacity: .72; }
  55% { transform: translateY(-2px) scale(1.012); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.coffee-result-star[data-earned="true"]::after { animation: coffee-star-reveal 640ms cubic-bezier(.2,.75,.3,1) var(--star-delay,380ms) both; }
.coffee-result-star[data-earned="true"]::before {
  content: ""; position: absolute; inset: -22%; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 50% 2%, #e3a729 0 3%, transparent 4%), radial-gradient(circle at 95% 28%, #edbd49 0 3%, transparent 4%), radial-gradient(circle at 93% 79%, #e3a729 0 3%, transparent 4%), radial-gradient(circle at 50% 99%, #edbd49 0 3%, transparent 4%), radial-gradient(circle at 6% 76%, #e3a729 0 3%, transparent 4%), radial-gradient(circle at 5% 22%, #edbd49 0 3%, transparent 4%);
  animation: coffee-star-sparks 640ms ease-out var(--star-delay,380ms) both;
}
@keyframes coffee-star-reveal {
  0% { opacity: 0; transform: translateY(14px) scale(.15) rotate(-26deg); }
  48% { opacity: 1; transform: translateY(-4px) scale(1.22) rotate(8deg); filter: drop-shadow(0 0 12px #f8d867); }
  75% { opacity: 1; transform: translateY(1px) scale(.96) rotate(-3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: drop-shadow(0 2px 2px #c8963726); }
}
@keyframes coffee-star-sparks { 0%,25% { opacity: 0; transform: scale(.5); } 50% { opacity: .9; } 100% { opacity: 0; transform: scale(1.5); } }
.coffee-result-verdict { display: grid; gap: 3px; text-align: center; color: #276749; animation: coffee-verdict-reveal 420ms ease-out var(--verdict-delay,2040ms) both; }
.coffee-result-verdict strong { font-size: clamp(27px,5vw,34px); letter-spacing: -.025em; }
.coffee-result-verdict span { font-size: 13px; color: #5e736a; }
.coffee-result-verdict[data-result-verdict="1"],.coffee-result-verdict[data-result-verdict="0"] { color: #845442; }
@keyframes coffee-verdict-reveal { from { opacity: 0; transform: translateY(9px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.coffee-result-explanation { margin-top: 18px; border: 1.5px solid #92b7a9; border-radius: 16px; background: #f3f9f3; overflow: hidden; box-shadow: 0 3px 0 #d9e6dc; }
.coffee-result-explanation > summary { position: relative; display: grid; gap: 4px; cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; }
.coffee-result-explanation > summary::-webkit-details-marker { display: none; }
.coffee-result-explanation > summary::after { content: "⌄"; position: absolute; right: 18px; top: 16px; font-size: 23px; color: #426f5e; }
.coffee-result-explanation[open] > summary::after { transform: rotate(180deg); }
.coffee-result-explanation > summary:hover { background: #e9f3e8; }
.coffee-result-explanation > summary:focus-visible { outline: 3px solid #e5af40; outline-offset: -4px; }
.coffee-result-explanation > summary strong { color: #285a49; font-size: 17px; }
.coffee-result-explanation > summary span { color: #526f62; font-size: 12px; }
.coffee-result-explanation-body { border-top: 1px dashed #b0c9bc; padding: 4px 16px 16px; line-height: 1.5; font-size: 14px; }
.coffee-result-explanation-body > h3 { margin: 28px 0 14px; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; color: #244e43; }
.coffee-result-explanation-body > p { margin: 10px 0; }
.coffee-result-choice { margin: 10px 0; padding: 12px; border: 1px solid #cddfce; border-radius: 12px; background: #fffefa; }
.coffee-result-choice[data-feedback-kind="incident"] { border-color: #e5b1a8; background: #fff7f4; }
.coffee-result-choice > strong { color: #327457; font-size: 12px; }
.coffee-result-choice[data-feedback-kind="incident"] > strong { color: #9b4535; }
.coffee-result-choice blockquote { margin: 7px 0; color: #235982; font-weight: 750; }
.coffee-result-choice p { margin: 6px 0 0; color: #405a52; }
.dialogue-addon-card[data-coffee-experience="true"] .coffee-result-explanation .dialogue-addon-star-rule { text-align: left; }
.dialogue-addon-card[data-coffee-experience="true"] > .dialogue-addon-star-explanation { padding: 3px 6px; background: transparent; border: 0; color: #67776f; font-size: 11px; box-shadow: none; }
.dialogue-addon-card[data-coffee-experience="true"] > .dialogue-addon-star-explanation summary { font-weight: 500; }
.coffee-result-explanation .dialogue-addon-order-result { border: 0; padding: 0 !important; background: transparent !important; }
.coffee-result-explanation .dialogue-addon-order-result ul { grid-template-columns: repeat(3,minmax(0,1fr)); }
.coffee-result-explanation .dialogue-addon-order-result li { padding: 15px 10px; gap: 6px; text-align: center; justify-items: center; align-content: start; border: 1px solid #d8e3d7; border-radius: 16px; background: #fffefa; box-shadow: 0 3px 0 #e2eadd; }
.coffee-result-explanation .dialogue-addon-order-result li[data-matches="false"] { border-color: #e9bdb4; background: #fffaf7; box-shadow: 0 3px 0 #f1ded6; }
.coffee-result-explanation .dialogue-addon-order-result li[data-matches="false"] small { color: #974636; }
.coffee-result-explanation .dialogue-addon-order-result li > .coffee-order-label { font-size: 13px; font-weight: 550; letter-spacing: .01em; text-transform: none; color: #66786d; }
.coffee-result-explanation .dialogue-addon-order-result li > .coffee-order-value { font-size: 18px; font-weight: 750; line-height: 1.3; color: #234b42; }
.coffee-result-explanation .dialogue-addon-order-result li > .coffee-order-value::first-letter { text-transform: uppercase; }
.coffee-result-explanation .dialogue-addon-order-result li > .coffee-order-status { font-size: 12px; line-height: 1.4; color: #38734e; padding: 3px 7px; border-radius: 8px; background: #eef7e9; }
.coffee-result-explanation .dialogue-addon-order-result li[data-matches="false"] > .coffee-order-status { background: #ffede7; }
.coffee-order-illustration { position: relative; display: grid; place-items: center; isolation: isolate; width: 84px; height: 84px; }
.coffee-order-illustration::before { content: ""; position: absolute; inset: -8px; z-index: -2; border-radius: 50%; background: radial-gradient(ellipse,#a8d98a99 0%,#cdeabd88 36%,#edf6e100 73%); }
.coffee-order-illustration::after { content: ""; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; background: #fff; }
li[data-matches="false"] > .coffee-order-illustration::before { background: radial-gradient(ellipse,#efb2a577 0%,#f4d3c966 36%,#fff8f000 73%); }
.coffee-result-explanation .dialogue-addon-order-result .dialogue-addon-illustrated-icon { width: 74px; height: 74px; filter: none; opacity: 1; mix-blend-mode: normal; border-radius: 50%; }
.coffee-result-explanation .dialogue-addon-order-result li[data-matches="false"] .dialogue-addon-illustrated-icon { filter: none; opacity: 1; }
.f6-conversation[data-coffee-experience="true"] .coffee-result-explanation .dialogue-addon-order-result h3 { margin: 18px 0 16px; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; color: #244e43; }
.f6-conversation[data-coffee-experience="true"] .coffee-explanation-badge { box-sizing: border-box; width: 30px; min-width: 30px; height: 28px; min-height: 28px; padding: 3px; border: 1.5px solid #87aaa0; border-radius: 9px; color: #327362; background: linear-gradient(#fffef6,#eef6e8); box-shadow: 0 2px 0 #b6cdbf; cursor: pointer; }
.f6-conversation[data-coffee-experience="true"] .coffee-explanation-badge svg { display: block; width: 16px; height: 19px; }
.f6-conversation[data-coffee-experience="true"] .coffee-explanation-badge:hover,
.f6-conversation[data-coffee-experience="true"] .coffee-explanation[data-open="true"] .coffee-explanation-badge { color: #fff; background: #397c68; border-color: #397c68; }
.f6-conversation[data-coffee-experience="true"] .coffee-explanation-badge:focus-visible { outline: 3px solid #e3b451; outline-offset: 3px; }
.coffee-result-explanation .dialogue-addon-order-note { color: #934a3e; font-weight: 500; }
.dialogue-addon-actions button { transition: transform .12s, box-shadow .12s; }
.dialogue-addon-actions button:active { transform: translateY(2px); }

@media (max-width:700px) {
  .f6-tur.f6-conversation .chat-help { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 9px; }
  .f6-tur.f6-conversation .chat-help .tur-help-toggle { width: 100%; flex-direction: column; gap: 4px; padding: 5px 3px 8px; font-size: 11px; line-height: 1.2; border-radius: 12px; }
  .f6-tur.f6-conversation .chat-help :is(.chat-lily,.chat-michael,.chat-carl-pronunciation) { width: 46px; height: 46px; }
  .f6-tur.f6-conversation .chat-help .chat-pronounce-copy { text-align: center; }
  .f6-tur.f6-conversation .chat-help .chat-pronounce-copy small { font-size: 9px; }
  .f6-tur.f6-conversation .chat-help .chat-pronunciation-note { grid-column: 1 / -1; }
  .coffee-result-explanation-body { padding: 4px 10px 13px; font-size: 13px; }
  .coffee-result-explanation .dialogue-addon-order-result ul { grid-template-columns: 1fr; gap: 11px; }
  .coffee-result-explanation .dialogue-addon-order-result li { grid-template-columns: 78px minmax(0,1fr); column-gap: 12px; row-gap: 4px; padding: 12px; justify-items: start; text-align: left; align-items: center; }
  .coffee-order-illustration { grid-column: 1; grid-row: 1 / span 3; width: 78px; height: 78px; }
  .coffee-result-explanation .dialogue-addon-order-result li > :is(.coffee-order-label,.coffee-order-value,.coffee-order-status) { grid-column: 2; }
  .coffee-result-explanation .dialogue-addon-order-result .dialogue-addon-illustrated-icon { width: 68px; height: 68px; }
}
/* In a narrow embedded player, the icon must not consume the text column. */
@media (max-width:400px) {
  .coffee-result-explanation .dialogue-addon-order-result li { grid-template-columns: minmax(0,1fr); justify-items: center; text-align: center; }
  .coffee-result-explanation .dialogue-addon-order-result li > .coffee-order-illustration { grid-column: 1; grid-row: auto; }
  .coffee-result-explanation .dialogue-addon-order-result li > :is(.coffee-order-label,.coffee-order-value,.coffee-order-status) { grid-column: 1; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion:reduce) {
  .tur-poses[data-pose-transition],.coffee-result-verdict { animation: none; }
  .coffee-result-star[data-earned="true"]::after { animation: none; opacity: 1; transform: none; }
  .coffee-result-star[data-earned="true"]::before { animation: none; }
  .f6-tur.f6-conversation .chat-help .tur-help-toggle { transition: none; }
}
