:root {
  color-scheme: light;
  --bg: #f3f1ec;
  --paper: #faf9f7;
  --ink: #1c1b19;
  --muted: #5e5a54;
  --line: #d9d3c9;
  --accent: #0f5c4c;
  --accent-ink: #f7f6f3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - 72rem) / 2 + 24px));
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar .product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 0 24px 0 8px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.topbar .product-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
}

.topbar .tool,
.topbar > a:not(.product),
.topbar .who {
  display: inline-flex;
  align-items: center;
  min-height: 68px;
  padding-inline: 16px;
  border-inline-start: 1px solid #eeeae3;
}

.topbar .tool {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #edf5f2;
}

.topbar > a:not(.product) {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.tools-menu {
  position: relative;
  display: flex;
  align-items: stretch;
}

.tools-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 68px;
  padding-inline: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  border-inline-start: 1px solid #eeeae3;
}

.tools-menu summary::-webkit-details-marker {
  display: none;
}

.tools-menu summary::after {
  margin-left: 7px;
  font-size: 10px;
  content: "▼";
}

.tools-menu[open] summary {
  color: var(--accent);
  background: #edf5f2;
}

.tools-menu nav {
  position: absolute;
  z-index: 40;
  top: calc(100% - 1px);
  left: 0;
  display: grid;
  width: 14rem;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(28, 27, 25, 0.14);
}

.tools-menu nav a {
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
}

.tools-menu nav a:hover {
  color: var(--accent);
  background: #edf5f2;
}

.topbar .spacer { margin-left: auto; }

.topbar .who {
  color: var(--muted);
  font-size: 14px;
}

.topbar > a:last-child {
  min-height: 44px;
  align-self: center;
  margin-left: 8px;
  padding-inline: 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 3px;
}

.page {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding: 38px 24px 80px;
}

h1 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

h2 {
  margin: 28px 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.page-back {
  margin: 0 0 18px;
}

body.management button,
body.management .button-link,
body.management a.quiet-link {
  border-radius: 3px;
}

.page-heading {
  margin: 0 0 30px;
}

.page-heading h1 {
  margin: 2px 0 0;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.025em;
}

.page-heading > p:last-child,
.page-heading > div > p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

.page-heading-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.heading-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

a.quiet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.transfer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
}

.transfer label {
  margin: 0;
}

.transfer input[type="file"] {
  max-width: 18rem;
}

.meta {
  margin: -8px 0 0;
  color: var(--muted);
}

.project-picture {
  width: 480px;
  max-width: 100%;
  margin: 0 0 8px;
}

.project-picture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #e7e2d8;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.notice { margin: 0 0 12px; }

.error { margin: 0 0 12px; }

.empty { margin: 0; color: var(--muted); }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

th, td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: baseline;
  border-bottom: 1px solid var(--line);
}

thead th {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

table.fields th {
  width: 8rem;
  color: var(--ink);
  font-weight: 600;
}

label {
  display: block;
  margin: 16px 0 5px;
  font-size: 14px;
  font-weight: 600;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
select,
textarea {
  width: min(100%, 22rem);
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

textarea {
  width: min(100%, 36rem);
  min-height: 7rem;
  font: 15px/1.4 ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 18rem));
  gap: 0 16px;
  max-width: 36rem;
}

.pair input[type="text"],
.pair input[type="number"],
.pair select {
  width: 100%;
}

label.check {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 400;
}

.hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.file-preview {
  display: grid;
  grid-template-columns: repeat(2, 240px);
  gap: 16px;
  margin: 12px 0 4px;
}

.file-preview img,
.file-preview canvas {
  width: 240px;
  height: 180px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.file-preview canvas {
  display: block;
  background: #f7f4ee;
  touch-action: none;
  cursor: grab;
}

.file-preview canvas:active {
  cursor: grabbing;
}

.file-preview p {
  margin: 6px 0 0;
}

@media (max-width: 640px) {
  .pair { grid-template-columns: 1fr; }
  .file-preview { grid-template-columns: 1fr; }
}

select { width: auto; }

input[type="file"] {
  font: inherit;
  max-width: 100%;
}

td form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.table-wrap { overflow-x: auto; }

.prompt-text {
  white-space: pre-wrap;
  max-width: 36rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.actions .project-delete {
  margin-left: auto;
}

button.delete-project {
  color: #6e2a24;
  background: #f6d5d0;
  border-color: #e8b4ae;
}

button {
  min-height: 44px;
  padding: 9px 16px;
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
}

button.quiet {
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.choice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.choice-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.choice-actions a.quiet {
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.form-links {
  margin: 16px 0 0;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.notice,
.error {
  padding: 12px 14px;
  background: #fff;
  border-left: 3px solid var(--accent);
}

.error {
  color: var(--bad, #6e2c24);
  border-left-color: var(--bad, #6e2c24);
}

.section-copy {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: 20px;
  align-items: start;
}

.settings-section {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.settings-section h2 {
  margin: 0 0 16px;
}

.account-details {
  margin: 0;
}

.account-details > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.account-details dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.stacked-form input,
.stacked-form select {
  width: 100%;
  max-width: 28rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(20rem, 1.1fr);
  min-height: 31rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.auth-shell-compact {
  display: block;
  max-width: 32rem;
  min-height: 0;
}

.auth-panel {
  align-self: center;
  padding: clamp(28px, 5vw, 52px);
}

.auth-panel h1 {
  margin: 4px 0 0;
  font-size: 32px;
}

.auth-intro {
  margin: 8px 0 24px;
  color: var(--muted);
}

.auth-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px;
  color: var(--ink);
  font-size: 22px;
  text-align: center;
  background: #88c7bd;
}

.auth-machine {
  position: relative;
  display: block;
  width: min(16rem, 80%);
  height: 8rem;
  border: 3px solid var(--ink);
  border-top-width: 18px;
  box-shadow: inset 0 -22px 0 rgba(255, 255, 255, 0.24);
}

.auth-machine::before {
  position: absolute;
  top: -72px;
  left: 50%;
  width: 3px;
  height: 54px;
  content: "";
  background: var(--ink);
  transform: translateX(-50%);
}

.auth-machine::after {
  position: absolute;
  top: -22px;
  left: 50%;
  width: 22px;
  height: 34px;
  content: "";
  background: var(--paper);
  border: 3px solid var(--ink);
  transform: translateX(-50%);
}

.management-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.management-menu > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.management-menu > a:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(28, 27, 25, 0.08);
  transform: translateY(-2px);
}

.management-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  background: #efbd59;
}

.management-menu > a:nth-child(2) .management-mark { background: #88c7bd; }
.management-menu > a:nth-child(3) .management-mark { background: #d9bca8; }
.management-menu > a:nth-child(5) .management-mark { background: #b7c7b0; }

.management-menu strong,
.management-menu small {
  display: block;
}

.management-menu small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.management-arrow {
  color: var(--accent);
  font-size: 20px;
}

.dashboard-page {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: 38px 24px 80px;
}

.dashboard {
  width: 100%;
}

.dashboard-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-heading {
  margin-bottom: 32px;
}

.dashboard-heading h1 {
  margin: 2px 0 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.025em;
}

.dashboard-intro {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-badge,
.tool-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.dashboard-notice {
  padding: 12px 14px;
  background: var(--paper);
  border-left: 3px solid var(--accent);
}

.section-heading {
  margin: 0 0 12px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-section {
  margin-top: 40px;
}

.tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-grid-item {
  min-width: 0;
}

.tool-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dedad2;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.tool-tile {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a.tool-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(28, 27, 25, 0.1);
  transform: translateY(-2px);
}

a.tool-tile:active {
  box-shadow: 0 2px 6px rgba(28, 27, 25, 0.08);
  transform: translateY(0);
}

.tool-visual {
  grid-column: 1 / -1;
  display: block;
  aspect-ratio: 4 / 3;
  height: auto;
  margin: 12px 12px 0;
  overflow: hidden;
  background: #e5e0d7;
}

.tool-visual img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8%;
  object-fit: contain;
}

.tool-pro {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  padding: 2px 7px;
  color: #1c1b19;
  background: #faf9f7;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.tool-grid-item-1 .tool-visual { background: #efbd59; }
.tool-grid-item-2 .tool-visual { background: #88c7bd; }
.tool-grid-item-3 .tool-visual { background: #d7d3ca; }
.tool-grid-item-4 .tool-visual { background: #b8ccd4; }
.tool-grid-item-5 .tool-visual { background: #d9bca8; }
.tool-grid-item-6 .tool-visual { background: #c5d4bc; }

.tool-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  padding: 15px 14px 16px;
}

.tool-name,
.tool-summary,
.tool-reason {
  display: block;
  width: 100%;
}

.tool-name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.tool-summary,
.tool-reason {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.tool-reason {
  margin-top: 4px;
}

.tool-arrow {
  align-self: end;
  margin: 0 14px 17px 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

.tool-status {
  align-self: end;
  margin: 0 12px 14px 0;
}

.tool-tile.is-locked .tool-visual {
  filter: grayscale(0.7);
  opacity: 0.58;
}

.tool-tile.is-unavailable {
  color: #6f6c66;
  background: #eceae4;
  border-color: #d5d1c8;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.tool-tile.is-unavailable .tool-visual {
  filter: grayscale(1);
  opacity: 0.4;
}

.tool-tile.is-unavailable .tool-name,
.tool-tile.is-unavailable .tool-summary,
.tool-tile.is-unavailable .tool-reason {
  color: #6f6c66;
}

.project-card {
  grid-template-columns: minmax(0, 1fr);
  border-radius: 16px;
}

.project-cards .tool-visual {
  background: #d7d3ca;
}

.project-card .project-photo {
  padding: 0;
  object-fit: cover;
}

.projects-more {
  margin: 16px 0 0;
}

.projects-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.projects-more a:hover {
  text-decoration: underline;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.project-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 10px 8px 10px 12px;
}

.project-row + .project-row {
  border-top: 1px solid var(--line);
}

.project-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 8px 4px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 3px;
}

.project-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-delete,
.user-delete {
  display: flex;
  margin: 0;
}

button.touch-link {
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.confirm-dialog {
  width: min(26rem, calc(100vw - 32px));
  padding: 22px 22px 18px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.confirm-dialog::backdrop {
  background: rgba(28, 27, 25, 0.45);
}

.confirm-dialog h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.confirm-dialog p {
  margin: 0;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.touch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

.touch-link-primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.empty-state {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 24px;
  color: var(--muted);
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.empty-state strong {
  color: var(--ink);
}

.new-project {
  padding-top: 8px;
}

.new-project-form {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(15rem, 1.25fr) auto;
  align-items: end;
  gap: 12px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.project-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  margin: 0;
  font-weight: 600;
}

.project-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.new-project-form input[type="text"],
.new-project-form input[type="file"] {
  width: 100%;
  min-height: 44px;
}

.new-project-form input[type="text"] {
  padding: 9px 11px;
}

.new-project-form input[type="file"] {
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.new-project-form input[type="file"]::file-selector-button {
  min-height: 30px;
  margin: -2px 9px -2px -2px;
  padding: 4px 9px;
  color: var(--ink);
  font: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.new-project-form button {
  min-height: 44px;
  padding-inline: 18px;
}

@media (max-width: 900px) {
  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .management-menu {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 28px 16px 64px;
  }

  .page-heading-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-shell {
    display: block;
    min-height: 0;
  }

  .auth-visual {
    display: none;
  }

  .dashboard-page {
    padding: 24px 16px 64px;
  }

  .dashboard-heading {
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .new-project-form {
    grid-template-columns: 1fr;
  }

  .new-project-form button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding-inline: 12px;
  }

  .topbar .tool,
  .topbar .who {
    display: none;
  }

  .dashboard-screen .topbar {
    padding-inline: 12px;
  }

  .dashboard-screen .topbar .tool,
  .dashboard-screen .topbar .who {
    display: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    flex-wrap: nowrap;
    gap: 0;
    min-height: 56px;
    padding-inline: 6px;
  }

  .topbar .product {
    flex: 0 0 44px;
    min-height: 56px;
    padding: 0;
    font-size: 0;
  }

  .topbar .product-logo {
    width: 32px;
    height: 32px;
  }

  .topbar > a:not(.product) {
    min-height: 56px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .tools-menu summary {
    min-height: 56px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .tools-menu nav {
    position: fixed;
    top: 55px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .topbar > a:last-child {
    min-height: 40px;
    margin-left: 2px;
    padding-inline: 8px;
  }

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

  .project-row {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    padding: 10px 8px;
  }

  .project-main {
    width: 100%;
  }

  .project-actions {
    width: 100%;
  }

  .project-delete,
  .touch-link {
    flex: 1;
  }

  .project-delete .touch-link {
    width: 100%;
  }
}

@media (pointer: coarse) {
  .topbar a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  button,
  select,
  input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-tile {
    transition: none;
  }
}
