* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top right, rgba(0, 122, 61, .12), transparent 34vw),
              linear-gradient(180deg, #f7fbf8 0%, #f7f8fa 50%, #fff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--green-dark);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

header {
  background: linear-gradient(90deg, var(--green-deep), var(--green), #1d9a58);
  color: #fff;
  border-bottom: 4px solid #b4dfc5;
  box-shadow: 0 2px 10px rgba(0, 80, 40, .16);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 64px;
  padding: 10px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-area {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-logo-white {
  width: 142px;
  height: 42px;
  display: block;
  background: #fff;
  -webkit-mask: url('/chatres/chat/themes/images/sign/logo.svg') center / contain no-repeat;
  mask: url('/chatres/chat/themes/images/sign/logo.svg') center / contain no-repeat;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(24px, 3vw, 44px) var(--pad-x) 30px;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 1.65vw, 28px);
  line-height: 1.4;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 84, 46, .10);
  overflow: hidden;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
  color: #143322;
}

.panel-header {
  position: relative;
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--green-soft), #fff);
  border-bottom: 1px solid var(--border);
}

.panel-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--green);
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-list li {
  display: grid;
  grid-template-columns: var(--notice-date-col) var(--notice-category-col) minmax(0, 1fr);
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf0f2;
  align-items: start;
}

.notice-list li.is-truncated {
  cursor: pointer;
  background: linear-gradient(90deg, rgba(0, 122, 61, .035), transparent 52%);
}

.notice-list li.is-truncated:hover {
  background: linear-gradient(90deg, rgba(0, 122, 61, .075), transparent 58%);
}

.notice-date {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.notice-line {
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(1.6em * 2);
}

.notice-more {
  display: inline-flex;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.notice-more[hidden] {
  display: none;
}

.notice-more::before {
  content: "…";
  margin-right: 4px;
}

.notice-label {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 2px;
}

.notice-label.important {
  border-color: #006b35;
  background: #008a45;
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.notice-label.urgent {
  border-color: var(--red-dark);
  background: var(--red);
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.notice-message {
  margin: 0;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, .48);
}

.modal-backdrop[hidden] {
  display: none;
}

.notice-modal {
  width: min(720px, 100%);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #b4dfc5;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  overflow: hidden;
}

.notice-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  color: #fff;
}

.notice-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.notice-modal-close {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-size: 20px;
  cursor: pointer;
}

.notice-modal-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 13px;
}

.notice-modal-content {
  padding: 14px 20px 20px;
  overflow-y: auto;
  color: #222;
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-word;
}

footer {
  position: fixed;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 0;
  padding: 9px 0 12px;
  border-top: 1px solid #b4dfc5;
  background: rgba(255, 255, 255, .96);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
