.primary,
.secondary {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
}
.primary {
  background: var(--accent);
  color: var(--surface);
}
.primary:hover {
  background: var(--accent-hover);
}
.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.secondary:hover {
  background: var(--surface-alt);
}

.member-list {
  display: grid;
  gap: 12px;
  max-height: min(55vh, 520px);
  overflow: auto;
  margin-top: 18px;
}
.member-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.member-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.member-heading span {
  color: var(--muted);
  font-size: 12px;
}
.member-board-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.member-board-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--canvas);
  font-size: 13px;
  cursor: pointer;
}
.member-board-options input {
  accent-color: var(--green);
}
.member-save {
  min-height: 36px;
  padding: 7px 12px;
}
.task-claim {
  background: var(--accent);
  color: var(--surface);
}
.task-claim:hover {
  background: var(--accent-hover);
}
.assignee-dropbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: -4px 0 20px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.assignee-drop-hint {
  color: var(--muted);
  font-size: 12px;
}
.assignee-targets {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}
.assignee-target {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 4px 11px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: copy;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}
.assignee-target.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.04);
}
.assign-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}
.assign-avatar.assign-empty {
  background: var(--surface-alt);
  color: var(--muted);
}
.icon-button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.text-button {
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px;
  font-size: 12px;
  color: var(--muted);
}
.text-button:hover {
  color: var(--text);
}
.lang-button {
  font-size: 11px;
  width: 32px;
  font-weight: 600;
}
.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: 10px;
}
.segmented > button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 12px;
}
.segmented > button.selected {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(32 48 29/0.08);
}
.view-switch > button {
  width: 30px;
  height: 30px;
  padding: 5px;
}
.view-switch svg {
  width: 16px;
  height: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
  min-height: 36px;
}
.chip:hover {
  background: var(--surface-alt);
}
.chip.selected {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
}
.filter-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.red {
  background: var(--red);
}
.amber {
  background: var(--amber);
}
.green {
  background: var(--green);
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 0 12px;
  min-width: 0;
}
.search-wrap svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.search-wrap input {
  padding: 8px 0;
  width: 145px;
  min-width: 0;
  border: 0;
  outline-offset: 5px;
  background: none;
  color: var(--text);
  font-size: 11px;
  min-height: 36px;
}
.search-wrap input::placeholder {
  color: var(--muted);
}
.room-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--muted);
  min-height: 28px;
}
.room-code b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: var(--text);
}
.room-code svg {
  width: 12px;
  height: 12px;
}
.room-code:hover {
  background: var(--accent-soft);
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.task-card:hover {
  border-color: #b3c2a7;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.task-card.task-done {
  background: var(--surface);
}
.task-visual {
  position: relative;
  min-height: 132px;
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-art-bg, var(--surface));
  border: 0;
  width: 100%;
  text-align: left;
}
.object-flower {
  --card-art-bg: #f0f2e6;
}
.object-box {
  --card-art-bg: #f5eee4;
}
.object-clay {
  --card-art-bg: #f7eae1;
}
.object-brick {
  --card-art-bg: #f2e8e0;
}
.object-coin {
  --card-art-bg: #f5efda;
}
.object-poop {
  --card-art-bg: #eee9df;
}
:root[data-theme='dark'] .task-card {
  --card-art-bg: var(--surface-alt);
}
.task-visual img {
  width: 126px;
  height: 126px;
  object-fit: contain;
  margin: -4px 0 -4px -4px;
  transition: transform 0.25s;
}
.task-visual:hover img {
  transform: rotate(-4deg) scale(1.04);
}
.task-visual .status-badge {
  align-self: flex-start;
  margin-top: 0;
}
.size-tag {
  position: absolute;
  left: 16px;
  top: 12px;
  font-size: 9px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 5px;
  padding: 1px 5px;
  z-index: 1;
}
.task-content {
  padding: 16px 18px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.task-title {
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.task-title:hover {
  color: var(--accent);
}
.task-description {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: 36px;
}
.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
}
.task-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.task-assignee > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100px;
}
.mini-avatar {
  width: 23px;
  height: 23px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text);
  flex-shrink: 0;
}
.task-deadline {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.task-deadline svg {
  width: 12px;
  height: 12px;
}
.task-deadline.overdue {
  color: var(--red);
}
.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 8px 16px;
  gap: 8px;
}
.task-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
.task-status svg {
  width: 13px;
  height: 13px;
}
.task-finish {
  border: 0;
  background: none;
  padding: 5px 0;
  color: var(--accent);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
}
.task-finish svg {
  width: 13px;
  height: 13px;
}
.task-finish:hover {
  text-decoration: underline;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 7px;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-urgent,
.badge-overdue {
  color: var(--red);
  background: var(--red-bg);
}
.badge-routine {
  color: var(--amber);
  background: var(--amber-bg);
}
.badge-notUrgent {
  color: var(--blue);
  background: var(--blue-bg);
}
.badge-none {
  color: var(--muted);
  background: var(--surface-alt);
}
.badge-done {
  color: var(--green);
  background: var(--green-bg);
}
.empty-state {
  text-align: center;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 24px;
}
.empty-state img {
  margin-bottom: 8px;
}
.empty-state h3 {
  font-size: 18px;
}
.empty-state p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  max-width: 360px;
}
.empty-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.empty-actions .text-button {
  font-size: 11px;
}
.error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 12px;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 24px 80px rgb(20 40 25/0.2);
  max-height: 90dvh;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(4px);
}
.task-dialog {
  width: min(850px, calc(100% - 32px));
}
.dialog-header {
  padding: 24px 28px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.dialog-header h2 {
  font-size: 23px;
  margin-top: 4px;
}
.dialog-header .eyebrow {
  font-size: 9px;
}
.task-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.task-form-fields {
  padding: 24px 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text);
}
.field > span,
.object-field legend {
  font-weight: 500;
}
.field input,
.field textarea,
.field select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  color: var(--text);
  padding: 10px 12px;
  min-height: 42px;
  font-size: 12px;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
}
.field small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}
.field .label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.label-line .text-button {
  font-size: 10px;
  padding: 0;
}
.field input.pin-input {
  font-size: 23px;
  letter-spacing: 9px;
  font-variant-numeric: tabular-nums;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.object-field {
  padding: 0;
  margin: 0 0 20px;
  border: 0;
}
.object-field legend {
  font-size: 12px;
  margin-bottom: 12px;
}
.object-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.object-option {
  position: relative;
  cursor: pointer;
  display: block;
  text-align: center;
  min-width: 0;
}
.object-option input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  inset: 0;
  cursor: pointer;
}
.object-option img {
  width: 100%;
  height: 52px;
  padding: 4px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
}
.object-option input:checked + img {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 3px;
}
.object-option input:focus-visible + img {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.object-option > span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.preview-panel {
  background: var(--hero);
  padding: 28px 20px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.preview-panel .eyebrow {
  font-size: 9px;
  letter-spacing: 0;
}
.preview-object-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.preview-object-wrap img {
  width: 100%;
  height: 220px;
}
.preview-panel h3 {
  margin-top: 12px;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.preview-panel > p {
  font-size: 11px;
  margin-top: 8px;
}
.preview-panel .status-badge {
  font-size: 10px;
}
.preview-note {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.preview-note p {
  margin-top: 8px;
}
.dialog-footer {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-footer-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.danger-text {
  border: 0;
  background: none;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  min-height: 40px;
  padding: 6px 0;
}
.danger-text svg {
  width: 16px;
}
.form-error {
  border-radius: 8px;
  padding: 12px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 12px;
  margin: 12px 0;
}
.dialog-error {
  margin: 16px 28px 0;
}
.form-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}
.small-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
}
.small-dialog .dialog-header {
  padding: 0 0 16px;
}
.small-dialog .dialog-header h2 {
  font-size: 22px;
}
.small-dialog > .muted,
.small-dialog form > .muted {
  font-size: 12px;
  margin-bottom: 24px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 30;
  background: var(--text);
  color: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 20px;
  font-size: 12px;
  max-width: calc(100% - 32px);
  width: max-content;
  animation: toast-in 0.2s ease-out;
}
.toast.error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red);
}
.celebrate {
  animation: celebrate 0.5s ease-in-out;
}
.skeleton {
  min-height: 260px;
  border-radius: 16px;
  background: var(--surface-alt);
  animation: pulse 1.2s ease-in-out infinite;
}
.zone-column .task-visual {
  min-height: 116px;
  padding: 12px 12px 0;
}
.zone-column .task-visual img {
  width: 104px;
  height: 104px;
}
.zone-column .task-content {
  padding: 12px;
}
.zone-column .task-title {
  font-size: 13px;
}
.zone-column .task-meta {
  flex-wrap: wrap;
  gap: 8px;
}
.zone-column .task-footer {
  padding: 8px 12px;
}
.zone-column .task-description {
  font-size: 10px;
}
.zone-column .task-visual .status-badge {
  font-size: 8px;
  padding: 3px 5px;
}
.status-badge svg {
  width: 12px;
  height: 12px;
}
@media (max-width: 599px) {
  .garden-friend {
    inset-inline-end: 50%;
    translate: 50% 0;
  }
  .garden-friend img {
    height: 100%;
    object-fit: contain;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes celebrate {
  0%,
  100% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(-3deg) scale(1.04);
  }
  65% {
    transform: rotate(3deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}
@media (max-width: 599px) {
  .task-visual {
    min-height: 140px;
  }
  .task-visual img {
    height: 140px;
    width: 140px;
  }
  .task-content {
    padding: 16px 20px;
  }
  .task-title {
    font-size: 16px;
  }
  .task-description {
    font-size: 12px;
  }
  .task-meta {
    font-size: 11px;
  }
  .task-finish {
    font-size: 11px;
    min-height: 36px;
  }
  .task-status {
    font-size: 11px;
  }
  .task-visual .status-badge {
    font-size: 10px;
  }
  .task-dialog-body {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    display: none;
  }
  .dialog-header {
    padding: 20px;
  }
  .dialog-header h2 {
    font-size: 21px;
  }
  .task-form-fields {
    padding: 20px;
  }
  .dialog-footer {
    padding: 16px 20px;
    flex-wrap: wrap;
  }
  .form-grid {
    gap: 0 12px;
  }
  .object-picker {
    gap: 4px;
  }
  .object-option > span {
    font-size: 8px;
  }
  .object-option img {
    height: 44px;
  }
  .small-dialog {
    padding: 24px;
  }
  .dialog-error {
    margin: 16px 20px 0;
  }
  .search-wrap input {
    width: 100%;
  }
  .empty-actions {
    gap: 12px;
  }
  .chip {
    padding: 8px 9px;
  }
  .task-card:hover {
    transform: none;
  }
}
