:root {
  color-scheme: light;
  --bg: #edf2ec;
  --bg-soft: #f7f3ea;
  --bg-deep: #e3ebe4;
  --surface: rgba(255, 253, 247, 0.92);
  --surface-solid: rgba(255, 253, 247, 0.98);
  --ink: #14201d;
  --muted: #66736e;
  --faint: #8c9792;
  --line: rgba(32, 72, 63, 0.12);
  --accent: #207963;
  --accent-strong: #124f43;
  --stage: #0f241f;
  --stage-soft: #17332d;
  --accent-soft: #dff3e8;
  --gold: #eebf63;
  --coral: #df8067;
  --sky: #88b6cf;
  --panel-shadow: 0 20px 54px rgba(18, 33, 29, 0.1);
  --soft-shadow: 0 14px 34px rgba(18, 33, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: #10231f;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #10231f 0, #17332d 430px, #f7fbf7 430px, var(--bg) 62%, var(--bg-deep) 100%),
    radial-gradient(circle at 12% 0, rgba(238, 191, 99, 0.14), transparent 18rem),
    radial-gradient(circle at 88% 6%, rgba(136, 182, 207, 0.18), transparent 19rem),
    linear-gradient(180deg, #f7fbf7, var(--bg) 32%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: Aptos, "Segoe UI Variable Text", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(238, 191, 99, 0.72);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 24px 116px;
}

.app-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 50dvw);
  right: calc(50% - 50dvw);
  z-index: -2;
  height: 460px;
  background:
    radial-gradient(circle at 10% 0, rgba(238, 191, 99, 0.24), transparent 20rem),
    radial-gradient(circle at 88% 8%, rgba(136, 182, 207, 0.18), transparent 22rem),
    linear-gradient(180deg, rgba(11, 27, 23, 0.98), rgba(17, 45, 39, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero {
  color: white;
  animation: lift-in 420ms ease both;
}

.hero::before {
  display: none;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #9ee4cd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(44px, 8vw, 76px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.15;
}

.date-input {
  min-width: 142px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding: 0 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.score-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 166px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, rgba(49, 141, 114, 0.9), rgba(16, 35, 31, 0.92));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}

.score-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 86% 72%, rgba(238, 191, 99, 0.22), transparent 8rem),
    radial-gradient(circle at 18% 10%, rgba(158, 228, 205, 0.18), transparent 9rem);
  pointer-events: none;
}

.score-panel > div {
  position: relative;
  z-index: 1;
}

.score-label,
.score-hint,
.section-head span,
.hint {
  color: var(--muted);
  font-size: 13px;
}

.score-label,
.score-hint {
  position: relative;
  color: rgba(255, 255, 255, 0.86);
}

#dayScore {
  position: relative;
  display: block;
  margin-top: 4px;
  color: #fffdf7;
  font-size: 52px;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.score-hint {
  margin-top: 8px;
  max-width: 270px;
}

.score-ring {
  position: relative;
  z-index: 1;
  flex: 0 0 104px;
  width: 104px;
  height: 104px;
}

.score-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring circle {
  fill: none;
  stroke-width: 11;
}

.ring-bg {
  stroke: rgba(255, 255, 255, 0.22);
}

.ring-fill {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 280ms ease;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.hero-strip div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(13, 38, 32, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-strip span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 900;
}

.hero-strip strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: white;
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.tabbar {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 18px 0 16px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.88);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px) saturate(120%);
}

.tabbar button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.tabbar button.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 24px rgba(32, 121, 99, 0.28);
}

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

.tab-page {
  display: none;
}

.tab-page.active {
  display: block;
  animation: soft-in 220ms ease both;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px) saturate(120%);
}

.metric-card,
.panel {
  padding: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.accent-card {
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(223, 243, 232, 0.92)),
    var(--surface-solid);
}

.water-card {
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(231, 242, 247, 0.96)),
    var(--surface-solid);
}

.metric-card label,
.note-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 900;
}

.input-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.input-row input,
.form-grid input,
.form-grid select,
.reminder-grid input[type="time"],
.gym-fields input,
textarea {
  width: 100%;
  border: 1px solid rgba(101, 112, 109, 0.22);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(20, 32, 29, 0.03);
}

.input-row input {
  height: 42px;
  text-align: center;
  font-weight: 900;
}

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

.form-grid label,
.reminder-grid label,
.gym-fields label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.form-grid input,
.form-grid select,
.reminder-grid input[type="time"],
.gym-fields input {
  display: block;
  height: 42px;
  margin-top: 6px;
  padding: 0 10px;
}

.icon-button,
.text-button,
.primary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: white;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 9px 18px rgba(32, 121, 99, 0.2);
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:active {
  transform: scale(0.94);
}

.hint {
  position: relative;
  z-index: 1;
  margin-top: 8px;
}

.metric-progress {
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 7px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(20, 32, 29, 0.08);
}

.metric-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  transition: width 260ms ease;
}

.panel {
  margin-top: 12px;
  animation: lift-in 320ms ease both;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mood-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.mood-picker button {
  height: 48px;
  border: 1px solid rgba(101, 112, 109, 0.22);
  border-radius: 8px;
  background: #fffefa;
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.mood-picker button.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(32, 121, 99, 0.22);
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-picker label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(101, 112, 109, 0.2);
  border-radius: 8px;
  background: #fffefa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tag-picker label:has(input:checked) {
  border-color: rgba(32, 121, 99, 0.34);
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.tag-picker input {
  width: 15px;
  height: 15px;
  margin: 0 7px 0 0;
  accent-color: var(--accent);
}

.habits-panel {
  display: grid;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(101, 112, 109, 0.16);
  color: var(--ink);
  font-weight: 850;
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.body-axis-row {
  color: var(--accent-strong);
}

.gym-fields,
.reminder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reminder-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.hidden {
  display: none;
}

textarea {
  display: block;
  resize: vertical;
  min-height: 112px;
  padding: 12px;
}

.text-button {
  min-height: 34px;
  padding: 0 12px;
  background: #f2ead8;
  color: var(--accent-strong);
  font-weight: 900;
}

.weekly-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 178px;
}

.chart-bar {
  display: grid;
  grid-template-rows: 24px 118px 24px;
  gap: 6px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  text-align: center;
}

.bar-value {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 950;
}

.bar-track {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  border-radius: 8px;
  background: #e8eee8;
}

.bar-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--bar-height);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  animation: grow-up 620ms ease both;
}

.bar-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-grid,
.streak-grid {
  display: grid;
  gap: 8px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.streak-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card,
.streak-card,
.weekly-report p,
.history-item {
  border: 1px solid rgba(101, 112, 109, 0.14);
  border-radius: 8px;
  background: #fffefa;
}

.streak-card {
  min-height: 92px;
  padding: 12px 8px;
  background:
    linear-gradient(180deg, rgba(223, 243, 232, 0.82), rgba(255, 254, 250, 0.98));
  text-align: center;
}

.streak-card span,
.streak-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.streak-card strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--accent-strong);
  font-size: 30px;
  line-height: 1;
}

.weekly-report {
  display: grid;
  gap: 8px;
}

.weekly-report p {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.evening-panel {
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.96), rgba(223, 243, 232, 0.88)),
    var(--surface-solid);
}

.evening-report {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.evening-score {
  display: grid;
  place-items: center;
  min-height: 124px;
  padding: 14px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 24%, rgba(238, 191, 99, 0.34), transparent 5rem),
    linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  text-align: center;
}

.evening-score strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.evening-score span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.evening-lines {
  display: grid;
  gap: 8px;
}

.evening-lines p,
.insight-card,
.journal-item {
  border: 1px solid rgba(101, 112, 109, 0.14);
  border-radius: 8px;
  background: #fffefa;
}

.evening-lines p {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.diary-grid label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.diary-grid textarea {
  min-height: 84px;
  margin-top: 6px;
}

.balance-map {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.balance-wheel {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(152px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--balance) * 1%), #e6ece7 0),
    #e6ece7;
  box-shadow: inset 0 0 0 1px rgba(101, 112, 109, 0.16), 0 18px 38px rgba(32, 121, 99, 0.14);
}

.balance-wheel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 64% 24%, rgba(238, 191, 99, 0.18), transparent 4rem),
    #fffefa;
}

.balance-wheel::after {
  content: attr(data-score);
  position: relative;
  z-index: 1;
  color: var(--accent-strong);
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.balance-wheel span {
  position: absolute;
  z-index: 1;
  bottom: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.balance-list {
  display: grid;
  gap: 9px;
}

.balance-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
}

.balance-row span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.balance-row strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.balance-row i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(20, 32, 29, 0.08);
}

.balance-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky), var(--accent), var(--gold));
}

.insight-list,
.journal-list {
  display: grid;
  gap: 8px;
}

.insight-card {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.insight-card.good {
  border-color: rgba(32, 121, 99, 0.18);
  background: linear-gradient(135deg, rgba(223, 243, 232, 0.9), #fffefa);
}

.insight-card.warm {
  border-color: rgba(223, 128, 103, 0.22);
  background: linear-gradient(135deg, rgba(248, 231, 226, 0.92), #fffefa);
}

.insight-card strong {
  color: var(--ink);
  font-size: 14px;
}

.insight-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.journal-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  text-align: left;
}

.journal-date {
  color: var(--accent-strong);
  font-weight: 950;
}

.journal-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.stat-card {
  min-height: 76px;
  padding: 12px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.calendar-empty,
.calendar-day {
  aspect-ratio: 1;
}

.calendar-day {
  display: grid;
  place-items: center;
  border: 1px solid rgba(101, 112, 109, 0.16);
  border-radius: 8px;
  background: #fffefa;
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.calendar-day:active {
  transform: scale(0.94);
}

.calendar-day.low {
  background: #f8e7e2;
  color: #944b42;
}

.calendar-day.mid {
  background: #f6edd5;
  color: #8a6433;
}

.calendar-day.high {
  background: #dff0e7;
  color: var(--accent-strong);
}

.calendar-day.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 6px 14px rgba(32, 121, 99, 0.16);
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 12px;
  text-align: left;
}

.history-date {
  display: block;
  color: var(--ink);
  font-weight: 950;
}

.history-meta {
  color: var(--muted);
  font-size: 13px;
}

.history-score {
  min-width: 48px;
  text-align: right;
  color: var(--accent-strong);
  font-weight: 950;
}

.bottom-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: rgba(242, 247, 242, 0.86);
  border-top: 1px solid rgba(101, 112, 109, 0.18);
  backdrop-filter: blur(16px) saturate(120%);
}

.primary-button {
  display: block;
  width: min(100%, 420px);
  height: 54px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 950;
  box-shadow: 0 14px 32px rgba(32, 121, 99, 0.28);
}

@media (min-width: 900px) {
  .app-shell::before {
    height: 430px;
  }

  .tab-page[data-page="day"].active,
  .tab-page[data-page="body"].active,
  .tab-page[data-page="money"].active,
  .tab-page[data-page="analytics"].active {
    display: grid;
    gap: 16px;
    align-items: start;
  }

  .tab-page[data-page="day"].active {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }

  .tab-page[data-page="day"].active > :nth-of-type(1),
  .tab-page[data-page="day"].active > :nth-of-type(5) {
    grid-column: 1 / -1;
  }

  .tab-page[data-page="body"].active,
  .tab-page[data-page="money"].active,
  .tab-page[data-page="analytics"].active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-page[data-page="body"].active > :nth-of-type(3),
  .tab-page[data-page="money"].active > :nth-of-type(3),
  .tab-page[data-page="analytics"].active > :nth-of-type(7) {
    grid-column: 1 / -1;
  }

  .quick-grid {
    gap: 16px;
  }

  .balance-map {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .streak-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-bar {
    position: static;
    width: 100%;
    padding: 10px 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
    pointer-events: auto;
  }

  .primary-button {
    width: min(100%, 280px);
    margin-right: 0;
    margin-left: auto;
    pointer-events: auto;
  }
}

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

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grow-up {
  from {
    height: 0;
  }
  to {
    height: var(--bar-height);
  }
}

@media (max-width: 560px) {
  .app-shell::before {
    height: 620px;
  }

  @supports not (width: 100dvw) {
    .app-shell::before {
      left: calc(50% - 50vw);
      right: calc(50% - 50vw);
    }
  }

  .app-shell {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-top {
    flex-direction: column;
  }

  .date-input {
    width: 100%;
  }

  .hero-strip,
  .quick-grid,
  .form-grid,
  .stats-grid,
  .reminder-grid,
  .gym-fields,
  .evening-report,
  .diary-grid,
  .balance-map {
    grid-template-columns: 1fr;
  }

  .streak-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tabbar button {
    min-height: 40px;
    font-size: 13px;
  }

  .weekly-chart {
    gap: 6px;
  }

  .score-panel {
    align-items: flex-start;
  }

  .score-ring {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

  .bar-label {
    font-size: 10px;
  }
}
