:root {
  --bg: #16231d;
  --surface: #5f685c;
  --surface-strong: #6e776b;
  --surface-deep: #2c332d;
  --ink: #eef6d9;
  --muted: #c9d3b4;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #8ebd45;
  --brand-strong: #587d25;
  --brand-soft: rgba(142, 189, 69, 0.18);
  --good: #9ee760;
  --good-soft: rgba(158, 231, 96, 0.18);
  --bad: #ff8a52;
  --bad-soft: rgba(255, 138, 82, 0.18);
  --sun: #ffd76a;
  --obsidian: #171717;
  --stone-top: #7d8678;
  --stone-face: #5b6256;
  --stone-deep: #43493f;
  --dirt: #5f432b;
  --dirt-deep: #3f2d1f;
  --grass: #79a63c;
  --grass-bright: #9fcd4f;
  --titan: #c89f48;
  --shadow-hard: 0 8px 0 rgba(9, 12, 8, 0.72);
  --shadow-soft: 0 16px 32px rgba(7, 10, 7, 0.28);
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --nav-height: 86px;
  --font-display: "Arial Black", "Impact", "Segoe UI Black", sans-serif;
  --font-body: "Tahoma", "Verdana", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.7) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.62) 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 34% 7%, rgba(255, 255, 255, 0.76) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 48% 14%, rgba(255, 255, 255, 0.56) 0 1.6px, transparent 2px),
    radial-gradient(circle at 63% 9%, rgba(255, 255, 255, 0.72) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 77% 15%, rgba(255, 255, 255, 0.64) 0 1.3px, transparent 1.7px),
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.6) 0 1.3px, transparent 1.7px),
    radial-gradient(circle at 76% 18%, rgba(232, 241, 255, 0.92) 0 54px, rgba(166, 201, 255, 0.16) 54px 110px, transparent 112px),
    linear-gradient(180deg, #09111f 0%, #121d33 28%, #18273b 45%, #223620 45%, #2c4b22 48%, #3e2f21 48%, #1f1713 66%, #0a0c0a 100%);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(167, 198, 255, 0.05) 0, rgba(18, 28, 46, 0.22) 28%, rgba(5, 7, 5, 0.24) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 16px, transparent 16px 32px),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.07) 0 16px, transparent 16px 32px);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto auto 0 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0 0 auto 0;
  height: 42vh;
  background:
    radial-gradient(circle at 74% 20%, rgba(220, 235, 255, 0.42) 0 30px, rgba(173, 198, 255, 0.12) 30px 90px, transparent 92px),
    radial-gradient(circle at 18% 34%, rgba(145, 102, 255, 0.12) 0 80px, transparent 84px),
    radial-gradient(circle at 82% 42%, rgba(176, 247, 106, 0.1) 0 56px, transparent 60px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent 60%);
  opacity: 0.86;
}

body::after {
  inset: auto 0 0 0;
  height: 30vh;
  background:
    linear-gradient(180deg, rgba(114, 157, 58, 0.88) 0 18px, rgba(63, 46, 31, 0.98) 18px 100%),
    linear-gradient(180deg, rgba(147, 173, 198, 0) 0%, rgba(147, 173, 198, 0.08) 20%, rgba(7, 9, 7, 0.66) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 18px, rgba(0, 0, 0, 0.1) 18px 36px),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0 18px, transparent 18px 36px);
  opacity: 0.78;
}

.bg-mobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-mobs::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 34%, rgba(170, 255, 116, 0.16), transparent 22%),
    radial-gradient(circle at 79% 24%, rgba(198, 144, 255, 0.16), transparent 24%),
    radial-gradient(circle at 68% 72%, rgba(255, 112, 74, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.2) 65%, rgba(0, 0, 0, 0.36));
}

.bg-mobs::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42vh;
  background:
    radial-gradient(circle at 50% 70%, rgba(176, 194, 224, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(182, 209, 255, 0) 0%, rgba(160, 186, 224, 0.08) 24%, rgba(11, 15, 13, 0.34) 70%, rgba(6, 8, 6, 0.52) 100%);
  opacity: 0.88;
}

.mob {
  position: absolute;
  opacity: 0.34;
  filter:
    saturate(1.08)
    drop-shadow(0 8px 0 rgba(8, 11, 7, 0.56))
    drop-shadow(0 18px 24px rgba(6, 8, 6, 0.34));
  animation: mobIdle 5.6s ease-in-out infinite;
}

.mob span {
  position: absolute;
  display: block;
}

.mob-head,
.mob-body,
.mob-legs {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 10px, rgba(0, 0, 0, 0.09) 10px 20px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 10px, rgba(0, 0, 0, 0.1) 10px 20px);
}

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

.mob-creeper {
  left: 1.5%;
  top: 21vh;
  width: 132px;
  height: 248px;
}

.mob-creeper .mob-head {
  left: 21px;
  top: 0;
  width: 74px;
  height: 74px;
  border: 4px solid #173213;
  background-color: #5f8c33;
  box-shadow: 0 5px 0 rgba(17, 42, 12, 0.5);
}

.mob-creeper .mob-body {
  left: 27px;
  top: 78px;
  width: 62px;
  height: 78px;
  border: 4px solid #173213;
  border-top: none;
  background-color: #507c29;
}

.mob-creeper .mob-legs {
  left: 27px;
  top: 158px;
  width: 62px;
  height: 52px;
  background:
    linear-gradient(90deg, #456d24 0 12px, transparent 12px 18px, #456d24 18px 30px, transparent 30px 36px, #456d24 36px 48px, transparent 48px 50px, #456d24 50px 62px);
}

.mob-creeper .mob-face {
  left: 39px;
  top: 18px;
  width: 12px;
  height: 12px;
  background: rgba(197, 255, 138, 0.86);
  box-shadow:
    24px 0 rgba(197, 255, 138, 0.86),
    8px 18px rgba(22, 32, 16, 0.84),
    14px 18px rgba(22, 32, 16, 0.84),
    8px 30px rgba(22, 32, 16, 0.84),
    14px 30px rgba(22, 32, 16, 0.84),
    0 0 12px rgba(170, 255, 115, 0.55),
    24px 0 12px rgba(170, 255, 115, 0.55);
}

.mob-enderman {
  right: 2%;
  top: 16vh;
  width: 138px;
  height: 292px;
  opacity: 0.3;
  animation-duration: 6.8s;
}

.mob-enderman .mob-head {
  left: 38px;
  top: 0;
  width: 52px;
  height: 52px;
  border: 4px solid #0d0c14;
  background-color: #2a2235;
  box-shadow: 0 5px 0 rgba(6, 5, 10, 0.5);
}

.mob-enderman .mob-body {
  left: 49px;
  top: 56px;
  width: 30px;
  height: 108px;
  border: 4px solid #0d0c14;
  border-top: none;
  background-color: #241d2f;
  box-shadow:
    -26px 6px 0 -10px #241d2f,
    -26px 56px 0 -10px #241d2f,
    26px 6px 0 -10px #241d2f,
    26px 56px 0 -10px #241d2f;
}

.mob-enderman .mob-legs {
  left: 37px;
  top: 166px;
  width: 54px;
  height: 90px;
  background:
    linear-gradient(90deg, #1e1827 0 14px, transparent 14px 22px, #1e1827 22px 32px, transparent 32px 40px, #1e1827 40px 54px);
}

.mob-enderman .mob-face {
  left: 49px;
  top: 22px;
  width: 10px;
  height: 6px;
  background: rgba(255, 153, 255, 0.9);
  box-shadow:
    20px 0 rgba(255, 153, 255, 0.9),
    0 0 12px rgba(224, 126, 255, 0.7),
    20px 0 12px rgba(224, 126, 255, 0.7);
}

.mob-spider {
  right: 10%;
  bottom: 17vh;
  width: 188px;
  height: 126px;
  opacity: 0.28;
  animation-duration: 5s;
}

.mob-spider .mob-head {
  left: 62px;
  top: 20px;
  width: 42px;
  height: 42px;
  border: 4px solid #22150f;
  background-color: #6a2e1c;
  box-shadow: 0 4px 0 rgba(34, 21, 15, 0.52);
}

.mob-spider .mob-body {
  left: 42px;
  top: 14px;
  width: 84px;
  height: 54px;
  border: 4px solid #22150f;
  background-color: #4c2317;
}

.mob-spider .mob-legs {
  left: 12px;
  top: 44px;
  width: 144px;
  height: 44px;
  background:
    linear-gradient(160deg, transparent 0 12%, #3b1d14 12% 16%, transparent 16% 28%, #3b1d14 28% 32%, transparent 32% 44%, #3b1d14 44% 48%, transparent 48% 60%, #3b1d14 60% 64%, transparent 64% 100%),
    linear-gradient(20deg, transparent 0 12%, #3b1d14 12% 16%, transparent 16% 28%, #3b1d14 28% 32%, transparent 32% 44%, #3b1d14 44% 48%, transparent 48% 60%, #3b1d14 60% 64%, transparent 64% 100%);
}

.mob-spider .mob-face {
  left: 62px;
  top: 30px;
  width: 8px;
  height: 8px;
  background: rgba(255, 114, 82, 0.92);
  box-shadow:
    12px 0 rgba(255, 114, 82, 0.92),
    24px 0 rgba(255, 114, 82, 0.92),
    36px 0 rgba(255, 114, 82, 0.92),
    0 0 12px rgba(255, 112, 74, 0.56),
    12px 0 12px rgba(255, 112, 74, 0.56),
    24px 0 12px rgba(255, 112, 74, 0.56),
    36px 0 12px rgba(255, 112, 74, 0.56);
}

button,
input,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 3px solid #11150f;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, #30372f, #1f241f);
  color: var(--ink);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.08),
    inset 0 -3px 0 rgba(0, 0, 0, 0.34);
}

select {
  color: #f7fbe9;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #f3d67a 50%),
    linear-gradient(135deg, #f3d67a 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, #30372f, #1f241f);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px),
    0 0,
    0 0;
  background-size:
    8px 8px,
    8px 8px,
    100% 100%,
    100% 100%;
  background-repeat: no-repeat;
  padding-right: 42px;
}

select option {
  color: #f6f9e8;
  background: #253022;
}

input::placeholder {
  color: rgba(238, 246, 217, 0.48);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(255, 215, 106, 0.4);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 18px calc(var(--nav-height) + 28px);
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.app-shell::before {
  top: 74px;
  right: 4%;
  width: 96px;
  height: 96px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(180deg, #d9b86c, #9b6f2a);
  border: 4px solid #5f4318;
  box-shadow: 0 8px 0 rgba(63, 42, 12, 0.7);
  opacity: 0.8;
}

.app-shell::after {
  left: 2%;
  top: 320px;
  width: 74px;
  height: 74px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 45%),
    linear-gradient(180deg, #7ba244, #415e22);
  border: 4px solid #1c2a12;
  box-shadow: 0 6px 0 rgba(15, 24, 11, 0.72);
  opacity: 0.6;
}

.hero-card,
.summary-panel,
.quick-score-panel,
.recent-panel,
.stats-panel,
.history-panel,
.manage-card,
.chart-card {
  position: relative;
  overflow: hidden;
  border: 4px solid #11150f;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(125, 166, 60, 0.22) 0 12px, transparent 12px 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 16px, rgba(0, 0, 0, 0.04) 16px 32px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0 16px, rgba(0, 0, 0, 0.06) 16px 32px),
    linear-gradient(180deg, var(--stone-top), var(--stone-face) 58%, var(--stone-deep));
  box-shadow:
    var(--shadow-hard),
    var(--shadow-soft),
    inset 0 4px 0 rgba(255, 255, 255, 0.12),
    inset 0 -6px 0 rgba(0, 0, 0, 0.24);
}

.hero-card::after,
.summary-panel::after,
.quick-score-panel::after,
.recent-panel::after,
.stats-panel::after,
.history-panel::after,
.manage-card::after,
.chart-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 26%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.08), transparent 30%);
  pointer-events: none;
}

.hero-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: end;
}

.hero-card::before {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 132px;
  height: 108px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(180deg, #3a4338, #1a2019);
  border: 4px solid #0d100d;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.55);
  clip-path: polygon(0 100%, 0 46%, 18% 46%, 18% 26%, 34% 26%, 34% 0, 66% 0, 66% 20%, 80% 20%, 80% 52%, 100% 52%, 100% 100%);
  opacity: 0.5;
}

.hero-copy h1,
.section-heading h2,
.chart-header h3,
.modal-sheet h2,
.empty-card h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.eyebrow,
.section-tag,
.score-label,
.hint-text,
.chart-caption {
  margin: 0;
  color: #f6d778;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.36);
}

.hero-subtitle {
  margin: 10px 0 0;
  max-width: 24rem;
  color: var(--muted);
  line-height: 1.55;
}

.hero-score {
  justify-self: end;
  width: min(190px, 100%);
  padding: 18px;
  border: 4px solid #12210d;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 12px, rgba(0, 0, 0, 0.08) 12px 24px),
    linear-gradient(180deg, #9ed455, #587d25);
  color: #f8ffe6;
  box-shadow:
    0 8px 0 rgba(18, 33, 13, 0.72),
    inset 0 4px 0 rgba(255, 255, 255, 0.16),
    inset 0 -5px 0 rgba(0, 0, 0, 0.28);
}

.hero-score strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2.3rem, 7vw, 3.8rem);
  line-height: 1;
  font-family: var(--font-display);
  text-shadow: 0 4px 0 rgba(49, 77, 19, 0.56);
}

.main-content {
  margin-top: 18px;
}

.page {
  display: none;
  animation: rise 0.22s ease;
}

.page.active {
  display: grid;
  gap: 18px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.summary-panel,
.quick-score-panel,
.recent-panel,
.stats-panel,
.history-panel,
.manage-card {
  padding: 20px;
}

.section-heading,
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.category-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(152px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

.category-strip::-webkit-scrollbar {
  height: 10px;
}

.category-strip::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-sm);
}

.category-strip::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, #89b246, #5d8127);
  border: 2px solid #1d2a12;
  border-radius: var(--radius-sm);
}

.category-card {
  padding: 16px;
  border: 3px solid #131813;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(127, 171, 64, 0.22) 0 10px, transparent 10px 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 14px, rgba(0, 0, 0, 0.05) 14px 28px),
    linear-gradient(180deg, #6c7568, #4f564c);
  box-shadow:
    0 6px 0 rgba(10, 13, 9, 0.6),
    inset 0 3px 0 rgba(255, 255, 255, 0.12);
  scroll-snap-align: start;
}

.category-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.75rem;
  font-family: var(--font-display);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}

.category-project-groups {
  display: grid;
  gap: 18px;
}

.project-group {
  display: grid;
  gap: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 12px;
}

.project-card {
  min-height: 116px;
  padding: 16px 14px;
  border: 4px solid #101510;
  border-radius: var(--radius-lg);
  text-align: left;
  display: grid;
  gap: 10px;
  align-content: space-between;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
  box-shadow:
    0 7px 0 rgba(9, 12, 8, 0.72),
    inset 0 4px 0 rgba(255, 255, 255, 0.12),
    inset 0 -5px 0 rgba(0, 0, 0, 0.28);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(2px);
  box-shadow:
    0 5px 0 rgba(9, 12, 8, 0.72),
    inset 0 4px 0 rgba(255, 255, 255, 0.12),
    inset 0 -5px 0 rgba(0, 0, 0, 0.28);
  filter: brightness(1.03);
}

.project-card.add {
  background:
    linear-gradient(180deg, rgba(223, 255, 161, 0.16), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 12px, rgba(0, 0, 0, 0.08) 12px 24px),
    linear-gradient(180deg, #86b943, #4d7122);
  color: #f7ffe7;
}

.project-card.deduct {
  background:
    linear-gradient(180deg, rgba(255, 236, 200, 0.16), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 12px, rgba(0, 0, 0, 0.1) 12px 24px),
    linear-gradient(180deg, #b5542f, #6a2417);
  color: #fff1e6;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.3;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.34);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid rgba(0, 0, 0, 0.46);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14);
}

.pill.add {
  background: rgba(17, 53, 8, 0.4);
  color: #d8ffb0;
}

.pill.deduct {
  background: rgba(65, 17, 8, 0.45);
  color: #ffd0b8;
}

.record-list,
.manage-list,
.distribution-chart {
  display: grid;
  gap: 12px;
}

.record-card,
.manage-item,
.empty-card {
  border: 3px solid #11150f;
  border-radius: var(--radius-lg);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 26%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(0, 0, 0, 0.05) 12px 24px),
    linear-gradient(180deg, #636d61, #4d564b);
  box-shadow:
    0 6px 0 rgba(7, 10, 7, 0.66),
    inset 0 3px 0 rgba(255, 255, 255, 0.08);
}

.record-card,
.manage-item,
.distribution-row,
.empty-card {
  animation: rise 0.2s ease;
}

.record-card,
.manage-item {
  display: grid;
  gap: 8px;
}

.record-topline,
.manage-item-header,
.manage-meta,
.record-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.record-title,
.manage-item-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.record-points {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.34);
}

.record-points.add {
  color: var(--good);
}

.record-points.deduct {
  color: var(--bad);
}

.muted-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.filter-row {
  display: grid;
  gap: 12px;
}

.segmented {
  display: inline-flex;
  width: 100%;
  padding: 4px;
  border: 3px solid #11150f;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(180deg, #2f362f, #1b201b);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.06),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

.segment {
  flex: 1;
  min-height: 42px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.segment.active {
  color: #14210d;
  background:
    linear-gradient(180deg, #b5d868, #7ea63d);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.24),
    0 3px 0 rgba(49, 77, 19, 0.6);
}

.select-wrap {
  display: grid;
  gap: 8px;
}

.chart-card {
  margin-top: 18px;
  padding: 18px;
}

.chart-stage,
.distribution-chart {
  min-height: 220px;
  border: 3px solid #11150f;
  border-radius: var(--radius-lg);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 24%),
    linear-gradient(180deg, #2b312c, #1e241f);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.05),
    inset 0 -3px 0 rgba(0, 0, 0, 0.36);
}

.chart-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.axis-label {
  fill: #d6dfc1;
  font-size: 11px;
  font-family: var(--font-body);
}

.trend-area {
  fill: rgba(153, 220, 86, 0.22);
}

.trend-line {
  fill: none;
  stroke: var(--brand-bright, #b7ef64);
  stroke: #b9ea68;
  stroke-width: 4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.trend-dot {
  fill: #f9ffef;
  stroke: #8ebd45;
  stroke-width: 3;
}

.distribution-row {
  display: grid;
  gap: 8px;
}

.distribution-bar {
  width: 100%;
  height: 16px;
  border: 2px solid #101510;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(0, 0, 0, 0.08) 12px 24px),
    linear-gradient(180deg, #1a1d1a, #0f120f);
}

.distribution-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, #f5c86d, #bb7f30);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.compact-form {
  margin-bottom: 16px;
}

.form-actions,
.manage-item-actions,
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.tiny-btn {
  min-height: 48px;
  padding: 0 16px;
  border: 3px solid #101510;
  border-radius: var(--radius-md);
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
  box-shadow:
    0 5px 0 rgba(10, 13, 9, 0.68),
    inset 0 3px 0 rgba(255, 255, 255, 0.12),
    inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.tiny-btn:hover {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(10, 13, 9, 0.68),
    inset 0 3px 0 rgba(255, 255, 255, 0.12),
    inset 0 -4px 0 rgba(0, 0, 0, 0.22);
  filter: brightness(1.02);
}

.primary-btn {
  color: #12200a;
  background:
    linear-gradient(180deg, #b6db6b, #7ca33c);
}

.secondary-btn {
  color: #1a220f;
  background:
    linear-gradient(180deg, #d9c77f, #b38e37);
}

.text-link-btn {
  min-height: auto;
  padding: 4px 8px;
  border: 2px solid #463b1d;
  border-radius: var(--radius-sm);
  color: #ffe89f;
  font-size: 0.84rem;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #6a5426, #423315);
  box-shadow: 0 3px 0 rgba(26, 18, 6, 0.65);
}

.text-link-btn:hover,
.text-link-btn:focus-visible {
  transform: translateY(1px);
  color: #fff6c9;
}

.ghost-btn {
  color: var(--ink);
  background:
    linear-gradient(180deg, #7a8375, #565e52);
}

.danger-btn {
  color: #fff3ea;
  background:
    linear-gradient(180deg, #c96a42, #842d1c);
}

.tiny-btn {
  min-height: 38px;
  padding: 0 12px;
  background:
    linear-gradient(180deg, #77806f, #4e564b);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 2px solid #11150f;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

.status-badge.active {
  background: linear-gradient(180deg, #9fce54, #648b2c);
  color: #12200a;
}

.status-badge.inactive {
  background: linear-gradient(180deg, #8a8f86, #585d56);
  color: #eef6d9;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 18px, rgba(0, 0, 0, 0.06) 18px 36px),
    rgba(8, 11, 7, 0.7);
  padding: 18px;
  z-index: 30;
}

.modal-sheet {
  position: relative;
  width: min(100%, 560px);
  padding: 28px 20px 20px;
  border: 4px solid #11150f;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 214, 104, 0.18) 0 12px, transparent 12px 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 16px, rgba(0, 0, 0, 0.05) 16px 32px),
    linear-gradient(180deg, #737d70, #575f54);
  box-shadow:
    0 10px 0 rgba(8, 11, 7, 0.72),
    0 26px 58px rgba(8, 11, 7, 0.32),
    inset 0 4px 0 rgba(255, 255, 255, 0.12),
    inset 0 -6px 0 rgba(0, 0, 0, 0.26);
  animation: sheetUp 0.2s ease;
}

@keyframes sheetUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-description {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  border: 3px solid #101510;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, #7f8679, #535b50);
  box-shadow: 0 4px 0 rgba(9, 12, 8, 0.65);
  font-size: 1.2rem;
  font-weight: 900;
}

.modal-actions > * {
  flex: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + 18px);
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  border: 3px solid #101510;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%),
    linear-gradient(180deg, #2a2d36, #16171d);
  color: #e7edff;
  z-index: 40;
  box-shadow: 0 7px 0 rgba(6, 7, 10, 0.72);
}

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(4, 7, 14, 0.72), rgba(8, 10, 7, 0.82)),
    radial-gradient(circle at 50% 20%, rgba(176, 202, 255, 0.14), transparent 30%);
  backdrop-filter: blur(5px);
}

.boot-card,
.login-card {
  width: min(100%, 520px);
  padding: 24px 20px;
  border: 4px solid #101510;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(183, 222, 110, 0.12) 0 18px, transparent 18px 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 16px, rgba(0, 0, 0, 0.05) 16px 32px),
    linear-gradient(180deg, rgba(103, 111, 100, 0.97), rgba(69, 76, 66, 0.98));
  box-shadow:
    0 10px 0 rgba(8, 11, 7, 0.74),
    0 26px 60px rgba(8, 11, 7, 0.36),
    inset 0 4px 0 rgba(255, 255, 255, 0.1),
    inset 0 -6px 0 rgba(0, 0, 0, 0.26);
}

.boot-card h2,
.login-card h1 {
  margin: 8px 0 10px;
}

.boot-card .muted-text,
.login-subtitle {
  margin: 0;
  line-height: 1.6;
}

.summary-panel {
  position: relative;
}

.account-popover {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 3px solid #11150f;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 235, 164, 0.14), transparent 36%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 14px, rgba(0, 0, 0, 0.05) 14px 28px),
    linear-gradient(180deg, rgba(62, 69, 61, 0.98), rgba(40, 44, 38, 0.98));
  box-shadow:
    0 6px 0 rgba(8, 11, 7, 0.72),
    0 16px 28px rgba(7, 10, 7, 0.26);
}

.account-name {
  font-size: 1.1rem;
}

.account-actions {
  display: grid;
  gap: 10px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
}

.login-card {
  position: relative;
  z-index: 1;
}

.login-subtitle {
  color: var(--muted);
  margin-bottom: 18px;
}

.login-notice,
.login-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 3px solid #11150f;
  line-height: 1.5;
}

.login-notice {
  color: #f2f6de;
  background:
    linear-gradient(180deg, rgba(181, 216, 94, 0.22), rgba(85, 113, 33, 0.24));
  box-shadow: 0 5px 0 rgba(49, 77, 19, 0.46);
}

.login-error {
  color: #fff1e6;
  background:
    linear-gradient(180deg, rgba(255, 151, 98, 0.22), rgba(126, 54, 24, 0.28));
  box-shadow: 0 5px 0 rgba(91, 35, 17, 0.48);
}

.login-submit {
  width: 100%;
}

.login-member-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
  padding: 14px;
  border: 3px solid #11150f;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 215, 106, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(65, 70, 63, 0.98), rgba(39, 43, 38, 0.98));
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(calc(100% - 20px), 680px);
  min-height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  border: 4px solid #101510;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 16px, rgba(0, 0, 0, 0.08) 16px 32px),
    linear-gradient(180deg, #2b312c, #171b18);
  box-shadow:
    0 9px 0 rgba(8, 11, 7, 0.74),
    0 18px 40px rgba(7, 10, 7, 0.3);
  z-index: 20;
}

.nav-item {
  min-height: 58px;
  border: 3px solid #101510;
  border-radius: var(--radius-md);
  font-weight: 800;
  color: var(--muted);
  background:
    linear-gradient(180deg, #6d7668, #4c5349);
  box-shadow:
    0 4px 0 rgba(9, 12, 8, 0.68),
    inset 0 2px 0 rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #14210d;
  background:
    linear-gradient(180deg, #b5d96a, #739a38);
  box-shadow:
    0 4px 0 rgba(49, 77, 19, 0.72),
    inset 0 2px 0 rgba(255, 255, 255, 0.18);
}

.empty-card {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.hidden {
  display: none !important;
}

@media (min-width: 720px) {
  .page.active[data-page="score"] {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.92fr);
    align-items: start;
  }

  #page-score .summary-panel,
  #page-score .quick-score-panel {
    grid-column: 1;
  }

  #page-score .recent-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 18px;
  }

  .stats-panel,
  .history-panel,
  .manage-card {
    padding: 24px;
  }

  .filter-row {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: end;
  }
}

@media (max-width: 560px) {
  .mob-creeper {
    left: -10px;
    top: 28vh;
    transform: scale(0.78);
    opacity: 0.2;
  }

  .mob-enderman {
    right: -14px;
    top: 24vh;
    transform: scale(0.72);
    opacity: 0.22;
  }

  .mob-spider {
    right: -24px;
    bottom: 20vh;
    transform: scale(0.72);
    opacity: 0.18;
  }

  .app-shell {
    padding: 14px 14px calc(var(--nav-height) + 22px);
  }

  .boot-card,
  .login-card {
    padding: 20px 16px;
  }

  .app-shell::before {
    width: 64px;
    height: 64px;
    right: 10px;
    top: 92px;
  }

  .app-shell::after {
    display: none;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-score {
    justify-self: start;
    width: min(180px, 100%);
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-topline,
  .manage-item-header,
  .manage-meta,
  .record-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .account-actions {
    grid-template-columns: 1fr;
  }
}
