@charset "UTF-8";

/* ===== DUNIA Wiki - 2010年代ゲームWiki風スタイル ===== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background-color: #e8e8e8;
  color: #333;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: #0645ad;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:visited {
  color: #0b0080;
}

/* --- Wiki Layout --- */
.wiki-wrapper {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 8px;
}

.wiki-sidebar {
  width: 200px;
  flex-shrink: 0;
}

.wiki-main {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #a7d7f9;
  padding: 20px 24px;
}

/* --- Header --- */
.wiki-header {
  background: linear-gradient(to bottom, #4a6fa5, #2d4a7a);
  color: #fff;
  padding: 10px 16px;
  margin-bottom: 0;
  border-bottom: 3px solid #ffd700;
}

.wiki-header h1 {
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 2px;
}

.wiki-header h1 a {
  color: #fff;
  text-decoration: none;
}

.wiki-header-sub {
  font-size: 12px;
  color: #c0d0e0;
  margin-top: 2px;
}

/* --- Navigation bar --- */
.wiki-nav-bar {
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-top: none;
  padding: 4px 12px;
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.wiki-nav-bar a {
  color: #555;
  font-size: 13px;
}

.wiki-nav-bar span {
  color: #999;
}

/* --- Sidebar --- */
.sidebar-box {
  background: #f9f9f9;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  font-size: 13px;
}

.sidebar-box-title {
  background: linear-gradient(to bottom, #6b8fc2, #4a6fa5);
  color: #fff;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: bold;
}

.sidebar-box-content {
  padding: 8px 10px;
}

.sidebar-box-content ul {
  list-style: none;
  padding: 0;
}

.sidebar-box-content li {
  padding: 2px 0;
  border-bottom: 1px dotted #ddd;
}

.sidebar-box-content li:last-child {
  border-bottom: none;
}

.sidebar-box-content li a {
  font-size: 13px;
}

.sidebar-box-content li.current a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

/* Search box */
.sidebar-search {
  padding: 8px 10px;
}

.sidebar-search input[type="text"] {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #aaa;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.sidebar-search button {
  width: 100%;
  margin-top: 4px;
  padding: 3px 8px;
  background: linear-gradient(to bottom, #f8f8f8, #ddd);
  border: 1px solid #aaa;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-search button:hover {
  background: linear-gradient(to bottom, #fff, #e8e8e8);
}

.search-no-result {
  font-size: 12px;
  color: #999;
  padding: 4px 0 0;
  display: none;
}

/* --- Main Content Styles --- */
.wiki-main h2 {
  font-size: 19px;
  border-bottom: 2px solid #4a6fa5;
  padding-bottom: 4px;
  margin: 24px 0 12px;
  color: #333;
}

.wiki-main h2:first-child {
  margin-top: 0;
}

.wiki-main h3 {
  font-size: 16px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
  margin: 20px 0 10px;
  color: #444;
}

.wiki-main h4 {
  font-size: 15px;
  margin: 16px 0 8px;
  color: #555;
}

.wiki-main p {
  margin: 8px 0;
}

.wiki-main ul, .wiki-main ol {
  margin: 8px 0 8px 24px;
}

.wiki-main li {
  margin: 4px 0;
}

/* Info box */
.info-box {
  background: #f0f4f8;
  border: 1px solid #a7d7f9;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
}

.info-box-title {
  font-weight: bold;
  color: #4a6fa5;
  margin-bottom: 6px;
  font-size: 14px;
  border-bottom: 1px solid #a7d7f9;
  padding-bottom: 4px;
}

/* Game spec box */
.spec-box {
  background: #1a1a2e;
  color: #c0c0c0;
  border: 1px solid #444;
  padding: 12px 16px;
  margin: 16px 0;
  font-family: "MS Gothic", "ＭＳ ゴシック", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.spec-box .label {
  color: #6bc5f0;
}

.spec-box .warn {
  color: #e74c3c;
}

.spec-box .note {
  color: #888;
  font-size: 12px;
}

.spec-box .err {
  color: #666;
  font-size: 11px;
}

/* Tables */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.wiki-table th {
  background: #4a6fa5;
  color: #fff;
  padding: 6px 10px;
  text-align: left;
  font-weight: normal;
  font-size: 13px;
  border: 1px solid #3a5f95;
}

.wiki-table td {
  padding: 6px 10px;
  border: 1px solid #ccc;
  vertical-align: top;
}

.wiki-table tr:nth-child(even) td {
  background: #fff;
}

.wiki-table tr.recommended td {
  background: #fffde0;
}

.wiki-table .route-marker {
  color: #c9a800;
  font-weight: bold;
  font-size: 12px;
}

/* Bug report board */
.bug-post {
  border: 1px solid #ddd;
  margin: 12px 0;
  background: #fff;
}

.bug-post-header {
  background: #f5f5f5;
  padding: 6px 12px;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
}

.bug-post-body {
  padding: 10px 12px;
  font-size: 14px;
}

.bug-post-body p {
  margin: 4px 0;
}

.bug-post.anomaly {
  border-color: #999;
  background: #fafafa;
}

.bug-post.anomaly .bug-post-header {
  background: #e8e8e8;
  color: #444;
}

/* TOC */
.toc {
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 10px 16px;
  margin: 16px 0;
  display: inline-block;
  min-width: 200px;
  font-size: 13px;
}

.toc-title {
  font-weight: bold;
  text-align: center;
  margin-bottom: 6px;
}

.toc ol {
  margin: 0 0 0 20px;
  padding: 0;
}

.toc li {
  margin: 2px 0;
}

/* --- Footer --- */
.wiki-footer {
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-top: none;
  padding: 8px 16px;
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 20px;
}

.wiki-footer a {
  color: #888;
}

/* --- Utility --- */
.hidden-text {
  color: #e8e8e8;
  font-size: 1px;
  user-select: all;
  line-height: 0;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Last modified */
.last-modified {
  font-size: 12px;
  color: #999;
  text-align: right;
  margin-top: 24px;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

/* Section editor attribution */
.section-editor {
  font-size: 12px;
  color: #aaa;
  text-align: right;
  margin-top: 4px;
  font-style: italic;
}

.section-editor .editor-name {
  font-style: normal;
  color: #7a6520;
}

.section-editor .editor-name.bot {
  color: #c0392b;
}

.section-editor .editor-name.owl {
  color: #2980b9;
}

/* REDACTED / system-censored content */
.redacted {
  background: #333;
  color: #333;
  padding: 0 4px;
  cursor: default;
  user-select: none;
  font-size: 13px;
}

.redacted:hover {
  color: #666;
}

.sys-note {
  color: #999;
  font-size: 12px;
  font-style: italic;
  border-left: 2px solid #ccc;
  padding-left: 8px;
  margin: 8px 0;
}

/* Search result messages */
.search-result-msg {
  font-size: 12px;
  padding: 6px 0 0;
  line-height: 1.4;
  color: #999;
}

.search-result-msg.success {
  color: #4a9e4a;
  font-weight: bold;
}

.search-result-msg.success-final {
  color: #c9a800;
  font-weight: bold;
}

.search-result-msg.warn {
  color: #cc6600;
}

.search-result-msg.info {
  color: #4a6fa5;
}

/* Clear indicators in sidebar */
.clear-indicator {
  font-size: 12px;
  margin-left: 2px;
}

.final-auth {
  font-size: 12px;
  color: #c9a800;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dotted #ddd;
}

/* Monitor log (chart page) */
.monitor-log {
  background: #0a0a12;
  color: #6bc5f0;
  border: 1px solid #333;
  padding: 16px 20px;
  margin: 24px 0;
  font-family: "MS Gothic", "ＭＳ ゴシック", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}

.monitor-log-title {
  color: #e74c3c;
  font-size: 12px;
  margin-bottom: 8px;
  font-family: "MS Gothic", "ＭＳ ゴシック", "Courier New", monospace;
}

/* white_owl secure channel */
.owl-channel {
  background: #f0f4f8;
  border: 1px solid #1a5276;
  border-left: 4px solid #2980b9;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 12px;
  color: #555;
  line-height: 1.8;
}

.owl-channel::before {
  content: '[white_owl — secure channel]';
  display: block;
  font-size: 11px;
  color: #2980b9;
  margin-bottom: 8px;
  font-family: "MS Gothic", "ＭＳ ゴシック", "Courier New", monospace;
}

/* Letter art cells */
.wiki-table td.lit,
.wiki-table tr:nth-child(even) td.lit {
  background: #e8f0f8;
}

/* ALIVE lighting effect */
.alive-char {
  transition: none;
}

.alive-char.alive-lit {
  color: #4af;
  text-shadow: 0 0 8px #4af, 0 0 16px #2980b9, 0 0 24px #1a5276;
  animation: alive-pulse 2s ease-in-out infinite;
}

@keyframes alive-pulse {
  0%, 100% {
    text-shadow: 0 0 8px #4af, 0 0 16px #2980b9, 0 0 24px #1a5276;
  }
  50% {
    text-shadow: 0 0 12px #6cf, 0 0 24px #4af, 0 0 36px #2980b9;
  }
}

/* FAQ items */
.faq-item {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dotted #ddd;
}

.faq-item:last-child {
  border-bottom: none;
}

/* Contact form */
.contact-form-area {
  margin: 12px 0;
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #ddd;
}

.contact-form-area input[type="text"] {
  padding: 6px 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  font-family: inherit;
}

.contact-form-area button {
  padding: 6px 16px;
  background: #4a6fa5;
  color: #fff;
  border: 1px solid #3a5f95;
  cursor: pointer;
  font-size: 13px;
}

.contact-form-area button:hover {
  background: #3a5f95;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .wiki-wrapper {
    flex-direction: column;
    padding: 4px;
  }

  .wiki-sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-box {
    flex: 1;
    min-width: 140px;
  }

  .wiki-main {
    padding: 14px 12px;
  }

  .wiki-main h2 {
    font-size: 17px;
  }

  .spec-box {
    font-size: 13px;
    padding: 10px 12px;
  }

  .wiki-table {
    font-size: 13px;
  }

  .wiki-table th, .wiki-table td {
    padding: 4px 6px;
  }
}
