/* Public homepage: Official Notice Board (auto-scrolling ticker).
 * Built on design tokens from tokens.css. Default state is a static,
 * scrollable list (works without JS); notice-board.js adds .is-animating
 * to enable the seamless auto-scroll when it runs.
 */
.notice-section {
  background: var(--ink-2);
  padding-top: 100px;
  padding-bottom: 100px;
  position: relative;
}

.notice-section .section-head {
  max-width: 720px;
}

.notice-board {
  margin-top: 40px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-l);
  background: linear-gradient(165deg, var(--panel), var(--ink-2));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Tabs */
.notice-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--panel-line);
  background: rgba(0, 0, 0, .18);
}

.notice-tab {
  appearance: none;
  border: 1px solid var(--panel-line);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}

.notice-tab:hover {
  border-color: var(--gold);
  color: var(--parchment);
}

.notice-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(198, 161, 91, .35);
}

.notice-tab.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--color-on-primary);
}

/* Viewport + track */
.notice-viewport {
  position: relative;
  height: 344px;
  overflow-y: auto;
  overscroll-behavior: contain;
  outline: none;
}

.notice-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(198, 161, 91, .35);
}

#notice-board.is-animating .notice-viewport {
  overflow: hidden;
}

.notice-track {
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

/* Item */
.notice-item {
  border-bottom: 1px solid var(--panel-line);
}

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

.notice-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  text-decoration: none;
  transition: background .25s var(--ease);
}

.notice-item a:hover,
.notice-item a:focus-visible {
  background: rgba(198, 161, 91, .06);
}

.notice-item a:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(198, 161, 91, .35);
}

.n-ic {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.n-ic svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold-bright);
}

.n-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.n-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.n-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.n-new {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-on-primary);
  background: var(--gold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.n-title {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--parchment);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notice-item.is-new .n-title {
  color: var(--gold-bright);
}

.n-arrow {
  flex: none;
  width: 16px;
  height: 16px;
  stroke: var(--text-faint);
  opacity: .7;
  transition: transform .25s var(--ease), stroke .25s var(--ease);
}

.notice-item a:hover .n-arrow {
  transform: translateX(3px);
  stroke: var(--gold-bright);
}

/* Footer CTA */
.notice-more {
  padding: 22px;
  text-align: center;
  border-top: 1px solid var(--panel-line);
}

.notice-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--panel-line);
  border-radius: var(--radius-m);
}

/* Reduced motion: static, scrollable list */
@media (prefers-reduced-motion: reduce) {
  .notice-viewport {
    height: auto;
    max-height: 400px;
    overflow-y: auto;
  }

  .notice-track {
    transform: none !important;
  }
}

@media (max-width: 980px) {
  .notice-viewport {
    height: 320px;
  }
}

@media (max-width: 560px) {
  .notice-section {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .notice-board {
    margin-top: 28px;
    border-radius: var(--radius-m);
  }

  .notice-tabs {
    padding: 14px 16px;
  }

  .notice-tab {
    padding: 7px 14px;
    font-size: 12px;
  }

  .notice-item a {
    padding: 14px 16px;
    gap: 12px;
  }

  .notice-viewport {
    height: 300px;
  }
}

[dir="rtl"] .notice-item a:hover .n-arrow {
  transform: translateX(-3px);
}
