:root {
  --bg: #102c26;
  --panel: #18372f;
  --line: #335047;
  --ink: #f0f0dc;
  --muted: #a6bcb1;
  --accent: #d6e9a1;
  --radius: 20px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
  border: 1px solid var(--line);
  background: transparent;
  padding: 11px 17px;
  border-radius: 50px;
  transition:
    background 0.18s,
    transform 0.18s;
}
button:hover {
  background: #ffffff0d;
}
button:active {
  transform: scale(0.97);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button.primary {
  background: var(--accent);
  color: #153128;
  border-color: var(--accent);
  font-weight: 650;
}
button.primary:hover {
  background: #e4f2bd;
}
button.small {
  padding: 7px 12px;
  font-size: 13px;
}
button.icon {
  border: 0;
  padding: 8px 10px;
  border-radius: 9px;
}
button.danger {
  color: #ffb2a9;
  border-color: #805650;
}
a {
  color: inherit;
}
header {
  max-width: 1440px;
  margin: auto;
  padding: 28px 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.nav {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav a {
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 54px 42px 35px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2.4px;
  font-size: 11px;
  font-weight: 650;
  color: var(--accent);
}
h1 {
  font:
    normal clamp(40px, 4.8vw, 68px)/1.06 Georgia,
    serif;
  letter-spacing: -2px;
  margin: 19px 0 20px;
}
h1 em {
  color: var(--accent);
  font-weight: normal;
}
p {
  line-height: 1.6;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}
.intro p {
  max-width: 490px;
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}
.overview {
  min-width: 155px;
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.overview strong {
  font:
    38px Georgia,
    serif;
  display: block;
}
.overview span {
  font-size: 12px;
  color: var(--muted);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 48px 0 24px;
  gap: 15px;
}
.section-head h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}
.section-head h2 span {
  color: var(--muted);
  margin-left: 7px;
}
.buckets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.bucket-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 17px 17px;
  background: linear-gradient(180deg, #ffffff03, transparent);
  min-width: 0;
  position: relative;
  animation: arrive 0.45s both;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.card-top button {
  font-size: 18px;
  letter-spacing: 2px;
  padding: 0 4px;
}
.bucket-visual {
  height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 13px 0;
}
.bucket-visual svg {
  width: 138px;
  height: 150px;
  overflow: visible;
}
.water {
  transition:
    y 0.6s,
    height 0.6s;
}
.bucket-card h3 {
  font:
    24px Georgia,
    serif;
  letter-spacing: -0.5px;
  margin: 10px 0 8px;
  overflow-wrap: anywhere;
}
.subtitle {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  min-height: 34px;
}
.progress-line {
  height: 3px;
  background: #ffffff12;
  margin: 23px 0 10px;
  border-radius: 9px;
  overflow: hidden;
}
.progress-line span {
  display: block;
  height: 100%;
  background: var(--bucket);
  transition: width 0.5s;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  gap: 4px;
}
.open-bucket {
  width: 100%;
  margin-top: 23px;
  border-color: #ffffff20;
  font-size: 12px;
  padding: 10px;
}
.principle {
  margin-top: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.principle .mark {
  font: 47px Georgia;
  color: var(--accent);
  line-height: 1;
}
.principle p {
  margin: 0;
  max-width: 620px;
  font-size: 13px;
  color: var(--muted);
}
.principle strong {
  color: var(--ink);
  font-weight: 500;
}
footer {
  max-width: 1440px;
  margin: auto;
  padding: 20px 42px 32px;
  color: #7f9e90;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.empty {
  border: 1px dashed var(--line);
  padding: 35px;
  border-radius: var(--radius);
  color: var(--muted);
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(450px, 100%);
  padding: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
}
.login-card h1 {
  font-size: 44px;
}
.login-card p {
  color: var(--muted);
  font-size: 14px;
}
.login-card button {
  width: 100%;
  margin-top: 20px;
}
.error {
  color: #ffb2a9;
  font-size: 13px;
  min-height: 20px;
}
.loading {
  text-align: center;
  margin-top: 25vh;
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 20px 0 8px;
}
input,
textarea {
  width: 100%;
  border: 1px solid #486358;
  background: #102c26;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input[type="color"] {
  padding: 4px;
  height: 44px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
dialog {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #486358;
  border-radius: 24px;
  width: min(610px, calc(100% - 28px));
  max-height: 90dvh;
  padding: 28px;
  box-shadow: 0 30px 100px #0006;
}
dialog::backdrop {
  background: #061a16b8;
  backdrop-filter: blur(5px);
}
dialog[open] {
  animation: arrive 0.25s both;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.modal-head h2 {
  font:
    30px Georgia,
    serif;
  margin: 0;
  overflow-wrap: anywhere;
}
.modal-head button {
  font-size: 22px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.detail-description {
  color: var(--muted);
  font-size: 14px;
}
.detail-stat {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 24px;
}
.entry-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.entry-form textarea {
  min-height: 48px;
  height: 48px;
  font-size: 14px;
}
.entry-form button {
  white-space: nowrap;
}
.entries {
  margin-top: 20px;
}
.entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.entry-text {
  flex: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-size: 14px;
  padding-top: 2px;
}
.entry.done .entry-text {
  color: var(--muted);
  text-decoration: line-through;
}
.entry button {
  color: var(--muted);
  font-size: 12px;
}
.entry-menu {
  display: flex;
  gap: 0;
}
.detail-tools {
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
  flex-wrap: wrap;
}
.empty-detail {
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 13px 22px;
  border-radius: 12px;
  max-width: 90%;
  z-index: 10;
  font-size: 13px;
  transition: 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1350px) {
  .bucket-card {
    padding: 22px;
  }
  .bucket-visual {
    height: 180px;
  }
  .bucket-visual svg {
    width: 155px;
    height: 170px;
  }
}
@media (max-width: 1050px) {
  .buckets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bucket-card {
    padding: 20px;
  }
  .bucket-visual {
    height: 145px;
  }
}
@media (max-width: 650px) {
  header {
    padding: 20px;
  }
  .brand {
    font-size: 15px;
  }
  .nav {
    gap: 6px;
  }
  .nav a {
    display: none;
  }
  main {
    padding: 35px 20px 15px;
  }
  h1 {
    font-size: 46px;
    letter-spacing: -1.5px;
  }
  .intro {
    align-items: flex-start;
  }
  .intro p {
    font-size: 13px;
  }
  .overview {
    display: none;
  }
  .section-head {
    margin-top: 32px;
  }
  .buckets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .bucket-card {
    padding: 15px 12px;
  }
  .bucket-card h3 {
    font-size: 22px;
  }
  .bucket-visual {
    height: 128px;
    margin: 9px 0;
  }
  .bucket-visual svg {
    width: 115px;
    height: 130px;
  }
  .subtitle {
    font-size: 10px;
    min-height: 32px;
  }
  .progress-label {
    font-size: 10px;
  }
  .section-head button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .principle {
    gap: 12px;
  }
  .principle p {
    font-size: 12px;
  }
  footer {
    padding: 20px;
    flex-direction: column;
    font-size: 10px;
  }
  dialog {
    padding: 22px 18px;
  }
  .entry-menu {
    flex-direction: column;
  }
  .entry-form {
    flex-direction: column;
  }
  .entry-form button {
    align-self: flex-end;
  }
  .login-card {
    padding: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Comfortable touch targets and readable phone fields. */
button {
  min-height: 44px;
}
button.icon {
  min-width: 44px;
  min-height: 44px;
}
.card-top button {
  width: 44px;
  height: 44px;
  margin: -10px -8px -10px 0;
  flex-shrink: 0;
}
.check-hit {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 6px 0;
  cursor: pointer;
}
.entry-text {
  padding-top: 7px;
}
.entry-menu button {
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 650px) {
  .card-top {
    font-size: 10px;
  }
  .card-top button {
    width: 44px;
    margin-right: -8px;
  }
  .subtitle,
  .progress-label,
  footer {
    font-size: 12px;
  }
  .subtitle {
    min-height: 39px;
  }
  input,
  textarea,
  .entry-form textarea {
    font-size: 16px;
  }
  .progress-label {
    flex-wrap: wrap;
    row-gap: 5px;
  }
}

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