:root {
  --paper: #f7e6c4;
  --orange: #eeb060;
  --teal: #4e7f8f;
  --ink: #171717;
  --white: #fffdf8;
  --red: #c0392b;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Patrick Hand", "Comic Sans MS", cursive, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 19px;
  line-height: 1.45;
}

h1, h2, h3 {
  font-family: "Caveat", "Patrick Hand", cursive;
  letter-spacing: 0.5px;
}

/* ---------- hand-drawn building blocks ---------- */

.sketch-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 5px 6px 0 rgba(23, 23, 23, 0.85);
  padding: 24px 28px;
}

.sketch-btn {
  display: inline-block;
  font-family: inherit;
  font-size: 20px;
  cursor: pointer;
  background: var(--ink);
  color: var(--white);
  border: 3px solid var(--ink);
  border-radius: 225px 15px 255px 15px / 15px 255px 15px 225px;
  padding: 10px 26px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.sketch-btn:hover {
  transform: rotate(-1.5deg) scale(1.04);
  background: var(--teal);
  border-color: var(--ink);
}

.sketch-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
  color: var(--teal);
  margin-top: 10px;
}

/* ---------- landing ---------- */

.landing {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}

.hero-video-canvas {
  position: absolute;
  inset: 0;
}

.hero-video-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-video-tint {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.landing-header {
  position: relative;
  z-index: 10;
  padding: 18px 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  padding: 6px 18px 6px 8px;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.85);
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.brand-name {
  font-family: "Caveat", cursive;
  font-size: 26px;
  font-weight: 700;
}

.landing-center {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 30px 24px 80px;
}

.tagline {
  max-width: 380px;
  transform: rotate(-1.2deg);
  background: var(--paper);
}

.tagline h2 {
  font-size: 34px;
  margin-bottom: 8px;
}

.login-card {
  width: min(420px, 92vw);
  transform: rotate(1deg);
  text-align: center;
}

.login-title {
  font-size: 52px;
  font-family: "Caveat", cursive;
  font-weight: 700;
}

.login-title .rays {
  color: var(--orange);
  font-size: 30px;
  vertical-align: middle;
}

.login-sub {
  margin: 6px 0 18px;
  color: #444;
}

.input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.input-line input {
  flex: 1;
  font-family: inherit;
  font-size: 22px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
}

.at-doodle {
  font-family: "Caveat", cursive;
  font-size: 30px;
  font-weight: 700;
  color: var(--teal);
}

.login-btn {
  width: 100%;
}

.login-error {
  margin-top: 12px;
  color: var(--red);
}

.login-done p {
  margin-bottom: 14px;
}

.landing-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 14px;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* ---------- dashboard ---------- */

.dash {
  position: relative;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 20%, rgba(238, 176, 96, 0.35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(78, 127, 143, 0.25), transparent 45%),
    var(--paper);
  padding: 24px clamp(14px, 4vw, 48px) 120px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.dash-header .who {
  color: #555;
  font-size: 17px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.6fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}

.account-table th {
  text-align: left;
  border-bottom: 3px solid var(--ink);
  padding: 6px 8px;
  font-family: "Caveat", cursive;
  font-size: 22px;
}

.account-table td {
  border-bottom: 1.5px dashed #999;
  padding: 8px;
  vertical-align: middle;
}

.account-table input[type="date"] {
  font-family: inherit;
  font-size: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 2px 6px;
  background: var(--white);
}

.pill {
  display: inline-block;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 15px;
}

.soon {
  background: var(--red);
  color: var(--white);
}

.del-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
}

.add-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.add-form input,
.add-form select {
  font-family: inherit;
  font-size: 17px;
  padding: 8px 10px;
  border: 2.5px solid var(--ink);
  border-radius: 12px 4px 12px 4px;
  background: var(--white);
  outline: none;
}

.add-form input:focus,
.add-form select:focus {
  background: #fff7e0;
}

.add-form .span-all {
  grid-column: 1 / -1;
}

.suggestions li {
  margin: 0 0 12px 20px;
}

.empty-note {
  color: #666;
  padding: 16px 4px;
}

.dash-error {
  color: var(--red);
  margin-top: 8px;
}

/* ---- standalone HTML version only ---- */
.note {
  margin-top: 14px;
  font-size: 15px;
  color: #555;
  line-height: 1.35;
}
.demo-badge {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 60;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 15px;
  box-shadow: 3px 3px 0 rgba(23,23,23,.85);
}
