:root {
  --ink: #fff8ec;
  --petal: #ff9ec4;
  --gold: #ffd36b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #0b1420; overflow: hidden; }
body { font-family: "Karla", system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }

/* ---------- title ---------- */
#title {
  position: fixed; inset: 0; display: grid; place-items: center; text-align: center;
  background: radial-gradient(120% 90% at 50% 40%, rgba(9, 22, 40, 0.05), rgba(6, 14, 28, 0.62));
  transition: opacity 1.4s ease, visibility 1.4s; z-index: 5;
}
#title.loading { background: #0b1522; }
#title.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.title-inner { padding: 24px; transform: translateY(-4vh); }
.kicker { margin: 0 0 10px; letter-spacing: 0.34em; text-transform: uppercase; font-size: 12px; opacity: 0.78; }
h1 {
  margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 340; font-style: italic;
  font-size: clamp(64px, 11vw, 168px); line-height: 0.95; letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(10, 30, 60, 0.45);
}
.bar { width: min(280px, 60vw); height: 2px; margin: 34px auto 12px; background: rgba(255, 255, 255, 0.18); overflow: hidden; border-radius: 2px; }
.bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--petal), var(--gold)); transition: width 0.35s ease; }
.status { margin: 0; font-size: 13px; letter-spacing: 0.08em; opacity: 0.7; min-height: 1.4em; }
#start {
  margin-top: 30px; padding: 15px 44px; font: 600 14px "Karla", sans-serif; letter-spacing: 0.3em; text-transform: uppercase;
  color: #2a1730; background: linear-gradient(180deg, #fff3e2, #ffd9e6); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 10px 40px rgba(255, 150, 200, 0.35), inset 0 -2px 0 rgba(120, 40, 80, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#start:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 50px rgba(255, 150, 200, 0.5), inset 0 -2px 0 rgba(120, 40, 80, 0.18); }
.keys { margin-top: 34px; display: flex; gap: 10px 26px; flex-wrap: wrap; justify-content: center; font-size: 13px; opacity: 0.86; max-width: 760px; }
kbd {
  display: inline-block; min-width: 24px; padding: 3px 7px; margin-right: 4px; font: 600 11px "Karla", sans-serif; letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 6px; background: rgba(255, 255, 255, 0.10);
}

/* ---------- hud ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 3; transition: opacity 0.6s ease; text-shadow: 0 1px 12px rgba(0, 20, 50, 0.55); }
#hud.quiet { opacity: 0; }
.hud-tl { position: absolute; left: 30px; top: 26px; }
.seeds { display: flex; align-items: baseline; gap: 8px; font-family: "Fraunces", serif; font-size: 34px; font-style: italic; }
.seeds-of { font-size: 16px; opacity: 0.7; font-style: normal; font-family: "Karla", sans-serif; }
.seeds-icon { width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--gold) 55%, #ff9f43); box-shadow: 0 0 16px var(--gold); align-self: center; }
.place { margin-top: 6px; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0; transition: opacity 1.2s ease; }
.place.show { opacity: 0.85; }
.hud-bl { position: absolute; left: 30px; bottom: 28px; width: 190px; }
.gust { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.gust-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #fff, var(--petal)); border-radius: 4px; }
.gust-label { margin-top: 7px; font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; opacity: 0.7; }
.hud-br { position: absolute; right: 32px; bottom: 22px; font-family: "Fraunces", serif; font-style: italic; font-size: 44px; line-height: 1; }
.hud-br small { font: 500 11px "Karla", sans-serif; letter-spacing: 0.3em; text-transform: uppercase; margin-left: 8px; opacity: 0.7; }
.toast {
  position: absolute; left: 50%; top: 15%; transform: translateX(-50%); font-family: "Fraunces", serif; font-style: italic; font-size: clamp(22px, 2.6vw, 38px);
  opacity: 0; transition: opacity 0.9s ease; white-space: nowrap;
}
.toast.show { opacity: 0.96; }

.compass { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; font: 500 12px "Karla", sans-serif; letter-spacing: 0.12em; opacity: 0.8; font-style: normal; }
.compass svg { color: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 211, 107, 0.7)); transition: transform 0.12s linear; }

/* ---------- errands: the parcel (top right), the landing prompt, the delivery card, the trick ---------- */
.hud-tr { position: absolute; right: 32px; top: 26px; text-align: right; }
.job-kicker { font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; opacity: 0.75; }
.job-icon {
  display: inline-block; width: 12px; height: 11px; margin-right: 10px; border-radius: 2px; vertical-align: -1px;
  background: linear-gradient(#fff8ec, #fff8ec) center / 2px 100% no-repeat, linear-gradient(#fff8ec, #fff8ec) center / 100% 2px no-repeat, linear-gradient(135deg, var(--gold), #ff9f43);
  box-shadow: 0 0 14px rgba(255, 211, 107, 0.85);
}
.job-name { margin-top: 3px; font: italic 400 28px/1.12 "Fraunces", serif; }
.job-spot { font: 500 12px "Karla", sans-serif; letter-spacing: 0.12em; opacity: 0.7; }
.job-meta { margin-top: 5px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; font: 500 12px "Karla", sans-serif; letter-spacing: 0.12em; }
.job-meta .compass { margin-left: 0; }
.job-count { opacity: 0.7; }
#job.fresh .job-name { animation: job-fresh 1.8s ease; }
@keyframes job-fresh { 0% { opacity: 0; transform: translateY(8px); color: var(--gold); } 35% { opacity: 1; color: var(--gold); } 100% { transform: none; color: var(--ink); } }

.prompt {
  position: absolute; left: 50%; bottom: 9%; transform: translate(-50%, 8px); display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 500 13px "Karla", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease;
}
.prompt.show { opacity: 0.96; transform: translate(-50%, 0); }
.prompt kbd { margin-right: 0; padding: 4px 10px; font-size: 12px; background: rgba(255, 255, 255, 0.16); }
.prompt .x2 { margin: 0 2px 0 -3px; font-weight: 600; letter-spacing: 0.04em; color: var(--gold); }
.prompt em { margin-left: 8px; font: italic 400 21px/1 "Fraunces", serif; letter-spacing: 0; text-transform: none; }
.prompt small { margin-left: 18px; font-size: 10px; letter-spacing: 0.26em; opacity: 0.62; }
.prompt small kbd { margin-right: 7px; padding: 2px 6px; font-size: 10px; }

.card { position: absolute; left: 50%; top: 23%; transform: translate(-50%, 12px); text-align: center; white-space: nowrap; opacity: 0; transition: opacity 0.8s ease, transform 1s cubic-bezier(0.2, 0.9, 0.2, 1); }
.card.show { opacity: 1; transform: translate(-50%, 0); }
.card-kicker { font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); text-shadow: 0 0 18px rgba(255, 211, 107, 0.5), 0 1px 12px rgba(0, 20, 50, 0.55); }
.card-name { margin-top: 5px; font: italic 340 clamp(34px, 4.6vw, 68px)/1.05 "Fraunces", Georgia, serif; letter-spacing: -0.01em; text-shadow: 0 2px 30px rgba(10, 30, 60, 0.5); }
.card-name::after { content: ""; display: block; width: 72px; height: 1px; margin: 13px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.card-sub { margin-top: 11px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }

.trick { margin-top: 12px; font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; opacity: 0.75; transition: opacity 0.3s ease; }
.trick kbd { min-width: 20px; padding: 2px 6px; margin-right: 8px; text-align: center; }
.trick.cool { opacity: 0.3; }
