@charset "UTF-8";
:root {
  --bg: #12100d;
  --panel: #1c1915;
  --panel-2: #242018;
  --line: rgba(255, 244, 222, 0.12);
  --text: #f6efe2;
  --muted: #b8aa95;
  --soft: #877969;
  --red: #d84a63;
  --teal: #35a47c;
  --gold: #c8973f;
  --ink: #0c0b09;
  --good: #56bf88;
  --bad: #e06a72;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(216, 74, 99, 0.14), transparent 28rem),
    linear-gradient(135deg, #12100d 0%, #191510 52%, #10120f 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

select {
  color-scheme: dark;
}

select option {
  color: var(--text);
  background: #171410;
}

button {
  cursor: pointer;
}

.modal-panel {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #252019, #181510);
  box-shadow: var(--shadow);
  padding: 28px;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  padding: 22px;
  box-sizing: border-box;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(18, 16, 13, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 26px;
  color: var(--text);
  text-decoration: none;
}

.brand-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.brand-logo,
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(216, 74, 99, 0.42);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(216, 74, 99, 0.28), rgba(53, 164, 124, 0.18));
  font-weight: 900;
}

.brand-logo {
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-logo span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.side-title,
.result-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.nav-item,
.ghost,
.secondary,
.primary,
.segment-btn,
.mobile-menu,
.modal-close,
.tag-chip,
.hash,
.like,
.dislike {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 244, 222, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-item {
  width: 100%;
  padding: 0 14px;
  text-align: left;
  justify-content: flex-start;
  text-decoration: none;
}

.admin-link,
.admin-quick {
  border-color: rgba(200, 151, 63, 0.44);
  color: #ffe1a7;
  background: rgba(200, 151, 63, 0.12);
}

.admin-quick {
  flex: 0 0 auto;
  padding: 0 14px;
  text-decoration: none;
}

.nav-item:hover,
.ghost:hover,
.secondary:hover,
.segment-btn:hover,
.tag-chip:hover,
.hash:hover,
.mobile-menu:hover {
  border-color: rgba(246, 239, 226, 0.28);
  background: rgba(255, 244, 222, 0.08);
}

.nav-item.active,
.segment-btn.active,
.tag-chip.active {
  border-color: rgba(216, 74, 99, 0.55);
  background: rgba(216, 74, 99, 0.16);
}

.primary {
  padding: 0 16px;
  border-color: transparent;
  background: var(--red);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.primary:hover {
  transform: translateY(-1px);
  background: #e0526c;
}

.secondary,
.ghost {
  padding: 0 16px;
  text-decoration: none;
}

.wide {
  width: 100%;
}

.side-block {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.language-block {
  display: grid;
  gap: 9px;
}

.language-menu {
  position: relative;
}

.language-toggle,
.language-option {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  color: var(--text);
  background: rgba(255, 244, 222, 0.06);
  text-align: left;
}

.language-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.language-toggle::after {
  content: "⌄";
  color: var(--muted);
  font-weight: 900;
}

.language-toggle:focus,
.language-option:focus {
  border-color: rgba(53, 164, 124, 0.68);
}

.language-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  padding: 6px;
  border: 1px solid rgba(53, 164, 124, 0.45);
  border-radius: 8px;
  background: #171410;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.language-menu.open .language-options {
  display: grid;
  gap: 4px;
}

.language-option {
  border-color: transparent;
  background: transparent;
}

.language-option:hover,
.language-option.active {
  background: rgba(216, 74, 99, 0.18);
  color: var(--text);
}

.new-feed {
  display: grid;
  gap: 10px;
}

.new-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  padding: 8px;
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 244, 222, 0.04);
}

button.new-item:hover {
  background: rgba(255, 244, 222, 0.08);
}

.mini-art {
  display: block;
  overflow: hidden;
  width: 48px;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  background-color: #15120f;
}

.mini-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.new-item strong,
.new-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-item small,
.compact-note p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 34px) 52px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0 0 18px;
  background: linear-gradient(180deg, rgba(18, 16, 13, 0.96) 72%, transparent);
  backdrop-filter: blur(8px);
}

.mobile-menu {
  display: none;
  min-width: 58px;
  padding: 0 12px;
}

.search-wrap {
  position: relative;
}

.topbar .ghost {
  justify-self: end;
  min-width: 116px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--gold);
  transform: translateY(-50%);
  font-weight: 900;
}

.search-wrap input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.chat-form input,
.modal input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 244, 222, 0.06);
  color: var(--text);
}

.admin-form select {
  appearance: none;
  padding-right: 38px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 19px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    rgba(255, 244, 222, 0.06);
}

.search-wrap input {
  padding: 0 16px 0 38px;
}

.search-wrap input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.chat-form input:focus,
.modal input:focus {
  border-color: rgba(53, 164, 124, 0.68);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  min-height: 230px;
  margin-bottom: 28px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(18, 16, 13, 0.86), rgba(18, 16, 13, 0.35)),
    linear-gradient(135deg, rgba(216, 74, 99, 0.34), transparent 38%),
    repeating-linear-gradient(45deg, rgba(255, 244, 222, 0.07) 0 1px, transparent 1px 16px),
    linear-gradient(145deg, #352d21, #10251e 65%, #221812);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin: 28px 0 16px;
  scroll-margin-top: 92px;
}

.category-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card,
.post-card,
.best-layout section,
.chat-panel,
.admin-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(28, 25, 21, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.category-card {
  width: 100%;
  min-height: 202px;
  overflow: hidden;
  text-align: left;
  display: block;
}

.cat-art,
.post-art {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #463427, #12392f);
  background-position: center;
  background-size: cover;
}

.post-art.has-image::before,
.post-art.has-image::after,
.cat-art.has-image::before,
.cat-art.has-image::after,
.detail-art.has-image::before,
.detail-art.has-image::after {
  display: none;
}

.cat-art {
  aspect-ratio: 4 / 3;
  height: auto;
}

.cat-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cat-art::before,
.post-art::before,
.cat-art::after,
.post-art::after {
  content: "";
  position: absolute;
  inset: auto;
}

.cat-art::before,
.post-art::before {
  right: 14%;
  bottom: -12%;
  width: 35%;
  aspect-ratio: 0.74;
  border-radius: 48% 48% 8px 8px;
  background: rgba(246, 239, 226, 0.28);
  filter: blur(0.2px);
}

.cat-art::after,
.post-art::after {
  left: -10%;
  top: 18%;
  width: 52%;
  height: 46%;
  border-radius: 999px;
  background: rgba(216, 74, 99, 0.26);
  transform: rotate(-16deg);
}

.art-a { background: linear-gradient(145deg, #4d3130, #15372f 62%, #0f0d0b); }
.art-b { background: linear-gradient(145deg, #2d4435, #4b3425 56%, #151310); }
.art-c { background: linear-gradient(145deg, #564022, #1e332e 62%, #15110d); }
.art-d { background: linear-gradient(145deg, #2d2a23, #743846 58%, #10130f); }
.art-e { background: linear-gradient(145deg, #223e36, #81513a 58%, #11100d); }
.art-f { background: linear-gradient(145deg, #463427, #2d5544 58%, #11100d); }

.category-body,
.post-body {
  padding: 15px;
}

.category-card h3,
.post-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.04rem;
}

.category-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.category-card p {
  min-height: 62px;
  font-size: 0.9rem;
}

.category-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pill,
.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255, 244, 222, 0.08);
}

.status.alert { background: rgba(216, 74, 99, 0.2); color: #ffd4dc; }
.status.rare { background: rgba(200, 151, 63, 0.2); color: #ffe1a7; }
.status.clean { background: rgba(53, 164, 124, 0.18); color: #bcf1da; }

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

.post-card {
  display: flex;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  min-width: 0;
}

.post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.post-art {
  height: 170px;
}

.art-link {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.art-link:hover::before,
.art-link:focus-visible::before {
  background: rgba(246, 239, 226, 0.34);
}

.art-link:focus-visible {
  outline: 2px solid rgba(53, 164, 124, 0.72);
  outline-offset: -2px;
}

.search-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  max-height: none;
}

.search-preview.has-image {
  background-color: #15120f;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.post-topline,
.post-actions,
.post-rating,
.hash-row,
.chip-row,
.segment,
.rating-question {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.chip-row {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 239, 226, 0.22) transparent;
}

.chip-row::-webkit-scrollbar {
  height: 7px;
}

.chip-row::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(246, 239, 226, 0.2);
}

.post-topline {
  justify-content: space-between;
  margin-bottom: 10px;
}

.post-actions {
  margin-top: auto;
  padding-top: 14px;
}

.post-actions .primary,
.post-actions .secondary {
  flex: 1 1 134px;
}

.favorite-star {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 244, 222, 0.22);
  border-radius: 50%;
  color: rgba(246, 239, 226, 0.78);
  background: rgba(12, 11, 9, 0.58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.favorite-star span {
  font-size: 1.15rem;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 220ms cubic-bezier(.2, 1.7, .35, 1);
}

.favorite-star:hover,
.favorite-star:focus-visible {
  border-color: rgba(200, 151, 63, 0.74);
  color: #ffe1a7;
  background: rgba(24, 19, 13, 0.82);
  transform: translateY(-1px) scale(1.04);
}

.favorite-star.active {
  border-color: rgba(200, 151, 63, 0.84);
  color: #ffd66f;
  background: rgba(200, 151, 63, 0.2);
}

.favorite-star.active span {
  animation: favorite-pop 320ms cubic-bezier(.2, 1.7, .35, 1);
}

@keyframes favorite-pop {
  0% { transform: translateY(-1px) scale(0.6) rotate(-16deg); }
  65% { transform: translateY(-1px) scale(1.26) rotate(8deg); }
  100% { transform: translateY(-1px) scale(1) rotate(0); }
}

.post-rating {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  justify-content: space-between;
}

.hash-row {
  margin-top: 12px;
}

.hash,
.tag-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.tag-chip {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.tag-chip.active {
  border-color: rgba(216, 74, 99, 0.58);
  color: var(--text);
  background: rgba(216, 74, 99, 0.16);
}

.tag-chip span {
  color: rgba(246, 239, 226, 0.58);
  font-size: 0.74rem;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 4px;
}

.page-btn {
  min-width: 42px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 244, 222, 0.04);
}

.page-btn:hover {
  border-color: rgba(246, 239, 226, 0.28);
  background: rgba(255, 244, 222, 0.08);
}

.page-btn.active {
  border-color: rgba(216, 74, 99, 0.55);
  background: rgba(216, 74, 99, 0.16);
}

.page-btn:disabled {
  cursor: default;
  opacity: 0.48;
}

.back-button {
  margin: 12px 0 18px;
}

.post-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.detail-media,
.detail-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(28, 25, 21, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.detail-media {
  position: relative;
  display: grid;
  gap: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.detail-body {
  padding: 20px;
}

.detail-art {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.detail-art:not(.has-image) {
  min-height: clamp(260px, 35vw, 430px);
}

.detail-art.has-image {
  background: none;
}

.detail-image {
  display: block;
  width: 100%;
  height: auto;
}

.detail-art::before,
.detail-art::after {
  content: "";
  position: absolute;
}

.detail-art::before {
  right: 14%;
  bottom: -12%;
  width: 32%;
  aspect-ratio: 0.74;
  border-radius: 48% 48% 8px 8px;
  background: rgba(246, 239, 226, 0.28);
}

.detail-art::after {
  left: -7%;
  top: 18%;
  width: 48%;
  height: 40%;
  border-radius: 999px;
  background: rgba(216, 74, 99, 0.25);
  transform: rotate(-16deg);
}

.detail-art-secondary {
  filter: saturate(1.08) hue-rotate(12deg);
}

.detail-art-secondary:not(.has-image) {
  min-height: clamp(190px, 24vw, 310px);
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  align-items: stretch;
}

.guide-frame-wrap {
  margin-top: 10px;
  padding-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(28, 25, 21, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.guide-grid .category-card.active {
  border-color: rgba(216, 74, 99, 0.55);
  background: rgba(216, 74, 99, 0.1);
}

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

.guide-grid .category-card .category-meta {
  margin-top: 12px;
}

.guide-frame-wrap[hidden] {
  display: none !important;
}

.guide-frame {
  display: block;
  width: 100%;
  min-height: 1600px;
  border: 0;
  background: transparent;
}

.detail-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(28, 25, 21, 0.72);
}

.compact-head {
  margin-bottom: 12px;
}

.compact-head h3 {
  margin: 0;
}

.comment-list {
  max-height: 420px;
  margin-bottom: 12px;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.meta-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 244, 222, 0.045);
}

.meta-item span,
.meta-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-item span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-item strong {
  color: var(--text);
  font-size: 0.94rem;
}

.detail-actions .primary,
.detail-actions .secondary {
  min-height: 46px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-actions svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.detail-rating {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.trade-exchange,
.site-footer {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.trade-grid,
.ucp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.trade-card,
.trade-form,
.ucp-card,
.trade-empty {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(28, 25, 21, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.trade-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
}

.trade-banner {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 1;
  overflow: hidden;
  background: #15120f;
}

.trade-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.trade-body,
.trade-form,
.ucp-card,
.trade-empty { padding: 14px; }

.trade-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.trade-body h3 { margin: 0 0 8px; }

.trade-body p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.trade-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.trade-actions .primary {
  width: 100%;
}

.ucp-panel { display: grid; gap: 14px; }

.trade-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trade-form {
  display: grid;
  gap: 12px;
}

.trade-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.trade-form input,
.trade-form textarea,
.trade-embed textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  color: var(--text);
  background: rgba(255, 244, 222, 0.06);
}

.trade-form textarea,
.trade-embed textarea { resize: vertical; }

.trade-embed {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.trade-embed span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-embed code {
  overflow-wrap: anywhere;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 244, 222, 0.06);
  color: #ffe0a5;
}

.site-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  color: var(--muted);
}

.site-footer strong,
.site-footer span { display: block; }

.site-footer strong { color: var(--text); }

body.content-warning-active {
  overflow-x: hidden;
}

body.content-warning-active .app-shell {
  filter: blur(18px) saturate(0.85);
  transition: filter 0.55s ease;
}

.content-warning-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 22px;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 18%, rgba(255, 205, 144, 0.2), rgba(34, 18, 30, 0.78) 40%, rgba(14, 9, 18, 0.93) 100%);
  backdrop-filter: blur(7px);
  animation: warningFade 0.45s ease forwards;
}

.content-warning-overlay.is-leaving {
  opacity: 0;
  transition: opacity 0.38s ease;
}

.content-warning-modal {
  width: min(620px, 100%);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: clamp(22px, 5vw, 30px);
  color: #f8eefe;
  text-align: center;
  background: linear-gradient(180deg, rgba(39, 27, 49, 0.97), rgba(21, 16, 29, 0.99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: warningCard 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.content-warning-mark {
  display: inline-grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #2f1730;
  background: linear-gradient(180deg, #ffd08c, #ff9fc5);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.content-warning-modal h2 {
  margin-bottom: 10px;
  color: #fff3f8;
}

.content-warning-modal p {
  max-width: 470px;
  margin: 0 auto 18px;
  color: #ead8ef;
  line-height: 1.55;
}

.content-warning-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.content-warning-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content-warning-pill.scat,
.content-warning-pill.period {
  color: #ffd29e;
  background: rgba(255, 178, 92, 0.16);
}

.content-warning-close {
  min-width: 190px;
  min-height: 46px;
  margin-bottom: 12px;
  color: #2f1730;
  background: linear-gradient(180deg, #ffd08c, #ff9fc5);
}

.content-warning-modal > span:last-child {
  display: block;
  color: rgba(255, 231, 249, 0.64);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes warningFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes warningCard {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.best-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.best-layout section,
.chat-panel,
.admin-form {
  padding: 18px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  padding: 12px;
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 244, 222, 0.05);
}

.rank-media {
  display: grid;
  grid-template-columns: 32px 48px;
  gap: 10px;
  align-items: center;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  width: 48px;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  background-position: center;
  background-size: cover;
}

.rank-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rank-item:hover {
  background: rgba(255, 244, 222, 0.08);
}

.rank-num {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(200, 151, 63, 0.2);
  color: #ffe0a5;
  font-weight: 900;
}

.messages {
  display: grid;
  gap: 12px;
  min-height: 360px;
  max-height: 50vh;
  overflow: auto;
  padding-right: 6px;
}

.message {
  max-width: min(620px, 92%);
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 244, 222, 0.07);
}

.message.me {
  justify-self: end;
  background: rgba(53, 164, 124, 0.17);
}

.message strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.82rem;
  color: var(--gold);
}

.message small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.admin-form {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.admin-form label,
.modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.modal label.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal label.check-line input {
  width: auto;
  min-height: 0;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.modal input {
  padding: 12px;
}

.admin-form textarea {
  min-height: 160px;
  resize: vertical;
}

.form-status,
.copy-state {
  min-height: 24px;
  color: var(--muted);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.modal {
  width: min(520px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(12, 11, 9, 0.72);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  margin: auto;
  display: grid;
  gap: 14px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  min-height: 36px;
  font-size: 1.4rem;
  line-height: 1;
}

.decrypt-box {
  display: grid;
  min-height: 76px;
  place-items: center;
  margin: 18px 0 10px;
  border: 1px solid rgba(200, 151, 63, 0.3);
  border-radius: 8px;
  background: #100f0d;
  color: #ffe0a5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.35rem, 5vw, 2.15rem);
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}

.decrypt-box.decoding {
  animation: scan 650ms ease both;
}

@keyframes scan {
  0% { box-shadow: inset 0 0 0 rgba(200, 151, 63, 0); filter: blur(2px); }
  45% { box-shadow: inset 0 -42px 34px rgba(200, 151, 63, 0.08); filter: blur(0); }
  100% { box-shadow: inset 0 0 0 rgba(200, 151, 63, 0); }
}

.rating-question {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rating-question span {
  margin-right: auto;
  color: var(--muted);
  font-weight: 800;
}

.like,
.dislike {
  min-height: 36px;
  padding: 0 12px;
}

.like:hover { border-color: rgba(86, 191, 136, 0.6); color: #c9f4dc; }
.dislike:hover { border-color: rgba(224, 106, 114, 0.6); color: #ffd0d4; }

body.menu-open .sidebar {
  transform: translateX(0);
}

@media (max-width: 1120px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 840px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: block;
    width: min(292px, calc(100vw - 44px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.45);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .main {
    padding-bottom: 34px;
  }

  .hero-panel,
  .topbar,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

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

  .topbar .ghost {
    grid-column: 1 / -1;
  }

  .best-layout {
    grid-template-columns: 1fr;
  }

  .post-detail-shell {
    grid-template-columns: 1fr;
  }

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

  .trade-grid,
  .ucp-grid,
  .trade-stat-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    align-items: start;
  }

}

@media (max-width: 620px) {
  .category-grid,
  .guide-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .segment {
    width: 100%;
  }

  .segment-btn {
    flex: 1;
  }

  .hero-panel {
    min-height: 250px;
  }

  .post-art {
    height: 210px;
  }

  .search-preview {
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

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