:root {
  color-scheme: dark;
  --background: #000;
  --text: #f4f4f4;
  --muted: #b8b8b8;
  --accent: #e97adb;
  --accent-soft: #f2a4e9;
  --selection: rgba(233, 122, 219, 0.32);
  --content-width: 880px;
  --shell-width: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.68;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection); color: #fff; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 8px 12px; background: var(--text); color: #000; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header {
  width: min(calc(100% - 52px), var(--shell-width));
  min-height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.logo:hover, .logo:focus-visible { color: var(--text); text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border: 2px solid var(--text); display: grid; place-items: center; color: var(--accent); font-size: 16px; box-shadow: 4px 4px 0 var(--accent); }
.main-nav { display: flex; align-items: center; gap: 24px; font-size: 17px; }
.main-nav a { padding: 10px 0; }
.main-nav a[aria-current] { color: var(--text); }

.content { width: min(calc(100% - 52px), var(--content-width)); margin: 0 auto; padding: 6px 0 120px; }
section { scroll-margin-top: 44px; margin-top: 88px; }
.hero { margin-top: 0; padding-top: 28px; }
.kicker { margin: 0 0 10px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(233, 122, 219, .12); animation: pulse 1.8s ease-in-out infinite; }
h1, h2 { color: #fff; line-height: 1.25; letter-spacing: -.035em; }
h1 { margin: 0 0 34px; font-size: clamp(36px, 5vw, 52px); }
h1 span { color: var(--text); }
h1 i { color: var(--accent); font-style: normal; font-weight: 400; animation: blink 1.1s steps(1) infinite; }
h2 { margin: 0 0 24px; font-size: clamp(27px, 3vw, 34px); }
p { margin: 0 0 24px; }
strong { color: #fff; font-weight: 600; }
.facts { margin: 36px 0 0; padding-left: 20px; border-left: 2px solid #292929; }
.facts p { margin: 6px 0; color: var(--muted); }
.facts span, .item-list span { color: var(--accent); }
.hero-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; font-size: 16px; }
.item-list { margin: 34px 0 38px; padding-left: 24px; }
.item-list li { margin: 8px 0; padding-left: 3px; }
.item-list li::marker { color: var(--text); }
.item-list.compact { margin-top: 25px; }
.game-list { margin-bottom: 22px; }
.small-note { color: #777; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.stream-facts { margin-bottom: 36px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.social-links span { color: #565656; }

.post-list { margin-top: 38px; border-top: 1px solid #282828; }
.post-entry { border-bottom: 1px solid #282828; }
.post-link { position: relative; display: block; padding: 28px 50px 28px 0; color: inherit; }
.post-link:hover, .post-link:focus-visible { color: inherit; text-decoration: none; }
.post-link:hover .post-title, .post-link:focus-visible .post-title { color: var(--accent-soft); }
.post-link:hover .post-arrow, .post-link:focus-visible .post-arrow { transform: translate(5px, -50%); }
.post-meta { display: block; margin-bottom: 8px; color: #777; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.post-title { display: block; color: var(--accent); font-size: 22px; font-weight: 600; line-height: 1.45; transition: color .18s ease; }
.post-excerpt { display: block; margin-top: 9px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.post-arrow { position: absolute; top: 50%; right: 4px; color: var(--accent); font-size: 21px; transform: translateY(-50%); transition: transform .18s ease; }
.all-posts-link { display: inline-block; margin-top: 25px; font-size: 15px; }
.empty-posts { padding: 34px 0; color: #777; }

.archive-page { padding-top: 26px; }
.archive-hero { margin-top: 0; }
.archive-section { margin-top: 62px; }
.archive-tools { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.search-box { flex: 1; max-width: 320px; }
.search-box input { width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid #444; border-radius: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.search-box input:focus { border-color: var(--accent); }
.search-box input::placeholder { color: #707070; }
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.category-filters button { padding: 7px 12px; border: 1px solid #444; border-radius: 99px; background: transparent; color: #aaa; font: inherit; font-size: 12px; cursor: pointer; }
.category-filters button:hover, .category-filters button:focus-visible, .category-filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.category-filters a { padding: 7px 12px; border: 1px solid #444; border-radius: 99px; color: #aaa; font-size: 12px; }
.category-filters a:hover, .category-filters a:focus-visible, .category-filters a[aria-current="page"] { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.post-count { margin: 28px 0 -20px; color: #777; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.archive-list { margin-top: 38px; }

.post-page { min-height: calc(100vh - 220px); padding-top: 62px; }
.post-page article { margin: 0; }
.back-link { display: inline-block; margin-bottom: 48px; font-size: 14px; }
.back-link.bottom { margin: 54px 0 0; }
.post-detail-meta { margin-bottom: 18px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.post-page h1 { max-width: 800px; margin-bottom: 22px; font-size: clamp(34px, 5vw, 50px); line-height: 1.3; }
.post-lead { padding-bottom: 38px; border-bottom: 1px solid #282828; color: var(--muted); font-size: 18px; }
.post-detail-body { padding-top: 34px; color: #dedede; line-height: 1.9; }
.post-detail-body p { margin-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.admin-page { min-height: calc(100vh - 210px); padding-top: 44px; }
.admin-gate { margin-top: 0; max-width: 720px; }
.admin-gate h1, .admin-heading h1 { margin-bottom: 24px; font-size: clamp(36px, 5vw, 50px); }
.primary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--accent); background: var(--accent); color: #000; font-weight: 700; cursor: pointer; }
.primary-action:hover, .primary-action:focus-visible { background: var(--accent-soft); color: #000; text-decoration: none; }
.primary-action.inline { margin-top: 16px; }
.primary-action:disabled { cursor: wait; opacity: .55; }
.wide-content { width: min(calc(100% - 52px), 1180px); }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding-bottom: 36px; border-bottom: 1px solid #282828; }
.admin-heading .kicker { margin-bottom: 8px; }
.admin-heading h1 { margin: 0; }
.admin-heading-links { display: flex; gap: 18px; padding-bottom: 8px; font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 72px; padding: 56px 0 120px; }
.admin-grid section { margin: 0; }
.admin-grid h2 { margin-bottom: 28px; font-size: 28px; }
.post-form { display: grid; gap: 20px; }
.post-form label { display: grid; gap: 8px; }
.post-form label > span { color: #cfcfcf; font-size: 14px; }
.post-form label small { color: #666; font-weight: 400; }
.post-form input:not([type="checkbox"]), .post-form textarea, .post-form select { width: 100%; padding: 13px 14px; border: 1px solid #3a3a3a; border-radius: 0; outline: none; background: #0a0a0a; color: var(--text); }
.post-form input:focus, .post-form textarea:focus, .post-form select:focus { border-color: var(--accent); }
.post-form textarea { resize: vertical; line-height: 1.7; }
.publish-toggle { display: flex !important; align-items: center; gap: 10px !important; }
.publish-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; }
.form-actions button:not(.primary-action), .admin-row-actions button { padding: 9px 14px; border: 1px solid #444; background: transparent; color: #bbb; cursor: pointer; }
.form-actions button:hover, .admin-row-actions button:hover { border-color: var(--accent); color: var(--accent); }
.form-status { min-height: 26px; margin: 0; color: var(--accent); font-size: 14px; }
.admin-post-list { border-top: 1px solid #282828; }
.admin-post-list article { padding: 22px 0; border-bottom: 1px solid #282828; }
.admin-post-list h3 { margin: 4px 0 16px; font-size: 17px; line-height: 1.55; }
.admin-row-actions { display: flex; gap: 8px; }
.admin-row-actions .danger-action:hover { border-color: #ff7a8b; color: #ff7a8b; }

footer {
  width: min(calc(100% - 52px), var(--shell-width));
  margin: 0 auto;
  padding: 0 0 38px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  color: #7e7e7e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
footer p { margin: 0; text-align: center; }
footer > a { justify-self: end; }
.footer-links { display: flex; justify-self: end; gap: 16px; }
.footer-links a:first-child { color: #666; }
.pixel-cup { position: relative; width: 48px; height: 34px; border: 4px solid var(--text); display: grid; place-items: center; color: #ef7979; font-size: 18px; line-height: 1; box-shadow: 4px 4px 0 #595959; }
.pixel-cup::after { content: ""; position: absolute; top: 4px; right: -14px; width: 10px; height: 15px; border: 4px solid var(--text); border-left: 0; }
@keyframes blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@media (max-width: 700px) {
  body { font-size: 16px; line-height: 1.72; }
  .site-header { width: min(calc(100% - 32px), var(--shell-width)); min-height: 86px; }
  .logo-name { display: none; }
  .main-nav { gap: 12px; font-size: 13px; }
  .content { width: min(calc(100% - 40px), var(--content-width)); padding: 18px 0 92px; }
  section { margin-top: 72px; scroll-margin-top: 28px; }
  .hero { padding-top: 10px; }
  h1 { margin-bottom: 30px; font-size: clamp(34px, 10vw, 44px); }
  h2 { font-size: 27px; }
  .desktop-break { display: none; }
  .facts { padding-left: 14px; }
  .post-link { padding: 24px 34px 24px 0; }
  .post-title { font-size: 19px; }
  .archive-tools { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .post-page { padding-top: 42px; }
  .wide-content { width: min(calc(100% - 40px), 1180px); }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; gap: 64px; padding-top: 42px; }
  footer { width: min(calc(100% - 40px), var(--shell-width)); grid-template-columns: 1fr auto; }
  footer p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1 i { animation: none; }
  .live-dot { animation: none; }
}

.admin-post-list h3 { color: #f4f4f4; }
.admin-row-actions button { border-radius: 0; }
#initial-posts, #initial-home { display: none; }

.post-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.post-copy { display: block; min-width: 0; }
.post-thumbnail {
  width: 150px;
  height: 94px;
  margin-right: 18px;
  border: 1px solid #303030;
  object-fit: cover;
}
.post-cover { margin: 36px 0 6px; }
.post-cover img {
  display: block;
  width: 100%;
  max-height: 620px;
  border: 1px solid #303030;
  object-fit: contain;
  background: #080808;
}
.post-cover figcaption { margin-top: 9px; color: #777; font-size: 12px; }

.admin-home-editor {
  margin: 50px 0 0;
  padding: 0 0 56px;
  border-bottom: 1px solid #282828;
}
.admin-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.admin-section-heading h2 { margin: 0; }
.admin-section-heading > p { margin: 0; color: #777; font-size: 13px; }
.home-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-form .full-field { grid-column: 1 / -1; }
.image-upload-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 12px;
  border: 1px dashed #3a3a3a;
}
.image-upload-preview img {
  width: 126px;
  height: 82px;
  border: 1px solid #303030;
  object-fit: cover;
}
.image-upload-preview p { margin: 0 0 8px; color: #888; font-size: 12px; }
.image-upload-preview button {
  padding: 6px 10px;
  border: 1px solid #555;
  background: transparent;
  color: #bbb;
  cursor: pointer;
}
.image-upload-preview button:hover { border-color: #ff7a8b; color: #ff7a8b; }

@media (max-width: 520px) {
  .main-nav { max-width: 265px; justify-content: flex-end; flex-wrap: wrap; row-gap: 0; }
  .site-header { align-items: flex-start; padding-top: 20px; }
  .post-link { gap: 12px; }
  .post-thumbnail { width: 84px; height: 68px; margin-right: 10px; }
  .home-form { grid-template-columns: 1fr; }
  .home-form .full-field { grid-column: auto; }
  .admin-section-heading { align-items: flex-start; flex-direction: column; }
  .image-upload-preview { align-items: flex-start; flex-direction: column; }
}
