:root {
  color-scheme: dark;
  --color-page: #061119;
  --color-page-soft: #0a1a27;
  --color-surface: #0f2230;
  --color-surface-soft: #173240;
  --color-ink: #eef9fa;
  --color-muted: #afc6ce;
  --color-faint: #7e99a5;
  --color-border: #234754;
  --color-border-strong: #4d8fa2;
  --color-accent: #58dfea;
  --color-accent-strong: #a6fff7;
  --color-warm: #e0c076;
  --color-sky: #8ca7ff;
  --shadow-soft: 0 24px 74px rgb(0 11 18 / 48%);
  --shadow-card: 0 22px 52px rgb(0 11 18 / 34%);
  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Noto Serif KR", "Apple SD Gothic Neo", "Malgun Gothic", serif;
  --shell: min(1120px, calc(100vw - 40px));
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --header-height: 76px;
  --focus-ring: 0 0 0 4px rgb(88 223 234 / 24%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-page);
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  background:
    linear-gradient(180deg, rgb(12 36 53 / 74%) 0, rgb(6 17 25 / 0%) 390px),
    linear-gradient(115deg, rgb(140 167 255 / 18%) 0, rgb(140 167 255 / 0%) 42%),
    linear-gradient(245deg, rgb(224 192 118 / 12%) 0, rgb(224 192 118 / 0%) 38%),
    linear-gradient(180deg, var(--color-page-soft) 0, var(--color-page) 58%, #03080d 100%),
    var(--color-page);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgb(88 223 234 / 8%) 1px, transparent 1px),
    linear-gradient(180deg, rgb(88 223 234 / 8%) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 44%, rgb(140 167 255 / 12%) 44% 45%, transparent 45% 100%),
    radial-gradient(circle at 18% 18%, rgb(88 223 234 / 38%) 0 1.5px, transparent 2px),
    radial-gradient(circle at 68% 14%, rgb(224 192 118 / 28%) 0 1.5px, transparent 2px),
    radial-gradient(circle at 86% 38%, rgb(140 167 255 / 30%) 0 1.5px, transparent 2px),
    radial-gradient(circle at 26% 66%, rgb(88 223 234 / 24%) 0 1.5px, transparent 2px);
  background-size:
    72px 72px,
    72px 72px,
    360px 360px,
    auto,
    auto,
    auto,
    auto;
  opacity: 0.68;
}

body::after {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: min(36vh, 340px);
  pointer-events: none;
  content: "";
  background:
    linear-gradient(160deg, transparent 0 26%, rgb(88 223 234 / 13%) 26% 27%, transparent 27% 100%),
    linear-gradient(24deg, transparent 0 58%, rgb(140 167 255 / 12%) 58% 59%, transparent 59% 100%),
    linear-gradient(180deg, transparent 0, rgb(6 17 25 / 74%) 68%, rgb(3 8 13 / 94%) 100%);
}

body > * {
  position: relative;
  z-index: 1;
}

body.modal-open {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ql-hidden {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-page);
  padding: 10px 14px;
  font-weight: 700;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  border-bottom: 1px solid rgb(77 143 162 / 38%);
  background: rgb(6 17 25 / 78%);
  backdrop-filter: blur(18px) saturate(1.25);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-inner {
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 152px;
  height: auto;
  filter: drop-shadow(0 10px 22px rgb(88 223 234 / 16%));
}

.header-search-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgb(15 34 48 / 86%);
  color: var(--color-accent-strong);
  box-shadow: 0 12px 30px rgb(0 11 18 / 32%);
}

.header-search-button:hover {
  background: rgb(23 50 64 / 94%);
}

.header-search-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-main {
  padding: 42px 0 88px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.section-label {
  margin: 0 0 12px;
  color: var(--color-warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--color-ink);
  line-height: 1.18;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 700;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(40px, 6vw, 72px);
}

.search-panel {
  margin-top: 0;
}

.search-panel label,
.login-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: rgb(15 34 48 / 88%);
  color: var(--color-ink);
  padding: 0 13px;
  font-size: 15px;
}

input::placeholder {
  color: var(--color-faint);
}

textarea {
  resize: vertical;
}

.search-row button,
.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #031018;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
}

.search-row button:hover,
.primary-button:hover {
  background: var(--color-accent-strong);
}

.search-submit-button {
  display: grid;
  width: 46px;
  place-items: center;
  padding: 0;
}

.search-submit-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

mark {
  border-radius: 3px;
  background: rgb(224 192 118 / 24%);
  color: var(--color-ink);
  padding: 0 2px;
}

.feed-section {
  padding-top: 0;
}

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

.post-card {
  min-height: 260px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(88 223 234 / 4%)),
    rgb(15 34 48 / 78%);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 8%) inset,
    0 18px 46px rgb(0 11 18 / 24%);
  backdrop-filter: blur(14px) saturate(1.18);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.post-card:hover {
  border-color: var(--color-border-strong);
  box-shadow:
    0 1px 0 rgb(166 255 247 / 16%) inset,
    var(--shadow-card);
  transform: translateY(-2px);
}

.post-card a {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 24px;
}

.post-card time {
  margin-bottom: 26px;
  color: var(--color-faint);
  font-size: 13px;
  font-weight: 700;
}

.post-card h3 {
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
}

.post-card p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.75;
}

.feed-status {
  display: grid;
  min-height: 44px;
  margin-top: 22px;
  place-items: center;
}

.feed-status::before {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  content: "";
}

.feed-status[data-state="loading"]::before {
  border: 2px solid rgb(88 223 234 / 20%);
  border-top-color: var(--color-accent);
  animation: quiet-spin 900ms linear infinite;
}

.feed-status[data-state="complete"]::before {
  width: 156px;
  height: 58px;
  border: 0;
  border-radius: 0;
  background: url("/assets/end-page.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgb(224 192 118 / 12%));
  opacity: 0.78;
}

.feed-status[data-state="empty"]::before {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgb(126 153 165 / 72%);
}

.feed-status[data-state="more"]::before {
  width: 7px;
  height: 7px;
  background: rgb(88 223 234 / 58%);
  box-shadow:
    -12px 0 0 rgb(88 223 234 / 26%),
    12px 0 0 rgb(88 223 234 / 26%);
}

@keyframes quiet-spin {
  to {
    transform: rotate(360deg);
  }
}

.feed-sentinel {
  height: 1px;
}

.feed-sentinel[hidden] {
  display: none;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  background: rgb(3 8 13 / 72%);
  padding: 22px;
  backdrop-filter: blur(8px);
}

.search-backdrop[hidden] {
  display: none;
}

.search-dialog {
  width: min(560px, 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgb(10 26 38 / 96%);
  padding: 18px;
  box-shadow: 0 24px 86px rgb(0 11 18 / 48%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgb(3 8 13 / 78%);
  padding: 26px;
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.post-modal {
  width: min(820px, 100%);
  max-height: min(820px, calc(100vh - 52px));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgb(10 26 38 / 97%);
  box-shadow: 0 24px 90px rgb(0 11 18 / 58%);
}

.modal-toolbar {
  display: grid;
  grid-template-columns: 44px 44px 44px;
  justify-content: end;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  background: rgb(8 21 32 / 78%);
  padding: 12px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgb(15 34 48 / 88%);
  color: var(--color-ink);
}

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

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

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

.modal-body {
  max-height: calc(min(820px, 100vh - 52px) - 70px);
  overflow: auto;
  padding: clamp(28px, 6vw, 58px);
  scrollbar-color: rgb(126 153 165 / 44%) rgb(8 21 32 / 54%);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-track {
  border-left: 1px solid rgb(77 143 162 / 14%);
  background:
    linear-gradient(180deg, rgb(88 223 234 / 4%), rgb(8 21 32 / 54%)),
    rgb(8 21 32 / 56%);
}

.modal-body::-webkit-scrollbar-thumb {
  border: 2px solid rgb(8 21 32 / 90%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(164 193 202 / 46%), rgb(88 128 140 / 36%)),
    rgb(126 153 165 / 42%);
  box-shadow: 0 0 8px rgb(88 223 234 / 8%);
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgb(185 218 225 / 56%), rgb(88 223 234 / 30%)),
    rgb(126 153 165 / 54%);
}

.modal-body::-webkit-scrollbar-corner {
  background: transparent;
}

.modal-body time {
  display: block;
  margin-bottom: 16px;
  color: var(--color-faint);
  font-size: 14px;
  font-weight: 700;
}

.modal-body h2 {
  margin-bottom: 26px;
  font-size: clamp(32px, 6vw, 52px);
}

.article-body {
  color: #d8eef0;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 2;
}

.article-body p {
  margin-bottom: 1.25em;
}

.article-body h2,
.article-body h3 {
  margin: 1.45em 0 0.65em;
  font-size: 1.25em;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25em;
  padding-left: 1.4em;
}

.article-body blockquote {
  margin: 1.35em 0;
  border-left: 2px solid rgb(166 255 247 / 44%);
  color: var(--color-muted);
  padding-left: 1em;
}

.article-body a {
  color: var(--color-accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-body img,
.article-body iframe {
  display: block;
  max-width: 100%;
  margin: 1.45em auto;
  border: 1px solid rgb(77 143 162 / 30%);
  border-radius: var(--radius-sm);
  background: rgb(8 21 32 / 64%);
}

.article-body img {
  height: auto;
}

.article-body iframe {
  width: min(100%, 680px);
  aspect-ratio: 16 / 9;
}

.site-footer {
  border-top: 1px solid rgb(77 143 162 / 34%);
  color: var(--color-muted);
  padding: 26px 0;
}

.footer-inner {
  font-size: 14px;
  font-weight: 700;
}

.footer-inner a:hover {
  color: var(--color-accent-strong);
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgb(12 36 53 / 72%) 0, rgb(6 17 25 / 0%) 420px),
    linear-gradient(135deg, rgb(140 167 255 / 16%) 0, rgb(140 167 255 / 0%) 42%),
    linear-gradient(245deg, rgb(224 192 118 / 12%) 0, rgb(224 192 118 / 0%) 38%),
    var(--color-page);
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  align-items: start;
  justify-items: center;
  padding: 24px 20px 56px;
}

.admin-login {
  width: min(460px, 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgb(10 26 38 / 94%);
  padding: clamp(28px, 6vw, 42px);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(1.18);
}

.admin-login[hidden],
.admin-workspace[hidden],
.admin-editor-backdrop[hidden],
.admin-preview-backdrop[hidden],
.admin-post-list[hidden] {
  display: none;
}

.admin-brand {
  margin-bottom: 34px;
}

.admin-brand .brand-logo {
  width: 166px;
}

.admin-login h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 6vw, 46px);
}

.admin-login p {
  color: var(--color-muted);
}

.admin-auth-panel {
  margin-top: 0;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.login-form label:not(:first-child) {
  margin-top: 8px;
}

.google-login-button,
.secondary-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
}

.google-login-button {
  border: 1px solid rgb(166 255 247 / 38%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 10%), rgb(88 223 234 / 5%)),
    rgb(15 34 48 / 92%);
  color: var(--color-ink);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 12%) inset,
    0 18px 34px rgb(0 11 18 / 28%);
}

.google-login-button:hover {
  border-color: rgb(166 255 247 / 72%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 14%), rgb(88 223 234 / 8%)),
    rgb(23 50 64 / 94%);
}

.google-login-button:disabled {
  cursor: not-allowed;
}

.admin-workspace {
  display: grid;
  width: min(1120px, 100%);
  gap: 18px;
}

.admin-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgb(77 143 162 / 52%);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(88 223 234 / 4%)),
    rgb(10 26 38 / 86%);
  padding: 18px 20px;
  box-shadow: 0 18px 46px rgb(0 11 18 / 24%);
  backdrop-filter: blur(14px) saturate(1.18);
}

.admin-workspace-header .admin-brand {
  margin-bottom: 0;
}

.admin-account {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-account span {
  overflow: hidden;
  max-width: 240px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workspace-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 2px 4px;
}

.admin-workspace-title-row h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 54px);
}

.admin-new-button {
  min-width: 112px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.admin-stat-grid article,
.admin-content-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 7%), rgb(88 223 234 / 3%)),
    rgb(15 34 48 / 76%);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 8%) inset,
    0 18px 46px rgb(0 11 18 / 22%);
  backdrop-filter: blur(14px) saturate(1.18);
}

.admin-stat-grid article {
  min-height: 112px;
  padding: 22px;
}

.admin-stat-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-stat-grid strong {
  color: var(--color-ink);
  font-size: 34px;
  line-height: 1;
}

.admin-content-panel {
  min-height: 300px;
  padding: 22px;
}

.admin-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: auto;
  background: rgb(3 8 13 / 78%);
  padding: min(7vh, 64px) 20px 20px;
  backdrop-filter: blur(10px);
}

.admin-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgb(3 8 13 / 78%);
  padding: 26px;
  backdrop-filter: blur(10px);
}

.admin-editor-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 84px);
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(88 223 234 / 4%)),
    rgb(10 26 38 / 96%);
  box-shadow: 0 24px 86px rgb(0 11 18 / 54%);
  padding: 22px;
  backdrop-filter: blur(14px) saturate(1.18);
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgb(77 143 162 / 34%);
  padding-bottom: 18px;
}

.admin-panel-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 26px;
}

.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(220px, 320px);
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.admin-filter-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgb(8 21 32 / 58%);
}

.admin-filter-tab {
  min-height: 42px;
  border: 0;
  border-right: 1px solid rgb(77 143 162 / 30%);
  background: transparent;
  color: var(--color-muted);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.admin-filter-tab:last-child {
  border-right: 0;
}

.admin-filter-tab:hover,
.admin-filter-tab.is-active {
  background: rgb(88 223 234 / 14%);
  color: var(--color-accent-strong);
}

.admin-list-search {
  display: grid;
  gap: 6px;
}

.admin-list-search span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-list-search input {
  min-height: 42px;
}

.admin-empty-state {
  display: grid;
  min-height: 198px;
  place-content: center;
  text-align: center;
}

.admin-empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 22px;
}

.admin-empty-state p {
  margin-bottom: 0;
  color: var(--color-muted);
}

.admin-post-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.admin-post-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border: 1px solid rgb(77 143 162 / 34%);
  border-radius: var(--radius-sm);
  background: rgb(8 21 32 / 48%);
  padding: 16px;
}

.admin-post-item-content {
  display: grid;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.admin-post-item-content:hover strong {
  color: var(--color-accent-strong);
}

.admin-post-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 19px;
}

.admin-post-meta {
  display: block;
  margin-bottom: 8px;
  color: var(--color-faint);
  font-size: 12px;
  font-weight: 800;
}

.admin-post-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-post-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.admin-post-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-status-badge {
  border: 1px solid rgb(166 255 247 / 34%);
  border-radius: 999px;
  color: var(--color-accent-strong);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-post-edit-button,
.admin-post-status-button,
.admin-post-trash-button,
.admin-post-restore-button {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
}

.admin-post-trash-button {
  border-color: rgb(255 183 189 / 42%);
  color: #ffb7bd;
}

.admin-post-restore-button {
  border-color: rgb(224 192 118 / 42%);
  color: var(--color-warm);
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-ops-card {
  min-height: 168px;
  border: 1px solid rgb(77 143 162 / 34%);
  border-radius: var(--radius-sm);
  background: rgb(8 21 32 / 48%);
  padding: 16px;
}

.admin-ops-card > span {
  display: block;
  margin-bottom: 10px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-ops-card > strong {
  display: block;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 22px;
}

.admin-ops-card > strong[data-tone="success"] {
  color: var(--color-accent-strong);
}

.admin-ops-card > strong[data-tone="warning"] {
  color: var(--color-warm);
}

.admin-ops-card > strong[data-tone="error"] {
  color: #ff9f9f;
}

.admin-ops-card p {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.admin-ops-button {
  width: 100%;
  margin-top: 14px;
}

.admin-mini-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.admin-mini-list li {
  display: grid;
  gap: 2px;
  border-top: 1px solid rgb(77 143 162 / 24%);
  color: var(--color-muted);
  padding-top: 8px;
  font-size: 13px;
}

.admin-mini-list strong {
  overflow: hidden;
  color: var(--color-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-field,
.admin-status-select,
.admin-schedule-field {
  display: grid;
  gap: 8px;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-slug-preview {
  overflow-wrap: anywhere;
  margin: -4px 0 2px;
  color: var(--color-faint);
  font-size: 13px;
  font-weight: 700;
}

.admin-slug-preview[hidden] {
  display: none;
}

.admin-field span,
.admin-status-select span,
.admin-schedule-field span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-field input,
.admin-field textarea,
.admin-status-select select,
.admin-schedule-field input {
  width: 100%;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: rgb(8 21 32 / 72%);
  color: var(--color-ink);
  padding: 12px 13px;
}

.admin-field input,
.admin-status-select select,
.admin-schedule-field input {
  min-height: 46px;
}

.admin-field textarea {
  min-height: 112px;
  line-height: 1.7;
}

.admin-body-field {
  min-height: 300px;
}

.admin-editor-fallback[hidden] {
  display: none;
}

.admin-quill-shell {
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: rgb(8 21 32 / 72%);
}

.admin-quill-shell .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid rgb(77 143 162 / 32%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 7%), rgb(88 223 234 / 3%)),
    rgb(10 26 38 / 74%);
  padding: 10px 12px;
}

.admin-quill-shell .ql-container.ql-snow {
  min-height: 300px;
  border: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 17px;
}

.admin-quill-shell .ql-editor {
  min-height: 300px;
  color: #d8eef0;
  line-height: 1.9;
  padding: 18px;
}

.admin-quill-shell .ql-editor.ql-blank::before {
  color: var(--color-faint);
  font-style: normal;
  left: 18px;
  right: 18px;
}

.admin-quill-shell .ql-stroke {
  stroke: var(--color-muted);
}

.admin-quill-shell .ql-fill {
  fill: var(--color-muted);
}

.admin-quill-shell .ql-picker {
  color: var(--color-muted);
}

.admin-quill-shell .ql-picker-options,
.admin-quill-shell .ql-tooltip {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgb(10 26 38 / 98%);
  color: var(--color-ink);
  box-shadow: 0 18px 42px rgb(0 11 18 / 38%);
}

.admin-quill-shell .ql-tooltip {
  display: none;
}

.admin-quill-shell .ql-tooltip:not(.ql-hidden) {
  display: block;
}

.admin-quill-shell .ql-tooltip.ql-hidden {
  display: none;
}

.admin-quill-shell .ql-tooltip input[type="text"] {
  border: 1px solid var(--color-border-strong);
  background: rgb(8 21 32 / 92%);
  color: var(--color-ink);
}

.admin-quill-shell .ql-snow.ql-toolbar button:hover .ql-stroke,
.admin-quill-shell .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.admin-quill-shell .ql-snow .ql-picker-label:hover .ql-stroke,
.admin-quill-shell .ql-snow .ql-picker-label.ql-active .ql-stroke {
  stroke: var(--color-accent-strong);
}

.admin-quill-shell .ql-snow.ql-toolbar button:hover,
.admin-quill-shell .ql-snow.ql-toolbar button.ql-active,
.admin-quill-shell .ql-snow .ql-picker-label:hover,
.admin-quill-shell .ql-snow .ql-picker-label.ql-active,
.admin-quill-shell .ql-snow .ql-picker-item:hover {
  color: var(--color-accent-strong);
}

.admin-quill-shell .ql-editor img,
.admin-quill-shell .ql-editor iframe {
  display: block;
  max-width: 100%;
  margin: 1em auto;
  border-radius: var(--radius-sm);
}

.admin-quill-shell .ql-editor iframe {
  aspect-ratio: 16 / 9;
}

.admin-editor-actions {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(210px, 240px) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.admin-status-select {
  min-width: 180px;
}

.admin-editor-status {
  grid-column: 3;
  align-self: center;
  min-height: 20px;
  margin: 0;
}

.admin-action-cluster {
  grid-column: 4;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-preview-button {
  width: auto;
  min-height: 46px;
  padding: 0 16px;
}

.admin-save-button {
  min-width: 116px;
}

.secondary-button {
  border: 1px solid var(--color-border);
  background: rgb(8 21 32 / 72%);
  color: var(--color-accent-strong);
}

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

.admin-logout-button,
.admin-panel-button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
}

.form-note {
  min-height: 24px;
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.form-note[hidden] {
  display: none;
}

.admin-login > .form-note {
  margin-top: 16px;
}

.admin-workspace-note {
  margin-top: 16px;
}

.admin-preview-modal .modal-toolbar {
  grid-template-columns: 44px;
}

.form-note[data-tone="success"] {
  color: var(--color-accent-strong);
}

.form-note[data-tone="warning"] {
  color: var(--color-warm);
}

.form-note[data-tone="error"] {
  color: #ffb7bd;
}

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

  .admin-stat-grid,
  .admin-ops-grid,
  .admin-list-tools {
    grid-template-columns: 1fr;
  }

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

  .post-card,
  .post-card a {
    min-height: 210px;
  }
}

@media (max-width: 640px) {
  :root {
    --shell: min(100vw - 28px, 1120px);
    --header-height: 68px;
  }

  .header-inner {
    gap: 16px;
    padding: 14px 0;
  }

  .site-header {
    position: sticky;
  }

  .site-main {
    padding: 26px 0 64px;
  }

  h1 {
    font-size: 42px;
  }

  .search-backdrop {
    padding: 14px;
  }

  .post-card a {
    padding: 22px;
  }

  .post-card time {
    margin-bottom: 16px;
  }

  .admin-shell {
    align-items: start;
    padding: 18px 14px;
  }

  .admin-editor-backdrop {
    padding: 14px;
  }

  .admin-preview-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .admin-editor-dialog {
    max-height: calc(100vh - 28px);
  }

  .admin-workspace-header,
  .admin-workspace-title-row,
  .admin-account,
  .admin-panel-header,
  .admin-editor-actions,
  .admin-post-item {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-editor-actions {
    grid-template-columns: 1fr;
  }

  .admin-editor-status,
  .admin-action-cluster {
    grid-column: auto;
  }

  .admin-action-cluster {
    justify-self: stretch;
    flex-direction: column;
  }

  .admin-account span {
    max-width: none;
  }

  .admin-new-button,
  .admin-logout-button,
  .admin-panel-button,
  .admin-save-button,
  .admin-preview-button,
  .admin-post-edit-button {
    width: 100%;
  }

  .admin-post-actions {
    justify-items: stretch;
  }

  .admin-post-action-row {
    justify-content: stretch;
  }

  .admin-post-action-row > button {
    flex: 1 1 120px;
  }

  .admin-status-select {
    min-width: 0;
  }

  .admin-stat-grid article {
    min-height: 96px;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .post-modal {
    max-height: none;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .modal-toolbar {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgb(8 21 32 / 94%);
  }

  .modal-body {
    max-height: calc(100vh - 69px);
    padding: 28px 20px 54px;
  }
}

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