/* Dosa Tycoon — hud.css (UI-HUD)
 * Top bar, toolbar, build palette, inspector, toasts / news, chef advisor and the small floating
 * helpers (tooltip, note bubble, tutorial ring, world marker, touch chips).
 * Everything lives inside .hud, a full-stage layer that never takes pointer events itself:
 * each panel or button opts back in, so the world stays clickable everywhere else. */

.hud {
  position: absolute;
  left: 0;
  top: 0;
  width: 1600px;
  height: 900px;
  pointer-events: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: var(--c-ink);
  --hud-ink: var(--c-ink);
  --hud-paper: linear-gradient(180deg, var(--c-jasmine) 0%, var(--c-cream) 60%, #FBE6BC 100%);
  --hud-face: linear-gradient(180deg, #FFF7E6 0%, #FBE3B2 100%);
  --hud-gold: linear-gradient(180deg, #FFD95A 0%, var(--c-turmeric) 100%);
  --hud-maroon: linear-gradient(180deg, #A72439 0%, var(--c-maroon) 48%, #6B1222 100%);
}

/* The second layer (toasts, banner, news, note, tooltip) is placed after #window-layer with the same z-index,
 * so it paints above an open management window and below the shell's screens. */
.hud--over { z-index: 4; }

.hud.is-hidden,
.hud .is-hidden { display: none !important; }

.hud button { pointer-events: auto; }

.hud button:focus-visible {
  outline: 4px solid #19C2C2;
  outline-offset: 2px;
  z-index: 2;
}

.hud-ic {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  font-style: normal;
  line-height: 0;
}

.hud-ic > svg { display: block; width: 100%; height: 100%; }

/* Display numerals: turmeric with an ink outline, like the painted sign. */
.hud-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-synthesis: none;
  font-size: 27px;
  line-height: 1;
  letter-spacing: .5px;
  color: var(--c-turmeric);
  -webkit-text-stroke: 4.5px var(--c-ink);
  paint-order: stroke fill;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- top bar */

.hud-top {
  position: absolute;
  left: 0;
  top: 0;
  width: 1600px;
  height: 70px;
  padding: 0 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: auto;
  background:
    var(--kolam-gold) 20px -34px / 104px 104px,
    var(--hud-maroon);
  border-bottom: 4px solid var(--c-ink);
  box-shadow:
    inset 0 -4px 0 var(--c-turmeric),
    inset 0 -7px 0 rgba(58, 31, 18, .6),
    0 5px 0 rgba(30, 8, 4, .25);
}

.hud-top__grp {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  min-width: 0;
}

/* Readouts sit in dark wells; things you press are cream. */
.hud-well {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 13px;
  border-radius: 14px;
  color: var(--c-cream);
  background: linear-gradient(180deg, rgba(38, 5, 12, .62) 0%, rgba(38, 5, 12, .38) 100%);
  box-shadow:
    inset 0 0 0 2.5px rgba(40, 14, 8, .95),
    inset 0 5px 0 rgba(0, 0, 0, .22),
    0 2px 0 rgba(255, 214, 150, .22);
  white-space: nowrap;
}

button.hud-well {
  cursor: pointer;
  transition: background-color .15s ease-out, transform .08s ease-out, filter .15s ease-out;
}

button.hud-well:hover { filter: brightness(1.18); background-color: rgba(255, 214, 150, .12); }
button.hud-well:active { transform: translateY(2px); }

/* the hanging OPEN / CLOSED board */
.hud-sign {
  position: relative;
  align-self: flex-start;
  flex: none;
  width: 132px;
  height: 64px;
  cursor: pointer;
}

.hud-sign__rope::before,
.hud-sign__rope::after {
  content: '';
  position: absolute;
  top: 0;
  width: 4px;
  height: 16px;
  border-radius: 0 0 2px 2px;
  background: #E9C98A;
  box-shadow: 0 0 0 2px var(--c-ink);
}

.hud-sign__rope::before { left: 30px; }
.hud-sign__rope::after { right: 30px; }

.hud-sign__board {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 12px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3.5px solid var(--c-ink);
  border-radius: 11px;
  background: linear-gradient(180deg, #EE3F58 0%, var(--c-kumkum) 100%);
  box-shadow:
    inset 0 0 0 2.5px rgba(255, 233, 184, .85),
    inset 0 -6px 0 rgba(0, 0, 0, .18),
    0 4px 0 var(--c-ink);
  transform-origin: 50% -12px;
  transition: transform .18s var(--ease-out-back), filter .15s ease-out;
}

.hud-sign.is-open .hud-sign__board { background: linear-gradient(180deg, #4CB55C 0%, var(--c-leaf) 100%); }

.hud-sign__txt {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
  letter-spacing: 2px;
  color: #FFF8E0;
  -webkit-text-stroke: 3.5px rgba(58, 31, 18, .9);
  paint-order: stroke fill;
}

.hud-sign:not(.is-open) .hud-sign__txt { font-size: 22px; letter-spacing: 1.2px; }
.hud-sign:hover .hud-sign__board { transform: rotate(-2.5deg); filter: brightness(1.08); }
.hud-sign:active .hud-sign__board { transform: rotate(2deg) translateY(2px); }
.hud-sign.is-swing .hud-sign__board { animation: hud-swing 1s ease-out; }

@keyframes hud-swing {
  0% { transform: scaleX(1) rotate(0); }
  10% { transform: scaleX(.05) rotate(0); }
  22% { transform: scaleX(1) rotate(-10deg); }
  42% { transform: rotate(7deg); }
  60% { transform: rotate(-4deg); }
  78% { transform: rotate(2deg); }
  100% { transform: rotate(0); }
}

/* day, clock and the morning's progress */
.hud-day {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 10px;
  row-gap: 4px;
  width: 208px;
  padding: 0 12px;
}

.hud-day__date { align-self: center; font-size: 15px; font-weight: 800; color: #FFE9B8; }

.hud-day__clock {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  text-align: right;
  color: var(--c-turmeric);
  -webkit-text-stroke: 3.5px var(--c-ink);
  paint-order: stroke fill;
}

.hud-day.is-closing .hud-day__clock { color: #FFA08A; }

.hud-day__bar {
  grid-column: 1 / -1;
  height: 9px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(0, 0, 0, .5);
  box-shadow: inset 0 0 0 2px var(--c-ink);
}

.hud-day__bar > i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #FFE27A 0%, var(--c-marigold) 100%);
  transition: transform .25s linear;
}

.hud-event { max-width: 196px; padding: 0 13px 0 6px; gap: 6px; }
.hud-event .hud-event__badge { width: 40px; height: 40px; }
.hud-event__name { overflow: hidden; text-overflow: ellipsis; font-size: 15px; font-weight: 800; color: #FFE9B8; }
.hud-event.is-event { box-shadow: inset 0 0 0 2.5px rgba(40, 14, 8, .95), inset 0 0 0 5px rgba(245, 179, 1, .7), 0 2px 0 rgba(255, 214, 150, .22); }
.hud-event.is-event .hud-event__name { color: var(--c-turmeric); }

/* cash, guests, rating, rank */
.hud-stat .hud-ic { width: 36px; height: 36px; }
.hud-stat__col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hud-stat__cap { font-size: 12px; font-weight: 700; line-height: 1; color: #F0D2A6; }

.hud-cash { min-width: 190px; }
.hud-cash__val { font-size: 26px; }
.hud-cash.is-neg .hud-cash__val { color: #FF6B7D; }
.hud-cash__delta { font-size: 12.5px; font-weight: 800; line-height: 1; color: #B9F09B; }
.hud-cash__delta.is-neg { color: #FFA08A; }
.hud-cash.is-gain .hud-cash__val { animation: hud-gain .45s var(--ease-out); }
.hud-cash.is-loss .hud-cash__val { animation: hud-loss .45s var(--ease-out); }

@keyframes hud-gain { 0% { transform: scale(1); } 35% { transform: scale(1.14); color: #C9FF9E; } 100% { transform: scale(1); } }
@keyframes hud-loss { 0% { transform: translateY(0); } 35% { transform: translateY(3px); color: #FF8A7A; } 100% { transform: translateY(0); } }

.hud-guests__val { font-size: 25px; }

.hud-stars { position: relative; flex: none; width: 115px; height: 23px; }
.hud-stars__row { position: absolute; inset: 0; display: flex; }
.hud-stars__row .hud-ic { width: 23px; height: 23px; }
.hud-stars__row:first-child { opacity: .55; }
.hud-stars__gold { clip-path: inset(0 100% 0 0); transition: clip-path .6s var(--ease-out); }
.hud-rating__val { font-size: 25px; }
.hud-rating.is-pulse .hud-stars { animation: hud-pulse .8s var(--ease-out-back); }
.hud-rating.is-pulse .hud-rating__val { animation: hud-gain .8s var(--ease-out); }
.hud-rating.is-pulse.is-down .hud-rating__val { animation: hud-loss .8s var(--ease-out); }

@keyframes hud-pulse { 0% { transform: scale(1); } 30% { transform: scale(1.22) rotate(-3deg); } 100% { transform: scale(1); } }

.hud-rank { padding-left: 6px; gap: 6px; }
.hud-rank .hud-rank__badge { width: 46px; height: 46px; }
.hud-rank__name { font-size: 16px; font-weight: 800; color: #FFE9B8; }

/* speed, news, settings */
.hud-speed {
  display: flex;
  flex: none;
  height: 47px;
  border: 3.5px solid var(--c-ink);
  border-radius: 14px;
  overflow: hidden;
  background: #FBE3B2;
  box-shadow: 0 4px 0 var(--c-ink);
  pointer-events: auto;
}

.hud-speed__b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 100%;
  background: var(--hud-face);
  box-shadow: inset 0 -5px 0 #D8B777, inset 0 2px 0 rgba(255, 255, 255, .6);
  border-right: 2.5px solid rgba(58, 31, 18, .55);
  transition: filter .12s ease-out;
}

.hud-speed__b:last-child { border-right: 0; }
.hud-speed__b .hud-ic { width: 28px; height: 28px; transform: translateY(-2px); transition: transform .08s ease-out; }
.hud-speed__b:hover { filter: brightness(1.07); }
.hud-speed__b:active .hud-ic { transform: translateY(1px); }
.hud-speed__b.is-on { background: var(--hud-gold); box-shadow: inset 0 4px 0 rgba(120, 70, 0, .4); }
.hud-speed__b.is-on .hud-ic { transform: translateY(1px); }

.hud-round {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 47px;
  border: 3.5px solid var(--c-ink);
  border-radius: 14px;
  background: var(--hud-face);
  box-shadow: inset 0 -5px 0 #D8B777, inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--c-ink);
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-round .hud-ic { width: 30px; height: 30px; transform: translateY(-2px); }
.hud-round:hover { filter: brightness(1.07); transform: translateY(-1px); }
.hud-round:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 #D8B777, 0 1px 0 var(--c-ink); }
.hud-bell.is-ring .hud-ic { animation: hud-ring-bell .7s ease-out; transform-origin: 50% 10%; }

@keyframes hud-ring-bell {
  0% { transform: translateY(-2px) rotate(0); }
  20% { transform: translateY(-2px) rotate(-18deg); }
  40% { transform: translateY(-2px) rotate(14deg); }
  60% { transform: translateY(-2px) rotate(-8deg); }
  80% { transform: translateY(-2px) rotate(4deg); }
  100% { transform: translateY(-2px) rotate(0); }
}

.hud-count {
  position: absolute;
  right: -8px;
  top: -8px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 2.5px solid var(--c-ink);
  border-radius: 12px;
  background: var(--c-kumkum);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
}

/* ---------------------------------------------------------------- toolbar */

.hud-toolbar {
  position: absolute;
  left: 330px;
  top: 824px;
  width: 940px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px 3px;
  pointer-events: auto;
  background: var(--kolam-ink) 0 0 / 120px 120px, var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 22px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 4px 0 var(--c-ink);
}

.hud-tb {
  --face: var(--hud-face);
  --lip: #D8B777;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 68px;
  height: 52px;
  padding-bottom: 3px;
  border: 3px solid var(--c-ink);
  border-radius: 13px;
  background: var(--face);
  box-shadow: inset 0 -4px 0 var(--lip), inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--c-ink);
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-tb .hud-ic { width: 29px; height: 29px; margin-top: -1px; }
.hud-tb__lbl { margin-top: -1px; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: .1px; }
.hud-tb--tool { --face: var(--hud-gold); --lip: #C27F00; }
.hud-tb--view { width: 40px; }
.hud-tb--view .hud-ic { width: 27px; height: 27px; margin: 0; }
.hud-tb:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: inset 0 -4px 0 var(--lip), inset 0 2px 0 rgba(255, 255, 255, .6), 0 5px 0 var(--c-ink); }
.hud-tb:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 var(--lip), 0 0 0 var(--c-ink); }

.hud-tb.is-on {
  --face: linear-gradient(180deg, #F2314F 0%, var(--c-kumkum) 100%);
  color: #FFF6D8;
  transform: translateY(3px);
  box-shadow: inset 0 4px 0 rgba(90, 6, 20, .55), 0 0 0 var(--c-ink);
}

.hud-tb--view.is-on { --face: linear-gradient(180deg, #3FC7C2 0%, var(--c-teal) 100%); box-shadow: inset 0 4px 0 rgba(4, 60, 62, .55), 0 0 0 var(--c-ink); }

.hud-tb__sep { flex: none; width: 3px; height: 38px; margin: 0 3px; border-radius: 2px; background: rgba(58, 31, 18, .22); }

.hud-dot {
  position: absolute;
  right: -6px;
  top: -7px;
  width: 17px;
  height: 17px;
  border: 2.5px solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-kumkum);
  animation: hud-dot 1.1s ease-in-out infinite;
}

@keyframes hud-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.28); } }

/* ---------------------------------------------------------------- build palette */

.hud-palette {
  position: absolute;
  left: 200px;
  top: 650px;
  width: 1200px;
  height: 168px;
  animation: hud-rise .22s var(--ease-out);
}

@keyframes hud-rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

.hud-pal__bar {
  position: absolute;
  left: 18px;
  right: 14px;
  top: 0;
  height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.hud-pal__tabs { display: flex; align-items: flex-end; gap: 4px; }

.hud-pal__tab {
  height: 31px;
  padding: 0 16px 2px;
  border: 3.5px solid var(--c-ink);
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: linear-gradient(180deg, #E9D3A7 0%, #D9BF8E 100%);
  color: #6A4A2C;
  font-size: 15px;
  font-weight: 800;
  transition: height .12s var(--ease-out), filter .12s ease-out;
}

.hud-pal__tab:hover { filter: brightness(1.08); height: 34px; }

.hud-pal__tab.is-on {
  height: 38px;
  background: var(--c-jasmine);
  color: var(--c-kumkum);
  box-shadow: inset 0 4px 0 var(--c-turmeric);
  position: relative;
  z-index: 1;
}

.hud-pal__ctl { display: flex; align-items: center; gap: 7px; padding-bottom: 6px; min-width: 0; }

.hud-pal__hint {
  padding: 4px 13px 5px;
  border-radius: 999px;
  background: rgba(46, 18, 10, .9);
  color: var(--c-cream);
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-pal__hint:empty { display: none; }
.hud-pal__hint.is-warn { background: var(--c-kumkum); color: #fff; }

.hud-chipbtn {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  height: 31px;
  padding: 0 9px 2px 8px;
  border: 3px solid var(--c-ink);
  border-radius: 999px;
  background: var(--hud-face);
  box-shadow: 0 3px 0 var(--c-ink);
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 800;
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-chipbtn .hud-ic { width: 18px; height: 18px; }
.hud-chipbtn kbd { padding: 1px 5px 0; border-radius: 5px; background: rgba(58, 31, 18, .14); font: 700 11px/1.4 var(--font-ui); }
.hud-chipbtn--x { background: linear-gradient(180deg, #FFE7E1 0%, #FFC9BE 100%); }
.hud-chipbtn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.hud-chipbtn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--c-ink); }
.hud-chipbtn.is-disabled { opacity: .5; filter: grayscale(.6); }
.hud .is-spin .hud-ic { animation: hud-spin .42s var(--ease-out-back); }

@keyframes hud-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.hud-pal__cards {
  position: absolute;
  left: 0;
  right: 0;
  top: 35px;
  height: 128px;
  display: flex;
  gap: 6px;
  padding: 7px 9px 9px;
  overflow-x: auto;
  overflow-y: hidden;
  pointer-events: auto;
  background: var(--kolam-ink) 0 0 / 120px 120px, var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 20px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 5px 0 var(--c-ink);
  scrollbar-width: thin;
  scrollbar-color: var(--c-jaggery) transparent;
}

.hud-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 124px;
  height: 100%;
  padding: 2px 4px 5px;
  border: 3px solid var(--c-ink);
  border-radius: 13px;
  background: linear-gradient(180deg, #FFFDF5 0%, #FCEBC8 100%);
  box-shadow: inset 0 -4px 0 #E3C68D, 0 3px 0 var(--c-ink);
  transition: transform .09s ease-out, box-shadow .09s ease-out, filter .12s ease-out;
}

.hud-card__thumb { display: grid; place-items: center; flex: none; width: 100%; height: 52px; }
.hud-card__thumb > svg { width: 62px; height: 52px; }

.hud-card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.02;
  text-align: center;
}

.hud-card__cost { display: flex; align-items: center; gap: 3px; font-family: var(--font-display); font-size: 16px; line-height: 1; }
.hud-card__cost .hud-ic { width: 17px; height: 17px; }
.hud-card__cost small { font: 700 11px/1 var(--font-ui); }

.hud-card__lock { display: none; align-items: center; gap: 3px; max-width: 100%; min-height: 22px; font-size: 10.5px; font-weight: 800; line-height: 1.02; color: #6B3A2A; text-align: left; }
.hud-card__lock .hud-ic { width: 17px; height: 17px; }

.hud-card__need {
  display: none;
  position: absolute;
  left: 5px;
  right: 5px;
  top: 34px;
  padding: 2px 2px 3px;
  border: 2px solid var(--c-ink);
  border-radius: 8px;
  background: var(--c-kumkum);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.hud-card__own {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 28px;
  height: 22px;
  padding: 0 5px;
  border: 2.5px solid var(--c-ink);
  border-radius: 11px;
  background: var(--c-leaf);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.hud-card:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: inset 0 -4px 0 #E3C68D, 0 5px 0 var(--c-ink); }
.hud-card:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 #E3C68D, 0 0 0 var(--c-ink); }

.hud-card.is-on {
  background: var(--hud-gold);
  transform: translateY(3px);
  box-shadow: inset 0 4px 0 rgba(120, 70, 0, .4), inset 0 0 0 2.5px #FFF6D8, 0 0 0 var(--c-ink);
}

.hud-card.is-pick .hud-card__thumb { animation: hud-pop .3s var(--ease-out-back); }
.hud-card.is-poor .hud-card__thumb { opacity: .6; filter: saturate(.45); }
.hud-card.is-poor .hud-card__cost { color: var(--c-kumkum); }
.hud-card.is-poor .hud-card__need { display: block; }
.hud-card.is-locked { background: linear-gradient(180deg, #E8DFCD 0%, #D9CDB6 100%); box-shadow: inset 0 -4px 0 #B8AA90, 0 3px 0 var(--c-ink); }
.hud-card.is-locked .hud-card__thumb { opacity: .55; filter: grayscale(1) brightness(.72) contrast(.85); }
.hud-card.is-locked .hud-card__name { color: #75624E; }
.hud-card.is-locked .hud-card__cost { display: none; }
.hud-card.is-locked .hud-card__lock { display: flex; }

/* bulldoze / move hint strip */
.hud-toolhint {
  position: absolute;
  left: 800px;
  top: 776px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 7px 0 10px;
  border: 3.5px solid var(--c-ink);
  border-radius: 999px;
  background: rgba(46, 18, 10, .93);
  color: var(--c-cream);
  box-shadow: 0 4px 0 rgba(30, 8, 4, .55);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: auto;
  animation: hud-rise .2s var(--ease-out);
}

.hud-toolhint__ic { width: 26px; height: 26px; }
.hud-toolhint--bulldoze { background: rgba(142, 27, 45, .95); }
.hud-toolhint.is-warn .hud-toolhint__txt { color: #FFDD66; }

/* ---------------------------------------------------------------- shared buttons */

.hud-btn {
  --face: #FFF7E6;
  --face2: #FBE3B2;
  --lip: #D8B777;
  --txt: var(--c-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 11px 4px;
  border: 3px solid var(--c-ink);
  border-radius: 13px;
  background: linear-gradient(180deg, var(--face) 0%, var(--face2) 100%);
  box-shadow: inset 0 -4px 0 var(--lip), inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--c-ink);
  color: var(--txt);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  letter-spacing: .3px;
  white-space: nowrap;
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-btn .hud-ic { width: 20px; height: 20px; }
.hud-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.hud-btn:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 var(--lip), 0 0 0 var(--c-ink); }
.hud-btn--gold { --face: #FFDD66; --face2: var(--c-turmeric); --lip: #C27F00; }
.hud-btn--go { --face: #8EDB6F; --face2: #58B943; --lip: #2F7F26; --txt: #10330D; }
.hud-btn--danger { --face: #F4566D; --face2: var(--c-kumkum); --lip: #8C0A1F; --txt: #FFF6D8; }
.hud-btn--mini { min-height: 32px; padding: 0 9px 3px; border-width: 2.5px; border-radius: 10px; font-size: 13.5px; box-shadow: inset 0 -3px 0 var(--lip), 0 2px 0 var(--c-ink); }
.hud-btn--mini .hud-ic { width: 17px; height: 17px; }
.hud-btn--wide { width: 100%; }

.hud-btn.is-disabled {
  --face: #E9E0CF;
  --face2: #D9CDB6;
  --lip: #B8AA90;
  --txt: #7C6A56;
  border-color: #6B5546;
  box-shadow: inset 0 -4px 0 var(--lip), 0 3px 0 #6B5546;
  filter: none;
  transform: none;
}

.hud-btn.is-disabled .hud-ic { filter: grayscale(.9); opacity: .6; }

.hud-link { padding: 2px 4px; font-size: 12.5px; font-weight: 700; color: #8A5A2A; text-decoration: underline; text-underline-offset: 2px; }
.hud-link:hover { color: var(--c-kumkum); }

.hud-x {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--c-ink);
  border-radius: 10px;
  background: var(--hud-face);
  box-shadow: 0 3px 0 var(--c-ink);
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-x .hud-ic { width: 17px; height: 17px; }
.hud-x:hover { filter: brightness(1.08); }
.hud-x:active { transform: translateY(3px); box-shadow: 0 0 0 var(--c-ink); }

.hud .is-shake { animation: hud-shake .36s ease-out; }
.hud .is-pop { animation: hud-pop .22s var(--ease-out-back); }

@keyframes hud-shake {
  0%, 100% { translate: 0 0; }
  18% { translate: -6px 0; }
  36% { translate: 6px 0; }
  54% { translate: -4px 0; }
  72% { translate: 3px 0; }
}

@keyframes hud-pop { from { scale: .8; opacity: .4; } to { scale: 1; opacity: 1; } }

/* ---------------------------------------------------------------- inspector */

.hud-insp {
  position: absolute;
  left: 1250px;
  top: 80px;
  width: 342px;
  max-height: 555px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  background: var(--kolam-ink) 0 0 / 130px 130px, var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--c-ink);
  transition: opacity .15s ease-out, transform .15s ease-out;
}

.hud-insp.is-in { animation: hud-slide .24s var(--ease-out); }
.hud-insp.is-leaving { opacity: 0; transform: translateX(18px); }

@keyframes hud-slide { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }

.hud-insp__head {
  display: flex;
  align-items: center;
  flex: none;
  gap: 10px;
  padding: 9px 10px 10px 11px;
  background: var(--kolam-gold) 0 -20px / 96px 96px, var(--hud-maroon);
  border-bottom: 3.5px solid var(--c-ink);
  box-shadow: inset 0 -3px 0 var(--c-turmeric);
  color: var(--c-cream);
}

.hud-insp__thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border: 3px solid var(--c-ink);
  border-radius: 13px;
  background: radial-gradient(circle at 50% 35%, #FFF6D8 0%, #FFE2A0 100%);
}

.hud-insp__thumb > svg { width: 54px; height: 54px; }
.hud-insp__thumb--guest { width: 64px; height: 72px; }
.hud-insp__thumb--guest > svg { position: absolute; left: 50%; top: -5px; width: 104px; height: 156px; transform: translateX(-50%); }
.hud-insp__thumb--staff > svg { width: 60px; height: 60px; }

.hud-insp__ttl { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 auto; }

.hud-insp__name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: .4px;
  color: var(--c-turmeric);
  -webkit-text-stroke: 4px var(--c-ink);
  paint-order: stroke fill;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 2px 2px 2px;
  margin: -2px;
}

.hud-insp__sub { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: #FFE9B8; }
.hud-insp__head .hud-x { align-self: flex-start; }

.hud-pips { display: inline-flex; gap: 3px; }
.hud-pip { width: 13px; height: 13px; border: 2.5px solid var(--c-ink); border-radius: 50%; background: rgba(0, 0, 0, .4); }
.hud-pip.is-on { background: var(--c-turmeric); }

.hud-tag { padding: 1px 9px 2px; border: 2px solid rgba(255, 244, 220, .55); border-radius: 999px; background: rgba(255, 244, 220, .16); color: var(--c-cream); font-size: 12.5px; font-weight: 800; }
.hud-tag--special { border-color: var(--c-ink); background: var(--c-turmeric); color: var(--c-ink); }

.hud-lvl { display: inline-flex; gap: 1px; }
.hud-lvl .hud-ic { width: 16px; height: 16px; }
.hud-lvl .hud-ic.is-off { opacity: .3; }

.hud-insp__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 9px;
  min-height: 0;
  padding: 10px 11px 11px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--c-jaggery) transparent;
  /* content fades out under the footer, a hint that the panel scrolls */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 12px), transparent 100%);
}

.hud-insp__body > * { flex: none; }

.hud-insp__foot {
  display: flex;
  flex: none;
  gap: 7px;
  padding: 9px 10px 10px;
  border-top: 3px solid rgba(58, 31, 18, .22);
  background: rgba(232, 163, 61, .2);
}

.hud-insp__foot .hud-btn { flex: 1 1 auto; min-width: 0; padding-left: 7px; padding-right: 7px; gap: 4px; font-size: 15px; }
.hud-insp__foot .hud-btn .hud-ic { width: 18px; height: 18px; }

.hud-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 7px 8px;
  border: 2.5px solid var(--c-ink);
  border-radius: 12px;
  background: #E9F7DB;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.15;
}

.hud-status .hud-ic { width: 22px; height: 22px; }
.hud-status[data-kind="bad"] { background: #FFE0DA; color: #7A0A1C; }
.hud-status[data-kind="info"] { background: #FFF1CC; }

.hud-sec__h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; font-size: 12px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--c-jaggery); }
.hud-sec__h small { font-size: 11.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #9A7B55; }
.hud-sec--upg { display: flex; flex-direction: column; gap: 5px; }
.hud-sec--row { display: flex; align-items: center; gap: 8px; }
.hud-fine { font-size: 13px; font-weight: 600; line-height: 1.25; color: #6B4A2E; }
.hud-desc { font-size: 14px; font-weight: 600; line-height: 1.3; color: #5A3B22; }

.hud-cook { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.hud-cook__who { display: flex; align-items: center; gap: 7px; padding: 2px 8px 2px 2px; border-radius: 12px; text-align: left; transition: background-color .12s ease-out; }
.hud-cook__who:hover { background: rgba(245, 179, 1, .28); }
.hud-cook__face { width: 42px; height: 42px; }
.hud-cook__name { font-size: 15.5px; font-weight: 800; }
.hud-cook__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.hud-cook--none { flex-direction: column; align-items: stretch; }
.hud-cook--none .hud-cook__btns { margin-left: 0; justify-content: flex-start; }

.hud-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hud-kpis--two { grid-template-columns: 1fr 1fr; }
.hud-kpis > div { padding: 5px 4px 5px; border: 2px solid rgba(58, 31, 18, .22); border-radius: 12px; background: rgba(255, 255, 255, .62); text-align: center; }
.hud-kpis b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 400; line-height: 1.1; }
.hud-kpis span { display: block; font-size: 11.5px; font-weight: 700; line-height: 1.1; color: #7A5A3A; }

.hud-dish { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 2px dotted rgba(58, 31, 18, .22); }
.hud-sec__h + .hud-dish { border-top: 0; padding-top: 0; }
.hud-dish__ic { width: 36px; height: 36px; }
.hud-dish__name { font-size: 14.5px; font-weight: 800; line-height: 1.1; }
.hud-dish__name small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: #7A5A3A; }
.hud-dish__ctl { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.hud-step { display: flex; align-items: center; overflow: hidden; border: 2.5px solid var(--c-ink); border-radius: 10px; background: #fff; box-shadow: 0 2px 0 var(--c-ink); }
.hud-step__b { width: 29px; height: 28px; padding-bottom: 3px; background: var(--hud-gold); font-family: var(--font-display); font-size: 21px; line-height: 1; transition: filter .1s ease-out; }
.hud-step__b:hover { filter: brightness(1.1); }
.hud-step__b:active { filter: brightness(.88); }
.hud-step > b { min-width: 50px; padding: 0 4px; font-family: var(--font-display); font-size: 16.5px; font-weight: 400; text-align: center; }

.hud-verdict { padding: 1px 9px 2px; border: 2px solid var(--c-ink); border-radius: 999px; background: #E9F7DB; font-size: 11px; font-weight: 800; line-height: 1.1; }
.hud-verdict:empty { display: none; }
.hud-verdict[data-v="bargain"] { background: #CDF0EC; }
.hud-verdict[data-v="pricey"] { background: #FFE08A; }
.hud-verdict[data-v="tooHigh"] { background: #FFB7AB; }
.hud-verdict[data-v="off"] { background: #E3D7C1; color: #75624E; border-color: #75624E; }

.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0 0; border-top: 2px dotted rgba(58, 31, 18, .22); font-size: 14px; font-weight: 600; }
.hud-row b { display: flex; align-items: center; gap: 6px; font-weight: 800; text-align: right; }

.hud-bars { display: flex; flex-direction: column; gap: 6px; }
.hud-bar { display: grid; grid-template-columns: 78px 1fr 26px; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; }
.hud-bar > i { display: block; height: 15px; overflow: hidden; border: 2.5px solid var(--c-ink); border-radius: 8px; background: #fff; }
.hud-bar > i > b { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: var(--c-good); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4); transition: transform .3s ease-out, background-color .3s; }
.hud-bar > i > b[data-tone="mid"] { background: var(--c-turmeric); }
.hud-bar > i > b[data-tone="bad"] { background: var(--c-burnt); }
.hud-bar > i > b[data-tone="water"] { background: #4FC3F0; }
.hud-bar > em { font-style: normal; text-align: right; }

.hud-bought { display: flex; flex-wrap: wrap; gap: 4px; }
.hud-bought .hud-ic { width: 36px; height: 36px; pointer-events: auto; }

.hud-thoughts { display: flex; flex-direction: column; gap: 4px; }
.hud-thoughts li { padding: 5px 9px 6px; border-left: 5px solid #C9B28A; border-radius: 9px; background: rgba(255, 255, 255, .66); font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.hud-thoughts li[data-s="1"] { border-color: var(--c-leaf); background: #EDF8E2; }
.hud-thoughts li[data-s="-1"] { border-color: var(--c-kumkum); background: #FFE9E4; }
.hud-thoughts li.hud-fine { border-left-color: transparent; background: none; padding-left: 0; }

.hud-seats { display: flex; flex-wrap: wrap; gap: 6px; }
.hud-seat { display: grid; place-items: center; width: 36px; height: 36px; border: 2.5px dashed rgba(58, 31, 18, .4); border-radius: 10px; }
.hud-seat > svg { width: 26px; height: 26px; }
.hud-seat.is-used { border-style: solid; border-color: var(--c-ink); background: #E9F7DB; }
.hud-seat.is-dirty { border-style: solid; border-color: var(--c-ink); background: #FFD3CA; }
.hud-seat.is-dirty:not(.is-used)::after { content: ''; width: 18px; height: 18px; border: 2.5px solid var(--c-ink); border-radius: 50%; background: radial-gradient(circle at 40% 40%, #B98A54 0 3px, #E6D2B0 4px); }

/* ---------------------------------------------------------------- toasts, banner, news */

.hud-feed {
  position: absolute;
  left: 500px;
  top: 76px;
  width: 600px;
  height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.hud-toasts { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; }

.hud-toast {
  --tone: #C9B28A;
  display: flex;
  align-items: stretch;
  flex: none;
  max-width: 600px;
  min-height: 38px;
  overflow: hidden;
  border: 3px solid var(--c-ink);
  border-radius: 13px;
  background: linear-gradient(90deg, var(--tone) 0 9px, var(--c-jasmine) 9px);
  box-shadow: 0 3px 0 var(--c-ink), 0 8px 14px rgba(30, 8, 4, .22);
  pointer-events: auto;
  animation: hud-toast-in .3s var(--ease-out-back);
  transition: opacity .18s ease-out, transform .18s ease-out;
}

.hud-toast.is-leaving { opacity: 0; transform: translateY(-8px) scale(.96); }

@keyframes hud-toast-in { from { transform: translateY(-14px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

.hud-toast__main { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 2px 12px 3px 15px; font-size: 15px; font-weight: 800; line-height: 1.12; text-align: left; }
.hud-toast__main:hover { background: rgba(245, 179, 1, .16); }
.hud-toast__main .hud-ic { width: 26px; height: 26px; }
.hud-toast__txt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.hud-toast__n { flex: none; padding: 2px 7px 3px; border-radius: 999px; background: var(--c-ink); color: var(--c-cream); font-size: 12px; line-height: 1; }
.hud-toast__main .hud-toast__go { width: 17px; height: 17px; opacity: .65; }
.hud-toast__btn { flex: none; padding: 0 14px 2px; border-left: 3px solid var(--c-ink); background: var(--hud-gold); font-family: var(--font-display); font-size: 15px; }
.hud-toast__btn:hover { filter: brightness(1.08); }
.hud-toast--good { --tone: var(--c-good); }
.hud-toast--bad { --tone: var(--c-burnt); }
.hud-toast--award { --tone: var(--c-turmeric); }
.hud-toast--research { --tone: var(--c-teal); }
.hud-toast--rank { --tone: var(--c-marigold); }
.hud-toast--event { --tone: #D96BA0; }

.hud-banner {
  display: flex;
  align-items: center;
  flex: none;
  gap: 9px;
  height: 38px;
  padding: 0 20px 1px 16px;
  border: 3px solid var(--c-ink);
  border-radius: 999px;
  background: var(--hud-maroon);
  box-shadow: inset 0 0 0 2px var(--c-turmeric), 0 3px 0 var(--c-ink);
  transition: opacity .25s ease-out, transform .25s ease-out;
}

.hud-banner .hud-ic { width: 30px; height: 30px; margin-left: -8px; }
.hud-banner__day { font-family: var(--font-display); font-size: 23px; line-height: 1; color: var(--c-turmeric); -webkit-text-stroke: 4px var(--c-ink); paint-order: stroke fill; }
.hud-banner__sub { font-size: 15px; font-weight: 800; color: var(--c-cream); white-space: nowrap; }
.hud-banner.is-in { animation: hud-banner-in .5s var(--ease-out-back); }
.hud-banner.is-leaving { opacity: 0; transform: translateY(-10px); }

@keyframes hud-banner-in { from { transform: translateY(-30px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

.hud-news {
  position: absolute;
  right: 8px;
  top: 76px;
  z-index: 5;
  width: 404px;
  max-height: 470px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  background: var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--c-ink), 0 16px 30px rgba(30, 8, 4, .35);
  animation: hud-drop .2s var(--ease-out);
}

@keyframes hud-drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

.hud-news__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 8px 9px 9px 16px;
  background: var(--hud-maroon);
  border-bottom: 3.5px solid var(--c-ink);
  box-shadow: inset 0 -3px 0 var(--c-turmeric);
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--c-turmeric);
  -webkit-text-stroke: 4px var(--c-ink);
  paint-order: stroke fill;
}

.hud-news__list { display: flex; flex-direction: column; gap: 5px; padding: 9px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--c-jaggery) transparent; }

.hud-news__item {
  --tone: #C9B28A;
  display: flex;
  align-items: flex-start;
  flex: none;
  gap: 8px;
  width: 100%;
  padding: 6px 9px 7px 7px;
  border-left: 6px solid var(--tone);
  border-radius: 10px;
  background: rgba(255, 255, 255, .66);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.hud-news__item .hud-ic { width: 24px; height: 24px; margin-top: 1px; }
.hud-news__item small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: #8A6A48; }
.hud-news__item.is-link:hover { background: #fff; }
.hud-news__item--good { --tone: var(--c-good); }
.hud-news__item--bad { --tone: var(--c-burnt); }
.hud-news__item--award { --tone: var(--c-turmeric); }
.hud-news__item--research { --tone: var(--c-teal); }
.hud-news__item--rank { --tone: var(--c-marigold); }
.hud-news__item--event { --tone: #D96BA0; }
.hud-news__empty { padding: 14px 10px; font-size: 14px; font-weight: 600; color: #6B4A2E; text-align: center; }

/* ---------------------------------------------------------------- chef advisor */

.hud-adv { position: absolute; left: 8px; top: 640px; width: 312px; height: 256px; }

.hud-adv__chef {
  position: absolute;
  left: 0;
  bottom: 5px;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .12s var(--ease-out-back), filter .12s ease-out;
}

.hud-adv__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 4px solid var(--c-ink);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FFF6D8 0%, #FFD95A 60%, var(--c-turmeric) 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55), 0 5px 0 var(--c-ink);
}

.hud-adv__face > svg { position: absolute; left: 50%; top: 2px; width: 150px; height: 180px; transform: translateX(-50%); }
.hud-adv__chef:hover { transform: translateY(-2px) rotate(-3deg); filter: brightness(1.05); }
.hud-adv__chef:active { transform: translateY(3px); }

.hud-adv__q {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 32px;
  height: 32px;
  border: 3px solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-teal);
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  line-height: 25px;
  text-align: center;
  animation: hud-bob 1.6s ease-in-out infinite;
}

@keyframes hud-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.hud-adv__bubble {
  position: absolute;
  left: 0;
  bottom: 122px;
  width: 312px;
  padding: 11px 13px 11px;
  pointer-events: auto;
  background: var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 20px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 5px 0 var(--c-ink);
}

.hud-adv__bubble.is-in { animation: hud-pop .26s var(--ease-out-back); transform-origin: 14% 100%; }

/* speech tail toward the chef */
.hud-adv__bubble::after {
  content: '';
  position: absolute;
  left: 40px;
  bottom: -13px;
  width: 18px;
  height: 18px;
  background: #FBE6BC;
  border-right: 4px solid var(--c-ink);
  border-bottom: 4px solid var(--c-ink);
  transform: rotate(45deg);
  box-shadow: 4px 4px 0 var(--c-ink);
}

.hud-adv__text { font-size: 14.5px; font-weight: 700; line-height: 1.27; padding-right: 30px; min-height: 34px; }
.hud-adv__text b { font-weight: 800; color: var(--c-kumkum); }
.hud-adv__x { position: absolute; right: 7px; top: 7px; width: 28px; height: 28px; }
.hud-adv__x .hud-ic { width: 14px; height: 14px; }
.hud-adv__btns { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* The tour card fills the whole corner; the chef overlaps its lower-left and the checklist sits beside him. */
.hud-adv__bubble:has(.hud-adv__list) { bottom: 5px; display: flex; flex-direction: column; }
.hud-adv__bubble:has(.hud-adv__list)::after { display: none; }
.hud-adv__bubble:has(.hud-adv__list) .hud-adv__btns { justify-content: flex-end; margin-top: auto; padding-top: 2px; }

/* Build mode: the palette takes the right half of this corner. */
.hud-adv__bubble.is-narrow { width: 186px; padding: 9px 10px 10px; }
.hud-adv__bubble.is-narrow .hud-adv__text { font-size: 14px; line-height: 1.22; padding-right: 0; }
.hud-adv__bubble.is-narrow .hud-adv__x { display: none; }

.hud-adv__list { display: flex; flex-direction: column; gap: 4px; margin: 9px 0 0 102px; padding-top: 8px; border-top: 2px dotted rgba(58, 31, 18, .25); }
.hud-adv__list li { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 700; line-height: 1.12; color: #7A5A3A; }
.hud-adv__list li > i { flex: none; width: 15px; height: 15px; margin-top: -1px; border: 2px solid rgba(58, 31, 18, .5); border-radius: 5px; background: #fff; }
.hud-adv__list li > i > svg { display: block; width: 15px; height: 15px; margin: -3px 0 0 -1px; }
.hud-adv__list li em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #B0452E; white-space: nowrap; }
.hud-adv__list li.is-done { color: #4E8A3A; text-decoration: line-through; text-decoration-color: rgba(78, 138, 58, .6); }
.hud-adv__list li.is-done > i { border-color: var(--c-ink); background: #DDF3C8; }
.hud-adv__list li.is-now { color: var(--c-ink); font-weight: 800; }
.hud-adv__list li.is-now > i { border-color: var(--c-kumkum); box-shadow: 0 0 0 2px rgba(200, 16, 46, .25); animation: hud-dot 1s ease-in-out infinite; }

/* ---------------------------------------------------------------- floating helpers */

.hud-ring {
  position: absolute;
  z-index: 6;
  border: 4px solid #FFFDF5;
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--c-kumkum), 0 0 20px 8px rgba(255, 196, 0, .75), inset 0 0 12px 2px rgba(255, 196, 0, .5);
  animation: hud-ring 1s ease-in-out infinite;
}

@keyframes hud-ring { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .8; } }

.hud-ring > i,
.hud-mark > i {
  position: absolute;
  left: 50%;
  width: 34px;
  height: 38px;
  margin-left: -17px;
  animation: hud-bounce .55s ease-in-out infinite alternate;
}

.hud-ring > i { top: -46px; }
.hud-ring > i > svg, .hud-mark > i > svg { display: block; width: 100%; height: 100%; }
.hud-ring.is-below > i { top: auto; bottom: -46px; rotate: 180deg; }
.hud-ring.is-bare > i { display: none; }
.hud-ring.is-side > i { left: -30px; top: 50%; bottom: auto; margin-top: -19px; rotate: -90deg; animation-name: hud-nudge; }

@keyframes hud-nudge { from { translate: 0 0; } to { translate: -9px 0; } }

@keyframes hud-bounce { from { translate: 0 0; } to { translate: 0 -9px; } }

.hud-mark { position: absolute; left: 0; top: 0; width: 0; height: 0; }

.hud-mark::before {
  content: '';
  position: absolute;
  left: -34px;
  top: -17px;
  width: 68px;
  height: 34px;
  border: 3.5px solid #FFFDF5;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--c-kumkum), 0 0 14px 4px rgba(255, 196, 0, .7);
  animation: hud-ring 1s ease-in-out infinite;
}

.hud-mark > i { top: -52px; }

.hud-mark > span {
  position: absolute;
  left: 0;
  top: -80px;
  transform: translateX(-50%);
  padding: 2px 10px 3px;
  border: 2.5px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-kumkum);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.hud-mark > span:empty { display: none; }

.hud-chips { position: absolute; z-index: 4; display: flex; gap: 8px; }

.hud-chips__b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3.5px solid var(--c-ink);
  border-radius: 50%;
  background: var(--hud-face);
  box-shadow: 0 4px 0 var(--c-ink);
}

.hud-chips__b .hud-ic { width: 28px; height: 28px; }
.hud-chips__b--ok { background: linear-gradient(180deg, #A6E88A 0%, #58B943 100%); }
.hud-chips__b--x { background: linear-gradient(180deg, #FFE7E1 0%, #FFC9BE 100%); }
.hud-chips__b:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-ink); }

.hud-note {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 380px;
  padding: 6px 12px 7px;
  border: 3px solid var(--c-ink);
  border-radius: 13px;
  background: var(--c-jasmine);
  box-shadow: 0 3px 0 var(--c-ink), 0 8px 16px rgba(30, 8, 4, .25);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
}

.hud-note--bad { background: #FFE0DA; color: #7A0A1C; }
.hud-note--act { pointer-events: auto; }
.hud-note__btn { flex: none; padding: 4px 10px 5px; border: 2.5px solid var(--c-ink); border-radius: 10px; background: var(--hud-gold); box-shadow: 0 2px 0 var(--c-ink); color: var(--c-ink); font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.hud-note__btn:active { transform: translateY(2px); box-shadow: none; }

.hud-tip {
  position: absolute;
  z-index: 9;
  max-width: 310px;
  padding: 7px 11px 8px;
  border: 2.5px solid #1B0A05;
  border-radius: 11px;
  background: rgba(46, 18, 10, .97);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  color: var(--c-cream);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
}

.hud-tip b { display: block; margin-bottom: 2px; font-size: 14.5px; font-weight: 800; color: var(--c-turmeric); }
.hud-tip span { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hud *,
  .hud *::before,
  .hud *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ================================================================ the chain (SPEC section 10) */

/* H: everything fades out for a clean look; nothing takes the pointer while hidden. */
:where(.hud) > * { transition: opacity .22s ease-out; }       /* zero specificity: a panel's own transition still wins */
.hud.is-off > *:not(.hud-peek) { opacity: 0 !important; pointer-events: none !important; }
.hud.is-off * { pointer-events: none !important; }

.hud-peek {
  position: absolute;
  left: 800px;
  top: 846px;
  transform: translateX(-50%);
  padding: 5px 14px 6px;
  border-radius: 999px;
  background: rgba(46, 18, 10, .88);
  color: var(--c-cream);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.hud-peek.is-show { animation: hud-peek 2.4s ease-out both; }

@keyframes hud-peek { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---- top bar in a chain: an outlet switcher on the left, everything else a little tighter */

.hud-top__grp { flex: none; }

.hud-switch {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  height: 47px;
  max-width: 214px;
  padding: 0 9px 3px 5px;
  border: 3.5px solid var(--c-ink);
  border-radius: 14px;
  background: var(--hud-face);
  box-shadow: inset 0 -5px 0 #D8B777, inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--c-ink);
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-switch:hover { filter: brightness(1.07); transform: translateY(-1px); }
.hud-switch:active, .hud-switch[aria-expanded="true"] { transform: translateY(3px); box-shadow: inset 0 -2px 0 #D8B777, 0 1px 0 var(--c-ink); }
.hud-switch .hud-switch__badge { width: 36px; height: 36px; }
.hud-switch__name { min-width: 0; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; line-height: 1.1; }
.hud-switch__caret { flex: none; font-style: normal; font-size: 13px; line-height: 1; opacity: .7; }
.hud-switch > .hud-dot { right: -7px; top: -8px; }

.hud--chain .hud-top { padding-left: 9px; padding-right: 9px; gap: 8px; }
.hud--chain .hud-top__grp { gap: 7px; }
.hud--chain .hud-well { padding-left: 10px; padding-right: 10px; }
.hud--chain .hud-sign { width: 114px; }
.hud--chain .hud-sign__rope::before { left: 24px; }
.hud--chain .hud-sign__rope::after { right: 24px; }
.hud--chain .hud-sign__txt { font-size: 23px; letter-spacing: 1.2px; }
.hud--chain .hud-sign:not(.is-open) .hud-sign__txt { font-size: 19.5px; letter-spacing: .6px; }
.hud--chain .hud-day { width: 184px; column-gap: 6px; }
.hud--chain .hud-day__date { font-size: 14px; }
.hud--chain .hud-day__clock { font-size: 19px; }
.hud--chain .hud-cash { min-width: 172px; }
.hud--chain .hud-stars { width: 100px; height: 20px; }
.hud--chain .hud-stars__row .hud-ic { width: 20px; height: 20px; }
.hud--chain .hud-speed__b { width: 42px; }
.hud--chain .hud-event { padding-left: 5px; }
.hud--chain .hud-rank { padding-left: 5px; }

/* giving ground when the bar overruns: event chip to its icon, rank to its badge, then a shorter outlet name */
.hud-top[data-tight] .hud-event { padding-right: 5px; }
.hud-top[data-tight] .hud-event__name { display: none; }
.hud-top[data-tight="2"] .hud-rank, .hud-top[data-tight="3"] .hud-rank { padding-right: 5px; }
.hud-top[data-tight="2"] .hud-rank__name, .hud-top[data-tight="3"] .hud-rank__name { display: none; }
.hud-top[data-tight="3"] .hud-switch__name { max-width: 9ch; }

.hud-train, .hud--chain .hud-train { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 112px; padding: 0 9px; }
.hud-train__cap { font-size: 11.5px; font-weight: 700; line-height: 1; color: #F0D2A6; }
.hud-train__val { font-family: var(--font-display); font-size: 19px; line-height: 1; color: var(--c-turmeric); -webkit-text-stroke: 3.5px var(--c-ink); paint-order: stroke fill; }
.hud-train.is-here { box-shadow: inset 0 0 0 2.5px rgba(40, 14, 8, .95), inset 0 0 0 5px rgba(245, 179, 1, .7), 0 2px 0 rgba(255, 214, 150, .22); }
.hud-train.is-here .hud-train__val { font-family: var(--font-ui); font-size: 13px; font-weight: 800; -webkit-text-stroke: 0; color: #FFE08A; }

/* ---- toolbar with the Outlets button: eight window buttons share the row */
.hud--chain .hud-toolbar { gap: 3px; padding-left: 5px; padding-right: 5px; }
.hud--chain .hud-tb { width: 62px; }
.hud--chain .hud-tb--tool { width: 66px; }
.hud--chain .hud-tb--view { width: 38px; }
.hud--chain .hud-tb__lbl { font-size: 11.5px; letter-spacing: -.15px; }
.hud--chain .hud-tb__sep { margin: 0 2px; }

/* ---- the switcher's list of outlets */
.hud-swi {
  position: absolute;
  left: 8px;
  top: 76px;
  z-index: 5;
  width: 430px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  background: var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--c-ink), 0 16px 30px rgba(30, 8, 4, .35);
  animation: hud-drop .2s var(--ease-out);
}

.hud-swi__list { display: flex; flex-direction: column; gap: 5px; padding: 9px 9px 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--c-jaggery) transparent; }

.hud-swi__row {
  display: flex;
  align-items: center;
  flex: none;
  gap: 9px;
  width: 100%;
  padding: 6px 10px 7px 7px;
  border: 2.5px solid rgba(58, 31, 18, .25);
  border-radius: 13px;
  background: rgba(255, 255, 255, .62);
  text-align: left;
  transition: background-color .12s ease-out, transform .08s ease-out;
}

.hud-swi__row:hover { background: #fff; }
.hud-swi__row:active { transform: translateY(2px); }
.hud-swi__row.is-active { border-color: var(--c-ink); background: linear-gradient(180deg, #FFE9A8 0%, #FFD95A 100%); box-shadow: 0 3px 0 var(--c-ink); }
.hud-swi__row .hud-swi__badge { width: 44px; height: 44px; }
.hud-swi__main { display: flex; flex-direction: column; flex: 1 1 auto; gap: 2px; min-width: 0; }
.hud-swi__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 17px; line-height: 1.1; letter-spacing: .2px; }
.hud-swi__town { font-size: 12.5px; font-weight: 700; line-height: 1.1; color: #7A5A3A; }
.hud-swi__town em { font-style: normal; color: var(--c-kumkum); }
.hud-swi__warn { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 12.5px; font-weight: 800; line-height: 1.15; color: #8E1B2D; }
.hud-swi__warn .hud-dot { position: static; flex: none; width: 12px; height: 12px; border-width: 2px; }
.hud-swi__warn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-swi__warn--news { color: #7A5A3A; }
.hud-swi__warn--news .hud-dot { background: var(--c-teal); animation: none; }
.hud-swi__stats { display: flex; flex-direction: column; align-items: flex-end; flex: none; gap: 2px; font-size: 13px; font-weight: 800; line-height: 1.1; }
.hud-swi__stats > span { display: flex; align-items: center; gap: 3px; }
.hud-swi__stats .hud-ic { width: 15px; height: 15px; }
.hud-swi__stats .is-pos { color: #2F7F26; }
.hud-swi__stats .is-neg { color: var(--c-kumkum); }
.hud-swi__foot { display: flex; justify-content: flex-end; flex: none; gap: 7px; padding: 6px 9px 10px; }

/* an outlet's name on news from elsewhere; five hues so two outlets are told apart at a glance */
.hud-tagged { flex: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 8px 2px; border: 2px solid var(--c-ink); border-radius: 999px; background: #FFE08A; font-size: 12px; font-weight: 800; line-height: 1.15; vertical-align: 1px; }
.hud-tagged[data-hue="1"] { background: #BFE9E6; }
.hud-tagged[data-hue="2"] { background: #FFC9BE; }
.hud-tagged[data-hue="3"] { background: #D5EDBF; }
.hud-tagged[data-hue="4"] { background: #E4D0F2; }
.hud-news__txt .hud-tagged { display: inline-block; }

.hud-news__filter { display: flex; margin: 0 8px 0 auto; overflow: hidden; border: 2.5px solid var(--c-ink); border-radius: 10px; -webkit-text-stroke: 0; }
.hud-news__f { padding: 3px 10px 4px; background: var(--hud-face); color: var(--c-ink); font-family: var(--font-ui); font-size: 13px; font-weight: 800; line-height: 1.1; }
.hud-news__f + .hud-news__f { border-left: 2.5px solid var(--c-ink); }
.hud-news__f.is-on { background: var(--hud-gold); box-shadow: inset 0 3px 0 rgba(120, 70, 0, .35); }

/* ---- dish of the day */
.hud-dish:has(.hud-star) { grid-template-columns: 36px 1fr 28px auto; gap: 6px; }

.hud-star { display: grid; place-items: center; width: 28px; height: 28px; border: 2.5px solid rgba(58, 31, 18, .35); border-radius: 9px; background: rgba(255, 255, 255, .6); transition: transform .08s ease-out, filter .12s ease-out; }
.hud-star .hud-ic { width: 18px; height: 18px; filter: grayscale(1); opacity: .45; }
.hud-star:hover .hud-ic { opacity: .8; }
.hud-star.is-on { border-color: var(--c-ink); background: var(--hud-gold); box-shadow: 0 2px 0 var(--c-ink); }
.hud-star.is-on .hud-ic { filter: none; opacity: 1; }
.hud-star:active { transform: translateY(2px); }

/* ---- a town's welcome card: its traits sit beside the chef like the tour's checklist */
.hud-adv__list--traits li { color: var(--c-ink); font-weight: 700; }
.hud-adv__list--traits li > i { width: 8px; height: 8px; margin-top: 3px; border: 0; border-radius: 50%; background: var(--c-kumkum); }

/* ================================================================ bigger buildings (SPEC section 11) */

/* ---- Build → Expand: two wide cards with a diagram, then the staircase */
.hud-card--wide {
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  align-items: center;
  column-gap: 9px;
  row-gap: 3px;
  width: 306px;
  padding: 4px 10px 7px 6px;
  text-align: left;
}

.hud-card--wide .hud-card__thumb { grid-row: 1 / 5; width: 96px; height: 78px; }
.hud-card--wide .hud-card__thumb > svg { width: 96px; height: 74px; }
.hud-card--wide .hud-card__name { display: block; flex: none; min-height: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 16.5px; font-weight: 400; line-height: 1.1; text-align: left; }
.hud-card__line { font-size: 12.5px; font-weight: 700; line-height: 1.15; color: #6B4A2E; white-space: nowrap; }
.hud-card--wide .hud-card__cost { justify-self: start; font-size: 18px; }
.hud-card--wide .hud-card__lock { grid-column: 2; grid-row: 3; font-size: 12.5px; }
.hud-card--wide .hud-card__lock .hud-ic { width: 18px; height: 18px; }
.hud-card--wide .hud-card__need { position: static; grid-column: 2; justify-self: start; padding: 2px 8px 3px; font-size: 12px; }
.hud-card--wide.is-poor .hud-card__thumb { opacity: .8; filter: none; }
.hud-card--wide.is-locked .hud-card__thumb { opacity: .7; filter: grayscale(.8); }
.hud-card.is-gone { background: linear-gradient(180deg, #F3EAD6 0%, #E6DAC0 100%); box-shadow: inset 0 -4px 0 #C9BB9C, 0 3px 0 var(--c-ink); }
.hud-card.is-gone .hud-card__cost { display: none; }
.hud-card.is-gone .hud-card__lock { display: flex; color: #4E8A3A; }
.hud-card.is-gone .hud-card__lock .hud-ic { display: none; }

.hud-pal__tab { position: relative; }
.hud-pal__tab > .hud-dot { right: -6px; top: -8px; }

/* ---- the floor switcher on the left edge: outside on top, then storeys from the top down */
.hud-floors {
  position: absolute;
  left: 8px;
  top: 250px;
  width: 68px;
  max-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 6px 8px;
  pointer-events: auto;
  background: var(--hud-paper);
  border: 4px solid var(--c-ink);
  border-radius: 18px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 5px 0 var(--c-ink);
  animation: hud-drop .2s var(--ease-out);
}

.hud-floor {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 1px;
  width: 100%;
  height: 50px;
  padding-bottom: 3px;
  border: 3px solid var(--c-ink);
  border-radius: 12px;
  background: var(--hud-face);
  box-shadow: inset 0 -4px 0 #D8B777, 0 3px 0 var(--c-ink);
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s ease-out;
}

.hud-floor:hover { filter: brightness(1.07); }
.hud-floor:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 #D8B777, 0 0 0 var(--c-ink); }
.hud-floor.is-on { background: var(--hud-gold); transform: translateY(3px); box-shadow: inset 0 4px 0 rgba(120, 70, 0, .4), 0 0 0 var(--c-ink); }
.hud-floor--out { height: 42px; margin-bottom: 3px; }
.hud-floor--out .hud-ic { width: 28px; height: 28px; }
.hud-floor__n { font-family: var(--font-display); font-size: 21px; line-height: 1; }
.hud-floor__g { display: flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 800; line-height: 1; color: #6B4A2E; }
.hud-floor__g .hud-ic { width: 13px; height: 13px; }
.hud-floor > .hud-dot { right: -7px; top: -7px; }

/* ---- the bubble on the flagged land */
.hud-land {
  position: absolute;
  z-index: 7;
  min-width: 210px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 9px 40px 11px 12px;
  pointer-events: auto;
  background: var(--hud-paper);
  border: 3.5px solid var(--c-ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--c-ink), 0 12px 22px rgba(30, 8, 4, .3);
}

.hud-land__t { font-family: var(--font-display); font-size: 17px; line-height: 1.1; color: var(--c-kumkum); }
.hud-land__p { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #6B4A2E; }
.hud-land__p .hud-ic { width: 20px; height: 20px; }
.hud-land__p b { font-family: var(--font-display); font-size: 19px; font-weight: 400; color: var(--c-ink); margin-right: 4px; }
.hud-land__why { display: flex; align-items: center; gap: 5px; padding: 3px 9px 4px 6px; border: 2px solid var(--c-ink); border-radius: 9px; background: #FFE0DA; color: #7A0A1C; font-size: 13px; font-weight: 800; }
.hud-land__why .hud-ic { width: 17px; height: 17px; }
.hud-land__x { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; }
.hud-land__x .hud-ic { width: 14px; height: 14px; }
