:root {
  color-scheme: dark;
  --bg: #05080d;
  --panel: rgba(8, 20, 32, 0.86);
  --panel-strong: rgba(12, 29, 45, 0.96);
  --line: rgba(125, 234, 255, 0.18);
  --line-strong: rgba(125, 234, 255, 0.42);
  --text: #e8f7ff;
  --muted: #8ba8b8;
  --cyan: #39d9ff;
  --cyan-dark: #0b6f8f;
  --magenta: #ff3d91;
  --danger: #ff5a6f;
  --neon-red: #ff174f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius: 8px;
  --mobile-space: 12px;
  --mobile-panel-padding: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(57, 217, 255, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(255, 61, 145, 0.09), transparent 26%),
    var(--bg);
  color: var(--text);
}

.is-negative {
  color: var(--neon-red) !important;
  text-shadow:
    0 0 8px rgba(255, 23, 79, 0.78),
    0 0 18px rgba(255, 23, 79, 0.42);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
}

body.is-native-app .app-shell {
  min-height: 100svh;
}

body.is-native-app {
  min-height: 100svh;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(2, 9, 16, 0.28), rgba(2, 9, 16, 0.82)),
    url("assets/cyber-bg.svg") center / cover no-repeat;
}

.grid-haze,
.signal-lines {
  position: absolute;
  inset: 0;
}

.grid-haze {
  background: radial-gradient(circle at 62% 42%, rgba(57, 217, 255, 0.38), transparent 28%);
}

.signal-lines {
  background-image:
    linear-gradient(rgba(57, 217, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 217, 255, 0.1) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, black 28%, black 72%, transparent);
}

.auth-panel {
  align-self: center;
  width: min(460px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-user-overview,
.auth-user-manager {
  margin-top: 18px;
  width: 100%;
}

.auth-user-list {
  display: grid;
  gap: 10px;
}

.auth-user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 7, 14, 0.58);
}

.auth-user-item > div {
  min-width: 0;
}

.auth-user-preview {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  padding: 11px 13px;
}

.auth-user-item strong,
.auth-user-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.auth-user-item small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
  white-space: normal;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.auth-panel h1,
.content-header h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
}

.lead {
  margin-bottom: 28px;
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.field-block {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.field-block > label {
  margin-bottom: 0;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 7, 14, 0.68);
  color: var(--text);
  outline: none;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

textarea {
  min-height: 280px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(57, 217, 255, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled {
  border-color: rgba(139, 168, 184, 0.26);
  background:
    linear-gradient(135deg, rgba(139, 168, 184, 0.08), rgba(0, 7, 14, 0.72)),
    rgba(8, 14, 21, 0.86);
  color: rgba(232, 247, 255, 0.68);
  cursor: not-allowed;
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(139, 168, 184, 0.06);
}

textarea:disabled {
  resize: none;
}

label:has(input:disabled),
label:has(select:disabled),
.field-block:has(textarea:disabled) > label {
  color: rgba(139, 168, 184, 0.9);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  touch-action: none;
}

.password-toggle::before {
  content: "";
  width: 17px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 999px / 720px;
}

.password-toggle::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-active {
  border-color: var(--line);
  background: rgba(57, 217, 255, 0.08);
  color: var(--cyan);
}

.auth-actions,
.editor-actions,
.sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.danger-button,
.biometric-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.primary-button {
  background: linear-gradient(135deg, var(--cyan), #8cecff);
  color: #03101a;
}

.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

#enable-biometric-button.is-active {
  border-color: rgba(53, 255, 157, 0.58);
  background:
    linear-gradient(135deg, rgba(53, 255, 157, 0.24), rgba(57, 217, 255, 0.1)),
    rgba(53, 255, 157, 0.08);
  color: #dfffee;
  box-shadow:
    0 0 0 1px rgba(53, 255, 157, 0.1),
    0 0 18px rgba(53, 255, 157, 0.16);
}

.danger-button {
  border-color: rgba(255, 90, 111, 0.38);
  background: rgba(255, 90, 111, 0.12);
  color: #ffdce1;
}

.danger-ghost-button {
  border-color: rgba(255, 90, 111, 0.38);
  color: #ffdce1;
}

.biometric-button {
  width: 100%;
  margin-top: 14px;
  border-color: rgba(255, 61, 145, 0.36);
  background: rgba(255, 61, 145, 0.12);
  color: #ffd8e8;
}

.biometric-button.is-active {
  border-color: rgba(53, 255, 157, 0.58);
  background:
    linear-gradient(135deg, rgba(53, 255, 157, 0.24), rgba(57, 217, 255, 0.1)),
    rgba(53, 255, 157, 0.08);
  color: #dfffee;
  box-shadow:
    0 0 0 1px rgba(53, 255, 157, 0.1),
    0 0 18px rgba(53, 255, 157, 0.16);
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  white-space: pre-line;
}

.main-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 24px;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  padding: 24px;
  background: rgba(3, 10, 17, 0.82);
}

.sidebar h2 {
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.module-nav {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: 14px;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent 0, black 38px, black calc(100% - 38px), transparent 100%);
}

.module-nav.is-at-start {
  mask-image: linear-gradient(to bottom, black 0, black calc(100% - 38px), transparent 100%);
}

.module-nav.is-at-end {
  mask-image: linear-gradient(to bottom, transparent 0, black 38px, black 100%);
}

.module-nav.is-at-start.is-at-end {
  mask-image: none;
}

.module-nav::-webkit-scrollbar {
  display: none;
}

.module-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
}

.module-button.active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(57, 217, 255, 0.18), rgba(255, 61, 145, 0.08));
}

.module-button.has-active-notification,
.home-module-button.has-active-notification {
  border-color: rgba(57, 217, 255, 0.92);
  animation: active-notification-tile-pulse 1.15s ease-in-out infinite;
}

.module-button span {
  font-weight: 800;
}

.module-button small {
  color: var(--muted);
}

.sidebar-actions {
  display: grid;
  margin-top: auto;
}

.content {
  position: relative;
  min-width: 0;
  padding: 28px;
}

.active-notification-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(57, 217, 255, 0.34);
  border-radius: 8px;
  background: rgba(2, 16, 27, 0.82);
  box-shadow: 0 0 22px rgba(57, 217, 255, 0.14);
}

.active-notification-panel[hidden] {
  display: none;
}

.active-notification-panel.is-clickable {
  cursor: pointer;
}

.active-notification-panel strong,
.active-notification-panel span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.active-notification-panel strong {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 1rem;
}

.active-notification-panel span {
  color: var(--muted);
}

.active-notification-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-notification-panel:not(.is-check-warning) #snooze-active-notification {
  display: none;
}

.app-option-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.app-option-field span {
  display: grid;
  grid-template-columns: minmax(74px, 110px) auto;
  align-items: center;
  gap: 10px;
}

.tool-button.mobile-home-button {
  display: none;
}

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

.content-header > div {
  min-width: 0;
}

.module-view {
  min-width: 0;
  overflow-x: clip;
}

.welcome-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: calc(100vh - 112px);
  width: min(100%, 920px);
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.welcome-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
}

.welcome-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  min-width: 0;
  overflow-wrap: anywhere;
}

.welcome-hero img {
  width: clamp(84px, 12vw, 148px);
  max-width: 32%;
  height: auto;
  flex: 0 1 148px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(57, 217, 255, 0.28));
}

.welcome-panel p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

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

.home-module-button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.home-module-button:hover,
.home-module-button:focus-visible {
  border-color: var(--line-strong);
  background: rgba(57, 217, 255, 0.1);
}

@keyframes active-notification-tile-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(57, 217, 255, 0),
      inset 0 0 0 1px rgba(57, 217, 255, 0.18);
  }

  50% {
    box-shadow:
      0 0 0 3px rgba(57, 217, 255, 0.22),
      0 0 24px rgba(57, 217, 255, 0.24),
      0 0 42px rgba(77, 124, 255, 0.14),
      inset 0 0 0 1px rgba(57, 217, 255, 0.72);
  }
}

.home-module-button span {
  font-size: 1.05rem;
  font-weight: 850;
}

.home-module-button small {
  color: var(--muted);
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px);
  gap: 14px;
  margin-bottom: 18px;
}

.notes-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 380px) minmax(0, 1fr);
  gap: 18px;
  min-height: 62vh;
}

.notes-list,
.note-editor,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notes-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: calc(100vh - 188px);
  overflow: auto;
  padding: 10px;
}

.note-item {
  display: grid;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.note-item.active,
.note-item:hover {
  border-color: var(--line-strong);
  background: rgba(57, 217, 255, 0.1);
}

.note-item strong {
  overflow-wrap: anywhere;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.category-pill {
  border: 1px solid rgba(255, 61, 145, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  color: #ffc3de;
}

.note-editor {
  padding: 18px;
}

.editor-body {
  min-height: 320px;
}

.empty-state {
  display: grid;
  place-content: center;
  min-height: 420px;
  padding: 28px;
  text-align: center;
}

.empty-state p {
  color: var(--muted);
}

.month-picker {
  width: min(240px, 100%);
  margin: 0;
}

.month-stepper {
  display: flex;
  align-items: end;
  gap: 8px;
}

.finance-header-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.finance-save-button {
  min-width: 128px;
  white-space: nowrap;
}

.finance-save-button:disabled {
  opacity: 0.62;
}

.finance-save-button.is-dirty {
  animation: finance-save-pulse 1.1s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(255, 244, 92, 0.7),
    0 0 18px rgba(255, 244, 92, 0.42);
}

.income-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.finance-inline-save-button {
  min-width: 118px;
  min-height: 44px;
  white-space: nowrap;
}

.finance-inline-save-button.is-dirty {
  animation: finance-save-pulse 1.1s ease-in-out infinite;
  border-color: rgba(255, 244, 92, 0.72);
  color: #fff45c;
  box-shadow: 0 0 16px rgba(255, 244, 92, 0.34);
}

@keyframes finance-save-pulse {
  0%,
  100% {
    filter: brightness(1);
    transform: translateY(0);
  }

  50% {
    filter: brightness(1.2);
    transform: translateY(-1px);
  }
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#finance-summary.is-border-effect .metric-card {
  border-color: rgba(57, 217, 255, 0.32);
  box-shadow:
    var(--shadow),
    0 0 22px rgba(57, 217, 255, 0.13);
}

#finance-summary.is-border-effect .metric-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--finance-card-angle, 0deg),
    rgba(92, 196, 255, 0.95) 0deg,
    rgba(184, 244, 255, 0.96) 72deg,
    rgba(255, 255, 255, 0.98) 144deg,
    rgba(151, 236, 255, 0.96) 216deg,
    rgba(57, 217, 255, 0.95) 288deg,
    rgba(92, 196, 255, 0.95) 360deg
  );
  opacity: 0.96;
  pointer-events: none;
  animation: finance-card-border-spin 5.5s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

#finance-summary.is-border-effect .metric-card::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0, rgba(57, 217, 255, 0.2), transparent 58%);
  opacity: 0.55;
  filter: blur(10px);
  pointer-events: none;
}

@property --finance-card-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes finance-card-border-spin {
  to {
    --finance-card-angle: 360deg;
  }
}

.metric-card,
.data-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 104px;
  min-width: 0;
  padding: 18px;
  overflow: visible;
}

.metric-card > * {
  position: relative;
  z-index: 1;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.metric-card strong {
  min-width: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-card.highlight {
  border-color: rgba(57, 217, 255, 0.42);
  background: linear-gradient(135deg, rgba(57, 217, 255, 0.15), rgba(255, 61, 145, 0.08));
}

.finance-stat-card {
  cursor: pointer;
  user-select: none;
}

.finance-stat-card:hover,
.finance-stat-card:focus-visible {
  border-color: var(--line-strong);
  box-shadow:
    var(--shadow),
    0 0 18px rgba(57, 217, 255, 0.18);
}

.savings-account-card,
.savings-total-card {
  cursor: pointer;
}

.savings-account-card {
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 34%, transparent);
}

.savings-colored-entry {
  position: relative;
  overflow: visible;
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 58%, transparent);
  background: rgba(255, 255, 255, 0.025);
  box-shadow:
    0 0 14px color-mix(in srgb, var(--item-color, var(--cyan)) 26%, transparent),
    0 0 30px color-mix(in srgb, var(--item-color, var(--cyan)) 14%, transparent);
}

.savings-colored-entry::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 5px;
  border-radius: inherit;
  background: var(--item-color, var(--cyan));
  box-shadow: 0 0 18px var(--item-color, var(--cyan));
}

.savings-account-card.savings-colored-entry::after,
.savings-total-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background:
    conic-gradient(
      from var(--trail-angle, 0deg),
      transparent 0deg 226deg,
      color-mix(in srgb, var(--item-color, var(--cyan)) 22%, transparent) 244deg,
      color-mix(in srgb, var(--item-color, var(--cyan)) 72%, transparent) 262deg,
      rgba(255, 255, 255, 0.96) 282deg,
      var(--item-color, var(--cyan)) 300deg,
      color-mix(in srgb, var(--item-color, var(--cyan)) 48%, transparent) 322deg,
      transparent 342deg 360deg
    );
  box-shadow:
    0 0 12px color-mix(in srgb, var(--item-color, var(--cyan)) 46%, transparent),
    0 0 24px color-mix(in srgb, var(--item-color, var(--cyan)) 28%, transparent);
  opacity: 0.92;
  pointer-events: none;
  animation: savings-light-trail 11s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.savings-total-card::after {
  --item-color: var(--cyan);
  animation-duration: 12.5s;
}

.savings-account-card.savings-colored-entry:nth-of-type(3n + 1)::after {
  animation-duration: 10.2s;
  animation-delay: -2.4s;
}

.savings-account-card.savings-colored-entry:nth-of-type(3n + 2)::after {
  animation-duration: 12.8s;
  animation-delay: -5.1s;
}

.savings-account-card.savings-colored-entry:nth-of-type(3n)::after {
  animation-duration: 14.4s;
  animation-delay: -7.6s;
}

@property --trail-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes savings-light-trail {
  to {
    --trail-angle: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .savings-account-card.savings-colored-entry::after,
  .savings-total-card::after,
  .savings-account-card.savings-colored-entry.is-active {
    animation: none;
  }
}

.savings-colored-entry strong,
.savings-colored-entry .entry-title strong {
  color: color-mix(in srgb, var(--item-color, var(--cyan)) 82%, white 18%);
  text-shadow: 0 0 12px color-mix(in srgb, var(--item-color, var(--cyan)) 50%, transparent);
}

.savings-colored-entry.is-active,
.savings-colored-entry:hover,
.savings-colored-entry:focus-visible {
  border-color: var(--item-color, var(--cyan));
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 20px color-mix(in srgb, var(--item-color, var(--cyan)) 34%, transparent),
    0 0 42px color-mix(in srgb, var(--item-color, var(--cyan)) 20%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--item-color, var(--cyan)) 36%, transparent);
}

.savings-total-card {
  border-color: rgba(57, 217, 255, 0.42);
  background: linear-gradient(135deg, rgba(57, 217, 255, 0.15), rgba(255, 61, 145, 0.08));
  cursor: default;
}

.savings-account-card.savings-colored-entry:hover,
.savings-account-card.savings-colored-entry:focus-visible,
.savings-account-card.savings-colored-entry.is-active {
  border-color: var(--item-color, var(--cyan));
  background:
    radial-gradient(circle at 24% 36%, color-mix(in srgb, var(--item-color, var(--cyan)) 8%, transparent) 0 16%, transparent 42%),
    radial-gradient(circle at 74% 68%, color-mix(in srgb, var(--item-color, var(--cyan)) 6%, transparent) 0 14%, transparent 40%),
    rgba(255, 255, 255, 0.03);
  background-size: 180% 180%, 160% 160%, auto;
  box-shadow:
    0 0 20px color-mix(in srgb, var(--item-color, var(--cyan)) 34%, transparent),
    0 0 42px color-mix(in srgb, var(--item-color, var(--cyan)) 20%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--item-color, var(--cyan)) 36%, transparent);
}

.savings-account-card.savings-colored-entry.is-active {
  animation: savings-active-fog 9s ease-in-out infinite alternate;
}

@keyframes savings-active-fog {
  0% {
    background-position: 0% 42%, 100% 58%, 0 0;
  }

  50% {
    background-position: 64% 28%, 28% 84%, 0 0;
  }

  100% {
    background-position: 100% 62%, 0% 34%, 0 0;
  }
}

.savings-account-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.savings-active-account-title {
  color: color-mix(in srgb, var(--item-color, var(--cyan)) 82%, white 18%);
  text-shadow: 0 0 12px color-mix(in srgb, var(--item-color, var(--cyan)) 50%, transparent);
}

.savings-transaction-list {
  margin-top: 16px;
}

.is-disabled-panel {
  opacity: 0.72;
}

.finance-grid,
.fixed-layout,
.savings-grid,
.lets-layout,
.reminder-layout,
.check-layout,
.project-layout,
.finance-options {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.lets-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

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

.reminder-layout {
  align-items: start;
}

.reminder-past-heading {
  margin-top: 24px;
}

.reminder-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.reminder-item.is-past {
  opacity: 0.78;
}

.reminder-note-preview {
  margin-top: 4px;
  line-height: 1.35;
}

.voice-note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: start;
}

.note-content-stack {
  min-width: 0;
}

.note-side-tools {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.note-checklist-button {
  width: 48px;
  height: 48px;
  font-size: 1.15rem;
}

.note-checklist-preview {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: stretch;
  grid-auto-rows: min-content;
  min-height: 225px;
  padding: 12px;
  border: 1px solid rgba(57, 217, 255, 0.34);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.note-checklist-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
  line-height: 1.4;
  min-height: 24px;
}

.note-checklist-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--cyan);
}

.note-checklist-row span {
  overflow-wrap: anywhere;
  min-height: 24px;
  padding: 0;
  outline: none;
  display: flex;
  align-items: center;
  line-height: 1.35;
}

.note-checklist-row span:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(57, 217, 255, 0.24);
}

.note-checklist-row input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.voice-record-button {
  --rec-font-size: 0.72rem;
  --rec-shadow-offset: 1px;
  --voice-level: 0;
  --voice-ring: 0px;
  --voice-inner-ring: 0px;
  --voice-scale: 1;
  --voice-glow: 0.24;
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 5px solid #f8f8f8;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 54%, rgba(160, 0, 0, 0.42) 0 36%, transparent 37%),
    linear-gradient(135deg, #ff1b1b 0%, #e00000 48%, #bd0000 100%);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.34),
    0 0 18px rgba(255, 23, 79, 0.24),
    inset 0 7px 10px rgba(255, 255, 255, 0.18),
    inset 0 -10px 16px rgba(110, 0, 0, 0.28);
  touch-action: none;
}

.voice-record-button::before {
  content: "REC";
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-size: var(--rec-font-size);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    var(--rec-shadow-offset) var(--rec-shadow-offset) 0 rgba(92, 0, 0, 0.72),
    0 0 5px rgba(255, 255, 255, 0.28);
}

.voice-record-button::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 7px;
  border: 0;
  border-radius: 50%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 42%, rgba(95, 0, 0, 0.16)),
    radial-gradient(circle at 50% 52%, rgba(120, 0, 0, 0.24) 0 42%, transparent 43%);
  pointer-events: none;
  transform: scale(1);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.voice-record-button:hover,
.voice-record-button:focus-visible {
  border-color: #ff8fbd;
  box-shadow: 0 0 0 3px rgba(255, 61, 145, 0.12);
}

.voice-record-button.is-recording {
  border-color: #ffffff;
  background:
    radial-gradient(circle at 50% 54%, rgba(150, 0, 0, 0.52) 0 38%, transparent 39%),
    linear-gradient(135deg, #ff2929 0%, #f00000 48%, #c00000 100%);
  color: #ffffff;
  box-shadow:
    0 0 0 var(--voice-ring) rgba(255, 255, 255, 0.16),
    0 0 0 4px rgba(255, 23, 79, 0.12),
    0 0 28px rgba(255, 23, 79, var(--voice-glow)),
    inset 0 7px 10px rgba(255, 255, 255, 0.2),
    inset 0 -10px 16px rgba(110, 0, 0, 0.32);
}

.voice-record-button.is-recording::after {
  transform: scale(var(--voice-scale));
  box-shadow:
    0 0 0 var(--voice-inner-ring) rgba(255, 255, 255, 0.16),
    0 0 22px rgba(255, 255, 255, 0.18),
    inset 0 0 18px rgba(255, 255, 255, 0.14);
}

.voice-record-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@keyframes rec-border-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.36),
      0 0 0 4px rgba(255, 23, 79, 0.14),
      0 0 34px rgba(255, 23, 79, 0.42),
      inset 0 18px 28px rgba(255, 255, 255, 0.18),
      inset 0 -24px 34px rgba(100, 0, 0, 0.3);
  }

  50% {
    box-shadow:
      0 0 0 8px rgba(255, 255, 255, 0.42),
      0 0 0 16px rgba(255, 23, 79, 0.2),
      0 0 46px rgba(255, 23, 79, 0.72),
      inset 0 18px 28px rgba(255, 255, 255, 0.22),
      inset 0 -24px 34px rgba(100, 0, 0, 0.34);
  }
}

.speech-layout {
  display: grid;
  gap: 16px;
}

.speech-capture-panel {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 180px;
  text-align: center;
}

.speech-record-main {
  --rec-font-size: clamp(2.1rem, 10vw, 3.75rem);
  --rec-shadow-offset: 3px;
  width: min(210px, 64vw);
  height: min(210px, 64vw);
  min-width: 148px;
  min-height: 148px;
  border: clamp(8px, 2.5vw, 14px) solid #ffffff;
  background:
    radial-gradient(circle at 50% 50%, rgba(95, 0, 0, 0.34) 0 43%, transparent 44%),
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(145deg, #ff3a3a 0%, #e90000 52%, #a90000 100%);
  color: #fff5f7;
  padding: 0;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.36),
    0 0 34px rgba(255, 23, 79, 0.28),
    inset 0 14px 22px rgba(255, 255, 255, 0.16),
    inset 0 -22px 30px rgba(80, 0, 0, 0.3);
}

.speech-record-main::before {
  display: grid;
  place-items: center;
  min-width: 62%;
  min-height: 34%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  z-index: 1;
  transform: translateY(-4px);
  text-shadow:
    var(--rec-shadow-offset) var(--rec-shadow-offset) 0 rgba(92, 0, 0, 0.62),
    0 0 10px rgba(255, 255, 255, 0.34);
}

.speech-record-main::after {
  inset: clamp(16px, 5vw, 30px);
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 44%, rgba(95, 0, 0, 0.14));
}

.speech-record-main.is-recording {
  animation: rec-border-pulse 1s ease-in-out infinite;
  border-color: #ffffff;
}

.speech-record-main span {
  position: absolute;
  bottom: 32px;
  z-index: 2;
  display: block;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(5, 8, 13, 0.36);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 100%;
  text-align: center;
}

.speech-transfer-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 12px;
}

.lets-job-status-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(57, 217, 255, 0.42);
  border-radius: var(--radius);
  margin: -8px 0 6px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(57, 217, 255, 0.14), rgba(255, 61, 145, 0.08));
  color: var(--text);
  text-align: left;
}

.lets-job-status-bar span,
.lets-job-status-bar small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.lets-job-status-bar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#speech-note-list .entry-inline-actions,
#open-reminder-list .entry-inline-actions,
#past-reminder-list .entry-inline-actions {
  justify-content: flex-end;
  justify-self: end;
  width: auto;
}

#speech-note-list .entry-inline-actions button,
#open-reminder-list .entry-inline-actions button,
#past-reminder-list .entry-inline-actions button {
  flex: 0 0 auto;
}

.app-option-checkbox {
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.app-version-card {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(57, 217, 255, 0.07);
}

.app-version-card strong {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.app-version-card small {
  color: var(--muted);
  font-weight: 750;
}

.task-panel {
  max-width: 760px;
}

.task-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-header-actions .ghost-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.task-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  max-width: 520px;
}

.task-list-toolbar label {
  min-width: 0;
  max-width: none;
  margin-bottom: 0;
}

.task-list-toolbar .tool-button {
  width: 44px;
  height: 44px;
}

.task-summary {
  justify-self: end;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(57, 217, 255, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-history-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.task-history-tabs {
  margin-bottom: 12px;
}

.task-history-stats {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.task-history-stats[hidden] {
  display: none;
}

.task-history-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid rgba(139, 168, 184, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.task-history-stat-row.is-top-day {
  border-color: rgba(255, 205, 86, 0.48);
  background: rgba(255, 205, 86, 0.08);
}

.task-history-stat-count {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  border: 1px solid rgba(57, 217, 255, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 1rem;
  font-weight: 900;
}

.task-history-stat-star {
  color: #ffcd56;
  font-size: 1.15rem;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 205, 86, 0.42);
}

.simple-task-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(139, 168, 184, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 240ms ease,
    transform 260ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.simple-task-item.is-draggable {
  grid-template-columns: 26px 26px minmax(0, 1fr) 26px auto;
}

.simple-task-item.is-dragging {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  cursor: grabbing;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 24px rgba(57, 217, 255, 0.18);
  transform: scale(1.015);
  transition: none;
}

.simple-task-item.is-drag-animating,
.simple-task-drag-placeholder.is-drag-animating {
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.simple-task-drag-placeholder {
  border: 1px dashed rgba(57, 217, 255, 0.46);
  border-radius: 8px;
  background: rgba(57, 217, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(57, 217, 255, 0.08);
}

body.is-simple-task-dragging {
  cursor: grabbing;
}

.simple-task-item.is-priority:not(.is-completed) {
  border-color: rgba(255, 205, 86, 0.42);
  background: rgba(255, 205, 86, 0.08);
}

.simple-task-item.is-completed {
  border-color: rgba(139, 168, 184, 0.16);
  background: rgba(139, 168, 184, 0.06);
}

.simple-task-item.is-completing {
  pointer-events: none;
  opacity: 0;
  transform: translateY(34px) scale(0.985);
}

.simple-task-drag-handle {
  display: grid;
  place-items: center;
  width: 26px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  touch-action: none;
}

.simple-task-drag-handle:active {
  cursor: grabbing;
}

.simple-task-drag-handle:focus-visible {
  outline: 2px solid rgba(57, 217, 255, 0.72);
  outline-offset: 2px;
}

.simple-task-drag-handle:disabled {
  cursor: default;
  opacity: 0.28;
}

.simple-task-checkbox {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(57, 217, 255, 0.48);
  border-radius: 5px;
  padding: 0;
  background: rgba(2, 8, 14, 0.86);
  color: var(--green);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
}

.simple-task-checkbox[disabled] {
  opacity: 0.85;
}

.simple-task-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.simple-task-text strong {
  overflow-wrap: anywhere;
}

.simple-task-text small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.simple-task-item.is-completed .simple-task-text strong {
  color: var(--muted);
  text-decoration: line-through;
}

.simple-task-star,
.task-star {
  color: #ffcd56;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 205, 86, 0.42);
}

.simple-task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.simple-task-actions:empty {
  display: none;
}

.simple-task-move-button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 0.95rem;
}

.simple-task-move-button:disabled {
  opacity: 0.35;
}

.task-editor-form {
  display: grid;
  gap: 12px;
}

.task-priority-row {
  justify-content: flex-start;
  gap: 10px;
}

.goal-panel {
  max-width: 980px;
}

.goal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.goal-header-actions .ghost-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.goal-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(160px, 220px);
  align-items: end;
  gap: 12px;
  max-width: 980px;
}

.goal-toolbar label {
  min-width: 0;
  margin-bottom: 0;
}

.goal-status-radio {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-height: 44px;
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  border: 1px solid rgba(139, 168, 184, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.radio-pill:has(input:checked) {
  border-color: rgba(57, 217, 255, 0.58);
  background: rgba(57, 217, 255, 0.12);
  color: var(--text);
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.14);
}

.radio-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

.goal-item-list {
  display: grid;
  gap: 12px;
}

.goal-item-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(139, 168, 184, 0.22);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.022)),
    rgba(2, 8, 14, 0.66);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.goal-item-card:hover,
.goal-item-card:focus-within {
  border-color: rgba(57, 217, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(57, 217, 255, 0.08), rgba(255, 255, 255, 0.026)),
    rgba(2, 8, 14, 0.72);
  transform: translateY(-1px);
}

.goal-item-card:not(:has(.goal-item-image)) {
  grid-template-columns: minmax(0, 1fr);
}

.goal-item-card.is-completed {
  border-color: rgba(53, 255, 157, 0.24);
  background: rgba(53, 255, 157, 0.055);
}

.goal-item-image {
  width: 128px;
  height: 128px;
  border: 1px solid rgba(57, 217, 255, 0.24);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.9);
  object-fit: cover;
}

.goal-item-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.goal-item-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.goal-item-title-row .entry-title {
  min-width: 0;
}

.goal-item-title-row .entry-title strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.goal-item-title-row .entry-title small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.goal-item-card.is-completed .entry-title strong {
  color: var(--muted);
  text-decoration: line-through;
}

.goal-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.goal-progress {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.goal-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.goal-progress strong,
.goal-progress small {
  font-size: 0.8rem;
  font-weight: 850;
}

.goal-progress small {
  color: var(--muted);
  text-align: right;
}

.goal-progress span {
  display: block;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 7, 14, 0.72);
}

.goal-progress i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #35ff9d);
  box-shadow: 0 0 16px rgba(53, 255, 157, 0.28);
}

.goal-progress-success span {
  border-color: rgba(255, 205, 86, 0.34);
}

.goal-progress-success i {
  background: linear-gradient(90deg, #ffcd56, #35ff9d);
}

.goal-item-link {
  max-width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid rgba(57, 217, 255, 0.26);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-item-modal {
  width: min(760px, 100%);
}

.goal-item-form {
  display: grid;
  gap: 14px;
}

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

.goal-item-form-grid label {
  min-width: 0;
}

.goal-image-picker {
  display: grid;
  gap: 8px;
}

.goal-image-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.goal-image-actions small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.goal-image-preview-frame {
  width: min(100%, 420px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(57, 217, 255, 0.26);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.88);
}

.goal-image-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goal-item-form label.is-disabled {
  opacity: 0.58;
}

.get-it-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.get-it-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.get-it-form,
.get-it-suggestions,
.get-it-list-panel {
  min-width: 0;
}

.get-it-open-panel {
  order: 1;
}

.get-it-done-panel {
  order: 2;
}

.get-it-suggestions {
  order: 3;
}

.get-it-form {
  order: 4;
}

.get-it-list-panel {
  grid-column: 1 / -1;
}

.get-it-done-panel .panel-heading .ghost-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.get-it-form-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr);
  gap: 12px;
}

.get-it-search-field {
  margin-bottom: 12px;
}

.get-it-save-suggestion-row {
  flex: 1 1 220px;
  justify-content: flex-start;
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.get-it-save-suggestion-row input {
  width: 16px;
  min-height: 16px;
}

.get-it-suggestions .panel-heading .ghost-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.get-it-form-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.get-it-form-title-row h2 {
  margin-bottom: 0;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.get-it-selected-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(57, 217, 255, 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 34%),
    rgba(57, 217, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(57, 217, 255, 0.12);
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.get-it-selected-icon:hover,
.get-it-selected-icon:focus-visible {
  border-color: rgba(57, 217, 255, 0.72);
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.2);
}

.get-it-icon-filter-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.get-it-icon-filter-row label {
  margin-bottom: 0;
}

.get-it-show-all-icons-row {
  min-height: 42px;
  justify-content: flex-start;
  white-space: nowrap;
}

.get-it-show-all-icons-row input {
  width: 16px;
  min-height: 16px;
}

.get-it-icon-grid,
.get-it-suggestion-grid,
.get-it-grid {
  display: grid;
  gap: 10px;
}

.get-it-icon-grid {
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  max-height: 188px;
  overflow: auto;
  padding-right: 2px;
  margin-bottom: 12px;
}

.get-it-icon-option {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 42px;
  border: 1px solid rgba(139, 168, 184, 0.22);
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 1.28rem;
}

.get-it-icon-option.is-active,
.get-it-icon-option:hover,
.get-it-icon-option:focus-visible {
  border-color: rgba(57, 217, 255, 0.74);
  background: rgba(57, 217, 255, 0.13);
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.18);
}

.get-it-icon-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 2px 0 12px;
}

.get-it-icon-upload-row .ghost-button {
  min-height: 38px;
  padding: 0 12px;
}

.get-it-icon-upload-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.get-it-manager-modal {
  width: min(1040px, 100%);
}

.get-it-manager-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(320px, 1.08fr);
  gap: 16px;
  align-items: start;
}

.get-it-manager-form,
.get-it-manager-list-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.get-it-manager-form-heading {
  margin-bottom: 12px;
}

.get-it-manager-icon-button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(57, 217, 255, 0.32);
  border-radius: 9px;
  padding: 0;
  background: rgba(57, 217, 255, 0.08);
  cursor: pointer;
}

.get-it-manager-icon-button:hover,
.get-it-manager-icon-button:focus-visible {
  border-color: rgba(57, 217, 255, 0.72);
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.18);
}

.get-it-manager-icon-button .get-it-options-icon {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.get-it-manager-icon-picker {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(57, 217, 255, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(2, 8, 14, 0.42);
}

.get-it-manager-icon-picker[hidden] {
  display: none;
}

.get-it-manager-form-heading h3 {
  margin-bottom: 0;
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.get-it-manager-list-panel {
  display: grid;
  gap: 12px;
}

.get-it-manager-list {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 2px;
}

.get-it-manager-entry {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.get-it-manager-entry .get-it-card-icon {
  width: 46px;
  height: 46px;
  font-size: 1.45rem;
}

.get-it-manager-entry .entry-actions {
  display: flex;
  gap: 6px;
}

.get-it-suggestion-grid,
.get-it-grid {
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
}

.get-it-suggestion,
.get-it-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 142px;
  border: 1px solid rgba(139, 168, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    rgba(2, 8, 14, 0.62);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 140ms ease,
    border-color 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.get-it-card {
  grid-template-rows: auto 1fr;
}

.get-it-suggestion:hover,
.get-it-suggestion:focus-visible,
.get-it-card:hover,
.get-it-card:focus-visible {
  border-color: rgba(57, 217, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(57, 217, 255, 0.09), rgba(255, 255, 255, 0.026)),
    rgba(2, 8, 14, 0.7);
  transform: translateY(-1px);
}

.get-it-card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(57, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(57, 217, 255, 0.08);
  font-size: 1.85rem;
  line-height: 1;
}

.get-it-icon-option.has-image-icon,
.get-it-selected-icon.has-image-icon,
.get-it-card-icon.has-image-icon,
.get-it-options-icon.has-image-icon,
.expense-icon-preview.has-image-icon,
.expense-icon-large-preview.has-image-icon,
.expense-entry-icon.has-image-icon,
.expense-title-suggestion-icon.has-image-icon {
  overflow: hidden;
  padding: 4px;
}

.get-it-icon-option.has-image-icon img,
.get-it-selected-icon.has-image-icon img,
.get-it-card-icon.has-image-icon img,
.get-it-options-icon.has-image-icon img,
.expense-icon-preview.has-image-icon img,
.expense-icon-large-preview.has-image-icon img,
.expense-entry-icon.has-image-icon img,
.expense-title-suggestion-icon.has-image-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: contain;
}

.get-it-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.get-it-suggestion strong,
.get-it-card-body strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.16;
}

.get-it-suggestion small,
.get-it-card-body small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.get-it-card-note {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(228, 247, 255, 0.82);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.get-it-options-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(57, 217, 255, 0.22);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(57, 217, 255, 0.085), rgba(255, 255, 255, 0.026)),
    rgba(2, 8, 14, 0.74);
}

.get-it-options-preview > div {
  min-width: 0;
}

.get-it-options-preview .field-label {
  margin-bottom: 5px;
}

.get-it-options-preview strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.15;
}

.get-it-options-delete-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
  font-size: 1.1rem;
}

.get-it-options-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: 8px;
  background: rgba(57, 217, 255, 0.1);
  font-size: 2rem;
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.14);
}

#get-it-history-panel .modal-window {
  width: min(480px, 100%);
  padding: 24px;
}

#get-it-history-panel .modal-header {
  margin-bottom: 16px;
}

#get-it-history-panel .get-it-options-preview {
  margin-bottom: 18px;
  padding: 14px 16px;
}

#get-it-history-panel .editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#get-it-history-panel .editor-actions button {
  width: 100%;
  min-width: 0;
}

#cancel-get-it-history {
  grid-column: 1 / -1;
}

#get-it-history-panel .form-message {
  min-height: 0;
  margin-top: 12px;
}

.get-it-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.get-it-card.is-completing {
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
}

.get-it-card.is-done {
  border-color: rgba(53, 255, 157, 0.22);
  background: rgba(53, 255, 157, 0.055);
  opacity: 0.82;
}

.get-it-card.is-done .get-it-card-body strong {
  color: var(--muted);
  text-decoration: line-through;
}

.check-layout {
  grid-template-columns: minmax(260px, 0.42fr) minmax(640px, 1.58fr);
  align-items: start;
}

.project-layout {
  align-items: start;
}

.gym-summary {
  margin-bottom: 16px;
}

.gym-image-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.gym-image-picker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.file-picker-button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.15;
  cursor: pointer;
}

.file-picker-button:hover,
.file-picker-button:focus-within {
  border-color: var(--line-strong);
  background: rgba(57, 217, 255, 0.08);
}

.gym-workout-list,
.gym-options-layout {
  display: grid;
  gap: 16px;
}

.gym-workout-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.gym-workout-card.is-saved-today {
  border-color: rgba(255, 205, 86, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 205, 86, 0.1), rgba(255, 255, 255, 0.025) 42%),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 0 1px rgba(255, 205, 86, 0.22),
    0 0 24px rgba(255, 205, 86, 0.18);
}

.gym-workout-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.gym-workout-media,
.gym-device-preview-frame {
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 132px;
  height: 132px;
  overflow: hidden;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.92);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.gym-workout-media.has-image-backdrop::before,
.gym-device-preview-frame.has-image-backdrop::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: 0;
  background-image: var(--gym-image-backdrop);
  background-position: center;
  background-size: cover;
  filter: blur(18px);
  opacity: 0.72;
  transform: scale(1.08);
  pointer-events: none;
}

.gym-workout-media.has-image-backdrop::after,
.gym-device-preview-frame.has-image-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(2, 8, 14, 0.22);
  pointer-events: none;
}

.gym-workout-content {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.gym-workout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.gym-workout-header .entry-title {
  min-width: 0;
}

.gym-history-button {
  flex: 0 0 auto;
}

.gym-hold-save-button,
.gym-history-button {
  touch-action: none;
}

.check-hold-action-button {
  touch-action: none;
}

.gym-workout-media img,
.gym-device-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  transform: translate(var(--gym-image-offset-x, 0%), var(--gym-image-offset-y, 0%)) scale(var(--gym-image-scale, 1));
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}

.gym-workout-media img {
  touch-action: manipulation;
}

.gym-device-preview {
  cursor: grab;
}

.gym-device-preview-frame {
  touch-action: none;
  cursor: grab;
}

.gym-device-preview-frame[data-dragging="1"] {
  cursor: grabbing;
}

.gym-device-preview-frame[data-dragging="1"] .gym-device-preview {
  cursor: grabbing;
}

.gym-device-preview-frame[data-scaling="1"] {
  cursor: zoom-in;
}

.gym-device-preview-frame[data-center-snapped="1"] {
  border-color: rgba(57, 217, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(57, 217, 255, 0.28),
    0 0 18px rgba(57, 217, 255, 0.28);
}

.gym-device-preview-frame[hidden] {
  display: none;
}

.gym-image-position-controls {
  display: grid;
  gap: 10px;
}

.gym-image-position-controls[hidden] {
  display: none;
}

.gym-image-position-controls label {
  display: grid;
  gap: 6px;
}

.gym-image-position-controls button {
  justify-self: start;
}

.gym-image-position-controls input[type="range"] {
  width: 100%;
}

.image-modal {
  max-width: min(920px, calc(100vw - 28px));
}

.gym-image-viewer-image {
  width: min(100%, 82vw);
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.92);
}

.gym-device-placeholder {
  display: grid;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(57, 217, 255, 0.16), rgba(255, 255, 255, 0.03));
}

.gym-device-name {
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.gym-device-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.gym-entry-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 620px;
}

.gym-entry-form label {
  margin-bottom: 0;
}

.gym-entry-form .primary-button {
  min-height: 44px;
  height: 44px;
}

.gym-hold-save-button,
.check-hold-save-button,
.check-hold-action-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
}

.gym-hold-save-button,
.check-hold-save-button {
  width: 190px;
  min-width: 190px;
}

.gym-hold-save-button::before,
.check-hold-save-button::before,
.check-hold-action-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(53, 255, 157, 0.85), rgba(57, 217, 255, 0.95));
  transform: scaleX(0);
  transform-origin: left center;
  transition: none;
}

.gym-hold-save-button.is-holding::before,
.check-hold-save-button.is-holding::before,
.check-hold-action-button.is-holding::before {
  transform: scaleX(1);
  transition: transform var(--hold-duration, 950ms) linear;
}

.gym-hold-save-button.is-hold-complete,
.check-hold-save-button.is-hold-complete,
.check-hold-action-button.is-hold-complete {
  background: linear-gradient(135deg, #35ff9d, #8cecff);
}

.gym-hold-save-button.is-hold-complete::before,
.check-hold-save-button.is-hold-complete::before,
.check-hold-action-button.is-hold-complete::before {
  transform: scaleX(1);
}

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

.gym-history-row,
.gym-history-popup-row {
  padding: 8px 10px;
  border: 1px solid rgba(57, 217, 255, 0.16);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.025);
}

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

.gym-history-popup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#toggle-gym-history-edit.is-active {
  border-color: rgba(57, 217, 255, 0.72);
  background: rgba(57, 217, 255, 0.16);
  color: var(--accent);
}

.gym-plan-device-options {
  display: grid;
  gap: 8px;
}

.gym-plan-device-tools {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 10px;
}

.gym-plan-device-tools .ghost-button {
  min-height: 40px;
}

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

.gym-plan-device-row {
  display: grid;
  grid-template-columns: 20px 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(57, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.5);
}

.gym-plan-device-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--cyan);
}

.gym-plan-device-row input[type="number"] {
  min-width: 0;
}

.project-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 520px);
  margin-bottom: 18px;
}

.project-tabs .segment-button {
  min-width: 0;
  white-space: normal;
}

.project-filterbar {
  grid-template-columns: minmax(240px, 1fr);
}

.project-item {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px);
  margin-left: calc(var(--level, 0) * 18px);
  border-color: color-mix(in srgb, #35ff9d var(--progress, 0%), var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, #35ff9d var(--progress, 0%), transparent) 0, rgba(255, 255, 255, 0.03) 42%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 22px color-mix(in srgb, #35ff9d var(--progress, 0%), transparent);
}

.project-item.is-search-result {
  margin-left: 0;
}

.project-item .entry-title.has-project-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}

.project-item .entry-title.has-project-toggle small {
  grid-column: 1 / -1;
}

.project-toggle {
  width: 30px;
  height: 30px;
  font-size: 1.05rem;
}

.project-progress-pill,
.project-progress-preview {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-progress-pill span,
.project-progress-preview span {
  height: 9px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #35ff9d var(--progress, 0%), var(--line));
  border-radius: 999px;
  background: rgba(0, 7, 14, 0.68);
}

.project-progress-pill span::before,
.project-progress-preview span::before {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #35ff9d);
  box-shadow: 0 0 16px color-mix(in srgb, #35ff9d var(--progress, 0%), transparent);
}

.project-progress-pill strong,
.project-progress-preview strong {
  color: color-mix(in srgb, #35ff9d var(--progress, 0%), var(--text));
  font-size: 0.82rem;
  text-align: right;
}

.project-progress-preview {
  margin: -6px 0 16px;
}

.project-link-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.project-link-list a,
.project-link-list span {
  max-width: min(100%, 360px);
  overflow: hidden;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(57, 217, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-link-list a {
  color: var(--cyan);
  text-decoration: none;
}

.lets-layout > .data-panel:last-child,
.lets-modern-layout #lets-job-form,
.lets-modern-layout .lets-list-panel {
  grid-column: 1 / -1;
}

.lets-tab-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.lets-calendar-panel,
.lets-detail-panel,
.lets-day-panel {
  min-height: 100%;
}

.lets-calendar-panel {
  overflow: hidden;
}

.compact-select-label {
  display: grid;
  gap: 6px;
  min-width: min(240px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.compact-select-label select {
  min-height: 42px;
}

.lets-calendar-hint {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.lets-filter-tabs {
  margin-bottom: 10px;
}

.segmented-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.segmented-tabs::-webkit-scrollbar {
  display: none;
}

.segment-button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--item-color, var(--cyan)) 34%, transparent);
  border-radius: var(--radius);
  padding: 0 12px;
  background: color-mix(in srgb, var(--item-color, var(--cyan)) 8%, transparent);
  color: var(--text);
  font-weight: 750;
}

.segment-button.active {
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 74%, white 8%);
  background: color-mix(in srgb, var(--item-color, var(--cyan)) 18%, transparent);
  color: var(--item-color, var(--cyan));
  box-shadow: 0 0 18px color-mix(in srgb, var(--item-color, var(--cyan)) 28%, transparent);
}

.lets-filter-tabs .segment-button:not(.active) {
  opacity: 0.66;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.calendar-weekday {
  color: var(--muted);
  padding: 0 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  position: relative;
  align-content: start;
  justify-items: stretch;
  gap: 6px;
  min-height: 124px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  padding: 10px 7px 8px;
  background: rgba(2, 8, 14, 0.38);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.compact-calendar .calendar-day {
  min-height: 92px;
}

.calendar-day.is-muted {
  border-color: transparent;
  background: transparent;
}

.calendar-day.is-today {
  border-color: rgba(57, 217, 255, 0.42);
  background: rgba(57, 217, 255, 0.08);
}

.calendar-day.is-selected {
  border-color: rgba(57, 217, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(57, 217, 255, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(2, 8, 14, 0.7);
  box-shadow: 0 0 0 1px rgba(57, 217, 255, 0.24), 0 0 22px rgba(57, 217, 255, 0.18);
}

.calendar-day.has-jobs {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(2, 8, 14, 0.54);
}

.calendar-day[role="button"] {
  cursor: pointer;
  touch-action: manipulation;
}

.calendar-day[role="button"]:hover,
.calendar-day[role="button"]:focus-visible {
  border-color: rgba(57, 217, 255, 0.55);
  background: rgba(57, 217, 255, 0.07);
  transform: translateY(-1px);
}

.calendar-day strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-day.is-sunday strong {
  color: color-mix(in srgb, var(--magenta) 72%, white 28%);
}

.calendar-job {
  width: 100%;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--item-color, var(--magenta)) 44%, transparent);
  border-radius: 6px;
  padding: 3px 5px 4px;
  overflow: hidden;
  background: color-mix(in srgb, var(--item-color, var(--magenta)) 78%, rgba(255, 255, 255, 0.14));
  color: var(--text);
  display: block;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.12;
  overflow-wrap: normal;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 0 10px color-mix(in srgb, var(--item-color, var(--magenta)) 20%, transparent);
  touch-action: manipulation;
}

.compact-calendar .calendar-job {
  font-size: 0.68rem;
}

.calendar-job:hover,
.calendar-job:focus-visible {
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 76%, white 10%);
  background: color-mix(in srgb, var(--item-color, var(--cyan)) 22%, transparent);
  color: var(--text);
}

.calendar-job.is-selected {
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 86%, white 14%);
  background: color-mix(in srgb, var(--item-color, var(--cyan)) 34%, transparent);
  color: var(--text);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--item-color, var(--cyan)) 48%, transparent),
    0 0 18px color-mix(in srgb, var(--item-color, var(--cyan)) 42%, transparent);
}

.calendar-more {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.calendar-day-count {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border: 1px solid rgba(57, 217, 255, 0.3);
  border-radius: 999px;
  padding: 0 5px;
  background: rgba(57, 217, 255, 0.1);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
}

.lets-day-list {
  display: grid;
  gap: 10px;
}

.lets-day-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border: 1px solid color-mix(in srgb, var(--item-color, var(--cyan)) 34%, transparent);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--item-color, var(--cyan)) 13%, transparent), rgba(255, 255, 255, 0.018)),
    rgba(2, 8, 14, 0.68);
  color: var(--text);
  text-align: left;
  touch-action: manipulation;
}

.lets-day-card:hover,
.lets-day-card:focus-visible {
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 72%, white 8%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--item-color, var(--cyan)) 22%, transparent);
}

.lets-day-time {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--item-color, var(--cyan)) 18%, transparent);
  color: color-mix(in srgb, var(--item-color, var(--cyan)) 80%, white 20%);
  font-size: 0.76rem;
  font-weight: 900;
}

.lets-day-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lets-day-body strong,
.lets-day-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lets-day-body small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.lets-day-empty {
  display: grid;
  gap: 12px;
}

.lets-day-add-button {
  width: 100%;
  min-height: 46px;
}

#lets-day-detail-panel.lets-day-overlay {
  z-index: 24;
  place-items: center;
  padding: 24px 16px;
  background: rgba(0, 5, 10, 0.58);
}

.modal-window.lets-day-sheet {
  width: min(980px, 100%);
  height: min(74dvh, 640px);
  max-height: calc(100dvh - 96px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  border-radius: 28px;
  border-color: rgba(255, 255, 255, 0.14);
  padding: 14px clamp(18px, 4vw, 32px) clamp(22px, 5vh, 34px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(8, 20, 32, 0.98);
}

.lets-sheet-handle {
  justify-self: center;
  width: 68px;
  height: 5px;
  border-radius: 999px;
  background: rgba(232, 247, 255, 0.28);
}

.lets-day-sheet-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.lets-day-sheet-header .panel-actions {
  align-items: center;
  gap: 10px;
}

.lets-day-sheet-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.65rem, 5vw, 2.55rem);
  line-height: 1.05;
}

.lets-day-week {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

#close-lets-day-detail {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 90, 111, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 90, 111, 0.16), rgba(255, 90, 111, 0.045)),
    rgba(34, 7, 14, 0.76);
  color: #ff6d7f;
  font-size: 1.28rem;
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.22),
    0 0 14px rgba(255, 90, 111, 0.12);
}

#close-lets-day-detail:hover,
#close-lets-day-detail:focus-visible {
  border-color: rgba(255, 90, 111, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 90, 111, 0.24), rgba(255, 90, 111, 0.08)),
    rgba(48, 8, 17, 0.9);
  color: #ff9aa7;
  box-shadow:
    0 0 0 3px rgba(255, 90, 111, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(255, 90, 111, 0.18);
}

.primary-icon-button {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(210, 248, 255, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 24%, #ffffff 0, #effbff 38%, #c8f4ff 100%);
  color: #03101a;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 28px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(57, 217, 255, 0.12);
}

.primary-icon-button:hover,
.primary-icon-button:focus-visible {
  border-color: rgba(210, 248, 255, 0.96);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 4px rgba(57, 217, 255, 0.16),
    0 16px 34px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(57, 217, 255, 0.2);
}

.lets-day-sheet .lets-day-list {
  overflow: auto;
  padding: 2px 2px 6px;
}

.lets-day-empty-state {
  display: grid;
  place-items: center;
  min-height: min(42vh, 360px);
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.lets-day-note {
  overflow: hidden;
  color: color-mix(in srgb, var(--muted) 82%, var(--text));
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#lets-job-editor-panel.lets-job-editor-overlay {
  z-index: 28;
}

.modal-window.lets-job-editor-modal {
  width: min(680px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.lets-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lets-editor-save {
  width: auto;
  min-height: 40px;
  margin-left: auto;
  padding-inline: 16px;
}

.lets-editor-title-input {
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 0 14px;
  background: transparent;
  color: var(--text);
  font-size: clamp(2rem, 7vw, 3.15rem);
  font-weight: 900;
  line-height: 1.05;
}

.lets-editor-title-input::placeholder {
  color: rgba(139, 168, 184, 0.72);
}

.lets-editor-section {
  display: grid;
  gap: 14px;
  border-block: 1px solid rgba(148, 163, 184, 0.14);
  padding-block: 16px;
}

.lets-editor-note {
  display: grid;
  gap: 8px;
}

.lets-editor-actions {
  margin-top: -4px;
}

.lets-job-editor-modal input:disabled,
.lets-job-editor-modal select:disabled,
.lets-job-editor-modal textarea:disabled {
  opacity: 0.82;
  color: color-mix(in srgb, var(--text) 80%, var(--muted));
  -webkit-text-fill-color: color-mix(in srgb, var(--text) 80%, var(--muted));
}

.action-entry-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.action-entry-item > .entry-title:only-child {
  grid-column: 1 / -1;
}

.entry-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.compact-tool-button {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
}

.flame-toggle-button {
  border-color: rgba(255, 159, 28, 0.46);
  background: rgba(255, 159, 28, 0.12);
  color: #ff9f1c;
  text-shadow:
    0 0 8px rgba(255, 159, 28, 0.75),
    0 0 16px rgba(255, 61, 145, 0.34);
}

.flame-toggle-button.is-off {
  border-color: rgba(139, 168, 184, 0.28);
  background: rgba(139, 168, 184, 0.08);
  color: #6f8490;
  filter: grayscale(1);
  text-shadow: none;
}

.check-inline-form {
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(120px, 0.7fr));
  align-items: end;
}

.check-inline-form button {
  min-width: 128px;
}

#check-active-task-title {
  min-width: 0;
}

#new-check-item-button {
  justify-self: end;
}

.check-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 14px;
}

.check-item.is-near-due {
  border-color: rgba(255, 205, 86, 0.46);
  background: rgba(255, 205, 86, 0.08);
}

.check-item.is-due {
  border-color: rgba(255, 205, 86, 0.5);
  background: rgba(255, 205, 86, 0.1);
}

.check-item.is-overdue {
  border-color: rgba(255, 89, 89, 0.5);
  background: rgba(255, 89, 89, 0.09);
}

.check-item.is-on-track {
  border-color: rgba(55, 214, 122, 0.42);
  background: rgba(55, 214, 122, 0.08);
}

.check-item.is-action-locked {
  border-color: rgba(139, 168, 184, 0.34);
  background:
    linear-gradient(90deg, rgba(139, 168, 184, 0.1), rgba(2, 16, 27, 0.28)),
    rgba(2, 16, 27, 0.64);
  box-shadow: none;
  opacity: 0.76;
}

.check-item.is-action-locked .check-item-main strong,
.check-item.is-action-locked .check-status-line,
.check-item.is-action-locked .check-item-main small {
  color: rgba(210, 226, 238, 0.68);
}

.check-item-main {
  display: grid;
  gap: 8px;
}

.check-item-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.check-lock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(139, 168, 184, 0.34);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(139, 168, 184, 0.12);
  color: rgba(226, 240, 248, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.check-item-meta {
  display: grid;
  gap: 10px;
  align-content: space-between;
  justify-items: end;
}

.check-progress {
  position: relative;
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(139, 168, 184, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent var(--target), rgba(255, 255, 255, 0.46) var(--target), rgba(255, 255, 255, 0.46) calc(var(--target) + 2px), transparent calc(var(--target) + 2px)),
    rgba(139, 168, 184, 0.16);
}

.check-progress span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 14px rgba(57, 217, 255, 0.32);
}

.check-item.is-near-due .check-progress span {
  background: linear-gradient(90deg, #ffcd56, #ff9f1c);
}

.check-item.is-due .check-progress span {
  background: linear-gradient(90deg, #ffcd56, #ff9f1c);
}

.check-item.is-overdue .check-progress span {
  background: linear-gradient(90deg, #ff5959, #ff9f1c);
}

.check-item.is-on-track .check-progress span {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.check-item.is-action-locked .check-progress span {
  background: linear-gradient(90deg, #64748b, #9aaebc);
  box-shadow: none;
}

.check-status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.check-flame {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 900;
  white-space: nowrap;
}

.check-flame-current {
  color: #ff9f1c;
  text-shadow:
    0 0 8px rgba(255, 159, 28, 0.7),
    0 0 16px rgba(255, 61, 145, 0.32);
}

.check-flame-separator,
.check-flame-record {
  color: var(--muted);
  text-shadow: none;
}

.check-history-list {
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.check-history-item {
  grid-template-columns: minmax(0, 1fr);
}

.lets-colored-entry {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 58%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--item-color, var(--cyan)) 16%, transparent), rgba(255, 255, 255, 0.025) 34%),
    rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 18px color-mix(in srgb, var(--item-color, var(--cyan)) 18%, transparent);
}

.lets-colored-entry::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--item-color, var(--cyan));
  box-shadow: 0 0 16px var(--item-color, var(--cyan));
}

.lets-colored-entry .entry-title strong {
  color: color-mix(in srgb, var(--item-color, var(--cyan)) 82%, white 18%);
  text-shadow: 0 0 10px color-mix(in srgb, var(--item-color, var(--cyan)) 48%, transparent);
}

.lets-colored-entry.is-active {
  border-color: var(--item-color, var(--cyan));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--item-color, var(--cyan)) 24%, transparent), color-mix(in srgb, var(--item-color, var(--cyan)) 8%, transparent) 58%),
    rgba(255, 255, 255, 0.025);
}

.lets-today-card {
  border-color: color-mix(in srgb, var(--item-color, var(--cyan)) 42%, transparent);
}

.finance-options {
  grid-template-columns: minmax(260px, 0.75fr) minmax(260px, 0.75fr) minmax(320px, 1fr);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 5, 10, 0.74);
  backdrop-filter: blur(10px);
}

#expense-icon-panel {
  z-index: 35;
}

#confirm-action-panel {
  z-index: 40;
}

.modal-window {
  width: min(1180px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 22px;
}

.compact-modal {
  width: min(520px, 100%);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  overflow-wrap: anywhere;
}

#confirm-action-panel .modal-window {
  width: min(650px, 100%);
  padding: 24px;
}

#confirm-action-panel .modal-header {
  margin-bottom: 22px;
}

#confirm-action-panel .form-message {
  min-height: 0;
  margin: 0 0 24px;
  line-height: 1.45;
  white-space: pre-line;
}

#confirm-action-panel .editor-actions {
  gap: 14px;
  justify-content: flex-start;
}

#confirm-action-panel .editor-actions button {
  min-width: 150px;
  min-height: 50px;
}

.option-actions {
  display: grid;
  gap: 12px;
}

.restore-fixed-cost-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.restore-fixed-cost-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.restore-fixed-cost-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.restore-fixed-cost-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.restore-fixed-cost-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-stats-modal {
  width: min(620px, 100%);
}

.finance-stats-body {
  display: grid;
  gap: 14px;
}

.finance-stats-total {
  min-height: 96px;
}

.finance-stats-total small {
  color: var(--muted);
  font-weight: 750;
}

.finance-stats-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 460px);
  overflow: auto;
  padding-right: 2px;
}

.finance-stats-row,
.finance-stats-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.finance-stats-row span,
.finance-stats-metric span {
  min-width: 0;
  color: var(--muted);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.finance-stats-row strong,
.finance-stats-metric strong {
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

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

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

.module-order-list {
  display: grid;
  gap: 10px;
}

.module-order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.module-order-item strong,
.module-order-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-order-item small {
  color: var(--muted);
}

.module-order-actions {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  gap: 8px;
}

.option-subsection {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin: 18px 0;
  padding-top: 16px;
}

.option-subsection label {
  margin-bottom: 0;
}

.dynamic-option-list {
  display: grid;
  gap: 10px;
}

.dynamic-option-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.dynamic-option-item strong {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dynamic-option-item .option-checkbox {
  grid-column: 1;
  justify-content: start;
  min-height: 28px;
  margin-bottom: 0;
  white-space: normal;
}

.dynamic-option-item .option-checkbox-primary {
  grid-row: 2;
}

.dynamic-option-item .option-checkbox-secondary {
  grid-row: 3;
}

.dynamic-option-item .icon-button {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: center;
}

.module-sharing-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.module-sharing-item > div {
  min-width: 0;
}

.module-sharing-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.module-sharing-item .compact-action-button {
  min-width: 92px;
}

.share-active-button {
  border: 1px solid rgba(53, 255, 157, 0.58);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(53, 255, 157, 0.24), rgba(57, 217, 255, 0.1)),
    rgba(53, 255, 157, 0.08);
  color: #dfffee;
  font-weight: 850;
  box-shadow:
    0 0 0 1px rgba(53, 255, 157, 0.1),
    0 0 18px rgba(53, 255, 157, 0.16);
}

.additional-income-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.additional-income-add label:not(.checkbox-row) {
  margin-bottom: 0;
}

.additional-income-add .checkbox-row {
  min-height: 32px;
  margin-bottom: 0;
}

.additional-income-add .ghost-button {
  justify-self: start;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(5, 32px);
  gap: 8px;
  margin: -4px 0 16px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--item-color, var(--cyan)) 68%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.42), transparent 24%),
    var(--item-color, var(--cyan));
  box-shadow:
    0 0 10px color-mix(in srgb, var(--item-color, var(--cyan)) 44%, transparent),
    inset 0 0 10px rgba(0, 0, 0, 0.28);
}

.color-swatch.active {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.account-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.data-panel {
  min-width: 0;
  padding: 18px;
}

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

.panel-heading > div {
  min-width: 0;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

#income-form > .panel-heading,
#lets-job-form > .panel-heading {
  align-items: flex-start;
  flex-direction: row;
}

#income-form > .panel-heading > div,
#lets-job-form > .panel-heading > div {
  flex: 1 1 auto;
}

.expense-panel-actions {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.compact-select {
  min-width: 150px;
  margin-bottom: 0;
  gap: 4px;
  border-radius: var(--radius);
  padding: 10px 10px 8px;
  background: rgba(0, 7, 14, 0.22);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.compact-select select {
  min-height: 34px;
  border-color: rgba(125, 234, 255, 0.18);
  padding: 0 9px;
  background: rgba(0, 7, 14, 0.42);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.compact-select select:hover,
.compact-select select:focus {
  color: var(--text);
}

.expense-form-actions {
  align-items: flex-end;
}

.expense-title-field,
.fixed-cost-title-field {
  min-width: min(100%, 240px);
  position: relative;
}

.expense-title-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: stretch;
}

.expense-title-input-row input {
  min-width: 0;
}

.expense-icon-button {
  display: grid;
  place-items: center;
  min-height: 44px;
  width: 46px;
  border: 1px solid rgba(57, 217, 255, 0.28);
  border-radius: var(--radius);
  padding: 0;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 35%),
    rgba(57, 217, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.1);
}

.expense-icon-button:hover,
.expense-icon-button:focus-visible,
.expense-icon-button.has-custom-icon {
  border-color: rgba(57, 217, 255, 0.72);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 35%),
    rgba(57, 217, 255, 0.13);
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.18);
}

.expense-icon-preview,
.expense-entry-icon,
.expense-title-suggestion-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(57, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(57, 217, 255, 0.08);
  font-size: 1.08rem;
  line-height: 1;
}

.expense-entry-icon {
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
}

.expense-title-suggestions {
  position: absolute;
  z-index: 18;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: min(260px, 46vh);
  overflow: auto;
  border: 1px solid rgba(57, 217, 255, 0.24);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(5, 16, 26, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.expense-title-suggestions[hidden] {
  display: none;
}

.expense-title-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(139, 168, 184, 0.18);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.expense-title-suggestion:hover,
.expense-title-suggestion:focus-visible {
  border-color: rgba(57, 217, 255, 0.58);
  background: rgba(57, 217, 255, 0.1);
}

.expense-title-suggestion-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.expense-title-suggestion-text strong,
.expense-title-suggestion-text small {
  overflow-wrap: anywhere;
}

.expense-title-suggestion-text small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.expense-icon-modal {
  width: min(460px, 100%);
}

.expense-icon-modal-body {
  display: grid;
  gap: 14px;
}

.expense-icon-modal-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(57, 217, 255, 0.18);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.expense-icon-modal-preview strong,
.expense-icon-modal-preview small {
  display: block;
  overflow-wrap: anywhere;
}

.expense-icon-modal-preview small {
  margin-top: 4px;
  color: var(--muted);
}

.expense-icon-large-preview {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(57, 217, 255, 0.26);
  border-radius: 10px;
  background: rgba(57, 217, 255, 0.08);
  font-size: 2rem;
  line-height: 1;
}

.entry-item.has-entry-icon {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.expense-sort-control {
  min-width: 190px;
  margin-left: auto;
  align-self: flex-end;
  padding-bottom: 4px;
}

.panel-heading h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.tool-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 850;
}

.tool-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: rgba(57, 217, 255, 0.12);
}

.project-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

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

.income-grid {
  align-items: end;
}

.dynamic-income-grid {
  display: contents;
}

.additional-income-separator {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.income-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.income-grid label {
  margin-bottom: 0;
}

.special-income-block {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.compact-heading h2 {
  font-size: 1.35rem;
}

.net-result {
  display: grid;
  align-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: rgba(57, 217, 255, 0.08);
}

.net-result span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.net-result strong {
  color: var(--text);
  font-size: 1rem;
}

.hours-row {
  max-width: 260px;
  margin-top: 16px;
}

.inline-hours-row {
  max-width: none;
  margin-top: 0;
}

.hours-row label {
  margin-bottom: 0;
}

.checkbox-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--cyan);
}

.toggle-row {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.calculation-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.calculation-strip span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.88rem;
}

.calculation-strip strong {
  color: var(--text);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px) minmax(150px, 200px);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.inline-form label {
  margin-bottom: 0;
}

.inline-form .field-block {
  margin-bottom: 0;
}

.inline-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.inline-form-actions button,
.editor-actions button {
  flex: 0 1 auto;
}

.entry-list {
  display: grid;
  gap: 10px;
}

.entry-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.entry-item.is-clickable {
  cursor: pointer;
}

.entry-item.is-clickable:hover,
.entry-item.is-clickable:focus-visible {
  border-color: var(--line-strong);
  background: rgba(57, 217, 255, 0.08);
}

.entry-item.is-active {
  border-color: var(--cyan);
  background: rgba(57, 217, 255, 0.12);
}

.entry-title {
  min-width: 0;
}

.entry-title strong {
  display: block;
  overflow-wrap: anywhere;
}

.entry-title small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.entry-amount {
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.icon-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 90, 111, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 90, 111, 0.1);
  color: #ffdce1;
  font-size: 1.2rem;
  font-weight: 850;
}

.empty-list {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .auth-layout,
  .main-layout,
  .notes-workspace,
  .finance-grid,
  .fixed-layout,
  .savings-grid,
  .lets-layout,
  .reminder-layout,
  .check-layout,
  .project-layout,
  .get-it-layout,
  .finance-options {
    grid-template-columns: 1fr;
  }

  .get-it-list-panel {
    grid-column: auto;
  }

  .lets-layout > .data-panel:last-child,
  .lets-modern-layout #lets-job-form,
  .lets-modern-layout .lets-list-panel {
    grid-column: auto;
  }

  .auth-visual {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .auth-layout {
    position: relative;
    place-items: center;
    min-height: 100dvh;
    overflow: hidden;
    padding:
      max(18px, env(safe-area-inset-top))
      0
      max(18px, env(safe-area-inset-bottom));
  }

  .auth-panel {
    position: relative;
    z-index: 1;
  }

  .main-layout {
    min-height: 100vh;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 10, 17, 0.94);
    backdrop-filter: blur(18px);
  }

  .sidebar h2 {
    margin-bottom: 12px;
    font-size: 1.25rem;
  }

  .module-nav {
    display: flex;
    gap: 10px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 18px 8px 0;
    scroll-snap-type: x mandatory;
    mask-image: linear-gradient(to right, black 0, black calc(100% - 42px), transparent 100%);
  }

  .module-nav.is-at-start {
    mask-image: linear-gradient(to right, black 0, black calc(100% - 42px), transparent 100%);
  }

  .module-nav.is-at-end {
    mask-image: linear-gradient(to right, transparent 0, black 42px, black 100%);
  }

  .module-nav.is-at-start.is-at-end {
    mask-image: none;
  }

  .module-button {
    flex: 0 0 clamp(150px, 42vw, 190px);
    min-height: 58px;
    padding: 10px 12px;
    scroll-snap-align: start;
  }

  .sidebar-actions {
    min-width: 126px;
  }

  .sidebar-actions .ghost-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .finance-summary {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 104px;
    padding: 9px 4px 7px;
  }

  .calendar-job {
    font-size: 0.7rem;
  }

  .inline-form,
  .check-inline-form,
  .form-grid,
  .income-grid {
    grid-template-columns: 1fr;
  }

  .check-inline-form button,
  .inline-form-actions button,
  .editor-actions button {
    min-width: 0;
  }

  .notes-list {
    max-height: 320px;
  }
}

@media (max-width: 700px) {
  .entry-item {
    grid-template-columns: minmax(0, 1fr) auto 44px;
    align-items: center;
  }

  .entry-item.has-entry-icon {
    grid-template-columns: auto minmax(0, 1fr) auto 44px;
  }

  .action-entry-item {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .check-item,
  .project-item,
  .module-order-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-amount {
    justify-self: end;
  }

  .entry-inline-actions,
  .module-order-actions {
    justify-self: start;
  }

  .module-order-actions {
    grid-column: 1;
    grid-row: auto;
  }
}


@media (max-width: 560px) {
  .auth-panel {
    padding: 18px;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .sidebar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .content {
    padding: 16px 14px 22px;
  }

  .welcome-panel {
    min-height: 52vh;
    text-align: left;
  }

  .welcome-hero {
    justify-content: flex-start;
    width: 100%;
  }

  .welcome-panel h1 {
    font-size: clamp(2.1rem, 11vw, 3.8rem);
  }

  .home-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .get-it-form-row {
    grid-template-columns: 1fr;
  }

  .get-it-icon-filter-row {
    grid-template-columns: 1fr;
  }

  .get-it-show-all-icons-row {
    min-height: 34px;
  }

  .get-it-header-actions {
    justify-content: stretch;
  }

  .get-it-header-actions .ghost-button {
    flex: 1 1 100%;
  }

  .get-it-manager-layout {
    grid-template-columns: 1fr;
  }

  .get-it-manager-entry {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .get-it-manager-entry .entry-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .get-it-suggestion-grid,
  .get-it-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .get-it-suggestion,
  .get-it-card {
    min-height: 132px;
    padding: 10px;
  }

  #get-it-history-panel .modal-window {
    padding: 18px;
  }

  #get-it-history-panel .modal-header {
    margin-bottom: 14px;
  }

  #get-it-history-panel .get-it-options-preview {
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
  }

  #get-it-history-panel .get-it-options-icon {
    width: 52px;
    height: 52px;
    font-size: 1.8rem;
  }

  #get-it-history-panel .editor-actions {
    grid-template-columns: 1fr;
  }

  #cancel-get-it-history {
    grid-column: auto;
  }

  .welcome-actions {
    justify-content: stretch;
  }

  .welcome-actions .primary-button,
  .welcome-actions .ghost-button {
    flex: 1 1 100%;
  }

  .content-header {
    align-items: stretch;
    flex-direction: column;
  }

  #task-module .content-header {
    align-items: center;
    flex-direction: row;
  }

  #task-module .content-header > div:first-child {
    min-width: 0;
  }

  #task-module .content-header h1 {
    overflow-wrap: anywhere;
  }

  #task-module .task-header-actions {
    margin-left: auto;
  }

  #task-module .task-header-actions .ghost-button {
    min-height: 44px;
    padding: 0 12px;
  }

  #task-module .task-header-actions .tool-button {
    width: 44px;
    height: 44px;
  }

  #task-module .task-list-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  #task-module .task-list-toolbar label {
    max-width: none;
  }

  #task-module .simple-task-item {
    grid-template-columns: 34px minmax(0, 1fr) 22px auto;
    min-height: 64px;
    padding: 12px;
  }

  #task-module .simple-task-item.is-draggable {
    grid-template-columns: 32px 34px minmax(0, 1fr) 22px auto;
  }

  #task-module .simple-task-drag-handle {
    width: 32px;
    height: 36px;
  }

  #task-module .simple-task-checkbox {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }

  #task-module .simple-task-actions {
    flex-direction: column;
    gap: 4px;
  }

  #task-module .simple-task-move-button {
    width: 34px;
    height: 30px;
  }

  #goals-module .content-header {
    align-items: center;
    flex-direction: row;
  }

  #goals-module .content-header > div:first-child {
    min-width: 0;
  }

  #goals-module .content-header h1 {
    overflow-wrap: anywhere;
  }

  #goals-module .goal-header-actions {
    margin-left: auto;
  }

  #goals-module .goal-header-actions .ghost-button {
    min-height: 44px;
    padding: 0 12px;
  }

  #goals-module .goal-header-actions .tool-button {
    width: 44px;
    height: 44px;
  }

  .goal-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-status-radio {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radio-pill {
    justify-content: center;
    min-width: 0;
    padding: 0 9px;
    white-space: normal;
    text-align: center;
  }

  .goal-item-card,
  .goal-item-card:not(:has(.goal-item-image)) {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .goal-item-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .goal-item-title-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-item-actions {
    justify-content: flex-end;
  }

  .goal-item-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .month-stepper {
    align-items: end;
  }

  .month-stepper .month-picker {
    flex: 1;
  }

  .content-header .primary-button {
    width: 100%;
  }

  .finance-summary {
    gap: 10px;
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 96px;
    padding: 8px 4px 7px;
  }

  .compact-calendar .calendar-day {
    min-height: 82px;
  }

  .metric-card {
    min-height: 88px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 1.45rem;
  }

  .data-panel,
  .note-editor,
  .empty-state,
  .notes-list {
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    place-items: center;
    overflow-y: auto;
    padding:
      max(var(--mobile-space), env(safe-area-inset-top))
      max(var(--mobile-space), env(safe-area-inset-right))
      max(var(--mobile-space), env(safe-area-inset-bottom))
      max(var(--mobile-space), env(safe-area-inset-left));
  }

  .modal-window {
    width: min(100%, 560px);
    max-height: calc(100dvh - (var(--mobile-space) * 2));
    padding: 16px;
  }

  .modal-header {
    gap: 10px;
    margin-bottom: 16px;
  }

  .modal-header h2 {
    font-size: 1.35rem;
  }

  .finance-stats-metrics,
  .finance-stats-row,
  .finance-stats-metric {
    grid-template-columns: 1fr;
  }

  .finance-stats-row strong,
  .finance-stats-metric strong {
    white-space: normal;
  }

  .editor-actions,
  .inline-form-actions {
    align-items: stretch;
  }

  .editor-actions button,
  .inline-form-actions button,
  #confirm-action-panel .editor-actions button {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(57, 217, 255, 0.07), transparent 240px),
      var(--bg);
  }

  .sidebar {
    display: none;
  }

  .tool-button.mobile-home-button {
    position: absolute;
    top: 16px;
    right: clamp(10px, 3.5vw, 18px);
    z-index: 5;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-color: var(--line-strong);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(8, 26, 39, 0.96), rgba(3, 10, 17, 0.92));
    color: var(--cyan);
    font-size: 0;
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.34),
      0 0 16px rgba(57, 217, 255, 0.18);
    backdrop-filter: blur(14px);
  }

  .tool-button.mobile-home-button.is-options-mode::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow:
      12px 0 0 currentColor,
      0 12px 0 currentColor,
      12px 12px 0 currentColor;
    filter: drop-shadow(0 0 8px rgba(57, 217, 255, 0.24));
    transform: translate(-6px, -6px);
  }

  .tool-button.mobile-home-button.is-options-mode::after {
    content: "";
    display: none;
  }

  .tool-button.mobile-home-button.is-home-mode::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 15px;
    bottom: 10px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(57, 217, 255, 0.22);
  }

  .tool-button.mobile-home-button.is-home-mode::after {
    content: "";
    position: absolute;
    top: 11px;
    width: 17px;
    height: 17px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    border-radius: 2px 0 0 0;
    transform: rotate(45deg);
    box-shadow: -4px -4px 10px rgba(57, 217, 255, 0.16);
  }

  .content {
    padding-inline: clamp(10px, 3.5vw, 18px);
    padding-top: 18px;
  }

  .active-notification-panel {
    margin-right: 58px;
  }

  #home-module .welcome-panel {
    align-content: start;
    padding-top: 96px;
  }

  #home-module .welcome-panel > .eyebrow {
    width: 100%;
    margin-bottom: 22px;
    text-align: center;
  }

  .content-header {
    gap: var(--mobile-space);
    margin-bottom: var(--mobile-space);
    padding-right: 54px;
  }

  .content-header h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .data-panel,
  .note-editor,
  .empty-state,
  .notes-list {
    padding: var(--mobile-panel-padding);
  }

  .panel-heading {
    gap: var(--mobile-space);
    margin-bottom: var(--mobile-space);
  }

  .panel-heading h2 {
    font-size: 1.18rem;
  }

  input,
  select {
    min-height: 46px;
  }

  .gym-entry-form .primary-button {
    min-height: 46px;
    height: 46px;
  }

  textarea {
    min-height: 180px;
  }

  .tool-button,
  .icon-button,
  .compact-tool-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mobile-space);
    margin-bottom: var(--mobile-space);
  }

  .metric-card {
    min-height: 92px;
    padding: var(--mobile-panel-padding);
  }

  .metric-card span {
    font-size: 0.78rem;
  }

  .metric-card strong {
    font-size: clamp(1.25rem, 7vw, 1.7rem);
  }

  .month-stepper {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: end;
    width: 100%;
  }

  .finance-header-actions {
    width: 100%;
  }

  .finance-header-actions > .finance-save-button,
  .finance-header-actions > .ghost-button {
    width: 100%;
  }

  .calculation-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mobile-space);
  }

  .compact-select {
    width: 100%;
    min-width: 0;
  }

  .expense-sort-control {
    margin-left: 0;
  }

  .compact-select select {
    min-height: 42px;
  }

  .notes-workspace {
    gap: var(--mobile-space);
  }

  .notes-list {
    max-height: 260px;
    gap: var(--mobile-space);
    padding: var(--mobile-space);
  }

  .note-item,
  .entry-item,
  .restore-fixed-cost-item,
  .module-order-item {
    padding: 12px;
  }

  .entry-inline-actions {
    justify-content: stretch;
    width: 100%;
  }

  .entry-item > .icon-button {
    justify-self: end;
  }

  .entry-inline-actions button {
    flex: 1 1 120px;
  }

  .entry-amount {
    justify-self: end;
    font-size: 1.05rem;
  }

  .savings-transaction-list,
  .entry-list {
    gap: var(--mobile-space);
  }

  .segmented-tabs {
    gap: 8px;
    margin-inline: -2px;
    padding-bottom: 8px;
  }

  .segment-button {
    min-height: 42px;
    padding-inline: 14px;
  }

  .project-tabs {
    gap: 6px;
    margin-inline: 0;
    width: 100%;
  }

  .project-tabs .segment-button {
    width: 100%;
    padding-inline: 8px;
    font-size: 0.86rem;
    line-height: 1.1;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    overflow-x: visible;
    padding-bottom: 4px;
    width: 100%;
  }

  .calendar-day {
    gap: 3px;
    min-height: 84px;
    padding: 7px 3px 6px;
  }

  .calendar-day strong {
    font-size: 0.74rem;
  }

  .calendar-job {
    width: 100%;
    border-radius: 4px;
    font-size: 0.56rem;
    line-height: 1.08;
    padding: 2px 2px;
  }

  .calendar-day-count {
    top: 5px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    font-size: 0.62rem;
  }

  .lets-layout,
  .reminder-layout,
  .project-layout,
  .check-layout,
  .finance-grid {
    gap: var(--mobile-space);
  }

  .project-item {
    margin-left: min(calc(var(--level, 0) * 8px), 24px);
  }

  .project-link-list a,
  .project-link-list span {
    max-width: 100%;
  }

  .check-flame {
    justify-content: flex-start;
  }

  .check-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .check-item-meta {
    justify-items: stretch;
  }

  .check-status-line {
    font-size: 0.78rem;
  }

  #check-item-list .check-item .entry-inline-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) 44px;
    gap: var(--mobile-space);
    width: 100%;
  }

  #check-item-list .check-item .entry-inline-actions button {
    min-width: 0;
    width: 100%;
  }

  #check-item-list .check-item .compact-action-button {
    padding-inline: 8px;
    font-size: 0.86rem;
  }

  .modal-overlay {
    place-items: center;
    overflow-y: auto;
    padding:
      max(var(--mobile-space), env(safe-area-inset-top))
      max(var(--mobile-space), env(safe-area-inset-right))
      max(var(--mobile-space), env(safe-area-inset-bottom))
      max(var(--mobile-space), env(safe-area-inset-left));
  }

  .modal-window {
    width: min(100%, 560px);
    max-height: calc(100dvh - (var(--mobile-space) * 2));
  }

  .finance-options {
    gap: var(--mobile-space);
  }
}

@media (max-width: 430px) {
  .sidebar {
    display: none;
  }

  .tool-button.mobile-home-button {
    top: 12px;
    right: 10px;
  }

  .content {
    padding: 16px var(--mobile-space) 18px;
  }

  .content-header {
    padding-right: 52px;
  }

  .auth-panel {
    width: calc(100% - 20px);
  }

  .auth-user-item {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .welcome-panel {
    min-height: auto;
  }

  .welcome-hero {
    gap: 12px;
  }

  .welcome-panel h1 {
    font-size: clamp(1.85rem, 10vw, 2.8rem);
  }

  .welcome-hero img {
    width: clamp(58px, 18vw, 82px);
    max-width: 24%;
  }

  .home-module-button {
    min-height: 88px;
    padding: 12px;
  }

  .home-module-button span {
    font-size: clamp(0.9rem, 5.2vw, 1.05rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .home-module-button small {
    font-size: 0.76rem;
    line-height: 1.18;
  }

  .finance-summary {
    grid-template-columns: 1fr;
  }

  #finance-summary.finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #check-module .finance-summary,
  #projects-module .finance-summary {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 82px;
    padding: var(--mobile-space);
  }

  .metric-card strong {
    font-size: 1.3rem;
  }

  .data-panel,
  .note-editor,
  .empty-state,
  .notes-list {
    padding: var(--mobile-space);
  }

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

  #project-form > .panel-heading {
    align-items: flex-start;
    flex-direction: row;
  }

  #project-form > .panel-heading > div:first-child {
    flex: 1 1 auto;
  }

  #project-form .project-heading-actions {
    justify-content: flex-end;
  }

  .auth-user-manager .panel-heading,
  #module-sharing-panel .panel-heading {
    align-items: flex-start;
    flex-direction: row;
  }

  .auth-user-manager .panel-heading > div,
  #module-sharing-panel .panel-heading > div {
    flex: 1 1 auto;
  }

  .panel-actions,
  .expense-panel-actions {
    justify-content: stretch;
  }

  .income-panel-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    width: 100%;
  }

  .finance-inline-save-button {
    min-width: 0;
    width: 100%;
  }

  .panel-actions button,
  .expense-panel-actions button {
    width: 100%;
  }

  .inline-form-actions,
  .editor-actions {
    gap: var(--mobile-space);
  }

  .toolbar,
  .form-grid,
  .income-grid,
  .inline-form,
  .check-inline-form {
    gap: var(--mobile-space);
  }

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

  .calendar-weekday {
    font-size: 0.68rem;
  }

  .calendar-day {
    min-height: 68px;
    padding: 6px 2px 5px;
  }

  .calendar-job {
    display: none;
  }

  .calendar-more {
    display: none;
  }

  .calendar-day-count {
    position: static;
    justify-self: center;
    min-width: 18px;
    height: 18px;
  }

  .modal-header {
    align-items: stretch;
  }

  .finance-stats-row,
  .finance-stats-metric,
  .restore-fixed-cost-item,
  .gym-entry-form,
  .three-column-form {
    grid-template-columns: 1fr;
  }

  .gym-workout-main {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  .gym-workout-media,
  .gym-device-preview-frame {
    width: 96px;
    height: 96px;
  }

  .gym-hold-save-button,
  .check-hold-save-button {
    width: 100%;
    min-width: 0;
  }

  .color-palette {
    grid-template-columns: repeat(5, minmax(28px, 34px));
  }
}

@media (max-width: 700px) {
  #lets-day-detail-panel.lets-day-overlay,
  #lets-job-editor-panel.lets-job-editor-overlay {
    padding: 0;
  }

  .modal-window.lets-day-sheet {
    width: calc(100% - 24px);
    height: min(82dvh, 640px);
    max-height: calc(100dvh - 28px);
    border-radius: 28px;
    padding:
      12px max(18px, env(safe-area-inset-right))
      max(22px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }

  .lets-day-sheet-header h2 {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }

  .primary-icon-button {
    width: 54px;
    height: 54px;
    font-size: 2.25rem;
  }

  #lets-job-editor-panel.lets-job-editor-overlay {
    place-items: stretch;
    overflow: hidden;
  }

  .modal-window.lets-job-editor-modal {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding:
      max(18px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(22px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }

  .lets-editor-title-input {
    min-height: 82px;
  }

  .lets-editor-section {
    gap: 12px;
  }

  .lets-day-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .gym-workout-main {
    grid-template-columns: 1fr;
  }

  .gym-workout-media,
  .gym-device-preview-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .gym-device-placeholder {
    aspect-ratio: auto;
  }

  .gym-entry-form {
    max-width: none;
  }
}

.check-item-heading {
  align-items: flex-start;
  flex-direction: row;
}

.check-item-heading > div {
  flex: 1 1 auto;
}
