:root {
  --guide-bg: #faf9f7;
  --guide-surface: #ffffff;
  --guide-surface-alt: #f5f3f0;
  --guide-surface-muted: #faf9f7;
  --guide-border: #e8e2d8;
  --guide-border-strong: #c4a77d;
  --guide-text: #2a1f1a;
  --guide-muted: #8b7760;
  --guide-muted-alt: #5a5047;
  --guide-accent: #2a1f1a;
  --guide-accent-soft: #f5f3f0;
  --guide-success: #16a34a;
  --guide-shadow: rgba(42, 31, 26, 0.06);
  --guide-shadow-strong: rgba(42, 31, 26, 0.12);
  --guide-radius-lg: 0;
  --guide-radius-md: 0;
  --guide-radius-sm: 0;
}

body.guide-docs-body {
  background: linear-gradient(135deg, #faf9f7 0%, #f5f3f0 50%, #ebe8e4 100%);
  color: var(--guide-text);
  font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  margin: 0;
}

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

a:hover {
  color: inherit;
}

.guide-docs-header {
  background: var(--guide-surface);
  border-bottom: 2px solid var(--guide-text);
  box-shadow: 0 4px 20px var(--guide-shadow);
  position: sticky;
  top: 0;
  z-index: 40;
}

.guide-docs-header .header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.guide-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--guide-text);
}

.guide-brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 0;
  background: var(--guide-text);
  color: #c4a77d;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(42, 31, 26, 0.15);
}

.guide-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-docs-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 80px;
  display: flex;
  gap: 32px;
}

.guide-docs-nav {
  width: 260px;
  background: var(--guide-surface);
  border: none;
  border-bottom: 2px solid var(--guide-text);
  border-radius: 0;
  box-shadow: 0 4px 20px var(--guide-shadow);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: none;
}

.guide-docs-nav::-webkit-scrollbar {
  display: none;
}

.guide-nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-nav-title {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--guide-text);
  font-weight: 700;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--guide-text);
}

.guide-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.guide-nav-entry {
  border: none;
  border-radius: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-nav-entry.is-expanded {
  box-shadow: none;
}

.guide-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  background: transparent;
  border-radius: 0;
  border: none;
  color: var(--guide-muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

.guide-nav-item:hover,
.guide-nav-entry.is-expanded .guide-nav-item {
  color: #2563eb;
}

.guide-nav-item.active {
  background: transparent;
  color: #2563eb;
  box-shadow: none;
}

.guide-nav-item .guide-nav-label i {
  display: none;
}

.guide-nav-children {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 8px 0 8px 16px;
  background: transparent;
  border-radius: 0;
}

.guide-nav-children.is-expanded {
  display: flex;
}

.guide-nav-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  background: transparent;
  border-radius: 0;
  border: none;
  color: var(--guide-muted);
  font-size: 14px;
  transition: all 0.2s ease;
}

.guide-nav-child i {
  display: none;
}

.guide-nav-child:hover {
  color: #2563eb;
}

.guide-nav-child.active {
  color: #2563eb;
  box-shadow: none;
}

.guide-nav-link {
  flex: 1;
  color: inherit;
}

.guide-nav-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--guide-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guide-nav-toggle-btn:hover {
  color: var(--guide-text);
  border-bottom-color: var(--guide-text);
  background: #fff;
}

.guide-nav-toggle-icon {
  transition: transform 0.2s ease;
}

.guide-nav-toggle-icon.rotated {
  transform: rotate(180deg);
}

.guide-nav-note {
  margin-top: auto;
  background: var(--guide-surface-alt);
  border-radius: 0;
  border-bottom: 2px solid var(--guide-border);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--guide-muted);
  line-height: 1.6;
}

.guide-docs-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.guide-hero {
  background: var(--guide-surface);
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--guide-text);
  box-shadow: 0 4px 20px var(--guide-shadow);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.guide-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--guide-text);
  color: #c4a77d;
  padding: 8px 18px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.guide-hero-title {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--guide-text);
}

.guide-hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guide-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 0;
  background: var(--guide-surface-alt);
  border-bottom: 2px solid var(--guide-text);
  color: var(--guide-text);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.guide-hero-description {
  font-size: 17px;
  color: var(--guide-muted);
  max-width: 720px;
}

.guide-info {
  background: var(--guide-surface-alt);
  border-radius: 0;
  padding: 20px 24px;
  border: none;
  border-left: 3px solid var(--guide-text);
  color: var(--guide-text);
  box-shadow: none;
}

.guide-info p + p {
  margin-top: 10px;
}

.guide-search-panel {
  background: var(--guide-surface);
  border: none;
  border-bottom: 2px solid var(--guide-text);
  border-radius: 0;
  padding: 28px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px var(--guide-shadow);
}

.guide-search-wrapper {
  flex: 1 1 320px;
  position: relative;
}

.guide-search-input {
  width: 100%;
  height: 54px;
  padding: 0 48px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--guide-border);
  background: var(--guide-surface-alt);
  font-size: 15px;
  color: var(--guide-text);
  box-shadow: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.guide-search-input:focus {
  outline: none;
  border-bottom-color: var(--guide-text);
  background: #fff;
  box-shadow: none;
}

.guide-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--guide-muted);
  font-size: 16px;
}

.guide-search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: none;
  background: var(--guide-surface);
  color: var(--guide-muted);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--guide-shadow);
}

.guide-search-clear:hover {
  background: var(--guide-text);
  color: #c4a77d;
}

.guide-results-count {
  font-size: 14px;
  color: var(--guide-muted);
  font-weight: 500;
}

.guide-section-board {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-card {
  background: var(--guide-surface);
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--guide-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 15px var(--guide-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-bottom-color: var(--guide-text);
  box-shadow: 0 8px 25px var(--guide-shadow-strong);
}

.guide-card.highlight {
  border-bottom-color: var(--guide-text);
  box-shadow: 0 8px 25px var(--guide-shadow-strong);
}

.guide-card.dimmed {
  opacity: 0.35;
  pointer-events: none;
}

.guide-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--guide-text);
}

.guide-card-subtitle {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--guide-muted);
}

.guide-card-body {
  color: var(--guide-muted-alt);
  line-height: 1.7;
}

.guide-card-body p {
  margin-bottom: 12px;
}

.guide-card-body ul,
.guide-card-body ol {
  margin: 12px 0 12px 20px;
}

.guide-card-body li {
  margin-bottom: 6px;
}

.lawbook-guides {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.lawbook-section {
  background: var(--guide-surface);
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--guide-text);
  box-shadow: 0 4px 20px var(--guide-shadow);
  overflow: hidden;
}

.lawbook-section-head {
  padding: 28px 28px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.lawbook-section-title {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  margin: 0;
  color: var(--guide-text);
}

.lawbook-section-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--guide-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lawbook-section-body {
  padding: 28px;
}

.lawbook-section-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lawbook-section-description {
  margin: 0;
  font-size: 15px;
  color: var(--guide-muted-alt);
}

.lawbook-rule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.lawbook-card {
  background: var(--guide-surface-alt);
  border: none;
  border-bottom: 2px solid var(--guide-border);
  border-radius: 0;
  padding: 20px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lawbook-card:hover {
  border-bottom-color: var(--guide-text);
  box-shadow: 0 4px 15px var(--guide-shadow);
}

.lawbook-card-head {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.lawbook-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--guide-text);
}

.lawbook-card-penalty {
  background: var(--guide-text);
  color: #c4a77d;
  border-radius: 0;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}

.lawbook-card-body {
  color: var(--guide-muted-alt);
  line-height: 1.7;
}

.lawbook-card-body p {
  margin: 0 0 10px;
}

.lawbook-card-body ul,
.lawbook-card-body ol {
  margin: 10px 0 10px 18px;
}

.lawbook-card-body li {
  margin-bottom: 6px;
}

.virtual-keyboard {
  margin: 16px auto 22px;
  padding: 16px 18px;
  border-radius: var(--guide-radius-md);
  border: 1px solid var(--guide-border);
  background: var(--guide-surface-alt);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
  max-width: 640px;
}

.vk-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--guide-muted);
  margin-bottom: 16px;
}

.vk-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.vk-spacer {
  flex: 1;
}

.vk-key {
  position: relative;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--guide-border);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--guide-muted);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.vk-key--small {
  min-width: 30px;
  height: 26px;
}

.vk-key--wide {
  min-width: 72px;
}

.vk-key--xwide {
  min-width: 110px;
}

.vk-key--space {
  min-width: 160px;
  flex: 1;
}

.vk-key--main {
  background: var(--guide-accent);
  color: #ffffff;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.26);
}

.vk-key:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

.vk-key--main:hover {
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.32);
}

.vk-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--guide-muted);
}

.vk-key[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 0;
  transform: translateX(12px) translateY(-100%);
  padding: 11px 16px;
  max-width: 420px;
  background: #111827;
  color: #f9fafb;
  font-size: 14px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.45);
  white-space: nowrap;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 999;
}

.vk-key[data-tooltip]::before {
  content: '';
  position: absolute;
  left: 100%;
  top: 0;
  transform: translateX(6px) translateY(-4px);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent #111827 transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
}

.vk-key[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(12px) translateY(-100%);
}

.vk-key[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(6px) translateY(-4px);
}

@media (min-width: 960px) {
  .lawbook-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.guide-card-body img {
  width: 100%;
  height: auto;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--guide-text);
  box-shadow: 0 4px 15px var(--guide-shadow);
  margin: 16px 0;
  display: block;
}

.guide-empty {
  padding: 40px;
  text-align: center;
  color: var(--guide-muted);
  background: var(--guide-surface-alt);
  border-radius: 0;
  border: none;
  border-bottom: 2px dashed var(--guide-border);
}

/* 페이지 네비게이션 */
.page-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--guide-border);
}

.page-nav-item {
  flex: 1;
  max-width: 50%;
}

.page-nav-link {
  display: block;
  padding: 20px 24px;
  background: var(--guide-surface);
  border: 1px solid var(--guide-border);
  border-radius: 0;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-nav-link:hover {
  border-color: var(--guide-text);
  box-shadow: 0 4px 15px var(--guide-shadow);
}

.page-nav-link.prev {
  text-align: left;
}

.page-nav-link.next {
  text-align: right;
}

.page-nav-label {
  display: block;
  font-size: 12px;
  color: var(--guide-muted);
  margin-bottom: 6px;
}

.page-nav-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}

.page-nav-link:hover .page-nav-title {
  color: var(--guide-text);
}

@media (max-width: 600px) {
  .page-navigation {
    flex-direction: column;
  }
  
  .page-nav-item {
    max-width: 100%;
  }
}

.guide-footer {
  margin-top: 40px;
  background: var(--guide-surface);
  border: none;
  border-top: 2px solid var(--guide-text);
  border-radius: 0;
  padding: 28px;
  box-shadow: 0 4px 20px var(--guide-shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.guide-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.guide-footer-meta {
  font-size: 13px;
  color: var(--guide-muted);
}

.guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.guide-btn-primary {
  background: var(--guide-text);
  color: #c4a77d;
  box-shadow: 0 4px 15px var(--guide-shadow);
}

.guide-btn-primary:hover {
  background: var(--guide-muted-alt);
}

.guide-btn-secondary {
  background: #fff;
  border-bottom-color: var(--guide-border);
  color: var(--guide-muted);
}

.guide-btn-secondary:hover {
  color: var(--guide-text);
  border-bottom-color: var(--guide-text);
}

.guide-site-footer {
  margin-top: 48px;
  background: var(--guide-surface);
  border: none;
  border-top: 2px solid var(--guide-text);
  border-radius: 0;
  padding: 32px;
  box-shadow: 0 4px 20px var(--guide-shadow);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.guide-site-footer-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.guide-site-footer-discord iframe {
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--guide-text);
  box-shadow: 0 4px 15px var(--guide-shadow);
}

.guide-discord-placeholder {
  background: var(--guide-surface-alt);
  border: none;
  border-bottom: 2px solid var(--guide-border);
  border-radius: 0;
  padding: 24px;
  text-align: center;
  color: var(--guide-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.guide-discord-placeholder i {
  font-size: 32px;
  color: var(--guide-text);
}

.guide-site-footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

.guide-site-footer-column h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--guide-text);
}

.guide-site-footer-column p {
  color: var(--guide-muted);
  line-height: 1.6;
}

.guide-site-footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-site-footer-column a {
  color: var(--guide-muted);
  text-decoration: none;
  font-weight: 500;
}

.guide-site-footer-column a:hover {
  color: var(--guide-text);
}

.guide-site-footer-meta {
  text-align: center;
  font-size: 13px;
  color: var(--guide-muted);
}

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

@media (max-width: 640px) {
  .guide-site-footer {
    padding: 24px;
  }
}

@media (max-width: 1100px) {
  .guide-docs-shell {
    flex-direction: column;
  }

  .guide-docs-nav {
    position: static;
    width: 100%;
    max-height: none;
  }

  .guide-nav-entry {
    border: none;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .guide-docs-header .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .guide-docs-shell {
    padding: 28px 20px 64px;
  }

  .guide-hero {
    padding: 32px 24px;
  }

  .guide-search-panel {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .guide-card {
    padding: 20px;
  }

  .guide-hero-title {
    font-size: 32px;
  }
}
