:root {
  --cream: #f6f5ef;
  --cream-2: #efeee6;
  --sand: #e7e4d7;
  --ink: #12241b;
  --ink-soft: #3c4a42;
  --muted: #6a776e;
  --forest: #173d2b;
  --forest-2: #0e2a1d;
  --lime: #cbf24e;
  --lime-600: #b7e22c;
  --white: #fff;
  --danger: #a33f32;
  --line: rgba(18, 36, 27, 0.12);
  --line-strong: rgba(18, 36, 27, 0.22);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 32px;
  --pill: 999px;
  --shadow: 0 24px 60px -30px rgba(14, 42, 29, 0.45);
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --maxw: 1120px;
  --pad: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  min-height: 100%;
  overflow-x: clip;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  margin-inline: auto;
  max-width: var(--maxw);
  padding-inline: var(--pad);
  width: 100%;
}

.site-header {
  backdrop-filter: blur(14px);
  background: rgba(246, 245, 239, 0.86);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  align-items: center;
  display: flex;
  height: 72px;
  justify-content: space-between;
  margin-inline: auto;
  max-width: var(--maxw);
  padding-inline: var(--pad);
}

.brand,
.header-actions,
.button,
.shared-badge,
.dock-meta,
.mode-notice,
.group-meta,
.card-actions,
.modal-head,
.modal-actions {
  align-items: center;
  display: flex;
}

.brand {
  gap: 10px;
}

.brand-mark {
  border-radius: 11px;
  display: block;
  flex: 0 0 auto;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.brand-divider {
  background: var(--line-strong);
  height: 18px;
  width: 1px;
}

.brand-product {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.header-actions {
  gap: 12px;
}

.shared-badge {
  background: rgba(23, 61, 43, 0.08);
  border: 1px solid rgba(23, 61, 43, 0.16);
  border-radius: var(--pill);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  padding: 7px 11px;
}

.shared-badge span {
  background: var(--lime-600);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(183, 226, 44, 0.26);
  height: 7px;
  width: 7px;
}

.button {
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  padding: 12px 21px;
  transition: 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
.card-link:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(183, 226, 44, 0.48);
  outline-offset: 2px;
}

.button-small {
  font-size: 14px;
  min-height: 42px;
  padding: 10px 16px;
}

.button-primary {
  background: var(--ink);
  color: var(--cream);
}

.button-primary:hover {
  background: var(--forest-2);
}

.button-lime {
  background: var(--lime);
  border-color: var(--ink);
  color: var(--ink);
}

.button-lime:hover {
  background: var(--lime-600);
}

.button-ghost {
  background: transparent;
  border-color: var(--line-strong);
}

.button-ghost:hover {
  border-color: var(--ink);
}

.button-dock-ghost {
  background: rgba(246, 245, 239, 0.08);
  border-color: rgba(246, 245, 239, 0.22);
  color: var(--cream);
}

.button-dock-ghost:hover {
  background: rgba(246, 245, 239, 0.14);
  border-color: rgba(246, 245, 239, 0.5);
}

.button-danger {
  background: var(--danger);
  color: var(--white);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.workspace {
  padding-bottom: 96px;
  padding-top: 44px;
}

.workspace-layout {
  align-items: start;
  column-gap: 28px;
  display: grid;
  grid-template-areas:
    "dock todo"
    "notice todo"
    "groups todo"
    "empty todo";
  grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
}

.command-dock {
  background: var(--forest-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--cream);
  grid-area: dock;
  min-height: 170px;
  padding: 18px;
}

.search-field {
  align-items: center;
  background: rgba(246, 245, 239, 0.09);
  border: 1px solid rgba(246, 245, 239, 0.18);
  border-radius: 18px;
  display: flex;
  padding: 3px 5px 3px 18px;
  transition: 0.18s ease;
}

.search-field:focus-within {
  background: rgba(246, 245, 239, 0.13);
  border-color: rgba(203, 242, 78, 0.56);
}

.search-icon {
  color: var(--lime);
  display: inline-flex;
}

.search-field input {
  background: transparent;
  border: 0;
  color: var(--cream);
  flex: 1;
  font-size: 18px;
  min-width: 0;
  outline: 0;
  padding: 15px 14px;
}

.search-field input::placeholder {
  color: rgba(246, 245, 239, 0.55);
}

.search-field kbd {
  background: rgba(246, 245, 239, 0.1);
  border: 1px solid rgba(246, 245, 239, 0.18);
  border-radius: 9px;
  color: rgba(246, 245, 239, 0.65);
  font-family: var(--sans);
  font-size: 12px;
  padding: 7px 9px;
}

.dock-meta {
  color: rgba(246, 245, 239, 0.64);
  font-size: 13px;
  justify-content: space-between;
  min-height: 56px;
  padding: 13px 8px 0 12px;
}

.dock-actions {
  align-items: center;
  display: none;
  gap: 9px;
}

.is-editing .dock-actions {
  display: flex;
}

.todo-column {
  align-self: stretch;
  grid-area: todo;
  min-width: 0;
}

.todo-panel {
  background: linear-gradient(145deg, #f2f6df 0%, #e8efc7 100%);
  border: 1px solid rgba(23, 61, 43, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 38px rgba(23, 61, 43, 0.08);
  color: var(--forest);
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: min(560px, calc(100vh - 116px));
  min-height: 0;
  overflow: hidden;
  padding: 22px 20px 16px;
  position: sticky;
  top: 94px;
}

.todo-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.todo-kicker {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 3px;
}

.todo-head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.todo-date {
  color: var(--muted);
  font-size: 11px;
  padding-top: 3px;
}

.todo-body {
  flex: 1;
  margin-top: 16px;
  min-height: 62px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-color: rgba(23, 61, 43, 0.28) transparent;
  scrollbar-width: thin;
}

.todo-body::-webkit-scrollbar {
  width: 5px;
}

.todo-body::-webkit-scrollbar-thumb {
  background: rgba(23, 61, 43, 0.24);
  border-radius: var(--pill);
}

.todo-list {
  display: grid;
  gap: 5px;
  list-style: none;
}

.todo-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(23, 61, 43, 0.1);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 32px;
  padding: 5px 7px;
}

.todo-check {
  align-items: center;
  background: transparent;
  border: 1.5px solid rgba(23, 61, 43, 0.5);
  border-radius: 50%;
  color: var(--forest);
  display: inline-flex;
  height: 17px;
  justify-content: center;
  padding: 0;
  width: 17px;
}

.todo-check:disabled {
  cursor: default;
  opacity: 1;
}

.is-editing .todo-check:not(:disabled) {
  cursor: pointer;
}

.todo-item.is-done .todo-check {
  background: var(--lime-600);
  border-color: var(--forest);
}

.todo-item.is-done .todo-check::after {
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.todo-title-text {
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.todo-schedule {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-item.is-not-due .todo-check {
  border-style: dashed;
  opacity: 0.45;
}

.todo-item.is-not-due .todo-title-text {
  color: var(--ink-soft);
}

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

.todo-item-actions {
  display: none;
  gap: 3px;
}

.is-editing .todo-item-actions {
  display: flex;
}

.todo-item-action {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--forest);
  font-size: 13px;
  height: 22px;
  padding: 0;
  width: 22px;
}

.todo-item-action:hover {
  background: rgba(23, 61, 43, 0.09);
}

.todo-item-action.delete:hover {
  color: var(--danger);
}

.todo-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 9px 2px;
}

.todo-add {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(23, 61, 43, 0.14);
  color: var(--forest);
  display: none;
  font-size: 12px;
  font-weight: 750;
  margin-top: 8px;
  padding: 10px 2px 5px;
  text-align: left;
  width: 100%;
}

.is-editing .todo-add {
  display: block;
}

.week-todos {
  border-top: 1px solid rgba(23, 61, 43, 0.16);
  margin-top: 18px;
  padding-top: 16px;
}

.is-editing .week-todos {
  display: none;
}

.week-todo-head,
.week-todo-day-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.week-todo-head {
  margin-bottom: 14px;
}

.week-todo-head h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.week-todo-range,
.week-todo-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.week-todo-groups {
  display: grid;
  gap: 14px;
}

.week-todo-day {
  display: grid;
  gap: 6px;
}

.week-todo-day-label {
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
}

.week-todo-list {
  display: grid;
  gap: 4px;
  list-style: none;
}

.week-todo-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr);
  min-height: 29px;
  padding: 5px 8px;
}

.week-todo-marker {
  background: var(--lime-600);
  border: 1px solid rgba(23, 61, 43, 0.5);
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.week-todo-title {
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-notice {
  background: rgba(203, 242, 78, 0.18);
  border: 1px solid rgba(23, 61, 43, 0.2);
  border-radius: var(--radius-sm);
  color: var(--forest);
  font-size: 14px;
  gap: 10px;
  grid-area: notice;
  margin-top: 16px;
  padding: 12px 16px;
}

.mode-notice[hidden] {
  display: none;
}

.notice-dot {
  background: var(--lime-600);
  border: 2px solid var(--forest);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.groups {
  display: grid;
  gap: 52px;
  grid-area: groups;
  padding-top: 48px;
}

.group {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.group-header {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.group-title {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.folder-title-wrap {
  align-items: center;
  display: flex;
  gap: 12px;
}

.folder-mark {
  align-items: center;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--forest);
  display: none;
  height: 34px;
  justify-content: center;
  position: relative;
  width: 34px;
}

.folder-mark::before {
  border: 1.5px solid currentColor;
  border-radius: 3px;
  content: "";
  height: 11px;
  position: absolute;
  top: 12px;
  width: 17px;
}

.folder-mark::after {
  border-left: 1.5px solid currentColor;
  border-radius: 2px 2px 0 0;
  border-top: 1.5px solid currentColor;
  content: "";
  height: 4px;
  left: 9px;
  position: absolute;
  top: 9px;
  width: 8px;
}

.is-editing .folder-mark {
  display: flex;
}

.group-meta {
  color: var(--muted);
  font-size: 13px;
  gap: 10px;
}

.folder-actions {
  align-items: center;
  display: none;
  gap: 4px;
}

.is-editing .folder-actions {
  display: flex;
}

.folder-action {
  background: transparent;
  border: 0;
  border-radius: var(--pill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 9px;
}

.folder-action:hover {
  background: var(--cream-2);
  color: var(--ink);
}

.folder-action.delete:hover {
  color: var(--danger);
}

.category-add {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--forest);
  display: none;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 0;
}

.is-editing .category-add {
  display: inline-flex;
}

.card-grid {
  display: grid;
  gap: 22px 18px;
  grid-template-columns: repeat(auto-fill, 96px);
}

.folder-empty {
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  min-height: 94px;
  padding: 20px 24px;
}

.folder-empty button {
  background: transparent;
  border: 0;
  color: var(--forest);
  display: none;
  font-size: 13px;
  font-weight: 700;
}

.is-editing .folder-empty button {
  display: inline-flex;
}

.link-card {
  height: 108px;
  position: relative;
  transition: opacity 0.16s ease, transform 0.16s ease;
  width: 96px;
}

.is-editing .link-card.is-draggable {
  cursor: grab;
  touch-action: none;
}

.is-editing .card-link {
  pointer-events: none;
}

.is-editing .link-card.is-draggable:active {
  cursor: grabbing;
}

.link-card.is-dragging {
  opacity: 0.3;
  transform: scale(0.94);
}

.is-dragging-link {
  cursor: grabbing;
  user-select: none;
}

.drag-ghost {
  filter: drop-shadow(0 18px 20px rgba(14, 42, 29, 0.18));
  opacity: 0.94;
  pointer-events: none;
  position: fixed;
  transform: rotate(2deg) scale(1.04);
  z-index: 100;
}

.group.is-drop-target {
  background: rgba(203, 242, 78, 0.09);
  border-radius: var(--radius);
  box-shadow: 0 0 0 2px rgba(23, 61, 43, 0.18);
}

.link-card.is-drop-before::before {
  background: var(--lime-600);
  border-radius: var(--pill);
  content: "";
  height: 92px;
  left: -10px;
  position: absolute;
  top: 0;
  width: 3px;
  z-index: 8;
}

.is-editing .folder-empty {
  transition: background 0.16s ease, border-color 0.16s ease;
}

.is-editing .group.is-drop-target .folder-empty {
  background: rgba(203, 242, 78, 0.12);
  border-color: var(--forest);
}

.card-link {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 108px;
  position: relative;
  width: 96px;
}

.site-mark {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(21, 48, 36, 0.06);
  color: var(--forest);
  display: flex;
  font-family: var(--serif);
  font-size: 28px;
  font-style: italic;
  font-weight: 700;
  height: 72px;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  width: 72px;
}

.site-mark img {
  height: 42px;
  object-fit: contain;
  width: 42px;
}

.link-card:hover .site-mark,
.card-link:focus-visible .site-mark {
  border-color: rgba(23, 61, 43, 0.3);
  box-shadow: 0 12px 26px rgba(21, 48, 36, 0.12);
  transform: translateY(-3px);
}

.shortcut-name {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink-soft);
  display: -webkit-box;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-align: center;
  transition: color 0.18s ease;
  width: 96px;
}

.link-card:hover .shortcut-name,
.card-link:focus-visible .shortcut-name {
  color: var(--forest);
}

.card-actions {
  display: none;
  gap: 4px;
  position: absolute;
  right: 1px;
  top: -10px;
  z-index: 6;
}

.is-editing .card-actions {
  display: flex;
}

.card-action {
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(21, 48, 36, 0.12);
  color: var(--ink-soft);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 27px;
  justify-content: center;
  padding: 0;
  width: 27px;
}

.card-action:hover {
  background: var(--white);
  color: var(--ink);
}

.card-action.delete:hover {
  color: var(--danger);
}

.site-preview {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(14, 42, 29, 0.24);
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  width: 340px;
  z-index: 40;
}

.site-preview[hidden] {
  display: none;
}

.preview-frame {
  aspect-ratio: 16 / 9;
  background: var(--cream-2);
  overflow: hidden;
  position: relative;
}

.preview-frame::after {
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.68) 48%, transparent 76%);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
  animation: preview-shimmer 1.25s ease-in-out infinite;
}

.preview-frame img {
  height: 100%;
  object-fit: cover;
  opacity: 0;
  position: relative;
  transition: opacity 0.2s ease;
  width: 100%;
  z-index: 2;
}

.preview-loading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 1;
}

.site-preview.is-loaded .preview-frame img {
  opacity: 1;
}

.site-preview.is-loaded .preview-frame::after,
.site-preview.is-error .preview-frame::after {
  animation: none;
  opacity: 0;
}

.preview-meta {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 14px;
}

.preview-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-meta span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes preview-shimmer {
  to { transform: translateX(100%); }
}

.admin-only {
  display: none;
}

.is-editing .admin-only {
  display: inline-flex;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  grid-area: empty;
  margin-top: 48px;
  padding: 56px 24px;
  text-align: center;
}

.empty-mark {
  color: var(--forest);
  display: block;
  font-family: var(--serif);
  font-size: 38px;
  font-style: italic;
  margin-bottom: 12px;
}

.empty-state h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.empty-state p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.site-footer {
  background: var(--forest-2);
  color: rgba(246, 245, 239, 0.66);
}

.footer-inner {
  align-items: center;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  min-height: 104px;
}

.footer-inner p:first-child {
  color: var(--cream);
  font-weight: 700;
}

.modal {
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: 0 36px 100px -35px rgba(14, 42, 29, 0.72);
  color: var(--ink);
  margin: auto;
  max-height: calc(100vh - 32px);
  max-width: 620px;
  padding: 0;
  width: calc(100% - 32px);
}

.modal-small {
  max-width: 480px;
}

.modal::backdrop {
  backdrop-filter: blur(7px);
  background: rgba(14, 42, 29, 0.46);
}

.modal form {
  padding: 30px;
}

.modal-head {
  justify-content: space-between;
}

.modal-kicker {
  color: var(--forest);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.modal h2 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  width: 40px;
}

.icon-button:hover {
  background: var(--cream-2);
}

.modal-description {
  color: var(--muted);
  font-size: 14px;
  margin-top: 20px;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: 24px;
}

.reminder-field {
  border: 0;
  margin-top: 20px;
  min-width: 0;
}

.reminder-label-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.reminder-label-row legend {
  font-size: 14px;
  font-weight: 700;
}

.reminder-everyday,
.specific-date-add {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  color: var(--forest);
  font-size: 12px;
  font-weight: 750;
  padding: 7px 11px;
}

.reminder-everyday.is-active {
  background: var(--lime);
  border-color: var(--forest);
}

.weekday-picker {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 10px;
}

.weekday-picker label {
  cursor: pointer;
  min-width: 0;
}

.weekday-picker input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.weekday-picker span {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  transition: 0.16s ease;
}

.weekday-picker input:checked + span {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}

.weekday-picker input:focus-visible + span {
  outline: 3px solid rgba(183, 226, 44, 0.48);
  outline-offset: 2px;
}

.specific-date-row {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
}

.specific-date-row input {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  min-height: 40px;
  padding: 8px 11px;
}

.selected-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.selected-date-list:empty {
  display: none;
}

.selected-date-chip {
  align-items: center;
  background: rgba(203, 242, 78, 0.3);
  border: 1px solid rgba(23, 61, 43, 0.18);
  border-radius: var(--pill);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  padding: 5px 7px 5px 10px;
}

.selected-date-chip button {
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  height: 20px;
  line-height: 1;
  padding: 0;
  width: 20px;
}

.selected-date-chip button:hover {
  background: rgba(23, 61, 43, 0.1);
}

.reminder-help {
  color: var(--muted);
  font-size: 12px;
  margin-top: 9px;
}

.field {
  display: block;
  margin-top: 16px;
}

.field-grid .field {
  margin-top: 0;
}

.field > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

.field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field input,
.field select {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: 0;
  padding: 13px 14px;
  transition: 0.18s ease;
  width: 100%;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--forest) 50%), linear-gradient(135deg, var(--forest) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  padding-right: 38px;
}

.field input:focus,
.field select:focus {
  border-color: var(--forest);
  outline: 3px solid rgba(183, 226, 44, 0.36);
  outline-offset: 2px;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  padding-top: 10px;
}

.modal-actions {
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.toast {
  background: var(--ink);
  border: 1px solid rgba(246, 245, 239, 0.15);
  border-radius: var(--pill);
  bottom: 24px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  left: 50%;
  opacity: 0;
  padding: 12px 18px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 14px);
  transition: 0.22s ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .workspace-layout {
    grid-template-areas:
      "dock"
      "todo"
      "notice"
      "groups"
      "empty";
    grid-template-columns: 1fr;
  }

  .todo-panel {
    height: auto;
    margin-top: 18px;
    max-height: 360px;
    min-height: 180px;
    position: static;
  }
}

@media (max-width: 580px) {
  :root {
    --pad: 18px;
  }

  .header-inner {
    height: 64px;
  }

  .brand-divider,
  .shared-badge,
  .button-icon {
    display: none;
  }

  .brand-name {
    display: none;
  }

  .brand-product {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
  }

  .header-actions .button {
    padding-inline: 13px;
  }

  .workspace {
    padding-bottom: 64px;
    padding-top: 28px;
  }

  .command-dock {
    border-radius: 24px;
    min-height: 0;
    padding: 12px;
  }

  .workspace-layout {
    column-gap: 0;
  }

  .todo-panel {
    border-radius: 24px;
    margin-top: 12px;
    max-height: 320px;
    min-height: 150px;
    padding: 16px;
  }

  .search-field {
    padding-left: 13px;
  }

  .search-field input {
    font-size: 16px;
    padding-inline: 10px;
  }

  .search-field kbd {
    display: none;
  }

  .dock-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 13px 4px 2px;
  }

  .dock-actions,
  .is-editing .dock-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    width: 100%;
  }

  .dock-actions .button {
    width: 100%;
  }

  .groups {
    gap: 40px;
    padding-top: 48px;
  }

  .group-header {
    align-items: flex-start;
    gap: 12px;
  }

  .group-meta {
    align-items: flex-end;
    flex-direction: column;
  }

  .folder-title-wrap {
    align-items: flex-start;
  }

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

  .weekday-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .specific-date-row {
    grid-template-columns: 1fr;
  }

  .specific-date-add {
    justify-self: start;
  }

  .card-grid {
    gap: 20px 14px;
    grid-template-columns: repeat(auto-fill, 80px);
  }

  .link-card,
  .card-link {
    height: 98px;
    width: 80px;
  }

  .site-mark {
    height: 64px;
    width: 64px;
  }

  .site-mark {
    border-radius: 18px;
  }

  .site-mark img {
    height: 38px;
    width: 38px;
  }

  .shortcut-name {
    font-size: 12px;
    width: 80px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
  }

  .modal {
    border-radius: 22px;
  }

  .modal form {
    padding: 23px 20px;
  }

  .modal-actions .button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
