:root {
  --bg: #ffffff;
  --surface: #f4f4f1;
  --surface-hover: #eeeeea;
  --ink: #111111;
  --muted: #6f6f69;
  --line: #deded8;
  --accent: #5e6ad2;
  --accent-soft: #f0f1fa;
  --danger: #c65347;
  --danger-soft: #fbefed;
  --status-done: #2f7357;
  --status-done-soft: #edf6f1;
  --status-doing: #405fc1;
  --status-doing-soft: #edf1fb;
  --status-issue: #b94b43;
  --status-issue-soft: #fbefed;
  --status-waiting: #766f62;
  --status-waiting-soft: #f3f1ed;
  --radius: 12px;
  --page-width: 1120px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.composer-open {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.35;
}

[hidden] {
  display: none !important;
}

.fatal-message {
  padding: 20px;
  color: #fff;
  background: var(--danger);
  text-align: center;
}

.button,
.icon-button,
.profile-button,
.profile-menu-item {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.button {
  padding: 0 14px;
  white-space: nowrap;
}

.button:hover,
.icon-button:hover,
.profile-button:hover {
  border-color: #c4c4bd;
  background: var(--surface);
}

.button-primary,
.button-accent {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button-primary:hover,
.button-accent:hover {
  border-color: #292929;
  background: #292929;
}

.button-large {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.button-small {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
}

.button-icon {
  width: 32px;
  padding: 0;
}

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

.button-danger:hover {
  border-color: #efd1cd;
  color: #9d3e35;
  background: var(--danger-soft);
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 22px;
}

.login-gate {
  display: grid;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  place-items: center;
}

.login-card {
  width: min(100%, 400px);
  padding: 12px 0;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(38px, 10vw, 54px);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.login-description {
  margin: 26px 0 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.google-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  place-items: center;
}

.login-status {
  min-height: 21px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.workspace {
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  width: min(100%, var(--page-width));
  min-height: 74px;
  margin: 0 auto;
  padding: 13px 24px;
  align-items: center;
  gap: 28px;
}

.event-title {
  display: flex;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
  align-items: center;
}

.event-title strong {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-search {
  display: flex;
  width: min(240px, 22vw);
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  align-items: center;
  gap: 7px;
}

.topbar-search:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.profile-wrap {
  position: relative;
}

.profile-button {
  display: grid;
  width: 38px;
  padding: 0;
  border-color: var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  place-items: center;
}

.profile-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.12);
}

.profile-summary {
  display: grid;
  padding: 16px;
  gap: 6px;
}

.profile-summary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.profile-summary span {
  color: var(--muted);
  font-size: 12px;
}

.profile-divider {
  height: 1px;
  background: var(--line);
}

.profile-menu-item {
  width: 100%;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  text-align: left;
}

.profile-menu-item:hover {
  background: var(--surface);
}

.main-content {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 64px 24px calc(88px + env(safe-area-inset-bottom));
}

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.view-header h1 {
  margin: 0 0 10px;
  font-size: clamp(29px, 4.5vw, 40px);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 1;
}

.view-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.completion-block {
  display: flex;
  color: var(--muted);
  align-items: baseline;
  gap: 10px;
}

.completion-block strong {
  color: var(--ink);
  font-size: 34px;
  font-weight: 520;
  letter-spacing: -0.05em;
}

.completion-block > span {
  font-size: 13px;
  font-weight: 650;
}

.completion-track {
  height: 5px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface);
}

.completion-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 280ms ease;
}

.status-cards {
  display: flex;
  margin: 22px 0 42px;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-card {
  display: inline-flex;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  align-items: center;
  gap: 7px;
}

.stat-card:hover {
  background: var(--surface);
}

.stat-card.active {
  box-shadow: inset 0 0 0 1px currentColor;
}

.stat-card strong {
  color: inherit;
  font-size: 12px;
}

.stat-label {
  font-size: 12px;
  font-weight: 650;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a6a69f;
}

.stat-dot.done {
  background: var(--status-done);
}

.stat-dot.doing {
  background: var(--status-doing);
}

.stat-dot.issue {
  background: var(--status-issue);
}

.stat-dot.waiting {
  background: var(--status-waiting);
}

.stat-card.status-done {
  border-color: #cfe2d8;
  color: var(--status-done);
  background: var(--status-done-soft);
}

.stat-card.status-doing {
  border-color: #d2d9f0;
  color: var(--status-doing);
  background: var(--status-doing-soft);
}

.stat-card.status-issue {
  border-color: #ebcfca;
  color: var(--status-issue);
  background: var(--status-issue-soft);
}

.stat-card.status-waiting {
  border-color: #ded9d0;
  color: var(--status-waiting);
  background: var(--status-waiting-soft);
}

.category {
  border-top: 1px solid var(--ink);
}

.category:last-child {
  border-bottom: 1px solid var(--line);
}

.category-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 12px;
}

.category-toggle {
  display: grid;
  min-width: 0;
  min-height: 65px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: left;
  align-items: center;
  grid-template-columns: 20px 34px minmax(0, 1fr) minmax(90px, 170px);
  gap: 8px;
  flex: 1;
}

.category-toggle:focus-visible {
  border-radius: 7px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.category-chevron {
  color: var(--muted);
  font-size: 18px;
  transform: rotate(-90deg);
  transition: transform 150ms ease;
}

.category.is-expanded .category-chevron {
  transform: rotate(0deg);
}

.category-number {
  color: #aaa9a2;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.category-title {
  overflow: hidden;
  font-size: 15px;
  font-weight: 660;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-progress {
  display: grid;
  color: var(--muted);
  font-size: 11px;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
}

.category-progress > span {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.category-progress i {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface);
}

.category-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.category-add {
  margin-right: 2px;
}

.category-content {
  border-top: 1px solid var(--line);
}

.task-list {
  display: grid;
}

.task-row {
  position: relative;
  display: grid;
  min-height: 65px;
  padding: 11px 4px 11px 10px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 100px auto;
  gap: 14px;
  transition: background 120ms ease, opacity 120ms ease;
}

.task-row::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--status-waiting);
  content: "";
  opacity: 0.8;
}

.task-row[data-status="완료"]::before {
  background: var(--status-done);
}

.task-row[data-status="진행중"]::before {
  background: var(--status-doing);
}

.task-row[data-status="이슈"]::before {
  background: var(--status-issue);
}

.task-row:hover {
  background: #fbfbf9;
}

.task-row.dragging {
  opacity: 0.45;
}

.task-row.drag-over {
  box-shadow: inset 0 2px var(--accent);
}

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

.drag-handle {
  display: grid;
  width: 18px;
  height: 22px;
  color: #b0b0aa;
  font-size: 15px;
  line-height: 1;
  cursor: grab;
  flex: 0 0 auto;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.task-check {
  display: grid;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  padding: 0;
  border: 1.5px solid #b9b9b2;
  border-radius: 6px;
  color: #fff;
  background: #fff;
  font-size: 13px;
  line-height: 1;
  flex: 0 0 auto;
  place-items: center;
}

button.task-check:hover {
  border-color: var(--accent);
}

.is-complete .task-check {
  border-color: var(--accent);
  background: var(--accent);
}

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

.task-title {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 570;
  letter-spacing: -0.012em;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.task-meta {
  display: flex;
  min-width: 0;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.task-assignee::before {
  content: "담당 ";
  color: #aaa9a2;
}

.task-note {
  margin-top: 8px;
  color: var(--ink);
}

.task-note summary {
  width: fit-content;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  list-style-position: inside;
  user-select: none;
  -webkit-user-select: none;
}

.task-note summary:hover {
  text-decoration: underline;
}

.task-note-body {
  position: relative;
  margin-top: 8px;
  padding: 12px 76px 12px 13px;
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  user-select: text;
  -webkit-user-select: text;
}

.task-note-body p {
  margin: 0;
  color: #353538;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.task-note-body a {
  color: #3846bd;
  font-weight: 620;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.memo-copy-button {
  position: absolute;
  top: 9px;
  right: 9px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #d7d9ee;
  border-radius: 6px;
  color: var(--accent);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
}

.memo-copy-button:hover {
  border-color: var(--accent);
}

.deadline {
  white-space: nowrap;
}

.deadline-overdue,
.deadline-soon {
  color: var(--danger);
}

.is-complete .task-title {
  color: #8b8b85;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.is-complete .task-meta {
  color: #a3a39d;
}

.task-state {
  display: flex;
  justify-content: flex-end;
}

.status-control {
  width: 92px;
  height: 31px;
  padding: 0 25px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  color: var(--status-waiting);
  background: var(--status-waiting-soft);
  font-size: 11px;
  font-weight: 650;
}

.status-control[data-status="완료"] {
  border-color: #c5ddd1;
  color: var(--status-done);
  background: var(--status-done-soft);
}

.status-control[data-status="진행중"] {
  border-color: #ccd5ef;
  color: var(--status-doing);
  background: var(--status-doing-soft);
}

.status-control[data-status="이슈"] {
  border-color: #e7c8c3;
  color: var(--status-issue);
  background: var(--status-issue-soft);
}

.status-control[data-status="대기"] {
  border-color: #dad5cb;
  color: var(--status-waiting);
  background: var(--status-waiting-soft);
}

.status-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.status-pill {
  display: inline-flex;
  min-width: 66px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #dad5cb;
  color: var(--status-waiting);
  background: var(--status-waiting-soft);
  font-size: 11px;
  font-weight: 650;
  align-items: center;
  justify-content: center;
}

.status-pill[data-status="완료"] {
  border-color: #c5ddd1;
  color: var(--status-done);
  background: var(--status-done-soft);
}

.status-pill[data-status="진행중"] {
  border-color: #ccd5ef;
  color: var(--status-doing);
  background: var(--status-doing-soft);
}

.status-pill[data-status="이슈"] {
  border-color: #e7c8c3;
  color: var(--status-issue);
  background: var(--status-issue-soft);
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.composer-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  visibility: hidden;
  justify-items: end;
  pointer-events: none;
}

.composer-layer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.composer-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  opacity: 0;
  background: rgba(17, 17, 17, 0.28);
  transition: opacity 160ms ease;
}

.composer-layer.is-open .composer-backdrop {
  opacity: 1;
}

.task-composer {
  position: relative;
  z-index: 1;
  width: min(440px, 100vw);
  height: 100dvh;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 48px rgba(17, 17, 17, 0.12);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.composer-layer.is-open .task-composer {
  transform: translateX(0);
}

.task-composer-form {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.composer-heading {
  display: flex;
  padding: max(20px, env(safe-area-inset-top)) 22px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
}

.composer-context {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.composer-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.composer-body {
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.composer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

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

.field-full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea,
.category-create-form input,
.member-form input[type="email"],
.category-name-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.category-create-form input:focus,
.member-form input[type="email"]:focus,
.category-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.composer-actions {
  display: flex;
  padding: 15px 22px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.empty-state {
  display: grid;
  min-height: 110px;
  padding: 28px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  place-content: center;
  gap: 7px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.notice {
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.55;
}

.notice-error {
  border-color: #efd1cd;
  color: var(--danger);
  background: var(--danger-soft);
}

.notice-pending {
  border-color: #dedfc8;
  color: #676a33;
  background: #f8f8e9;
}

.dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(84dvh, 820px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(17, 17, 17, 0.18);
}

.dialog::backdrop {
  background: rgba(17, 17, 17, 0.28);
  backdrop-filter: blur(3px);
}

.dialog-header,
.dialog-footer {
  display: flex;
  padding: 20px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-header {
  border-bottom: 1px solid var(--line);
}

.dialog-footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.dialog-header h2,
.manage-section h3 {
  margin: 0;
}

.dialog-header h2 {
  font-size: 21px;
}

.dialog-subtitle,
.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dialog-body {
  max-height: calc(84dvh - 146px);
  padding: 22px;
  overflow: auto;
}

.manage-section + .manage-section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h3 {
  font-size: 16px;
}

.category-create-form {
  display: flex;
  min-width: min(330px, 100%);
  gap: 8px;
}

.manage-list {
  border-top: 1px solid var(--ink);
}

.manage-row {
  display: flex;
  min-height: 66px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manage-main {
  display: grid;
  min-width: 0;
  gap: 5px;
  flex: 1;
}

.manage-main small {
  color: var(--muted);
}

.manage-main-editable {
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.category-name-input {
  min-height: 38px;
}

.manage-actions,
.member-permissions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.member-permissions label,
.member-form label {
  display: flex;
  color: var(--muted);
  font-size: 12px;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.member-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.member-title-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.permission-state {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
}

.permission-state.pending {
  color: var(--danger);
  background: var(--danger-soft);
}

.member-form {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  gap: 10px;
}

.member-form input[type="email"] {
  min-width: 220px;
  flex: 1;
}

.seed-box {
  display: flex;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.seed-box h3 {
  margin: 0 0 5px;
}

.seed-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  box-shadow: 0 12px 36px rgba(17, 17, 17, 0.2);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--danger);
}

@media (max-width: 860px) {
  .topbar-inner {
    min-height: 0;
    padding: 14px 18px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .event-title {
    width: calc(100% - 48px);
  }

  .event-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    order: 2;
  }

  .topbar-search {
    width: auto;
    min-width: 130px;
    flex: 1;
  }

  .profile-wrap {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    right: 18px;
  }

  .main-content {
    padding: 44px 18px calc(72px + env(safe-area-inset-bottom));
  }

  .task-row {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .task-actions {
    grid-column: 1 / -1;
    padding-left: 32px;
    justify-content: flex-start;
  }

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

  .field-wide {
    grid-column: 1 / -1;
  }

  .section-heading,
  .manage-row,
  .member-form {
    align-items: stretch;
    flex-direction: column;
  }

  .category-create-form {
    min-width: 0;
  }

  .manage-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .event-title strong {
    font-size: 11px;
  }

  .topbar-actions .button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  .topbar-search {
    flex-basis: 100%;
  }

  .main-content {
    padding-top: 24px;
  }

  .view-header {
    align-items: center;
    gap: 14px;
  }

  .view-header h1 {
    margin-bottom: 5px;
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.045em;
  }

  .view-header p {
    font-size: 12px;
  }

  .completion-block {
    gap: 5px;
  }

  .completion-block strong {
    font-size: 24px;
  }

  .completion-block > span {
    font-size: 11px;
  }

  .completion-track {
    height: 4px;
    margin-top: 14px;
  }

  .status-cards {
    margin: 12px -2px 24px;
    padding: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .status-cards::-webkit-scrollbar {
    display: none;
  }

  .stat-card {
    height: 31px;
    padding: 0 10px;
    flex: 0 0 auto;
  }

  .category-toggle {
    grid-template-columns: 17px 28px minmax(0, 1fr) 70px;
  }

  .category-progress {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .category-progress > span {
    text-align: left;
  }

  .category-add {
    padding: 0 8px;
  }

  .task-row {
    padding: 13px 2px 13px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .task-meta {
    display: grid;
    gap: 3px;
  }

  .task-note-body {
    padding: 12px;
    padding-top: 46px;
  }

  .memo-copy-button {
    top: 10px;
    left: 12px;
    right: auto;
  }

  .status-control {
    width: 78px;
    padding-left: 8px;
    font-size: 10px;
  }

  .task-actions {
    padding-left: 32px;
  }

  .task-composer {
    width: 100vw;
    border-left: 0;
    box-shadow: none;
  }

  .composer-heading {
    padding: max(16px, env(safe-area-inset-top)) 16px 14px;
  }

  .composer-body {
    padding: 18px 16px;
  }

  .composer-actions {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .composer-actions .button {
    min-height: 44px;
    flex: 1;
  }

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

  .field,
  .field-wide,
  .field-full {
    grid-column: 1;
  }

  .dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 13px;
  }

  .dialog-body {
    max-height: calc(100dvh - 166px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .manage-main-editable {
    grid-template-columns: 1fr;
  }

  .member-permissions {
    width: 100%;
  }

  .seed-box {
    align-items: stretch;
    flex-direction: column;
  }
}

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