:root {
  --green: #063f2d;
  --green2: #0b5d42;
  --gold: #ffcd32;
  --ink: #10251d;
  --paper: #f5f2e8;
  --card: #fffdf7;
  --muted: #65766f;
  --line: #d8ddcf;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.splash {
  display: grid;
  place-items: center;
  height: 100vh;
  color: var(--green);
}
.landing {
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 15%, #187651 0, transparent 35%),
    linear-gradient(145deg, #042d21, #0a523a);
  color: white;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6vw;
  align-items: center;
  padding: 8vw;
}
.hero h1 {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.85;
  margin: 0;
  color: var(--gold);
  letter-spacing: -0.07em;
}
.hero p {
  font-size: 1.3rem;
  max-width: 620px;
  line-height: 1.6;
}
.principles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.principles span {
  border: 1px solid #ffffff55;
  border-radius: 99px;
  padding: 8px 13px;
}
.flag {
  font-size: 3rem;
}
.authbox {
  background: #fff;
  color: var(--ink);
  padding: 28px;
  border-radius: 18px;
  box-shadow: 0 25px 70px #00170d88;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.tabs button {
  background: none;
  border: 0;
  padding: 8px 0;
  margin-right: 18px;
  font-weight: 700;
  color: var(--muted);
}
.tabs button.active {
  color: var(--green);
  border-bottom: 3px solid var(--gold);
}
form {
  display: grid;
  gap: 12px;
}
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: white;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.primary {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  padding: 11px;
  font-weight: 700;
}
.error {
  color: #aa2929;
  min-height: 1.2em;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--green);
  color: white;
  padding: 22px 14px;
  position: fixed;
  width: 240px;
  height: 100vh;
}
.brand {
  font-weight: 900;
  color: var(--gold);
  font-size: 1.5rem;
  padding: 0 10px 18px;
}
.side-flag {
  font-size: 1.05rem;
  margin-right: 4px;
}
.board b {
  color: var(--gold);
  display: inline-block;
  min-width: 2.5rem;
}
.board {
  display: block;
  color: #d9ebe2;
  text-decoration: none;
  padding: 10px;
  border-radius: 7px;
  margin: 3px 0;
}
.board:hover,
.board.active {
  background: #ffffff19;
  color: white;
}
.account {
  position: absolute;
  bottom: 18px;
  left: 14px;
  right: 14px;
  border-top: 1px solid #ffffff22;
  padding: 14px 8px 0;
}
.account small {
  display: block;
  color: #b6d1c5;
}
.linkbtn {
  border: 0;
  background: none;
  color: var(--gold);
  padding: 8px 0;
}
.main {
  grid-column: 2;
  padding: 28px 36px;
  max-width: 1500px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.top h1 {
  margin: 0;
}
.newbtn {
  border: 0;
  background: var(--gold);
  color: #263716;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 800;
}
.catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 15px;
}
.thread-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: 0.15s;
}
.thread-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #18362a15;
}
.thread-card img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  background: #dde4dc;
}
.thread-info {
  padding: 14px;
}
.thread-info h3 {
  margin: 0 0 7px;
}
.meta {
  color: var(--muted);
  font-size: 0.82rem;
}
.body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.thread-head,
.post {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.thread-head {
  max-width: 980px;
}
.post {
  margin-left: 25px;
  max-width: 880px;
}
.poster {
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}
.postno {
  color: var(--muted);
  margin-left: 8px;
}
.modal {
  position: fixed;
  inset: 0;
  background: #00150eaa;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 5;
}
.modal > div {
  background: var(--card);
  padding: 24px;
  border-radius: 14px;
  width: min(570px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.modaltop {
  display: flex;
  justify-content: space-between;
}
.close {
  border: 0;
  background: none;
  font-size: 1.5rem;
}
.profile-pop {
  position: fixed;
  background: white;
  border: 1px solid var(--line);
  padding: 14px;
  width: 260px;
  border-radius: 9px;
  box-shadow: 0 10px 35px #0003;
  z-index: 9;
}
.profile-pop p {
  margin: 0.45rem 0;
}
.profile-pop .bio {
  font-size: 0.87rem;
  max-height: 110px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.profile-pop .bio p {
  margin: 0.25rem 0;
}
.music {
  display: inline-block;
  margin-top: 8px;
  color: var(--green);
  font-size: 0.85rem;
}
.profile-music {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}
.profile-music iframe {
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: 8px;
}
.empty {
  border: 1px dashed var(--line);
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border-radius: 12px;
}
.account-name {
  display: block;
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.account-head { display: flex; align-items: center; gap: 10px; }
.account-head .account-name { flex: 1; }
.bell { position: relative; border: 0; background: #ffffff18; color: white; border-radius: 8px; padding: 7px; }
.bell span { position: absolute; right: -7px; top: -8px; background: #f4c430; color: #17382c; border-radius: 10px; padding: 1px 5px; font-size: .65rem; font-weight: 800; }
.notification-list { display: grid; gap: 8px; }
.notification { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.notification.unread { border-left: 4px solid var(--green2); background: #eff8f2; }
.notification small { display: block; color: var(--muted); margin-top: 5px; }
.notice-icon { font-weight: 900; color: var(--green2); font-size: 1.2rem; }
.bio img { max-width: 100%; height: auto; border-radius: 8px; }
.linkbtn {
  text-decoration: none;
}
.post-image {
  display: block;
  max-width: min(100%, 520px);
  max-height: 420px;
  object-fit: contain;
  margin: 14px 0;
  border-radius: 8px;
}
.post-meta {
  display: flex;
  align-items: center;
}
.reply-link,
.back-link {
  border: 0;
  background: none;
  color: var(--green2);
  text-decoration: underline;
  padding: 2px 7px;
  font-size: 0.82rem;
}
.back-link {
  font-size: inherit;
  padding: 0;
  margin-bottom: 14px;
}
.boardref,
.postref {
  color: var(--green2);
  font-weight: 700;
}
.post-menu {
  position: fixed;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  box-shadow: 0 6px 22px #0003;
  padding: 10px 14px;
}
.filepick {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
}
.filepick input {
  width: auto;
  border: 0;
  padding: 0;
}
.profile-title,
.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.profile-title h1 {
  margin: 0.2rem 0;
}
.profile-page {
  max-width: 900px;
}
.profile-page form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.profile-actions {
  justify-content: flex-start;
}
.profile-actions .primary {
  min-width: 150px;
}
#member label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
#member input[type="checkbox"] {
  width: auto;
  margin: 0;
}
@media (max-width: 700px) {
  .landing {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .account {
    position: static;
  }
  .main {
    grid-column: 1;
    padding: 20px;
  }
  .post {
    margin-left: 0;
  }
}
