:root {
  --bg: #101916;
  --bg-soft: #17231f;
  --panel: #f4f1e8;
  --panel-strong: #fffaf0;
  --ink: #17201b;
  --muted: #607068;
  --white: #f8fbf7;
  --green: #62c66d;
  --green-deep: #24784d;
  --cyan: #70d6dc;
  --gold: #e7b94f;
  --stone: #8d9691;
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 60px rgba(6, 12, 9, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.account-page {
  background: var(--panel);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(10, 16, 14, 0.82), rgba(10, 16, 14, 0));
}

.account-header {
  position: sticky;
  background: #101916;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  background:
    url("assets/logo/logo.png") center / cover no-repeat,
    url("assets/logo/logo.jpg") center / cover no-repeat,
    linear-gradient(135deg, transparent 0 34%, rgba(255, 255, 255, 0.35) 35% 48%, transparent 49%),
    linear-gradient(135deg, var(--green), var(--cyan));
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.22);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  font-size: 0.92rem;
  font-weight: 700;
}

.main-nav a,
.nav-account {
  opacity: 0.86;
}

.main-nav a:hover,
.nav-account:hover {
  opacity: 1;
}

.nav-account,
.text-button,
.auth-close {
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav-account {
  padding: 0;
  font-weight: 700;
}

.nav-dropdown {
  position: relative;
}

.nav-account::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.18em) rotate(45deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 168px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(16, 25, 22, 0.98);
  box-shadow: 0 18px 44px rgba(6, 12, 9, 0.32);
  display: grid;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  border-radius: 6px;
  padding: 9px 10px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 16, 12, 0.92) 0%, rgba(8, 16, 12, 0.68) 42%, rgba(8, 16, 12, 0.08) 100%),
    linear-gradient(0deg, rgba(16, 25, 22, 1) 0%, rgba(16, 25, 22, 0) 22%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding-top: 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(3.1rem, 8.4vw, 7.2rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 580px;
  margin: 24px 0 0;
  color: rgba(248, 251, 247, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
  font: inherit;
  cursor: pointer;
}

.button-primary {
  color: #0f1b15;
  background: var(--green);
  box-shadow: 0 14px 34px rgba(98, 198, 109, 0.3);
}

.button-secondary {
  color: var(--white);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.dark-button {
  color: var(--ink);
  border-color: rgba(23, 32, 27, 0.16);
  background: #f4f1e8;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.stats-band div {
  padding: 24px clamp(18px, 5vw, 56px);
  color: var(--white);
  background: #101916;
}

.stats-band strong,
.stats-band span {
  display: block;
}

.stats-band strong {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.stats-band span {
  margin-top: 7px;
  color: rgba(248, 251, 247, 0.64);
  font-weight: 650;
}

.section,
.showcase,
.download-section {
  padding: clamp(72px, 10vw, 132px) clamp(18px, 5vw, 72px);
}

.section {
  background: var(--panel);
}

.section-heading {
  width: min(860px, 100%);
  margin-bottom: 34px;
}

.section-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.feature-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid rgba(23, 32, 27, 0.11);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 12px 30px rgba(23, 32, 27, 0.06);
}

.feature-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.stat-card {
  min-height: 210px;
}

.stat-card strong {
  display: block;
  margin: 0 0 6px;
  font-size: clamp(2.4rem, 4.6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.card-icon {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 26px;
  border: 2px solid rgba(23, 32, 27, 0.22);
  box-shadow: 6px 6px 0 rgba(23, 32, 27, 0.12);
}

.card-icon-blue {
  background: var(--cyan);
}

.card-icon-green {
  background: var(--green);
}

.card-icon-gold {
  background: var(--gold);
}

.card-icon-stone {
  background: var(--stone);
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(112, 214, 220, 0.14), transparent 34%),
    #101916;
}

.showcase-copy p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(248, 251, 247, 0.72);
  font-size: 1.08rem;
}

.clean-home-flow {
  align-items: stretch;
}

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

.home-flow-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(248, 251, 247, 0.12);
  border-radius: 8px;
  background: rgba(248, 251, 247, 0.06);
}

.home-flow-list span {
  grid-row: span 2;
  color: var(--cyan);
  font-weight: 950;
}

.home-flow-list strong {
  color: var(--white);
  font-size: 1.04rem;
}

.home-flow-list p {
  margin: 0;
  color: rgba(248, 251, 247, 0.7);
}

.build-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.build-toolbar {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.build-toolbar span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cyan);
}

.build-toolbar span:nth-child(2) {
  background: var(--green);
}

.build-toolbar span:nth-child(3) {
  background: var(--gold);
}

.block-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: clamp(18px, 4vw, 36px);
  aspect-ratio: 1.35;
}

.block-grid span {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38%),
    #6d746f;
}

.block-grid span:nth-child(2n) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 38%),
    #9b764c;
}

.block-grid span:nth-child(5n),
.block-grid span:nth-child(7),
.block-grid span:nth-child(18) {
  background: rgba(112, 214, 220, 0.2);
  border-color: rgba(112, 214, 220, 0.72);
  box-shadow: inset 0 0 0 2px rgba(112, 214, 220, 0.18), 0 0 18px rgba(112, 214, 220, 0.16);
}

.install-section {
  background: #fffaf0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.steps article {
  padding: 26px;
  border-top: 4px solid var(--green-deep);
  background: #f4f1e8;
}

.steps span {
  display: block;
  margin-bottom: 34px;
  color: var(--green-deep);
  font-weight: 900;
}

.steps p {
  margin: 10px 0 0;
  color: var(--muted);
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  color: var(--white);
  background: linear-gradient(135deg, #18231f, #0f1714);
}

.download-copy p:not(.eyebrow) {
  color: rgba(248, 251, 247, 0.7);
  font-size: 1.08rem;
}

.download-actions {
  display: grid;
  gap: 12px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, background 160ms ease;
}

.download-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
}

.download-card span {
  color: rgba(248, 251, 247, 0.72);
  font-weight: 750;
}

.download-card strong {
  color: var(--green);
}

.library-section {
  background: #eef5ef;
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.account-panel {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(23, 32, 27, 0.08);
}

.account-empty p {
  margin: 12px 0 24px;
  color: var(--muted);
}

.account-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
}

.account-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-topline strong {
  display: block;
  margin-top: 3px;
  font-size: 1.35rem;
}

.text-button {
  color: var(--green-deep);
  font-weight: 850;
}

.auth-helper {
  width: fit-content;
  color: var(--green-deep);
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
}

.auth-helper:hover {
  text-decoration: underline;
}

.library-form,
.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.library-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid rgba(23, 32, 27, 0.18);
  border-radius: 8px;
  background: #fffdf7;
  font: inherit;
}

textarea {
  min-height: 132px;
  padding-top: 12px;
  resize: vertical;
}

select {
  cursor: pointer;
}

input[type="file"] {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  background: #fffdf7;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(112, 214, 220, 0.34);
  border-color: var(--green-deep);
}

.library-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

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

.library-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(23, 32, 27, 0.11);
  border-radius: 8px;
  background: #f4f1e8;
  font-weight: 750;
}

.account-upload-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 0;
  background: #fffaf0;
}

.account-upload-card h4 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.account-upload-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.account-upload-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  color: var(--muted);
  border-radius: 0;
  background: #efe9dc;
  overflow: hidden;
  font-weight: 850;
}

.account-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-upload-summary {
  min-width: 0;
  padding: 12px 12px 8px;
}

.account-upload-summary small {
  color: var(--muted);
  font-weight: 750;
}

.account-image-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 750;
}

.account-image-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(23, 32, 27, 0.12);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.detail-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.button-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 3;
  width: min(320px, 100%);
  padding: 9px 10px;
  color: #fffdf7;
  border-radius: 8px;
  background: rgba(12, 20, 16, 0.94);
  box-shadow: 0 12px 26px rgba(23, 32, 27, 0.18);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.button:hover + .button-tooltip,
.button:focus-visible + .button-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.copy-message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--green-deep);
  font-weight: 800;
}

.copy-message.is-error {
  color: #a43b2f;
}

.account-card-actions {
  position: static;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0 12px 12px;
}

.account-card-actions .button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  color: #0f1b15;
  background: rgba(98, 198, 109, 0.94);
  box-shadow: 0 8px 18px rgba(6, 12, 9, 0.16);
  font-size: 0.78rem;
}

.account-card-actions .button:nth-child(2) {
  background: rgba(231, 185, 79, 0.96);
}

.upload-actions .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.upload-actions button:not(.button) {
  min-width: 34px;
  min-height: 34px;
}

.edit-schematic-form {
  display: grid;
  gap: 12px;
  width: 100%;
}

.edit-page-form {
  display: grid;
  gap: 12px;
  width: 100%;
}

.edit-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.edit-page-main {
  min-width: 0;
}

.edit-page-heading {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 850;
}

.back-link:hover {
  color: var(--green-deep);
}

.category-picker {
  margin-top: 10;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #1c3f47;
  box-shadow: 0 18px 40px rgba(6, 12, 9, 0.18);
}

.category-picker h3 {
  margin: 6px 8px 10px;
  color: var(--white);
  font-size: 0.88rem;
  text-transform: uppercase;
}

.category-picker button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  color: rgba(248, 251, 247, 0.84);
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.category-picker button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #0f1b15;
  border-radius: 6px;
  background: var(--category-color, var(--green));
  font-size: 0.78rem;
  font-weight: 900;
}

.category-picker button strong {
  font-weight: 850;
}

.category-picker button:hover,
.category-picker button.is-active {
  color: var(--white);
  background: color-mix(in srgb, var(--category-color, var(--green)) 28%, transparent);
}

.category-picker button.is-active span {
  box-shadow: 0 0 0 2px rgba(248, 251, 247, 0.52);
}

.account-upload-card:has(.edit-schematic-form) {
  position: static;
  display: block;
  min-height: 0;
  background: var(--panel-strong);
  padding: 14px;
}

.danger-button {
  color: #fff;
  border-color: #e33a2c;
  background: #e33a2c;
}

.edit-image-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.edit-image-option {
  position: relative;
  display: grid;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: #f4f1e8;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.edit-image-option.is-preview {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(98, 198, 109, 0.24);
}

.edit-image-option img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  transition: filter 160ms ease, transform 160ms ease;
}

.edit-image-option .preview-control,
.edit-image-option .remove-control {
  position: absolute;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.88);
  cursor: pointer;
}

.edit-image-option .preview-control {
  left: 8px;
}

.edit-image-option .remove-control {
  right: 8px;
}

.edit-image-option .preview-control input,
.edit-image-option .remove-control input {
  position: static;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
}

.edit-image-option .preview-radio {
  accent-color: var(--green);
}

.edit-image-option .remove-control input {
  accent-color: #e33a2c;
}

.remove-badge {
  display: none;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #fff;
  border-radius: 6px;
  background: #e33a2c;
  font-size: 0.75rem;
  font-weight: 900;
}

.preview-badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  color: #0f1b15;
  border-radius: 6px;
  background: rgba(98, 198, 109, 0.94);
  font-size: 0.72rem;
  font-weight: 900;
}

.edit-image-option:not(.is-preview) .preview-badge {
  background: rgba(255, 250, 240, 0.85);
}

.edit-image-option.is-marked img {
  filter: grayscale(0.65) brightness(0.62);
  transform: scale(1.02);
}

.edit-image-option.is-marked .remove-badge {
  display: inline-flex;
}

.library-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.library-list button {
  min-width: 34px;
  min-height: 34px;
  color: var(--ink);
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: 8px;
  background: #fffaf0;
  cursor: pointer;
}

.library-empty {
  color: var(--muted);
  font-weight: 650;
}

.auth-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 7, 0.72);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: clamp(24px, 5vw, 36px);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.auth-dialog h2 {
  font-size: clamp(2rem, 8vw, 3.4rem);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: #f4f1e8;
  font-weight: 900;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 18px;
}

.auth-tab {
  min-height: 42px;
  color: var(--ink);
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: 8px;
  background: #f4f1e8;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.auth-tab.is-active {
  color: #0f1b15;
  border-color: transparent;
  background: var(--green);
}

.auth-message {
  min-height: 24px;
  margin: 0;
  color: var(--green-deep);
  font-weight: 750;
}

.auth-message.is-error {
  color: #a43b2f;
}

.account-hero {
  display: grid;
  align-items: end;
  min-height: 42vh;
  padding: 120px clamp(18px, 5vw, 72px) 56px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(8, 16, 12, 0.92), rgba(8, 16, 12, 0.62)),
    url("assets/autobuild-hero.png") center / cover;
}

.account-hero > div {
  width: min(880px, 100%);
}

.account-hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
}

.account-hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(248, 251, 247, 0.78);
  font-size: 1.12rem;
}

.account-shell {
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 72px);
  background: var(--panel);
}

.account-shell[hidden] {
  display: none;
}

.account-auth-card {
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(23, 32, 27, 0.08);
}

.account-auth-card h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 0.96;
}

.account-dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.account-dashboard-heading h2 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.clean-dashboard-heading {
  align-items: center;
  margin-bottom: 26px;
}

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

.account-logout {
  color: var(--white);
  background: var(--bg);
  border-color: var(--bg);
}

.account-dashboard {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
}

.create-panel[hidden] {
  display: none;
}

.create-panel {
  margin-bottom: 24px;
}

.uploads-section {
  margin-top: 10px;
}

.mod-link-section {
  align-items: center;
  background: rgba(255, 252, 244, 0.72);
  border: 1px solid rgba(16, 25, 22, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 54px rgba(16, 25, 22, 0.07);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 320px);
  margin: 18px 0 24px;
  padding: 24px 28px;
}

.settings-hero {
  min-height: 420px;
}

.settings-shell {
  padding-top: clamp(28px, 5vw, 56px);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.settings-account-summary,
.settings-security-panel,
.settings-minecraft-link,
.settings-discord-link {
  grid-column: 1;
}

.settings-profile-editor {
  grid-column: 2;
  grid-row: 1 / span 4;
}

.settings-panel {
  align-self: start;
  background: rgba(255, 252, 244, 0.72);
  border: 1px solid rgba(16, 25, 22, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 54px rgba(16, 25, 22, 0.07);
  padding: 24px 28px;
}

.settings-panel h3 {
  margin-bottom: 18px;
}

.settings-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.settings-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16, 25, 22, 0.1);
}

.settings-list dt {
  color: var(--muted);
  font-weight: 800;
}

.settings-list dd {
  margin: 0;
  font-weight: 850;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 850;
}

.settings-form input,
.settings-form textarea {
  width: 100%;
  border: 1px solid rgba(23, 32, 27, 0.16);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

.settings-form input[type="color"] {
  min-height: 54px;
  padding: 6px;
}

.settings-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-gradient-controls[hidden] {
  display: none;
}

.settings-checks label {
  --gradient-chip-color: #f4f1e8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 10px 12px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: #f4f1e8;
}

.profile-gradient-controls label {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gradient-chip-color) 26%, #fffaf0), #fffaf0);
  border-color: color-mix(in srgb, var(--gradient-chip-color) 48%, rgba(23, 32, 27, 0.12));
}

.profile-gradient-controls label span {
  color: color-mix(in srgb, var(--gradient-chip-color) 42%, var(--muted));
}

.settings-checks input {
  width: auto;
  margin: 0;
}

.gradient-dominance-control {
  min-width: 230px;
}

.gradient-dominance-control input[type="range"] {
  width: 150px;
  accent-color: var(--gradient-chip-color);
}

.settings-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.settings-form textarea {
  min-height: 120px;
  resize: vertical;
}

.profile-settings-preview {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 10px;
  border-radius: 8px;
  transition: background 160ms ease;
}

.profile-preview-card {
  --preview-banner: linear-gradient(135deg, #121715 0%, #27332d 42%, #5c4a39 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  min-height: 170px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(23, 32, 27, 0.14);
  background:
    linear-gradient(180deg, rgba(6, 12, 9, 0.1), rgba(6, 12, 9, 0.86)),
    linear-gradient(90deg, rgba(6, 12, 9, 0.72), rgba(6, 12, 9, 0.28)),
    var(--preview-banner);
  background-size: cover;
  background-position: center;
  color: var(--white);
  overflow: hidden;
}

.profile-preview-avatar {
  display: grid;
  place-items: center;
  width: 74px;
  aspect-ratio: 1;
  border: 4px solid var(--panel-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: var(--ink);
  font-size: 2rem;
  font-weight: 950;
  overflow: hidden;
}

.profile-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-preview-body h4 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 650;
  line-height: 0.95;
}

.profile-preview-body p {
  margin: 8px 0 0;
  color: rgba(248, 251, 247, 0.8);
}

.profile-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.profile-preview-stats span {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(7, 13, 11, 0.62);
  color: rgba(248, 251, 247, 0.78);
  font-size: 0.78rem;
  font-weight: 850;
}

.settings-mod-link {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.profile-login-card {
  max-width: 560px;
  margin: 0 auto;
}

.linked-account-status {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: rgba(239, 235, 224, 0.72);
}

.linked-account-status span {
  color: #65756c;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.linked-account-status strong {
  color: #17201b;
  font-size: 0.98rem;
}

.linked-account-status small {
  color: #53635a;
  font-weight: 750;
}

.linked-account-status.is-linked {
  border-color: rgba(98, 198, 109, 0.38);
  background: rgba(98, 198, 109, 0.12);
}

.linked-account-status.is-linked span {
  color: #15803d;
}

.profile-page {
  display: grid;
  gap: 18px;
}

.profile-shell.has-profile-background {
  border-radius: 0;
  padding: clamp(24px, 4vw, 42px);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.profile-header-card {
  --profile-banner:
    linear-gradient(135deg, rgba(22, 35, 31, 0.94), rgba(40, 75, 68, 0.88)),
    linear-gradient(135deg, #17231f, #33534b);
  display: block;
  min-height: 170px;
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(6, 12, 9, 0.1) 0%, rgba(6, 12, 9, 0.22) 42%, rgba(6, 12, 9, 0.86) 100%),
    linear-gradient(90deg, rgba(6, 12, 9, 0.72) 0%, rgba(6, 12, 9, 0.34) 44%, rgba(6, 12, 9, 0.58) 100%),
    var(--profile-banner);
  background-size: cover;
  background-position: center;
  box-shadow: none;
  overflow: hidden;
}

.profile-header-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 122px;
  margin: 0;
  padding: 0;
}

.profile-header-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: clamp(72px, 8vw, 104px);
  aspect-ratio: 1;
  margin-top: 0;
  border: 5px solid var(--panel-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 950;
  box-shadow: none;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header-card h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 650;
  line-height: 0.94;
}

.profile-header-card p:not(.eyebrow) {
  max-width: 620px;
  margin: 6px 0 0;
  color: rgba(248, 251, 247, 0.82);
  font-size: 1rem;
}

.profile-header-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.profile-stats-label {
  margin: 0;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.profile-main-stats {
  margin-top: 12px;
}

.profile-stats span {
  min-height: 32px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: rgba(5, 10, 8, 0.72);
  color: rgba(248, 251, 247, 0.76);
  font-weight: 850;
}

.profile-stats strong {
  color: var(--white);
}

.profile-header-card .eyebrow {
  color: var(--cyan);
}

.profile-header-card .dark-button {
  border-color: rgba(248, 251, 247, 0.18);
  background: rgba(248, 251, 247, 0.92);
  color: var(--ink);
}

.profile-uploads h3 {
  margin-bottom: 14px;
}

.profile-shell.has-profile-background .profile-uploads {
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid rgba(248, 251, 247, 0.12);
  border-radius: 8px;
  background: rgba(6, 12, 9, 0.32);
}

.profile-shell.has-profile-background .profile-uploads h3 {
  color: var(--white);
}

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

.profile-upload-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
}

.profile-shell.has-profile-background .profile-upload-card {
  border-color: rgba(248, 251, 247, 0.16);
  background: rgba(255, 250, 240, 0.96);
}

.profile-upload-card small {
  color: var(--muted);
  font-weight: 800;
}

.profile-upload-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-upload-stats span {
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(16, 25, 22, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.profile-upload-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #ece7da;
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
}

.profile-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-link-section h3 {
  font-size: 1.3rem;
  margin: 4px 0 6px;
}

.mod-link-section p {
  color: var(--muted);
  margin: 0;
}

.mod-link-section > .auth-message {
  grid-column: 1 / -1;
  margin: -6px 0 0;
}

.mod-link-code {
  background: rgba(16, 25, 22, 0.06);
  border: 1px solid rgba(16, 25, 22, 0.12);
  border-radius: 8px;
  padding: 14px 16px;
}

.mod-link-code span,
.mod-link-code small {
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
}

.mod-link-code strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  margin: 4px 0;
}

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

.uploads-title-row h3,
.uploads-title-row p {
  margin: 0;
}

.uploads-title-row p {
  color: var(--muted);
}

.account-dashboard .account-panel {
  min-height: 420px;
}

.panel-copy {
  margin: 10px 0 24px;
  color: var(--muted);
}

.account-library-form,
.upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.create-schematic-form {
  display: grid;
  gap: 14px;
}

.library-hero {
  min-height: 48vh;
}

.library-browser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 24px;
  align-items: start;
}

.library-results {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.library-sidebar {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.72);
  box-shadow: 0 18px 54px rgba(16, 25, 22, 0.07);
}

.library-sidebar h3 {
  margin: 0;
}

.library-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(16, 25, 22, 0.06);
}

.library-tabs button,
.category-filter-list button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.library-tabs button {
  min-height: 38px;
}

.library-tabs button.is-active {
  background: var(--panel-strong);
  box-shadow: 0 8px 18px rgba(16, 25, 22, 0.07);
}

.category-filter-list {
  display: grid;
  gap: 5px;
  max-height: 620px;
  overflow: auto;
}

.category-filter-list button {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
}

.category-filter-list button.is-active,
.category-filter-list button:hover {
  background: rgba(16, 25, 22, 0.06);
}

.category-filter-list small {
  color: var(--muted);
  font-weight: 850;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--category-color, var(--green));
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 240px);
  gap: 12px;
  margin-bottom: 18px;
}

.library-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 850;
}

.library-toolbar input,
.library-toolbar select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(23, 32, 27, 0.16);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  padding: 0 14px;
}

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

.schematic-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 12px 30px rgba(23, 32, 27, 0.06);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
}

.schematic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(23, 32, 27, 0.1);
}

.schematic-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 0;
  color: var(--muted);
  border-radius: 0;
  background: #ece7da;
  overflow: hidden;
  font-weight: 850;
}

.schematic-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schematic-card h3 {
  margin: 12px 0 8px;
  font-size: 1.06rem;
}

.schematic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.schematic-card .schematic-stats {
  margin-top: 4px;
  color: rgba(83, 101, 92, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-link {
  color: var(--green-deep);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.profile-link:hover {
  color: #0f1b15;
  background: color-mix(in srgb, var(--green) 36%, transparent);
}

.schematic-card-body {
  width: 100%;
  padding: 14px;
}

.schematic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schematic-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #0f1b15;
  border-radius: 6px;
  background: var(--category-color, var(--green));
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.schematic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.schematic-actions button {
  min-height: 28px;
  padding: 0 8px;
  color: var(--ink);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 6px;
  background: #f4f1e8;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.schematic-actions button[data-action="like"].is-active {
  color: #0f1b15;
  border-color: transparent;
  background: #62c66d;
}

.schematic-actions button[data-action="dislike"].is-active {
  color: #0f1b15;
  border-color: transparent;
  background: #ff8b7f;
}

.schematic-actions button[data-action="favorite"].is-active {
  color: #0f1b15;
  border-color: transparent;
  background: #e7b94f;
}

.schematic-note {
  color: var(--muted);
  font-weight: 850;
}

.schematic-detail-shell {
  min-height: 70vh;
  padding-top: clamp(72px, 10vw, 124px);
}

.schematic-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.detail-back-link {
  grid-column: 1 / -1;
  margin-bottom: -14px;
}

.detail-gallery {
  display: grid;
  gap: 14px;
}

.detail-main-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 620px);
  border-radius: 8px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  background: var(--panel-strong);
  overflow: hidden;
}

.detail-main-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-empty-preview {
  color: var(--muted);
  font-weight: 850;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(16, 25, 22, 0.72);
  box-shadow: 0 10px 24px rgba(6, 12, 9, 0.28);
  cursor: pointer;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 900;
  transform: translateY(-50%);
}

.gallery-arrow:hover {
  background: rgba(16, 25, 22, 0.9);
}

.gallery-arrow-prev {
  left: 14px;
}

.gallery-arrow-next {
  right: 14px;
}

.gallery-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--white);
  border-radius: 6px;
  background: rgba(16, 25, 22, 0.74);
  font-size: 0.82rem;
  font-weight: 850;
}

.detail-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-thumbnails button {
  display: block;
  width: clamp(92px, 16vw, 150px);
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.72;
}

.detail-thumbnails button:hover,
.detail-thumbnails button.is-active {
  border-color: var(--category-color, var(--green));
  opacity: 1;
}

.detail-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  position: sticky;
  top: 92px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(23, 32, 27, 0.08);
}

.comments-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(23, 32, 27, 0.08);
}

.comments-section h2 {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  min-height: 94px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 32, 27, 0.16);
  border-radius: 8px;
  background: #f4f1e8;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.comment-form .button {
  justify-self: start;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment-card,
.comment-reply {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: 8px;
  background: #f4f1e8;
}

.comment-card p,
.comment-reply p {
  margin: 0;
  color: var(--ink);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.comment-delete {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(164, 59, 47, 0.22);
  border-radius: 6px;
  background: rgba(164, 59, 47, 0.08);
  color: #a43b2f;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
}

.comment-delete:hover {
  background: rgba(164, 59, 47, 0.16);
}

.comment-replies {
  display: grid;
  gap: 8px;
  margin-left: 22px;
}

.comment-reply-form {
  margin-left: 22px;
}

.comment-reply-form textarea {
  min-height: 64px;
}

.detail-info h1 {
  margin-top: 18px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.detail-info p {
  color: var(--muted);
}

.detail-meta {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
  font-weight: 750;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

.detail-stats span {
  min-height: 34px;
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: #f4f1e8;
  font-weight: 800;
}

.detail-stats strong {
  color: var(--ink);
}

.support-section {
  background: var(--panel);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.support-grid a,
.support-disabled {
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 20px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--panel-strong);
  font-weight: 850;
}

.support-disabled,
.footer-muted-link {
  color: var(--muted);
  cursor: default;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(130px, 0.7fr));
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  padding: 34px clamp(18px, 5vw, 72px);
  color: rgba(248, 251, 247, 0.68);
  background: #0c1210;
  font-size: 0.92rem;
}

.site-footer .brand {
  color: var(--white);
}

.footer-brand p {
  max-width: 420px;
  margin: 16px 0 0;
}

.footer-column {
  display: grid;
  gap: 8px;
}

.footer-column h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column a,
.footer-muted-link {
  color: rgba(248, 251, 247, 0.68);
  font-weight: 650;
}

.footer-column a:hover {
  color: var(--green);
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

  .main-nav {
    max-width: 360px;
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .hero {
    min-height: 820px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(8, 16, 12, 0.88) 0%, rgba(8, 16, 12, 0.74) 54%, rgba(8, 16, 12, 0.22) 100%),
      linear-gradient(0deg, rgba(16, 25, 22, 1) 0%, rgba(16, 25, 22, 0) 22%);
  }

  .hero-content {
    margin: 0 auto;
  }

  .feature-grid,
  .steps,
  .support-grid {
    grid-template-columns: 1fr 1fr;
  }

  .showcase,
  .download-section,
  .library-layout,
  .library-browser,
  .account-dashboard,
  .settings-grid,
  .schematic-detail {
    grid-template-columns: 1fr;
  }

  .library-results,
  .library-sidebar {
    grid-column: auto;
    grid-row: auto;
  }

  .library-sidebar {
    position: static;
  }

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

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

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

  .detail-info {
    position: static;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .account-dashboard-heading {
    flex-direction: column;
  }

  .profile-header-card {
    min-height: 0;
  }

  .profile-header-content {
    min-height: 0;
  }

  .profile-header-content,
  .profile-header-main {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 110px;
    margin-top: 0;
  }

  .profile-header-side {
    justify-items: start;
  }

  .mod-link-section {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: absolute;
    display: block;
  }

  .main-nav {
    justify-content: flex-start;
    margin-top: 14px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: 760px;
  }

  h1 {
    font-size: clamp(2.65rem, 15vw, 4.6rem);
  }

  .button {
    width: 100%;
  }

  .stats-band,
  .feature-grid,
  .steps,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 190px;
  }

  .block-grid {
    gap: 7px;
  }

  .download-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-form,
  .library-toolbar,
  .account-library-form,
  .upload-form {
    grid-template-columns: 1fr;
  }

  .account-topline {
    flex-direction: column;
  }

  .account-upload-card {
    grid-template-columns: 1fr;
  }

  .upload-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

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

  .profile-upload-grid {
    grid-template-columns: 1fr;
  }
}
