.card {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}

.stack {
  display: grid;
  gap: var(--space-3);
}

.label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.weather {
  text-align: right;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  min-width: 180px;
}

.utility-logout {
  margin-left: 10px;
  flex: 0 0 auto;
  min-height: 40px;
  white-space: nowrap;
}

.utility-shuffle {
  margin-left: 10px;
  flex: 0 0 auto;
  min-height: 40px;
  white-space: nowrap;
}

.weather-location {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.weather-summary {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 600;
}

.date-text {
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#clock {
  font-size: clamp(68px, 17vw, 176px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.auth-card {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  width: min(520px, 100%);
}

.hero-greeting {
  font-size: clamp(16px, 2.4vw, 24px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.login-form {
  width: min(420px, 100%);
  align-items: center;
}

.auth-locked .login-form {
  width: min(360px, 100%);
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.3);
  color: var(--color-text);
  padding: 13px 16px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.login-form input {
  text-align: center;
  font-size: 16px;
}

button {
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: #151515;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.06);
}

.ghost-btn {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
}

.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.helper {
  font-size: 12px;
  color: var(--color-muted);
  min-height: 18px;
}

.helper.error {
  color: var(--color-danger);
}

body.bg-light .weather {
  background: rgba(0, 0, 0, 0.44);
  border-color: rgba(255, 255, 255, 0.42);
}

body.bg-light .weather-location {
  color: rgba(255, 255, 255, 0.82);
}

body.bg-light .weather-summary {
  color: #ffffff;
}

body.bg-light .ghost-btn {
  background: rgba(0, 0, 0, 0.42);
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

body.bg-light .ghost-btn:hover {
  background: rgba(0, 0, 0, 0.56);
  filter: none;
}

.todo-dock {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}

.todo-lock {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  padding: 10px 12px;
  margin-bottom: var(--space-3);
  font-size: 13px;
}

.todo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.todo-filters {
  display: flex;
  gap: 6px;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.filter-btn {
  border: 0;
  background: transparent;
  color: var(--color-muted);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}

.filter-btn.is-active {
  color: #101010;
  background: rgba(255, 255, 255, 0.92);
  filter: none;
}

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

.todo-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 6px;
}

.todo-form .helper {
  grid-column: 1 / -1;
}

.todo-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.todo-list {
  display: grid;
  gap: var(--space-2);
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.todo-list.is-locked {
  opacity: 0.4;
  pointer-events: none;
}

.todo-empty {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: var(--space-2);
  font-size: 13px;
}

.todo-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
}

.todo-item.is-draggable {
  cursor: grab;
}

.todo-item.is-draggable:active {
  cursor: grabbing;
}

.todo-item.is-dragging {
  opacity: 0.46;
  transform: scale(0.995);
}

.todo-item.is-drag-over {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.todo-item.is-drag-over-after {
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.85);
}

.todo-item.is-editing {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.26);
}

.todo-item:hover {
  background: rgba(0, 0, 0, 0.28);
}

.todo-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.todo-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.todo-edit-input {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(0, 0, 0, 0.22);
  color: var(--color-text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
}

.check-btn {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  padding: 0;
  position: relative;
}

.check-btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px;
  background: transparent;
  transition: background-color 0.2s ease;
}

.todo-item.done .todo-text {
  color: var(--color-muted);
  text-decoration: line-through;
}

.todo-item.done .check-btn {
  border-color: rgba(68, 194, 138, 0.7);
}

.todo-item.done .check-btn::after {
  background: var(--color-success);
}

.todo-text {
  overflow-wrap: anywhere;
}

.icon-btn {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.icon-btn.danger {
  background: rgba(255, 107, 107, 0.22);
}

.icon-btn.success {
  background: rgba(68, 194, 138, 0.28);
}

.todo-item-enter {
  animation: todo-enter 0.25s ease both;
}

@keyframes todo-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .weather {
    min-width: 156px;
    padding: 8px 10px;
  }

  #clock {
    font-size: clamp(56px, 22vw, 118px);
  }

  .hero-greeting {
    font-size: clamp(15px, 5.2vw, 21px);
  }

  .todo-dock {
    padding: 14px;
  }

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

  .todo-form button {
    width: 100%;
  }

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

  .todo-actions .ghost-btn {
    width: 100%;
  }
}
