#barista-game {
  --bar-ink:#212e27;--bar-green:#284d39;--bar-cream:#f8f6ee;--bar-rule:#d8d6c9;
  position:fixed;inset:0;width:min(940px,calc(100vw - 44px));max-width:none;
  max-height:calc(100dvh - 30px);margin:auto;padding:0;
  color:var(--bar-ink);background:var(--bar-cream);border:1px solid #d9d4c1;
  border-radius:18px;box-shadow:0 25px 95px #0b181371;overflow:auto;overscroll-behavior:contain;
  font:400 1rem/1.5 system-ui,-apple-system,"Malgun Gothic",sans-serif;
  user-select:none;-webkit-user-select:none;touch-action:pan-y;word-break:keep-all;
}
#barista-game::backdrop {background:#102419ab}
#barista-game * {box-sizing:border-box}
#barista-game button {font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
#barista-game button:focus-visible {outline:3px solid #bb8033;outline-offset:2px}
.barista-shell {padding:20px 22px 22px}
.barista-heading {display:flex;align-items:center;justify-content:space-between;padding:0 0 13px;gap:12px}
.barista-heading h2 {font-size:clamp(1.45rem,2.5vw,2rem);letter-spacing:-.07em;line-height:1.12;margin:0;color:var(--bar-ink);font-weight:720}
.barista-close {border:1px solid var(--bar-rule);border-radius:50%;background:#f2f0e6;color:#36433b;width:44px;height:44px;font-size:1.65rem;font-weight:400;line-height:1}
.barista-close:hover {background:#e7e5d9}
.barista-steps {list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 16px;padding:0;gap:3px}
.barista-steps li {position:relative;display:flex;align-items:center;gap:8px;color:#686f65;min-width:0;font-weight:620;font-size:.88rem;padding:9px 0 10px;border-top:3px solid #cdd1c4;}
.barista-steps li i {width:8px;height:8px;flex:none;border:1px solid #929b8d;border-radius:50%}
.barista-steps li[aria-current] {color:#294836;border-top-color:#416b4e}
.barista-steps li[aria-current] i {background:#426b4d;border-color:transparent;box-shadow:0 0 0 3px #dbe4d6}
.barista-steps li.finished {border-top-color:#789276;color:#485f4c}
.barista-steps li.finished i {background:#809776;border-color:transparent}
.barista-workspace {display:grid;grid-template-columns:minmax(0,1.62fr) minmax(255px,1fr);border:1px solid var(--bar-rule);border-radius:12px;overflow:hidden;background:#fffdf7}
.barista-illustration {display:grid;min-width:0;min-height:0;place-items:stretch;background:#c3ac86}
.barista-art {display:block;width:100%;height:100%;min-width:0;min-height:0;aspect-ratio:1.58;touch-action:none;cursor:pointer;-webkit-user-select:none}
.barista-control {min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:18px;padding:clamp(18px,2.6vw,34px);border-left:1px solid var(--bar-rule);text-align:left}
.barista-copy h3 {font-size:clamp(1.45rem,2vw,1.85rem);line-height:1.2;letter-spacing:-.065em;font-weight:700;margin:0;color:#20392b;outline:0}
.barista-copy p {font-size:1rem;line-height:1.55;color:#566056;margin:9px 0 0;letter-spacing:-.02em}
.barista-meter {padding:12px 0 2px;border-top:1px solid #d5d6c9}
.barista-meter-label {display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px;}
.barista-meter-label span {font-size:.88rem;font-weight:600;color:#5b6257}
.barista-meter-label output {font-family:ui-monospace,monospace;font-weight:600;font-size:1.02rem;color:#294936;font-variant-numeric:tabular-nums}
.barista-meter progress {appearance:none;-webkit-appearance:none;display:block;width:100%;height:6px;background:#dadfd2;border:0;border-radius:8px;overflow:hidden;accent-color:#568063}
.barista-meter progress::-webkit-progress-bar {background:#dadfd2;border-radius:8px}
.barista-meter progress::-webkit-progress-value {background:#56795b;border-radius:8px}
.barista-meter progress::-moz-progress-bar {background:#56795b;border-radius:8px}
.barista-actions {display:grid;min-width:0;gap:7px}
.barista-actions.has-choices {grid-template-columns:repeat(2,minmax(0,1fr))}
.barista-primary {width:100%;min-height:48px;padding:10px 13px;border:1px solid #2d503a;border-radius:8px;background:var(--bar-green);color:#fffdf2;font-size:1rem;font-weight:650;line-height:1.25;touch-action:none}
.barista-primary:hover,.barista-primary:active {background:#1d3d2a}
.barista-primary:disabled,.barista-close:disabled {opacity:.56;cursor:default}
.barista-choice {display:grid;grid-template-rows:27px auto auto;align-content:center;justify-items:center;gap:2px;padding:8px 4px;min-height:88px;border:1px solid #b8c1b2;background:#f2f2e7;border-radius:9px;color:#2c4131;line-height:1.25;touch-action:manipulation}
.barista-choice:hover,.barista-choice:active {background:#dfe9db;border-color:#7a977d}
.barista-choice span {font-weight:670;font-size:.96rem}
.barista-choice small {color:#536452;font-size:.76rem;font-weight:500}
.barista-choice-art {display:block;position:relative;align-self:center;width:25px;height:17px;margin:0 0 3px;background:linear-gradient(100deg,#e8e3d3,#f9f6e9 35%,#cfcbbf);border:1px solid #828578;border-radius:2px 2px 6px 6px;box-shadow:inset 0 -2px #c6c6b6}
.barista-choice-art.hot::before,.barista-choice-art.water::before {content:"";position:absolute;right:-7px;top:2px;width:7px;height:8px;box-sizing:border-box;border:2px solid #808677;border-left:0;border-radius:0 5px 5px 0}
.barista-choice-art.iced {height:22px;width:15px;transform:perspective(26px) rotateX(-10deg);border-radius:2px 2px 3px 3px;background:linear-gradient(132deg,#e9f5ed 26%,#bed5c5 26% 40%,#e5eee4 41% 57%,#abc1b7 58% 64%,#deebe3 65%);box-shadow:inset 0 -2px #adbdaf}
.barista-choice-art.milk,.barista-choice-art.water {height:22px;width:18px;border-radius:2px 2px 5px 5px;background:linear-gradient(100deg,#829586,#d0d8ca 40%,#829384);box-shadow:none}
.barista-choice-art.water::after,.barista-choice-art.milk::after {content:"";position:absolute;left:-7px;top:3px;border-right:7px solid #8a9b8b;border-top:1px solid transparent;border-bottom:6px solid transparent}
.barista-choice-art.water {height:18px;width:22px;border-radius:5px 5px 6px 6px}
.barista-error {margin:0;font-size:.88rem;color:#854a31;line-height:1.4}
.barista-announce {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(100%);white-space:nowrap}
@media(max-width:680px) and (min-height:501px){
  #barista-game {width:min(470px,calc(100vw - 20px));max-height:calc(100dvh - 18px);border-radius:14px}
  .barista-shell {padding:12px}
  .barista-heading {padding:0 0 10px}
  .barista-steps {margin-bottom:5px}
  .barista-steps li {font-size:.8rem;gap:6px;padding:7px 0}
  .barista-workspace {grid-template-columns:1fr}
  .barista-illustration {max-height:min(32dvh,276px)}
  .barista-art {aspect-ratio:auto;height:min(30dvh,255px)}
  .barista-control {border-left:0;border-top:1px solid var(--bar-rule);padding:15px;gap:11px}
  .barista-copy p {margin-top:5px;font-size:.95rem}
  .barista-meter {padding-top:8px}
  .barista-primary {min-height:45px}
  .barista-choice {min-height:72px;grid-template-rows:22px auto auto}
}
@media(max-height:500px){
  #barista-game {width:min(900px,calc(100vw - 18px));max-height:calc(100dvh - 12px);border-radius:12px}
  .barista-shell {padding:8px 12px 12px}
  .barista-heading {padding-bottom:4px}
  .barista-heading h2 {font-size:1.4rem}
  .barista-close {width:38px;height:38px}
  .barista-steps {margin:0 0 4px}
  .barista-steps li {padding:4px 0;font-size:.82rem}
  .barista-workspace {grid-template-columns:minmax(0,1.45fr) minmax(205px,1fr)}
  .barista-art {height:clamp(152px,60dvh,276px);aspect-ratio:auto}
  .barista-control {padding:10px 14px;gap:9px}
  .barista-copy h3 {font-size:1.25rem}
  .barista-copy p {font-size:.9rem;margin-top:3px;line-height:1.35}
  .barista-meter {padding-top:6px}
  .barista-meter-label {margin-bottom:3px}
  .barista-primary {min-height:42px;padding-block:6px}
  .barista-choice {min-height:68px;grid-template-rows:22px auto auto;padding:4px}
}
@media(max-width:475px) and (max-height:500px){
  .barista-workspace {grid-template-columns:1fr}
  .barista-art {height:120px}
  .barista-control {border-left:0;border-top:1px solid var(--bar-rule)}
}

.barista-profile {margin-left:auto;min-height:44px;padding:0 12px;border:1px solid #c6c5b7;border-radius:20px;background:transparent;color:inherit;font:600 .86rem/1.2 system-ui;cursor:pointer}

.barista-bean {
  display:flex;flex-wrap:wrap;align-items:center;gap:3px 10px;min-height:44px;
  padding:7px 12px;border:1px solid #b8c1b2;border-radius:9px;background:#f2f2e7;
  color:#2c4131;text-align:left;font:inherit;cursor:pointer;
}
.barista-bean span {font-size:.9rem;color:#465547;word-break:keep-all}
.barista-bean:hover,.barista-bean:focus-visible {background:#dfe9db;border-color:#7a977d}
