:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0f0f0f;
  --surface-2: #171717;
  --line: #3a3a3a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --paper: #ffffff;
  --ink: #050505;
  --paper-muted: #606060;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
a {
  font: inherit;
}

button,
.link-button {
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.shell {
  width: min(1160px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 0.96rem;
}

h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.22;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ticket-form {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.ticket-page {
  position: relative;
  width: min(390px, 100%);
  min-height: auto;
  padding: 24px 18px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
}

.ticket-page::before,
.ticket-page::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 10px;
  background:
    linear-gradient(135deg, transparent 6px, var(--paper) 0) 0 0 / 12px 10px,
    linear-gradient(225deg, transparent 6px, var(--paper) 0) 6px 0 / 12px 10px;
  content: "";
}

.ticket-page::before {
  top: -10px;
}

.ticket-page::after {
  bottom: -10px;
  transform: rotate(180deg);
}

.ticket-editor {
  display: block;
}

.app-button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.app-button:hover {
  border-color: var(--text);
}

.app-icon {
  position: relative;
  display: block;
  width: 34px;
  height: 30px;
}

.printed-ticket {
  position: absolute;
  left: 8px;
  top: 3px;
  width: 18px;
  height: 15px;
  border: 2px solid currentColor;
  border-top: 0;
  border-bottom: 0;
  background:
    linear-gradient(currentColor 0 0) 5px 6px / 8px 2px no-repeat,
    var(--surface);
}

.printed-ticket::before {
  position: absolute;
  left: -2px;
  top: -6px;
  width: calc(100% + 4px);
  height: 7px;
  background: currentColor;
  clip-path: polygon(
    0 100%,
    0 44%,
    8% 44%,
    14% 0,
    20% 44%,
    30% 44%,
    36% 0,
    42% 44%,
    52% 44%,
    58% 0,
    64% 44%,
    74% 44%,
    80% 0,
    86% 44%,
    100% 44%,
    100% 100%
  );
  content: "";
}

.printer-slot {
  position: absolute;
  left: 4px;
  top: 14px;
  width: 26px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
}

.printer-body {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 5px 5px 3px 3px;
  background:
    linear-gradient(currentColor 0 0) 22px 5px / 5px 2px no-repeat,
    var(--surface);
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.menu-wrap {
  position: relative;
}

.menu-button,
.goal-button {
  display: grid;
  align-content: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.menu-button {
  gap: 5px;
}

.menu-button span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

.goal-button.is-active,
.goal-button:hover,
.menu-button:hover {
  border-color: var(--text);
}

.bullseye {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.bullseye::before,
.bullseye::after {
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.bullseye::before {
  inset: 5px;
}

.bullseye::after {
  inset: 11px;
  background: currentColor;
}

.menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 12px;
  width: min(320px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080808;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.menu-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-row strong {
  color: var(--text);
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.goal-fields {
  display: grid;
  gap: 8px;
}

.goal-fields label {
  display: grid;
  gap: 5px;
}

.goal-fields span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.goal-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.template-tools {
  display: grid;
  gap: 8px;
}

.template-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-tools input,
.goal-fields input,
.goal-fields select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

.template-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.template-item {
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 6px;
}

.template-load,
.template-delete {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.template-load {
  justify-content: flex-start;
  padding: 0 10px;
  text-align: left;
}

.template-delete {
  font-size: 1.25rem;
}

.ticket-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 560;
  overflow: hidden;
  background: var(--paper);
}

.canvas-el {
  position: absolute;
  display: grid;
  min-width: 20px;
  min-height: 20px;
  touch-action: none;
}

.ticket-canvas.is-editable .canvas-el {
  outline: 1px dashed transparent;
}

.ticket-canvas.is-editable .canvas-el:hover,
.ticket-canvas.is-editable .canvas-el.is-selected {
  outline-color: var(--ink);
}

.element-content {
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-size: var(--font-size, 16px);
  font-weight: var(--font-weight, 800);
  line-height: 1.1;
  text-align: var(--align, left);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  outline: 0;
  overflow: hidden;
}

.element-content:empty::before {
  color: #969696;
  content: attr(data-placeholder);
}

.text-brand .element-content,
.text-help .element-content {
  text-transform: uppercase;
}

.text-title .element-content {
  line-height: 1;
}

.image-el,
.qr-el {
  place-items: center;
}

.image-el img,
.qr-el img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-el img {
  filter: grayscale(1) contrast(1.08);
}

.move-handle,
.delete-handle {
  position: absolute;
  z-index: 3;
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.move-handle {
  top: -12px;
  right: -12px;
  cursor: grab;
}

.delete-handle {
  top: -12px;
  left: -12px;
}

.canvas-el.is-selected .move-handle,
.canvas-el.is-selected .delete-handle {
  display: grid;
}

.ticket-kicker {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-page h1,
.ticket-title-input {
  margin: 0;
  min-height: 2.25em;
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.ticket-title-input,
.ticket-body-input {
  border: 1px dashed transparent;
  border-radius: 0;
  outline: 0;
}

.ticket-title-input:focus,
.ticket-body-input:focus {
  border-color: var(--ink);
}

[contenteditable]:empty::before {
  color: #969696;
  content: attr(data-placeholder);
}

.ticket-body,
.ticket-body-input {
  margin: 0;
  min-height: 116px;
  text-align: left;
  white-space: pre-wrap;
}

.ticket-body-input {
  padding: 8px 0;
  color: var(--ink);
  line-height: 1.35;
}

.ticket-image-zone {
  min-height: 72px;
}

.image-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px dashed #777;
  background: #fff;
  color: #444;
  font-weight: 850;
  text-transform: uppercase;
}

.image-upload-handle {
  position: absolute;
  z-index: 4;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
}

.ticket-image {
  position: relative;
  margin: 0;
  display: grid;
  gap: 8px;
}

.ticket-image img,
.ticket-photo {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.08);
}

.remove-image {
  justify-self: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font-size: 0.78rem;
  font-weight: 900;
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 226px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border: 2px dashed #111;
  color: #505050;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.ticket-help {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-date {
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.8rem;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 150px));
  justify-content: center;
  align-items: end;
  justify-items: center;
  gap: 20px;
  width: min(390px, 100%);
}

.toolbar .action-button {
  position: relative;
  isolation: isolate;
  display: block;
  width: 150px;
  height: 126px;
  min-height: 126px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111;
  font-size: 0.78rem;
  line-height: 1;
  overflow: visible;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  box-shadow: none;
}

.toolbar .action-button::before {
  position: absolute;
  z-index: 0;
  right: 3px;
  bottom: 0;
  left: 3px;
  height: 72px;
  border: 1px solid #777;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 12%, #fff 0 13%, transparent 36%),
    linear-gradient(160deg, #f9f9f9 0%, #c9c9c9 32%, #777 63%, #ededed 100%);
  box-shadow:
    inset 0 9px 8px rgba(255, 255, 255, 0.86),
    inset 0 -14px 12px rgba(0, 0, 0, 0.32),
    0 9px 0 #2b2b2b,
    0 18px 24px rgba(0, 0, 0, 0.48);
  content: "";
}

.toolbar .action-button::after {
  position: absolute;
  z-index: -1;
  right: 15px;
  bottom: -13px;
  left: 15px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  filter: blur(5px);
  content: "";
}

.button-cap {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 24px;
  display: block;
  width: 102px;
  height: 82px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  box-shadow:
    inset 16px 18px 20px rgba(255, 255, 255, 0.34),
    inset -10px -20px 22px rgba(0, 0, 0, 0.3),
    0 8px 0 rgba(0, 0, 0, 0.28),
    0 14px 14px rgba(0, 0, 0, 0.35);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.button-label {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 23px;
  left: 0;
  display: block;
  text-align: center;
  font-weight: 1000;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    color 140ms ease,
    text-shadow 140ms ease;
}

.generate-button .button-cap {
  background:
    radial-gradient(circle at 35% 27%, #f4ffd9 0 10%, transparent 24%),
    linear-gradient(145deg, #c8ff39 0%, #4dff00 44%, #159b00 100%);
}

.clear-button .button-cap {
  background:
    radial-gradient(circle at 35% 27%, #ffd0ca 0 10%, transparent 24%),
    linear-gradient(145deg, #ff654f 0%, #f31f0a 48%, #9f0700 100%);
}

.toolbar .action-button:active .button-cap {
  transform: translateY(7px);
  box-shadow:
    inset 12px 14px 18px rgba(255, 255, 255, 0.28),
    inset -8px -15px 18px rgba(0, 0, 0, 0.28),
    0 2px 0 rgba(0, 0, 0, 0.34),
    0 8px 10px rgba(0, 0, 0, 0.32);
}

.toolbar .action-button:hover .button-label,
.toolbar .action-button:focus-visible .button-label {
  opacity: 1;
  transform: translateY(0);
}

.generate-button:hover .button-label,
.generate-button:focus-visible .button-label {
  color: #56ff00;
  text-shadow:
    0 0 8px rgba(86, 255, 0, 0.9),
    0 0 18px rgba(86, 255, 0, 0.62);
}

.clear-button:hover .button-label,
.clear-button:focus-visible .button-label {
  color: #ff2a14;
  text-shadow:
    0 0 8px rgba(255, 42, 20, 0.9),
    0 0 18px rgba(255, 42, 20, 0.64);
}

.generate-button:hover .button-cap,
.generate-button:focus-visible .button-cap {
  box-shadow:
    inset 16px 18px 20px rgba(255, 255, 255, 0.3),
    inset -10px -20px 22px rgba(0, 0, 0, 0.3),
    0 8px 0 rgba(0, 0, 0, 0.28),
    0 14px 14px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(86, 255, 0, 0.8);
}

.clear-button:hover .button-cap,
.clear-button:focus-visible .button-cap {
  box-shadow:
    inset 16px 18px 20px rgba(255, 255, 255, 0.3),
    inset -10px -20px 22px rgba(0, 0, 0, 0.3),
    0 8px 0 rgba(0, 0, 0, 0.28),
    0 14px 14px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(255, 42, 20, 0.82);
}

.primary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 6px;
  font-weight: 900;
}

.primary {
  background: var(--text);
  color: var(--bg);
}

.primary:disabled {
  cursor: progress;
  opacity: 0.6;
}

.ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.ghost:disabled {
  cursor: default;
  opacity: 0.45;
}

.toolbar .link-button {
  width: 100%;
}

.message,
.empty,
.subtle {
  color: var(--muted);
}

.message {
  margin: 0;
  text-align: center;
}

.editor-workspace {
  grid-template-columns: minmax(300px, 420px);
  justify-content: center;
}

.goals-shell {
  display: grid;
  grid-template-columns: minmax(0, 920px);
  gap: 18px;
  align-items: start;
  justify-content: center;
}

.goals-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.goals-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.folder-group {
  display: grid;
  gap: 8px;
  padding-left: min(calc(var(--depth) * 18px), 54px);
}

.folder-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 900;
}

.folder-title > span:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.folder-chip.is-root {
  background: var(--text);
  color: var(--bg);
}

.folder-separator {
  color: var(--muted);
}

.folder-title small {
  color: var(--muted);
  font-size: 0.78rem;
}

.goal-ticket-grid,
.spike-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 16px;
}

.goal-ticket-card {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090909;
}

.goal-ticket-link {
  position: relative;
  z-index: 1;
  width: min(148px, 100%);
  color: inherit;
  text-decoration: none;
  outline: 0;
}

.goal-ticket-page {
  width: 100%;
  padding: 9px 7px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.goal-ticket-page::before,
.goal-ticket-page::after {
  height: 5px;
  background:
    linear-gradient(135deg, transparent 3px, var(--paper) 0) 0 0 / 6px 5px,
    linear-gradient(225deg, transparent 3px, var(--paper) 0) 3px 0 / 6px 5px;
}

.goal-ticket-page::before {
  top: -5px;
}

.goal-ticket-page::after {
  bottom: -5px;
}

.goal-ticket-link:hover,
.goal-ticket-link:focus-visible {
  z-index: 5;
}

.goal-ticket-link:hover .goal-ticket-page,
.goal-ticket-link:focus-visible .goal-ticket-page {
  transform: translateY(-7px) scale(1.08);
  box-shadow: 0 24px 38px rgba(0, 0, 0, 0.58);
}

.goal-ticket-meta {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: center;
}

.goal-ticket-meta h3 {
  font-size: 0.95rem;
}

.goal-pin-action {
  width: 100%;
  min-height: 38px;
}

.spike-rail {
  position: relative;
  margin-top: 8px;
  padding: 24px 10px 10px;
  border-top: 3px solid #d8d8d8;
  background:
    linear-gradient(#444, #111) 0 18px / 100% 4px no-repeat,
    #070707;
}

.spike-rail::before {
  position: absolute;
  left: 12px;
  top: -12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  content: "Pinned done";
}

.goal-ticket-card.is-pinned {
  padding-top: 20px;
  transform: rotate(-1deg);
}

.ticket-nail {
  position: absolute;
  z-index: 6;
  top: 10px;
  left: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid #f4f4f4;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 18%, transparent 20%),
    radial-gradient(circle, #9c9c9c 0 48%, #333 50% 100%);
  box-shadow:
    0 3px 0 #111,
    0 8px 14px rgba(0, 0, 0, 0.48);
  transform: translateX(-50%);
}

.task-zone {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
}

.section-head span {
  color: var(--text);
  font-weight: 900;
}

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

.task {
  display: grid;
  grid-template-columns: 70px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.task.is-done {
  opacity: 0.55;
}

.qr {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 4px;
  background: #fff;
}

.qr img {
  width: 64px;
  height: 64px;
}

.task-thumb-slot {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  background: #fff;
}

.task-thumb-slot.is-empty {
  background: var(--surface-2);
}

.task-thumb-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.task-copy p {
  margin: 6px 0 0;
  color: #cfcfcf;
  line-height: 1.35;
}

.goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.goal-chips span {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.task-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.task-actions .ghost {
  min-width: 76px;
  min-height: 36px;
}

.text-link {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.ghost:hover,
.text-link:hover {
  border-color: var(--text);
  color: var(--text);
}

.done-drawer {
  margin-top: 20px;
}

.done-drawer summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 10px;
}

.compact {
  opacity: 0.82;
}

.done-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.done-card {
  width: min(520px, 100%);
  padding: 20px;
  text-align: center;
}

.checkmark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 2.4rem;
  font-weight: 950;
}

.checkmark.muted {
  background: var(--bg);
  color: var(--text);
}

.done-card .primary {
  width: 100%;
  margin-top: 16px;
}

.ticket-shell {
  display: grid;
  gap: 18px;
  justify-items: center;
  min-height: 100vh;
  padding: 30px 16px;
  background: var(--bg);
}

.print-button {
  width: min(390px, 100%);
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .goals-shell {
    grid-template-columns: 1fr;
  }

  .ticket-form {
    justify-items: center;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100vw - 18px, 1160px);
    padding-top: 16px;
  }

  .top-actions {
    gap: 8px;
  }

  .menu-button,
  .goal-button,
  .app-button {
    width: 46px;
    height: 46px;
  }

  .app-icon {
    transform: scale(0.9);
  }

  .ticket-page {
    padding: 20px 14px;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(132px, 150px));
    gap: 12px;
  }

  .task {
    grid-template-columns: 58px 42px minmax(0, 1fr);
    gap: 10px;
  }

  .qr {
    width: 58px;
    height: 58px;
  }

  .qr img {
    width: 52px;
    height: 52px;
  }

  .task-thumb-slot {
    width: 42px;
    height: 42px;
  }

  .task-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    justify-items: stretch;
  }

  .goals-panel {
    padding: 10px;
  }

  .folder-group {
    padding-left: min(calc(var(--depth) * 12px), 32px);
  }

  .goal-ticket-grid,
  .spike-rail {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 12px;
  }

  .goal-ticket-link {
    width: min(138px, 100%);
  }
}

@media print {
  body {
    background: #fff;
  }

  .ticket-shell {
    display: block;
    min-height: auto;
    padding: 0;
    background: #fff;
  }

  .ticket-page {
    width: 72mm;
    min-height: auto;
    margin: 0 auto;
    padding: 4mm;
    box-shadow: none;
  }

  .ticket-page::before,
  .ticket-page::after,
  .print-button {
    display: none;
  }
}
