:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-depth: #e8edf6;
  --bg-elev: rgba(255, 255, 255, 0.94);
  --bg-soft: #f8fbff;
  --bg-strong: #ffffff;
  --surface-tint: rgba(0, 95, 184, 0.08);
  --surface-tint-strong: rgba(0, 95, 184, 0.14);
  --text: #0d121b;
  --text-strong: #06080d;
  --muted: #46546d;
  --border: rgba(13, 18, 27, 0.2);
  --border-strong: rgba(13, 18, 27, 0.4);
  --primary: #005fb8;
  --primary-strong: #003f7a;
  --primary-soft: rgba(0, 95, 184, 0.16);
  --accent: #9a6700;
  --accent-soft: rgba(154, 103, 0, 0.14);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.12);
  --shadow: 0 28px 64px rgba(18, 33, 59, 0.12);
  --card-shadow: 0 18px 38px rgba(18, 33, 59, 0.08);
  --focus-ring: 0 0 0 4px rgba(0, 95, 184, 0.18);
  --overlay: rgba(15, 23, 42, 0.44);
  --hero-glow-a: rgba(0, 95, 184, 0.15);
  --hero-glow-b: rgba(154, 103, 0, 0.12);
  --ambient-a: rgba(0, 95, 184, 0.12);
  --ambient-b: rgba(0, 118, 162, 0.1);
  --ambient-c: rgba(154, 103, 0, 0.08);
  --selection: rgba(0, 95, 184, 0.16);
}

html[data-theme="dark"],
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000c18;
  --bg-depth: #021729;
  --bg-elev: rgba(6, 27, 47, 0.9);
  --bg-soft: rgba(7, 34, 59, 0.9);
  --bg-strong: #041a2f;
  --surface-tint: rgba(117, 190, 255, 0.08);
  --surface-tint-strong: rgba(117, 190, 255, 0.14);
  --text: #d9ecff;
  --text-strong: #f6fbff;
  --muted: #90aac6;
  --border: rgba(117, 190, 255, 0.18);
  --border-strong: rgba(117, 190, 255, 0.36);
  --primary: #75beff;
  --primary-strong: #3f9fff;
  --primary-soft: rgba(117, 190, 255, 0.16);
  --accent: #ffd36f;
  --accent-soft: rgba(255, 211, 111, 0.16);
  --danger: #ff8da1;
  --danger-soft: rgba(255, 141, 161, 0.12);
  --shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  --card-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  --focus-ring: 0 0 0 4px rgba(117, 190, 255, 0.18);
  --overlay: rgba(1, 6, 13, 0.58);
  --hero-glow-a: rgba(117, 190, 255, 0.13);
  --hero-glow-b: rgba(255, 211, 111, 0.08);
  --ambient-a: rgba(117, 190, 255, 0.1);
  --ambient-b: rgba(32, 151, 194, 0.08);
  --ambient-c: rgba(255, 211, 111, 0.05);
  --selection: rgba(117, 190, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: "Instrument Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--ambient-a), transparent 32%),
    radial-gradient(circle at right 18%, var(--ambient-c), transparent 24%),
    linear-gradient(180deg, var(--bg-depth), var(--bg));
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
  opacity: 0.72;
  z-index: 0;
}

body::before {
  top: -10rem;
  right: -10rem;
  background: radial-gradient(circle, var(--ambient-a) 0%, transparent 70%);
  animation: ambient-drift 20s ease-in-out infinite alternate;
}

body::after {
  left: -12rem;
  bottom: -14rem;
  background: radial-gradient(circle, var(--ambient-b) 0%, transparent 72%);
  animation: ambient-drift 24s ease-in-out infinite alternate-reverse;
}

::selection {
  background: var(--selection);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}

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

button {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 86%, transparent);
}

.layout {
  width: min(1400px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
  position: relative;
  z-index: 1;
}

.hero,
.metric,
.board-wrapper,
.panel,
.column,
.card,
.toolbar,
.context-list li,
.comment-image-preview,
.metrics-help-item,
.empty {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero,
.metric,
.board-wrapper,
.panel {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero::before,
.metric::before,
.board-wrapper::before,
.panel::before,
.column::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.12) 28%, transparent 48%),
    radial-gradient(circle at top right, var(--surface-tint), transparent 38%);
  opacity: 0.75;
  transform: translateX(-16%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 32px 34px;
  margin-bottom: 18px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, var(--hero-glow-a), transparent 40%),
    radial-gradient(circle at 88% 22%, var(--hero-glow-b), transparent 20%),
    var(--bg-elev);
  animation: surface-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -38% 26%;
  height: 65%;
  background: linear-gradient(90deg, transparent, var(--surface-tint-strong), transparent);
  transform: rotate(-8deg);
  opacity: 0.5;
  pointer-events: none;
  animation: hero-sheen 12s linear infinite;
}

.hero-copy {
  display: grid;
  gap: 12px;
}

.header-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-items: end;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  line-height: 1.04;
  max-width: none;
}

.hero-text {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-side-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  min-height: 138px;
  padding: 18px 20px;
  border-radius: 24px;
  display: grid;
  gap: 6px;
  align-content: start;
  animation: surface-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.metrics .metric:nth-child(1) {
  animation-delay: 40ms;
}

.metrics .metric:nth-child(2) {
  animation-delay: 90ms;
}

.metrics .metric:nth-child(3) {
  animation-delay: 140ms;
}

.metrics .metric:nth-child(4) {
  animation-delay: 190ms;
}

.metric::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent 75%);
  opacity: 0.9;
}

.metric-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-headline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-circle-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  line-height: 0;
}

.help-circle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric strong {
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
  color: var(--text-strong);
}

.metric small {
  color: var(--muted);
  line-height: 1.45;
}

.metric-highlight {
  background:
    linear-gradient(145deg, var(--primary-soft), transparent 52%),
    var(--bg-elev);
}

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

.board-wrapper {
  padding: 20px;
  border-radius: 30px;
  animation: surface-rise 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 140ms;
}

.toolbar-shell {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.toolbar-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-copy h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 220px;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    color-mix(in srgb, var(--bg-soft) 92%, var(--surface-tint) 8%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.toolbar-primary {
  white-space: nowrap;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 84%, var(--bg-strong));
  background: color-mix(in srgb, var(--bg-soft) 92%, var(--bg-strong) 8%);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--primary) 62%, var(--border));
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 10px;
}

.row.two > div {
  flex: 1;
}

.row.actions {
  justify-content: flex-end;
  margin-top: 8px;
}

.hint {
  color: var(--muted);
}

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

.btn {
  border: 1px solid color-mix(in srgb, var(--border) 88%, var(--bg-strong));
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  background: color-mix(in srgb, var(--bg-soft) 76%, var(--bg-strong) 24%);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.btn.primary {
  color: #f8fbff;
  border-color: color-mix(in srgb, var(--primary-strong) 72%, transparent);
  background:
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 16px 30px color-mix(in srgb, var(--primary) 26%, transparent);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 18px 36px color-mix(in srgb, var(--primary) 34%, transparent);
}

.btn.ghost {
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
}

.btn.danger {
  background: color-mix(in srgb, var(--danger-soft) 86%, transparent);
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
  color: color-mix(in srgb, var(--danger) 78%, var(--text));
}

body[data-theme="dark"] .btn.danger {
  color: #ffd4db;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-inline: 14px 18px;
}

.theme-icon {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.24s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(-14deg) scale(1.06);
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.column {
  min-width: 0;
  min-height: 420px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--border) 92%, var(--bg-strong));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 22%),
    color-mix(in srgb, var(--bg-soft) 92%, var(--surface-tint) 8%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
  animation: surface-rise 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.board .column:nth-child(1) {
  animation-delay: 180ms;
}

.board .column:nth-child(2) {
  animation-delay: 240ms;
}

.board .column:nth-child(3) {
  animation-delay: 300ms;
}

.column.drop-active {
  border-color: color-mix(in srgb, var(--primary) 68%, var(--border));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--primary) 34%, transparent),
    0 18px 34px color-mix(in srgb, var(--primary) 12%, transparent);
  background: color-mix(in srgb, var(--bg-soft) 84%, var(--primary-soft) 16%);
  transform: translateY(-2px);
}

.column-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.column-head h3 {
  font-size: 1.08rem;
}

.column-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.column-head span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
  background: color-mix(in srgb, var(--bg-strong) 74%, var(--surface-tint) 26%);
  color: var(--text-strong);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%),
    var(--bg-strong);
  box-shadow: var(--card-shadow);
  cursor: grab;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
  box-shadow: 0 22px 42px color-mix(in srgb, black 8%, transparent);
}

.card.selected {
  border-color: color-mix(in srgb, var(--primary) 56%, var(--border));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--primary) 44%, transparent),
    0 20px 38px color-mix(in srgb, var(--primary) 12%, transparent);
}

.card.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, var(--primary-soft) 44%, transparent 64%);
  opacity: 0.42;
  animation: selected-sweep 6s linear infinite;
}

.card.dragging {
  opacity: 0.48;
  cursor: grabbing;
}

.card-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.card h4 {
  font-size: 1.02rem;
  line-height: 1.18;
}

.card-date {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.78rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-meta-row,
.label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 88%, var(--bg-strong) 12%);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.pill.status {
  color: var(--text);
}

.pill.label {
  font-weight: 600;
}

.pill.priority-low {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.34);
}

.pill.priority-medium {
  color: #005fb8;
  border-color: rgba(0, 95, 184, 0.3);
}

.pill.priority-high {
  color: #9a6700;
  border-color: rgba(154, 103, 0, 0.34);
}

.pill.priority-critical {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.36);
}

body[data-theme="dark"] .pill.priority-low {
  color: #7ee6d2;
  border-color: rgba(126, 230, 210, 0.34);
}

body[data-theme="dark"] .pill.priority-medium {
  color: #8dd0ff;
  border-color: rgba(141, 208, 255, 0.34);
}

body[data-theme="dark"] .pill.priority-high {
  color: #ffd98d;
  border-color: rgba(255, 217, 141, 0.34);
}

body[data-theme="dark"] .pill.priority-critical {
  color: #ff9bad;
  border-color: rgba(255, 155, 173, 0.34);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  min-width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1;
}

.empty {
  min-height: 94px;
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    color-mix(in srgb, var(--bg-soft) 84%, transparent);
}

.form-overlay,
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--overlay);
  backdrop-filter: blur(7px);
  animation: overlay-fade 220ms ease both;
}

.notice-overlay {
  z-index: 60;
}

.panel {
  padding: 20px;
  border-radius: 28px;
  animation: modal-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-panel {
  width: min(820px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.context-modal-panel {
  width: min(900px, 96vw);
}

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

.task-form {
  display: grid;
  gap: 10px;
}

.task-form label {
  font-size: 0.92rem;
  font-weight: 700;
}

.notice-panel {
  width: min(620px, 96vw);
  display: grid;
  gap: 12px;
}

.notice-head h3 {
  font-size: 1.15rem;
}

.notice-text {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.metrics-help-panel {
  width: min(760px, 96vw);
}

.metrics-help-list {
  display: grid;
  gap: 12px;
}

.metrics-help-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-soft) 88%, var(--bg-strong) 12%);
}

.metrics-help-item h3,
.metrics-help-item p,
.metrics-help-item small {
  margin: 0;
}

.metrics-help-item p {
  line-height: 1.55;
}

.metrics-help-item small {
  color: var(--muted);
  line-height: 1.45;
}

.context-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%),
    color-mix(in srgb, var(--bg-soft) 92%, var(--bg-strong) 8%);
  display: grid;
  gap: 10px;
}

.context-modal-panel .context-panel {
  margin-top: 0;
}

.context-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.context-task-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.context-modal-panel .context-task-meta strong {
  font-size: 1rem;
}

.context-comment-box {
  display: grid;
  gap: 10px;
}

.context-comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.context-tabs-wrap {
  display: grid;
  gap: 8px;
}

.context-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-comment-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.context-comment-hints {
  display: grid;
  gap: 2px;
  flex: 1 1 240px;
  justify-items: end;
  text-align: right;
}

.tab-btn {
  padding: 8px 12px;
}

.tab-btn.active {
  border-color: color-mix(in srgb, var(--primary) 54%, var(--border));
  color: var(--text-strong);
  background: color-mix(in srgb, var(--primary-soft) 78%, var(--bg-strong) 22%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent);
}

.context-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.context-list li {
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 22%),
    var(--bg-strong);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.context-list p,
.context-empty {
  margin: 0;
}

.context-list small,
.context-empty {
  color: var(--muted);
}

.comment-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 82%, transparent);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.comment-image-preview {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--bg-elev);
}

.comment-image-preview img,
.comment-image {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
}

.comment-image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-attachment-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}

.skeletons {
  display: grid;
  gap: 10px;
}

.sk {
  height: 110px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent),
    color-mix(in srgb, var(--bg-soft) 86%, var(--bg-depth) 14%);
  background-size: 220% 100%, auto;
  animation: skeleton-shift 1.05s linear infinite;
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: grid;
  place-items: center;
}

.loader {
  width: 52px;
  height: 52px;
  border: 4px solid color-mix(in srgb, var(--text) 28%, transparent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes ambient-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2rem, 1.5rem, 0) scale(1.08);
  }
}

@keyframes hero-sheen {
  0% {
    transform: translateX(-18%) rotate(-8deg);
  }
  100% {
    transform: translateX(18%) rotate(-8deg);
  }
}

@keyframes surface-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes overlay-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes selected-sweep {
  0% {
    transform: translateX(-52%);
  }
  100% {
    transform: translateX(52%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes skeleton-shift {
  to {
    background-position: -220% 0, 0 0;
  }
}

@media (max-width: 1080px) {
  .hero,
  .metrics,
  .board {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    align-items: start;
  }
}

@media (max-width: 820px) {
  .layout {
    width: min(100vw - 20px, 100%);
    padding: 18px 0 28px;
  }

  .hero,
  .metrics,
  .board,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px 22px;
  }

  .header-actions {
    justify-items: stretch;
    width: 100%;
  }

  .hero-side-actions {
    width: 100%;
  }

  .hero-side-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .card-topline,
  .context-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .card-date {
    white-space: normal;
  }

  .context-comment-hints {
    justify-items: start;
    text-align: left;
  }

  .row.two {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
