:root {
  --bg: #070817;
  --panel: rgba(12, 18, 42, 0.88);
  --panel-strong: rgba(15, 24, 58, 0.96);
  --gold: #ffd23f;
  --gold-deep: #ff9f1c;
  --cyan: #4df3ff;
  --blue: #2575ff;
  --violet: #b14cff;
  --pink: #ff4fd8;
  --green: #53ff8f;
  --red: #ff496d;
  --text: #f8fbff;
  --muted: #a8b7e8;
  --pixel-border: 3px solid var(--gold);
  --font-pixel: Consolas, "Courier New", monospace;
  --ui-scale: 1.14;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(77, 243, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 243, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(35, 70, 170, 0.18), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(37, 117, 255, 0.12), transparent 21rem),
    radial-gradient(circle at 50% 90%, rgba(255, 210, 63, 0.08), transparent 28rem),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto, auto;
  font-family: var(--font-pixel);
  font-size: calc(16px * var(--ui-scale));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(#fff 1px, transparent 1px),
    radial-gradient(var(--cyan) 1px, transparent 1px),
    radial-gradient(var(--gold) 1px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 250px 250px;
  animation: starDrift 18s linear infinite;
  opacity: 0.55;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cfilter id='g' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='1' flood-color='%23ffd23f' flood-opacity='.5'/%3E%3C/filter%3E%3Cpath filter='url(%23g)' fill='%23050716' fill-rule='evenodd' d='M8 2h12v2h4v4h2v4h2v8h-2v4h-4v4H8v-2H4v-4H2V8h2V4h4zM16 16l10-6v12z'/%3E%3Cpath fill='%23ffd23f' fill-rule='evenodd' d='M8 4h12v2h4v4h2v2l-10 4 10 4v2h-4v4H8v-2H6v-4H4V10h2V6h2zM16 16l8-5v10z'/%3E%3Crect x='9' y='7' width='3' height='3' fill='%23050716'/%3E%3Crect x='7' y='22' width='4' height='2' fill='%23b14cff' opacity='.65'/%3E%3C/svg%3E") 25 16, auto;
  }

  button,
  a,
  select,
  label,
  .button,
  .task-card,
  .quest-card,
  .check-button,
  .delete-button,
  .project-controls select,
  .calendar-day,
  .calendar-view-button,
  .mission-complete,
  .mission-item,
  .gems-panel .actions .button,
  [role="button"],
  [data-task-id],
  [data-quest-id] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cfilter id='g' x='-45%25' y='-45%25' width='190%25' height='190%25'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='1.1' flood-color='%23ffd23f' flood-opacity='.58'/%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='1.4' flood-color='%234df3ff' flood-opacity='.28'/%3E%3C/filter%3E%3Cpath filter='url(%23g)' fill='%23050716' fill-rule='evenodd' d='M8 2h12v2h4v4h2v4h2v8h-2v4h-4v4H8v-2H4v-4H2V8h2V4h4zM15 16l12-8v16z'/%3E%3Cpath fill='%23ffd23f' fill-rule='evenodd' d='M8 4h12v2h4v4h2v1l-11 5 11 5v1h-2v2h-4v2H8v-2H6v-4H4V10h2V6h2zM15 16l10-6v12z'/%3E%3Crect x='9' y='7' width='3' height='3' fill='%23050716'/%3E%3Crect x='5' y='21' width='5' height='2' fill='%234df3ff' opacity='.78'/%3E%3Crect x='10' y='24' width='5' height='2' fill='%23b14cff' opacity='.72'/%3E%3C/svg%3E") 26 16, pointer !important;
  }

  button:active,
  a:active,
  select:active,
  label:active,
  .button:active,
  .task-card:active,
  .quest-card:active,
  .check-button:active,
  .delete-button:active,
  .calendar-entry:active,
  .gems-panel .actions .button:active,
  [role="button"]:active,
  [data-task-id]:active,
  [data-quest-id]:active {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cfilter id='g' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='1' flood-color='%23ffd23f' flood-opacity='.5'/%3E%3C/filter%3E%3Cpath filter='url(%23g)' fill='%23050716' d='M8 2h12v2h4v4h2v4h2v8h-2v4h-4v4H8v-2H4v-4H2V8h2V4h4z'/%3E%3Cpath fill='%23ffd23f' d='M8 4h12v2h4v4h2v12h-2v2h-4v2H8v-2H6v-4H4V10h2V6h2z'/%3E%3Crect x='9' y='7' width='3' height='3' fill='%23050716'/%3E%3Crect x='7' y='22' width='5' height='2' fill='%234df3ff' opacity='.7'/%3E%3C/svg%3E") 26 16, pointer !important;
  }

  input,
  textarea {
    cursor: text !important;
  }

  button:disabled,
  .button:disabled {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%23050716' fill-rule='evenodd' d='M8 2h12v2h4v4h2v4h2v8h-2v4h-4v4H8v-2H4v-4H2V8h2V4h4zM16 16l9-5v10z'/%3E%3Cpath fill='%2362738f' fill-rule='evenodd' d='M8 4h12v2h4v4h2v2l-10 4 10 4v2h-2v2h-4v2H8v-2H6v-4H4V10h2V6h2zM16 16l7-4v8z'/%3E%3Crect x='9' y='7' width='3' height='3' fill='%23050716'/%3E%3C/svg%3E") 25 16, not-allowed !important;
  }

}

button,
input,
select {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.gate {
  min-height: 100vh;
  display: none;
  place-items: center;
}

.gate {
  align-items: center;
}

.gate.active {
  display: grid;
}

.cabinet {
  width: min(720px, 100%);
  padding: clamp(22px, 5vw, 48px);
  text-align: center;
  background: linear-gradient(180deg, rgba(9, 17, 45, 0.97), rgba(20, 12, 48, 0.94));
  border: var(--pixel-border);
  box-shadow: 0 0 0 7px #141329, 0 0 42px rgba(255, 210, 63, 0.34), inset 0 0 35px rgba(77, 243, 255, 0.12);
  clip-path: polygon(0 14px, 14px 14px, 14px 0, calc(100% - 14px) 0, calc(100% - 14px) 14px, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 14px calc(100% - 14px), 0 calc(100% - 14px));
}

.gate .cabinet {
  position: relative;
  width: min(526px, calc(100vw - 32px));
  padding: clamp(48px, 7vw, 76px) clamp(24px, 5vw, 44px) 28px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(13, 20, 49, 0.98), rgba(9, 14, 41, 0.99));
  border: 4px solid var(--gold);
  box-shadow:
    0 0 0 5px #080718,
    0 0 0 9px var(--gold),
    13px 13px 0 rgba(0, 0, 0, 0.58),
    0 0 34px rgba(255, 210, 63, 0.44);
  clip-path: none;
}

.gate .cabinet::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid var(--gold);
  pointer-events: none;
}

.gate .cabinet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0, rgba(77, 243, 255, 0.04) 50%, transparent 100%);
  mix-blend-mode: screen;
}

.cabinet-status {
  position: absolute;
  left: 0;
  right: 0;
  top: -34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: clamp(0.78rem, 2.5vw, 1rem);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 11px rgba(255, 210, 63, 0.85);
}

.online-dot {
  color: rgba(77, 243, 255, 0.22);
  text-shadow: none;
}

.login-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  margin-bottom: 14px;
}

.brand-logo {
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.login-logo {
  width: min(430px, 92%);
  margin: 0 auto 10px;
  filter:
    drop-shadow(0 0 18px rgba(77, 243, 255, 0.45))
    drop-shadow(0 0 26px rgba(255, 210, 63, 0.3));
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-logo {
  width: clamp(300px, 42vw, 390px);
  height: 112px;
  object-position: left center;
  image-rendering: auto;
  filter:
    contrast(1.08)
    saturate(1.08)
    drop-shadow(0 0 14px rgba(77, 243, 255, 0.46))
    drop-shadow(0 0 20px rgba(255, 210, 63, 0.28));
}

.pac-orb {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 4px),
    var(--gold);
  box-shadow: 0 0 18px rgba(255, 210, 63, 0.58);
}

.pac-dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 210, 63, 0.72);
}

.space-ghost {
  position: relative;
  width: 26px;
  height: 36px;
  margin-left: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 4px),
    #7d78ff;
  box-shadow: 0 0 16px rgba(125, 120, 255, 0.58);
}

.space-ghost::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 8px;
  background: linear-gradient(135deg, #7d78ff 25%, transparent 25%) 0 0 / 8px 8px;
}

.login-title {
  margin: 0 0 6px;
  color: rgba(255, 210, 63, 0.24);
  font-size: clamp(2rem, 7vw, 2.65rem);
  line-height: 1;
  text-shadow: 0 0 13px rgba(255, 210, 63, 0.12);
}

h1,
h2,
.marquee,
.button {
  font-family: var(--font-pixel);
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 14px 0 16px;
  font-size: clamp(1.55rem, 5vw, 3.15rem);
  line-height: 1.25;
  color: var(--gold);
  text-shadow: 4px 4px 0 #20134a, 0 0 22px rgba(255, 210, 63, 0.6);
}

h2 {
  margin: 0;
  font-size: clamp(0.82rem, 2vw, 1rem);
  line-height: 1.45;
  color: var(--cyan);
}

.marquee,
.eyebrow {
  color: var(--pink);
  text-shadow: 0 0 14px rgba(255, 79, 216, 0.8);
}

.marquee {
  font-size: clamp(0.72rem, 2.4vw, 0.95rem);
  animation: blink 1.2s steps(2) infinite;
}

.gate .marquee {
  color: var(--cyan);
  text-shadow: 0 0 13px rgba(77, 243, 255, 0.72);
}

.boot-copy,
.subtitle,
.rule,
.fine-print {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  line-height: 1.45;
}

.fine-print {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.login-form,
.inline-form {
  display: grid;
  gap: 14px;
}

.login-form {
  margin: 24px auto 14px;
  max-width: 426px;
  text-align: left;
}

.gate .login-form {
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.gate label {
  gap: 7px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 3vw, 1.18rem);
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.72);
}

input {
  min-height: 60px;
  width: 100%;
  border: 2px solid rgba(77, 243, 255, 0.75);
  background: rgba(3, 9, 28, 0.94);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

select {
  min-height: 52px;
  width: 100%;
  border: 2px solid rgba(77, 243, 255, 0.75);
  background: rgba(3, 9, 28, 0.94);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.gate input {
  min-height: 52px;
  border: 3px solid #fff6bf;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    rgba(12, 17, 45, 0.96);
  color: #f4f6ff;
  padding: 0 18px;
  font-family: var(--font-pixel);
  font-size: clamp(1.1rem, 3.5vw, 1.25rem);
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(255, 255, 255, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.gate input::placeholder {
  color: rgba(246, 247, 255, 0.7);
}

.gate input:focus {
  border-color: var(--gold);
  box-shadow: 5px 5px 0 rgba(255, 210, 63, 0.22), 0 0 18px rgba(255, 210, 63, 0.28);
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 210, 63, 0.3);
}

.button {
  min-height: 58px;
  border: 0;
  color: var(--text);
  background: #172550;
  padding: 0 18px;
  font-size: 0.82rem;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(77, 243, 255, 0.65);
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.18);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button.primary {
  color: #15100a;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  box-shadow: inset 0 -5px 0 rgba(114, 62, 0, 0.4), 0 0 0 3px rgba(255, 210, 63, 0.55), 0 0 24px rgba(255, 210, 63, 0.36);
}

.gate .button.primary {
  width: 100%;
  min-height: 58px;
  margin-top: 4px;
  color: #05070d;
  border: 3px solid #fff9a8;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.09) 0 1px, transparent 1px 4px),
    var(--gold);
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  font-weight: 900;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.62), inset 0 -5px 0 rgba(145, 95, 0, 0.36);
}

.terminal-note {
  margin: 18px 0 0;
  color: rgba(220, 228, 255, 0.72);
  font-family: var(--font-pixel);
  font-size: clamp(0.75rem, 2.2vw, 0.95rem);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.button.danger {
  background: #4a1330;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(255, 73, 109, 0.75);
}

.button.small {
  min-height: 48px;
  font-size: 0.72rem;
}

.dashboard {
  padding-top: 14px;
}

.hud {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.hud h1 {
  margin-top: 6px;
  font-size: clamp(1.45rem, 4.5vw, 2.6rem);
}

.eyebrow {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  line-height: 1.5;
}

.hud-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel,
.maze-panel,
.warning,
.complete-banner {
  border: 2px solid rgba(77, 243, 255, 0.75);
  background: var(--panel);
  box-shadow: 0 0 0 4px rgba(5, 8, 26, 0.86), inset 0 0 22px rgba(37, 117, 255, 0.14);
}

.panel {
  padding: 24px;
}

.panel.compact {
  margin-bottom: 18px;
}

.warning {
  margin: 0 0 18px;
  padding: 14px 18px;
  color: #1b1100;
  background: var(--gold);
  font-weight: 700;
}

.project-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.project-panel .panel-head {
  align-items: start;
  margin-bottom: 18px;
}

.project-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.35fr) 172px;
  gap: 16px;
  align-items: end;
}

.project-form {
  display: contents;
}

.project-controls label {
  display: grid;
  gap: 8px;
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 1rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.48);
}

.project-controls select,
.project-form input,
.project-form .button {
  height: 62px;
  min-height: 62px;
  width: 100%;
  margin: 0;
}

.project-form .button {
  padding: 0 14px;
  font-size: 0.66rem;
  white-space: nowrap;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.project-footer .project-status {
  margin: 0;
}

#delete-project-button {
  min-height: 40px;
  width: auto;
  padding: 0 12px;
  font-size: 0.6rem;
  color: rgba(255, 220, 234, 0.85);
  border: 2px solid rgba(255, 73, 109, 0.75);
  background: rgba(74, 19, 48, 0.72);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28);
}

.project-status {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.35;
}

.tool-panel {
  margin-bottom: 18px;
  border-color: var(--cyan);
}

.calendar-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.calendar-hero h2 {
  color: var(--gold);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
  text-shadow: 3px 3px 0 #2c2250, 0 0 14px rgba(255, 210, 63, 0.52);
}

.calendar-hero p {
  max-width: 600px;
  margin: 8px 0 0;
  color: #d7e0ff;
  font-size: 0.88rem;
  line-height: 1.45;
}

#calendar-project-label,
#selected-project-label,
#calendar-view-status {
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  text-shadow: 0 0 10px rgba(77, 243, 255, 0.5);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.calendar-tabs,
.calendar-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-view-button {
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid rgba(123, 118, 255, 0.72);
  color: #d7e0ff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 4px),
    rgba(10, 15, 44, 0.82);
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  text-transform: uppercase;
}

#calendar-back-button {
  min-width: 178px;
}

.calendar-view-button.active {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 15px rgba(255, 210, 63, 0.26), inset 0 -3px 0 rgba(255, 210, 63, 0.15);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.calendar-board,
.day-missions {
  border: 2px solid rgba(77, 243, 255, 0.68);
  background:
    linear-gradient(180deg, rgba(77, 243, 255, 0.07), transparent 24%),
    rgba(4, 9, 29, 0.76);
  box-shadow: inset 0 0 22px rgba(77, 243, 255, 0.08);
}

.calendar-board,
.day-missions {
  padding: 14px;
}

.calendar-board-head,
.day-missions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-board h3,
.day-missions h3 {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.92rem;
}

.weekday-row,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-row {
  margin-bottom: 6px;
}

.weekday-row span {
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  text-align: center;
}

.calendar-days.week-view .calendar-day {
  min-height: 128px;
}

.calendar-day {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 4px;
  min-height: 82px;
  padding: 8px;
  border: 1px solid rgba(123, 118, 255, 0.5);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 210, 63, 0.055), transparent 38%),
    rgba(8, 13, 38, 0.82);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 210, 63, 0.68);
  box-shadow: 0 0 12px rgba(255, 210, 63, 0.16);
}

.calendar-day.dimmed {
  opacity: 0.45;
}

.calendar-day.today {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(255, 210, 63, 0.26);
}

.calendar-day.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(77, 243, 255, 0.34), inset 0 0 18px rgba(77, 243, 255, 0.08);
}

.calendar-day.completed-day {
  background:
    linear-gradient(135deg, rgba(83, 255, 143, 0.08), transparent 38%),
    rgba(8, 18, 39, 0.84);
}

.calendar-day.single-day {
  min-height: 190px;
}

.day-number {
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.88rem;
}

.day-indicators {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 14px;
}

.day-indicators i {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  clip-path: polygon(50% 0, 88% 28%, 74% 100%, 26% 100%, 12% 28%);
  box-shadow: 0 0 8px rgba(77, 243, 255, 0.55);
}

.day-indicators strong,
.day-indicators em {
  color: var(--cyan);
  font-size: 0.58rem;
  font-style: normal;
}

.day-indicators em {
  color: var(--green);
}

.day-preview {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.day-preview span {
  overflow: hidden;
  color: #d7e0ff;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-missions-head p {
  margin: 6px 0 0;
  color: #d7e0ff;
  font-size: 0.78rem;
}

.mission-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.mission-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(123, 118, 255, 0.52);
  background: rgba(8, 13, 38, 0.82);
}

.mission-item.complete {
  border-color: rgba(83, 255, 143, 0.62);
  box-shadow: 0 0 12px rgba(83, 255, 143, 0.12);
}

.mission-complete {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  color: transparent;
  background: rgba(5, 8, 24, 0.76);
  font-family: var(--font-pixel);
  font-size: 0.56rem;
}

.mission-item.complete .mission-complete {
  color: #061127;
  border-color: var(--green);
  background: var(--green);
}

.mission-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.time-badge {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: #061127;
  background: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.54rem;
}

.mission-item h4 {
  margin: 0;
  overflow: hidden;
  color: var(--gold);
  font-size: 0.78rem;
  text-overflow: ellipsis;
}

.mission-item p {
  margin: 6px 0 0;
  color: #d7e0ff;
  font-size: 0.72rem;
  line-height: 1.4;
}

.mission-item.complete h4,
.mission-item.complete p {
  opacity: 0.72;
  text-decoration: line-through;
}

.mission-form {
  display: grid;
  gap: 10px;
}

.mission-form textarea {
  min-height: 88px;
  resize: vertical;
}

.tool-form {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 150px;
  gap: 12px;
  margin-bottom: 14px;
}

.tool-list {
  display: grid;
  gap: 10px;
}

.tool-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 2px solid rgba(77, 243, 255, 0.7);
  background: rgba(4, 9, 29, 0.72);
}

.tool-item h3,
.tool-item p,
.empty-tool {
  margin: 0;
}

.tool-item h3 {
  color: var(--gold);
  font-size: 0.95rem;
}

.tool-item p,
.empty-tool {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.dashboard {
  width: min(820px, calc(100vw - 22px));
  margin: 0 auto;
  padding-top: 0;
  position: relative;
}

.dashboard.calendar-page {
  width: min(1100px, calc(100vw - 22px));
}

.dashboard.calendar-page #password-panel,
.dashboard.calendar-page .project-panel,
.dashboard.calendar-page .status-grid,
.dashboard.calendar-page .mission-terminal,
.dashboard.calendar-page .quests,
.dashboard.calendar-page #complete-banner,
.dashboard.calendar-page .end-level {
  display: none !important;
}

.dashboard.calendar-page #calendar-panel {
  display: block;
}

.dashboard > :not(.pro-rain) {
  position: relative;
  z-index: 2;
}

.pro-rain {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
}

.pro-mode .pro-rain {
  opacity: 1;
}

.pro-rain span {
  position: absolute;
  top: -12vh;
  left: var(--x, 50%);
  width: var(--size, 18px);
  height: var(--size, 18px);
  opacity: 0.72;
  filter: drop-shadow(0 0 9px rgba(255, 210, 63, 0.7));
  animation: proRain var(--speed, 12s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.pro-rain .coin {
  border-radius: 50%;
  border: 2px solid #fff2a6;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #fff48f, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 16px rgba(255, 210, 63, 0.62);
}

.pro-rain .diamond,
.pro-rain .gem-drop {
  clip-path: polygon(50% 0, 90% 25%, 74% 100%, 26% 100%, 10% 25%);
}

.pro-rain .diamond {
  background:
    linear-gradient(135deg, #dffbff 0 20%, #4df3ff 20% 52%, #2575ff 52% 100%);
  filter: drop-shadow(0 0 10px rgba(77, 243, 255, 0.68));
}

.pro-rain .gem-drop {
  background:
    linear-gradient(135deg, #fff7a4 0 18%, var(--gold) 18% 58%, #ff4fd8 58% 100%);
}

.pro-rain .spark {
  width: var(--size, 10px);
  height: var(--size, 10px);
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 11px rgba(255, 210, 63, 0.86));
}

.pro-rain span:nth-child(1) { --x: 8%; --size: 16px; --speed: 14s; --delay: -2s; }
.pro-rain span:nth-child(2) { --x: 16%; --size: 22px; --speed: 18s; --delay: -9s; }
.pro-rain span:nth-child(3) { --x: 24%; --size: 18px; --speed: 12s; --delay: -5s; }
.pro-rain span:nth-child(4) { --x: 33%; --size: 13px; --speed: 16s; --delay: -12s; }
.pro-rain span:nth-child(5) { --x: 41%; --size: 11px; --speed: 10s; --delay: -4s; }
.pro-rain span:nth-child(6) { --x: 49%; --size: 20px; --speed: 19s; --delay: -14s; }
.pro-rain span:nth-child(7) { --x: 57%; --size: 17px; --speed: 13s; --delay: -7s; }
.pro-rain span:nth-child(8) { --x: 64%; --size: 15px; --speed: 17s; --delay: -1s; }
.pro-rain span:nth-child(9) { --x: 72%; --size: 9px; --speed: 11s; --delay: -8s; }
.pro-rain span:nth-child(10) { --x: 79%; --size: 24px; --speed: 20s; --delay: -16s; }
.pro-rain span:nth-child(11) { --x: 86%; --size: 18px; --speed: 15s; --delay: -10s; }
.pro-rain span:nth-child(12) { --x: 93%; --size: 14px; --speed: 13s; --delay: -6s; }
.pro-rain span:nth-child(13) { --x: 4%; --size: 10px; --speed: 9s; --delay: -6s; }
.pro-rain span:nth-child(14) { --x: 68%; --size: 19px; --speed: 21s; --delay: -18s; }

.dashboard .hud {
  position: relative;
  top: auto;
  z-index: 4;
  align-items: center;
  width: 100%;
  min-height: 86px;
  margin: 0 0 20px;
  padding: 0 0 9px;
  border-bottom: 3px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(5, 6, 24, 0.16), rgba(5, 6, 24, 0.02) 72%, rgba(255, 210, 63, 0.08));
  box-shadow: 0 13px 20px -20px rgba(255, 210, 63, 0.6);
}

.dashboard .eyebrow {
  color: var(--gold);
  font-size: 0.82rem;
  text-shadow: 0 0 12px rgba(255, 210, 63, 0.78);
}

.dashboard .hud-actions {
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard .hud-actions .button {
  min-width: 112px;
  min-height: 46px;
  padding: 0 18px;
  font-size: 0.72rem;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(77, 243, 255, 0.45),
    0 0 14px rgba(77, 243, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.85);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    rgba(14, 25, 67, 0.88);
}

.dashboard .hud-actions .button.danger {
  border-color: var(--red);
  color: #fff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px),
    var(--red);
}

.dashboard .hud-actions .button.active {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(255, 210, 63, 0.5),
    0 0 18px rgba(255, 210, 63, 0.28);
}

.dashboard .panel,
.dashboard .maze-panel,
.dashboard .warning,
.dashboard .complete-banner {
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    rgba(10, 15, 44, 0.96);
  box-shadow: 0 0 0 3px rgba(5, 6, 24, 0.95), 0 0 18px rgba(0, 204, 255, 0.14);
}

.dashboard .panel {
  padding: 20px 22px;
}

.dashboard .warning {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  color: #9ba2ff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    rgba(12, 17, 54, 0.97);
  border: 2px solid #7b76ff;
}

.dashboard .warning strong {
  color: #9ba2ff;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  text-shadow: 0 0 12px rgba(123, 118, 255, 0.78);
}

.dashboard .warning span {
  color: var(--muted);
  font-size: 0.82rem;
}

.project-panel {
  border-color: var(--cyan);
}

.dashboard .status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.level-panel {
  text-align: center;
  border: 3px solid var(--gold);
}

.now-playing {
  margin: 0 0 4px;
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-weight: 900;
  text-shadow: 0 0 12px rgba(77, 243, 255, 0.8);
}

.level-panel .panel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 2px;
}

.level-panel h2 {
  color: var(--gold);
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.1;
  text-shadow: 4px 4px 0 #2c2250, 0 0 18px rgba(255, 210, 63, 0.72);
}

.level-panel .subtitle {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #f5f3ff;
}

.dashboard .progress-track {
  height: 28px;
  border: 3px solid #fff4bd;
  background:
    linear-gradient(90deg, rgba(255, 210, 63, 0.98) 0 0) left / var(--progress-width, 0%) 100% no-repeat,
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255, 255, 255, 0.55) 31px 33px),
    #111533;
}

.dashboard .progress-fill {
  width: 0 !important;
}

.gems-panel {
  border: 3px solid var(--cyan);
}

.gems-panel .panel-head h2 {
  color: var(--cyan);
}

.gems-panel .panel-head span {
  color: var(--gold);
  font-size: 1rem;
  text-shadow: 0 0 14px rgba(255, 210, 63, 0.64);
}

.gems-panel .actions .button.primary {
  background: var(--green);
  box-shadow: inset 0 -4px 0 rgba(0, 90, 40, 0.4), 0 0 0 3px rgba(83, 255, 143, 0.5);
}

.gem {
  background: var(--green);
  box-shadow: 0 0 18px rgba(83, 255, 143, 0.72);
}

.mission-terminal {
  position: relative;
  margin-top: 20px;
  padding: 18px;
  border: 3px solid var(--cyan);
  background:
    linear-gradient(180deg, rgba(77, 243, 255, 0.1), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(123, 118, 255, 0.24), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px),
    rgba(6, 10, 34, 0.97);
  box-shadow:
    0 0 0 3px rgba(5, 6, 24, 0.98),
    0 0 22px rgba(0, 204, 255, 0.2),
    inset 0 0 28px rgba(123, 118, 255, 0.14);
}

.mission-terminal::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(255, 210, 63, 0.32);
}

.mission-terminal-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.terminal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  text-shadow: 0 0 11px rgba(77, 243, 255, 0.72);
}

.status-light {
  width: 10px;
  height: 10px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(83, 255, 143, 0.9);
  animation: statusBlink 1.3s steps(2, end) infinite;
}

.terminal-badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 2px solid var(--gold);
  color: var(--gold);
  background: rgba(255, 210, 63, 0.08);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  box-shadow: inset 0 -3px 0 rgba(255, 210, 63, 0.16), 0 0 14px rgba(255, 210, 63, 0.18);
}

.mission-log-title {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.05;
  text-shadow: 3px 3px 0 #2c2250, 0 0 16px rgba(255, 210, 63, 0.75);
}

.mission-log-subtitle {
  max-width: 650px;
  margin: 0;
  color: #cbd7ff;
  font-size: 0.88rem;
  line-height: 1.5;
}

.dashboard .maze-panel.mission-scroll-shell {
  position: relative;
  padding: 14px;
  border: 2px solid rgba(123, 118, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 210, 63, 0.08), transparent 16%, transparent 84%, rgba(77, 243, 255, 0.07)),
    rgba(4, 7, 25, 0.88);
  box-shadow:
    inset 0 14px 18px rgba(255, 210, 63, 0.05),
    inset 0 -16px 22px rgba(77, 243, 255, 0.07);
  overflow: hidden;
}

.mission-scroll-shell::before,
.mission-scroll-shell::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 20px;
  z-index: 2;
  height: 34px;
  pointer-events: none;
}

.mission-scroll-shell::before {
  top: 14px;
  background: linear-gradient(180deg, rgba(4, 7, 25, 0.98), transparent);
}

.mission-scroll-shell::after {
  bottom: 14px;
  background: linear-gradient(0deg, rgba(4, 7, 25, 0.98), transparent);
}

.dashboard .pac-line {
  display: none;
}

.dashboard .task-list.mission-scroll {
  max-height: 560px;
  min-height: 260px;
  padding: 8px 10px 8px 2px;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-color: var(--gold) rgba(9, 12, 38, 0.96);
  scrollbar-width: thin;
}

.dashboard .task-list.mission-scroll::-webkit-scrollbar {
  width: 12px;
}

.dashboard .task-list.mission-scroll::-webkit-scrollbar-track {
  background: rgba(9, 12, 38, 0.96);
  border-left: 2px solid rgba(77, 243, 255, 0.35);
}

.dashboard .task-list.mission-scroll::-webkit-scrollbar-thumb {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 5px),
    var(--gold);
  border: 2px solid rgba(4, 7, 25, 0.98);
  box-shadow: 0 0 10px rgba(255, 210, 63, 0.6);
}

.dashboard .task-card,
.dashboard .quest-card {
  min-height: 96px;
  padding: 16px;
  border: 3px solid #7b76ff;
  background:
    linear-gradient(90deg, rgba(255, 210, 63, 0.13), transparent 5px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    rgba(10, 15, 44, 0.96);
  box-shadow: 0 0 0 3px rgba(5, 6, 24, 0.95);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.dashboard .task-card:hover,
.dashboard .task-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(5, 6, 24, 0.95),
    0 0 20px rgba(255, 210, 63, 0.26),
    inset 0 0 18px rgba(77, 243, 255, 0.08);
}

.dashboard .task-card.complete,
.dashboard .quest-card.complete {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(5, 6, 24, 0.95), 0 0 16px rgba(0, 204, 255, 0.25);
}

.dashboard .level-badge {
  width: 56px;
  height: 56px;
  border: 2px solid #fff9b3;
  font-weight: 900;
  display: grid;
  align-content: center;
  gap: 1px;
  line-height: 1;
}

.dashboard .level-badge span {
  font-size: 0.46rem;
}

.dashboard .level-badge strong {
  font-size: 0.82rem;
}

.task-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 10px;
  color: #061127;
  background: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  box-shadow: 0 0 14px rgba(77, 243, 255, 0.54), inset 0 -4px 0 rgba(0, 64, 90, 0.28);
}

.task-meta {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  text-shadow: 0 0 9px rgba(77, 243, 255, 0.62);
}

.dashboard .task-card h3,
.dashboard .quest-card h3 {
  margin-bottom: 5px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.dashboard .task-card.complete h3,
.dashboard .quest-card.complete h3 {
  color: rgba(0, 204, 255, 0.8);
  text-decoration: line-through;
}

.dashboard .task-card p,
.dashboard .quest-card p {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.dashboard .task-text {
  color: var(--cyan);
  font-weight: 900;
}

.dashboard .check-button {
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  color: transparent;
  background: #171a35;
}

.dashboard .complete .check-button {
  color: #081311;
  background: var(--green);
}

.dashboard .mission-scroll .task-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(123, 118, 255, 0.62);
  background:
    linear-gradient(90deg, rgba(255, 210, 63, 0.08), transparent 3px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    rgba(9, 14, 39, 0.9);
  box-shadow: none;
}

.dashboard .mission-scroll .task-card:hover,
.dashboard .mission-scroll .task-card:focus-within {
  transform: translateY(-1px);
  border-color: rgba(255, 210, 63, 0.68);
  box-shadow: 0 0 14px rgba(255, 210, 63, 0.12);
}

.dashboard .mission-scroll .task-card.complete {
  border-color: rgba(77, 243, 255, 0.65);
  background:
    linear-gradient(90deg, rgba(77, 243, 255, 0.08), transparent 3px),
    rgba(8, 18, 39, 0.9);
  box-shadow: none;
}

.dashboard .mission-scroll .task-content {
  min-width: 0;
}

.dashboard .mission-scroll .task-meta {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.58rem;
  letter-spacing: 0;
  text-shadow: none;
}

.dashboard .mission-scroll .task-card h3 {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: clamp(1.05rem, 2vw, 1.26rem);
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.34);
}

.dashboard .mission-scroll .task-card.complete h3 {
  color: rgba(255, 210, 63, 0.72);
  text-decoration: none;
}

.dashboard .mission-scroll .task-card p {
  margin: 0 0 8px;
  color: #e5ebff;
  font-size: 0.88rem;
  line-height: 1.55;
}

.dashboard .mission-scroll .task-card .task-text {
  margin-bottom: 0;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard .mission-scroll .check-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.76);
  color: transparent;
  background: rgba(5, 8, 24, 0.76);
  font-size: 0.62rem;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
}

.dashboard .mission-scroll .complete .check-button {
  border-color: var(--green);
  color: #061127;
  background: var(--green);
  box-shadow: 0 0 12px rgba(83, 255, 143, 0.28), inset 0 -2px 0 rgba(0, 0, 0, 0.24);
}

.dashboard .quests {
  margin-top: 18px;
  border: 3px solid var(--gold);
}

.pro-mode #project-level-label {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 210, 63, 0.95), 0 0 34px rgba(255, 159, 28, 0.55);
}

.pro-mode .level-panel {
  border-color: var(--gold);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 0%, rgba(255, 210, 63, 0.16), transparent 52%),
    rgba(12, 13, 35, 0.98);
  box-shadow:
    0 0 0 3px rgba(5, 6, 24, 0.95),
    0 0 30px rgba(255, 210, 63, 0.34),
    inset 0 0 26px rgba(255, 210, 63, 0.08);
}

.pro-mode #mode-title {
  color: var(--gold);
  font-size: clamp(3rem, 7vw, 4.8rem);
  letter-spacing: 0;
  text-shadow:
    5px 5px 0 #4b3000,
    0 0 20px rgba(255, 210, 63, 0.95),
    0 0 48px rgba(255, 159, 28, 0.68);
}

.pro-mode .now-playing,
.pro-mode #mission-log-title {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 210, 63, 0.85);
}

.pro-mode .gems-panel {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(5, 6, 24, 0.95),
    0 0 28px rgba(255, 210, 63, 0.3),
    inset 0 0 22px rgba(255, 210, 63, 0.08);
}

.pro-mode .gems-panel .panel-head h2,
.pro-mode .gems-panel .panel-head span {
  color: var(--gold);
}

.pro-mode .gem-display {
  grid-template-columns: repeat(auto-fit, 34px);
  max-width: 100%;
}

.pro-mode .gem {
  background: linear-gradient(135deg, #fff7a4, var(--gold) 48%, var(--gold-deep));
  box-shadow: 0 0 20px rgba(255, 210, 63, 0.82), 0 0 36px rgba(255, 159, 28, 0.36);
}

.pro-mode .task-card,
.pro-mode .quest-card {
  border-color: rgba(255, 210, 63, 0.86);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(255, 210, 63, 0.1), transparent 38%),
    rgba(12, 15, 38, 0.98);
}

.pro-mode .task-card h3,
.pro-mode .quest-card h3 {
  color: var(--gold);
  text-shadow: 0 0 13px rgba(255, 210, 63, 0.62);
}

.pro-mode .level-badge {
  color: #140d00;
  background: linear-gradient(180deg, #fff7a4, var(--gold));
  box-shadow: inset 0 -5px 0 rgba(145, 95, 0, 0.42), 0 0 16px rgba(255, 210, 63, 0.58);
}


.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head span {
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  white-space: nowrap;
}

.progress-track {
  height: 28px;
  margin-bottom: 18px;
  border: 2px solid var(--gold);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 2px, transparent 2px),
    rgba(3, 9, 28, 0.95);
  background-size: 18px 100%;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--gold));
  box-shadow: 0 0 20px rgba(83, 255, 143, 0.5);
  transition: width 220ms ease;
}

.gem-display {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 12px;
  min-height: 44px;
  margin-bottom: 10px;
}

.gem {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 55%, var(--pink));
  clip-path: polygon(50% 0, 90% 25%, 76% 100%, 24% 100%, 10% 25%);
  box-shadow: 0 0 18px rgba(77, 243, 255, 0.7);
  opacity: 0.25;
}

.gem.filled {
  opacity: 1;
  animation: pop 260ms ease;
}

.maze-panel {
  position: relative;
  padding: 24px;
  margin-bottom: 18px;
  overflow: hidden;
}

.pac-line {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  background-image: radial-gradient(var(--gold) 3px, transparent 4px);
  background-size: 34px 34px;
  opacity: 0.16;
}

.task-list,
.quest-list {
  position: relative;
  display: grid;
  gap: 14px;
}

.task-card,
.quest-card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 2px solid rgba(255, 210, 63, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 210, 63, 0.08), transparent 22%),
    linear-gradient(90deg, rgba(77, 243, 255, 0.07) 50%, transparent 50%),
    var(--panel-strong);
  background-size: auto, 18px 18px, auto;
}

.task-card.complete,
.quest-card.complete {
  border-color: var(--green);
  box-shadow: 0 0 22px rgba(83, 255, 143, 0.24), inset 0 0 20px rgba(83, 255, 143, 0.08);
}

.task-card.just-completed,
.quest-card.just-completed {
  animation: completePulse 650ms ease;
}

.level-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #15100a;
  background: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  box-shadow: inset 0 -5px 0 rgba(114, 62, 0, 0.35);
}

.quest-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.task-card h3,
.quest-card h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: clamp(1.2rem, 2.7vw, 1.55rem);
  line-height: 1.1;
}

.task-card p,
.quest-card p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.35;
}

.task-card .task-text {
  color: var(--muted);
}

.check-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  background: rgba(4, 11, 32, 0.9);
  font-family: var(--font-pixel);
  cursor: pointer;
}

.complete .check-button {
  color: #10140b;
  background: var(--green);
  border-color: var(--green);
}

.quests {
  margin-bottom: 18px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
}

.delete-button {
  width: 42px;
  height: 42px;
  border: 2px solid var(--red);
  color: var(--red);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-pixel);
}

.complete-banner {
  display: grid;
  place-items: center;
  min-height: 88px;
  margin-bottom: 18px;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 4vw, 2rem);
  text-shadow: 0 0 18px rgba(83, 255, 143, 0.74);
  animation: completePulse 1.4s ease infinite;
}

.end-level {
  text-align: center;
}

.end-level p {
  color: var(--muted);
  font-size: 1.18rem;
}

.final {
  min-width: min(100%, 300px);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  transform: translateY(18px);
  opacity: 0;
  min-width: 220px;
  padding: 16px 18px;
  color: #15100a;
  background: var(--gold);
  border: 3px solid #fff1a3;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.error {
  min-height: 22px;
  color: var(--red);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.spacefield span {
  position: fixed;
  z-index: 1;
  pointer-events: none;
}

.planet {
  border-radius: 50%;
  box-shadow: inset -12px -10px 0 rgba(0, 0, 0, 0.24), 0 0 28px rgba(77, 243, 255, 0.32);
}

.planet-one {
  width: 76px;
  height: 76px;
  left: 5vw;
  top: 12vh;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.planet-two {
  width: 46px;
  height: 46px;
  right: 8vw;
  bottom: 18vh;
  background: linear-gradient(135deg, var(--gold), var(--pink));
}

.asteroid {
  width: 52px;
  height: 40px;
  background: #687091;
  clip-path: polygon(10% 30%, 34% 6%, 72% 12%, 96% 42%, 76% 88%, 30% 78%);
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.asteroid-one {
  right: 13vw;
  top: 24vh;
}

.asteroid-two {
  left: 10vw;
  bottom: 14vh;
  animation-delay: -2s;
}

.portal {
  width: 110px;
  height: 110px;
  right: 2vw;
  top: 7vh;
  border: 7px solid var(--violet);
  border-radius: 50%;
  box-shadow: 0 0 28px var(--violet), inset 0 0 28px var(--cyan);
  opacity: 0.55;
  animation: spin 8s linear infinite;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

@keyframes statusBlink {
  50% {
    opacity: 0.28;
    box-shadow: 0 0 4px rgba(83, 255, 143, 0.55);
  }
}

@keyframes starDrift {
  to {
    background-position: 0 240px, 0 360px, 0 500px;
  }
}

@keyframes float {
  50% {
    transform: translateY(-18px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pop {
  50% {
    transform: scale(1.22);
  }
}

@keyframes completePulse {
  50% {
    filter: brightness(1.35);
    transform: translateY(-2px);
  }
}

@keyframes proRain {
  0% {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
  }

  100% {
    transform: translate3d(var(--drift, 18px), 115vh, 0) rotate(360deg);
  }
}

.pro-rain span:nth-child(odd) {
  --drift: -22px;
}

.pro-rain span:nth-child(3n) {
  --drift: 30px;
}

@media (prefers-reduced-motion: reduce) {
  .pro-rain span {
    animation: none;
    opacity: 0.18;
  }
}

@media (max-width: 780px) {
  :root {
    --ui-scale: 0.98;
  }

  .shell {
    width: min(100% - 14px, 1180px);
    padding-top: 8px;
  }

  .dashboard {
    width: min(100%, calc(100vw - 14px));
  }

  .status-grid,
  .project-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard .hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    margin-bottom: 14px;
    padding: 0 0 6px;
    gap: 9px;
    background:
      linear-gradient(180deg, rgba(5, 6, 24, 0.08), transparent 78%, rgba(255, 210, 63, 0.08));
  }

  .brand-lockup {
    align-items: center;
    flex-direction: row;
    min-width: 0;
  }

  .hud-logo {
    width: clamp(150px, 46vw, 218px);
    height: 68px;
  }

  .actions,
  .inline-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard .hud-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 0 0 min(44vw, 184px);
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-left: 0;
    max-width: 184px;
  }

  .dashboard .hud-actions .button {
    min-width: 0;
    min-height: 36px;
    width: 100%;
    padding: 0 7px;
    font-size: 0.53rem;
    border-width: 2px;
  }

  .dashboard .panel {
    padding: 14px;
  }

  .calendar-hero,
  .calendar-toolbar,
  .calendar-board-head,
  .day-missions-head {
    display: grid;
    gap: 10px;
  }

  .calendar-hero h2 {
    font-size: 1.35rem;
  }

  .calendar-hero p {
    font-size: 0.76rem;
  }

  .calendar-tabs,
  .calendar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  #calendar-back-button {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .calendar-view-button,
  .calendar-nav .button {
    min-width: 0;
    min-height: 38px;
    padding: 0 6px;
    font-size: 0.52rem;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calendar-board,
  .day-missions {
    padding: 10px;
  }

  .weekday-row,
  .calendar-days {
    gap: 4px;
  }

  .weekday-row span {
    font-size: 0.46rem;
  }

  .calendar-day {
    min-height: 58px;
    padding: 5px;
  }

  .calendar-days.week-view .calendar-day {
    min-height: 86px;
  }

  .calendar-day.single-day {
    min-height: 130px;
  }

  .day-number {
    font-size: 0.68rem;
  }

  .day-indicators {
    gap: 3px;
  }

  .day-indicators i {
    width: 6px;
    height: 6px;
  }

  .day-indicators strong,
  .day-indicators em {
    font-size: 0.46rem;
  }

  .day-preview span {
    display: none;
  }

  .mission-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }

  .mission-item-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .mission-form textarea,
  .mission-form input,
  .mission-form .button {
    width: 100%;
  }

  .project-panel {
    margin-bottom: 12px;
  }

  .project-panel .panel-head {
    margin-bottom: 12px;
  }

  .project-controls {
    gap: 10px;
  }

  .project-controls label {
    gap: 6px;
    font-size: 0.88rem;
  }

  .project-controls select,
  .project-form input,
  .project-form .button,
  input,
  select,
  .button {
    height: auto;
    min-height: 52px;
  }

  .project-controls select,
  .project-form input,
  .project-form .button {
    height: 52px;
  }

  .project-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-panel {
    margin-bottom: 12px;
  }

  .tool-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-item {
    grid-template-columns: 1fr auto;
    padding: 10px;
  }

  #delete-project-button {
    width: 100%;
  }

  .project-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .project-status {
    font-size: 0.92rem;
  }

  .level-panel h2 {
    font-size: clamp(1rem, 5.2vw, 1.35rem);
    white-space: nowrap;
  }

  .level-panel .panel-head {
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: center;
  }

  .level-panel .subtitle,
  .rule {
    font-size: 0.88rem;
  }

  .dashboard .progress-track {
    height: 22px;
    max-width: 100%;
  }

  .actions {
    gap: 10px;
  }

  .mission-log-title {
    font-size: 1.12rem;
  }

  .mission-terminal {
    margin-top: 14px;
    padding: 13px;
  }

  .mission-terminal::before {
    inset: 6px;
  }

  .mission-terminal-head {
    display: grid;
    gap: 9px;
    margin-bottom: 11px;
  }

  .terminal-kicker,
  .terminal-badge,
  .task-meta {
    font-size: 0.54rem;
  }

  .terminal-badge {
    justify-self: start;
    padding: 6px 8px;
  }

  .mission-log-subtitle {
    font-size: 0.76rem;
  }

  .dashboard .maze-panel.mission-scroll-shell {
    padding: 10px;
  }

  .mission-scroll-shell::before,
  .mission-scroll-shell::after {
    left: 10px;
    right: 16px;
    height: 24px;
  }

  .mission-scroll-shell::before {
    top: 10px;
  }

  .mission-scroll-shell::after {
    bottom: 10px;
  }

  .dashboard .task-list.mission-scroll {
    max-height: 430px;
    min-height: 235px;
    padding: 6px 6px 6px 0;
    gap: 10px;
  }

  .dashboard .mission-scroll .task-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }

  .dashboard .mission-scroll .task-card .task-content,
  .dashboard .mission-scroll .task-card .check-button {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard .mission-scroll .task-meta {
    margin-bottom: 6px;
    font-size: 0.5rem;
  }

  .dashboard .mission-scroll .task-card h3 {
    margin-bottom: 7px;
    font-size: 0.98rem;
  }

  .dashboard .mission-scroll .task-card p {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .dashboard .mission-scroll .task-card .task-text {
    font-size: 0.7rem;
  }

  .dashboard .mission-scroll .check-button {
    width: 28px;
    height: 28px;
    min-height: 28px;
    align-self: center;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-card,
  .quest-card {
    min-height: auto;
    padding: 14px;
    gap: 10px;
  }

  .task-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard .task-card .task-icon {
    grid-column: 1;
    grid-row: 2;
    width: 28px;
    height: 28px;
    margin: 0;
    font-size: 0.72rem;
  }

  .dashboard .task-card .task-content {
    grid-column: 2;
  }

  .quest-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard .level-badge {
    width: 42px;
    height: 42px;
  }

  .dashboard .level-badge span {
    font-size: 0.4rem;
  }

  .dashboard .level-badge strong {
    font-size: 0.68rem;
  }

  .dashboard .task-card h3,
  .dashboard .quest-card h3 {
    font-size: 1rem;
  }

  .dashboard .task-card p,
  .dashboard .quest-card p {
    font-size: 0.84rem;
  }

  .dashboard .check-button {
    width: 42px;
    height: 42px;
  }

  .task-card .check-button,
  .quest-card .delete-button {
    grid-column: 2;
    justify-self: end;
  }

  .portal,
  .asteroid,
  .planet {
    opacity: 0.28;
  }
}
