#goal-left {
  display:block;
  margin-top:3px;
  color:#fcdda1;
  font:700 11px/1.15 system-ui,sans-serif;
  white-space:nowrap;
}
#goal-left[data-met="true"] { color:#a9f0bb; }
@media (prefers-reduced-motion:no-preference) {
  #goal-left[data-met="true"] { transform-origin:left center; animation:goal-pop .45s ease-out; }
  @keyframes goal-pop {
    0%,100% { transform:scale(1); }
    35% { transform:scale(1.12); }
  }
}
#start-goal {
  position:absolute;
  z-index:2;
  top:44%;
  left:50%;
  transform:translate(-50%,-50%);
  display:flex;
  align-items:center;
  gap:12px;
  width:max-content;
  max-width:min(92%,460px);
  padding:11px 17px 12px 13px;
  color:#fff5d9;
  background:#183f35f8;
  border:1px solid #ead8a3;
  border-radius:9px;
  box-shadow:0 3px 0 #152d247d,0 7px 20px #142b1f42;
  pointer-events:none;
}
#start-goal .goal-flag {
  display:grid;
  align-self:stretch;
  align-items:center;
  padding-right:11px;
  color:#f7c56e;
  border-right:1px dashed #adc3a8;
}
.goal-flag .icon { width:24px; height:24px; }
#start-goal-title { display:block; color:#c9dcbf; font-weight:650; font-size:.81rem; }
.goal-copy { min-width:0; }
.goal-invitation { margin:4px 0; font-weight:750; font-size:clamp(1.05rem,2.5vw,1.22rem); line-height:1.3; }
#start-goal-rule { margin:3px 0 0; font-size:clamp(1rem,2.5vw,1.125rem); font-weight:700; line-height:1.28; }
#start-goal-amount { color:#ffd786; font-size:1.2em; font-variant-numeric:tabular-nums; white-space:nowrap; }
@media (max-width:480px) {
  #start-goal .goal-flag { display:none; }
}
@media (max-height:540px) and (orientation:landscape) {
  #start-goal { top:52%; padding-block:6px; }
}
[data-shop="convenience"] .shop-art {
  background-image:url("assets/haru-mini-mart.webp");
  background-size:cover;
  background-position:center;
}
.dialog .campaign-intro { margin:-8px 0 13px; font-size:13px; color:#405747; }
.campaign-intro b { display:inline-block; white-space:nowrap; }
[data-page="stages"] .dialog-content {
  --header-top:clamp(10px,2.5vh,22px);
  --side-inset:clamp(16px,5vw,26px);
  padding:var(--header-top) var(--side-inset) 18px;
  display:flex;
  flex-direction:column;
  max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 38px);
}
[data-page="stages"] .dialog-close {
  top:var(--header-top);
  right:calc(var(--side-inset) - 6px);
  width:44px;
  height:44px;
  padding:6px;
  border:0;
  background:transparent;
}
[data-page="stages"] .dialog-close .icon {
  width:32px;
  height:32px;
  padding:8px;
  border:1px solid #98aa90;
  border-radius:4px;
  background:#d1d7be;
}
[data-page="stages"] #dialog-title {
  display:flex;
  align-items:center;
  min-height:44px;
  padding-right:48px;
  margin:0 0 5px;
}
[data-page="stages"] .campaign-intro { margin:0 0 13px; }
[data-page="stages"] #dialog-body { display:flex; flex-direction:column; min-height:0; }
[data-page="stages"] .stage-list {
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-color:#91a288 transparent;
}
[data-page="stages"] #dialog-title,[data-page="stages"] p,[data-page="stages"] .dialog-btn { flex:none; }
.stage-goal { color:#38593f; font-weight:750; font-size:13px; }
.stage-option:disabled { opacity:1; color:#526254; cursor:default; background:#e5e5d4; border-color:#b9beab; }
.stage-option:disabled .shop-art,.stage-option:disabled canvas { filter:saturate(.58); }
.stage-option:disabled .stage-selector-dot {
  position:relative;
  width:12px;
  height:10px;
  border:0;
  border-radius:2px;
  background:#758574;
}
.stage-option:disabled .stage-selector-dot::before {
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  box-sizing:border-box;
  top:-6px;
  left:2px;
  border:2px solid #758574;
  border-radius:5px 5px 0 0;
}
.dialog[data-page="result"] {
  width:min(460px,calc(100vw - 24px));
  max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 22px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-color:#91a288 #ebe7d3;
}
[data-page="result"] .dialog-content { padding:20px clamp(15px,4vw,24px) 22px; }
.dialog[data-page="result"] h2 { margin:8px 40px 2px 0; }
.dialog .result-goal { font-size:14px; font-weight:650; color:#435e47; margin:0 0 12px; }
.dialog .receipt {
  padding:12px 14px;
  background:#fbf7e7;
  color:#3f5041;
  border-block:1px dashed #9caa8e;
}
.dialog .receipt h3 { font-size:14px; letter-spacing:.055em; }
.dialog .receipt .receipt-total:first-of-type { margin-top:5px; }
[data-page="result"] .dialog-btn { min-height:44px; }
@media (pointer:coarse),(max-width:700px) and (orientation:portrait),(max-height:540px) and (orientation:landscape) {
  #goal-left { font-size:clamp(9px,2.1vw,11px); margin-top:1px; }
  .scene-tools,.minimap { top:calc(var(--game-top) + 64px); }
  .location { top:calc(var(--game-top) + 114px); }
}
@media (prefers-reduced-motion:no-preference) {
  #result-showcase.arriving .result-showcase-image {
    transform-origin:center 75%;
    animation:cart-arrives 410ms cubic-bezier(.2,.78,.22,1) both;
  }
  #result-showcase.arriving + .receipt { animation:receipt-feeds 420ms 140ms ease-out both; }
}
@keyframes cart-arrives {
  from { opacity:.1; transform:translateY(14px) scale(.97) rotate(-1deg); }
  to { opacity:1; transform:none; }
}
@keyframes receipt-feeds {
  from { opacity:0; transform:translateY(-9px); }
  to { opacity:1; transform:none; }
}
