:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #555555;
  --font-web: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-docx: 'Times New Roman', Times, 'Liberation Serif', Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-web);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media print {
  html, body {
    display: none !important;
  }
}

.site-header {
  width: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 24px 0;
}

.github-link {
  color: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  text-decoration: none;
}

.github-link:hover {
  opacity: 0.7;
}

.github-link svg {
  width: 26px;
  height: 26px;
  fill: #000000;
}

.page-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}

.page-container.full-folder-view {
  max-width: 880px;
}

.search-wrap {
  width: 100%;
  margin: 0;
  border-bottom: 2px solid #000000;
}

.search-input {
  width: 100%;
  border: none;
  background: #ffffff;
  color: #000000;
  padding: 11px 14px;
  font-family: var(--font-web);
  font-size: 14px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.search-input::placeholder {
  color: #666666;
}

.file-manager-box {
  width: 100%;
  border: 2px solid #000000;
  background: #ffffff;
}

.fm-header-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  border-bottom: 2px solid #000000;
  background: #f5f5f5;
  font-size: 13px;
  font-weight: 600;
  color: #000000;
}

.fm-col-name {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fm-sort-arrow {
  font-size: 11px;
  color: #000000;
}

.fm-col-date {
  padding: 8px 12px;
  border-left: 1px solid #000000;
  text-align: left;
}

.fm-body-list {
  display: flex;
  flex-direction: column;
}

.fm-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  align-items: center;
  text-decoration: none;
  color: #000000;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
  min-height: 36px;
}

.fm-row:last-child {
  border-bottom: none;
}

.fm-row:hover {
  background: #000000;
  color: #ffffff;
}

.fm-cell-name {
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fm-folder-icon {
  width: 20px;
  height: 17px;
  flex-shrink: 0;
  display: block;
}

.fm-folder-icon .folder-back {
  fill: #000000;
  stroke: #000000;
  stroke-width: 1.5;
}

.fm-folder-icon .folder-front {
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1.5;
}

.fm-row:hover .fm-folder-icon .folder-back {
  fill: #ffffff;
  stroke: #ffffff;
}

.fm-row:hover .fm-folder-icon .folder-front {
  fill: #000000;
  stroke: #ffffff;
}

.fm-folder-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-cell-date {
  padding: 7px 12px;
  font-size: 13px;
  color: #333333;
  white-space: nowrap;
}

.fm-row:hover .fm-cell-date {
  color: #ffffff;
}

.folder-nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid #000000;
}

.folder-head-title {
  font-size: 20px;
  font-weight: 700;
}

.note-folder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.page-num-box {
  width: 40px;
  height: 40px;
  border: 2px solid #000000;
  background: #ffffff;
  color: #000000;
  font-family: var(--font-web);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.page-num-box:hover,
.page-num-box.active {
  background: #000000;
  color: #ffffff;
}

.note-reader-box {
  width: 100%;
  border: 2px solid #000000;
  background: #ffffff;
  padding: 40px 48px;
}

.note-meta-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid #000000;
  font-family: var(--font-web);
  font-size: 12px;
  color: var(--muted);
}

.note-meta-strip strong {
  color: #000000;
}

.note-meta-strip.live-flash {
  background: #000000;
  color: #ffffff;
  padding: 8px 12px;
}

.note-meta-strip.live-flash strong {
  color: #ffffff;
}

.word-content {
  font-family: var(--font-docx);
  font-size: 12pt;
  line-height: 1.65;
  color: #000000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.word-content .doc-title {
  font-family: var(--font-docx);
  font-size: 22pt;
  font-weight: 700;
  border-bottom: 2px solid #000000;
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.word-content .doc-subtitle {
  font-family: var(--font-docx);
  font-size: 13pt;
  font-style: italic;
  color: #333333;
}

.word-content .doc-h1 {
  font-family: var(--font-docx);
  font-size: 16pt;
  font-weight: 700;
  margin-top: 10px;
}

.word-content .doc-h2 {
  font-family: var(--font-docx);
  font-size: 14pt;
  font-weight: 700;
  margin-top: 8px;
}

.word-content .doc-h3 {
  font-family: var(--font-docx);
  font-size: 12pt;
  font-weight: 700;
  text-decoration: underline;
}

.word-content .doc-p {
  font-family: var(--font-docx);
  font-size: 12pt;
  white-space: pre-wrap;
  word-break: break-word;
}

.word-content .doc-list-item {
  padding-left: 20px;
  position: relative;
}

.word-content .doc-list-item::before {
  content: "•";
  position: absolute;
  left: 4px;
  font-weight: 700;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.word-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-docx);
  font-size: 11pt;
  margin: 8px 0;
}

.word-table td,
.word-table th {
  border: 1.5px solid #000000;
  padding: 8px 12px;
  text-align: left;
}

.word-table tr:first-child td {
  background: #000000;
  color: #ffffff;
  font-weight: 700;
}

.empty-state {
  padding: 24px;
  text-align: center;
  font-family: var(--font-web);
  font-size: 13px;
  color: var(--muted);
}

.security-shield {
  position: fixed;
  inset: 0;
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 24px;
  text-align: center;
  font-family: var(--font-web);
}

.security-shield-box {
  border: 2px solid #ffffff;
  padding: 24px 32px;
  max-width: 440px;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .site-header {
    padding: 14px 16px 0;
  }

  .page-container {
    padding: 16px 14px 48px;
  }

  .fm-header-row,
  .fm-row {
    grid-template-columns: 1fr 115px;
  }

  .fm-col-name,
  .fm-col-date,
  .fm-cell-name,
  .fm-cell-date {
    padding: 8px 10px;
  }

  .note-reader-box {
    padding: 22px 16px;
  }

  .note-meta-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
