:root {
  color-scheme: light;
  --background: #f5f6f8;
  --surface: #ffffff;
  --surface-muted: #f0f2f5;
  --text: #16191f;
  --text-muted: #626a76;
  --border: #dce0e5;
  --border-strong: #c5cbd3;
  --primary: #2457d6;
  --primary-hover: #1745b8;
  --primary-soft: #eaf0ff;
  --danger: #b42318;
  --danger-hover: #8f1c13;
  --danger-soft: #fff0ee;
  --success-soft: #ecf8f1;
  --shadow-sm: 0 1px 3px rgba(20, 26, 35, 0.08);
  --shadow-md: 0 12px 32px rgba(20, 26, 35, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --topbar-height: 66px;
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 2px;
}

.app-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--topbar-height);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 8px max(18px, env(safe-area-inset-right)) 8px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(12px);
}

.topbar-context,
.topbar-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-context {
  gap: 8px;
}

.topbar-actions {
  gap: 10px;
  flex: 0 0 auto;
}

.topbar-title-wrap {
  min-width: 0;
}

.topbar-app-name {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1;
}

.topbar-title {
  overflow: hidden;
  margin: 4px 0 0;
  font-size: 1.08rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

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

.icon-button-small {
  width: 32px;
  height: 32px;
  border-color: var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
}

.menu-lines {
  display: grid;
  gap: 4px;
  width: 20px;
}

.menu-lines > span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: color-mix(in srgb, var(--text) 34%, transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.menu-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  width: min(340px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.menu-layer.is-open .menu-backdrop,
.menu-layer.is-open .menu-panel {
  opacity: 1;
}

.menu-layer.is-open .menu-panel {
  transform: translateY(0) scale(1);
}

.menu-open {
  overflow: hidden;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.user-badge {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.user-initial {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.user-badge-text {
  display: grid;
  min-width: 0;
}

.user-badge-text strong,
.menu-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge-text small {
  color: var(--text-muted);
}

.menu-nav {
  display: grid;
  gap: 5px;
  padding: 16px 0;
}

.menu-nav a {
  padding: 11px 12px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 650;
}

.menu-nav a:hover,
.menu-nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

.menu-footer {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.menu-email {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.private-email.is-hidden {
  display: inline-flex;
  width: min(100%, 190px);
  height: 1.1em;
  overflow: hidden;
  border-radius: 4px;
  vertical-align: middle;
}

.private-email-mask {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid #c8cbd0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    135deg,
    #ffffff 0,
    #ffffff 7px,
    #d9dce1 7px,
    #d9dce1 14px
  );
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 45%);
}

.menu-email.private-email.is-hidden {
  width: 100%;
}

.page-shell {
  flex: 1 0 auto;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.deploy-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  color: var(--text-muted);
  font-size: 0.58rem;
  letter-spacing: 0.01em;
}

.deploy-footer > span:not(.visitor-footer):not(.database-usage),
.deploy-footer > time {
  opacity: 0.28;
}

.visitor-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.visitor-footer strong {
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.database-usage {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 3.2rem;
  overflow: hidden;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 1;
}

.database-usage progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #42654e;
  appearance: none;
}

.database-usage progress::-webkit-progress-bar {
  border-radius: inherit;
  background: #42654e;
}

.database-usage progress::-webkit-progress-value {
  border-radius: inherit;
  background: #168344;
}

.database-usage progress::-moz-progress-bar {
  border-radius: inherit;
  background: #168344;
}

.database-usage > span {
  position: relative;
  padding: 0.16rem 0.46rem;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #afd7bd;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
}

.notice-error {
  border-color: #f0b7b1;
  color: #7f1d15;
  background: var(--danger-soft);
}

.notice-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
}

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

.page-heading h2,
.form-card h2,
.account-info-card h2 {
  margin: 3px 0 4px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.page-heading p,
.form-card > p,
.account-info-card > p {
  margin: 0;
  color: var(--text-muted);
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--background);
  background: var(--primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}

.button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.62;
}

.button-compact {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.9rem;
}

.button-small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 0.85rem;
}

.button-secondary {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.button-danger {
  border-color: var(--danger);
  background: var(--danger);
}

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

.button-full {
  width: 100%;
}

.button-google {
  min-height: 48px;
  border-color: #1f1f1f;
  color: #fff;
  background: #1f1f1f;
}

.button-google:hover {
  border-color: #000;
  background: #000;
}

.post-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.post-row-link {
  display: block;
  padding: 17px 18px;
  text-decoration: none;
}

.post-row-link:hover {
  background: var(--surface-muted);
}

.post-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 158px 68px;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.post-row-title {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  gap: 5px;
}

.post-row h3 {
  overflow: hidden;
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta {
  display: contents;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.post-meta > * {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta-views {
  text-align: right;
}

.admin-author-star {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-left: 0.2em;
  color: #d6a21c;
  line-height: 1;
  vertical-align: baseline;
  transform: translateY(-0.1em);
  filter: drop-shadow(0 1px 0 rgb(107 75 0 / 25%));
}

.admin-author-star svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.comment-count {
  display: inline;
  flex: 0 0 auto;
  min-width: 0;
  height: auto;
  padding: 0;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.dashboard-root {
  display: grid;
  gap: 22px;
}

.dashboard-quick-links-section {
  display: grid;
  gap: 10px;
}

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

.dashboard-section-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-bookmark-add-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.dashboard-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-edit-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.dashboard-home-intro {
  position: relative;
}

.dashboard-home-title {
  width: fit-content;
  cursor: help;
  outline: none;
}

.dashboard-home-title:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: 1px solid var(--primary);
}

.dashboard-home-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(360px, calc(100vw - 44px));
  padding: 8px 10px;
  transform: translateY(-4px);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  opacity: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
  line-height: 1.45;
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.dashboard-home-title:hover + .dashboard-home-tooltip,
.dashboard-home-title:focus-visible + .dashboard-home-tooltip {
  transform: translateY(0);
  opacity: 1;
}

.gear-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.dashboard-edit-toggle {
  width: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
}

.dashboard-edit-icon {
  width: 19px;
  height: 19px;
}

.dashboard-save-status {
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.dashboard-widget {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-root.is-editing .dashboard-widget,
.dashboard-root.is-editing .bookmark-quick-link {
  border-color: var(--border-strong);
}

.dashboard-root.is-saving {
  opacity: 0.76;
  pointer-events: none;
}

.dashboard-widget-ghost {
  opacity: 0.35;
}

.dashboard-widget-chosen {
  border-color: var(--primary);
}

.dashboard-widget-drag {
  transform: rotate(0.5deg);
}

.dashboard-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.dashboard-widget-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dashboard-widget-header h3,
.widget-catalog-item h3 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-widget-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.dashboard-widget-actions form,
.dashboard-widget-header > form {
  display: inline-flex;
}

.dashboard-remove-form {
  align-items: center;
  align-self: center;
  margin: 0;
}

.dashboard-remove-form,
.dashboard-edit-controls {
  display: none !important;
}

.dashboard-root.is-editing .dashboard-remove-form,
.dashboard-root.is-editing .dashboard-edit-controls {
  display: inline-flex !important;
}

.dashboard-edit-controls {
  align-items: center;
  gap: 4px;
}

.dashboard-widget-actions > .text-button,
.dashboard-widget-actions > .dashboard-remove-form > .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  line-height: 1;
}

.dashboard-move-button,
.dashboard-drag-handle {
  color: var(--text-muted);
}

.dashboard-drag-handle {
  cursor: grab;
  touch-action: none;
}

.dashboard-drag-handle:active {
  cursor: grabbing;
}

.widget-remove-button {
  color: var(--text-muted);
}

.dashboard-remove-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.dashboard-post-list {
  display: grid;
}

.dashboard-post-row {
  display: grid;
  gap: 5px;
  padding: 12px 18px;
  text-decoration: none;
}

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

.dashboard-post-row:hover {
  background: var(--surface-muted);
}

.dashboard-post-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
}

.dashboard-post-title strong {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-post-title span {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
}

.dashboard-post-meta {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 150px 64px;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.dashboard-post-meta > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-post-meta > :last-child {
  text-align: right;
}

.dashboard-widget-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

.dashboard-widget-empty p {
  margin: 0;
}

.dashboard-add-slot {
  display: grid;
  order: 2147483647;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 28px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.dashboard-add-slot:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 3%, var(--surface));
}

.dashboard-add-slot small {
  font-size: 0.76rem;
}

.dashboard-add-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 3px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
}

.bookmark-quick-link {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.bookmark-quick-link-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  text-decoration: none;
}

.bookmark-quick-link-main:hover {
  background: var(--surface-muted);
}

.bookmark-quick-link-main > span:last-child {
  display: grid;
  min-width: 0;
}

.bookmark-quick-link-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-quick-link-main strong {
  font-size: 0.82rem;
}

.bookmark-quick-link-actions {
  display: none;
}

.dashboard-root.is-editing .bookmark-quick-link-main {
  padding-bottom: 40px;
  pointer-events: none;
}

.dashboard-root.is-editing .bookmark-quick-link-actions {
  position: absolute;
  right: 8px;
  bottom: 7px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.bookmark-quick-link-actions .dashboard-edit-controls {
  gap: 2px;
}

.bookmark-quick-link-actions .icon-button-small {
  width: 28px;
  height: 28px;
}

.bookmark-widget-icon,
.widget-catalog-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
}

.bookmark-quick-link .bookmark-widget-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.bookmark-quick-link .bookmark-widget-icon img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.bookmark-dialog {
  width: min(520px, calc(100% - 24px));
}

.bookmark-dialog-content {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.bookmark-dialog-fields {
  display: grid;
  gap: 12px;
}

.bookmark-dialog-fields label {
  display: grid;
  gap: 6px;
}

.bookmark-dialog-fields label > span {
  font-size: 0.78rem;
  font-weight: 800;
}

.bookmark-dialog-fields input {
  width: 100%;
}

.bookmark-icon-settings {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.bookmark-icon-settings legend {
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.bookmark-icon-mode-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bookmark-icon-mode-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.bookmark-icon-mode-options label:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.bookmark-icon-mode-options input,
.bookmark-icon-color-options input {
  accent-color: var(--primary);
}

.bookmark-icon-color-field,
.bookmark-icon-url-field {
  display: grid;
  gap: 8px;
}

.bookmark-icon-color-field > span,
.bookmark-icon-url-heading > span {
  font-size: 0.78rem;
  font-weight: 800;
}

.bookmark-icon-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bookmark-icon-color-options label {
  display: grid;
  grid-template-columns: auto 30px;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.bookmark-icon-color-options label > span:last-child {
  grid-column: 1 / -1;
}

.bookmark-icon-color-swatch {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 9px;
}

.bookmark-icon-color-options label:has(input:checked) .bookmark-icon-color-swatch {
  border-color: currentColor;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
}

.bookmark-icon-color-swatch svg {
  width: 22px;
  height: 22px;
}

.bookmark-icon-color-green {
  color: #157347;
  background: #e7f3ea;
}

.bookmark-icon-color-blue {
  color: #2457a6;
  background: #e7f0ff;
}

.bookmark-icon-color-purple {
  color: #6f42c1;
  background: #f0e9ff;
}

.bookmark-icon-color-orange {
  color: #b85c00;
  background: #fff0df;
}

.bookmark-icon-color-rose {
  color: #b4235a;
  background: #ffe8ee;
}

.bookmark-icon-url-field input {
  width: 100%;
}

.bookmark-icon-url-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bookmark-icon-lookup-status {
  min-height: 1.2em;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.bookmark-icon-lookup-status.is-error {
  color: var(--danger);
}

.bookmark-icon-settings:has(input[name="iconMode"][value="url"]:checked)
  .bookmark-icon-color-field,
.bookmark-icon-settings:has(input[name="iconMode"][value="default"]:checked)
  .bookmark-icon-url-field {
  opacity: 0.58;
}

.bookmark-icon-hint {
  margin: -4px 0 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.bookmark-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.widget-catalog-rss .widget-catalog-icon {
  font-size: 0.65rem;
  letter-spacing: -0.02em;
}

.rss-item-list {
  display: grid;
}

.rss-item-row {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 18px;
  text-decoration: none;
}

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

.rss-item-row:hover {
  background: var(--surface-muted);
}

.rss-item-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rss-item-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rss-item-row time {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.rss-widget-error small {
  font-size: 0.76rem;
}

.widget-dialog-content {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.widget-catalog-item {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.widget-catalog-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.widget-catalog-copy p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.widget-catalog-item > .button,
.widget-catalog-item > form:not(.bookmark-widget-form) {
  justify-self: end;
}

.bookmark-widget-form {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr) auto;
  align-items: end;
  gap: 10px;
}

.bookmark-widget-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bookmark-widget-form label > span {
  font-size: 0.78rem;
  font-weight: 700;
}

.bookmark-widget-form input {
  width: 100%;
}

.widget-catalog-hint {
  margin: -4px 0 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 36px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--surface);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 1.1rem;
}

.empty-state p {
  margin: 6px 0 0;
}

.form-card,
.account-info-card,
.post-detail,
.comments-section {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form-card {
  width: min(820px, 100%);
  margin: 0 auto;
}

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

.stack-form label,
.comment-form {
  display: grid;
  gap: 7px;
}

.stack-form label > span,
.comment-form > label {
  font-size: 0.9rem;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
}

input,
select {
  min-height: 44px;
  padding: 9px 11px;
}

textarea {
  min-height: 110px;
  padding: 11px;
  line-height: 1.6;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  outline: 3px solid color-mix(in srgb, var(--primary) 13%, transparent);
}

.form-hint {
  margin: -7px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.form-actions-split {
  justify-content: space-between;
}

.form-actions-end {
  justify-content: flex-end;
}

.post-detail {
  margin-bottom: 22px;
}

.post-detail-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.post-detail-header h2 {
  margin: 5px 0 10px;
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.post-detail-meta {
  font-size: 0.88rem;
}

.post-body,
.comment-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-body {
  min-height: 160px;
  padding: 28px 0;
  font-size: 1rem;
  line-height: 1.8;
}

.resource-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.comments-section {
  padding-top: 24px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 1.22rem;
}

.section-title-row span {
  color: var(--primary);
  font-weight: 800;
}

.comments-empty {
  padding: 18px 0;
  color: var(--text-muted);
}

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

.comment {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

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

.comment time {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.comment footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.comment footer form {
  display: inline;
}

.text-button,
.text-link {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.text-button:hover,
.text-link:hover {
  text-decoration: underline;
}

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

.comment-form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

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

.ticket-lane {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.ticket-lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 12px;
}

.ticket-lane-header h3 {
  margin: 0;
  font-size: 0.96rem;
}

.ticket-lane-header span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  font-size: 0.78rem;
  font-weight: 800;
}

.ticket-lane-list {
  display: grid;
  min-height: 90px;
  gap: 10px;
}

.ticket-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ticket-card-top,
.ticket-card-footer,
.ticket-move-actions {
  display: flex;
  align-items: center;
}

.ticket-card-top,
.ticket-card-footer {
  justify-content: space-between;
  gap: 10px;
}

.ticket-card-open {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ticket-card-open:hover {
  color: var(--primary);
}

.drag-handle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  cursor: grab;
  font-size: 1.15rem;
}

.drag-handle:hover {
  background: var(--surface-muted);
}

.drag-handle:active {
  cursor: grabbing;
}

.ticket-note {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 13px;
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.ticket-note-empty {
  font-style: italic;
  opacity: 0.7;
}

.ticket-card-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ticket-trash-list {
  display: grid;
  gap: 12px;
}

.ticket-trash-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ticket-trash-content {
  min-width: 0;
}

.ticket-trash-heading,
.ticket-trash-actions {
  display: flex;
  align-items: center;
}

.ticket-trash-heading {
  gap: 10px;
}

.ticket-trash-heading strong {
  overflow-wrap: anywhere;
}

.ticket-trash-heading span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.ticket-trash-card .ticket-note {
  margin-bottom: 8px;
}

.ticket-trash-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ticket-trash-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.ticket-trash-actions form {
  margin: 0;
}

.ticket-move-actions {
  gap: 5px;
}

.ticket-move-actions form {
  display: inline-flex;
}

.icon-spacer {
  width: 32px;
}

.ticket-ghost {
  opacity: 0.35;
}

.ticket-chosen {
  border-color: var(--primary);
}

.ticket-drag {
  transform: rotate(1deg);
}

.ticket-board.is-saving {
  opacity: 0.76;
  pointer-events: none;
}

.ticket-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.ticket-dialog::backdrop {
  background: color-mix(in srgb, var(--text) 42%, transparent);
}

.ticket-dialog > form {
  padding: 22px;
}

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

.dialog-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.dialog-delete-form {
  padding-top: 0 !important;
}

.separate-danger-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.account-grid .form-card {
  width: 100%;
}

.compact-form {
  margin-top: 22px;
}

.account-info-card dl {
  margin: 24px 0;
}

.account-info-card dl > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.account-info-card dt {
  color: var(--text-muted);
}

.account-info-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.privacy-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.privacy-settings h2 {
  margin: 3px 0 4px;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}

.privacy-settings p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
}

.email-privacy-form {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.email-privacy-status {
  min-width: 36px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
}

.email-privacy-status.is-on {
  color: var(--primary);
}

button.privacy-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  box-shadow: none;
}

button.privacy-toggle:hover {
  background: var(--surface-muted);
}

button.privacy-toggle.is-on {
  border-color: var(--primary);
  background: var(--primary);
}

button.privacy-toggle.is-on:hover {
  background: var(--primary-hover);
}

button.privacy-toggle > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 22%);
  transition: transform 160ms ease;
}

button.privacy-toggle.is-on > span {
  transform: translateX(22px);
}

.theme-settings {
  display: grid;
  gap: 24px;
  margin-top: 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.theme-settings-heading h2 {
  margin: 3px 0 4px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.theme-settings-heading p:last-child,
.theme-quick-form p,
.theme-card-heading p,
.theme-library-empty {
  margin: 0;
  color: var(--text-muted);
}

.theme-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.theme-quick-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.theme-quick-form > div,
.theme-quick-form > label {
  grid-column: 1 / -1;
}

.theme-quick-form label {
  display: grid;
  gap: 6px;
}

.theme-quick-form label span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.theme-library-group {
  display: grid;
  gap: 12px;
}

.theme-library-group .section-title-row {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.theme-library-group .section-title-row h3 {
  margin: 0;
}

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

.theme-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.theme-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 16%, transparent);
}

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

.theme-card-heading > div {
  min-width: 0;
}

.theme-card-heading h3 {
  overflow: hidden;
  margin: 7px 0 0;
  font-size: 1.04rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-card-heading p {
  margin-top: 4px;
  font-size: 0.78rem;
}

.theme-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.theme-type-builtin {
  color: var(--primary);
  background: var(--primary-soft);
}

.theme-type-owned {
  color: #9a5b15;
  background: #fff3da;
}

.theme-type-shared {
  color: #6b3cad;
  background: #f2ebff;
}

.theme-pixel-icon {
  display: grid;
  grid-template-columns: repeat(4, 3px);
  grid-template-rows: repeat(4, 3px);
  gap: 1px;
  width: 15px;
  height: 15px;
  image-rendering: pixelated;
}

.theme-pixel-icon i {
  width: 3px;
  height: 3px;
  background: currentColor;
  opacity: 0.16;
}

.theme-type-builtin .theme-pixel-icon i:nth-child(2),
.theme-type-builtin .theme-pixel-icon i:nth-child(5),
.theme-type-builtin .theme-pixel-icon i:nth-child(6),
.theme-type-builtin .theme-pixel-icon i:nth-child(7),
.theme-type-builtin .theme-pixel-icon i:nth-child(10),
.theme-type-builtin .theme-pixel-icon i:nth-child(11),
.theme-type-builtin .theme-pixel-icon i:nth-child(15),
.theme-type-owned .theme-pixel-icon i:nth-child(1),
.theme-type-owned .theme-pixel-icon i:nth-child(5),
.theme-type-owned .theme-pixel-icon i:nth-child(6),
.theme-type-owned .theme-pixel-icon i:nth-child(10),
.theme-type-owned .theme-pixel-icon i:nth-child(11),
.theme-type-owned .theme-pixel-icon i:nth-child(12),
.theme-type-owned .theme-pixel-icon i:nth-child(16),
.theme-type-shared .theme-pixel-icon i:nth-child(2),
.theme-type-shared .theme-pixel-icon i:nth-child(3),
.theme-type-shared .theme-pixel-icon i:nth-child(5),
.theme-type-shared .theme-pixel-icon i:nth-child(8),
.theme-type-shared .theme-pixel-icon i:nth-child(10),
.theme-type-shared .theme-pixel-icon i:nth-child(11),
.theme-type-shared .theme-pixel-icon i:nth-child(13),
.theme-type-shared .theme-pixel-icon i:nth-child(16) {
  opacity: 1;
}

.theme-color-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.theme-color-chip {
  display: block;
}

.theme-color-default-background { background: #f5f6f8; }
.theme-color-default-surface { background: #ffffff; }
.theme-color-default-primary { background: #2457d6; }
.theme-color-default-text { background: #16191f; }
.theme-color-midnight-background { background: #0f172a; }
.theme-color-midnight-surface { background: #1e293b; }
.theme-color-midnight-primary { background: #60a5fa; }
.theme-color-midnight-text { background: #f8fafc; }
.theme-color-forest-background { background: #eef4ec; }
.theme-color-forest-surface { background: #fbfdf9; }
.theme-color-forest-primary { background: #347548; }
.theme-color-forest-text { background: #1d2b1d; }

.theme-share-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.theme-share-code > div {
  display: grid;
  min-width: 0;
}

.theme-share-code span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.theme-share-code code {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-editor {
  border-top: 1px solid var(--border);
}

.theme-editor summary {
  padding: 12px 0 0;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.theme-editor-form {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.theme-name-field {
  display: grid;
  gap: 6px;
}

.theme-color-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.theme-color-fields label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.theme-color-fields input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 2px;
  cursor: pointer;
}

.theme-delete-form {
  justify-self: end;
}

.theme-library-empty {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.theme-orphan-dialog {
  width: min(400px, calc(100vw - 24px));
}

.theme-orphan-content {
  display: grid;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.theme-orphan-content h2,
.theme-orphan-content p {
  margin: 0;
}

.theme-orphan-content p {
  color: var(--text-muted);
}

.theme-pixel-alert {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 4px solid var(--danger);
  color: var(--danger);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow:
    4px 0 0 var(--danger-soft),
    0 4px 0 var(--danger-soft);
  image-rendering: pixelated;
}

.public-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(145deg, #f3f6ff 0%, #f7f7f8 50%, #eef2f7 100%);
}

.public-main {
  display: grid;
  width: 100%;
  min-width: 0;
  place-items: center;
}

.public-body .deploy-footer {
  padding-bottom: 0;
}

.guest-home {
  display: grid;
  gap: 24px;
  width: min(1120px, 100%);
  margin: auto;
  padding: 28px 0;
}

.guest-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.guest-home-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.guest-home-header p:last-child,
.guest-home-note {
  margin: 0;
  color: var(--text-muted);
}

.guest-login-button {
  flex: 0 0 auto;
}

.guest-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guest-preview-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.guest-preview-header {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.guest-preview-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.guest-preview-list {
  display: grid;
}

.guest-preview-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding: 14px 18px;
  text-decoration: none;
}

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

.guest-preview-row:hover {
  background: var(--surface-muted);
}

.guest-preview-row strong {
  flex: 1 1 120px;
  overflow: hidden;
  min-width: 0;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-preview-meta {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 4px 10px;
  overflow: hidden;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.guest-preview-empty {
  margin: 0;
  padding: 28px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.guest-home-note {
  text-align: center;
}

.login-shell,
.error-shell {
  width: min(440px, 100%);
}

.login-card,
.error-card,
.legal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.login-card {
  padding: clamp(26px, 7vw, 42px);
  text-align: center;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 16px;
  color: #fff;
  background: var(--primary);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.login-card h1 {
  margin: 6px 0 12px;
  font-size: 2rem;
  line-height: 1.2;
}

.login-description {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.login-form {
  display: grid;
  gap: 14px;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.login-legal {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.login-legal a {
  color: var(--primary);
}

.legal-shell {
  width: min(780px, 100%);
  margin: 40px 0;
}

.legal-card {
  padding: clamp(24px, 6vw, 48px);
}

.legal-card h1 {
  margin: 18px 0 8px;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.legal-card h2 {
  margin: 32px 0 8px;
  font-size: 1.15rem;
}

.legal-card p {
  color: #3f4752;
}

.legal-lead {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.error-card {
  padding: 36px;
  text-align: center;
}

.error-code {
  display: block;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.error-card h1,
.error-card h2 {
  margin: 8px 0;
}

.error-card p {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.error-card .error-reference {
  font-size: 0.78rem;
}

.error-reference code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-error-details {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  text-align: left;
}

.admin-error-details summary {
  cursor: pointer;
  font-weight: 800;
}

.admin-error-details dl {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 8px 12px;
  margin: 16px 0 12px;
}

.admin-error-details dt {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-error-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-error-details code {
  font: inherit;
  font-size: 0.82rem;
}

.error-card .admin-error-details p {
  margin: 0;
  font-size: 0.78rem;
}

.app-error-card {
  width: min(600px, 100%);
  margin: 50px auto;
}

.memo-create-card,
.memo-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.memo-create-card {
  margin-bottom: 20px;
  padding: 20px;
}

.memo-create-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.memo-create-heading h3 {
  margin: 0 0 2px;
  font-size: 1.08rem;
}

.memo-create-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.memo-template-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.memo-template-status span,
.memo-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.memo-template-status .is-configured {
  color: #17603a;
  background: var(--success-soft);
}

.memo-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.memo-create-form-with-pattern {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(190px, 0.7fr) auto;
}

.memo-create-form label {
  display: grid;
  gap: 6px;
}

.memo-create-form label > span {
  font-size: 0.86rem;
  font-weight: 750;
}

.memo-list {
  overflow: hidden;
}

.memo-list-header,
.memo-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.memo-list-header {
  min-height: 42px;
  padding: 8px 18px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.memo-list-count {
  min-width: 38px;
  text-align: right;
}

.memo-row {
  min-height: 72px;
  padding: 13px 18px;
}

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

.memo-copy {
  display: grid;
  min-width: 0;
}

.memo-copy strong {
  overflow-wrap: anywhere;
}

.memo-copy time {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.memo-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.memo-kind-number {
  color: #1745b8;
  background: var(--primary-soft);
}

.memo-kind-custom {
  color: #6b3cad;
  background: #f2ebff;
}

.memo-value-link,
.memo-value-disabled {
  overflow: hidden;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-value-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-weight: 750;
  text-decoration: none;
}

.memo-value-link span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.memo-value-link:hover {
  text-decoration: underline;
}

.memo-value-disabled {
  color: var(--text-muted);
}

.memo-settings-card {
  width: min(920px, 100%);
}

.memo-settings-stack {
  display: grid;
  gap: 20px;
}

.memo-settings-card > .notice {
  margin-top: 18px;
}

.memo-settings-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.memo-settings-group legend {
  padding: 0 7px;
  font-weight: 800;
}

.memo-settings-group > p {
  grid-column: 1 / -1;
  overflow: hidden;
  margin: 0 0 2px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-settings-group code {
  color: var(--text-muted);
}

.memo-settings-group mark {
  padding: 2px 5px;
  color: var(--primary);
  background: var(--primary-soft);
}

.memo-settings-group label {
  display: grid;
  gap: 7px;
}

.memo-pattern-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(160px, 0.9fr) auto;
  align-items: end;
  gap: 10px;
}

.memo-pattern-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.memo-pattern-form label > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.memo-pattern-create-form {
  margin-top: 20px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.memo-pattern-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.memo-pattern-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.memo-pattern-row > form:last-child {
  padding-bottom: 6px;
}

.memo-pattern-empty {
  margin-top: 18px;
  padding: 28px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--surface-muted);
  text-align: center;
}

.memo-pattern-limit {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: right;
}

.memo-settings-back {
  display: flex;
  justify-content: center;
}

.image-upload-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.image-upload-card h3,
.image-upload-card p {
  margin: 0;
}

.image-upload-card p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.image-file-picker {
  position: relative;
  cursor: pointer;
}

.image-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.image-file-picker:focus-within .button {
  outline: 3px solid color-mix(in srgb, var(--primary) 18%, transparent);
}

.image-upload-progress {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.image-upload-progress[hidden] {
  display: none;
}

.image-upload-progress progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--primary);
}

.private-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.private-image-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.private-image-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  color: var(--text-muted);
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
}

.private-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.private-image-preview-missing {
  padding: 20px;
  text-align: center;
}

.private-image-meta {
  display: grid;
  gap: 3px;
  padding: 14px 14px 10px;
}

.private-image-meta strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-image-meta span {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.private-image-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 7px;
  padding: 0 14px 14px;
}

.private-image-url-row code {
  overflow: hidden;
  min-width: 0;
  height: 34px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-image-delete {
  padding: 0 14px 14px;
  text-align: right;
}

.image-copy-button {
  min-height: 34px;
  height: 34px;
  padding: 5px 10px;
  font-size: 0.76rem;
}

.image-copied-mark {
  display: grid;
  width: 30px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: #17603a;
  background: var(--success-soft);
  font-size: 0.84rem;
  font-weight: 900;
}

.image-copied-mark[hidden] {
  visibility: hidden;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid #b8d9c5;
  border-radius: 10px;
  color: #174d2d;
  background: #effaf3;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast-error {
  border-color: #efb5b5;
  color: #8d2020;
  background: #fff1f1;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-feature-grid {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.admin-feature-card {
  display: grid;
  gap: 18px;
}

.admin-feature-card > p,
.admin-feature-heading h3,
.admin-feature-heading p {
  margin: 0;
}

.admin-feature-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-feature-heading h3 {
  margin-top: 3px;
  font-size: 1.18rem;
}

.feature-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #d5d9e2;
  border-radius: 999px;
  color: var(--text-muted);
  background: #f5f6f8;
  font-size: 0.76rem;
}

.feature-status.is-enabled {
  border-color: #b8d9c5;
  color: #174d2d;
  background: var(--success-soft);
}

.admin-feature-details {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--border);
}

.admin-feature-details > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.admin-feature-details dt {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-feature-details dd {
  margin: 0;
  font-size: 0.84rem;
}

.admin-feature-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cache-page-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cache-page-tabs a {
  padding: 9px 14px;
  border-radius: 7px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.cache-page-tabs a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-muted);
}

.cache-table-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.cache-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.cache-table th,
.cache-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.cache-table th {
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.cache-table tbody tr:last-child td {
  border-bottom: 0;
}

.cache-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-muted) 55%, transparent);
}

.cache-file-cell {
  max-width: 330px;
}

.cache-file-cell a {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cache-status {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.cache-status-hit {
  color: #17603a;
  background: var(--success-soft);
}

.cache-status-miss {
  color: #8a4b08;
  background: #fff3d6;
}

.cache-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.cache-pagination-summary {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

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

.cache-pagination .is-disabled {
  cursor: default;
  opacity: 0.45;
}

.admin-members-table {
  min-width: 1180px;
}

.visitor-series-card {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.visitor-series-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.visitor-series-heading h3 {
  margin: 3px 0 0;
}

.visitor-series-heading p:last-child {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.visitor-series-tabs {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(3.6rem, 1fr));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.visitor-series-tabs a {
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-align: center;
}

.visitor-series-tabs a:hover,
.visitor-series-tabs a:focus-visible,
.visitor-series-tabs a.is-active {
  color: #fff;
  background: var(--primary);
}

.visitor-series-figure {
  margin: 0;
}

.visitor-series-scroll {
  overflow-x: auto;
  padding: 8px 4px 2px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-subtle) 78%, transparent);
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.visitor-series-chart {
  display: block;
  max-width: none;
}

.visitor-series-axis {
  stroke: var(--border-strong);
  stroke-width: 1;
}

.visitor-series-bar {
  fill: var(--primary);
}

.visitor-series-bar.is-empty {
  fill: var(--border-strong);
}

.visitor-series-label {
  fill: var(--text-muted);
  font-size: 8px;
}

.visitor-series-figure figcaption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.visitor-series-empty {
  color: var(--text) !important;
  font-weight: 700;
}

.visitor-series-data summary {
  width: fit-content;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.visitor-series-data .cache-table-wrap {
  max-height: 320px;
  margin-top: 10px;
}

.visitor-log-table {
  min-width: 1480px;
}

@media (max-width: 680px) {
  .visitor-series-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .visitor-series-tabs {
    width: 100%;
  }
}

.visitor-log-wide {
  max-width: 360px;
}

.visitor-log-wide code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-members-table td:first-child strong,
.admin-members-table td:nth-child(2) span {
  display: block;
}

.admin-member-id,
.admin-members-table td:nth-child(2) small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.admin-member-status,
.admin-activity-kind {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #17603a;
  background: var(--success-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-member-status.status-blocked {
  color: #8f2f2f;
  background: var(--danger-soft);
}

.admin-member-empty {
  color: var(--text-muted);
}

.admin-member-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.admin-member-summary > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.admin-member-summary > div:last-child {
  border-right: 0;
}

.admin-member-summary dt {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-member-summary dd {
  margin: 0;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-activity-item {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-activity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.admin-activity-kind.kind-comment {
  color: #5a3f96;
  background: #eee8ff;
}

.admin-activity-item h3 {
  margin: 10px 0 7px;
  font-size: 1rem;
}

.admin-activity-item h3 a {
  color: var(--text);
}

.admin-activity-body {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 18px;
  }

  .topbar {
    padding-left: max(11px, env(safe-area-inset-left));
    padding-right: max(11px, env(safe-area-inset-right));
  }

  .topbar-app-name {
    display: none;
  }

  .topbar-title {
    margin-top: 0;
    font-size: 1rem;
  }

  .admin-member-summary {
    grid-template-columns: 1fr 1fr;
  }

  .admin-member-summary > div:nth-child(2) {
    border-right: 0;
  }

  .admin-member-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .button-compact {
    padding-inline: 11px;
  }

  .ticket-board {
    grid-template-columns: repeat(3, minmax(285px, 82vw));
    overflow-x: auto;
    margin-inline: -11px;
    padding: 0 11px 14px;
    scroll-snap-type: x proximity;
  }

  .ticket-lane {
    scroll-snap-align: start;
  }

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

  .privacy-settings {
    align-items: flex-start;
    flex-direction: column;
  }

  .email-privacy-form {
    align-self: stretch;
    justify-content: flex-end;
  }

  .theme-create-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-home-header {
    align-items: stretch;
    flex-direction: column;
  }

  .guest-preview-grid {
    grid-template-columns: 1fr;
  }

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

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

  .memo-create-form .button {
    grid-column: 1 / -1;
  }

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

  .memo-pattern-form label:first-of-type,
  .memo-pattern-form .button {
    grid-column: 1 / -1;
  }

  .memo-list-header,
  .memo-row {
    grid-template-columns: minmax(140px, 0.8fr) minmax(180px, 1fr) auto;
    gap: 12px;
  }

  .private-image-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .post-detail,
  .comments-section,
  .form-card,
  .account-info-card {
    padding: 20px;
  }

  .cache-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .cache-pagination-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cache-pagination-actions .button {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .topbar-actions {
    gap: 4px;
  }

  .topbar-back {
    width: 36px;
    height: 36px;
  }

  .menu-panel {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 86vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(20px);
  }

  .menu-layer.is-open .menu-panel {
    transform: translateY(0);
  }

  .post-row-link {
    padding: 15px 14px;
  }

  .post-row-main {
    grid-template-columns: minmax(0, 1fr) 68px 126px 54px;
    gap: 8px;
  }

  .post-meta > * {
    font-size: 0.74rem;
  }

  .dashboard-widget-header,
  .dashboard-post-row,
  .rss-item-row {
    padding-inline: 14px;
  }

  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .memo-create-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .memo-template-status {
    justify-content: flex-start;
  }

  .memo-create-form,
  .memo-settings-group,
  .memo-pattern-form {
    grid-template-columns: 1fr;
  }

  .memo-create-form .button,
  .memo-settings-group > p,
  .memo-pattern-form label:first-of-type,
  .memo-pattern-form .button {
    grid-column: auto;
  }

  .memo-list-header {
    display: none;
  }

  .memo-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 15px 14px;
  }

  .memo-value-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .memo-row form {
    grid-column: 2;
    grid-row: 1;
  }

  .memo-pattern-row {
    grid-template-columns: 1fr;
  }

  .image-upload-card {
    grid-template-columns: 1fr;
  }

  .image-file-picker .button {
    width: 100%;
  }

  .memo-pattern-row > form:last-child {
    padding-bottom: 0;
    text-align: right;
  }

  .dashboard-edit-panel {
    justify-content: space-between;
  }

  .form-actions {
    align-items: stretch;
  }

  .form-actions .button {
    flex: 1;
  }

  .ticket-trash-card {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-trash-actions {
    justify-content: flex-end;
  }

  .theme-card-heading,
  .theme-share-code {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-card-heading form,
  .theme-card-heading .button,
  .theme-share-code .button {
    width: 100%;
  }

  .public-body {
    padding: 12px;
  }

  .guest-home {
    padding: 0;
  }

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

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

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

.public-devlog-shell,
.devlog-directory,
.devlog-blog {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.public-devlog-shell {
  min-height: calc(100vh - 24px);
  place-self: start center;
}

.public-devlog-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px 36px;
}

.public-devlog-brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.devlog-hero {
  padding: 48px 0 52px;
  border-bottom: 1px solid var(--border);
}

.devlog-hero h1,
.devlog-blog-header h1,
.devlog-entry-header h1 {
  margin: 4px 0 10px;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.devlog-hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.4rem);
}

.devlog-hero > p:last-child,
.devlog-blog-header p,
.devlog-entry-meta {
  color: var(--text-muted);
}

.devlog-author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 28px 0;
}

.devlog-author-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.devlog-author-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.devlog-author-avatar,
.devlog-blog-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), #7138c7);
  font-weight: 800;
}

.devlog-author-avatar {
  width: 48px;
  height: 48px;
}

.devlog-author-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.devlog-author-copy small,
.devlog-author-copy time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.devlog-blog-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 38px 0 32px;
  border-bottom: 1px solid var(--border);
}

.devlog-blog-avatar {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  font-size: 2rem;
}

.devlog-blog-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.devlog-blog-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.devlog-blog-title-row h1 {
  min-width: 0;
}

.devlog-archive-toggle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.devlog-archive-toggle:hover,
.devlog-archive-toggle.is-active {
  color: var(--primary);
  background: var(--surface-muted);
}

.devlog-archive-toggle.is-active {
  transform: rotate(30deg);
}

.devlog-archive-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.devlog-archive-panel[hidden] {
  display: none;
}

.devlog-archive-panel p {
  margin: 4px 0 0;
  font-size: 0.86rem;
}

.devlog-archive-panel .button {
  flex: 0 0 auto;
}

.devlog-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 28px 0;
}

.devlog-post-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.devlog-post-card > a {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 26px;
  text-decoration: none;
}

.devlog-post-card h2 {
  margin: 18px 0 10px;
  font-size: 1.45rem;
  line-height: 1.25;
}

.devlog-post-card-preview {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.devlog-post-card-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.devlog-post-card p {
  margin: 0;
  color: var(--text-muted);
}

.devlog-export-page {
  width: min(100%, 720px);
  margin: 48px auto;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.devlog-export-page h1 {
  margin: 6px 0 12px;
}

.devlog-export-description {
  margin: 0;
  color: var(--text-muted);
}

.devlog-export-progress {
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.devlog-export-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.devlog-export-progress-heading span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.devlog-export-progress progress {
  display: block;
  width: 100%;
  height: 14px;
  margin-top: 16px;
  accent-color: var(--primary);
}

.devlog-export-progress p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.devlog-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.devlog-post-card-meta,
.devlog-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.devlog-read-more {
  margin-top: auto;
  padding-top: 22px;
  color: var(--primary);
  font-weight: 700;
}

.visibility-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  color: #744210;
  background: #fff4d7;
  font-size: 0.72rem;
  font-weight: 700;
}

.devlog-entry {
  width: min(100%, 820px);
  margin: 20px auto 72px;
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.devlog-entry-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.devlog-entry-author {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.devlog-entry-header h1 {
  max-width: 720px;
  margin-top: 14px;
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.devlog-post-export-toggle {
  width: 30px;
  height: 30px;
  margin-left: 2px;
  font-size: 0.95rem;
}

.devlog-post-export-toggle .gear-icon {
  width: 17px;
  height: 17px;
}

.devlog-post-export-panel {
  margin-top: 16px;
}

.devlog-rich-body {
  padding-top: 34px;
  font-size: 1.04rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.devlog-rich-body h2,
.devlog-rich-body h3 {
  margin: 2.2em 0 0.65em;
  line-height: 1.3;
}

.devlog-rich-body blockquote {
  margin: 1.5em 0;
  padding: 2px 0 2px 18px;
  border-left: 4px solid var(--primary);
  color: var(--text-muted);
}

.devlog-rich-body pre,
.devlog-rich-body code {
  border-radius: 6px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.devlog-rich-body pre {
  padding: 18px;
  overflow-x: auto;
}

.devlog-plain-body {
  white-space: pre-wrap;
}

.devlog-image {
  margin: 2em 0;
}

.devlog-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.devlog-image figcaption {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

.visibility-fieldset {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.visibility-label {
  font-weight: 700;
}

.visibility-option {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.visibility-option input {
  margin: 0;
}

.devlog-editor-field {
  display: grid;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--surface-muted);
}

.editor-toolbar button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.editor-toolbar button:hover:not(:disabled) {
  border-color: var(--border);
  background: var(--surface);
}

.editor-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.toolbar-divider {
  width: 1px;
  margin: 3px;
  background: var(--border);
}

.devlog-editor {
  min-height: 420px;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--surface);
  line-height: 1.8;
  outline: 0;
  overflow-wrap: anywhere;
}

.devlog-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.devlog-editor .devlog-image {
  position: relative;
}

.devlog-editor figcaption {
  outline: 0;
}

.devlog-editor figcaption:empty::before {
  color: var(--text-muted);
  content: "이미지 설명을 입력하세요";
}

.editor-status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (max-width: 680px) {
  .public-devlog-topbar {
    padding-bottom: 18px;
  }

  .devlog-hero {
    padding: 30px 0;
  }

  .devlog-post-grid {
    grid-template-columns: 1fr;
  }

  .devlog-export-page {
    margin: 0;
    padding: 26px 20px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .devlog-export-progress-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .devlog-export-actions {
    flex-direction: column;
  }

  .devlog-export-actions .button {
    width: 100%;
  }

  .devlog-blog-header {
    align-items: flex-start;
  }

  .devlog-blog-avatar {
    width: 58px;
    height: 58px;
    font-size: 1.35rem;
  }

  .devlog-archive-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .devlog-archive-panel .button {
    width: 100%;
  }

  .devlog-entry {
    margin-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .editor-status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
