:root {
  --bg: #fff6e7;
  --ink: #1c2220;
  --soft-ink: #596061;
  --accent: #007f73;
  --accent-2: #f4a261;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(28, 34, 32, 0.12);
  --shadow: 0 14px 40px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, #ffe8c8 0%, #fff6e7 45%, #e7fbf4 100%);
  min-height: 100vh;
}

.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 127, 115, 0.16), transparent 35%),
    radial-gradient(circle at 18% 88%, rgba(244, 162, 97, 0.22), transparent 40%);
}

.app-shell {
  position: relative;
  width: min(920px, 100% - 2rem);
  margin: 2.5rem auto 3.5rem;
  display: grid;
  gap: 1.1rem;
}

.hidden {
  display: none !important;
}

#todoApp {
  display: grid;
  gap: 0.9rem;
}

body.micro-ninja-mode-active #todoApp {
  gap: 1.2rem;
}

.hero {
  padding: 1rem 0.2rem;
  animation: rise 420ms ease;
}

body.is-logged-in .hero {
  padding: 0.35rem 0.2rem 0.2rem;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.share-wrap {
  position: relative;
  display: inline-flex;
}

.share-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 150px;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.share-menu-btn {
  justify-content: center;
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.hero-compact-title {
  color: var(--ink);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.ghost-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.hero-icon-btn {
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  flex: 0 0 auto;
}

.hero-icon-btn svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  margin: auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.ghost-select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 2rem 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
}

h1 {
  margin: 0.45rem 0 0.4rem;
  font-size: clamp(1.9rem, 2.7vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-tagline {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  max-width: 48ch;
}

.subtitle {
  margin: 0;
  color: var(--soft-ink);
  max-width: 70ch;
}

body.is-logged-in .hero h1 {
  margin: 0.15rem 0 0.1rem;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
}

.history-referral-copy {
  margin-top: 0.35rem;
}

.history-share-action {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.history-share-wrap {
  vertical-align: baseline;
}

.history-share-action:hover,
.history-share-action:focus-visible {
  color: #075a52;
  outline: none;
}

.welcome-text {
  margin: 0.65rem 0 0;
  color: var(--accent);
  font-weight: 600;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
  animation: rise 500ms ease;
}

#settingsPanel {
  background: rgba(244, 242, 234, 0.97);
}

.done-panel {
  position: relative;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.panel-head p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.94rem;
}

.auth-subtitle {
  margin: 0 0 0.8rem;
  color: var(--soft-ink);
}

.usage-suggestions {
  margin: 1rem 0 2.05rem;
  padding: 0 0.15rem;
}

.usage-suggestions-title {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.usage-suggestions-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.42rem;
}

.usage-suggestion-card {
  border: 1px solid rgba(0, 127, 115, 0.2);
  background: rgba(255, 255, 255, 0.66);
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  display: flex;
  gap: 0.48rem;
  align-items: flex-start;
}

.usage-suggestions-flow .usage-suggestion-card:nth-child(1) {
  transform: rotate(1.1deg);
}

.usage-suggestions-flow .usage-suggestion-card:nth-child(3) {
  transform: rotate(-1.1deg);
}

.usage-suggestions-flow .usage-suggestion-card:nth-child(5) {
  transform: rotate(1.1deg);
}

.usage-suggestion-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 1rem;
  line-height: 1.4;
}

.usage-suggestion-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  flex: 0 0 1.3rem;
  background: rgba(0, 127, 115, 0.14);
  color: #0b5d55;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.1rem;
}

.usage-suggestion-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.founder-story-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  margin: 0 0 1rem;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 18px 42px rgba(255, 255, 255, 0.2),
    0 10px 24px rgba(17, 24, 39, 0.04);
  isolation: isolate;
}

#founderStoryPanel {
  transform: rotate(-0.6deg);
}

#judithStoryPanel {
  transform: rotate(0.55deg);
}

#stephanieStoryPanel {
  transform: rotate(-0.5deg);
}

.founder-story-panel::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.62), transparent 46%),
    radial-gradient(circle at 82% 76%, rgba(255, 255, 255, 0.44), transparent 50%),
    rgba(255, 255, 255, 0.16);
  filter: blur(22px);
  z-index: -1;
  pointer-events: none;
}

.founder-story-panel img {
  width: 143px;
  height: 143px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.stephanie-story-panel {
  flex-direction: row-reverse;
}

.stephanie-story-panel .founder-story-author {
  text-align: right;
}

.founder-story-copy {
  min-width: 0;
}

.founder-story-quote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.04rem, 1.6vw, 1.25rem);
  line-height: 1.4;
  position: relative;
  padding: 0.2rem 0 0.2rem 1.45rem;
}

.founder-story-quote::before {
  content: "\201C";
  position: absolute;
  color: rgba(0, 127, 115, 0.6);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  left: 0;
  top: -0.1rem;
}

.founder-story-quote::after {
  content: "\201D";
  color: rgba(0, 127, 115, 0.6);
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1;
  display: inline-block;
  margin-left: 0.06em;
  vertical-align: baseline;
  transform: translateY(0.08em);
}

.founder-story-author {
  margin: 0.5rem 0 0;
  color: rgba(0, 127, 115, 0.6);
  font-size: 1rem;
  font-weight: 700;
}

.auth-pending {
  margin-top: 0.7rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.auth-pending-hint {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.9rem;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0.75rem 0 1rem;
}

.slot {
  min-height: 132px;
  border-radius: 14px;
  border: 2px solid var(--line);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  align-content: space-between;
  gap: 0.8rem;
  position: relative;
}

.slot-has-eisenhower-controls {
  margin-bottom: 0.95rem;
}

.slot-race-mode {
  padding-top: 0.9rem;
}

.slot.empty {
  border-style: dashed;
  color: var(--soft-ink);
  background: rgba(244, 244, 242, 0.58);
}

.slot-topline {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.slot-body {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}

.todo-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.35;
}

.todo-description-preview {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--soft-ink);
  white-space: pre-line;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0b5d55;
  background: rgba(0, 127, 115, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  width: fit-content;
}

.badge.badge-gratitude {
  color: #5c4a16;
  background: rgba(255, 234, 169, 0.9);
  border: 1px solid rgba(191, 150, 44, 0.34);
}

.slot-corner-controls {
  position: absolute;
  top: 0;
  right: 0.82rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  z-index: 1;
}

.race-timer-border-group {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.slot-eisenhower-controls {
  position: absolute;
  left: 0.82rem;
  bottom: 0;
  transform: translateY(50%);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  z-index: 1;
}

.eisenhower-toggle-btn {
  appearance: none;
  border: 1px solid rgba(36, 52, 59, 0.16);
  border-radius: 999px;
  min-height: 1.72rem;
  padding: 0.12rem 0.56rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 16px rgba(36, 52, 59, 0.14);
  color: #9aacb1;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.eisenhower-toggle-btn.is-active {
  border-color: rgba(192, 54, 54, 0.24);
  background: rgba(255, 239, 239, 0.98);
  color: #9a221f;
}

.eisenhower-toggle-btn-important.is-active {
  border-color: rgba(173, 119, 9, 0.26);
  background: rgba(255, 247, 223, 0.98);
  color: #8a5a04;
}

.slot-corner-btn,
.todo-description-toggle {
  appearance: none;
  border: 1px solid rgba(36, 52, 59, 0.16);
  border-radius: 999px;
  min-width: 1.9rem;
  min-height: 1.9rem;
  padding: 0.18rem 0.54rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 16px rgba(36, 52, 59, 0.14);
  color: #24343b;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.slot-corner-btn.has-description,
.todo-description-toggle.has-description {
  border-color: rgba(0, 127, 115, 0.28);
  color: #0b5d55;
}

.slot-corner-btn.is-open,
.todo-description-toggle.is-open {
  background: rgba(255, 244, 218, 0.96);
}

.race-timer-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.18rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 52, 59, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 16px rgba(36, 52, 59, 0.14);
  color: #24343b;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
}

.todo-description-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.55rem;
}

.todo-description-editor textarea {
  width: 100%;
  min-height: 4.2rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.66rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.race-timer-border-btn {
  appearance: none;
  border: 1px solid rgba(36, 52, 59, 0.16);
  border-radius: 999px;
  min-height: 1.9rem;
  padding: 0.18rem 0.62rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 16px rgba(36, 52, 59, 0.14);
  color: #24343b;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.race-timer-border-btn-start {
  background: rgba(235, 247, 246, 0.98);
  color: #0d5b54;
}

.race-timer-border-btn-stop {
  color: #8a3f06;
}

.race-timer-pill.configured {
  background: rgba(235, 247, 246, 0.96);
  color: #0d5b54;
}

.race-timer-pill.running {
  background: rgba(255, 236, 209, 0.98);
  color: #8a3f06;
}

.race-timer-pill.expired {
  background: rgba(255, 223, 223, 0.98);
  border-color: rgba(185, 37, 37, 0.2);
  color: #8e1f1f;
}

.race-timer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
}

.race-timer-controls-editor {
  justify-content: flex-start;
}

.race-timer-field {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.44rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 52, 59, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 700;
}

.race-timer-field input {
  width: 3rem;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--ink);
}

.race-timer-field input:focus {
  outline: none;
}

.race-timer-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: linear-gradient(130deg, var(--accent), #00a494);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.race-timer-btn.ghost-btn {
  border: 1px solid rgba(36, 52, 59, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: #24343b;
}

.race-timer-btn:hover {
  filter: brightness(0.98);
}

.complete-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(130deg, var(--accent), #00a494);
  color: white;
  font-weight: 700;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
}

.complete-btn:hover {
  filter: brightness(0.97);
}

.complete-btn[data-status="gratitude"] {
  border: 1px solid rgba(191, 150, 44, 0.34);
  background: rgba(255, 234, 169, 0.92);
  color: #5c4a16;
}

.complete-btn[data-status="gratitude"]:hover {
  background: rgba(255, 234, 169, 1);
}

.eisenhower-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.complete-btn.secondary {
  background: linear-gradient(130deg, #5a8f88, #3f6f7a);
}

.eisenhower-actions .complete-btn[data-status="done"] {
  background: linear-gradient(to bottom right, #18a957 0%, #18a957 38%, #e2a84d 100%);
}

.eisenhower-actions .complete-btn[data-status="scheduled"] {
  background:
    radial-gradient(circle at top left, rgba(24, 169, 87, 0.26), transparent 52%),
    radial-gradient(circle at bottom right, rgba(201, 76, 86, 0.18), transparent 48%),
    linear-gradient(to bottom left, #f0a43f 0%, #e2a84d 100%);
}

.eisenhower-actions .complete-btn[data-status="delegated"] {
  background:
    radial-gradient(circle at top left, rgba(24, 169, 87, 0.18), transparent 48%),
    radial-gradient(circle at bottom right, rgba(201, 76, 86, 0.26), transparent 52%),
    linear-gradient(to top right, #c98d4d 0%, #e2a84d 100%);
}

.eisenhower-actions .complete-btn[data-status="eliminated"] {
  background: linear-gradient(to bottom right, #e2a84d 0%, #c94c56 62%, #c94c56 100%);
}

.complete-btn:disabled,
.complete-btn.is-disabled-by-priority,
.eisenhower-actions .complete-btn:disabled,
.eisenhower-actions .complete-btn.is-disabled-by-priority {
  background: linear-gradient(180deg, rgba(238, 241, 244, 0.92), rgba(223, 228, 232, 0.9));
  color: rgba(114, 122, 129, 0.66);
  cursor: not-allowed;
  filter: none;
}

.row-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.row-form input {
  flex: 1;
  min-width: 200px;
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.95);
}

.row-form select {
  min-width: 170px;
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.row-form button {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  background: linear-gradient(130deg, #f4a261, #ec7f37);
  color: #1f2937;
  cursor: pointer;
}

.row-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.row-form .expand-btn {
  border: 1px solid rgba(236, 127, 55, 0.34);
  background: rgba(244, 162, 97, 0.24);
  color: #5d3a1d;
  white-space: nowrap;
}

.row-form .expand-btn:hover {
  filter: none;
  background: rgba(244, 162, 97, 0.34);
}

#doneFormButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.done-form-btn {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  cursor: pointer;
}

.done-form-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.done-form-btn-text {
  display: inline-flex;
  align-items: center;
}

.row-form .done-form-btn-done {
  border: 1px solid rgba(0, 127, 115, 0.25);
  background: rgba(0, 127, 115, 0.1);
  color: #0b5d55;
}

.row-form .done-form-btn-gratitude {
  border: 1px solid rgba(191, 150, 44, 0.34);
  background: rgba(255, 234, 169, 0.72);
  color: #5c4a16;
}

.row-form .done-form-btn-done:hover {
  background: rgba(0, 127, 115, 0.16);
}

.row-form .done-form-btn-gratitude:hover {
  background: rgba(255, 234, 169, 0.92);
}

.done-form-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gratitude-bar {
  margin-top: 0.6rem;
  width: 100%;
  border: 1px solid rgba(191, 150, 44, 0.34);
  border-radius: 11px;
  background: rgba(255, 234, 169, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.56rem 0.62rem;
}

.gratitude-bar p {
  margin: 0;
  color: #5c4a16;
  font-size: 0.92rem;
  line-height: 1.3;
}

.gratitude-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.gratitude-action-btn {
  appearance: none;
  border: 1px solid rgba(92, 74, 22, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.66);
  color: #4f3f12;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.04rem;
  line-height: 1;
  cursor: pointer;
}

.gratitude-action-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.micro-ninja-bar {
  margin-top: 0.8rem;
  width: 100%;
  border: 1px solid rgba(50, 62, 72, 0.22);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(231, 236, 238, 0.82), rgba(215, 223, 228, 0.68));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.56rem 0.62rem;
}

.micro-ninja-bar-icon {
  flex: 0 0 auto;
  font-size: 1.05rem;
  line-height: 1;
}

.micro-ninja-bar p {
  margin: 0;
  color: #25343b;
  font-size: 0.92rem;
  line-height: 1.3;
}

.micro-ninja-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.micro-ninja-action-btn {
  appearance: none;
  border: 1px solid rgba(37, 52, 59, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.74);
  color: #213038;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.04rem;
  line-height: 1;
  cursor: pointer;
}

.micro-ninja-action-btn:hover {
  background: rgba(255, 255, 255, 0.94);
}

.settings-form {
  display: grid;
  gap: 0.85rem;
}

#settingsForm input,
#settingsForm select,
#settingsForm textarea {
  min-width: 0;
  width: 100%;
}

#settingsForm input[type="text"],
#settingsForm input[type="email"],
#settingsForm input[type="date"],
#settingsForm input[type="number"],
#settingsForm input[type="url"],
#settingsForm select,
#settingsForm textarea {
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

#settingsForm input[readonly] {
  background: rgba(244, 244, 242, 0.95);
  color: var(--soft-ink);
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

.settings-tab-btn {
  appearance: none;
  border: 1px solid rgba(36, 52, 59, 0.14);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--soft-ink);
  font: inherit;
  white-space: nowrap;
  font-weight: 700;
  cursor: pointer;
}

.settings-tab-btn.is-active {
  border-color: rgba(0, 127, 115, 0.28);
  background: rgba(0, 127, 115, 0.1);
  color: #0b5d55;
}

.settings-tab-panel {
  display: grid;
  gap: 0.85rem;
}

.settings-general-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr;
  column-gap: 0.7rem;
  row-gap: 1.36rem;
  align-items: start;
}

.settings-select-field {
  display: grid;
  gap: 0.2rem;
}

.settings-select-field label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

#settingsForm .settings-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 126px));
  gap: 0.75rem;
  justify-content: start;
}

.settings-mode-card {
  position: relative;
  display: block;
  cursor: pointer;
  perspective: 1200px;
}

.settings-mode-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-mode-card-surface {
  min-height: 152px;
  aspect-ratio: 0.8;
  border: 1px solid var(--settings-card-border, rgba(28, 34, 32, 0.16));
  border-radius: 18px;
  position: relative;
  display: block;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 244, 236, 0.92));
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.1);
  transform-style: preserve-3d;
  overflow: hidden;
  --settings-card-flip: 0deg;
  --settings-card-lift: 0px;
  transform: translateY(var(--settings-card-lift)) rotate(var(--settings-card-tilt, 0deg)) rotateY(var(--settings-card-flip));
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.settings-mode-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 0.78rem;
  text-align: center;
  transition:
    opacity 120ms ease,
    visibility 120ms ease;
}

.settings-mode-card-face-front {
  opacity: 1;
  visibility: visible;
}

.settings-mode-card-face-back {
  opacity: 0;
  visibility: hidden;
  transform: rotateY(180deg);
  padding: 0.95rem 0.88rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 248, 240, 0.92));
}

.settings-mode-card.is-flipped .settings-mode-card-surface {
  --settings-card-flip: 180deg;
}

.settings-mode-card.is-flipped .settings-mode-card-face-front {
  opacity: 0;
  visibility: hidden;
}

.settings-mode-card.is-flipped .settings-mode-card-face-back {
  opacity: 1;
  visibility: visible;
}

.settings-mode-card-info {
  position: absolute;
  top: 0.62rem;
  left: 0.62rem;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--settings-card-border, rgba(28, 34, 32, 0.16));
  background: rgba(255, 255, 255, 0.92);
  color: var(--settings-card-ink, var(--ink));
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.08);
}

.settings-mode-card-back-note {
  max-width: 13ch;
  font-size: 0.79rem;
  line-height: 1.38;
  font-weight: 600;
  color: var(--settings-card-ink, var(--ink));
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.settings-mode-card-icon {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--settings-card-ink, rgba(28, 34, 32, 0.72));
}

.settings-mode-card-icon-checklist {
  display: inline-grid;
  gap: 0.22rem;
}

.settings-mode-card-icon-quadrants {
  display: grid;
  grid-template-columns: repeat(2, 0.86rem);
  gap: 0.24rem;
}

.settings-mode-card-quadrant {
  display: block;
  width: 0.86rem;
  height: 0.72rem;
  border-radius: 0.22rem;
  background: currentColor;
  opacity: 0.92;
  box-shadow: inset 0 0 0 0.1rem rgba(255, 255, 255, 0.78);
}

.settings-mode-card-checklist-row {
  display: grid;
  grid-template-columns: 0.64rem 1.45rem;
  align-items: center;
  gap: 0.34rem;
}

.settings-mode-card-checklist-box,
.settings-mode-card-checklist-line {
  display: block;
  background: currentColor;
}

.settings-mode-card-checklist-box {
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 0.14rem;
  box-shadow: inset 0 0 0 0.1rem rgba(255, 255, 255, 0.85);
}

.settings-mode-card-checklist-line {
  width: 1.45rem;
  height: 0.16rem;
  border-radius: 999px;
  opacity: 0.88;
}

.settings-mode-card-title {
  font-size: 0.92rem;
  line-height: 1.24;
  font-weight: 700;
  color: var(--settings-card-ink, var(--ink));
  max-width: 8ch;
}

.settings-mode-card-marker {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 1.9rem;
  height: 1.08rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--settings-card-border, rgba(28, 34, 32, 0.16));
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 10px rgba(17, 24, 39, 0.08);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.settings-mode-card-marker::before {
  content: "";
  display: block;
  width: 0.78rem;
  height: 0.78rem;
  margin-left: 0.12rem;
  border-radius: 999px;
  background: rgba(110, 122, 125, 0.64);
  box-shadow:
    0 1px 3px rgba(17, 24, 39, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.settings-mode-card:hover .settings-mode-card-surface {
  --settings-card-lift: -2px;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
}

.settings-mode-card input:focus-visible + .settings-mode-card-surface {
  outline: 2px solid rgba(0, 127, 115, 0.36);
  outline-offset: 2px;
}

.settings-mode-card input:checked + .settings-mode-card-surface {
  border-color: var(--settings-card-accent, rgba(0, 127, 115, 0.34));
  box-shadow: 0 16px 32px var(--settings-card-shadow, rgba(0, 127, 115, 0.16));
}

.settings-mode-card input:checked + .settings-mode-card-surface .settings-mode-card-marker {
  border-color: var(--settings-card-accent, rgba(0, 127, 115, 0.44));
  background: color-mix(in srgb, var(--settings-card-accent-solid, #0b8d72) 18%, white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 5px 12px var(--settings-card-shadow, rgba(0, 127, 115, 0.16));
}

.settings-mode-card input:checked + .settings-mode-card-surface .settings-mode-card-marker::before {
  transform: translateX(0.8rem);
  background: var(--settings-card-accent-solid, #0b8d72);
  box-shadow:
    0 2px 5px rgba(17, 24, 39, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.settings-mode-card-eisenhower .settings-mode-card-surface {
  --settings-card-tilt: -1.2deg;
  --settings-card-ink: #184c49;
  --settings-card-border: rgba(24, 76, 73, 0.36);
  --settings-card-accent: rgba(24, 76, 73, 0.42);
  --settings-card-accent-solid: #184c49;
  --settings-card-shadow: rgba(24, 76, 73, 0.16);
  background:
    linear-gradient(180deg, rgba(235, 248, 245, 0.96), rgba(221, 241, 236, 0.9));
}

.settings-mode-card-gratitude .settings-mode-card-surface {
  --settings-card-tilt: 1.1deg;
  --settings-card-ink: #6a5314;
  --settings-card-border: rgba(106, 83, 20, 0.34);
  --settings-card-accent: rgba(106, 83, 20, 0.4);
  --settings-card-accent-solid: #6a5314;
  --settings-card-shadow: rgba(106, 83, 20, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 246, 214, 0.98), rgba(255, 236, 174, 0.9));
}

.settings-mode-card-gratitude .settings-mode-card-icon {
  font-size: 2rem;
}

.settings-mode-card-todos .settings-mode-card-surface {
  --settings-card-tilt: -0.9deg;
  --settings-card-ink: #6b3d20;
  --settings-card-border: rgba(107, 61, 32, 0.34);
  --settings-card-accent: rgba(107, 61, 32, 0.4);
  --settings-card-accent-solid: #6b3d20;
  --settings-card-shadow: rgba(107, 61, 32, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 237, 222, 0.98), rgba(248, 214, 184, 0.9));
}

.settings-mode-card-micro-ninja .settings-mode-card-surface {
  --settings-card-tilt: 1.2deg;
  --settings-card-ink: #24343b;
  --settings-card-border: rgba(36, 52, 59, 0.34);
  --settings-card-accent: rgba(36, 52, 59, 0.42);
  --settings-card-accent-solid: #24343b;
  --settings-card-shadow: rgba(36, 52, 59, 0.16);
  background:
    linear-gradient(180deg, rgba(236, 241, 242, 0.98), rgba(208, 220, 220, 0.9));
}

.settings-mode-card-micro-ninja .settings-mode-card-icon {
  font-size: 1.95rem;
}

.settings-mode-card-race-doo .settings-mode-card-surface {
  --settings-card-tilt: -1.1deg;
  --settings-card-ink: #7f3d08;
  --settings-card-border: rgba(127, 61, 8, 0.34);
  --settings-card-accent: rgba(127, 61, 8, 0.4);
  --settings-card-accent-solid: #7f3d08;
  --settings-card-shadow: rgba(127, 61, 8, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 241, 223, 0.98), rgba(255, 223, 187, 0.9));
}

.settings-mode-card-race-doo .settings-mode-card-icon {
  font-size: 1.9rem;
}

.settings-mode-card-recurring .settings-mode-card-surface {
  --settings-card-tilt: 1deg;
  --settings-card-ink: #245651;
  --settings-card-border: rgba(36, 86, 81, 0.34);
  --settings-card-accent: rgba(36, 86, 81, 0.4);
  --settings-card-accent-solid: #245651;
  --settings-card-shadow: rgba(36, 86, 81, 0.15);
  background:
    linear-gradient(180deg, rgba(233, 247, 242, 0.98), rgba(205, 236, 227, 0.9));
}

.settings-mode-card-recurring .settings-mode-card-icon {
  font-size: 1.9rem;
}

.settings-mode-card-recurring .settings-mode-card-title {
  max-width: 9.6ch;
  font-size: 0.86rem;
  line-height: 1.18;
}

#settingsForm .settings-select-field-hint {
  margin: 0.05rem 0 0;
  color: var(--soft-ink);
  font-size: 0.82rem;
  line-height: 1.35;
}

#settingsForm .settings-simple-tasks {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.72rem;
  background: rgba(255, 255, 255, 0.72);
}

.settings-webhook-card {
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(28, 34, 32, 0.12);
  border-radius: 14px;
  padding: 0.82rem 0.9rem;
  background: rgba(255, 255, 255, 0.76);
}

.settings-advanced-action-btn {
  appearance: none;
  justify-self: start;
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  background: linear-gradient(130deg, #f4a261, #ec7f37);
  color: #1f2937;
  cursor: pointer;
}

.settings-advanced-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings-recurring-wins {
  margin-top: 0.2rem;
}

.settings-recurring-list {
  display: grid;
  gap: 0.58rem;
}

.settings-recurring-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.72rem;
  padding: 0.74rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(36, 86, 81, 0.16);
  background: linear-gradient(180deg, rgba(247, 252, 250, 0.98), rgba(239, 248, 245, 0.94));
}

.settings-recurring-item-gratitude {
  border-color: rgba(160, 122, 18, 0.18);
  background: linear-gradient(180deg, rgba(255, 249, 220, 0.98), rgba(255, 238, 181, 0.94));
}

.settings-recurring-item-gratitude .settings-recurring-pill {
  background: rgba(160, 122, 18, 0.14);
  color: #7a5b11;
}

.settings-recurring-item-gratitude .settings-recurring-pill.secondary {
  background: rgba(122, 91, 17, 0.1);
  color: #7a5b11;
}

.settings-recurring-item-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.settings-recurring-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem 0.5rem;
  min-width: 0;
}

.settings-recurring-item-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.34;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.settings-recurring-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.settings-recurring-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(36, 86, 81, 0.12);
  color: #245651;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.settings-recurring-pill.secondary {
  background: rgba(28, 34, 32, 0.08);
  color: var(--soft-ink);
}

.settings-recurring-delete-btn {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(28, 34, 32, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--soft-ink);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(17, 24, 39, 0.06);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.settings-recurring-delete-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 86, 81, 0.26);
  color: #245651;
  box-shadow: 0 9px 16px rgba(17, 24, 39, 0.08);
}

.settings-recurring-empty {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.85rem;
  line-height: 1.45;
}

.settings-recurring-editor {
  display: grid;
  gap: 0.72rem;
  padding-top: 0.18rem;
}

.settings-recurring-editor .ghost-btn {
  justify-self: start;
  border-color: rgba(36, 86, 81, 0.24);
  background: linear-gradient(180deg, rgba(210, 238, 231, 0.96), rgba(190, 227, 217, 0.94));
  color: #1d5750;
  box-shadow: 0 8px 16px rgba(36, 86, 81, 0.09);
}

.settings-recurring-editor .ghost-btn:hover {
  background: linear-gradient(180deg, rgba(220, 243, 237, 0.98), rgba(199, 233, 224, 0.96));
}

.settings-recurring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  align-items: start;
}

.settings-starter-toggles {
  display: grid;
  gap: 0.5rem;
}

.settings-webhook-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
}

.settings-webhook-collapsible {
  overflow: hidden;
}

.settings-webhook-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  cursor: pointer;
  list-style: none;
}

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

.settings-webhook-summary-copy {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.settings-webhook-summary::after {
  content: "+";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(33, 57, 66, 0.1);
  color: rgba(33, 57, 66, 0.82);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.settings-webhook-collapsible[open] .settings-webhook-summary::after {
  content: "−";
}

.settings-webhook-summary:hover::after {
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(33, 57, 66, 0.16);
}

.settings-webhook-summary:focus-visible {
  outline: 3px solid rgba(22, 113, 118, 0.18);
  outline-offset: 3px;
  border-radius: 14px;
}

.settings-webhook-body {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.85rem;
}

.settings-webhook-hint,
.settings-webhook-example-label {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--soft-ink);
}

.settings-webhook-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.settings-webhook-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.settings-webhook-toggle-box {
  position: relative;
  flex: 0 0 auto;
  width: 1.08rem;
  height: 1.08rem;
  border: 1.6px solid rgba(22, 113, 118, 0.38);
  border-radius: 0.34rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 245, 243, 0.94));
  box-shadow:
    0 4px 10px rgba(22, 113, 118, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.settings-webhook-toggle-box::after {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.13rem;
  width: 0.26rem;
  height: 0.5rem;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.settings-webhook-toggle-label {
  line-height: 1.35;
}

.settings-webhook-toggle:hover .settings-webhook-toggle-box {
  border-color: rgba(22, 113, 118, 0.52);
  box-shadow:
    0 6px 12px rgba(22, 113, 118, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.settings-webhook-toggle input:focus-visible + .settings-webhook-toggle-box {
  outline: 3px solid rgba(22, 113, 118, 0.18);
  outline-offset: 2px;
}

.settings-webhook-toggle input:checked + .settings-webhook-toggle-box {
  border-color: rgba(22, 113, 118, 0.82);
  background: linear-gradient(180deg, #2f9b95, #1f7d79);
  box-shadow:
    0 7px 14px rgba(22, 113, 118, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.settings-webhook-toggle input:checked + .settings-webhook-toggle-box::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.settings-webhook-status {
  margin: -0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--soft-ink);
}

.settings-webhook-priority-hint {
  margin: -0.1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--soft-ink);
}

.settings-webhook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-webhook-multi-inputs {
  display: grid;
  gap: 0.5rem;
}

.settings-webhook-target-row {
  display: grid;
  gap: 0.5rem;
}

.settings-webhook-target-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(33, 57, 66, 0.08);
}

.settings-webhook-target-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(33, 57, 66, 0.7);
}

.settings-webhook-target-card textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

@media (min-width: 760px) {
  .settings-webhook-target-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr);
  }
}

.settings-webhook-example {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(244, 244, 242, 0.9);
  color: #24343b;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-x: auto;
}

#settingsForm .settings-simple-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

#settingsForm .settings-simple-hint {
  margin: 0.2rem 0 0.45rem;
  color: var(--soft-ink);
  font-size: 0.84rem;
}

.simple-task-create-row {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 11px;
  border: 1px solid rgba(191, 150, 44, 0.22);
  background: rgba(255, 234, 169, 0.36);
}

.simple-task-create-row input {
  min-width: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.52rem 0.62rem;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.92);
}

.simple-task-create-row button {
  align-self: stretch;
}

#settingsCustomSimpleEmojiBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.52rem 0.62rem;
}

.simple-task-create-emoji-preview {
  font-size: 1.05rem;
  line-height: 1;
}

.simple-task-create-row .ghost-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.86rem;
  padding: 0.52rem 0.72rem;
}

.simple-task-create-row .ghost-btn:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.95);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.32);
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-card {
  width: min(640px, 100%);
  max-height: min(84vh, 700px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 0.55rem;
  padding: 0.75rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.modal-head h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-close-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.feedback-modal-card {
  width: min(560px, 100%);
  max-height: min(84vh, 620px);
}

.feedback-form {
  display: grid;
  gap: 0.6rem;
}

#feedbackInput {
  width: 100%;
  min-height: 160px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.62rem 0.72rem;
  font-size: 0.92rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
  resize: vertical;
}

.feedback-modal-message {
  margin: 0;
  min-height: 1.1rem;
  color: var(--soft-ink);
  font-size: 0.86rem;
}

.feedback-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}

.feedback-modal-actions button[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 0.62rem 0.92rem;
  font-weight: 700;
  background: linear-gradient(130deg, #f4a261, #ec7f37);
  color: #1f2937;
  cursor: pointer;
}

.feedback-modal-actions button[type="submit"]:disabled,
.feedback-modal-actions .ghost-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#emojiPickerSearchInput {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.58rem 0.7rem;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.95);
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 0.35rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.emoji-picker-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  min-height: 2.55rem;
  font-size: 1.28rem;
  line-height: 1;
  cursor: pointer;
}

.emoji-picker-btn:hover {
  background: rgba(0, 127, 115, 0.12);
  border-color: rgba(0, 127, 115, 0.35);
}

.emoji-picker-btn.selected {
  border-color: rgba(0, 127, 115, 0.48);
  background: rgba(0, 127, 115, 0.2);
}

.emoji-picker-no-results {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.86rem;
}

.simple-task-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.35rem;
}

.simple-task-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.simple-task-option-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.42rem 0.5rem;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
  text-align: center;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.simple-task-option input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

.simple-task-option input:focus-visible + .simple-task-option-content {
  outline: 2px solid rgba(0, 127, 115, 0.45);
  outline-offset: 2px;
}

.simple-task-option input:checked + .simple-task-option-content {
  border-color: rgba(0, 127, 115, 0.52);
  background: rgba(0, 127, 115, 0.2);
  color: #0b5d55;
  box-shadow: inset 0 0 0 1px rgba(0, 127, 115, 0.16);
}

.simple-task-emoji {
  font-size: 1rem;
}

.simple-task-label {
  line-height: 1.2;
}

.simple-task-option-delete {
  appearance: none;
  position: absolute;
  top: -0.12rem;
  right: -0.12rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(249, 65, 68, 0.12);
  color: #b91c1c;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 140ms ease, background-color 140ms ease;
}

.simple-task-option-custom:hover .simple-task-option-delete,
.simple-task-option-custom:focus-within .simple-task-option-delete {
  opacity: 1;
  pointer-events: auto;
}

.simple-task-option-delete:hover,
.simple-task-option-delete:focus-visible {
  background: rgba(249, 65, 68, 0.2);
  outline: none;
}

#settingsForm button[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  background: linear-gradient(130deg, #f4a261, #ec7f37);
  color: #1f2937;
  cursor: pointer;
  justify-self: end;
}

#settingsForm button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings-danger {
  margin: 0.25rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.settings-danger-btn {
  appearance: none;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
}

.danger-btn {
  appearance: none;
  border: 1px solid rgba(185, 28, 28, 0.32);
  background: rgba(254, 226, 226, 0.58);
  color: #b91c1c;
}

.danger-btn:hover {
  background: rgba(254, 226, 226, 0.86);
  color: #991b1b;
}

.danger-btn:disabled,
.settings-danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.done-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.done-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.74rem;
  border-radius: 10px;
  background: rgba(0, 127, 115, 0.08);
  border: 1px solid rgba(0, 127, 115, 0.2);
  animation: pop 240ms ease;
}

.done-item-title {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  transform: translateY(0);
}

.done-item-share-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 34, 32, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #986c00;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(28, 34, 32, 0.08);
}

.done-item-share-btn:hover,
.done-item-share-btn:focus-visible {
  filter: brightness(0.98);
  outline: none;
}

.done-item-title-emoji {
  display: inline-block;
  margin-right: 7px;
  transform: translateY(1px);
}

.done-item-title-text {
  display: inline-block;
  transform: translateY(1px);
}

.repeat-count {
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.46rem 0.12rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 93, 85, 0.2);
  background: #fff;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 650;
  transform: translateY(1px);
  color: #0b5d55;
}

.done-item::before {
  content: "✓";
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  background: #18a957;
  flex: 0 0 auto;
}

.done-item.done-placeholder::before {
  content: none;
}

.done-item.done-item-gratitude {
  background: rgba(249, 199, 79, 0.08);
  border-color: rgba(249, 199, 79, 0.2);
}

.done-item.done-item-gratitude::before {
  content: "♥";
  background: #f9c74f;
  color: #ffffff;
}

.gratitude-share-shell {
  gap: 1rem;
}

.gratitude-share-back {
  margin: 0;
}

.gratitude-share-stage {
  display: grid;
  gap: 1rem;
  width: min(100%, 44rem);
  justify-items: center;
  margin-inline: auto;
}

.gratitude-postcard {
  position: relative;
  width: min(100%, 44rem);
  aspect-ratio: 3 / 2;
  padding: clamp(1.35rem, 3vw, 2.1rem) clamp(1rem, 2.6vw, 1.55rem);
  border-radius: 22px;
  border: 1px solid rgba(174, 127, 0, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 244, 197, 0.98), rgba(255, 233, 138, 0.95)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.58), transparent 34%);
  box-shadow: 0 20px 42px rgba(148, 115, 22, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-inline: auto;
}

.gratitude-postcard::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px dashed rgba(148, 115, 22, 0.2);
  border-radius: 16px;
  pointer-events: none;
}

.gratitude-postcard-kicker {
  position: absolute;
  top: clamp(1.35rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: calc(100% - 3rem);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(122, 90, 6, 0.84);
}

.gratitude-postcard-text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.7rem, 4.2vw, 2.85rem);
  line-height: 1.18;
  font-weight: 700;
  color: #5b4503;
  text-wrap: balance;
}

.gratitude-postcard-claim-btn {
  position: relative;
  appearance: none;
  min-width: 5.4rem;
  height: 3rem;
  padding: 0 1rem 0 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #18a957, #139648);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(24, 169, 87, 0.28);
  cursor: pointer;
  animation: gratitudeClaimPulse 2.8s ease-in-out infinite;
  justify-self: center;
}

.gratitude-postcard-claim-icon {
  font-size: 1.08rem;
  line-height: 1;
}

.gratitude-postcard-claim-label {
  line-height: 1;
}

.gratitude-postcard-claim-btn:hover,
.gratitude-postcard-claim-btn:focus-visible {
  filter: brightness(0.98);
  outline: none;
  animation-play-state: paused;
}

.gratitude-share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
}

.gratitude-share-status-btn {
  border-color: rgba(122, 90, 6, 0.18);
  background: rgba(255, 246, 218, 0.92);
}

.gratitude-share-message {
  width: 100%;
  text-align: center;
}

@keyframes gratitudeClaimPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 14px 24px rgba(24, 169, 87, 0.28);
  }

  50% {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 18px 28px rgba(24, 169, 87, 0.34);
  }
}

.gratitude-share-signin {
  max-width: 100%;
}

.gratitude-share-signin-blurb {
  margin: -0.2rem 0 1rem;
  color: var(--muted);
}

.simple-task-section {
  margin-top: 1.45rem;
}

.micro-ninja-trail {
  position: absolute;
  top: 0;
  right: 1.05rem;
  transform: translateY(-54%);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.22rem;
  padding: 0 0.14rem;
  max-width: calc(100% - 8.5rem);
}

.micro-ninja-head,
.micro-ninja-overflow {
  min-width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 52, 59, 0.14);
  box-shadow: 0 7px 16px rgba(36, 52, 59, 0.16);
}

.micro-ninja-head {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(247, 251, 251, 0.99), rgba(224, 232, 234, 0.95));
  font-size: 1.24rem;
  line-height: 1;
  transform: rotate(var(--micro-ninja-tilt, 0deg));
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: -2px;
}

.micro-ninja-overflow {
  min-width: 2rem;
  padding: 0 0.42rem;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 42%),
    rgba(255, 255, 255, 0.97);
  color: #24343b;
  font-size: 0.78rem;
  font-weight: 700;
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: -2px;
}

.simple-task-buttons {
  display: grid;
  gap: 0.45rem;
}

.simple-task-buttons-main-row,
.simple-task-buttons-extra-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.simple-task-btn {
  appearance: none;
  border: 1px solid rgba(0, 127, 115, 0.25);
  border-radius: 999px;
  padding: 0.36rem 0.62rem;
  background: rgba(0, 127, 115, 0.08);
  color: #0b5d55;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.simple-task-btn:hover {
  background: rgba(0, 127, 115, 0.16);
}

.simple-task-btn-emoji {
  font-size: 0.95rem;
  line-height: 1;
}

.simple-task-more-toggle {
  margin-left: auto;
  white-space: nowrap;
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.simple-task-more-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
}

.simple-task-btn-extra {
  opacity: 0.92;
}

.todo-library-list {
  margin-top: 0.7rem;
}

.todo-list-help {
  margin: 0 0 0.65rem;
  color: var(--soft-ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.todo-library-item {
  display: grid;
  gap: 0.65rem;
  padding-right: 0.72rem;
}

.todo-library-item::before {
  content: none;
}

.todo-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.todo-library-main {
  min-width: 0;
  display: grid;
  gap: 0.24rem;
}

.todo-library-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.todo-library-title {
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.todo-library-flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.todo-library-flag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
}

.todo-library-flag-urgent {
  color: #982626;
  border: 1px solid rgba(191, 53, 53, 0.24);
  background: rgba(255, 236, 236, 0.9);
}

.todo-library-flag-important {
  color: #865307;
  border: 1px solid rgba(171, 116, 7, 0.22);
  background: rgba(255, 245, 215, 0.92);
}

.todo-library-description-preview {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--soft-ink);
  white-space: pre-line;
}

.todo-library-planned-date-preview {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #7a6b2a;
}

.todo-library-planned-date-preview.is-today {
  color: #8a580d;
  font-weight: 600;
}

.todo-library-planned-date-preview.is-today strong {
  font-weight: 800;
}

.todo-library-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: end;
}

.todo-library-title-row .todo-description-toggle {
  box-shadow: none;
}

.todo-library-eisenhower-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.todo-library-eisenhower-controls .eisenhower-toggle-btn {
  min-height: 1.9rem;
  padding-inline: 0.62rem;
  box-shadow: none;
}

.todo-library-delete-btn {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  justify-content: center;
  color: #a33a2d;
  border-color: rgba(163, 58, 45, 0.24);
  background: rgba(255, 244, 242, 0.88);
  font-size: 1.08rem;
  line-height: 1;
}

.todo-library-delete-btn:hover {
  background: rgba(255, 234, 230, 0.96);
  border-color: rgba(163, 58, 45, 0.34);
}

.todo-library-description-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.todo-library-description-editor textarea {
  width: 100%;
  min-height: 4.4rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.66rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.todo-library-date-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--soft-ink);
}

.todo-library-date-field input {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.todo-library-description-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.todo-library-active-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #0b5d55;
  border: 1px solid rgba(0, 127, 115, 0.22);
  background: rgba(0, 127, 115, 0.12);
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
}

.todo-priority-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.todo-priority-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 1.9rem;
  padding: 0.12rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.72);
  color: var(--soft-ink);
  cursor: pointer;
}

.todo-priority-btn:hover {
  background: rgba(255, 255, 255, 0.94);
}

.todo-priority-btn.active {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(28, 34, 32, 0.05);
}

.todo-priority-high.active {
  border-color: rgba(220, 38, 38, 0.42);
  background: rgba(254, 226, 226, 0.92);
}

.todo-priority-normal.active {
  border-color: rgba(29, 78, 216, 0.35);
  background: rgba(219, 234, 254, 0.92);
}

.todo-priority-low.active {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(220, 252, 231, 0.92);
}

.todo-library-activate-btn {
  border-radius: 999px;
  padding: 0.36rem 0.7rem;
  width: 172px;
  justify-content: center;
}

.todo-library-activate-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.todo-library-activate-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.todo-library-activate-btn.is-disabled:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.7);
}

.todo-library-activate-btn.is-active-doo {
  color: #0b5d55;
  border-color: rgba(0, 127, 115, 0.3);
  background: rgba(0, 127, 115, 0.08);
}

.todo-library-activate-btn.is-active-doo:hover {
  background: rgba(0, 127, 115, 0.12);
}

.todo-archive-group + .todo-archive-group {
  margin-top: 0.85rem;
}

.todo-archive-item {
  padding-right: 0.72rem;
}

.todo-archive-item::before {
  content: none;
}

.todo-archive-priority {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--soft-ink);
}

.todo-archive-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 0.36rem;
}

.todo-archive-delete-btn {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.25);
}

.history-done-item .history-item-title {
  flex: 1;
}

.history-group {
  position: relative;
}

.history-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.history-micro-ninja-trail {
  max-width: calc(100% - 9rem);
}

.history-add-toggle {
  appearance: none;
  border: 1px solid rgba(0, 127, 115, 0.2);
  background: rgba(0, 127, 115, 0.08);
  color: #0b5d55;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.history-add-toggle:hover,
.history-add-toggle:focus-visible {
  background: rgba(0, 127, 115, 0.14);
  outline: none;
}

.history-add-form {
  display: flex;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
}

.history-add-form input {
  min-width: 0;
  flex: 1;
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.history-add-form button {
  appearance: none;
  border: 1px solid rgba(0, 127, 115, 0.25);
  border-radius: 11px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  background: rgba(0, 127, 115, 0.1);
  color: #0b5d55;
  cursor: pointer;
  flex: 0 0 auto;
}

.history-add-form button:hover,
.history-add-form button:focus-visible {
  background: rgba(0, 127, 115, 0.16);
  outline: none;
}

.history-add-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.history-status {
  margin-left: auto;
  margin-right: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0b5d55;
  background: rgba(0, 127, 115, 0.12);
  border: 1px solid rgba(0, 127, 115, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
}

.history-item-delete {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #0b5d55;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 140ms ease, background-color 140ms ease, color 140ms ease;
}

.history-done-item .done-item-share-btn + .history-item-delete {
  margin-left: 0.3rem;
}

.history-item-delete:hover,
.history-item-delete:focus-visible {
  background: rgba(249, 65, 68, 0.12);
  color: #b91c1c;
  outline: none;
}

.analytics-panel {
  overflow: hidden;
}

.analytics-dau-card {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(28, 34, 32, 0.1);
  background: linear-gradient(180deg, rgba(255, 248, 234, 0.95), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

.analytics-dau-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.8rem;
}

.analytics-dau-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(28, 34, 32, 0.7);
}

.analytics-dau-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--soft-ink);
}

.analytics-dau-chart {
  display: grid;
  grid-template-columns: repeat(40, minmax(0, 1fr));
  align-items: end;
  gap: 0.22rem;
  min-height: 180px;
  padding-top: 0.25rem;
}

.analytics-dau-bar {
  display: flex;
  align-items: end;
  min-width: 0;
  height: 100%;
}

.analytics-dau-bar span {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #f4a261, #ec7f37);
}

.analytics-emails-bar span {
  background: linear-gradient(180deg, #5a8f88, #1f6f67);
}

.analytics-signups-card .analytics-dau-bar span {
  background: linear-gradient(180deg, #7c73ff, #4f46e5);
}

.analytics-signups-card .analytics-dau-bar.is-today span {
  background: linear-gradient(180deg, #5f52ff, #3730a3);
}

.analytics-mode-section {
  display: grid;
  gap: 0.9rem;
  margin: 1.1rem 0 1.2rem;
}

.analytics-mode-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.analytics-mode-summary {
  max-width: 18rem;
  text-align: right;
}

.analytics-mode-card .settings-mode-card-surface {
  min-height: 214px;
}

.analytics-mode-card-content {
  justify-content: flex-start;
  gap: 0.55rem;
}

.analytics-mode-icon-slot {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-mode-card .settings-mode-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
}

.analytics-mode-card .settings-mode-card-icon-checklist {
  display: inline-grid;
}

.analytics-mode-title {
  min-height: 2.48em;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 9ch;
}

.analytics-mode-metrics {
  margin-top: auto;
  display: grid;
  gap: 0.35rem;
  width: 100%;
}

.analytics-mode-count,
.analytics-mode-share {
  margin: 0;
  padding: 0.48rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
}

.analytics-mode-count {
  background: rgba(255, 255, 255, 0.86);
  color: var(--settings-card-ink, var(--ink));
  border: 1px solid rgba(28, 34, 32, 0.1);
}

.analytics-mode-share {
  background: rgba(28, 34, 32, 0.08);
  color: var(--settings-card-ink, var(--soft-ink));
}

.analytics-dau-bar.is-today span {
  background: linear-gradient(180deg, #0b8d72, #0a6f5a);
}

.analytics-wins-card .analytics-dau-bar span {
  background: linear-gradient(180deg, #f6d24b, #e4a90c);
}

.analytics-wins-card .analytics-dau-bar.is-today span {
  background: linear-gradient(180deg, #d8ad10, #a57d00);
}

.analytics-dau-bar.is-zero span {
  background: linear-gradient(180deg, #d7ddd9, #b9c2bc);
}

.analytics-heatmap-panel {
  margin: 1rem 0 1.15rem;
}

.analytics-heatmap-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.analytics-heatmap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(28, 34, 32, 0.1);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
}

.analytics-heatmap-legend {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--soft-ink);
}

.analytics-heatmap-wrap {
  overflow-x: auto;
}

.analytics-heatmap-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0.14rem;
}

.analytics-heatmap-table th {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--soft-ink);
  text-align: center;
  white-space: nowrap;
  padding: 0 0 0.08rem;
}

.analytics-heatmap-table thead th:first-child,
.analytics-heatmap-table tbody th {
  text-align: left;
  width: 2.3rem;
  padding-right: 0.18rem;
}

.analytics-heatmap-table td {
  padding: 0;
}

.analytics-heatmap-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.54rem;
  min-height: 1.54rem;
  padding: 0.1rem;
  border-radius: 0.58rem;
  border: 1px solid rgba(208, 126, 61, 0.14);
  background: rgba(236, 127, 55, var(--heat-alpha, 0));
  color: #6d3817;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}

.analytics-heatmap-cell.is-zero {
  border-color: rgba(28, 34, 32, 0.06);
  background: rgba(185, 194, 188, 0.28);
  color: transparent;
}


.admin-panel {
  overflow: hidden;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}

.admin-tile {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(0, 127, 115, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.8rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.admin-tile h2 {
  margin: 0;
  font-size: 1.06rem;
}

.admin-tile p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.45;
}

.admin-tile span {
  margin-top: auto;
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid rgba(0, 127, 115, 0.28);
  background: rgba(0, 127, 115, 0.1);
  color: #0b5d55;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.2rem 0.56rem;
}

.admin-tile:hover,
.admin-tile:focus-visible {
  border-color: rgba(0, 127, 115, 0.38);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.admin-email-form {
  align-items: flex-end;
}

.admin-email-digest-form {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(28, 34, 32, 0.1);
  align-items: stretch;
  gap: 0.75rem;
}

.admin-email-form label {
  width: 100%;
  min-width: 100%;
  color: var(--soft-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-email-digest-intro {
  display: grid;
  gap: 0.32rem;
  width: 100%;
}

.admin-email-digest-title {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.admin-email-digest-hint {
  margin: 0;
  max-width: 42rem;
  color: #596061;
}

.admin-test-digest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.admin-email-message {
  margin-top: 0.55rem;
}

.admin-email-message.error {
  color: #b91c1c;
}

.admin-newsletter-form {
  display: grid;
  gap: 0.55rem;
}

.admin-newsletter-form label {
  color: var(--soft-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-newsletter-form input,
.admin-newsletter-form textarea,
.admin-newsletter-form select {
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.95);
  font-family: inherit;
}

.admin-newsletter-form textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.5;
}

.admin-newsletter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-newsletter-actions .ghost-btn {
  padding: 0.72rem 1rem;
  border-radius: 11px;
}

.admin-newsletter-actions button[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  background: linear-gradient(130deg, #f4a261, #ec7f37);
  color: #1f2937;
  cursor: pointer;
}

.admin-newsletter-placeholders {
  margin-top: 0.9rem;
  border: 1px dashed rgba(0, 127, 115, 0.34);
  border-radius: 11px;
  background: rgba(231, 251, 244, 0.44);
  padding: 0.7rem 0.78rem;
}

.admin-newsletter-placeholders p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.45;
}

.admin-newsletter-placeholders p + p {
  margin-top: 0.35rem;
}

.admin-newsletter-filter-hint {
  margin: -0.12rem 0 0.2rem;
  font-size: 0.84rem;
  color: var(--soft-ink);
}

.admin-newsletter-filter-note {
  margin: -0.12rem 0 0.2rem;
  font-size: 0.84rem;
  color: #9a4d13;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.analytics-table th,
.analytics-table td {
  padding: 0.58rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.analytics-table th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft-ink);
}

.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-inline-form {
  margin: 0;
}

.admin-inline-form .ghost-btn {
  white-space: nowrap;
}

.analytics-empty {
  margin: 0;
  color: var(--soft-ink);
}

.site-history-link {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
}

.site-history-link a {
  color: var(--accent);
}

.site-credit {
  margin: 0.35rem 0 0;
  text-align: center;
  color: var(--soft-ink);
  font-size: 0.88rem;
}

.site-credit-main,
.site-credit-links {
  display: block;
}

.site-credit-links {
  margin-top: 0.18rem;
}

.site-credit a {
  color: var(--accent);
}

.help-copy p + p {
  margin-top: 0.9rem;
}

.help-section-intro {
  margin: 0 0 1rem;
  color: var(--soft-ink);
}

.help-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.help-mode-card {
  perspective: none;
}

.help-mode-card .settings-mode-card-surface {
  min-height: 220px;
  aspect-ratio: auto;
  transform: none;
  padding: 1rem;
}

.help-mode-card .settings-mode-card-surface:hover,
.help-mode-card:hover .settings-mode-card-surface {
  --settings-card-lift: 0px;
}

.help-mode-card-content {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  text-align: center;
}

.help-mode-card .settings-mode-card-title {
  max-width: none;
}

.help-mode-card-note {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--settings-card-ink, var(--soft-ink));
}

.help-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.help-feature {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.06);
}

.help-feature h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.help-feature p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.55;
}

.help-feature-link-row {
  margin: 0.7rem 0 0;
}

.help-feature-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.help-feature-link:hover,
.help-feature-link:focus-visible {
  text-decoration: underline;
}

.help-webhook-section {
  display: grid;
  gap: 1rem;
}

.help-webhook-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.help-webhook-note,
.help-webhook-field {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.06);
}

.help-webhook-note h3,
.help-webhook-subheading {
  margin: 0;
  font-size: 1rem;
}

.help-webhook-note p {
  margin: 0.45rem 0 0;
  color: var(--soft-ink);
  line-height: 1.55;
}

.help-webhook-field-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.help-webhook-field p {
  margin: 0;
}

.help-webhook-field p + p {
  margin-top: 0.42rem;
  color: var(--soft-ink);
  line-height: 1.5;
}

.help-webhook-field code {
  font-size: 0.9rem;
  font-weight: 700;
  color: #245651;
}

.legal-copy {
  color: var(--ink);
  line-height: 1.7;
}

.legal-copy-list {
  margin: 1rem 0;
  padding-left: 1.3rem;
}

.dev-link {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--soft-ink);
}

.dev-link a {
  color: var(--accent);
  word-break: break-all;
}

.message {
  margin: 0.2rem;
  color: var(--soft-ink);
  min-height: 1.2rem;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: burst 900ms ease-out forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes pop {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes burst {
  from {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(0.4);
  }
}

@media (max-width: 760px) {
  .analytics-heatmap-table thead th.is-minor-hour {
    color: transparent;
  }

  .analytics-heatmap-cell {
    color: transparent !important;
  }

  .app-shell {
    width: min(920px, 100% - 1rem);
    margin-top: 1.2rem;
  }

  .hero-top {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .hero-actions {
    align-self: flex-end;
  }

  .hero-top-compact {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }

  .hero-top-compact .hero-compact-title {
    display: block;
    text-align: center;
    font-weight: 800;
  }

  .hero-top-compact .hero-actions {
    align-self: center;
    justify-content: center;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .gratitude-postcard {
    width: min(calc(100% - 1.5rem), 23.5rem);
    padding: 1rem 0.82rem;
  }

  .gratitude-postcard-kicker {
    top: 1.1rem;
    width: calc(100% - 2.4rem);
    font-size: 0.72rem;
  }

  .gratitude-postcard-text {
    max-width: 12.5ch;
    font-size: clamp(1.32rem, 6.4vw, 1.95rem);
  }

  .gratitude-postcard-claim-btn {
    min-width: 4.8rem;
    height: 2.5rem;
    padding: 0 0.82rem 0 0.74rem;
    gap: 0.34rem;
    font-size: 0.88rem;
  }

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

  #settingsForm button[type="submit"] {
    justify-self: stretch;
  }

  .settings-general-grid {
    grid-template-columns: 1fr;
  }

  .settings-recurring-grid {
    grid-template-columns: 1fr;
  }

  .settings-recurring-item {
    padding: 0.7rem 0.72rem;
  }

  .settings-tabs {
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .settings-tab-btn {
    padding: 0.36rem 0.62rem;
    font-size: 0.92rem;
  }

  #settingsForm .settings-mode-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    justify-content: stretch;
  }

  .settings-mode-card-surface {
    min-height: 150px;
    --settings-card-tilt: 0deg;
  }

  .settings-mode-card:hover .settings-mode-card-surface {
    --settings-card-lift: -2px;
  }

  #doneForm {
    flex-wrap: nowrap;
    align-items: stretch;
  }

  #doneForm input {
    min-width: 0;
  }

  #doneFormButtons {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.42rem;
  }

  #doneFormButtons .done-form-btn {
    width: 2.9rem;
    min-width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    border-radius: 0.95rem;
  }

  #doneFormButtons .done-form-btn-text {
    display: none;
  }

  #doneFormButtons .done-form-btn-icon {
    font-size: 1.08rem;
  }

  .simple-task-create-row {
    grid-template-columns: 1fr;
  }

  .settings-webhook-actions {
    flex-direction: column;
  }

  .gratitude-bar {
    align-items: flex-start;
  }

  .micro-ninja-bar {
    align-items: flex-start;
  }

  .simple-task-section {
    margin-top: 1.45rem;
  }

  .micro-ninja-trail {
    right: 0.82rem;
    max-width: calc(100% - 7rem);
  }

  .race-timer-controls {
    gap: 0.34rem;
  }

  .race-timer-field input {
    width: 2.4rem;
  }

  .founder-story-panel {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .usage-suggestions-flow {
    grid-template-columns: 1fr;
    gap: 0.34rem;
  }

  .usage-suggestions-flow .usage-suggestion-card:nth-child(1),
  .usage-suggestions-flow .usage-suggestion-card:nth-child(3),
  .usage-suggestions-flow .usage-suggestion-card:nth-child(5) {
    transform: none;
  }

  .usage-suggestion-arrow {
    transform: rotate(90deg);
    justify-self: center;
    line-height: 1;
  }

  .todo-library-item {
    align-items: stretch;
  }

  .todo-library-actions,
  .todo-archive-actions {
    display: flex;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .todo-library-row,
  .todo-description-editor,
  .todo-library-description-editor {
    grid-template-columns: 1fr;
  }
}
