:root {
  color-scheme: light;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cover-image: none;
  --bg: #f6f5f1;
  --surface: #fffdfa;
  --surface-2: #f0f7f5;
  --text: #202124;
  --muted: #6d726f;
  --line: #dfe3df;
  --brand: #176d63;
  --shadow: 0 12px 34px rgba(36, 44, 42, .08);
}

body[data-theme="default"] {
  --bg: #f5f6f8;
  --surface: #fff;
  --surface-2: #f3f2ff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e4e4ee;
  --brand: #5746ff;
}

body[data-theme="mist"] {
  --bg: #f3f7f8;
  --surface: #fff;
  --surface-2: #e4eef1;
  --text: #20272b;
  --muted: #68777d;
  --line: #d4e0e4;
  --brand: #477d95;
}

body[data-theme="plastic"] {
  --bg: #eff4ff;
  --surface: #fff;
  --surface-2: #eff4ff;
  --text: #252820;
  --muted: #6d7364;
  --line: #9fbdff;
  --brand: #e91ea7;
}

body[data-theme="sakura"] {
  --bg: #fff0f6;
  --surface: #fffafc;
  --surface-2: #f3e4f7;
  --text: #53373f;
  --muted: #96888e;
  --line: #e4cbeb;
  --brand: #bf4a94;
}

body[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #1f2329;
  --surface: #2a3038;
  --surface-2: #343b45;
  --text: #f3f4f6;
  --muted: #b9c0ca;
  --line: #46505c;
  --brand: #0ba2bb;
  --shadow: 0 12px 34px rgba(0, 0, 0, .22);
}

body[data-theme="mono"] {
  --bg: #f5f5f5;
  --surface: #fff;
  --surface-2: #e8e8e8;
  --text: #111;
  --muted: #666;
  --line: #d4d4d4;
  --brand: #111;
}

body[data-font="gothic"] {
  --font-main: "Yu Gothic", "YuGothic", "游ゴシック体", "Hiragino Kaku Gothic ProN", "Meiryo", "Segoe UI", sans-serif;
}

body[data-font="serif"] {
  --font-main: "Yu Mincho", "YuMincho", "游明朝体", "Hiragino Mincho ProN", "HGSMinchoE", "Times New Roman", serif;
}

body[data-font="rounded"] {
  --font-main: "Yu Gothic UI", "Hiragino Maru Gothic ProN", "Meiryo", "Segoe UI Rounded", system-ui, sans-serif;
}

body[data-font="mono"] {
  --font-main: "SFMono-Regular", Consolas, "Liberation Mono", "Menlo", monospace;
}

body[data-google-font="zen-kaku"] {
  --font-main: "Zen Kaku Gothic New", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

body[data-google-font="noto-sans-jp"] {
  --font-main: "Noto Sans JP", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

body[data-google-font="noto-serif-jp"] {
  --font-main: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
}

body[data-google-font="zen-maru"] {
  --font-main: "Zen Maru Gothic", "Yu Gothic UI", "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
}

body[data-google-font="m-plus-rounded"] {
  --font-main: "M PLUS Rounded 1c", "Yu Gothic UI", "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

body[data-font-size="medium"] {
  font-size: 15px;
}

body[data-font-size="small"] {
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }

.shell {
  width: min(720px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.topbar {
  position: static;
  z-index: 5;
  border-bottom: 1px solid var(--line);
}

body[data-theme="graphite"] .topbar {
  border-bottom-color: #46505c;
}

.public-page .topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  min-height: 58px;
  border-bottom: 0;
  background: transparent;
}

.public-page .topbar-inner {
  justify-content: flex-end;
}

.topbar-inner {
  width: min(720px, calc(100% - 28px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand,
.nav a,
.drawer a,
.drawer-search label,
button,
.button,
.post-taxonomy span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.brand { font-weight: 750; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.nav a:hover,
.drawer a:hover { color: var(--brand); }

.icon-button,
.icon-only {
  width: 42px;
  min-height: 42px;
  padding: 0;
}

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

.drawer {
  width: min(720px, calc(100% - 28px));
  margin: 0 auto;
  max-height: 0;
  overflow: hidden;
  display: grid;
  color: var(--muted);
  border-radius: 8px;
  transition: max-height .2s ease, padding .2s ease;
}

.public-drawer {
  width: min(720px, calc(100% - 28px));
}

body[data-theme="graphite"] .drawer {
  color: #f3f4f6;
}

.drawer.is-open {
  max-height: 560px;
  overflow: visible;
  padding: 0 0 14px;
}

.drawer a,
.drawer-search {
  padding: 16px 0 16px 10px;
  border-bottom: 1px solid var(--line);
}

body[data-theme="graphite"] .drawer a,
body[data-theme="graphite"] .drawer-search {
  border-bottom-color: #46505c;
}

.drawer input {
  background: #fff;
  color: #222;
}

body[data-theme="graphite"] .drawer input {
  background: #2a3038;
  color: #f3f4f6;
  border-color: #46505c;
}

.drawer-search {
  display: grid;
  gap: 8px;
}

.search-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.profile-hero,
.card,
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-hero {
  padding: 22px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 28px;
  font-weight: 800;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero h1,
.post-body h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.meta,
.small,
.search-note {
  color: var(--muted);
  font-size: 13px;
}

.search-note { margin: 0 0 14px; }
.profile-hero p { margin: 6px 0 0; }

.profile-links,
.post-taxonomy,
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-links { margin-top: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  background: var(--surface);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

body[data-theme="graphite"] input,
body[data-theme="graphite"] textarea,
body[data-theme="graphite"] select {
  background: var(--surface-2);
}

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

button,
.button {
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  justify-content: center;
}

.button.secondary,
button.secondary {
  color: var(--brand);
  background: transparent;
}

.button.danger,
button.danger { background: #d93d3d; }

.feed,
.form-grid,
.admin-list {
  display: grid;
  gap: 14px;
}

.card { overflow: hidden; }

.post {
  padding: 18px;
  display: block;
}

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

.post-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-body,
.post,
.card,
.admin-item,
.profile-hero,
textarea,
input {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-body {
  margin: 10px auto 0;
}

.text-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-media {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  height: auto;
  max-height: none;
  object-fit: contain;
  image-orientation: from-image;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.protected-media {
  position: relative;
  display: block;
}

.protect-shield {
  position: absolute;
  inset: 14px 0 0;
  background: rgba(255, 255, 255, .02);
  z-index: 1;
}

.protect-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 11px;
}

video.post-media {
  object-fit: contain;
  max-height: 540px;
}

.post-accordion {
  margin: 12px 0;
  overflow: hidden;
}

.post-accordion summary {
  cursor: pointer;
  padding: 0 0 10px;
  font-weight: 700;
  list-style: none;
}

.post-accordion summary::-webkit-details-marker {
  display: none;
}

.post-accordion summary::before {
  content: "+";
  display: inline-block;
  min-width: 1.25em;
  color: var(--brand);
}

.post-accordion[open] summary::before {
  content: "-";
}

.post-accordion div { padding: 0; }

.sensitive-box,
.locked-post {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sensitive-box summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.sensitive-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.sensitive-badge.nsfw {
  background: #fe96c9;
  color: #fff;
}

.sensitive-badge.r18 {
  background: #111;
  color: #fff;
}

.locked-post {
  display: grid;
  gap: 10px;
}

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

.locked-post p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.form-error {
  color: #d93d3d;
  font-size: 13px;
  font-weight: 700;
}

.post-taxonomy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.post-taxonomy span {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.empty {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.admin-panel {
  padding: 20px;
  margin-bottom: 16px;
}

.compose-panel {
  padding-top: 20px;
}

.compose-panel .field:first-of-type {
  margin-top: 0;
}

.compose-panel h1,
.edit-panel h1 {
  margin: 0 auto .5em;
}

.field label,
.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.link-row {
  margin: 0 auto 1em;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff4d7;
  border: 1px solid #ead396;
  color: #111;
  margin-bottom: 12px;
}

.admin-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
}

.admin-item-actions {
  align-self: stretch;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
  justify-items: end;
}

.admin-item-actions form {
  height: 100%;
  margin: 0;
}

.admin-item-actions .icon-only {
  width: 60px;
  height: 100%;
  min-height: 64px;
  padding: 0;
}

body[data-theme="graphite"] .admin-item {
  background: var(--surface-2);
}

.editor-toolbar { margin-bottom: 8px; }

.admin-details {
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-details summary {
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.details-grid {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.theme-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  background: var(--surface);
}

.theme-option input { width: auto; }

.theme-swatch {
  height: 42px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
}

.theme-swatch i:nth-child(1) { background: var(--swatch-bg, var(--bg)); }
.theme-swatch i:nth-child(2) { background: var(--swatch-surface, var(--surface-2)); }
.theme-swatch i:nth-child(3) { background: var(--swatch-brand, var(--brand)); }

.background-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.background-option {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}

.background-option input {
  width: auto;
}

.background-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background-image: var(--thumb-image);
  background-size: cover;
  background-position: center;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

input[type="color"] {
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
}

.avatar.mini {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.author-icon {
  display: inline-flex;
  border-radius: 50%;
}

.admin-nav-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.admin-nav-box,
.public-nav-box {
  display: grid;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.public-nav-box {
  box-shadow: 0 0 60px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.public-drawer.is-open .public-nav-box {
  opacity: 1;
  transform: translateY(0);
}

.public-drawer .public-nav-box a:last-of-type {
  border-bottom: 1px solid var(--line);
}

.admin-nav-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.admin-nav-profile > a {
  border-bottom: 0;
}

.drawer a.admin-public-link {
  min-height: 26px;
  border-radius: 50px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--brand) !important;
  padding: 10px 20px;
}

.admin-drawer .admin-nav-box a:last-child {
  border-bottom: 0;
}

.admin-panel h2 {
  margin: 0 auto 1em;
}

.post-taxonomy a {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand);
}

.share-button {
  margin: 0;
  border: 0;
}

.admin-item-actions .button.secondary {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}

body[data-theme="graphite"] .admin-item-actions .button.secondary {
  background: var(--surface-2);
}

.pagination {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination a {
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.pagination a.is-current {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.media-uploader {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  display: none;
  gap: 10px;
  background: var(--surface-2);
}

.media-uploader.has-media {
  display: grid;
}

.media-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: var(--surface);
}

.existing-media-list {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.existing-media-list p {
  margin: 0;
}

.media-alt-row {
  display: grid;
  gap: 4px;
}

.media-alt-row span {
  color: var(--muted);
  font-size: 13px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: auto;
}

.drawer a.drawer-sub-link {
  padding-left: 28px;
  color: var(--muted);
  font-size: 13px;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.reaction-row form {
  margin: 0;
}

.reaction-button {
  position: relative;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.reaction-thanks {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translate(-50%, 4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  line-height: 1.4;
  transition: opacity .16s ease, transform .16s ease;
}

.reaction-button.show-thanks .reaction-thanks {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reaction-button strong {
  color: var(--muted);
  font-size: 12px;
}

.post-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.post-foot .share-button {
  width: auto;
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.error-alert {
  background: #ffe8e8;
  border-color: #efb1b1;
  color: #9f1f1f;
}

.footer-admin-link {
  width: min(720px, calc(100% - 28px));
  margin: 0 auto 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.footer-admin-link a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-cover {
  position: relative;
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
  text-align: center;
}

.site-cover::before {
  content: "";
  display: block;
  height: clamp(170px, 30vw, 250px);
  background-color: var(--brand);
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
}

.site-cover-profile {
  display: grid;
  justify-items: center;
  padding: 0 18px 28px;
}

.cover-avatar {
  width: 96px;
  height: 96px;
  margin-top: -48px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #d9d9d9;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

.cover-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-cover h1 {
  margin: 20px 0 0;
  letter-spacing: .14em;
  font-size: 24px;
}

.site-cover p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--text);
  font-size: 12px;
}

.public-page .shell {
  width: 100%;
  padding-top: 0;
}

.public-page .feed {
  gap: 0;
}

.public-page .search-note {
  width: min(720px, 100%);
  margin: 0 auto 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.public-page .search-note .text-link {
  font-size: 13px;
  font-weight: 600;
}

.public-page .card {
  width: min(720px, calc(100% - 28px));
  margin: 0 auto;
  border-radius: 0;
  border: 0 solid var(--line);
  border-left-width: 1px;
  border-right-width: 1px;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.public-page .card:first-child {
  border-top: 1px solid var(--line);
}

.public-page .post {
  width: min(720px, 100%);
  margin: 0 auto;
}

.public-page .post-head {
  gap: 12px;
  justify-content: flex-end;
}

.post-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.post-category .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.public-page .post-taxonomy {
  gap: 8px;
  margin-top: 10px;
}

.public-page .post-taxonomy a {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.profile-links-panel {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.profile-links-panel .profile-links {
  justify-content: center;
  margin-top: 0;
}

.drawer-search {
  border-bottom: 0;
}

.admin-page .shell {
  padding-top: 18px;
}

.admin-list-panel {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-list-panel .post-taxonomy span {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.filter-bar label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.filter-bar button {
  align-self: end;
  justify-self: center;
  min-width: 120px;
  background: var(--line);
  color: var(--text);
}

.submit-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 8px;
  align-items: center;
}

.submit-row button {
  width: 100%;
}

.submit-row button:first-child {
  min-height: 48px;
}

.submit-row button.secondary {
  border: 1px solid var(--brand);
  background: #fff;
}

body[data-theme="graphite"] .submit-row button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pin-form {
  margin: 0;
}

.pin-button {
  width: auto;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pin-button.is-pinned {
  color: var(--brand);
}

.export-box {
  display: grid;
  gap: 10px;
  width: min(720px, 100%);
  margin: 22px auto 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.export-box summary {
  cursor: pointer;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.export-box form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.export-box p {
  margin: 0;
}

.export-box button {
  justify-self: start;
}

body[data-theme="graphite"] .export-box {
  background: var(--surface-2);
}

.admin-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.status-pill.draft {
  color: #8a6a00;
}

.status-pill.locked {
  color: #8b3a3a;
}

button.danger,
.button.danger {
  background: #d93d3d;
  color: #fff;
  border-color: #d93d3d;
}

.site-footer {
  width: min(720px, calc(100% - 28px));
  margin: 0 auto;
  padding: 0 0 42px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0;
}

.media-block label span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.alt-list {
  display: grid;
  gap: 8px;
}

@media (max-width: 560px) {
  .site-cover,
  .public-page .card {
    width: 100%;
  }

  .site-cover,
  .public-page .card {
    border-left: 0;
    border-right: 0;
  }

  .profile-hero {
    grid-template-columns: 56px 1fr;
    padding: 16px;
  }

  .avatar {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .topbar-inner {
    min-height: 68px;
  }

  .filter-bar button {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 8px;
    justify-self: stretch;
  }

  .export-box button {
    width: 100%;
    justify-self: stretch;
  }
  
  .public-page .search-note {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 0;
    border-right: 0;
  }
}
