:root {
  color-scheme: light;
  --ink: #222529;
  --muted: #66706f;
  --line: #d9dfd9;
  --surface: #ffffff;
  --wash: #f6f8f4;
  --forest: #176b58;
  --forest-dark: #104d3f;
  --shadow: 0 18px 60px rgba(35, 42, 36, 0.12);
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--wash);
  color: var(--ink);
}

body,
button,
a {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

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

img,
svg,
canvas {
  display: block;
}

[hidden] {
  display: none !important;
}

.notice-app {
  width: min(100%, 640px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(217, 223, 217, 0.52);
}

.notice-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 56px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.notice-topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.notice-intro {
  padding: 18px 18px 14px;
}

.notice-eyebrow {
  margin: 0 0 8px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 850;
}

.notice-intro h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
}

.pdf-viewer {
  overflow: hidden;
  background: #eef2ee;
}

.pdf-loading {
  min-height: min(70vh, 720px);
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.pdf-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
}

.pdf-track.is-zoomed {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.pdf-track::-webkit-scrollbar {
  display: none;
}

.pdf-page {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 12px 10px 18px;
  scroll-snap-align: start;
}

.pdf-zoom-shell {
  width: min(
    calc(100vw - 20px),
    max(280px, calc((100dvh - 222px - env(safe-area-inset-bottom)) * 210 / 297)),
    620px
  );
  max-width: 100%;
  aspect-ratio: 210 / 297;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #cfd8d2;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 39, 33, 0.08);
  touch-action: pan-x;
}

.pdf-zoom-shell canvas {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.page-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.notice-bottom-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 20;
  width: min(100%, 640px);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 104px;
  gap: 9px;
  align-items: center;
  transform: translateX(-50%);
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(217, 223, 217, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -16px 36px rgba(28, 34, 31, 0.12);
  backdrop-filter: blur(16px);
}

.notice-nav-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--forest);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 850;
}

.notice-nav-button.is-primary {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.notice-nav-button:disabled {
  border-color: #dfe5df;
  background: #f2f5f1;
  color: #a2ada7;
  cursor: not-allowed;
}

.notice-page-status {
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.notice-page-status span {
  color: var(--forest);
  font-size: 12px;
  font-weight: 900;
}

.notice-page-status strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 760px) {
  body {
    padding: 28px 0;
  }

  .notice-app {
    min-height: calc(100vh - 56px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 480px) {
  .notice-intro {
    padding: 16px 16px 12px;
  }

  .notice-intro h2 {
    font-size: 22px;
  }

  .notice-bottom-nav {
    grid-template-columns: 76px minmax(0, 1fr) 92px;
  }
}
