/*
  hand-drawn paper notebook aesthetic.
  no gradients. no glow. just paper, ink, and a bit of scribble.
*/

:root {
  --paper: #f4efe6;
  --paper-2: #ebe5d8;
  --line: #d9cfba;
  --line-strong: #b8a988;
  --ink: #1f1f1f;
  --ink-2: #4a4a4a;
  --ink-3: #7a7466;
  --red: #c23b3b;
  --green: #3d8a4a;
  --amber: #c68a1a;
  --highlight: #f5e07a;
  --accent: #2d4a8a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: var(--paper);
  /* subtle paper grain using layered gradients */
  background-image:
    radial-gradient(ellipse at top left, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(0,0,0,0.03), transparent 50%);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 15px;
  background-attachment: fixed;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  position: relative;
}

/* Header */
.hero {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed var(--line-strong);
  position: relative;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
}

.stamp {
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  transform: rotate(-1.5deg);
  background: rgba(255,255,255,0.4);
}

.today-pill {
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-2);
  font-size: 0.75rem;
}

.today-pill #today-count {
  color: var(--ink);
  font-weight: 600;
}

.hero-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.5rem;
  margin: 0.25rem 0 0.375rem;
  font-family: "Caveat", cursive;
  line-height: 1.15;
}

.hero-chip {
  font-size: 1.6rem;
  color: var(--ink);
  font-weight: 500;
  display: inline-block;
}

.hero-chip:not(:last-child)::after {
  content: " ·";
  color: var(--ink-3);
  margin-left: 0.25rem;
}

.hero-empty {
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  color: var(--ink-3);
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
}

.hero-number {
  font-family: "Caveat", cursive;
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
  display: inline-block;
}

.hero-number.pop { animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

.hero-number.warn { color: var(--amber); }
.hero-number.bad { color: var(--red); }

.hero-unit {
  font-family: "Caveat", cursive;
  font-size: 2.25rem;
  color: var(--ink-3);
  font-weight: 500;
}

@keyframes pop {
  0% { transform: rotate(-2deg) scale(1); }
  50% { transform: rotate(-2deg) scale(1.1); }
  100% { transform: rotate(-2deg) scale(1); }
}

.hero-number { transform: rotate(-2deg); }

.hero-caption { display: flex; flex-direction: column; gap: 0.125rem; }

.hero-label {
  font-family: "Caveat", cursive;
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.1;
}

.hero-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* Add row */
.add-row {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.25rem 0.375rem 0.25rem 0.625rem;
  margin-bottom: 1rem;
}

#add-course-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.plus-icon {
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  color: var(--ink-3);
  font-weight: 700;
  line-height: 1;
}

#course-name {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--ink);
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
}

#course-name::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

.threshold-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--ink-3);
  border-left: 1px dashed var(--line-strong);
}

#course-threshold {
  width: 26px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  text-align: center;
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
  padding: 0.1rem 0;
  -moz-appearance: textfield;
  font-weight: 600;
}

#course-threshold::-webkit-outer-spin-button,
#course-threshold::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
}

button:active { transform: scale(0.97); }

.btn-primary {
  padding: 0.45rem 0.95rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: lowercase;
  transition: background 0.12s;
}

.btn-primary:hover { background: #000; }

.btn-ghost {
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  text-transform: lowercase;
  transition: all 0.12s;
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-ghost.danger:hover {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
}

/* Course card — index card style */
.course {
  position: relative;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1rem 1.125rem 0.875rem;
  margin-bottom: 0.75rem;
  /* tiny rotation for hand-placed feel */
  animation: lay-down 0.3s ease both;
}

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

.course:nth-child(odd) { transform: rotate(-0.15deg); }
.course:nth-child(even) { transform: rotate(0.15deg); }

.course-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px dashed var(--line);
}

.course-name {
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
  word-break: break-word;
  line-height: 1.1;
  color: var(--ink);
}

.delete-course {
  font-size: 1.25rem;
  color: var(--ink-3);
  line-height: 1;
  padding: 0 0.25rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
}

.delete-course:hover { color: var(--red); }

.course-middle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 0.875rem;
}

.percent-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
}

.percent-main {
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
}

.percent-value {
  font-family: "Caveat", cursive;
  font-size: 3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 0.9;
  transition: color 0.2s;
}

.percent-value.warn { color: var(--amber); }
.percent-value.bad { color: var(--red); }

.percent-unit {
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  color: var(--ink-3);
  font-weight: 500;
}

.streak-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  background: var(--highlight);
  color: var(--ink);
  border-radius: 2px;
  transform: rotate(-2deg);
  font-weight: 600;
}

/* ledger — the bit that makes it feel hand-written */
.ledger {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--ink-2);
  min-width: 0;
}

.ledger-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.ledger-label {
  width: 52px;
  color: var(--ink-3);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.ledger-dots {
  flex: 1;
  overflow: hidden;
  color: var(--line-strong);
  letter-spacing: 2px;
  white-space: nowrap;
  font-size: 0.625rem;
  line-height: 1;
  min-width: 0;
  text-overflow: clip;
}

.ledger-dash {
  flex: 1;
  height: 1px;
  border-top: 1px dashed var(--line-strong);
  min-width: 0;
}

.ledger-num {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ledger-row.target-row .ledger-num {
  color: var(--ink-2);
}

/* bunk hint — in a handwritten comment style */
.bunk-hint {
  margin: 0 0 0.875rem;
  font-family: "Caveat", cursive;
  font-size: 1.125rem;
  color: var(--ink-2);
  line-height: 1.15;
  min-height: 1em;
  padding-left: 1.25rem;
  position: relative;
}

.bunk-hint::before {
  content: "↳";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
}

.bunk-hint.ok { color: var(--green); }
.bunk-hint.warn { color: var(--amber); }
.bunk-hint.bad { color: var(--red); }

/* Action buttons */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.375rem;
}

.tap-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.55rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.8125rem;
  border: 1px solid;
  transition: background 0.12s, color 0.12s;
  font-family: "IBM Plex Mono", monospace;
  text-transform: lowercase;
}

.tap-btn .tap-icon {
  font-size: 0.875rem;
  font-weight: 700;
}

.present-btn {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.present-btn:hover {
  background: var(--green);
  color: var(--paper);
}

.absent-btn {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.absent-btn:hover {
  background: var(--red);
  color: var(--paper);
}

.undo-btn {
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  text-transform: lowercase;
}

.undo-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* History */
.history {
  margin-top: 0.875rem;
  padding-top: 0.625rem;
  border-top: 1px dashed var(--line);
  font-size: 0.75rem;
}

.history summary {
  cursor: pointer;
  padding: 0.125rem 0;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  user-select: none;
}

.history summary::-webkit-details-marker { display: none; }

.history summary::before {
  content: "[ + ]";
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-3);
}

.history[open] summary::before { content: "[ − ]"; }

.history-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  max-height: 180px;
  overflow-y: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  color: var(--ink-2);
}

.tag {
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: lowercase;
}

.tag.present { color: var(--green); }
.tag.absent { color: var(--red); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: var(--ink-3);
}

.empty-scribble {
  font-family: "Caveat", cursive;
  font-size: 1.75rem;
  color: var(--ink-2);
  margin: 0 0 0.375rem;
  transform: rotate(-2deg);
  display: inline-block;
}

.empty-arrow {
  font-family: "Caveat", cursive;
  font-size: 1.125rem;
  color: var(--ink-3);
  margin: 0;
}

/* Summary */
.summary-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 0.875rem 1rem;
  margin-top: 0.5rem;
}

.summary-row {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.75rem;
}

.summary-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#summary-text {
  font-family: "Caveat", cursive;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.625rem;
}

#summary-text .sc {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#summary-text .sc.warn {
  color: var(--amber);
  border-color: var(--amber);
}

#summary-text .sc.bad {
  color: var(--red);
  border-color: var(--red);
}

#summary-text .sc.ok {
  color: var(--green);
  border-color: var(--line);
}

.summary-actions {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

/* make the today pill look clickable */
button.today-pill {
  border: 1px dashed var(--line-strong);
  background: rgba(255,255,255,0.4);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
button.today-pill:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
button.today-pill:hover #today-count { color: var(--paper); }

/* Day modal */
.day-modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 31, 31, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.15s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.day-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 1.125rem 1.25rem 1rem;
  transform: rotate(-0.2deg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.day-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.day-kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.day-title {
  margin: 0.125rem 0 0;
  font-family: "Caveat", cursive;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.01em;
}

.day-close {
  font-size: 1.375rem;
  color: var(--ink-3);
  padding: 0 0.25rem;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1;
}
.day-close:hover { color: var(--red); }

.day-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--line-strong);
}

.day-nav-btn {
  padding: 0.3rem 0.55rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 0.7rem;
  font-family: "IBM Plex Mono", monospace;
  text-transform: lowercase;
}
.day-nav-btn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.day-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#day-picker {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.5rem;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  outline: none;
}

.day-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.day-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.day-stat-num {
  font-family: "Caveat", cursive;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.day-stat-num.present { color: var(--green); }
.day-stat-num.absent { color: var(--red); }

.day-stat-lbl {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.125rem;
}

.day-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
}

.day-empty {
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  color: var(--ink-3);
  text-align: center;
  padding: 1.5rem 0;
  margin: 0;
}

.day-row {
  padding: 0.625rem 0;
  border-bottom: 1px dashed var(--line);
}
.day-row:last-child { border-bottom: none; }

.day-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.day-row-name {
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.day-row-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  display: flex;
  gap: 0.5rem;
}
.day-row-count .present { color: var(--green); font-weight: 600; }
.day-row-count .absent { color: var(--red); font-weight: 600; }

.day-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.day-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
}
.day-tag.present {
  color: var(--green);
  border-color: var(--green);
  background: rgba(61, 138, 74, 0.06);
}
.day-tag.absent {
  color: var(--red);
  border-color: var(--red);
  background: rgba(194, 59, 59, 0.06);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px) rotate(-1deg);
  background: var(--ink);
  color: var(--paper);
  padding: 0.45rem 0.875rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-family: "IBM Plex Mono", monospace;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.2s;
  z-index: 100;
  max-width: 90vw;
}

.toast.show {
  transform: translateX(-50%) translateY(0) rotate(-1deg);
  opacity: 1;
}

/* Confetti */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
}

/* Footer */
.app-footer {
  padding: 2rem 0 0;
  color: var(--ink-3);
  text-align: center;
}

.app-footer small {
  font-size: 0.7rem;
  font-family: "IBM Plex Mono", monospace;
  display: block;
}

.app-footer .credit {
  margin-top: 0.25rem;
  color: var(--ink-3);
}

.app-footer .credit a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
}

.app-footer .credit a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Boot splash */
.boot-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  z-index: 300;
  transition: opacity 0.2s;
}
.boot-splash.fade { opacity: 0; pointer-events: none; }
.boot-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink);
  animation: boot-pulse 0.9s ease-in-out infinite;
}
@keyframes boot-pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Auth gate */
[hidden] { display: none !important; }

.auth-gate {
  position: fixed;
  inset: 0;
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at top left, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(0,0,0,0.03), transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.auth-card {
  max-width: 360px;
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.25rem;
  transform: rotate(-0.4deg);
}

.auth-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--ink-3);
  margin: 0 0 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-title {
  font-family: "Caveat", cursive;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.15rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.auth-tag {
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  color: var(--ink-2);
  margin: 0 0 1.125rem;
  line-height: 1.1;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.7rem 1rem;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  transition: background 0.12s, border-color 0.12s;
}

.google-btn:hover:not(:disabled) {
  background: var(--paper-2);
  border-color: var(--ink);
}

.google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.google-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-error {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--red);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.auth-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink-3);
  margin: 0.5rem 0 0;
  line-height: 1.5;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.auth-note strong {
  color: var(--ink-2);
  font-weight: 600;
}

/* Roll badge in header */
.roll-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink-2);
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s;
}

.roll-badge:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.roll-badge:empty { display: none; }

/* Responsive */
@media (max-width: 480px) {
  .hero-number { font-size: 4.5rem; }
  .percent-value { font-size: 2.5rem; }
  .course { padding: 0.875rem 1rem 0.75rem; }
  .course-middle { gap: 0.875rem; }
  .ledger-label { width: 44px; }
  .tap-btn .tap-label { display: inline; }
}

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