:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #171714;
  --muted: #73736c;
  --faint: #a3a39c;
  --line: #deded8;
  --line-soft: #e9e9e4;
  --accent: #ff5533;
  --accent-hover: #e94322;
  --accent-soft: #fff0eb;
  --danger: #c5362a;
  --shadow: 0 18px 60px rgb(30 30 20 / 8%);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10100f;
  --surface: #171716;
  --surface-raised: #1d1d1b;
  --text: #f3f3ee;
  --muted: #999991;
  --faint: #686862;
  --line: #363633;
  --line-soft: #282826;
  --accent: #ff684a;
  --accent-hover: #ff7b60;
  --accent-soft: #2a1a16;
  --danger: #ff7669;
  --shadow: 0 18px 60px rgb(0 0 0 / 30%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  font-family: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.admin-page,
.auth-page {
  --accent: #c7ff42;
  --accent-hover: #b6ee35;
  --accent-soft: #efffca;
}

:root[data-theme="dark"] .admin-page,
:root[data-theme="dark"] .auth-page {
  --accent-soft: #252d15;
}

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

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

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.site-shell {
  width: min(1280px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header,
.admin-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-block;
  color: var(--text);
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.site-header .wordmark span {
  color: var(--muted);
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--faint);
  background: var(--surface);
}

.icon-button:active {
  transform: scale(.95);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-toggle svg {
  transition: transform 500ms var(--ease);
}

:root[data-theme="dark"] .theme-toggle svg {
  transform: rotate(30deg);
}

.hero {
  max-width: 1080px;
  padding: 78px 0 70px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 740;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}

.hero h1,
.auth-card h1,
.admin-title-row h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: .98;
}

.hero h1,
.auth-card h1 {
  letter-spacing: -.035em;
}

.hero h1 span {
  color: var(--muted);
}

:root[data-theme="dark"] .site-header .wordmark span,
:root[data-theme="dark"] .hero h1 span {
  color: #c7ff42;
}

.hero-copy {
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tile {
  min-height: 112px;
  padding: 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 220ms ease, color 220ms ease;
  animation: tile-in 500ms var(--ease) both;
}

.tile:nth-child(2) { animation-delay: 30ms; }
.tile:nth-child(3) { animation-delay: 60ms; }
.tile:nth-child(4) { animation-delay: 90ms; }
.tile:nth-child(5) { animation-delay: 120ms; }
.tile:nth-child(6) { animation-delay: 150ms; }
.tile:nth-child(7) { animation-delay: 180ms; }
.tile:nth-child(8) { animation-delay: 210ms; }
.tile:nth-child(9) { animation-delay: 240ms; }
.tile:nth-child(10) { animation-delay: 270ms; }
.tile:nth-child(11) { animation-delay: 300ms; }
.tile:nth-child(12) { animation-delay: 330ms; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

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

.tile-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 12px;
}

.tile-icon svg,
.shortcut-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.tile-arrow {
  color: var(--faint);
  font-size: 20px;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.tile:hover .tile-arrow {
  color: inherit;
  opacity: 1;
  transform: none;
}

.tile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tile-path {
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -.03em;
}

.tile-label {
  display: none;
}

.tile-description {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  transition: color 220ms ease;
}

.tile:hover .tile-description {
  color: color-mix(in srgb, var(--bg) 68%, transparent);
}

.site-footer {
  padding: 34px 0 36px;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 12px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-theme-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.site-footer a:hover,
.footer-theme-toggle:hover {
  color: var(--text);
}

/* Privacy */

.privacy-main {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 82px 0 70px;
}

.privacy-heading {
  max-width: 680px;
  padding-bottom: 70px;
}

.privacy-heading .back-link {
  display: inline-block;
  margin-bottom: 54px;
}

.privacy-heading h1 {
  margin: 0;
  font-size: clamp(54px, 8vw, 86px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: .98;
}

.privacy-heading > p {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.privacy-sections {
  border-top: 1px solid var(--line);
}

.privacy-sections section {
  position: relative;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  column-gap: 48px;
  border-bottom: 1px solid var(--line);
}

.privacy-sections h2 {
  margin: 2px 0 0;
  grid-column: 1;
  grid-row: 1 / span 20;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: -.01em;
  line-height: 1.4;
}

.privacy-sections p {
  margin: 0;
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
}

.privacy-sections p + p {
  margin-top: 15px;
}

.privacy-sections a {
  color: var(--text);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.privacy-sections a:hover {
  text-decoration-color: var(--text);
}

.empty-state {
  padding: 80px 24px;
  border: 1px dashed var(--line);
  text-align: center;
}

.empty-state p {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty-state a {
  color: var(--accent);
}

/* Shared controls */

.button {
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

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

.button-primary:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}

.admin-page .button-primary:hover:not(:disabled),
.auth-page .button-primary:hover:not(:disabled) {
  color: #171714;
}

.button-primary:disabled {
  cursor: default;
  opacity: .35;
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

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

.button-full {
  width: 100%;
}

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

.alert {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

/* Login and 404 */

.auth-page {
  display: grid;
  place-items: center;
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 440px);
  padding: 38px;
  display: grid;
  gap: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card.login-card {
  width: min(100%, 380px);
  padding: 0;
  gap: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-card .wordmark span {
  color: var(--muted);
}

:root[data-theme="dark"] .login-card .wordmark span {
  color: #c7ff42;
}

.auth-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-card h1 {
  font-size: 42px;
}

.login-card h1 {
  font-size: 38px;
}

.login-card .back-link {
  justify-self: center;
  text-align: center;
}

.login-card input:hover,
.login-card input:focus {
  border-color: var(--muted);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 18%, transparent);
}

:root[data-theme="dark"] .login-card input:hover,
:root[data-theme="dark"] .login-card input:focus {
  border-color: #c7ff42;
  box-shadow: 0 0 0 3px color-mix(in srgb, #c7ff42 18%, transparent);
}

.auth-card .muted {
  margin: 10px 0 0;
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label,
.form-grid > label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 450;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:hover,
select:hover {
  border-color: var(--faint);
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.back-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.not-found {
  justify-items: start;
}

/* Admin */

.admin-shell {
  width: min(1160px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
}

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

.admin-brand,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-actions form {
  margin: 0;
}

.admin-badge,
.visibility-pill {
  padding: 5px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-main {
  padding: 70px 0 50px;
}

.admin-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.admin-title-row h1 {
  max-width: 660px;
  font-size: clamp(38px, 5vw, 60px);
  letter-spacing: -.035em;
}

.admin-title-row .muted {
  margin: 16px 0 0;
  font-size: 15px;
}

.admin-notice {
  margin: 50px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ca45b;
}

.admin-notice.is-dirty .status-dot {
  background: #e7a628;
}

.admin-notice.is-error,
.admin-notice.is-error .status-dot {
  color: var(--danger);
}

.admin-notice.is-error .status-dot {
  background: var(--danger);
}

.shortcut-list {
  border-top: 1px solid var(--line);
}

.shortcut-row {
  min-height: 86px;
  display: grid;
  grid-template-columns: 36px 44px minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  transition: opacity 160ms ease, background 160ms ease;
}

.shortcut-row:hover {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.shortcut-row.is-disabled {
  opacity: .52;
}

.shortcut-order {
  display: grid;
  gap: 1px;
}

.shortcut-order button {
  width: 24px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 12px;
  cursor: pointer;
}

.shortcut-order button:hover:not(:disabled) {
  color: var(--text);
}

.shortcut-order button:disabled {
  opacity: .18;
  cursor: default;
}

.shortcut-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.shortcut-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 110px 150px 1fr;
  align-items: center;
  gap: 14px;
}

.shortcut-copy strong {
  font-size: 14px;
  letter-spacing: -.015em;
}

.shortcut-copy span {
  font-size: 13px;
}

.shortcut-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visibility-pill {
  min-width: 58px;
  text-align: center;
}

.is-disabled .visibility-pill {
  background: var(--line-soft);
  color: var(--muted);
}

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

.text-button {
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
}

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

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

.admin-savebar {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.admin-empty {
  border-top: 0;
}

.admin-empty span {
  color: var(--muted);
  font-size: 13px;
}

/* Edit dialog */

.tile-dialog {
  width: min(560px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow);
}

.tile-dialog::backdrop {
  background: rgb(0 0 0 / 48%);
  backdrop-filter: blur(3px);
}

.tile-dialog[open] {
  animation: dialog-in 180ms var(--ease);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.tile-dialog form {
  width: 100%;
  min-width: 0;
  padding: 28px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -.04em;
}

.dialog-heading .icon-button {
  font-size: 24px;
  font-weight: 300;
}

.form-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 14px;
}

.form-grid .span-two {
  grid-column: 1 / -1;
}

.form-grid > label,
.form-grid > fieldset {
  min-width: 0;
  align-self: start;
  align-content: start;
}

.form-grid small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 430;
}

.input-prefix {
  width: 100%;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.input-prefix b {
  padding-left: 13px;
  color: var(--faint);
  font-size: 14px;
}

.input-prefix input {
  width: auto;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.icon-field {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.icon-field legend {
  margin: 0 0 9px;
  padding: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.icon-search {
  position: relative;
  margin-bottom: 8px;
}

.icon-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.icon-search input {
  padding-left: 40px;
}

.icon-picker {
  max-height: 224px;
  padding: 1px 3px 1px 1px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.icon-choice {
  min-width: 0;
  height: 64px;
  padding: 7px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.icon-choice:hover {
  border-color: var(--faint);
  background: var(--surface);
  color: var(--text);
}

.icon-choice.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.icon-choice svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.icon-choice span {
  width: 100%;
  overflow: hidden;
  font-size: 9px;
  font-weight: 620;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-count {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 430;
}

.toggle-field {
  min-height: 44px;
  padding: 0 2px;
  grid-template-columns: 1fr auto !important;
  align-items: center;
}

.toggle-field > span {
  grid-column: 1;
}

.toggle-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-field i {
  width: 42px;
  height: 24px;
  grid-column: 2;
  grid-row: 1;
  border-radius: 99px;
  background: var(--line);
  cursor: pointer;
  transition: background 160ms ease;
}

.toggle-field i::after {
  content: "";
  width: 18px;
  height: 18px;
  margin: 3px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
  transition: transform 160ms ease;
}

.toggle-field input:checked + i {
  background: var(--accent);
}

.toggle-field input:checked + i::after {
  transform: translateX(18px);
}

.dialog-actions {
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line-soft);
}

.form-error {
  margin: 18px 0 -12px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1000px) {
  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shortcut-row {
    grid-template-columns: 30px 44px minmax(180px, 1fr) auto;
  }

  .shortcut-copy {
    grid-template-columns: 100px 1fr;
  }

  .shortcut-copy small {
    grid-column: 1 / -1;
  }

  .visibility-pill {
    display: none;
  }

  .row-actions {
    grid-column: 3 / -1;
    margin: -15px 0 9px;
  }
}

@media (max-width: 720px) {
  .site-shell,
  .admin-shell {
    width: min(100% - 32px, 560px);
  }

  .site-header {
    display: none;
  }

  .admin-header {
    height: 78px;
  }

  .hero {
    padding: max(30px, env(safe-area-inset-top)) 0 48px;
  }

  .hero h1 {
    font-size: clamp(45px, 14vw, 70px);
  }

  .hero-copy {
    font-size: 16px;
  }

  .footer-theme-toggle {
    display: inline;
  }

  .privacy-main {
    padding: 56px 0 48px;
  }

  .privacy-heading {
    padding-bottom: 48px;
  }

  .privacy-heading .back-link {
    margin-bottom: 38px;
  }

  .privacy-sections section {
    padding: 25px 0;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .privacy-sections h2,
  .privacy-sections p {
    grid-column: 1;
    grid-row: auto;
  }

  .privacy-sections h2 {
    margin: 0;
  }

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

  .tile {
    min-height: 104px;
    padding: 17px;
  }

  .tile-path {
    font-size: 17px;
  }

  .admin-actions > a.button {
    display: none;
  }

  .admin-actions .button {
    min-height: 38px;
    padding: 0 11px;
  }

  .admin-main {
    padding-top: 48px;
  }

  .admin-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-title-row .button {
    width: 100%;
  }

  .admin-notice {
    margin-top: 32px;
  }

  .shortcut-row {
    padding: 14px 0;
    grid-template-columns: 26px 38px 1fr;
    gap: 10px;
  }

  .shortcut-icon {
    width: 38px;
    height: 38px;
  }

  .shortcut-copy {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .shortcut-copy small {
    display: none;
  }

  .row-actions {
    grid-column: 3;
    margin: 0;
    justify-content: flex-start;
  }

  .text-button {
    padding: 5px 8px 5px 0;
  }

  .admin-savebar {
    position: sticky;
    bottom: 0;
    padding: 12px 0 max(12px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
  }

  .admin-savebar p {
    display: none;
  }

  .admin-savebar .button {
    width: 100%;
  }
}

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

  .tile {
    min-height: 96px;
  }

  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .admin-badge {
    display: none;
  }

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

  .form-grid .span-two {
    grid-column: auto;
  }

  .tile-dialog form {
    padding: 22px 18px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
