:root {
  color-scheme: light;
  --paper: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #f5efe4;
  --ink: #24302f;
  --muted: #66706b;
  --line: #ded7ca;
  --green: #2f8f6f;
  --green-deep: #1f6c54;
  --amber: #f5a623;
  --amber-soft: #ffe3a5;
  --blue: #3c6ecf;
  --coral: #d85f4f;
  --teal-soft: #d9f0e8;
  --shadow: 0 18px 45px rgba(63, 54, 40, 0.12);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(47, 143, 111, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #fffaf2 0%, #f4efe3 100%);
  background-size: 44px 44px, auto;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: 100%;
  max-width: 1212px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  transition: transform 180ms ease;
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green-deep);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.nav-links a {
  min-width: 78px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--teal-soft);
  outline: none;
}

.nav-links a:hover {
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.user-menu img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.user-menu span {
  max-width: 160px;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

body[data-page="streak"] .workspace,
body[data-page="history"] .workspace,
body[data-page="settings"] .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body[data-page="streak"] .streak-panel,
body[data-page="settings"] .settings-panel {
  width: min(100%, 880px);
  justify-self: center;
}

.app-section:not(.hidden) {
  animation: page-rise 220ms ease both;
}

.panel,
.visual-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.widget-button {
  color: inherit;
  text-align: inherit;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.widget-button:hover {
  transform: translateY(-2px);
}

.widget-button:active {
  transform: translateY(1px) scale(0.99);
}

.today-panel {
  padding: 24px;
}

.auth-panel,
.signup-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
  padding: 28px;
}

.auth-panel {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(47, 143, 111, 0.12), rgba(245, 166, 35, 0.13)),
    rgba(255, 255, 255, 0.93);
}

.auth-copy {
  display: grid;
  gap: 12px;
}

.auth-copy p:not(.eyebrow),
.setup-note {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.google-signin-box {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.setup-note {
  padding: 13px 15px;
  border: 1px dashed #9eb8ad;
  border-radius: var(--radius);
  background: #f3fbf7;
}

.setup-note code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #e3f2ec;
  color: var(--green-deep);
}

.signup-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.profile-grid {
  grid-template-columns: minmax(220px, 1fr) 160px;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  font-size: 3.2rem;
  max-width: 11ch;
}

h2 {
  font-size: 1.5rem;
}

.completion-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid #e4b64c;
  border-radius: 999px;
  background: #fff2cf;
  color: #775114;
  font-weight: 800;
  white-space: nowrap;
}

.completion-pill.done {
  border-color: #6fc29b;
  background: #e1f6ed;
  color: var(--green-deep);
}

.flame {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 18px;
  border-radius: 10px 10px 10px 2px;
  background: var(--amber);
  transform: rotate(45deg);
}

.flame::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 10px;
  right: 2px;
  bottom: 1px;
  border-radius: 8px 8px 8px 2px;
  background: #fff0a0;
}

.reflection-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.compact-row {
  max-width: 220px;
}

label,
legend {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

input,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid #cec6b8;
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--ink);
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  padding: 14px;
  line-height: 1.55;
  resize: vertical;
}

#reflection.reflection-glow {
  border-color: var(--amber);
  animation: reflection-glow 1150ms ease;
  outline: 3px solid rgba(245, 166, 35, 0.22);
  outline-offset: 1px;
  box-shadow:
    0 0 0 4px rgba(245, 166, 35, 0.18),
    0 0 28px rgba(245, 166, 35, 0.28);
}

input:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--green);
  outline: 3px solid rgba(47, 143, 111, 0.2);
  outline-offset: 1px;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.mood-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.mood-button {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--ink);
  font-weight: 800;
  overflow: visible;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.mood-button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--teal-soft);
  box-shadow: inset 0 -3px 0 rgba(31, 108, 84, 0.16);
}

.mood-button:hover {
  transform: translateY(-1px);
}

.mood-pop-emoji {
  position: absolute;
  z-index: 3;
  top: 2px;
  left: var(--mood-pop-x, 50%);
  font-size: var(--mood-pop-size, 18px);
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 4px 10px rgba(63, 54, 40, 0.18);
  transform: translate(-50%, -12%) scale(0.6);
  transform-origin: center;
  animation: mood-emoji-pop 780ms cubic-bezier(0.17, 0.82, 0.25, 1) forwards;
  will-change: opacity, transform;
}

.mood-button.mood-jump[data-mood="Clear"] {
  animation: mood-clear 360ms ease;
}

.mood-button.mood-jump[data-mood="Proud"] {
  animation: mood-proud 460ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.mood-button.mood-jump[data-mood="Tired"] {
  animation: mood-tired 520ms ease;
}

.mood-button.mood-jump[data-mood="Heavy"] {
  animation: mood-heavy 420ms ease-out;
}

.mood-glyph {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid currentColor;
}

.mood-glyph.calm {
  color: var(--green);
  background: linear-gradient(180deg, transparent 45%, rgba(47, 143, 111, 0.22) 46%);
}

.mood-glyph.proud {
  color: var(--amber);
  background: radial-gradient(circle at 50% 35%, #fff1b6 0 22%, transparent 24%);
}

.mood-glyph.tired {
  color: #7a7483;
  background: linear-gradient(135deg, transparent 0 48%, rgba(122, 116, 131, 0.22) 49%);
}

.mood-glyph.heavy {
  color: var(--coral);
  background: radial-gradient(circle at 50% 50%, rgba(216, 95, 79, 0.18) 0 45%, transparent 47%);
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prompt-grid label {
  display: grid;
  gap: 6px;
}

.prompt-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.energy-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) 46px;
  align-items: center;
  gap: 12px;
}

.energy-slider-shell {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 48px;
  padding: 4px 0 0;
}

.energy-slider-shell input[type="range"] {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.energy-rail {
  position: relative;
  height: 16px;
  margin-top: 9px;
  border: 1px solid #d6cbbc;
  border-radius: 999px;
  background: #efe5d5;
  box-shadow: inset 0 2px 5px rgba(63, 54, 40, 0.08);
}

.energy-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--energy-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 180ms ease;
}

.energy-thumb {
  position: absolute;
  top: 50%;
  left: var(--energy-progress);
  width: 28px;
  height: 28px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--green-deep);
  box-shadow: 0 6px 14px rgba(31, 108, 84, 0.24);
  transform: translate(-50%, -50%);
  transition:
    left 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.energy-slider-shell:focus-within .energy-thumb {
  outline: 3px solid rgba(47, 143, 111, 0.22);
  outline-offset: 3px;
}

.energy-slider-shell:active .energy-thumb {
  transform: translate(-50%, -50%) scale(1.08);
}

.energy-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.energy-steps button {
  min-width: 0;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.energy-steps button:hover,
.energy-steps button:focus-visible,
.energy-steps button.active {
  color: var(--green-deep);
  background: var(--teal-soft);
  outline: none;
  transform: translateY(-1px);
}

output {
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  border: 1px solid #d6cbbc;
  border-radius: 50%;
  background: #fffdf9;
  color: var(--green-deep);
  font-weight: 900;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 900;
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--green-deep);
  background: var(--green);
  color: #ffffff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14);
}

.primary-button:hover {
  background: var(--green-deep);
}

.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink);
}

.secondary-button {
  padding: 0 15px;
}

.save-status {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.secondary-button:hover,
.icon-button:hover {
  background: var(--surface-soft);
}

.streak-panel {
  padding: 22px;
}

.streak-hero {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.streak-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 8px solid var(--amber);
  border-radius: 50%;
  background: #fff7df;
  color: var(--ink);
  box-shadow: inset 0 0 0 5px #ffffff;
}

.streak-ring:hover,
.streak-ring:focus-visible {
  border-color: #f0b63c;
  outline: none;
  box-shadow:
    inset 0 0 0 5px #ffffff,
    0 12px 28px rgba(245, 166, 35, 0.18);
}

.streak-ring span {
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.streak-ring small {
  color: var(--muted);
  font-weight: 850;
}

#streak-status {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.stat-list {
  display: grid;
  gap: 1px;
  margin: 0 -22px 20px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 22px;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
}

.stat-row:hover,
.stat-row:focus-visible {
  background: #f8fffb;
  outline: none;
}

.stat-row span {
  color: var(--muted);
  font-weight: 800;
}

.stat-row strong {
  font-size: 1.04rem;
}

.level-progress {
  display: block;
  width: 100%;
  margin-bottom: 20px;
  padding: 0;
  border: 0;
  background: transparent;
}

.level-progress:focus-visible {
  outline: 3px solid rgba(47, 143, 111, 0.2);
  outline-offset: 5px;
}

.level-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfcd;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 240ms ease;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 20px;
}

.day-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.day-cell:hover,
.day-cell:focus-visible {
  border-color: var(--green);
  color: var(--green-deep);
  outline: none;
  transform: translateY(-2px);
}

.day-cell.done {
  border-color: #88cfae;
  color: var(--green-deep);
  background: #ddf4e9;
}

.day-cell.today {
  box-shadow: inset 0 -4px 0 rgba(245, 166, 35, 0.4);
}

.badge-row {
  display: grid;
  gap: 8px;
}

.badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 9px 0;
  border-inline: 0;
  border-bottom: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.badge:hover,
.badge:focus-visible {
  color: var(--ink);
  outline: none;
}

.badge strong {
  color: var(--ink);
}

.badge.locked {
  opacity: 0.5;
}

.insight-strip {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #c8ddd3;
  border-radius: var(--radius);
  background: #f6fbf8;
}

.insight-strip > span {
  color: var(--green-deep);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.insight-strip strong {
  font-size: 1.02rem;
}

.insight-strip p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.4;
}

.insight-strip.widget-pop {
  animation: widget-pop 260ms ease both;
}

.visual-panel {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  grid-column: 2;
  padding: 0;
}

.visual-panel img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

.visual-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.visual-caption:hover,
.visual-caption:focus-visible {
  border-color: rgba(47, 143, 111, 0.38);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
}

.visual-caption strong {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-deep);
  color: #ffffff;
  font-size: 1.2rem;
}

.visual-caption span {
  color: var(--muted);
  font-weight: 850;
  line-height: 1.3;
}

.history-section {
  grid-column: 1 / -1;
  padding-top: 12px;
}

.settings-panel {
  padding: 24px;
}

.settings-form {
  display: grid;
  gap: 18px;
}

.profile-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(217, 240, 232, 0.8), rgba(255, 242, 207, 0.62)),
    #ffffff;
}

.avatar-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--green-deep);
  box-shadow: 0 14px 28px rgba(63, 54, 40, 0.14);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview span {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 950;
}

.profile-card h2 {
  font-size: 1.35rem;
}

.profile-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 760;
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.avatar-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.settings-fields,
.avatar-picker {
  display: grid;
  gap: 14px;
}

.compact-heading {
  margin-bottom: 0;
}

.search-field {
  display: grid;
  gap: 7px;
}

.search-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.avatar-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 128px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.avatar-option img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(63, 54, 40, 0.12);
}

.avatar-option span {
  font-size: 0.82rem;
}

.avatar-option:hover,
.avatar-option:focus-visible,
.avatar-option.selected {
  border-color: var(--green);
  background: #f6fffb;
  outline: none;
  transform: translateY(-2px);
}

.avatar-option.selected {
  box-shadow: inset 0 -4px 0 rgba(31, 108, 84, 0.14);
}

.compact-empty {
  padding: 14px;
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  border: 1px dashed #cbbfad;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 750;
}

.entry-card {
  display: grid;
  gap: 12px;
  min-height: 188px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(63, 54, 40, 0.08);
}

.entry-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.entry-date {
  font-weight: 950;
}

.entry-xp {
  color: var(--green-deep);
  font-weight: 950;
}

.entry-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.entry-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-button {
  width: auto;
  min-width: 48px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.82rem;
}

@keyframes page-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes widget-pop {
  0% {
    transform: scale(0.98);
  }

  70% {
    transform: scale(1.01);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes reflection-glow {
  0%,
  100% {
    border-color: #cec6b8;
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0);
  }

  26% {
    border-color: var(--amber);
    box-shadow:
      0 0 0 5px rgba(245, 166, 35, 0.2),
      0 0 30px rgba(245, 166, 35, 0.3);
  }

  62% {
    border-color: var(--amber);
    box-shadow:
      0 0 0 3px rgba(245, 166, 35, 0.14),
      0 0 18px rgba(245, 166, 35, 0.22);
  }
}

@keyframes mood-clear {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes mood-proud {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  45% {
    transform: translateY(-10px) scale(1.03);
  }

  70% {
    transform: translateY(1px) scale(0.99);
  }
}

@keyframes mood-tired {
  0%,
  100% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(-3px) rotate(-1deg);
  }

  75% {
    transform: translateY(1px) rotate(1deg);
  }
}

@keyframes mood-heavy {
  0%,
  100% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-5px);
  }

  70% {
    transform: translateY(2px);
  }
}

@keyframes mood-emoji-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -8%) scale(0.55) rotate(0deg);
  }

  18% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--mood-pop-mid-drift)), var(--mood-pop-mid-rise))
      scale(1.12)
      rotate(var(--mood-pop-mid-rotate));
  }

  68% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--mood-pop-drift)), var(--mood-pop-rise))
      scale(0.78)
      rotate(var(--mood-pop-rotate));
  }
}

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

  .visual-panel {
    grid-column: auto;
    min-height: 280px;
  }

  .visual-panel img {
    min-height: 280px;
  }

  .entry-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .mood-pop-emoji {
    display: none;
  }
}

@media (max-width: 700px) {
  .site-shell {
    padding: 12px 11px 48px;
  }

  .topbar,
  .panel-heading,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .workspace > *,
  .nav-links,
  .user-menu {
    width: calc(100vw - 22px);
    max-width: calc(100vw - 22px);
  }

  .today-panel,
  .streak-panel,
  .visual-panel {
    overflow: hidden;
  }

  .nav-links {
    width: 100%;
    gap: 2px;
    padding: 3px;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
    padding-inline: 6px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .today-panel,
  .streak-panel,
  .auth-panel,
  .signup-panel {
    padding: 18px;
  }

  .auth-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .google-signin-box {
    padding: 14px;
  }

  .user-menu {
    justify-content: space-between;
    border-radius: var(--radius);
  }

  h1 {
    font-size: 2.35rem;
  }

  .completion-pill {
    width: 100%;
    min-width: 0;
  }

  .mood-options,
  .prompt-grid,
  .profile-grid,
  .entry-list {
    grid-template-columns: 1fr;
  }

  .streak-hero {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .streak-ring {
    width: 76px;
    height: 76px;
    border-width: 7px;
  }

  .stat-list {
    margin-inline: -18px;
  }

  .stat-row {
    padding-inline: 18px;
  }

  .energy-control {
    grid-template-columns: 1fr 46px;
  }

  .energy-control label {
    grid-column: 1 / -1;
  }

  .profile-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .avatar-actions {
    justify-content: flex-start;
  }

  .avatar-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .week-strip {
    gap: 4px;
  }

  .day-cell {
    height: 46px;
    font-size: 0.68rem;
  }

  .actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
