* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --content-max-width: 1080px;
  --nav-bg: #0f172a;
  --nav-hover: #1e293b;
  --text: #1f2937;
  --muted: #475569;
  --line: #e2e8f0;
  --btn-bg: #0f172a;
  --btn-text: #ffffff;
  --btn-hover: #1e293b;
  --em-red: #dc2626;
  --em-orange: #ea580c;
  --em-blue: #2563eb;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: var(--nav-bg);
  color: #e2e8f0;
  padding: 22px 16px;
}

.brand {
  margin: 0 0 8px;
  font-size: 20px;
}

.brand-logo {
  display: block;
  width: 140px;
  height: auto;
}

.brand-sub {
  margin: 8px 3px 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
}

.sidebar-home {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.sidebar-home:hover .brand,
.sidebar-home:hover .brand-sub {
  color: #ffffff;
}

.nav-title {
  margin: 0 8px 6px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  margin: 4px 0;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #cbd5e1;
  line-height: 1.3;
}

.nav-link:hover {
  background: var(--nav-hover);
  color: #ffffff;
}

.nav-link.active {
  background: #334155;
  color: #ffffff;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.location {
  font-size: 13px;
  color: var(--muted);
}

.location a {
  color: var(--muted);
  text-decoration: none;
}

.location a:hover {
  text-decoration: underline;
}

.content {
  flex: 1;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 28px 26px 12px;
}

.content h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.home-logo {
  width: 200px;
  height: auto;
  display: block;
  margin: 2px 0 14px;
}

.home-emblem {
  width: 200px;
  height: auto;
  display: block;
  margin: 2px 0 8px;
}

.content h2 {
  margin: 26px 0 12px;
  font-size: 21px;
}

.content p,
.content li {
  color: #334155;
  line-height: 1.7;
}

.content ul {
  margin-top: 8px;
}

.content code {
  background: #e2e8f0;
  border-radius: 6px;
  padding: 1px 5px;
  font-family: Consolas, "Courier New", monospace;
}

.content pre {
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
  line-height: 1.5;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: var(--panel);
}

.content th,
.content td {
  border: 1px solid var(--line);
  text-align: left;
  padding: 10px;
  vertical-align: top;
}

.content th {
  background: #f1f5f9;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
}

.screenshot-block {
  margin: 14px 0 18px;
}

.screenshot-title {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.screenshot-slot {
  display: block;
  width: 100%;
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.screenshot-slot.size-16x9 {
  aspect-ratio: 16 / 9;
}

.screenshot-slot.size-4x3 {
  aspect-ratio: 4 / 3;
  max-width: 720px;
}

.screenshot-size {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 26px 16px;
}

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

.action-link:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
}

.btn:hover {
  background: var(--btn-hover);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 12px 24px;
  color: var(--muted);
  font-size: 13px;
  background: var(--panel);
}

.em-red { color: var(--em-red); }
.em-orange { color: var(--em-orange); }
.em-blue { color: var(--em-blue); }

.download-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.download-item + .download-item {
  margin-top: 10px;
}

.download-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1e293b;
}

.download-link:hover .download-file {
  text-decoration: underline;
}

.download-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
}

.download-file {
  display: block;
  font-size: 14px;
  color: #1e293b;
}

.download-size {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

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

  .sidebar {
    padding: 16px;
  }

  .topbar {
    justify-content: flex-start;
  }

  .content {
    padding: 22px 16px 8px;
  }

  .actions {
    padding: 8px 16px 14px;
  }
}
