:root {
  color-scheme: light;
  --ink: #10172f;
  --paper: #e0e7f8;
  --blue: #465fff;
  --muted: #51607c;
  --gold: #fff0b8;
  --line: 2px solid var(--ink);
  font-family:
    "Noto Sans KR",
    "Noto Sans JP",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: var(--line);
  border-radius: 10px;
  background: #f0f3ff;
  padding: 12px 18px;
  font-weight: 750;
  line-height: 1.35;
}
button:hover:not(:disabled) {
  filter: brightness(0.96);
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b25a00;
  outline-offset: 3px;
}
button.primary,
.tabs .selected {
  color: white;
  background: var(--blue);
}
button.secondary {
  background: white;
}
.wide {
  width: 100%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.notice-surface {
  max-width: 760px;
  margin: auto;
  padding: 28px;
  min-height: 100dvh;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.brand {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.brand-row select {
  border: var(--line);
  border-radius: 8px;
  background: transparent;
  padding: 8px;
  max-width: 145px;
}
.tabs {
  display: flex;
  gap: 12px;
}
.tabs button {
  flex: 1;
}
h1 {
  font-size: clamp(25px, 4.4vw, 42px);
  line-height: 1.4;
  margin: 28px 0 24px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 24px;
  line-height: 1.45;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.notice-card {
  border: var(--line);
  border-radius: 16px;
  padding: 24px;
  background: #f0f3ff;
  margin: 16px 0;
}
.notice-card.featured {
  background: var(--gold);
  border-color: #b9953c;
  padding: 28px;
}
.featured h2,
.full h2 {
  font-size: clamp(25px, 4vw, 38px);
}
.badge {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  border-radius: 50px;
  padding: 6px 12px;
  font-weight: 750;
}
.meta {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}
.summary {
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.featured .meta,
.featured .summary {
  color: #765219;
}
.notice-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 10px;
  margin: 24px 0;
}
.image-error {
  padding: 16px;
  border: 1px dashed currentColor;
}
.notice-card button {
  margin-top: 10px;
}
.text-button {
  border: 0;
  padding: 8px 0;
  color: var(--blue);
  background: transparent;
}
.article-body {
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-top: 1px solid #bfc7d8;
  margin-top: 24px;
  padding-top: 24px;
}
.section-title {
  font-size: 20px;
  margin: 28px 0 16px;
}
footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 36px 0 12px;
}
#message:not(:empty) {
  padding: 16px;
  border-radius: 10px;
  background: #f0f3ff;
  margin: 18px 0;
  line-height: 1.7;
}
#message button {
  margin-left: 12px;
}
.preview-banner {
  background: #583600;
  color: white;
  font-weight: 750;
  padding: 12px 20px;
  text-align: center;
}
.admin-page {
  background: #f3f5fa;
}
.admin-header {
  padding: 20px 28px;
  background: #20283f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-header a { color: inherit; }
.admin-header h1 {
  font-size: 23px;
  margin: 0;
}
.admin-header p {
  margin: 6px 0 0;
  font-size: 13px;
}
.admin-header button {
  border-color: white;
}
.admin-shell {
  max-width: 1520px;
  margin: auto;
  padding: 24px;
}
.login-card {
  max-width: 520px;
  margin: 60px auto;
  padding: 32px;
  background: white;
  border: 1px solid #ccd2df;
  border-radius: 18px;
  line-height: 1.8;
}
.admin-grid {
  display: grid;
  grid-template-columns: 270px minmax(340px, 1fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid #ccd2df;
  border-radius: 14px;
  padding: 20px;
}
.panel h2 {
  font-size: 19px;
  margin-top: 0;
}
.admin-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.admin-list button {
  text-align: left;
  font-size: 14px;
  border: 1px solid #ccd2df;
  word-break: break-word;
}
.admin-list button.selected {
  border: 2px solid var(--blue);
  background: #edf0ff;
}
.admin-list small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.fields {
  display: grid;
  gap: 16px;
}
.fields label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 650;
}
input,
textarea,
.fields select,
.preview-lang {
  width: 100%;
  padding: 10px;
  border: 1px solid #9ba5bb;
  border-radius: 7px;
  background: white;
  font-weight: 400;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
.fields .checks {
  display: flex;
  gap: 20px;
}
.checks label {
  display: flex;
  align-items: center;
}
.checks input {
  width: auto;
}
.language-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.language-tabs button {
  padding: 8px 10px;
  font-size: 12px;
  border-width: 1px;
}
.language-tabs .selected {
  background: var(--blue);
  color: white;
}
.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #ccd2df;
  padding-top: 20px;
  margin-top: 22px;
}
.danger {
  background: #fff0ef;
  color: #a32519;
}
.editor-status {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 14px;
  color: var(--muted);
}
.admin-preview {
  background: var(--paper);
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  max-height: calc(100dvh - 220px);
  overflow: auto;
}
.admin-preview .notice-card {
  margin: 0;
}
.confirmation {
  border: 2px solid #ad7000;
  background: #fff6d7;
  padding: 18px;
  border-radius: 12px;
  margin-top: 18px;
  line-height: 1.8;
}
.confirmation h3 {
  margin: 0 0 10px;
}
.confirmation button {
  margin: 12px 8px 0 0;
}
.error {
  color: #a32519;
}
.saved {
  color: #136d43;
}
#admin-message {
  margin-bottom: 20px;
  line-height: 1.7;
  white-space: pre-wrap;
}
#admin-message:not(:empty) {
  background: #fff;
  border: 1px solid #ccd2df;
  border-radius: 10px;
  padding: 14px;
}
#admin-message button {
  margin-left: 10px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1120px) {
  .admin-grid {
    grid-template-columns: 230px 1fr;
  }
  .preview-panel {
    grid-column: 2;
  }
  .admin-preview {
    max-height: none;
  }
}
@media (max-width: 650px) {
  .notice-surface {
    padding: 18px;
  }
  .notice-card,
  .notice-card.featured {
    padding: 20px;
  }
  .brand-row {
    margin-bottom: 18px;
  }
  button {
    padding: 11px 13px;
  }
  .summary,
  .article-body {
    font-size: 16px;
  }
  .admin-header {
    align-items: flex-start;
    padding: 18px;
  }
  .admin-header a { color: inherit; }
.admin-header h1 {
    font-size: 20px;
  }
  .admin-shell {
    padding: 14px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    grid-column: auto;
  }
  .admin-preview {
    max-height: none;
  }
  .panel {
    padding: 16px;
  }
  .admin-list {
    max-height: 240px;
    overflow: auto;
  }
}
#editor-fields {
  border: 0;
  padding: 0;
  margin: 0;
}
