* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #d9d4f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f1f1f;
}

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 40px 20px;
  padding: 40px 32px 48px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 20, 30, 0.05), 0 24px 48px -28px rgba(20, 20, 30, 0.35);
}

.confetti-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 16px;
  z-index: 50;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 7px;
  height: 12px;
  border-radius: 1px;
  animation: confetti-fall 1.15s ease-in forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(340px) rotate(360deg);
    opacity: 0;
  }
}

.complete-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e8f8ee;
  border: 1px solid #bdeccf;
  color: #16a34a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.complete-banner[hidden] {
  display: none;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

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

.today-counter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto 20px;
}

.today-counter {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin: 0;
  background: #4b4bff;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
}

.progress-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  border: none;
  background: transparent;
  color: #4b4bff;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.progress-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #eeecfd;
  color: #4b4bff;
  flex-shrink: 0;
}

.progress-toggle:hover .progress-toggle-icon {
  background: #e0dcfa;
}

.progress-toggle:hover span:last-child {
  text-decoration: underline;
}

.progress-toggle[hidden] {
  display: none;
}

.progress-panel {
  position: relative;
  display: flex;
  gap: 16px;
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e4e4e6;
  border-radius: 12px;
}

.progress-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #1f1f1f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 40;
}

.progress-tooltip[hidden] {
  display: none;
}

.progress-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f1f1f;
}

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

.progress-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  width: 84px;
  border-right: 1px solid #e4e4e6;
  padding-right: 12px;
}

.progress-nav-btn {
  text-align: left;
  border: none;
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #6a6a6a;
  cursor: pointer;
}

.progress-nav-btn:hover {
  background: #f1f0fc;
}

.progress-nav-btn.active {
  background: #eeecfd;
  color: #4b4bff;
  font-weight: 600;
}

.progress-content {
  flex: 1;
  min-width: 0;
}

.progress-view-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 10px;
  white-space: nowrap;
}

.progress-calendar-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-week-header {
  display: flex;
  gap: 4px;
}

.progress-week-header-spacer {
  width: 16px;
  flex-shrink: 0;
}

.progress-week-labels {
  display: grid;
  grid-template-columns: repeat(5, 16px);
  gap: 4px;
  font-size: 0.56rem;
  color: #000;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.progress-grid-row {
  display: flex;
  gap: 4px;
}

.progress-day-labels {
  width: 16px;
  flex-shrink: 0;
  display: grid;
  grid-template-rows: repeat(7, 16px);
  gap: 4px;
  font-size: 0.64rem;
  color: #000;
  line-height: 16px;
  text-align: center;
}

.progress-grid {
  display: grid;
  grid-template-rows: repeat(7, 16px);
  grid-auto-flow: column;
  gap: 4px;
}

.progress-cell {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.progress-cell-future {
  background: transparent;
}

.progress-cell-zero {
  background: #fff;
  border: 1px solid #000;
}

.progress-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.65rem;
  color: #9a9a9a;
}

.progress-legend-gradient {
  width: 60px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #fbbf24, #86efac, #15803d);
}

.progress-graph {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100px;
}

.progress-graph-col {
  flex: 1 1 0;
  min-width: 2px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.progress-graph-bar {
  width: 100%;
  background: #4b4bff;
  border-radius: 2px 2px 0 0;
}

.progress-graph-axis {
  display: flex;
  gap: 2px;
  margin-top: 4px;
  font-size: 0.5rem;
  color: #9a9a9a;
}

.progress-graph-axis span {
  flex: 1 1 0;
  min-width: 2px;
  white-space: nowrap;
}

.today-counter-loading {
  visibility: hidden;
}

.today-counter[hidden] {
  display: none;
}

.today-counter-number-track {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.7em;
  min-width: 2ch;
  text-align: center;
  padding: 0 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
}

.today-counter-number {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  font-variant-numeric: tabular-nums;
}

.today-counter-label {
  text-align: center;
}

.today-counter-number-outgoing {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.page-title-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.page-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b4bff;
}

.page-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #4b4bff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-pill,
.weather-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fbfaff;
  color: #6a5ce8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7.8px 12px;
  border-radius: 999px;
  border: 2px solid #d5cdf5;
  white-space: nowrap;
}

.weather-pill[hidden],
.date-pill[hidden] {
  display: none;
}

.weather-pill svg {
  flex-shrink: 0;
}

.back-link {
  font-size: 0.9rem;
  color: #6b6bff;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.page-header-links {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.link-divider {
  color: #000;
  font-size: 0.9rem;
}

.list-name-input {
  font-size: 1.5rem;
  font-weight: 600;
  font-family: inherit;
  color: inherit;
  border: none;
  background: transparent;
  outline: none;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 6px;
  min-width: 0;
  flex: 1;
}

.list-name-input:hover {
  background: #eeeeef;
}

.list-name-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px #8a8aff;
}

.list-description-input {
  display: block;
  width: 100%;
  font-size: 0.85rem;
  font-family: inherit;
  color: #6a6a6a;
  border: none;
  background: transparent;
  outline: none;
  resize: none;
  overflow: hidden;
  padding: 4px 6px;
  margin: -8px 0 16px -6px;
  border-radius: 6px;
  line-height: 1.4;
}

.list-description-input:hover {
  background: #f5f4f8;
}

.list-description-input:focus {
  background: #fff;
  color: #1f1f1f;
  box-shadow: inset 0 0 0 2px #8a8aff;
}

.list-row {
  display: flex;
  align-items: center;
  border-radius: 8px;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  cursor: grab;
}

.list-row:active {
  cursor: grabbing;
}

.list-row.dragging {
  opacity: 0.4;
}

.list-row.drag-over-top {
  border-top-color: #4b4bff;
}

.list-row.drag-over-bottom {
  border-bottom-color: #4b4bff;
}

.list-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 12px 8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.list-row-link:hover {
  background: #f5f4f8;
}

.list-row-name-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.row-badge {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eceaf9;
  color: #6a5ce8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.row-badge-complete {
  background: #e8f8ee;
  color: #16a34a;
}

.check-overlay {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  background: #16a34a;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-row-done-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #16a34a;
}

.list-row-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.list-row-count {
  font-size: 0.85rem;
  color: #9a9a9a;
}

.list-row-completed {
  font-size: 0.72rem;
  font-weight: 600;
  color: #3f3fe0;
}

#task-form,
#list-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

#task-input,
#list-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #d8d8dc;
  border-radius: 8px;
  outline: none;
}

#task-input:focus,
#list-input:focus {
  border-color: #8a8aff;
}

#task-form button,
#list-form button {
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: #4b4bff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#task-form button:hover,
#list-form button:hover {
  background: #3a3ae0;
}

#task-list,
#list-of-lists,
.daily-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.daily-section {
  background: #f1f0fc;
  border-radius: 10px;
  padding: 10px 10px 6px;
  margin-bottom: 16px;
}

.daily-section[hidden] {
  display: none;
}

.daily-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a5ce8;
  margin-bottom: 6px;
  padding: 0 4px;
}

.daily-task-list .task-item:hover {
  background: #ddd7f6;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  cursor: grab;
}

.task-item:active {
  cursor: grabbing;
}

.task-item.editing {
  cursor: default;
}

.task-item.dragging {
  opacity: 0.4;
}

.task-item.drag-over-top {
  border-top-color: #4b4bff;
}

.task-item.drag-over-bottom {
  border-bottom-color: #4b4bff;
}

.task-item:hover {
  background: #f5f4f8;
}

.task-item.editing {
  border: 2px solid #000;
  background: #fff;
}

.task-item.editing:hover {
  background: #fff;
}

.task-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #4b4bff;
  flex-shrink: 0;
}

.task-text-col {
  flex: 1;
  min-width: 0;
}

.task-item .task-text {
  word-break: break-word;
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: #9a9a9a;
}

.task-description {
  margin-top: 2px;
  font-size: 0.85rem;
  color: #8a8a8a;
  word-break: break-word;
}

.task-deadline {
  margin-top: 2px;
  font-size: 0.85rem;
  color: #6a6a6a;
}

.subtask-toggle {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #6b6bff;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.subtask-toggle:hover {
  text-decoration: underline;
}

.subtask-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid #ececf2;
}

.subtask-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtask-checkbox {
  width: 14px;
  height: 14px;
  accent-color: #4b4bff;
  cursor: pointer;
  flex-shrink: 0;
}

.subtask-text {
  font-size: 0.85rem;
}

.subtask-done {
  text-decoration: line-through;
  color: #a9a9ae;
}

.bold-text {
  font-weight: 700;
}

.italic-text {
  font-style: italic;
}

.underline-text {
  text-decoration: underline;
}

.task-edit-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -4px;
}

.edit-close-btn {
  border: none;
  background: transparent;
  color: #b3b3b3;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.edit-close-btn:hover {
  color: #e04b4b;
}

.edit-title-input,
.edit-desc-input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid #8a8aff;
  border-radius: 6px;
  padding: 6px 8px;
  outline: none;
  background: #fff;
}

.edit-desc-input {
  font-size: 0.85rem;
  color: #4a4a4a;
  resize: vertical;
}

.edit-options {
  background: #f7f7f8;
  border-radius: 6px;
  padding: 8px 10px;
}

.daily-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.daily-toggle-row .label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-icon-chip {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eef0ff;
  color: #4b4bff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.daily-toggle-row .label-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.edit-deadline-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: #6a6a6a;
}

.edit-deadline-input {
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  padding: 5px 8px;
  width: fit-content;
  background: #fff;
}

.deadline-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deadline-row {
  display: flex;
  gap: 8px;
}

.edit-time-input {
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  padding: 5px 8px;
  width: fit-content;
  background: #fff;
}

.quick-set-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed #e4e4e6;
  font-size: 0.85rem;
  color: #6a6a6a;
  flex-wrap: wrap;
}

.quick-set-amount {
  width: 52px;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  padding: 4px 6px;
  background: #fff;
}

.quick-set-unit {
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  padding: 4px 6px;
  background: #fff;
}

.quick-set-btn {
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background: #4b4bff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.quick-set-btn:hover {
  background: #3a3ae0;
}

.edit-subtasks {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e4e4e6;
}

.edit-subtasks-label {
  font-size: 0.8rem;
  color: #6a6a6a;
}

.edit-subtask-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.edit-subtask-list:empty {
  margin-top: 0;
}

.edit-subtask-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-subtask-checkbox {
  width: 14px;
  height: 14px;
  accent-color: #4b4bff;
  cursor: pointer;
  flex-shrink: 0;
}

.edit-subtask-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  padding: 4px 7px;
  background: #fff;
}

.edit-subtask-delete {
  border: none;
  background: transparent;
  color: #b3b3b3;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.edit-subtask-delete:hover {
  color: #e04b4b;
}

.edit-subtask-add-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.edit-subtask-add-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  padding: 4px 7px;
  background: #fff;
}

.edit-subtask-add-btn {
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background: #4b4bff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.edit-subtask-add-btn:hover {
  background: #3a3ae0;
}

.edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.edit-save-btn {
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: #4b4bff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.edit-save-btn:hover {
  background: #3a3ae0;
}

.task-item .delete-btn {
  border: none;
  background: transparent;
  color: #b3b3b3;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.task-item .delete-btn:hover {
  color: #e04b4b;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 8px;
  border-top: 1px solid #e4e4e6;
}

.setting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-label {
  font-weight: 500;
}

.setting-hint {
  font-size: 0.85rem;
  color: #8a8a8a;
}

.setting-block-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 8px 4px;
  border-top: 1px solid #e4e4e6;
}

.settings-card {
  background: #f7f6fb;
  border-radius: 14px;
  padding: 4px 10px;
  margin: 20px 0;
}

.settings-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a5ce8;
  padding: 14px 6px 8px;
}

.settings-card .setting-row {
  padding: 12px 6px;
  border-top: 1px solid #e6e2f5;
}

.settings-card-title + .setting-row,
.settings-card-title + div .setting-row:first-child {
  border-top: none;
}

.setting-row.icon-setting-row {
  flex-direction: column;
  align-items: stretch;
}

.icon-setting-top {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.icon-preview-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #eceaf9;
  color: #6a5ce8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-setting-name {
  font-weight: 500;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.icon-grid[hidden] {
  display: none;
}

.icon-grid-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: #f5f4f8;
  color: #4a4a4a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-grid-btn:hover {
  background: #ececf5;
}

.icon-grid-btn.active {
  background: #4b4bff;
  color: #fff;
}

.style-btn-group {
  display: flex;
  gap: 2px;
  background: #ececed;
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}

.style-btn {
  width: 32px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #4a4a4a;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.style-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.setting-row.style-setting-row {
  flex-direction: column;
  align-items: stretch;
}

.setting-row.radio-setting-row {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.radio-btn-group {
  display: flex;
  gap: 2px;
  background: #ececed;
  border-radius: 8px;
  padding: 3px;
}

.radio-btn {
  flex: 1;
  padding: 8px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #4a4a4a;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.radio-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.radio-btn.active {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.style-setting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.style-setting-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-circle-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  background: #1f1f1f;
}

.color-circle-btn:hover {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.color-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.color-swatch-row[hidden] {
  display: none;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  padding: 0;
}

.color-swatch.active {
  border-color: #1f1f1f;
}

.color-swatch-default {
  background: #fff;
  position: relative;
}

.color-swatch-default::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    #e04b4b calc(50% - 1px),
    #e04b4b calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.color-swatch-custom {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-style: dashed;
  border-color: #b3b3b3;
  box-shadow: none;
}

.color-swatch-custom::before {
  content: "+";
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: #9a9a9a;
}

.color-swatch-custom.active {
  border-style: solid;
  border-color: #1f1f1f;
}

.color-swatch-custom.active::before {
  display: none;
}

.color-swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.style-btn.active {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.style-btn-bold {
  font-weight: 700;
}

.style-btn-italic {
  font-style: italic;
}

.style-btn-underline {
  text-decoration: underline;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #d8d8dc;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.toggle-track::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.toggle input:checked + .toggle-track {
  background: #4b4bff;
}

.toggle input:checked + .toggle-track::before {
  transform: translateX(18px);
}

.empty-state {
  color: #9a9a9a;
  text-align: center;
  padding: 24px 0;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.auth-subtitle {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: #6a6a6a;
}

.auth-tabs {
  display: flex;
  background: #f0f0f3;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6a6a6a;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 1px 2px rgba(20, 20, 30, 0.1);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  color: #1f1f1f;
  background: #fff;
  border: 1px solid #d8d8dc;
  border-radius: 8px;
  cursor: pointer;
}

.google-btn:hover {
  background: #f7f7f8;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: #9a9a9a;
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e4e6;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4a4a4a;
  margin-bottom: 14px;
}

.auth-label input {
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #d8d8dc;
  border-radius: 8px;
  outline: none;
}

.auth-label input:focus {
  border-color: #8a8aff;
}

.auth-error {
  background: #fdecec;
  color: #c62828;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.auth-submit-btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: #4b4bff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.auth-submit-btn:hover {
  background: #3a3ae0;
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.sign-out-btn {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  color: #c62828;
  background: #fdecec;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.sign-out-btn:hover {
  background: #fbdada;
}
