:root {
  color-scheme: dark;
  --ink: #f4f7ef;
  --ink-soft: #9da796;
  --ink-faint: #697164;
  --paper: #080a07;
  --card: #11140f;
  --card-raised: #161a12;
  --line: #262c21;
  --accent: #ddff4f;
  --accent-bright: #e8ff68;
  --accent-deep: #bddd31;
  --accent-soft: rgba(221, 255, 79, 0.11);
  --accent-line: rgba(221, 255, 79, 0.3);
  --danger: #ff705f;
  --danger-soft: rgba(255, 90, 70, 0.12);
  --success: #c9f64f;
  --success-soft: rgba(201, 246, 79, 0.11);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --shadow-small: 0 10px 28px rgba(0, 0, 0, 0.25);
  --radius-xl: 29px;
  --radius-lg: 23px;
  --radius-md: 17px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% -4%, rgba(165, 198, 46, 0.11), transparent 28rem),
    radial-gradient(circle at 92% 26%, rgba(120, 156, 28, 0.07), transparent 24rem),
    linear-gradient(180deg, #090b08 0%, #070906 100%);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(221, 255, 79, 0.3);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px calc(150px + var(--safe-bottom));
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding: 17px 2px 13px;
  background: linear-gradient(180deg, rgba(8, 10, 7, 0.98) 70%, rgba(8, 10, 7, 0));
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #080a06;
  background: var(--accent);
  box-shadow: 0 0 26px rgba(221, 255, 79, 0.14);
  font-size: 20px;
  font-weight: 950;
  transform: rotate(-4deg);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-name {
  overflow: hidden;
  max-width: 220px;
  color: #f7f9f3;
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.calendar-nav,
.dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid #24291f;
  border-radius: 15px;
  color: #dce2d8;
  background: #11140f;
  box-shadow: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-button:active,
.calendar-nav:active,
.dialog-close:active {
  transform: scale(0.94);
}

.icon-button:hover,
.calendar-nav:hover,
.dialog-close:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}

.main-content {
  animation: content-in 380ms ease both;
}

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

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  overflow: hidden;
  min-height: 225px;
  padding: 31px 28px;
  border: 1px solid rgba(221, 255, 79, 0.18);
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 92% 12%, rgba(221, 255, 79, 0.08), transparent 12rem),
    linear-gradient(140deg, #1a2816 0%, #111b0f 48%, #0d130b 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  isolation: isolate;
  transition: border-color 240ms ease, background 240ms ease;
}

.hero-card::before {
  position: absolute;
  z-index: -1;
  top: -104px;
  right: -61px;
  width: 285px;
  height: 285px;
  border: 2px solid rgba(221, 255, 79, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgba(221, 255, 79, 0.018),
    0 0 0 70px rgba(221, 255, 79, 0.012);
  content: "";
}

.hero-card.is-complete {
  border-color: rgba(221, 255, 79, 0.46);
  background:
    radial-gradient(circle at 88% 20%, rgba(221, 255, 79, 0.18), transparent 14rem),
    linear-gradient(140deg, #24391c 0%, #172612 50%, #10190d 100%);
  box-shadow: 0 18px 50px rgba(124, 164, 28, 0.14);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.hero-date {
  margin: 0 0 12px;
  color: #aeb8a5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  max-width: 360px;
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1.18;
}

.hero-message {
  margin: 14px 0 0;
  color: #aeb8a5;
  font-size: 13px;
  line-height: 1.6;
}

.progress-ring {
  --progress: 0deg;
  position: relative;
  z-index: 2;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--progress), rgba(255, 255, 255, 0.09) 0);
  box-shadow: 0 0 26px rgba(221, 255, 79, 0.08);
  transition: background 300ms ease;
}

.progress-ring::before {
  position: absolute;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(221, 255, 79, 0.12);
  border-radius: 50%;
  background: #121a0f;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.26);
  content: "";
}

.hero-card.is-complete .progress-ring::before {
  background: #16210f;
}

.progress-ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 100%;
}

.progress-ring-inner strong {
  color: #fff;
  font-size: 31px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.progress-ring-inner span {
  margin-left: 2px;
  color: #9da796;
  font-size: 12px;
  font-weight: 800;
}

.hero-glow {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 15px var(--accent),
    24px -12px 0 -2px rgba(221, 255, 79, 0.52),
    24px -12px 15px rgba(221, 255, 79, 0.18);
  opacity: 0.8;
}

.recent-card,
.week-plan-card {
  margin-top: 14px;
  padding: 18px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #141813, #0f120d);
  box-shadow: var(--shadow-small);
}

.recent-heading,
.week-plan-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.recent-heading h2,
.week-plan-heading h2 {
  margin: 4px 0 0;
  color: #f4f7ef;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.recent-heading > span,
.week-plan-heading > span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

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

.recent-day {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 0.72;
  place-items: center;
  padding: 7px 2px 6px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #778073;
  background: #171b15;
  cursor: pointer;
}

.recent-day span:first-child {
  font-size: 9px;
  font-weight: 750;
}

.recent-day strong {
  margin-top: 3px;
  color: #c4ccc0;
  font-size: 13px;
  font-weight: 850;
}

.recent-day::after {
  position: absolute;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #454c40;
  content: "";
}

.recent-day.is-complete {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.recent-day.is-complete strong,
.recent-day.is-complete span:first-child {
  color: var(--accent);
}

.recent-day.is-complete::after {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(221, 255, 79, 0.55);
}

.recent-day.is-partial::after {
  background: #adc855;
}

.recent-day.is-missed::after {
  background: var(--danger);
}

.recent-day.is-rest::after {
  opacity: 0.35;
}

.recent-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

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

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 33px 4px 14px;
}

.section-heading h1,
.section-heading h2 {
  margin: 4px 0 0;
  color: #f7f9f3;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid #282f23;
  border-radius: 999px;
  color: #9da796;
  background: #11140f;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.complete {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.status-pill.partial {
  border-color: rgba(223, 255, 79, 0.2);
  color: #cfeb71;
  background: rgba(223, 255, 79, 0.07);
}

.status-pill.missed {
  border-color: rgba(255, 112, 95, 0.25);
  color: #ff9588;
  background: var(--danger-soft);
}

.status-pill.rest {
  color: #a9b2a1;
  background: #151914;
}

.habit-list,
.history-habit-list {
  display: grid;
  gap: 11px;
}

.complete-all-button {
  width: 100%;
  min-height: 49px;
  margin-top: 11px;
  border: 1px solid var(--accent-line);
  border-radius: 17px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.complete-all-button:hover {
  border-color: var(--accent);
  background: rgba(221, 255, 79, 0.16);
}

.complete-all-button:active {
  transform: scale(0.985);
}

.week-plan-card {
  overflow: hidden;
  margin-top: 27px;
}

.week-plan-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -17px;
  padding: 0 17px 5px;
  scrollbar-width: none;
}

.week-plan-list::-webkit-scrollbar {
  display: none;
}

.week-day-card {
  display: flex;
  width: 92px;
  min-width: 92px;
  min-height: 125px;
  flex-direction: column;
  align-items: flex-start;
  padding: 11px 10px;
  border: 1px solid #292f25;
  border-radius: 17px;
  color: #b7c0b2;
  background: #171b15;
  text-align: left;
  cursor: pointer;
}

.week-day-card:disabled {
  cursor: default;
  opacity: 0.62;
}

.week-day-card.is-today {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.week-day-card.is-complete {
  border-color: rgba(221, 255, 79, 0.24);
}

.week-day-card.is-missed {
  border-color: rgba(255, 112, 95, 0.17);
}

.week-day-label {
  color: #8d9788;
  font-size: 10px;
  font-weight: 800;
}

.week-day-card.is-today .week-day-label {
  color: var(--accent);
}

.week-day-date {
  margin-top: 3px;
  color: #596154;
  font-size: 9px;
}

.week-day-emojis {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
  font-size: 17px;
}

.week-day-emojis small {
  margin-left: 1px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.week-day-name {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: #edf1e8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.training-gallery-card {
  margin-top: 27px;
}

.training-gallery-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 4px 13px;
}

.training-gallery-heading h2 {
  margin: 4px 0 0;
  color: #f4f7ef;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.training-gallery-heading > span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

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

.training-photo-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 196px;
  padding: 0;
  border: 1px solid #2a3026;
  border-radius: 21px;
  background: #161a12;
  box-shadow: var(--shadow-small);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
}

.training-photo-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 4, 0.02) 28%, rgba(5, 7, 5, 0.94) 100%);
  content: "";
}

.training-photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.06);
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 240ms ease;
}

.training-photo-card:hover img {
  filter: saturate(1) contrast(1.04);
  transform: scale(1.04);
}

.training-photo-copy {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  left: 14px;
}

.training-photo-copy strong {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.training-photo-copy span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.63);
  font-size: 10px;
  font-weight: 700;
}

.training-photo-arrow {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #090b06;
  background: var(--accent);
  font-size: 17px;
  font-weight: 900;
}

.image-credit {
  margin: 9px 3px 0;
  color: #50574b;
  font-size: 9px;
  text-align: right;
}

.coach-card {
  position: relative;
  display: flex;
  gap: 14px;
  overflow: hidden;
  margin-top: 14px;
  padding: 21px 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(221, 255, 79, 0.12), transparent 12rem),
    linear-gradient(145deg, #182016, #11170f);
}

.coach-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #090b06;
  background: var(--accent);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.coach-card h2 {
  margin: 5px 0 0;
  color: #f4f7ef;
  font-size: 17px;
  line-height: 1.35;
}

.coach-card p:last-child {
  margin: 8px 0 0;
  color: #99a392;
  font-size: 11px;
  line-height: 1.6;
}

.habit-card {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #151913, #10130e);
  box-shadow: var(--shadow-small);
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.habit-card:active {
  transform: scale(0.992);
}

.habit-card.is-checked {
  border-color: var(--accent-line);
  background: linear-gradient(130deg, rgba(221, 255, 79, 0.11), #121610 65%);
}

.habit-check-area {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 15px;
  padding: 17px 12px 17px 17px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.habit-emoji {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #272e23;
  border-radius: 17px;
  background: #1b2118;
  font-size: 24px;
  transition: transform 220ms cubic-bezier(0.2, 1.5, 0.5, 1), background 180ms ease;
}

.habit-card.is-checked .habit-emoji {
  border-color: var(--accent);
  background: var(--accent);
  transform: rotate(-5deg) scale(1.04);
}

.habit-copy {
  min-width: 0;
}

.habit-name {
  display: block;
  overflow: hidden;
  color: #f2f5ed;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-meta {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
}

.habit-card.is-checked .habit-meta {
  color: #a8c25c;
}

.check-circle {
  display: grid;
  width: 31px;
  height: 31px;
  margin-left: auto;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #41483b;
  border-radius: 50%;
  color: transparent;
  background: #0d100c;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.check-circle svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.9;
}

.habit-card.is-checked .check-circle {
  border-color: var(--accent);
  color: #0a0c07;
  background: var(--accent);
  transform: scale(1.05);
}

.habit-edit {
  width: 50px;
  flex: 0 0 50px;
  border: 0;
  border-left: 1px solid var(--line);
  color: #697164;
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.habit-edit:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.habit-edit svg {
  width: 17px;
  height: 17px;
}

.empty-state {
  padding: 42px 24px;
  border: 1px dashed #343b2e;
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 16, 0.78);
  text-align: center;
}

.empty-emoji {
  display: block;
  margin-bottom: 12px;
  filter: saturate(0.72);
  font-size: 42px;
}

.empty-state h3 {
  margin: 0;
  color: #f4f7ef;
  font-size: 18px;
}

.empty-state p {
  max-width: 330px;
  margin: 9px auto 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.empty-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: -3px 0 20px;
}

.empty-preview span {
  padding: 5px 9px;
  border: 1px solid #2c3327;
  border-radius: 999px;
  color: #8f9988;
  background: #151914;
  font-size: 10px;
  font-weight: 800;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active {
  transform: scale(0.97);
}

.primary-button {
  border: 0;
  color: #090b06;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(221, 255, 79, 0.12);
}

.primary-button:hover {
  background: var(--accent-bright);
}

.primary-button.compact {
  min-height: 44px;
  padding: 0 17px;
}

.secondary-button.compact {
  min-height: 44px;
  padding: 0 17px;
}

.secondary-button {
  border: 1px solid var(--line);
  color: #dce2d8;
  background: #151914;
}

.danger-button {
  border: 1px solid rgba(255, 112, 95, 0.3);
  color: #ff8b7c;
  background: var(--danger-soft);
}

.history-heading {
  margin-top: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 11px;
}

.stat-card {
  display: flex;
  min-height: 137px;
  flex-direction: column;
  justify-content: center;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #151914, #10130e);
  box-shadow: var(--shadow-small);
}

.stat-card.featured {
  border-color: var(--accent);
  color: #090b06;
  background: var(--accent);
  box-shadow: 0 16px 42px rgba(221, 255, 79, 0.1);
}

.stat-card > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.stat-card.featured > span {
  color: rgba(9, 11, 6, 0.68);
}

.stat-card strong {
  margin: 10px 0 4px;
  color: #f4f7ef;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.stat-card.featured strong {
  color: #090b06;
}

.stat-card strong b {
  font-size: 39px;
}

.stat-card small {
  color: var(--ink-faint);
  font-size: 10px;
}

.stat-card.featured small {
  color: rgba(9, 11, 6, 0.58);
}

.calendar-card,
.day-detail {
  margin-top: 14px;
  padding: 20px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #141813, #0f120d);
  box-shadow: var(--shadow-small);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}

.calendar-header h2 {
  margin: 0;
  color: #f4f7ef;
  font-size: 17px;
  font-weight: 900;
}

.calendar-nav {
  width: 38px;
  height: 38px;
  border-color: var(--line);
  border-radius: 13px;
}

.calendar-nav:disabled {
  color: #3d4438;
  opacity: 0.65;
  cursor: default;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.weekday-row {
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.calendar-grid {
  gap: 5px 3px;
}

.calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1 / 1.05;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #a4aea0;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.calendar-day:active:not(:disabled) {
  transform: scale(0.92);
}

.calendar-day.is-outside {
  opacity: 0.3;
}

.calendar-day.is-today::after {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(221, 255, 79, 0.6);
  content: "";
}

.calendar-day.is-selected {
  border-color: var(--accent);
  color: #090b06;
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(221, 255, 79, 0.12);
}

.calendar-day.is-complete:not(.is-selected) {
  border-color: rgba(221, 255, 79, 0.24);
  color: var(--accent);
  background: rgba(221, 255, 79, 0.09);
}

.calendar-day.is-partial:not(.is-selected) {
  border-color: rgba(221, 255, 79, 0.14);
  color: #c8dd75;
  background: rgba(221, 255, 79, 0.045);
}

.calendar-day.is-missed:not(.is-selected) {
  border-color: rgba(255, 112, 95, 0.15);
  color: #e28577;
  background: rgba(255, 112, 95, 0.055);
}

.calendar-day.is-rest:not(.is-selected) {
  color: #778174;
  background: #181c17;
}

.calendar-day:disabled {
  color: #3b4236;
  background: transparent;
  cursor: default;
  opacity: 0.58;
}

.day-detail {
  padding-top: 23px;
}

.day-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.day-detail-header h2 {
  margin: 4px 0 0;
  color: #f4f7ef;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.day-detail-note {
  margin: 10px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.history-habit {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: inherit;
  background: #141813;
  cursor: pointer;
}

.history-habit-emoji {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #282e24;
  border-radius: 13px;
  background: #1b2118;
  font-size: 20px;
}

.history-habit.is-checked .history-habit-emoji {
  border-color: var(--accent);
  background: var(--accent);
}

.history-habit-name {
  overflow: hidden;
  flex: 1;
  color: #eef2e9;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-habit-check {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 2px solid #41483b;
  border-radius: 50%;
  color: transparent;
  background: #0d100c;
  transition: all 160ms ease;
}

.history-habit.is-checked .history-habit-check {
  border-color: var(--accent);
  color: #090b06;
  background: var(--accent);
}

.history-habit-check svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.9;
}

.day-empty {
  padding: 16px;
  border: 1px solid #23291f;
  border-radius: 16px;
  color: var(--ink-soft);
  background: #141813;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.add-button {
  position: fixed;
  z-index: 40;
  right: max(20px, calc((100vw - 760px) / 2 + 20px));
  bottom: calc(92px + var(--safe-bottom));
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 8px;
  padding: 0 19px 0 16px;
  border: 0;
  border-radius: 17px;
  color: #090b06;
  background: var(--accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42), 0 0 25px rgba(221, 255, 79, 0.09);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 170ms ease, background 170ms ease;
}

.add-button:hover {
  background: var(--accent-bright);
}

.add-button:active {
  transform: scale(0.95);
}

.add-button svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.7;
}

.bottom-nav {
  position: fixed;
  z-index: 35;
  bottom: calc(13px + var(--safe-bottom));
  left: 50%;
  display: grid;
  width: min(calc(100% - 28px), 720px);
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 6px;
  border: 1px solid #252b20;
  border-radius: 22px;
  background: rgba(18, 21, 16, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  color: #778073;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: color 170ms ease, background 170ms ease;
}

.nav-item.is-active {
  color: #090b06;
  background: var(--accent);
  box-shadow: 0 0 26px rgba(221, 255, 79, 0.09);
}

.nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
}

.modules-heading {
  margin-top: 20px;
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #10130e;
}

.module-tab {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: #788173;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.module-tab.is-active {
  color: #090b06;
  background: var(--accent);
}

.module-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(221, 255, 79, 0.09), transparent 12rem),
    linear-gradient(145deg, #151a13, #10130e);
}

.module-intro-mark {
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #090b06;
  background: var(--accent);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.module-intro h2 {
  margin: 0;
  color: #f4f7ef;
  font-size: 17px;
}

.module-intro p {
  margin: 5px 0 0;
  color: #909a8a;
  font-size: 11px;
  line-height: 1.55;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.module-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 172px;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #292f25;
  border-radius: 21px;
  color: inherit;
  background: linear-gradient(145deg, #171b15, #11140f);
  box-shadow: var(--shadow-small);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
}

.module-card.has-image::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: var(--module-image);
  background-position: center;
  background-size: cover;
  filter: saturate(0.65) brightness(0.58);
  content: "";
  transition: transform 450ms ease, filter 220ms ease;
}

.module-card.has-image::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 7, 0.08), rgba(7, 9, 7, 0.93));
  content: "";
}

.module-card:hover.has-image::before {
  filter: saturate(0.9) brightness(0.68);
  transform: scale(1.04);
}

.module-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.module-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #2c3327;
  border-radius: 14px;
  background: #1c2218;
  font-size: 20px;
}

.module-card.has-image .module-card-icon {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 9, 0.68);
  backdrop-filter: blur(9px);
}

.module-badge {
  padding: 5px 7px;
  border: 1px solid rgba(221, 255, 79, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(8, 10, 7, 0.62);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.module-badge.backend {
  border-color: rgba(255, 178, 41, 0.3);
  color: #ffc45c;
}

.module-badge.ready {
  border-color: var(--accent-line);
  color: var(--accent);
}

.module-badge.planned {
  border-color: #343b30;
  color: #8f9988;
}

.module-badge.advanced {
  border-color: rgba(255, 112, 95, 0.3);
  color: #ff9588;
}

.module-badge.manual {
  border-color: rgba(68, 210, 135, 0.35);
  color: #67e4a2;
}

.module-card-title {
  display: block;
  margin: 0;
  color: #f4f7ef;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.module-card-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #8e9887;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.module-card.has-image .module-card-description {
  color: rgba(235, 241, 230, 0.65);
}

.module-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 15px;
  color: #6f786b;
  font-size: 9px;
  font-weight: 750;
}

.module-card-meta span:last-child {
  color: var(--accent);
  font-size: 16px;
}

.commercial-note {
  margin-top: 14px;
  padding: 17px;
  border: 1px solid rgba(255, 178, 41, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(255, 178, 41, 0.07);
}

.commercial-note strong {
  color: #ffc75e;
  font-size: 13px;
}

.commercial-note p {
  margin: 6px 0 0;
  color: #a99772;
  font-size: 11px;
  line-height: 1.6;
}

.advanced-note {
  margin-top: 14px;
  padding: 17px;
  border: 1px solid rgba(255, 112, 95, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(255, 112, 95, 0.07);
}

.advanced-note strong {
  color: #ff9689;
  font-size: 13px;
}

.advanced-note p {
  margin: 6px 0 0;
  color: #a99792;
  font-size: 11px;
  line-height: 1.6;
}

.module-dialog {
  padding: 13px 21px calc(26px + var(--safe-bottom));
}

.module-dialog-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.module-dialog-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #090b06;
  background: var(--accent);
  font-size: 25px;
}

.module-dialog-hero h2 {
  margin: 4px 0 0;
  color: #f4f7ef;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.module-dialog-description {
  margin: 0 0 18px;
  color: #9ba595;
  font-size: 13px;
  line-height: 1.7;
}

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

.module-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #c5cdbf;
  background: #171b15;
  font-size: 12px;
  font-weight: 700;
}

.module-feature::before {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  color: #090b06;
  background: var(--accent);
  content: "✓";
  font-size: 10px;
  font-weight: 950;
}

.module-status-note {
  margin: 17px 0 0;
  padding: 14px;
  border-radius: 15px;
  color: #a8b1a3;
  background: #171b15;
  font-size: 11px;
  line-height: 1.6;
}

.module-dialog-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.payment-dialog {
  padding: 13px 21px calc(25px + var(--safe-bottom));
}

.payment-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.payment-dialog-heading h2 {
  margin: 4px 0 0;
  color: #f4f7ef;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.payment-qr-card {
  width: min(100%, 320px);
  margin: 0 auto;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.payment-qr-card img {
  display: block;
  width: 100%;
  height: auto;
}

.payment-rules {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 9px 10px;
  align-items: start;
  margin-top: 19px;
}

.payment-rules span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 9px;
  color: #090b06;
  background: var(--accent);
  font-size: 10px;
  font-weight: 950;
}

.payment-rules p {
  margin: 2px 0 0;
  color: #a1ab9b;
  font-size: 11px;
  line-height: 1.55;
}

.payment-warning {
  margin: 17px 0 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 178, 41, 0.24);
  border-radius: 15px;
  color: #c3a46f;
  background: rgba(255, 178, 41, 0.07);
  font-size: 10px;
  line-height: 1.55;
}

.payment-close-button {
  width: 100%;
  margin-top: 14px;
}

.sheet-dialog {
  width: min(calc(100% - 20px), 560px);
  max-height: min(90vh, 760px);
  margin: auto auto 0;
  padding: 0;
  overflow: auto;
  border: 1px solid #252b20;
  border-radius: 30px 30px 0 0;
  color: var(--ink);
  background: #11140f;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.55);
  overscroll-behavior: contain;
}

.sheet-dialog[open] {
  animation: sheet-in 260ms cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

.sheet-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
}

#habitForm,
.settings-dialog {
  padding: 13px 21px calc(24px + var(--safe-bottom));
}

.dialog-handle {
  width: 38px;
  height: 5px;
  margin: 0 auto 17px;
  border-radius: 999px;
  background: #343b2e;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.dialog-heading h2 {
  margin: 4px 0 0;
  color: #f4f7ef;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.dialog-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 13px;
  font-size: 24px;
}

.field-label {
  display: block;
  margin: 0 0 9px 3px;
  color: #c6cec1;
  font-size: 12px;
  font-weight: 850;
}

.text-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #2a3125;
  border-radius: 17px;
  color: #f5f8f2;
  background: #181c16;
  font-size: 16px;
  font-weight: 750;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-input::placeholder {
  color: #596154;
  font-weight: 500;
}

.text-input:focus {
  border-color: rgba(221, 255, 79, 0.58);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(221, 255, 79, 0.08);
}

.field-meta {
  display: flex;
  min-height: 25px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 5px 3px 0;
}

.field-error {
  color: var(--danger);
  font-size: 11px;
  font-weight: 750;
}

.character-count {
  color: var(--ink-faint);
  font-size: 10px;
}

.form-fieldset {
  min-width: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.quick-preset-fieldset {
  margin-top: 19px;
}

.quick-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-preset {
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid #2b3226;
  border-radius: 999px;
  color: #b6c0b1;
  background: #171b15;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.quick-preset:hover,
.quick-preset.is-selected {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.quick-preset:active {
  transform: scale(0.96);
}

.quick-plan-button {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.quick-plan-button span {
  color: #8fa642;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.emoji-option {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #2a3026;
  border-radius: 15px;
  background: #181c16;
  font-size: 21px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.emoji-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(221, 255, 79, 0.08);
  transform: scale(1.04);
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.weekday-option {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #2a3026;
  border-radius: 14px;
  color: #9da796;
  background: #181c16;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.weekday-option.is-selected {
  border-color: var(--accent);
  color: #090b06;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(221, 255, 79, 0.08);
}

.field-help {
  margin: 10px 2px 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
}

.action-spacer {
  flex: 1;
}

.settings-note {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--accent-line);
  border-radius: 19px;
  background: var(--accent-soft);
}

.settings-note-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #090b06;
  background: var(--accent);
  font-size: 19px;
  font-weight: 950;
}

.settings-note strong {
  color: #edf2e9;
  font-size: 13px;
}

.settings-note p {
  margin: 5px 0 0;
  color: #98a290;
  font-size: 11px;
  line-height: 1.6;
}

.backend-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #151914;
}

.backend-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #777f72;
}

.backend-status.is-online .backend-status-dot {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(221, 255, 79, 0.55);
}

.backend-status.is-offline .backend-status-dot {
  background: var(--danger);
}

.backend-status strong {
  color: #e8ede4;
  font-size: 12px;
}

.backend-status p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.settings-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.settings-action-button {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  background: #181c16;
  text-align: left;
  cursor: pointer;
}

.settings-action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #090b06;
  background: var(--accent);
  font-size: 20px;
  font-weight: 950;
}

.settings-action-button span:last-child {
  display: grid;
  gap: 3px;
}

.settings-action-button strong {
  color: #eef2e9;
  font-size: 14px;
}

.settings-action-button small {
  color: var(--ink-faint);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(174px + var(--safe-bottom));
  max-width: min(calc(100% - 36px), 410px);
  padding: 12px 16px;
  border: 1px solid #30372a;
  border-radius: 14px;
  color: #f3f6ef;
  background: rgba(23, 27, 20, 0.98);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast.is-error {
  border-color: rgba(255, 112, 95, 0.4);
  color: #ffd5cf;
  background: rgba(83, 30, 24, 0.98);
}

.confetti-layer {
  position: fixed;
  z-index: 70;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: 18%;
  width: 9px;
  height: 15px;
  border-radius: 3px;
  animation: confetti-fall 1300ms cubic-bezier(0.15, 0.62, 0.36, 1) both;
}

@keyframes confetti-fall {
  from {
    transform: translate3d(0, -30px, 0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift), 70vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

.view[hidden] {
  display: none;
}

@media (min-width: 680px) {
  .app-shell {
    padding-right: 26px;
    padding-left: 26px;
  }

  .app-header {
    min-height: 94px;
  }

  .hero-card {
    min-height: 245px;
    padding: 38px;
  }

  .progress-ring {
    width: 126px;
    height: 126px;
  }

  .progress-ring::before {
    width: 100px;
    height: 100px;
  }

  .sheet-dialog {
    margin: auto;
    border-radius: 30px;
  }

  #habitForm,
  .settings-dialog {
    padding-bottom: 27px;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .hero-card {
    gap: 10px;
    min-height: 210px;
    padding: 26px 20px;
  }

  .hero-copy h1 {
    font-size: 25px;
  }

  .progress-ring {
    width: 91px;
    height: 91px;
  }

  .progress-ring::before {
    width: 71px;
    height: 71px;
  }

  .progress-ring-inner strong {
    font-size: 25px;
  }

  .habit-check-area {
    gap: 11px;
    padding-left: 13px;
  }

  .habit-emoji {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 22px;
  }

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

  .dialog-actions {
    gap: 6px;
  }

  .empty-actions {
    flex-direction: column-reverse;
  }

  .danger-button,
  .secondary-button,
  .primary-button {
    padding-right: 15px;
    padding-left: 15px;
  }
}

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