:root {
  color-scheme: dark;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  background: #070d0b;
  color: #b7d8c6;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #070d0b;
  color: #b7d8c6;
}

button,
input,
textarea {
  font: inherit;
}

.bbs-terminal {
  width: min(940px, calc(100% - 32px));
  margin: 28px auto;
  overflow: hidden;
  border: 1px solid #315242;
  background: #0a110e;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .34);
}

.bbs-terminal-header,
.bbs-screen-topline,
.bbs-section-heading,
.bbs-form-footer,
.bbs-terminal-footer,
.bbs-post-meta,
.bbs-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.bbs-terminal-header {
  min-height: 62px;
  padding: 10px 20px;
  border-bottom: 1px solid #274636;
  background: #0d1712;
}

.bbs-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.bbs-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #4f8466;
  color: #9ce0b4;
  font-weight: 800;
}

.bbs-brand > span:last-child {
  display: grid;
  gap: 3px;
}

.bbs-brand strong {
  color: #d3f0dc;
  font-size: .73rem;
}

.bbs-brand small,
.bbs-header-meta,
.bbs-screen-topline,
.bbs-terminal-footer {
  color: #779582;
  font-size: .61rem;
  letter-spacing: .04em;
}

.bbs-header-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bbs-header-meta a,
.bbs-terminal-footer a,
.bbs-text-link {
  color: #a7d7b8;
  text-decoration: none;
}

.bbs-header-meta a:hover,
.bbs-terminal-footer a:hover,
.bbs-text-link:hover {
  color: #e2ffeb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bbs-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.bbs-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55c77b;
  box-shadow: 0 0 0 4px rgba(85, 199, 123, .12);
}

.bbs-screen {
  padding: clamp(18px, 4vw, 36px);
}

.bbs-screen-topline {
  padding-bottom: 10px;
  border-bottom: 1px solid #213a2c;
}

.bbs-screen-topline span:last-child {
  text-align: right;
}

.bbs-welcome {
  padding: 25px 0 21px;
  border-bottom: 1px solid #213a2c;
}

.bbs-prompt,
.bbs-post-index {
  margin: 0 0 8px;
  color: #76c991;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.bbs-welcome h1 {
  margin: 0 0 8px;
  color: #d5f1dc;
  font-size: clamp(1.35rem, 3.8vw, 2rem);
  line-height: 1.2;
}

.bbs-welcome > p:last-child {
  margin: 0;
  color: #91ad9a;
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: .8rem;
  line-height: 1.7;
}

.bbs-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 11px 0;
  border-bottom: 1px solid #213a2c;
  color: #809d8a;
  font-size: .62rem;
}

.bbs-status-line span:first-child {
  color: #d6bd67;
  font-weight: 800;
}

.bbs-status-line strong {
  color: #84d69d;
}

.bbs-login-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 0;
  border-bottom: 1px solid #213a2c;
  color: #91ad9a;
  font-size: .64rem;
}

.bbs-login-state a {
  color: #a7d7b8;
  text-decoration: none;
}

.bbs-login-state a:hover {
  color: #e2ffeb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bbs-feedback {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #396549;
  background: #0c1a11;
  color: #a5e5b4;
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: .76rem;
  line-height: 1.6;
}

.bbs-feedback-error {
  border-color: #82564a;
  background: #1b100d;
  color: #f0b5a2;
}

.bbs-post-list,
.bbs-compose,
.bbs-post-detail {
  margin-top: 21px;
  padding: 17px;
  border: 1px solid #263f30;
  background: #0a120e;
}

.bbs-section-heading {
  margin-bottom: 12px;
}

.bbs-section-heading h2 {
  margin: 0;
  color: #cde8d4;
  font-size: .9rem;
}

.bbs-section-heading > span {
  color: #6d9478;
  font-size: .58rem;
  text-align: right;
}

.bbs-empty {
  display: grid;
  min-height: 128px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border: 1px dashed #294532;
  color: #7d9e86;
  text-align: center;
}

.bbs-empty > span {
  color: #76c991;
  font-size: 1.1rem;
  font-weight: 800;
}

.bbs-empty strong {
  color: #c0dec8;
  font-size: .78rem;
}

.bbs-empty p {
  margin: 0;
  color: #7d9e86;
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: .7rem;
}

.bbs-table-wrap {
  overflow-x: auto;
}

.bbs-table {
  width: 100%;
  border-collapse: collapse;
  color: #accab4;
  font-size: .68rem;
  text-align: left;
}

.bbs-table th,
.bbs-table td {
  padding: 11px 9px;
  border-bottom: 1px solid #1e3528;
  white-space: nowrap;
}

.bbs-table th {
  color: #7fa58a;
  font-size: .59rem;
  font-weight: 700;
}

.bbs-table td:nth-child(2) {
  width: 100%;
  white-space: normal;
}

.bbs-table a {
  color: #c1e6cb;
  text-decoration: none;
}

.bbs-table a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bbs-compose form {
  display: grid;
  gap: 11px;
}

.bbs-compose-author {
  margin: 0;
  color: #75917d;
  font-size: .64rem;
  line-height: 1.6;
}

.bbs-compose-author strong {
  color: #c9efd3;
}

.bbs-compose label {
  display: grid;
  gap: 6px;
  color: #9cbea6;
  font-size: .65rem;
}

.bbs-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
}

.bbs-compose input,
.bbs-compose textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #315242;
  border-radius: 2px;
  outline: 0;
  background: #070d0b;
  color: #d5f1dc;
  font-size: .72rem;
}

.bbs-compose textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.7;
}

.bbs-compose input:focus-visible,
.bbs-compose textarea:focus-visible {
  border-color: #76c991;
  outline: 2px solid rgba(118, 201, 145, .2);
}

.bbs-form-footer {
  align-items: flex-end;
}

.bbs-form-footer small {
  max-width: 56ch;
  color: #75917d;
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: .64rem;
  line-height: 1.6;
}

.bbs-form-footer button {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #4c9a66;
  border-radius: 2px;
  background: #13351f;
  color: #c9efd3;
  font-size: .67rem;
  cursor: pointer;
}

.bbs-form-footer button:hover {
  border-color: #7ec894;
  background: #1a482b;
}

.bbs-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bbs-post-detail h2 {
  margin: 0 0 10px;
  color: #d5f1dc;
  font-size: 1.05rem;
}

.bbs-post-meta {
  justify-content: flex-start;
  color: #7d9e86;
  font-size: .62rem;
}

.bbs-post-body {
  margin: 18px 0;
  padding-top: 15px;
  border-top: 1px solid #213a2c;
  color: #bad8c2;
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: .82rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.bbs-pending-label {
  display: inline-block;
  margin: 0 12px 12px 0;
  color: #e7c56e;
  font-size: .63rem;
}

.bbs-terminal-footer {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #213a2c;
}

.bbs-terminal-footer > span:first-child {
  color: #76c991;
}

.bbs-terminal-footer i {
  display: inline-block;
  width: 7px;
  height: 13px;
  vertical-align: -2px;
  background: #76c991;
  animation: bbs-cursor 1s steps(2, end) infinite;
}

.bbs-terminal-footer > span:nth-child(2) {
  margin-left: auto;
  text-align: right;
}

@keyframes bbs-cursor {
  50% { opacity: 0; }
}

@media (max-width: 600px) {
  .bbs-terminal {
    width: calc(100% - 18px);
    margin: 9px auto;
  }

  .bbs-terminal-header {
    align-items: flex-start;
    padding: 11px;
  }

  .bbs-header-meta {
    display: grid;
    justify-items: end;
    gap: 7px;
    font-size: .53rem;
  }

  .bbs-screen {
    padding: 15px 11px;
  }

  .bbs-screen-topline {
    align-items: flex-start;
    font-size: .51rem;
  }

  .bbs-form-grid {
    grid-template-columns: 1fr;
  }

  .bbs-post-list,
  .bbs-compose,
  .bbs-post-detail {
    padding: 12px;
  }

  .bbs-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .bbs-form-footer button {
    justify-content: center;
  }

  .bbs-terminal-footer {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bbs-terminal-footer i {
    animation: none;
  }
}
