* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --lime: #ccf704;
  --lime-soft: #e9ffb0;
  --lime-tint: #f9ffe0;
  --black: #111111;
  --white: #ffffff;
  --gray: #f3f3f3;
  --gray-dark: #6a6a60;
  --red: #ff4d6d;
}

html, body {
  min-height: 100%;
}

body {
  background: #fbfbf9;
  background-image: radial-gradient(#e5e5dc 1.2px, transparent 1.3px);
  background-size: 20px 20px;
  color: var(--black);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
}

main {
  max-width: 660px;
  margin: 0 auto;
  padding: 32px 20px 100px;
}

.view {
  animation: viewIn 0.3s ease both;
}

.view[hidden] {
  display: none;
}

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

.center-view {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
}

#view-home {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
}

#view-home[hidden] {
  display: none;
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.brand-mark {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  background: var(--lime);
  border: 2px solid var(--black);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--black);
  object-fit: cover;
}

.brand-mark:empty::after {
  content: "";
  position: absolute;
  inset: 7px;
  background: var(--black);
  border-radius: 3px;
}

.brand-name {
  font-family: "Archivo Black", sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-meta {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
}

.nav-pill {
  background: var(--lime);
  border: 2px solid var(--black);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--black);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-x {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.nav-x:hover {
  background: var(--lime);
  color: var(--black);
  transform: translateY(-2px);
}

.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 56px 0 70px;
}

.tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--gray-dark);
  text-transform: uppercase;
}

.hero-title {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(32px, 6.5vw, 52px);
  line-height: 1.15;
}

.title-wrap {
  position: relative;
  display: inline-block;
}

.title-underline {
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 14px;
  pointer-events: none;
}

.hero-sub {
  font-size: 17px;
  font-weight: 500;
  color: var(--gray-dark);
  max-width: 480px;
  line-height: 1.6;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid #e8e8de;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--gray-dark);
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.06);
}

.mini-pill .dot {
  color: var(--lime);
  font-size: 10px;
  text-shadow: 0 0 6px rgba(204, 247, 4, 0.9);
}

.quest-card {
  width: 100%;
  max-width: 560px;
  background: var(--white);
  border: 1.5px solid #eaeae0;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(17, 17, 17, 0.07);
  padding: 24px;
  text-align: left;
  margin-top: 10px;
}

.quest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-title {
  font-size: 15px;
  font-weight: 700;
}

.quest-count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gray-dark);
}

.quest-bar {
  margin-top: 12px;
  height: 6px;
  background: #f0f0e8;
  border-radius: 999px;
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  width: 0;
  background: var(--lime);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.task-list {
  margin-top: 6px;
}

.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
}

.task-check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid #dcdccd;
  background: var(--white);
  color: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.task-check:hover:not(:disabled) {
  transform: scale(1.08);
}

.task-opened .task-check {
  border-color: var(--black);
}

.task-done .task-check {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--white);
}

.task-check:disabled {
  cursor: default;
}

.task-check-shake {
  animation: shake 0.25s ease 2;
}

.task-text {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 14.5px;
  font-weight: 700;
}

.task-sub {
  font-size: 12.5px;
  color: var(--gray-dark);
  margin-top: 1px;
}

.task-cta {
  flex-shrink: 0;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.task-cta .cta-arrow {
  color: var(--lime);
}

.task-cta:hover {
  background: var(--lime);
  color: var(--black);
  transform: translateY(-2px);
}

.task-cta:hover .cta-arrow {
  color: var(--black);
}

.entry-divider {
  height: 1px;
  background: #eeeeea;
  margin: 10px 0 18px;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lock-badge {
  font-size: 12px;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin: 16px 0 6px;
}

.quest-input {
  width: 100%;
  background: #f6f6ef;
  border: 1.5px solid #e6e6da;
  border-radius: 12px;
  padding: 13px 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  outline: none;
  transition: box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.quest-input::placeholder {
  color: #b6b6a8;
}

.quest-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.quest-input-live {
  background: var(--white);
  border-color: #d8d8c6;
}

.quest-input-live:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px var(--lime);
}

.input-error {
  border-color: var(--red) !important;
  animation: shake 0.25s ease 2;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.entry-note {
  font-size: 12.5px;
  color: var(--gray-dark);
  margin-top: 14px;
}

.error-line {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-top: 12px;
}

.continue-btn {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #eceee6;
  color: #a9a99c;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: not-allowed;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.continue-live {
  background: var(--lime);
  color: var(--black);
  border-color: var(--black);
  box-shadow: 4px 4px 0 var(--black);
  cursor: pointer;
}

.continue-live:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--black);
}

.continue-live:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--black);
}

.foot-note {
  font-size: 12px;
  color: var(--gray-dark);
  line-height: 1.7;
}

.glitch {
  color: var(--black);
  text-shadow: 4px 4px 0 var(--lime);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.done-gtd {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(15px, 3vw, 20px);
  line-height: 1.9;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.done-sub {
  font-size: 17px;
  font-weight: 500;
  color: var(--gray-dark);
}

.done-row {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-block;
  width: 100%;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--black);
  color: var(--black);
  font-family: "Archivo Black", sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--black);
}

.btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--black);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: 2px 2px 0 var(--black);
}

.btn-purple {
  background: var(--lime);
}

.btn-purple:hover:not(:disabled) {
  background: var(--lime-soft);
}

.btn-blue:hover:not(:disabled) {
  background: var(--lime-tint);
}

.btn-pink {
  background: var(--black);
  color: var(--white);
}

.btn-pink:hover:not(:disabled) {
  color: var(--lime);
}

.btn-small {
  width: auto;
  padding: 12px 24px;
  font-size: 12px;
}

#view-done .btn-pink {
  max-width: 420px;
}

.disk-bezel {
  width: 100%;
  max-width: 620px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--black);
  padding: 10px;
}

.disk-grid {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: 3px;
  background: var(--black);
  border-radius: 10px;
  padding: 12px;
}

.disk {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  perspective: 400px;
}

.disk-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.disk.on .disk-inner {
  transform: rotateX(180deg);
}

.disk-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
}

.disk-front {
  background: #2b2b2b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
}

.disk-back {
  background: var(--lime);
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.2);
  transform: rotateX(180deg);
}

.pixel {
  position: fixed;
  z-index: 0;
  animation: float 6s ease-in-out infinite alternate;
}

.p1 {
  width: 14px;
  height: 14px;
  background: var(--lime);
  border: 2px solid var(--black);
  border-radius: 4px;
  top: 12%;
  right: 8%;
}

.p2 {
  width: 16px;
  height: 16px;
  background: var(--black);
  border-radius: 50%;
  bottom: 15%;
  left: 5%;
  animation-delay: 1s;
}

.p3 {
  width: 12px;
  height: 12px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 3px;
  transform: rotate(20deg);
  bottom: 8%;
  right: 12%;
  animation-delay: 2s;
}

.p4 {
  width: 10px;
  height: 10px;
  background: var(--lime);
  border: 2px solid var(--black);
  border-radius: 50%;
  top: 45%;
  left: 3%;
  animation-delay: 0.5s;
}

@keyframes float {
  from { translate: 0 0; }
  to { translate: 0 -12px; }
}

@media (max-width: 520px) {
  main { padding: 24px 14px 80px; }
  .quest-card { padding: 18px; }
  .nav-meta { display: none; }
}

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