@view-transition {
  navigation: auto;
}

:root {
  color-scheme: light;
  font-family: Inter, 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: #e9eeec;
  color: #252a28;
  --home-bottom-nav-height: calc(3.5rem + 1px + env(safe-area-inset-bottom));
}

[x-cloak] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgb(214 232 224 / 72%), transparent 24rem), #e9eeec;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

button {
  appearance: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

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

button,
summary,
select {
  cursor: pointer;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

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

.icon {
  width: 1.25rem;
  height: 1.25rem;
}

.home-page {
  min-height: 100vh;
}

.home-page.has-bottom-nav {
  padding-bottom: var(--home-bottom-nav-height);
}

.home-app {
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
  background: #f8faf9;
}

.home-page.has-bottom-nav .home-app {
  min-height: calc(100vh - var(--home-bottom-nav-height));
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.home-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.home-title {
  color: #17201d;
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.home-count {
  display: inline-flex;
  min-width: 1.25rem;
  min-height: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dff4e9;
  padding: 0.125rem 0.375rem;
  color: #087a59;
  font-size: 0.6875rem;
  font-weight: 800;
}

.menu-wrap {
  position: relative;
}

.icon-button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 999px;
  background: #edf1ef;
  color: #58605d;
  text-decoration: none;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.icon-button:hover {
  background: #e1e7e4;
}

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

.menu-popover {
  position: absolute;
  z-index: 50;
  top: 3.25rem;
  right: 0;
  min-width: 10rem;
  border: 1px solid #dde4e0;
  border-radius: 1rem;
  background: #fff;
  padding: 0.375rem;
  box-shadow: 0 14px 34px rgb(25 42 35 / 14%);
}

.menu-link {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: #3e4743;
  font-size: 0.875rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.menu-link:hover {
  background: #f1f4f2;
}

.signed-out-panel {
  border-radius: 1.25rem;
  background: #fff;
  padding: 2rem 1.25rem;
  color: #626966;
  font-size: 0.875rem;
  text-align: center;
  box-shadow: 0 8px 28px rgb(36 58 49 / 8%);
}

.primary-link,
.primary-button {
  display: inline-flex;
  min-height: 2.875rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  background: #087a59;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.primary-link {
  margin-top: 1rem;
  padding: 0 1.25rem;
}

.primary-link:hover,
.primary-button:hover {
  background: #066548;
}

.primary-link:active,
.primary-button:active {
  transform: scale(0.98);
}

.capture-card {
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  background: #fff;
  padding: 0.625rem 0.75rem;
  box-shadow: 0 4px 16px rgb(36 58 49 / 6%);
}

.item-form {
  display: grid;
  gap: 0.25rem;
}

.capture-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #dce4e0;
  border-radius: 0.875rem;
  background: #f7f9f8;
  padding: 0.125rem 0.25rem 0.125rem 0.75rem;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.capture-row:focus-within {
  border-color: #25a77e;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(37 167 126 / 13%);
}

.capture-label {
  min-width: 0;
  flex: 1;
}

.capture-input {
  width: 100%;
  height: 2.375rem;
  border: 0;
  background: transparent;
  color: #202724;
  font-size: 0.9375rem;
  outline: none;
}

.capture-input::placeholder {
  color: #969e9a;
}

.add-button {
  display: grid;
  width: 2.375rem;
  height: 2.375rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.75rem;
  background: #087a59;
  color: #fff;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.add-button:hover {
  background: #066548;
}

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

.optional-summary {
  display: flex;
  min-height: 2.125rem;
  align-items: center;
  gap: 0.5rem;
  color: #68706c;
  font-size: 0.75rem;
  font-weight: 650;
}

.optional-summary .muted {
  color: #9ba19e;
  font-weight: 500;
}

.chevron-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 150ms ease;
}

.optional-details[open] > .optional-summary .chevron-icon {
  transform: rotate(180deg);
}

.optional-panel {
  display: grid;
  gap: 0.875rem;
  margin-top: 0.5rem;
  border-top: 1px solid #e6ebe8;
  padding-top: 1rem;
}

.field-label,
.field-caption {
  color: #69716d;
  font-size: 0.75rem;
  font-weight: 650;
}

.field-caption {
  margin-bottom: 0.5rem;
}

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

.choice-field legend {
  padding: 0;
}

.choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.choice-option {
  cursor: pointer;
}

.choice-button {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce4e0;
  border-radius: 0.75rem;
  background: #f8faf9;
  padding: 0 0.75rem;
  color: #68706c;
  font-size: 0.75rem;
  font-weight: 650;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.choice-option:hover .choice-button {
  border-color: #b8cec3;
}

.choice-input:checked + .choice-button {
  border-color: #25a77e;
  background: #e5f5ed;
  color: #087a59;
}

.choice-input:focus-visible + .choice-button {
  outline: 3px solid rgb(37 167 126 / 20%);
  outline-offset: 2px;
}

.field-control {
  display: block;
  width: 100%;
  height: 2.75rem;
  margin-top: 0.375rem;
  border: 1px solid #dce4e0;
  border-radius: 0.75rem;
  background: #f8faf9;
  padding: 0 0.75rem;
  color: #3f4743;
  font-size: 0.875rem;
  outline: none;
}

.field-control:focus {
  border-color: #25a77e;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(37 167 126 / 12%);
}

.weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
  color: #49514d;
  font-size: 0.875rem;
}

.weekday-option {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.compact-field {
  display: block;
  max-width: 10rem;
  margin-top: 0.75rem;
}

.filter-section {
  margin-bottom: 0.75rem;
}

.filter-row {
  display: flex;
  gap: 0.375rem;
}

.filter-pill {
  position: relative;
  min-width: 0;
  flex: 1;
  border: 1px solid #dde4e0;
  border-radius: 0.75rem;
  background: #fff;
}

.filter-pill:focus-within {
  border-color: #25a77e;
  box-shadow: 0 0 0 3px rgb(37 167 126 / 10%);
}

.filter-select {
  width: 100%;
  height: 2.25rem;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 2.25rem 0 0.75rem;
  color: #5d6561;
  font-size: 0.75rem;
  font-weight: 650;
  outline: none;
}

.filter-chevron {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1rem;
  height: 1rem;
  color: #929a96;
  pointer-events: none;
  transform: translateY(-50%);
}

.list-error,
.flash-alert {
  margin-bottom: 1rem;
  border: 1px solid #fed7aa;
  border-radius: 0.875rem;
  background: #fff7ed;
  padding: 0.75rem 1rem;
  color: #9a3412;
  font-size: 0.875rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  place-items: center;
  border-radius: 1rem;
  background: #e5f5ed;
  color: #087a59;
}

.empty-state-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.empty-state-title {
  color: #38403c;
  font-size: 0.8125rem;
  font-weight: 700;
}

.item-list {
  display: grid;
  gap: 0.625rem;
}

.item-row {
  display: flex;
  min-height: 4rem;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid #e6ebe8;
  border-radius: 1.125rem;
  background: #fff;
  padding: 0.375rem 0.5rem;
  box-shadow: 0 4px 16px rgb(36 58 49 / 5%);
}

.item-row.is-done {
  background: #f3f6f4;
  box-shadow: none;
}

.item-action {
  flex: 0 0 auto;
}

.complete-button,
.delete-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 0.875rem;
  transition:
    background 140ms ease,
    color 140ms ease;
}

.complete-button:hover {
  background: #edf8f3;
}

.complete-circle {
  display: grid;
  width: 1.375rem;
  height: 1.375rem;
  place-items: center;
  border: 1.5px solid #b7c1bc;
  border-radius: 0.45rem;
  background: #fff;
  color: transparent;
  font-size: 0.75rem;
}

.complete-circle.is-complete {
  border-color: #087a59;
  background: #087a59;
  color: #fff;
}

.item-content {
  min-width: 0;
  flex: 1;
  padding: 0.5rem 0;
}

.item-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.item-title {
  color: #303734;
  font-size: 0.9375rem;
  line-height: 1.3;
  font-weight: 650;
}

.item-row.is-done .item-title {
  color: #969d99;
  text-decoration: line-through;
}

.item-badge {
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
}

.repeat-badge {
  background: #f2edff;
  color: #6d4bc3;
}

.channel-badge {
  background: #e9f4fb;
  color: #27739d;
}

.item-note {
  margin-top: 0.25rem;
  color: #747c78;
  font-size: 0.8125rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.item-due {
  margin-top: 0.375rem;
  color: #737b77;
  font-size: 0.75rem;
  font-weight: 650;
}

.delete-button {
  color: #a1a7a4;
}

.delete-button:hover {
  background: #fff0f1;
  color: #d44855;
}

.delete-button svg {
  width: 1.125rem;
  height: 1.125rem;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid rgb(221 228 224 / 85%);
  background: rgb(255 255 255 / 92%);
  padding: 0.25rem 0.75rem calc(0.25rem + env(safe-area-inset-bottom));
  backdrop-filter: blur(14px);
}

.bottom-nav-inner {
  display: grid;
  max-width: 36rem;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

.bottom-nav-link {
  display: flex;
  min-height: 3rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  border-radius: 0.875rem;
  color: #858c88;
  font-size: 0.625rem;
  font-weight: 700;
  text-decoration: none;
}

.bottom-nav-link:hover {
  background: #f2f5f3;
}

.bottom-nav-link.is-active {
  color: #087a59;
}

.bottom-nav-icon {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 0.625rem;
}

.bottom-nav-link.is-active .bottom-nav-icon {
  background: #dff4e9;
}

.bottom-nav-icon svg {
  width: 1rem;
  height: 1rem;
}

.auth-page,
.settings-page {
  min-height: 100vh;
  padding: 3rem 1rem;
}

.auth-card,
.settings-content {
  max-width: 28rem;
  margin: 0 auto;
}

.auth-card {
  border-radius: 1.5rem;
  background: #fff;
  padding: 1.75rem;
  box-shadow: 0 12px 36px rgb(36 58 49 / 10%);
}

.auth-brand {
  color: #087a59;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.auth-title {
  margin-top: 1rem;
  color: #202724;
  font-size: 1.5rem;
}

.auth-copy {
  margin-top: 0.375rem;
  color: #7b837f;
  font-size: 0.875rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.auth-label {
  color: #555d59;
  font-size: 0.8125rem;
  font-weight: 650;
}

.auth-input {
  display: block;
  width: 100%;
  height: 3rem;
  margin-top: 0.375rem;
  border: 1px solid #dce4e0;
  border-radius: 0.875rem;
  background: #f8faf9;
  padding: 0 0.875rem;
  color: #303734;
  font-size: 0.875rem;
  outline: none;
}

.auth-input:focus {
  border-color: #25a77e;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(37 167 126 / 12%);
}

.primary-button {
  width: 100%;
  border: 0;
}

.auth-footer {
  margin-top: 1.25rem;
  color: #7b837f;
  font-size: 0.875rem;
  text-align: center;
}

.auth-footer a {
  color: #087a59;
  font-weight: 700;
}

.settings-page {
  padding-top: 1.25rem;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.settings-header h1 {
  font-size: 1.25rem;
}

.settings-card {
  border-radius: 1.125rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 6px 22px rgb(36 58 49 / 7%);
}

.settings-card h2 {
  color: #4f5753;
  font-size: 0.875rem;
}

.settings-card p {
  margin-top: 0.5rem;
  color: #7b837f;
  font-size: 0.875rem;
}

@media (min-width: 40rem) {
  .home-app {
    min-height: calc(100vh - 1rem);
    margin-top: 1rem;
    border-radius: 1.75rem 1.75rem 0 0;
    padding: 1.5rem 1.5rem 2rem;
    box-shadow: 0 16px 50px rgb(36 58 49 / 10%);
  }

  .home-page.has-bottom-nav .home-app {
    min-height: calc(100vh - var(--home-bottom-nav-height) - 1rem);
  }

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

  .wide-field {
    grid-column: span 2;
  }

  .auth-card {
    padding: 2rem;
  }
}
