:root {
  color-scheme: dark;
  --ink: #e9eef0;
  --muted: #aebbc1;
  --dim: #75868f;
  --gold: #c3a56e;
  --gold-soft: rgba(195, 165, 110, 0.36);
  --glass: rgba(21, 32, 38, 0.42);
  --glass-strong: rgba(14, 24, 31, 0.72);
  --line: rgba(225, 214, 175, 0.34);
  --shadow: rgba(0, 0, 0, 0.44);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #05080a;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #05080a;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.view {
  display: none;
  min-height: 100vh;
}

.view.is-active {
  display: flex;
}

.hero {
  position: relative;
  flex-direction: column;
  padding: 34px clamp(16px, 3vw, 52px);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(4, 14, 20, 0.2) 45%, rgba(0, 0, 0, 0.68)),
    linear-gradient(180deg, rgba(2, 8, 12, 0.78), rgba(2, 8, 12, 0.18) 45%, rgba(2, 8, 12, 0.82)),
    url("assets/storm-clean.jpeg?v=20260513-1801") center / cover no-repeat;
}

.mist-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 54% 18%, rgba(230, 244, 245, 0.18), transparent 30%),
    radial-gradient(ellipse at 64% 62%, rgba(238, 244, 234, 0.13), transparent 24%);
  mix-blend-mode: screen;
}

.home-footer {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin: 22px auto 0;
}

.home-footer .brand {
  justify-content: center;
}

.brand,
.ghost-button {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.contact-link {
  width: fit-content;
  border: 1px solid rgba(216, 180, 95, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.22);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.contact-link:hover {
  border-color: rgba(216, 180, 95, 0.5);
  background: rgba(0, 0, 0, 0.38);
  transform: translateY(-1px);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 22px rgba(195, 165, 110, 0.35);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.18);
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: #8a6a33;
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.account-fab {
  position: fixed;
  z-index: 20;
  top: 22px;
  right: 22px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(216, 180, 95, 0.42);
  border-radius: 999px;
  color: #e7c36f;
  background: rgba(4, 10, 13, 0.76);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.account-fab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.layout-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(128px, auto);
  gap: 14px;
  width: min(1180px, 100%);
  margin: auto;
  align-items: stretch;
}

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 2vw, 28px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 40%),
    var(--glass);
  box-shadow: 0 18px 45px var(--shadow), inset 0 0 42px rgba(206, 225, 226, 0.09);
  backdrop-filter: blur(8px);
}

.glass-panel::before,
.glass-panel::after {
  position: absolute;
  width: 30px;
  height: 30px;
  content: "";
  pointer-events: none;
}

.glass-panel::before {
  top: 7px;
  left: 7px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.glass-panel::after {
  right: 7px;
  bottom: 7px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.main-panel {
  grid-column: 1 / span 4;
  grid-row: span 2;
  min-height: 318px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.panel-small {
  grid-column: span 2;
}

.panel-wide {
  grid-column: span 2;
}

.panel-long {
  grid-column: 1 / span 4;
}

.panel-seo,
.panel-security {
  grid-column: span 3;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(40px, 5vw, 74px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.08;
  letter-spacing: 0;
}

.main-panel p:not(.eyebrow),
.info-panel p,
.checkout-copy {
  color: var(--muted);
  line-height: 1.6;
}

.main-panel p:not(.eyebrow) {
  max-width: 610px;
  margin-bottom: 22px;
  font-size: 17px;
}

.panel-icon {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.primary-button {
  width: fit-content;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0 22px;
  color: #081014;
  background: linear-gradient(135deg, #ead7a4, #b98f4d);
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  filter: grayscale(0.2);
}

.writer,
.payment,
.auth {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(rgba(2, 8, 12, 0.72), rgba(2, 8, 12, 0.84)),
    url("assets/storm-clean.jpeg?v=20260513-1801") center / cover no-repeat;
}

.writer::before,
.payment::before,
.auth::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.84)),
    rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.paper,
.checkout-card,
.auth-card {
  width: min(820px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 42px);
  background: rgba(230, 236, 232, 0.92);
  color: #162127;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.writer .paper {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: min(820px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border-color: rgba(225, 214, 175, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 40%),
    rgba(8, 18, 23, 0.78);
  color: #e7c36f;
  backdrop-filter: blur(10px);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    inset 0 0 58px rgba(206, 225, 226, 0.08);
}

.auth-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: grid;
  gap: 24px;
  width: min(680px, 100%);
  border-color: rgba(225, 214, 175, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 40%),
    rgba(8, 18, 23, 0.82);
  color: #e7c36f;
  backdrop-filter: blur(10px);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    inset 0 0 58px rgba(206, 225, 226, 0.08);
}

.auth-card::before,
.auth-card::after {
  position: absolute;
  width: 44px;
  height: 44px;
  content: "";
  pointer-events: none;
}

.auth-card::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.auth-card::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.auth-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
}

.auth-card .paper-header p {
  color: #d8b45f;
}

.auth-card .icon-button {
  border-color: rgba(216, 180, 95, 0.28);
  color: #e7c36f;
  background: rgba(0, 0, 0, 0.28);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.writer .paper::before,
.writer .paper::after {
  position: absolute;
  width: 44px;
  height: 44px;
  content: "";
  pointer-events: none;
}

.writer .paper::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.writer .paper::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.paper-header,
.writer-actions,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.paper-header p,
.writer-actions p {
  margin: 0;
  color: #4a5b62;
  font-weight: 700;
}

.writer .paper .paper-header p,
.writer .paper .writer-actions p {
  color: #d8b45f;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(20, 32, 38, 0.18);
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.48);
  font-size: 24px;
  line-height: 1;
}

.writer .paper .icon-button {
  border-color: rgba(216, 180, 95, 0.28);
  color: #e7c36f;
  background: rgba(0, 0, 0, 0.28);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.field span {
  color: #52646b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.writer .paper .field span,
.auth-card .field span {
  color: #d8b45f;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(22, 33, 39, 0.18);
  border-radius: 8px;
  padding: 15px 16px;
  color: #162127;
  background: rgba(255, 255, 255, 0.66);
  outline: none;
}

.writer .paper .field input,
.writer .paper .field textarea,
.auth-card .field input {
  border-color: rgba(216, 180, 95, 0.32);
  color: #e7c36f;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: inset 0 0 24px rgba(195, 165, 110, 0.04);
}

.writer .paper .field input::placeholder,
.writer .paper .field textarea::placeholder,
.auth-card .field input::placeholder {
  color: rgba(231, 195, 111, 0.52);
}

.writer .paper .field input:focus,
.writer .paper .field textarea:focus,
.auth-card .field input:focus {
  border-color: rgba(231, 195, 111, 0.82);
  box-shadow:
    0 0 0 3px rgba(195, 165, 110, 0.12),
    inset 0 0 24px rgba(195, 165, 110, 0.06);
}

.field textarea {
  min-height: 240px;
  resize: vertical;
}

.field-grow {
  flex: 1;
}

.field-grow textarea {
  height: 100%;
  min-height: 360px;
}

.writer-actions {
  margin-top: 22px;
}

.checkout-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: grid;
  gap: 22px;
  border-color: rgba(225, 214, 175, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 40%),
    rgba(8, 18, 23, 0.78);
  color: #e7c36f;
  backdrop-filter: blur(10px);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    inset 0 0 58px rgba(206, 225, 226, 0.08);
}

.checkout-card::before,
.checkout-card::after {
  position: absolute;
  width: 44px;
  height: 44px;
  content: "";
  pointer-events: none;
}

.checkout-card::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.checkout-card::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.checkout-card .eyebrow {
  color: #d8b45f;
}

.checkout-card h2 {
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
}

.summary-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(216, 180, 95, 0.26);
  border-radius: 8px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.34);
}

.security-note {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(216, 180, 95, 0.26);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.34);
}

.security-note strong {
  color: #d8b45f;
}

.security-note span {
  color: var(--muted);
  line-height: 1.5;
}

.summary-box span {
  color: var(--muted);
  font-weight: 700;
}

.summary-box strong {
  color: #e7c36f;
  font-size: 30px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.check-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: #d8b45f;
}

.agreement-box {
  max-height: 170px;
  overflow: auto;
  border: 1px solid rgba(216, 180, 95, 0.26);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.34);
  line-height: 1.55;
}

.agreement-box section + section {
  margin-top: 14px;
}

.agreement-box h3 {
  margin: 0 0 4px;
  color: #e7c36f;
  font-size: 15px;
}

.agreement-box p {
  margin: 0;
}

.full {
  width: 100%;
}

.success-message {
  min-height: 24px;
  margin: 0;
  color: #d8b45f;
  font-weight: 800;
}

.admin-modal {
  width: min(640px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #e8ece9;
  color: #162127;
}

.account-modal {
  width: min(760px, calc(100% - 28px));
  border: 1px solid rgba(225, 214, 175, 0.34);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 42%),
    rgba(8, 18, 23, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.64);
}

.account-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.account-panel {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 34px);
}

.account-panel::before,
.account-panel::after {
  position: absolute;
  width: 38px;
  height: 38px;
  content: "";
  pointer-events: none;
}

.account-panel::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.account-panel::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.account-panel .modal-header h2 {
  margin: 0;
  color: var(--ink);
}

.member-form,
.member-area,
.tab-panel {
  display: grid;
  gap: 16px;
}

.account-panel .field input {
  border-color: rgba(216, 180, 95, 0.32);
  color: #e7c36f;
  background: rgba(0, 0, 0, 0.58);
}

.account-panel .field input::placeholder {
  color: rgba(231, 195, 111, 0.48);
}

.account-panel .field span {
  color: #d8b45f;
}

.member-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(216, 180, 95, 0.26);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
}

.member-card strong {
  color: #e7c36f;
  font-size: 20px;
}

.member-card span,
.empty-state,
.account-item p {
  color: var(--muted);
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab-button {
  min-height: 42px;
  border: 1px solid rgba(216, 180, 95, 0.24);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
  font-weight: 800;
}

.tab-button.is-active {
  color: #081014;
  background: linear-gradient(135deg, #ead7a4, #b98f4d);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: grid;
}

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

.account-item {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(216, 180, 95, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.account-item strong {
  color: var(--ink);
}

.account-item span {
  color: #d8b45f;
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  border: 1px dashed rgba(216, 180, 95, 0.28);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.admin-modal::backdrop {
  background: rgba(0, 0, 0, 0.66);
}

.admin-modal form {
  padding: 24px;
}

.modal-header h2 {
  color: #162127;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-bottom: 22px;
  }

  .layout-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    margin: 0 auto;
  }

  .main-panel,
  .panel-long,
  .panel-wide,
  .panel-small,
  .panel-seo,
  .panel-security {
    grid-column: span 2;
  }

  .main-panel {
    min-height: 430px;
  }
}

@media (min-width: 901px) {
  .hero,
  .writer,
  .payment,
  .auth {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(4, 14, 20, 0.08) 45%, rgba(0, 0, 0, 0.7)),
      linear-gradient(180deg, rgba(2, 8, 12, 0.82), rgba(2, 8, 12, 0.18) 46%, rgba(2, 8, 12, 0.88)),
      url("assets/storm-desktop-clean.jpeg?v=20260513-1810") center / cover no-repeat;
  }
}

@media (max-width: 620px) {
  .account-fab {
    top: 14px;
    right: 14px;
  }

  .layout-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .main-panel,
  .panel-long,
  .panel-wide,
  .panel-small,
  .panel-seo,
  .panel-security,
  .info-panel {
    grid-column: 1;
  }

  .main-panel {
    min-height: 440px;
  }

  h1 {
    font-size: 42px;
  }

  .writer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .writer-actions .primary-button {
    width: 100%;
  }

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