/* HUD-Stil: dunkles Panel, gelber Akzent, flaechige Low-Poly-Sprache. */

:root {
  --panel: #182e35e8;
  --panel-solid: #16292f;
  --ink: #f7f2da;
  --muted: #a8c9ce;
  --accent: #efc55b;
  --good: #7fbf6a;
  --danger: #c4342e;
  --line: #ffffff26;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html, body, #game {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #a9ccd5;
  overscroll-behavior: none;
}
@supports (height: 100dvh) {
  html, body, #game { height: 100dvh; }
}

canvas { display: block; }

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden;
}

.provisional {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: var(--panel);
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Panel */

.hud {
  position: fixed;
  top: 34px; left: 22px;
  width: min(360px, calc(100vw - 44px));
  background: var(--panel);
  border-left: 4px solid var(--accent);
  padding: 12px 15px 11px;
  box-shadow: 0 8px 30px #18343c36;
  user-select: none;
}

.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand { font-weight: 900; letter-spacing: .11em; }
.brand span { font-weight: 500; color: var(--muted); font-size: 11px; margin-left: 6px; }

.tier {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.tier.bump { animation: tier-bump 1.4s ease-out; }
@keyframes tier-bump {
  0%   { background: var(--accent); color: var(--panel-solid); border-color: var(--accent); transform: scale(1.12); }
  70%  { background: var(--accent); color: var(--panel-solid); border-color: var(--accent); transform: scale(1); }
  100% { background: none; color: var(--muted); border-color: var(--line); transform: scale(1); }
}

.stats {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
}
.stats strong { font-size: 26px; color: var(--accent); line-height: 1; }
.career { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 11px; color: var(--muted); }
.career span:first-child { color: var(--ink); font-weight: 700; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  background: #ffffff10;
  border-top: 2px solid var(--line);
  padding: 5px 6px 6px;
  opacity: .5;
  min-width: 0;
}
.steps li b { display: block; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.steps li i { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }
.steps li.done { opacity: .8; border-top-color: var(--good); }
.steps li.done i { color: var(--good); }
.steps li.active { opacity: 1; background: #efc55b1c; border-top-color: var(--accent); }
.steps li.active i { color: var(--accent); font-weight: 800; }

.objective {
  margin: 7px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--accent);
}
.objective:empty { display: none; }

.offer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  font-size: 12px;
}
.row[hidden] { display: none; }
.row-label { color: var(--muted); }
.row-value { font-weight: 750; }
.row-value.warn { color: var(--danger); }

.bar {
  display: block;
  flex: 1;
  min-width: 42px;
  height: 6px;
  background: #ffffff1f;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .15s linear;
}
.bar.big { height: 10px; }

.target {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 750;
}
.compass {
  width: 26px; height: 26px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform .1s linear;
}
.compass i {
  display: block;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid var(--accent);
}

.times {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.times span:last-child { margin-left: auto; }

/* -------------------------------------------------------- Analog-Gauges */

.gauges {
  position: fixed;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gauge-cluster {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.analog-gauge {
  position: relative;
  width: 110px;
  height: 110px;
  background: var(--panel);
  border-radius: 50%;
  border: 2px solid var(--line);
  overflow: hidden;
}

/* arc background via conic-gradient — 120° arc sweep */
.gauge-arc {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    transparent 0deg 30deg,
    var(--good) 30deg 150deg,
    var(--accent) 150deg 210deg,
    transparent 210deg 360deg
  );
  opacity: .25;
}
.gauge-arc.speed-arc {
  background: conic-gradient(
    from 210deg,
    transparent 0deg 30deg,
    var(--good) 30deg 120deg,
    var(--accent) 120deg 190deg,
    var(--danger) 190deg 210deg,
    transparent 210deg 360deg
  );
}
.gauge-arc.fuel-arc {
  background: conic-gradient(
    from 210deg,
    transparent 0deg 30deg,
    var(--danger) 30deg 60deg,
    var(--accent) 60deg 120deg,
    var(--good) 120deg 210deg,
    transparent 210deg 360deg
  );
}

.gauge-tick-labels {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  pointer-events: none;
}
.gauge-tick-labels span {
  position: absolute;
  font-size: 8px;
  color: var(--muted);
  font-weight: 600;
}
.gauge-tick-labels span:nth-child(1) { left: 16px; bottom: 18px; }
.gauge-tick-labels span:nth-child(2) { left: 50%; bottom: 8px; transform: translateX(-50%); }
.gauge-tick-labels span:nth-child(3) { right: 16px; bottom: 18px; }

.gauge-needle {
  position: absolute;
  left: 50%; bottom: 50%;
  width: 2px;
  height: 42px;
  background: var(--accent);
  transform-origin: 50% 100%;
  transform: rotate(-120deg);
  border-radius: 1px;
  transition: transform .06s linear;
  z-index: 2;
}
.gauge-needle::after {
  content: '';
  position: absolute;
  top: -4px; left: -3px;
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.gauge-center {
  position: absolute;
  left: 50%; bottom: 50%;
  width: 6px; height: 6px;
  transform: translate(-50%, 50%);
  background: var(--ink);
  border-radius: 50%;
  z-index: 3;
}

.gauge-value {
  position: absolute;
  left: 50%; bottom: 26%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  z-index: 1;
}

.gauge-unit {
  position: absolute;
  left: 50%; bottom: 14%;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  z-index: 1;
}

.gauge-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  background: var(--panel);
  border-radius: 4px;
  font-size: 12px;
}

.gear-badge {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  min-width: 24px;
  text-align: center;
}

.lamp {
  font-weight: 900;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 11px;
}
.lamp[hidden] { display: none; }

.fps { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ------------------------------------------------------ Schadensbalken */

.damage-bar-container {
  position: fixed;
  bottom: 12px; right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  user-select: none;
}
.damage-bar-label { color: var(--muted); white-space: nowrap; }
.damage-bar-track {
  display: block;
  width: 100px;
  height: 8px;
  background: #ffffff1f;
  overflow: hidden;
  border-radius: 2px;
}
.damage-bar-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--good);
  transition: width .15s linear, background .3s;
  border-radius: 2px;
}

/* ------------------------------------------------------------ MiniMap */

.minimap {
  position: fixed;
  top: 34px; right: 22px;
  width: 160px;
  height: 160px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #182e35e0;
  user-select: none;
  z-index: 3;
}

/* ------------------------------------------------------ Missions-Tracker */

.mission-tracker {
  position: fixed;
  top: 200px; right: 22px;
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  min-width: 140px;
  user-select: none;
  font-size: 12px;
}
.mission-waypoint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--accent);
}
#mission-icon { font-size: 14px; }
.mission-detail {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

/* ------------------------------------------------------------- GPS-Panel */

.gps-panel {
  position: fixed;
  top: 256px; right: 22px;
  background: var(--panel);
  border-left: 3px solid #3399ff;
  padding: 8px 12px;
  min-width: 160px;
  user-select: none;
  font-size: 11px;
  z-index: 3;
}
.gps-panel[hidden] { display: none; }
.gps-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}
.gps-icon { font-size: 12px; }
.gps-title {
  font-weight: 700;
  color: #3399ff;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 10px;
}
.gps-dest-label {
  margin-left: auto;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
  font-size: 10px;
}
.gps-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0;
}
.gps-arrow {
  font-size: 18px;
  width: 22px;
  text-align: center;
  color: #3399ff;
}
.gps-instruction {
  font-weight: 700;
  color: var(--ink);
  font-size: 11px;
  flex: 1;
}
.gps-distance {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  min-width: 35px;
  font-variant-numeric: tabular-nums;
}
.gps-footer {
  text-align: right;
  color: var(--muted);
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding-top: 3px;
  margin-top: 2px;
}
.gps-remaining {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- Bedienung */

.help[hidden] { display: none; }
.help {
  position: fixed;
  left: 22px; bottom: 18px;
  max-width: 430px;
  background: #182e35db;
  padding: 8px 11px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.notice {
  position: fixed;
  left: 50%; top: 22%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #18343c;
  padding: 11px 18px;
  font-weight: 750;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
  z-index: 8;
  max-width: min(420px, 90vw);
  text-align: center;
}
.notice.show { opacity: 1; }

.utility { position: fixed; right: 22px; top: 35px; display: flex; gap: 6px; }
.utility button {
  border: 1px solid #ffffff88;
  background: #182e35d9;
  color: #fff;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.utility button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.utility button:disabled { opacity: .45; cursor: default; }
#camera-toggle[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }

.interact, .next-car {
  position: fixed;
  right: 22px; bottom: 22px;
  border: 0;
  background: var(--accent);
  color: var(--panel-solid);
  font-weight: 700;
  font-size: 14px;
  padding: 14px 18px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: 0 5px 20px #18343c44;
}
.interact:disabled { opacity: .4; }
.next-car { bottom: 78px; background: #fff; }
.next-car[hidden] { display: none; }

.touch { display: none; position: fixed; left: 12px; right: 12px; bottom: 18px; justify-content: space-between; align-items: flex-end; pointer-events: none; z-index: 6; }
.touch-side { display: flex; gap: 10px; align-items: flex-end; }
.touch-side.right { gap: 9px; }
.touch button {
  pointer-events: auto;
  width: 68px; height: 68px;
  border: 1px solid #ffffff8c;
  background: #182e35c9;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
  touch-action: none;
  user-select: none;
}
.touch button.gas { width: 78px; height: 78px; background: #2c5a3ad9; border-color: #9fd9b0; }
.touch button.small { width: 54px; height: 54px; font-size: 13px; }
.touch button:active { background: var(--accent); color: var(--panel-solid); }

/* ------------------------------------------------------------- Overlays */

.card, .pause, .overlay, .loading {
  position: fixed;
  z-index: 9;
}

.card {
  left: 50%; top: 20%; bottom: auto;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 28px));
  background: var(--panel-solid);
  border-left: 4px solid var(--accent);
  padding: 14px 18px 16px;
  box-shadow: 0 10px 40px #0b1a2066;
}
.card[hidden] { display: none; }
.card h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.taps, .gamepad { display: none; }
.pause-card .legend.taps { display: none; }
.pause-card .legend.gamepad { display: none; }
.card ul b { color: var(--ink); }
.card button {
  margin-top: 12px;
  border: 0;
  background: var(--accent);
  color: var(--panel-solid);
  font-weight: 800;
  font-size: 14px;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
}

.pause, .overlay {
  inset: 0;
  background: #10252dd8;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 10;
}
.pause[hidden], .overlay[hidden] { display: none; }
.overlay { z-index: 13; }

.pause-card {
  background: var(--panel-solid);
  border-top: 4px solid var(--accent);
  padding: 22px 26px 18px;
  width: min(360px, calc(100vw - 32px));
  box-shadow: 0 14px 50px #0b1a2077;
}
.pause-card h2 { margin: 0 0 14px; font-size: 26px; font-weight: 850; letter-spacing: .04em; }
.pause-card p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 10px; }
.pause-card button {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid #ffffff55;
  background: #ffffff10;
  color: var(--ink);
  padding: 11px 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pause-card button.primary { background: var(--accent); color: var(--panel-solid); border-color: var(--accent); }
.pause-card button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.pause-card button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.confirm { margin: 4px 0 8px; padding: 10px 10px 2px; background: #ffffff10; }

.audio-settings {
  display: grid;
  gap: 3px;
  margin: 10px 0 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.audio-settings label { display: flex; justify-content: space-between; }
.audio-settings output { color: var(--ink); font-variant-numeric: tabular-nums; }
.audio-settings input[type="range"] {
  width: 100%;
  min-height: 30px;
  margin: 0 0 4px;
  accent-color: var(--accent);
  cursor: pointer;
}
.audio-settings input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.confirm[hidden] { display: none; }
.pause-card .legend {
  list-style: none;
  margin: 12px 0 10px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}
.pause-card .legend b { color: var(--ink); }
.pause-card a { color: var(--muted); font-size: 12px; display: block; margin-bottom: 6px; }
.pause-card small { font-size: 11px; color: var(--muted); }

/* Gamepad device toggles */
[data-device="gamepad"] .legend.keys,
[data-device="gamepad"] .legend.taps { display: none; }
[data-device="gamepad"] .legend.gamepad { display: flex; }
[data-device="gamepad"] .help { font-size: 10px; }
[data-device="gamepad"] .card .gamepad { display: block; }
[data-device="gamepad"] .keys { display: none; }
[data-device="gamepad"] .taps { display: none; }

.loading {
  position: fixed;
  inset: 0;
  background: #16292f;
  display: grid;
  place-content: center;
  z-index: 12;
  transition: opacity .6s ease;
}
.loading[hidden] { display: none; }
.loading.loading-fadeout {
  opacity: 0;
  pointer-events: none;
}
.loading-card {
  width: min(360px, 85vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.loading-brand {
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .15em;
  color: var(--ink);
}
.loading-brand span {
  display: block;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--muted);
  margin-top: 4px;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin .9s linear infinite;
}
@keyframes loading-spin {
  to { transform: rotate(360deg); }
}
#loading-progress-track {
  width: 100%;
  margin-top: 4px;
}
.loading-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-top: -6px;
}
.loading-tip {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
  transition: opacity .35s ease;
}
.loading-tip.fade {
  opacity: 0;
}
.loading-version {
  font-size: 11px;
  color: var(--line);
  letter-spacing: .04em;
}

.fade {
  position: fixed;
  inset: 0;
  background: #0b1a20;
  opacity: 0;
  pointer-events: none;
  z-index: 11;
}
.fade.fade-a { animation: hud-fade 400ms ease-in-out; }
.fade.fade-b { animation: hud-fade 400ms ease-in-out; }
@keyframes hud-fade {
  0%   { opacity: 0; }
  40%  { opacity: 1; }
  60%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------------------------------------------------- Handy und Touch */

@media (max-width: 760px), (pointer: coarse) {
  .touch { display: flex; }
  .help { display: none; }
  .keys { display: none; }
  .taps { display: block; }
  .pause-card .legend.keys { display: none; }
  .pause-card .legend.taps { display: flex; }

  .provisional { font-size: 9px; padding: 4px 8px; }

  .hud {
    left: 10px; right: 10px; top: 26px;
    width: auto;
    padding: 9px 12px 10px;
  }
  .brand { font-size: 13px; }
  .brand span { display: none; }
  .stats { margin-top: 6px; }
  .stats strong { font-size: 22px; }
  .offer { margin-top: 7px; font-size: 11px; gap: 7px; }
  .offer > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .objective { font-size: 11.5px; margin-top: 6px; }
  .times { gap: 8px; font-size: 10px; }
  .steps { margin-top: 8px; gap: 4px; }
  .steps li { padding: 4px 5px 5px; }
  .steps li i { font-size: 11px; }
  .target { margin-top: 8px; font-size: 13px; }

  .utility {
    top: 252px; bottom: auto;
    left: 10px; right: 10px;
    flex-wrap: wrap;
    gap: 5px;
  }
  .utility button { min-height: 44px; padding: 9px 9px; font-size: 11px; flex: 1; }

  .gauges {
    left: 10px; right: auto; bottom: 116px;
    transform: none;
  }
  .analog-gauge {
    width: 80px;
    height: 80px;
  }
  .gauge-needle { height: 30px; }
  .gauge-value { font-size: 11px; }
  .gauge-unit { font-size: 7px; }
  .gauge-tick-labels span { font-size: 7px; }
  .gauge-cluster { gap: 5px; }

  .minimap {
    width: 110px;
    height: 110px;
    top: 26px; right: 10px;
  }
  .mission-tracker { top: 144px; right: 10px; min-width: 110px; padding: 6px 10px; font-size: 11px; }
  .gps-panel { top: 200px; right: 10px; min-width: 130px; padding: 6px 8px; font-size: 10px; }
  .damage-bar-container { display: none; }

  .interact, .next-car {
    left: auto; right: 12px;
    transform: none;
    min-width: 132px;
    min-height: 58px;
    text-align: center;
    padding: 12px 10px;
  }
  .interact { bottom: 116px; }
  .next-car { bottom: 184px; }

  .notice { top: 40%; font-size: 14px; }
  .card { top: auto; bottom: 262px; }
}

@media (max-height: 430px) {
  .hud { top: 22px; padding: 8px 12px; }
  .steps li i { font-size: 11px; }
  .utility { top: 22px; bottom: auto; left: auto; right: 12px; width: auto; }
  .utility button { flex: none; }
  .gauges { bottom: 8px; left: 50%; transform: translateX(-50%); }
  .analog-gauge { width: 80px; height: 80px; }
  .gauge-needle { height: 30px; }
  .gauge-value { font-size: 11px; }
  .gauge-unit { font-size: 7px; }
  .interact { bottom: 104px; }
  .next-car { bottom: 170px; }
  .card { top: auto; bottom: 104px; width: min(360px, calc(100vw - 300px)); }
  .minimap { width: 100px; height: 100px; }
  .gps-panel { top: 170px; right: 10px; min-width: 100px; font-size: 9px; }
  .damage-bar-container { display: none; }
}
/* ------------------------------------------------------- Achievement-Popup */

@keyframes ach-in {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes ach-out {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}
.notice.achievement {
  background: linear-gradient(135deg, #2a1f0e 0%, #3d2b14 50%, #2a1f0e 100%);
  color: #efc55b;
  border: 2px solid #efc55b;
  box-shadow: 0 0 30px #efc55b44, 0 8px 40px #0b1a2088;
  font-size: 16px;
  padding: 16px 24px;
  max-width: min(460px, 90vw);
  line-height: 1.4;
  border-radius: 2px;
  animation: ach-in 0.5s ease-out forwards;
}
.notice.achievement::before {
  content: '\01F3C6';
  display: block;
  font-size: 32px;
  margin-bottom: 4px;
}
.notice.achievement strong {
  display: block;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.notice.achievement span {
  display: block;
  font-weight: 600;
  color: #a8c9ce;
  font-size: 13px;
  margin-top: 2px;
}
