:root {
  color-scheme: dark;
  --ink: #071414;
  --ink-raised: #0c2222;
  --ink-soft: #132d2c;
  --jade: #55b5aa;
  --jade-dim: #2c8179;
  --brass: #c7a36b;
  --brass-soft: #7f6642;
  --paper: #e9dcc1;
  --paper-deep: #cdb98f;
  --text: #f0e4ca;
  --muted: #b7ab96;
  --line: rgba(199, 163, 107, 0.42);
  --serif: "Noto Serif KR", "Batang", "Malgun Myeongjo", serif;
  --sans: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 280px;
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: #123f42 url('../assets/ink-mountain-background.png') center / cover fixed no-repeat;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image: linear-gradient(90deg, rgba(4, 31, 33, 0.34), rgba(4, 31, 33, 0.08));
  content: "";
  pointer-events: none;
}

button { font: inherit; }
button:focus-visible { outline: 2px solid #f6d490; outline-offset: 3px; }

.notice-frame {
  width: 100%;
  min-height: 100vh;
  border: 0;
  box-shadow: none;
  background: linear-gradient(105deg, rgba(13, 67, 68, 0.82), rgba(8, 48, 50, 0.72));
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 0;
}

.site-title {
  margin: 0;
  color: #e3c28d;
  font-family: "Gungsuh", "궁서", var(--serif);
  font-size: clamp(1.45rem, 3.3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.tabs { display: flex; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); padding: 0 24px; scrollbar-width: none; background: rgba(6, 37, 39, 0.4); }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  min-width: 92px;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 0.8rem;
}
.tab::after { position: absolute; right: 13px; bottom: -1px; left: 13px; height: 2px; background: transparent; content: ""; }
.tab:hover, .tab.is-active { color: var(--text); }
.tab.is-active::after { background: var(--jade); box-shadow: 0 0 12px rgba(85,181,170,0.8); }

.notice-list { padding: 9px 0 16px; background: linear-gradient(90deg, rgba(8, 47, 49, 0.42), rgba(8, 47, 49, 0.12)); }
.list-count { margin: 0; padding: 0 26px 8px; color: var(--brass); font-size: 0.62rem; letter-spacing: 0.1em; }
.notice-row {
  display: grid;
  grid-template-columns: 74px 1fr 13px;
  width: 100%;
  gap: 12px;
  padding: 13px 21px 13px 26px;
  border: 0;
  border-top: 1px solid rgba(199, 163, 107, 0.14);
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.notice-row:hover { background: linear-gradient(90deg, rgba(67, 146, 139, 0.34), rgba(67,146,139,0.06)); box-shadow: inset 2px 0 0 #a9dbd2; }
.notice-meta { display: grid; align-content: start; gap: 6px; }
.category { width: fit-content; color: var(--jade); font-size: 0.61rem; font-weight: 700; letter-spacing: 0.04em; }
.category-update { color: #75c9c1; }
.category-maintenance { color: #dfba70; }
.notice-date { color: #8f9c93; font-size: 0.6rem; }
.notice-copy { display: grid; gap: 4px; min-width: 0; }
.notice-title { overflow: hidden; color: #f1e8d6; font-family: var(--serif); font-size: 0.87rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.notice-summary { overflow: hidden; color: var(--muted); font-size: 0.66rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.row-arrow { align-self: center; color: var(--brass); font-size: 1.15rem; }

.reader {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  padding: 26px clamp(23px, 4vw, 42px) 25px;
  color: #f0e4ca;
  background: linear-gradient(110deg, rgba(5, 22, 23, 0.88), rgba(5, 22, 23, 0.64));
}
.reader-heading { position: relative; z-index: 1; display: grid; gap: 7px; max-width: calc(100% - 65px); }
.reader-date { color: #c8b387; font-size: 0.63rem; }
.reader-title { margin: 3px 0 0; font-family: var(--serif); font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 700; line-height: 1.32; }
.reader-rule { position: relative; height: 14px; margin: 9px 0 12px; border-top: 1px solid rgba(199, 163, 107, 0.52); }
.reader-rule::after { position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; border: 1px solid #c7a36b; background: #0a1d1e; content: ""; transform: translateX(-50%) rotate(45deg); }
.reader-body { position: relative; z-index: 1; display: grid; gap: 11px; font-family: var(--serif); font-size: 0.82rem; line-height: 1.7; }
.reader-body p { margin: 0; }
.back-link { position: relative; z-index: 1; margin-top: 20px; padding: 0; border: 0; border-bottom: 1px solid #c7a36b; color: #e3c28d; background: transparent; cursor: pointer; font-family: var(--serif); font-size: 0.72rem; }
.empty-state { margin: 33px 26px; color: var(--muted); font-size: 0.78rem; }

@media (max-width: 820px) {
  .reader { min-height: 100vh; }
  .tabs { padding: 0; }
  .tab { min-width: 86px; padding: 0 12px; }
}

@media (max-width: 540px) {
  .site-title { font-size: 1.35rem; }
  .notice-row { grid-template-columns: 68px 1fr 12px; gap: 9px; padding: 13px 16px 13px 20px; }
  .notice-summary { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .notice-title { white-space: normal; }
  .reader { padding: 25px 22px; }
  .reader-heading { max-width: calc(100% - 45px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
