/* ==========================================================================
   初二三班 · X-style theme
   A second, later layer over style.css. Layout first: left rail, 600px feed,
   right notice column. Then the shared X-like surfaces.
   ========================================================================== */

:root {
  --ink: #000;
  --ink-2: #000;
  --panel: #16181c;
  --panel-2: #1a1d21;
  --panel-3: #22262b;
  --line: #2f3336;
  --line-soft: #22262a;
  --paper: #e7e9ea;
  --paper-bright: #fff;
  --paper-dim: #d6d9db;
  --muted: #71767b;
  --muted-2: #536471;
  --accent: #1d9bf0;
  --accent-strong: #1a8cd8;
  --accent-dim: #1d9bf0;
  --moss: #00ba7c;
  --blue: #1d9bf0;
  --danger: #f4212e;
  --like: #f91880;
  --serif: var(--sans);
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

html,
body {
  background: #000;
}

body {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--sans);
}

::selection {
  background: var(--accent);
  color: #fff;
}

.grain {
  display: none;
}

.brand-mark::after {
  display: none !important;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: inherit;
}

a:hover {
  color: var(--paper-bright);
}

button,
input,
textarea,
select {
  font-family: var(--sans);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Desktop rail / compact top header
   -------------------------------------------------------------------------- */

@media (min-width: 1200px) {
  #site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: 275px;
    height: 100vh;
    border: 0;
    background: #000;
    z-index: 100;
    padding: 0;
  }

  .site-masthead {
    width: 275px;
    height: 100vh;
    min-height: 0;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .site-masthead::-webkit-scrollbar {
    display: none;
  }

  .brand {
    width: fit-content;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 999px;
  }

  .brand:hover {
    background: #181818;
  }

  .brand-mark {
    width: 43px;
    height: 43px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #16181c;
    color: transparent;
    font-size: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  }

  .brand-mark::after {
    display: none;
  }

  .brand-copy {
    gap: 0;
  }

  .brand-copy strong {
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .brand-copy small {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
  }

  .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    margin: 18px 0 0;
  }

  .nav-link {
    width: fit-content;
    min-height: 50px;
    padding: 10px 13px;
    gap: 17px;
    border-radius: 999px;
    color: var(--paper);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .nav-link svg {
    width: 25px;
    height: 25px;
    opacity: 1;
  }

  .nav-link:hover {
    color: var(--paper-bright);
    background: #181818;
  }

  .nav-link.is-active {
    font-weight: 800;
    color: var(--paper-bright);
  }

  .nav-link.is-active::after {
    display: none;
  }

  .nav-badge {
    min-width: 18px;
    height: 18px;
    font-size: 9px;
    background: var(--accent);
    color: #fff;
  }

  .nav-post {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 10px);
    min-height: 52px;
    margin: 14px 5px 0;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0;
    transition: background 0.15s ease, transform 0.15s cubic-bezier(0.2, 1.4, 0.35, 1);
  }

  .nav-post:hover {
    background: var(--accent-strong);
  }

  .nav-post:active {
    transform: scale(0.97);
  }

  .account {
    margin: auto 0 0;
    padding: 8px;
    border: 0;
    border-radius: 999px;
    width: 100%;
  }

  .account:hover {
    background: #181818;
  }

  .account-button {
    width: 100%;
    max-width: none;
    gap: 10px;
    padding: 4px;
  }

  .account-button .user-chip-name {
    max-width: 130px;
    color: var(--paper);
    font-size: 14px;
    font-weight: 700;
  }

  .account-button .chevron {
    margin-left: auto;
    color: var(--muted);
  }

  .account-menu {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
    left: 0;
    width: 100%;
    padding: 6px;
    border-radius: 16px;
    background: #16181c;
    border-color: var(--line);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 16px 40px rgba(0, 0, 0, 0.6);
  }

  .account-menu-head {
    padding: 10px 10px 12px;
  }

  .account-menu-head strong {
    font-family: var(--sans);
    font-size: 15px;
  }

  .account-menu a,
  .account-menu button {
    border-radius: 10px;
    font-size: 14px;
  }

  .site-masthead > .login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--paper);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
  }

  .site-masthead > .login-link:hover {
    background: #181818;
    border-color: var(--line);
    color: var(--paper-bright);
  }

  .rail-footer {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 8px;
    padding: 0 10px 2px;
    color: var(--muted-2);
    font-family: var(--sans);
    font-size: 10.5px;
    letter-spacing: 0.01em;
    line-height: 1.6;
  }

  #view {
    margin-left: 275px;
    width: calc(100% - 275px);
    min-height: 100vh;
  }

  #site-footer,
  .site-foot {
    display: none;
  }

  .shell {
    width: min(1000px, calc(100% - 48px));
  }

  .home-page {
    padding: 0 0 40px;
  }

  .home-shell {
    display: grid;
    grid-template-columns: minmax(0, 600px) 350px;
    justify-content: center;
    align-items: start;
    gap: 28px;
    width: min(1000px, calc(100% - 48px));
    margin: 0 auto;
  }

  .feed-column {
    width: 100%;
    min-width: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    min-height: 100vh;
  }

  .side-column {
    display: block;
    width: 350px;
    margin: 0;
    padding: 12px 0 0;
    position: sticky;
    top: 12px;
    align-self: start;
  }

  .feed-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .notices-page,
  .profile-page {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    min-height: 100vh;
  }

  .messages-page {
    padding-top: 20px;
  }
}

@media (min-width: 1200px) and (max-width: 1319px) {
  .home-shell {
    grid-template-columns: minmax(0, 640px);
    width: min(640px, calc(100% - 48px));
    gap: 0;
  }

  .side-column {
    display: none;
  }
}

@media (min-width: 1320px) {
  .notices-page,
  .profile-page {
    margin-left: calc((100% - 978px) / 2);
    margin-right: 0;
  }
}

@media (max-width: 1199px) {
  #site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.94);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .site-masthead {
    width: 100%;
    max-width: none;
    min-height: 56px;
    height: 56px;
    padding: 0 16px;
    gap: 10px;
  }

  .brand {
    gap: 9px;
    padding: 4px 2px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    overflow: hidden;
    background: #16181c;
    color: transparent;
    font-size: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  }

  .brand-mark::after {
    display: none;
  }

  .brand-copy strong {
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .brand-copy small {
    display: none;
  }

  .nav-post,
  .rail-footer {
    display: none;
  }

  .account {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .account-button .user-chip-name {
    display: none;
  }

  .login-link {
    border: 0;
    border-radius: 999px;
    background: var(--paper-bright);
    color: #000;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
  }

  .login-link:hover {
    background: #d7dbdc;
    color: #000;
  }

  #view {
    margin-left: 0;
    width: 100%;
  }

  .feed-topbar {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 50;
  }
}

@media (min-width: 761px) and (max-width: 1199px) {
  .site-nav {
    margin-left: auto;
    gap: 2px;
  }

  .site-nav .nav-link {
    flex-direction: row;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--paper-dim);
  }

  .site-nav .nav-link svg {
    width: 18px;
    height: 18px;
  }

  .site-nav .nav-link.is-active {
    color: var(--paper-bright);
    font-weight: 700;
    background: #181818;
  }

  .site-nav .nav-link.is-active::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Shared X-like components
   -------------------------------------------------------------------------- */

.btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border-color: var(--line);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.btn:hover {
  background: #181818;
  border-color: #3b4046;
}

.btn-primary {
  background: var(--paper-bright);
  border-color: var(--paper-bright);
  color: #000;
}

.btn-primary:hover {
  background: #d7dbdc;
  border-color: #d7dbdc;
}

.btn-accent {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-accent:hover {
  background: #dc1e2a;
  border-color: #dc1e2a;
}

.btn-sm {
  min-height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-ghost {
  border-color: transparent;
}

.btn-ghost:hover {
  background: #181818;
  border-color: transparent;
}

.text-link {
  color: var(--accent);
  border: 0;
  padding: 0;
}

.text-link:hover {
  color: var(--accent-strong);
  border: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
}

.icon-btn:hover {
  background: #181818;
}

.badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border-color: var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0;
}

.badge-accent {
  border-color: transparent;
  background: rgba(29, 155, 240, 0.14);
  color: var(--accent);
}

.badge-danger {
  border-color: transparent;
  background: rgba(244, 33, 46, 0.14);
  color: #ff6b72;
}

.badge-muted {
  border-color: var(--line);
  color: var(--muted);
}

.cat-tag {
  height: 19px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.13);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0;
}

.cat-class,
.cat-event,
.cat-remind {
  border-color: transparent;
  background: #1c1f23;
  color: var(--paper-dim);
}

.stamp-role {
  height: 16px;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  transform: none;
}

.identity .display-name {
  color: var(--paper-bright);
  font-size: 15px;
  font-weight: 700;
}

.identity .handle {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0;
}

.identity a.display-name:hover {
  text-decoration: underline;
  color: var(--paper-bright);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.field-input,
.field-textarea,
.field-select {
  height: 52px;
  padding: 0 14px;
  border-radius: 8px;
  border-color: #333639;
  background: #000;
  color: var(--paper);
  font-size: 15px;
}

.field-textarea {
  padding: 12px 14px;
  line-height: 1.55;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--muted);
}

.form-field {
  margin-bottom: 18px;
}

.form-field > label,
.form-label {
  margin-bottom: 7px;
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.form-field > label .optional {
  color: var(--muted);
  font-size: 12px;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  border-left: 0;
  border-radius: 8px;
  background: rgba(244, 33, 46, 0.12);
  color: #ff8b90;
  padding: 10px 12px;
  font-size: 13px;
}

.check-row {
  color: var(--paper-dim);
  font-size: 13px;
}

.check-row input {
  accent-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Feed
   -------------------------------------------------------------------------- */

.home-page {
  padding: 0 0 40px;
}

.feed-column {
  background: #000;
}

.feed-topbar {
  min-height: 53px;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.feed-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.feed-title-row h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper-bright);
}

.feed-topbar-note {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.feed-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.feed-tab {
  flex: 1;
  min-height: 48px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  position: relative;
}

.feed-tab:hover {
  background: #080808;
  color: var(--paper);
}

.feed-tab.is-active {
  color: var(--paper-bright);
}

.feed-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(-50%);
}

.join-card {
  margin: 0;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.join-card h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.join-card p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.join-actions {
  flex-shrink: 0;
}

.join-actions .btn {
  min-height: 34px;
}

/* Composer */

.composer {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.composer-head {
  display: none;
}

.composer-main {
  gap: 12px;
  padding: 14px 16px 2px;
}

.composer-main .avatar {
  --av-size: 40px;
}

.composer-main textarea {
  min-height: 54px;
  padding: 8px 0;
  color: var(--paper);
  font-size: 19px;
  line-height: 1.4;
}

.composer-main textarea::placeholder {
  color: var(--muted);
}

.composer-foot {
  gap: 12px;
  padding: 6px 16px 12px 68px;
  border: 0;
}

.composer-tool {
  width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0;
}

.composer-tool span {
  display: none;
}

.composer-tool:hover {
  color: var(--accent);
  background: rgba(29, 155, 240, 0.12);
}

.composer-tool svg {
  width: 19px;
  height: 19px;
}

.composer-count {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.composer-submit {
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.composer-submit:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.composer-preview {
  margin: 0 16px 12px 68px;
  border-radius: 16px;
  border-color: var(--line);
  overflow: hidden;
}

.composer-preview img {
  max-height: 280px;
  object-fit: cover;
}

.composer-preview button {
  border-radius: 999px;
}

/* Posts */

.post-list {
  border-top: 0;
}

.post {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}

.post:hover {
  background: #080808;
}

.post.is-pinned::before {
  display: none;
}

.post .post-avatar .avatar {
  --av-size: 40px;
}

.post-head {
  gap: 5px;
  min-height: 20px;
}

.post-head .pin-tag {
  height: 16px;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  background: rgba(29, 155, 240, 0.14);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.post-head .post-time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0;
}

.post-head .post-time::before {
  content: "·";
  margin-right: 5px;
  color: var(--muted);
}

.post-content {
  margin-top: 3px;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.45;
}

.post-image {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  max-width: 100%;
  background: #0a0a0a;
}

.post-image img {
  max-height: 510px;
  object-fit: cover;
}

.post-actions {
  gap: 1px;
  margin-top: 10px;
  color: var(--muted);
}

.post-action {
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

.post-action svg {
  width: 17px;
  height: 17px;
}

.post-action:hover {
  color: var(--accent);
  background: rgba(29, 155, 240, 0.12);
}

.post-like:hover,
.post-like.is-liked {
  color: var(--like);
}

.post-like:hover {
  background: rgba(249, 24, 128, 0.1);
}

.post-like.is-liked svg {
  fill: var(--like);
  stroke: var(--like);
}

.post-delete {
  margin-left: auto;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.post-delete:hover {
  color: #ff6b72;
  background: rgba(244, 33, 46, 0.1);
}

.feed-end {
  padding: 22px 16px 28px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.feed-end::before,
.feed-end::after {
  display: none;
}

.feed-footer .btn {
  margin: 12px 16px 20px;
}

/* Right column notices */

.side-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #16181c;
  overflow: hidden;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.side-card-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.side-link {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

.side-link:hover {
  color: var(--accent-strong);
}

.notice-mini {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.notice-mini:last-child {
  border-bottom: 0;
}

.notice-mini:hover {
  background: #1a1d21;
}

.notice-mini-top {
  gap: 6px;
  margin-bottom: 4px;
}

.notice-mini-title {
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.notice-mini:hover .notice-mini-title {
  color: var(--paper-bright);
}

.notice-mini-date {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.side-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Notices page
   -------------------------------------------------------------------------- */

.notices-page {
  padding: 0 0 60px;
  background: #000;
}

.notices-page .shell {
  width: 100%;
}

.page-head {
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.page-head .eyebrow {
  display: none;
}

.page-head h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-head .page-head-note {
  margin-top: 4px;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.page-head .page-head-note .mono {
  display: none;
}

.page-toolbar {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.notice-list {
  max-width: none;
}

.notice-card {
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  border-left: 0;
}

.notice-card.is-pinned {
  padding-left: 16px;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 3px 0 0 var(--accent);
}

.notice-index {
  display: none;
}

.notice-card h2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.notice-body {
  margin-top: 6px;
  color: var(--paper-dim);
  font-size: 15px;
  line-height: 1.55;
}

.notice-side {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0;
}

.notice-side time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Profile
   -------------------------------------------------------------------------- */

.profile-page {
  padding: 0 0 60px;
  background: #000;
}

.profile-page .shell {
  width: 100%;
}

.profile-banner {
  height: 112px;
  border-bottom: 1px solid var(--line);
  background-color: #16181c;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 13px);
}

.profile-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0 12px;
  padding: 0 16px 15px;
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  grid-column: 1;
  grid-row: 1;
  margin-top: -46px;
  width: 88px;
  height: 88px;
  border: 4px solid #000;
  border-radius: 50%;
  background: #000;
  z-index: 1;
}

.profile-avatar .avatar {
  --av-size: 80px;
}

.profile-id {
  grid-column: 2;
  grid-row: 1;
  padding-top: 10px;
}

.profile-kicker {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.profile-id h1 {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.profile-handle {
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
}

.profile-bio {
  margin-top: 10px;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.45;
}

.profile-actions {
  gap: 8px;
  margin-top: 13px;
}

.profile-actions .btn {
  min-height: 32px;
  padding: 0 15px;
  font-size: 13px;
}

.profile-side {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-direction: row;
  padding-top: 15px;
  border: 0;
}

.profile-stats {
  gap: 18px;
}

.profile-stat {
  text-align: left;
}

.profile-stat strong {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.profile-stat span {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.profile-since {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.profile-section-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.profile-section-head h2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.profile-section-head span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.profile-posts .post {
  padding: 12px 16px;
}

/* Post detail */

.post-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 40px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #000;
  min-height: 100vh;
}

.post-page .back-link {
  padding: 14px 16px 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

.post-page .back-link:hover {
  color: var(--paper);
}

.post-detail {
  margin: 10px 0 0;
  padding: 12px 16px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.post-page .post.post-detail {
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 12px 16px;
}

.post-page .post-detail .post-content {
  font-size: 17px;
  line-height: 1.45;
}

.post-page .post-detail .post-image {
  border-radius: 16px;
}

.comments-section {
  padding: 0;
}

.comments-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.comments-head h2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
}

.comments-head span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.comment-form {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.comment-form textarea {
  border-radius: 12px;
  border-color: var(--line);
  background: #16181c;
  font-size: 14px;
}

.comment-form textarea:focus {
  border-color: var(--accent);
}

.comment {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
}

.comment-meta .display-name {
  font-size: 13px;
  font-weight: 700;
}

.comment-meta .handle,
.comment-meta time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.comment-content {
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 1.5;
}

.comment-delete {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.login-prompt {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.login-prompt a {
  color: var(--accent);
}

@media (min-width: 1320px) {
  .post-page {
    margin-left: calc((100% - 978px) / 2);
    margin-right: 0;
  }
}

/* --------------------------------------------------------------------------
   Auth
   -------------------------------------------------------------------------- */

.auth-page {
  min-height: calc(100vh - 56px);
  background: #000;
}

.auth-visual {
  padding: 72px clamp(32px, 6vw, 88px) 54px;
  border-right: 1px solid var(--line);
  background: #000;
}

.auth-visual::after,
.auth-ghost {
  display: none;
}

.auth-visual h1 {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: clamp(44px, 5.6vw, 74px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.055em;
  color: var(--paper-bright);
}

.auth-visual h1 em {
  color: var(--accent);
}

.auth-visual .eyebrow {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.auth-visual .eyebrow::before {
  background: var(--accent);
}

.auth-quote {
  max-width: 380px;
  padding-left: 0;
  border-left: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-quote span {
  margin-top: 8px;
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.auth-panel {
  background: #000;
  padding: 46px 40px;
}

.auth-form {
  width: min(380px, 100%);
}

.auth-form-head {
  margin-bottom: 26px;
}

.auth-form-head .mono {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.auth-form-head h2 {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-form-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.auth-form .btn-block {
  min-height: 44px;
  font-size: 15px;
}

.auth-form .form-field > label .optional {
  display: none;
}

.auth-switch {
  color: var(--muted);
  font-size: 13px;
}

.auth-switch a {
  color: var(--accent);
  border: 0;
}

.auth-fineprint {
  border-top-color: var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.auth-closed {
  border-radius: 12px;
  border-color: var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Messages
   -------------------------------------------------------------------------- */

.messages-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 0 40px;
}

.messages-page .shell {
  width: 100%;
}

.messages-title-row {
  padding: 0 16px 12px;
}

.messages-title-row h1 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.messages-title-row .mono {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.messages-layout {
  border-radius: 16px;
  border-color: var(--line);
  background: #000;
  overflow: hidden;
}

.thread-list {
  background: #000;
}

.thread-list-head {
  background: #000;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.thread-item {
  padding: 12px 14px;
  border-bottom-color: var(--line-soft);
}

.thread-item:hover {
  background: #080808;
}

.thread-item.is-active {
  background: #16181c;
  box-shadow: inset 2px 0 0 var(--accent);
}

.thread-name {
  color: var(--paper-bright);
  font-size: 14px;
  font-weight: 700;
}

.thread-preview {
  color: var(--muted);
  font-size: 13px;
}

.thread-meta time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.thread-unread {
  background: var(--accent);
  font-family: var(--sans);
}

.chat-panel {
  background: #000;
}

.chat-head {
  background: #000;
  border-bottom-color: var(--line);
  padding: 10px 14px;
}

.chat-head-copy strong {
  font-size: 15px;
  font-weight: 700;
}

.chat-head-copy span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.chat-head .text-link {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

.chat-body {
  background: #000;
  padding: 18px 16px;
}

.msg-author {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.msg-bubble {
  border-radius: 18px;
  border-color: var(--line);
  background: #16181c;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}

.msg.is-mine .msg-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.msg-time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0;
}

.chat-day {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.chat-compose {
  background: #000;
  padding: 10px 12px;
}

.chat-compose textarea {
  border-radius: 18px;
  border-color: var(--line);
  background: #16181c;
  font-size: 14px;
}

.chat-compose textarea:focus {
  border-color: var(--accent);
}

.chat-compose .btn {
  border-radius: 999px;
}

.chat-hint {
  background: #000;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0;
}

.chat-composer {
  background: #000;
}

.emoji-picker {
  border-radius: 16px;
  background: #16181c;
  border-color: var(--line);
}

.emoji-picker-head {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.emoji-section-label {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.emoji-item {
  border-radius: 8px;
  font-size: 21px;
}

.emoji-item:hover {
  background: #22262b;
}

.chat-empty {
  color: var(--muted);
}

.chat-empty .chat-empty-mark {
  border-radius: 50%;
  border-color: var(--line);
}

.chat-jump {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */

.admin-page {
  padding: 20px 0 70px;
}

.admin-main,
.admin-panel,
.admin-split > * {
  min-width: 0;
}

.admin-head {
  padding-bottom: 13px;
  border-bottom-color: var(--line);
}

.admin-head h1 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-head p {
  color: var(--muted);
  font-size: 13px;
}

.admin-side-title strong {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
}

.admin-side-title span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.admin-tab {
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.admin-tab span {
  font-family: var(--sans);
  font-size: 10px;
}

.admin-tab:hover {
  background: #16181c;
  color: var(--paper);
}

.admin-tab.is-active {
  border-left-color: var(--accent);
  background: #16181c;
  color: var(--paper-bright);
}

.admin-side {
  border-right-color: var(--line);
}

.metric {
  background: #000;
}

.metric-grid,
.admin-panel {
  border-color: var(--line);
  border-radius: 0;
  background: #000;
}

.metric-label,
.metric-note {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.metric-value {
  font-family: var(--sans);
  font-weight: 800;
}

.admin-panel-head {
  border-bottom-color: var(--line);
  padding: 12px 14px;
}

.admin-panel-head h2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
}

.data-table th {
  background: #000;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.data-table td {
  border-bottom-color: var(--line-soft);
  font-size: 12px;
}

.data-table tbody tr:hover td {
  background: #080808;
}

.admin-toolbar {
  padding: 12px 0;
}

.admin-search input {
  border-radius: 999px;
  height: 36px;
  padding: 0 14px;
  border-color: var(--line);
  background: #16181c;
}

.admin-search .btn {
  height: 36px;
}

.row-action {
  color: var(--accent);
  font-size: 11px;
}

.row-action.is-danger {
  color: #ff6b72;
}

.admin-note {
  border-left: 0;
  border-radius: 8px;
  background: #16181c;
  color: var(--muted);
  font-size: 12px;
}

.admin-notice-row {
  padding: 14px 16px;
}

.admin-notice-top h3 {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
}

.admin-notice-body {
  font-size: 13px;
}

.admin-notice-foot {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.log-row {
  font-size: 11px;
}

.log-action {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0;
}

.log-detail {
  color: var(--paper-dim);
}

.log-time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
}

.setting-toggle {
  border-radius: 10px;
  background: #000;
}

/* --------------------------------------------------------------------------
   Modal, toast, footer, empty states
   -------------------------------------------------------------------------- */

.modal {
  border-radius: 16px;
  border-color: var(--line);
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 22px 60px rgba(0, 0, 0, 0.65);
}

.modal-head {
  border-bottom-color: var(--line);
  padding: 16px 18px;
}

.modal-head h2 {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-head p {
  color: var(--muted);
  font-size: 12px;
}

.modal-close {
  border: 0;
  border-radius: 999px;
  color: var(--muted);
}

.modal-close:hover {
  background: #181818;
  color: var(--paper);
}

.modal-body {
  padding: 18px;
}

.modal-body p {
  color: var(--paper-dim);
  font-size: 14px;
}

.modal-foot {
  border-top-color: var(--line);
  padding: 12px 18px;
}

.avatar-editor {
  border-bottom-color: var(--line-soft);
}

.avatar-editor-actions .text-btn {
  color: var(--accent);
}

.temp-password {
  border-color: var(--accent);
  border-radius: 8px;
  background: rgba(29, 155, 240, 0.1);
}

.temp-password code {
  font-family: var(--mono);
}

.toast {
  border-radius: 8px;
  border-color: var(--line);
  border-left: 2px solid var(--accent);
  background: #16181c;
  color: var(--paper);
  font-size: 13px;
}

.toast.is-success {
  border-left-color: var(--moss);
}

.toast.is-error {
  border-left-color: var(--danger);
}

.empty-state {
  border-bottom-color: var(--line);
}

.empty-state h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
}

.empty-state p {
  color: var(--muted);
  font-size: 14px;
}

.loading-block {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

.error-panel {
  border-radius: 16px;
  border-color: var(--line);
  background: #000;
}

.error-panel h1 {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 800;
}

.site-foot {
  border-top-color: var(--line);
  background: #000;
  padding: 26px 0 32px;
  margin-top: 0;
}

.foot-brand strong {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
}

.foot-brand p,
.foot-meta,
.foot-rule {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.foot-rule {
  border-top-color: var(--line);
}

/* --------------------------------------------------------------------------
   Responsive feed / page frames
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .home-page {
    padding: 0 0 30px;
  }

  .home-shell {
    display: block;
    width: min(600px, calc(100% - 32px));
    margin: 0 auto;
  }

  .side-column {
    display: none;
  }

  .feed-column {
    width: 100%;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .notices-page,
  .profile-page {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: #000;
  }

  .notices-page {
    padding-bottom: 40px;
  }

  .messages-page {
    max-width: 1000px;
    padding: 14px 16px 30px;
  }

  .messages-page .messages-title-row {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  #site-header {
    background: #000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-masthead {
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .nav-post,
  .rail-footer {
    display: none;
  }

  .site-nav {
    background: #000;
    border-top-color: var(--line);
  }

  .nav-link {
    color: var(--muted);
  }

  .nav-link svg {
    width: 22px;
    height: 22px;
  }

  .nav-link.is-active {
    color: var(--paper-bright);
    font-weight: 700;
  }

  .nav-link.is-active::after {
    display: none;
  }

  .nav-link .nav-badge {
    top: 7px;
    background: var(--accent);
  }

  .login-link {
    background: var(--paper-bright);
    color: #000;
  }

  .home-page {
    padding: 0 0 24px;
  }

  .home-page .shell {
    width: 100%;
    margin: 0;
  }

  .feed-column {
    border-left: 0;
    border-right: 0;
  }

  .feed-topbar {
    top: calc(56px + env(safe-area-inset-top, 0px));
    padding: 12px 16px 10px;
  }

  .feed-title-row h1 {
    font-size: 19px;
  }

  .feed-topbar-note {
    font-size: 11px;
  }

  .feed-tab {
    min-height: 46px;
    padding: 11px 0;
  }

  .feed-tab.is-active::after {
    width: 48px;
    height: 3px;
  }

  .join-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .join-card p {
    font-size: 13px;
  }

  .composer-main {
    padding: 12px 16px 2px;
  }

  .composer-main textarea {
    font-size: 18px;
  }

  .composer-foot {
    padding: 5px 16px 10px 68px;
  }

  .composer-submit {
    min-height: 32px;
  }

  .post {
    padding: 12px 16px;
  }

  .post-content {
    font-size: 15px;
  }

  .post-head .post-time {
    font-size: 14px;
  }

  .post-actions {
    margin-top: 8px;
  }

  .post-action {
    min-height: 32px;
    padding: 6px 8px;
  }

  .post-delete {
    min-height: 32px;
  }

  .feed-end {
    padding-bottom: 22px;
  }

  .notices-page,
  .profile-page {
    max-width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .post-page {
    max-width: 100%;
    margin: 0;
    padding: 0 0 20px;
    border-left: 0;
    border-right: 0;
  }

  .notices-page {
    padding-bottom: 20px;
  }

  .page-head {
    padding: 14px 16px;
  }

  .page-head h1 {
    font-size: 19px;
  }

  .page-toolbar {
    padding: 10px 16px;
  }

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

  .notice-card h2 {
    font-size: 16px;
  }

  .notice-body {
    font-size: 14.5px;
  }

  .profile-banner {
    height: 92px;
  }

  .profile-head {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 0 16px 14px;
    gap: 0 10px;
  }

  .profile-avatar {
    width: 76px;
    height: 76px;
    margin-top: -40px;
    border-width: 3px;
  }

  .profile-avatar .avatar {
    --av-size: 70px;
  }

  .profile-id {
    padding-top: 9px;
  }

  .profile-id h1 {
    font-size: 19px;
  }

  .profile-bio {
    font-size: 14px;
  }

  .profile-actions .btn {
    min-height: 32px;
  }

  .profile-side {
    padding-top: 12px;
  }

  .profile-section-head {
    padding: 11px 16px;
  }

  .profile-posts .post {
    padding: 12px 16px;
  }

  .messages-page {
    padding: 12px 0 0;
  }

  .messages-page .shell {
    width: 100%;
  }

  .messages-layout {
    height: calc(100dvh - 188px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    min-height: 380px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-inline: 0;
  }

  .messages-page .messages-title-row {
    padding: 0 16px 10px;
  }

  .chat-compose {
    padding: 8px 10px;
  }

  .chat-compose textarea {
    font-size: 16px;
  }

  .emoji-picker {
    left: 8px;
    width: calc(100% - 16px);
  }

  .site-foot {
    padding: 24px 16px 30px;
  }

  .foot-inner {
    flex-direction: column;
    gap: 14px;
  }

  .foot-brand strong {
    font-size: 15px;
  }

  .foot-meta {
    gap: 12px;
  }

  .foot-rule {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 18px;
  }

  .auth-page {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 186px;
    padding: 30px 20px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-visual h1 {
    margin-top: 12px;
    font-size: 38px;
  }

  .auth-quote {
    font-size: 13px;
  }

  .auth-panel {
    padding: 28px 20px 48px;
  }

  .auth-form-head h2 {
    font-size: 27px;
  }

  .admin-page {
    padding-top: 16px;
  }

  .admin-shell {
    gap: 18px;
  }

  .admin-head h1 {
    font-size: 20px;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  .admin-tab {
    width: 100%;
    min-height: 34px;
    padding: 7px 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
  }

  .admin-tab.is-active {
    border-color: var(--accent);
    background: rgba(29, 155, 240, 0.1);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal {
    border-radius: 16px;
  }
}

/* --------------------------------------------------------------------------
   Comment composer, comment images, image lightbox
   -------------------------------------------------------------------------- */

.comment-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comment-form .avatar {
  margin-top: 2px;
}

.comment-compose {
  position: relative;
  flex: 1;
  min-width: 0;
}

.comment-form textarea {
  width: 100%;
  min-height: 58px;
  max-height: 120px;
  padding: 10px 12px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #16181c;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.55;
  outline: 0;
}

.comment-form textarea:focus {
  border-color: var(--accent);
}

.comment-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 7px;
}

.comment-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}

.comment-tool:hover {
  background: rgba(29, 155, 240, 0.12);
  color: var(--accent);
}

.comment-tool[aria-expanded="true"] {
  background: rgba(29, 155, 240, 0.14);
}

.comment-count {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.comment-count.is-near {
  color: #ffb020;
}

.comment-submit {
  min-height: 32px;
  margin-left: 6px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.comment-submit:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.comment-submit:disabled {
  opacity: 0.4;
}

.comment-preview {
  position: relative;
  display: inline-block;
  max-width: min(240px, 100%);
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
}

.comment-preview[hidden] {
  display: none;
}

.comment-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.comment-preview button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}

.comment-emoji-picker {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  width: min(330px, 100%);
  max-height: min(300px, 52vh);
}

.comment-emoji-recents[hidden] {
  display: none;
}

.comment-emoji-recents .emoji-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.comment-image {
  display: inline-block;
  width: auto;
  max-width: min(340px, 100%);
  margin-top: 8px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: zoom-in;
}

.comment-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.2, 1.1, 0.3, 1);
}

.comment-image:hover img {
  transform: scale(1.025);
}

.comment-image:active img {
  transform: scale(0.99);
}

.comment-main {
  min-width: 0;
}

/* Fullscreen image viewer */

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: #000;
  animation: lightbox-in 0.18s ease both;
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.lightbox-hint {
  color: var(--muted);
  font-size: 12px;
}

.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.lightbox-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #16181c;
  color: var(--paper);
  font-size: 20px;
  line-height: 1;
}

.lightbox-btn:hover {
  background: #22262b;
}

.lightbox-scale {
  width: 58px;
  border-radius: 999px;
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: 11px;
}

.lightbox-close {
  margin-left: 2px;
}

.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.lightbox-stage.is-zoomed {
  cursor: grab;
}

.lightbox-stage.is-dragging {
  cursor: grabbing;
}

.lightbox-image {
  display: block;
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 82px);
  object-fit: contain;
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: opacity 0.18s ease;
  will-change: transform;
}

.image-lightbox.is-loaded .lightbox-image {
  opacity: 1;
}

@media (max-width: 760px) {
  .comment-form {
    gap: 0;
  }

  .comment-form textarea {
    font-size: 16px;
  }

  .comment-toolbar {
    gap: 1px;
  }

  .comment-tool {
    font-size: 11px;
  }

  .comment-count {
    font-size: 10px;
  }

  .comment-image {
    max-width: 100%;
  }

  .comment-emoji-picker {
    width: 100%;
    max-height: min(290px, 45vh);
  }

  .lightbox-bar {
    min-height: 52px;
    padding: 0 10px;
  }

  .lightbox-hint {
    display: none;
  }

  .lightbox-tools {
    width: 100%;
  }

  .lightbox-btn {
    width: 36px;
    height: 36px;
  }

  .lightbox-close {
    margin-left: auto;
  }

  .lightbox-image {
    max-width: 100vw;
    max-height: calc(100dvh - 64px);
  }
}

@media (max-width: 360px) {
  .brand-copy strong {
    font-size: 16px;
  }

  .feed-topbar-note {
    display: none;
  }

  .profile-side {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}