:root {
  color-scheme: light;
  --ink: #273941;
  --blue: #5579a4;
  --green: #78a54a;
  --red: #d56b65;
  --paper: #fffdf2;
  --paper-edge: #e8dcc3;
  --wall: #777b68;
  --pencil: rgba(39, 57, 65, 0.72);
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Marker Felt", ui-rounded, system-ui, sans-serif;
  font-synthesis-weight: auto;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wall);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.13)),
    var(--wall);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button {
  border: 0;
  font: inherit;
}

.app {
  position: relative;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 12px 18px 24px;
  background:
    linear-gradient(94deg, rgba(0, 0, 0, 0.04), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.06)),
    var(--paper);
  box-shadow: 0 18px 55px rgba(18, 24, 20, 0.28);
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: max-content;
  margin: 0 auto 10px;
  padding: 0;
  color: var(--blue);
  font-size: 1.34rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.brand strong {
  color: var(--green);
  font: inherit;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
}

.eyebrow {
  margin: 0 0 2px;
  color: rgba(85, 121, 164, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: lowercase;
}

h1 {
  margin: 0;
  color: var(--blue);
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, 52px);
  gap: 6px;
}

.summary > div {
  min-height: 50px;
  padding: 5px;
  border: 2px solid rgba(85, 121, 164, 0.55);
  background: transparent;
  transform: rotate(-1deg);
}

.summary > div:nth-child(2) {
  border-color: rgba(213, 107, 101, 0.55);
  transform: rotate(1deg);
}

.summary span {
  display: block;
  color: var(--green);
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1;
}

.summary small {
  color: var(--pencil);
  font-size: 0.73rem;
  font-weight: 800;
}

.hero-panel,
.rules,
.week-panel {
  border: 2px solid rgba(85, 121, 164, 0.28);
  background: rgba(255, 253, 242, 0.34);
  box-shadow: 4px 5px 0 rgba(85, 121, 164, 0.06);
}

.hero-panel {
  display: grid;
  grid-template-columns: 48px 1fr 96px;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 8px;
  transform: rotate(-0.4deg);
}

.glass-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 128px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.glass-card strong {
  display: block;
  color: var(--blue);
  font-size: 1.16rem;
  line-height: 1;
}

.glass-card small,
.glass-card em {
  display: block;
  color: rgba(39, 57, 65, 0.72);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.glass-card em {
  margin-top: 6px;
  color: var(--green);
  font-size: 0.72rem;
}

.glass {
  position: relative;
  display: block;
  width: 72px;
  height: 106px;
  border: 3px solid var(--ink);
  border-top-width: 2px;
  border-radius: 8px 8px 23px 23px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(-3deg);
}

.glass::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 0%);
  min-height: 6px;
  background:
    repeating-linear-gradient(-8deg, rgba(110, 173, 203, 0.7) 0 6px, rgba(132, 193, 215, 0.7) 6px 12px),
    #b8dce8;
  transition: height 160ms ease;
}

.water-line {
  display: block;
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: calc(var(--fill, 0%) + 2px);
  height: 7px;
  border-top: 2px solid rgba(85, 121, 164, 0.65);
  border-radius: 50%;
}

.hero-side {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.tap-hint {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(2deg);
}

.mini-checks {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 8px 10px;
  justify-content: center;
}

.heart {
  color: var(--red);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  transform-origin: center;
}

.heart.beating {
  animation: heart-beat 360ms ease-in-out 3;
}

@keyframes heart-beat {
  0%,
  100% {
    transform: scale(1) rotate(4deg);
  }

  35% {
    transform: scale(1.32) rotate(-3deg);
  }

  62% {
    transform: scale(0.92) rotate(2deg);
  }
}

.water-box,
.rule-box,
.iron-box {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid var(--blue);
  color: transparent;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.water-box:nth-child(odd) {
  transform: rotate(-2deg);
}

.water-box:nth-child(even) {
  transform: rotate(2deg);
}

.water-box.done,
.rule-box.checked {
  color: var(--green);
}

.today-iron-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0;
  color: var(--red);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.today-iron-toggle.done .iron-box {
  color: var(--green);
}

.today-iron-toggle.done .iron-box::before {
  content: "✓";
}

.rules {
  display: grid;
  gap: 7px;
  margin: 0 0 17px;
  padding: 10px;
  border-color: rgba(120, 165, 74, 0.32);
  transform: rotate(0.35deg);
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0;
  background: transparent;
}

.rule p {
  margin: 0;
  color: rgba(39, 57, 65, 0.62);
  font-size: 0.95rem;
  line-height: 1.35;
}

.rule strong {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.rule-box {
  flex: 0 0 auto;
  margin-top: 2px;
}

.rule-box.danger {
  border-color: var(--red);
  color: var(--green);
}

.iron-rule p,
.iron-rule strong {
  color: var(--red);
  text-decoration: none;
}

.week-panel {
  padding: 10px;
  border-color: rgba(85, 121, 164, 0.34);
  transform: rotate(-0.2deg);
}

.section-title {
  margin: 0 0 9px;
  color: rgba(85, 121, 164, 0.82);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: lowercase;
}

.tracker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 12px;
}

.day-card {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.day-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 19px;
  margin-bottom: 6px;
}

.day-card h2 {
  margin: 0;
  color: var(--blue);
  font-size: 1rem;
  line-height: 1;
}

.day-score {
  color: rgba(39, 57, 65, 0.55);
  font-size: 0.68rem;
  font-weight: 900;
}

.iron-box {
  border-color: var(--red);
}

.water-box {
  padding: 0;
  border-radius: 0;
  cursor: pointer;
}

.week-progress {
  height: 9px;
  border: 2px solid rgba(85, 121, 164, 0.55);
  overflow: hidden;
  transform: rotate(-1deg);
}

.week-progress span {
  display: block;
  width: var(--day-fill, 0%);
  height: 100%;
  background: rgba(118, 174, 205, 0.62);
}

.stat-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-top: 6px;
}

.stat-dots span {
  height: 7px;
  border: 1px solid rgba(85, 121, 164, 0.45);
}

.stat-dots span.done {
  background: rgba(120, 165, 74, 0.55);
  border-color: rgba(120, 165, 74, 0.8);
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.ghost-button {
  min-height: 38px;
  padding: 0 13px;
  border: 2px solid rgba(85, 121, 164, 0.45);
  color: rgba(39, 57, 65, 0.74);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  transform: rotate(-1deg);
}

@media (max-width: 374px) {
  .app {
    padding-inline: 13px;
  }

  .hero-panel {
    grid-template-columns: 38px 1fr 78px;
  }

  .tracker {
    gap: 12px 9px;
  }

  .mini-checks {
    gap: 7px;
  }
}

@media (max-width: 520px) {
  html,
  body {
    background: var(--paper);
  }

  .app {
    width: 100%;
    max-width: none;
    box-shadow: none;
  }
}
