/*
 * Akalynth site theme.
 * Classic-MMO feel: dark stone backdrop, parchment content column,
 * ornate gold-on-brown sidebar. Original CSS — no third-party assets.
 */

:root {
  --stone-0: #14110d;
  --stone-1: #1f1a13;
  --stone-2: #2a2318;
  --brown-0: #3a2c1a;
  --brown-1: #4a3823;
  --brown-2: #5d4626;
  --gold-0: #d9b25a;
  --gold-1: #f0d07f;
  --gold-deep: #a87f2e;
  --parchment-0: #efe2c4;
  --parchment-1: #e6d6b0;
  --parchment-edge: #c9b282;
  --ink: #2c241a;
  --ink-soft: #5a4d3a;
  --green: #6fae5a;
  --amber: #d9a23a;
  --blue: #6f9fd8;
  --shadow: rgba(0, 0, 0, 0.45);
  --font-display: "Trebuchet MS", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: Georgia, "Times New Roman", serif;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment-0);
  font-family: var(--font-body);
  line-height: 1.55;
  background-color: var(--stone-0);
  /* Subtle layered stone texture, drawn entirely with gradients. */
  background-image: radial-gradient(
      circle at 20% 30%,
      rgba(80, 64, 40, 0.18),
      transparent 45%
    ),
    radial-gradient(circle at 80% 70%, rgba(60, 48, 30, 0.16), transparent 50%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.012) 0 2px,
      transparent 2px 6px
    ),
    linear-gradient(160deg, var(--stone-1), var(--stone-0));
  background-attachment: fixed;
}

a {
  color: var(--gold-1);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold-0);
  color: var(--ink);
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus {
  left: 8px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 3px solid var(--gold-deep);
  background: linear-gradient(180deg, var(--brown-2), var(--brown-0));
  box-shadow: 0 4px 14px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  font-size: 30px;
  color: var(--gold-1);
  text-shadow: 0 2px 0 var(--gold-deep), 0 0 12px rgba(240, 208, 127, 0.4);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-1);
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
}
.brand-tag {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--parchment-1);
  opacity: 0.85;
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.tab-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--parchment-0);
  text-decoration: none;
  background: linear-gradient(180deg, var(--brown-1), var(--brown-0));
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.05s;
}
.tab-btn:hover {
  color: var(--gold-1);
  border-color: var(--gold-0);
}
.tab-btn:active {
  transform: translateY(1px);
}
.tab-btn.is-active {
  background: linear-gradient(180deg, var(--gold-0), var(--gold-deep));
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ---------- Layout ---------- */
.layout {
  max-width: 1120px;
  margin: 22px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: start;
}

/* ---------- Sidebar panels ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 84px;
}
.panel {
  border: 2px solid var(--gold-deep);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--brown-1), var(--brown-0));
  box-shadow: 0 3px 10px var(--shadow);
  overflow: hidden;
}
.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  padding: 8px 12px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-0));
  border-bottom: 1px solid var(--gold-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.panel-body {
  padding: 12px 14px;
  font-size: 14px;
}
.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  flex: none;
}
.dot-green {
  background: var(--green);
  color: var(--green);
}
.dot-amber {
  background: var(--amber);
  color: var(--amber);
}
.dot-blue {
  background: var(--blue);
  color: var(--blue);
}
.big-number {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--gold-1);
  margin: 4px 0;
}
.cart-summary {
  margin: 0 0 10px;
  color: var(--gold-1);
  font-weight: 700;
}

/* ---------- Content / parchment ---------- */
.content {
  min-height: 60vh;
}
.page-title {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--gold-1);
  margin: 0 0 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold-1);
  margin: 26px 0 12px;
}
.parchment {
  position: relative;
  color: var(--ink);
  background: linear-gradient(180deg, var(--parchment-0), var(--parchment-1));
  border: 1px solid var(--parchment-edge);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px var(--shadow),
    inset 0 0 40px rgba(160, 130, 80, 0.18);
}
.parchment p {
  margin: 0 0 12px;
}
.parchment p:last-child {
  margin-bottom: 0;
}
.lede {
  font-size: 18px;
  color: var(--ink);
}
.news-title {
  font-family: var(--font-display);
  margin: 0 0 4px;
  color: var(--brown-0);
}
.news-meta {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 10px;
}
.notice {
  background: rgba(217, 162, 58, 0.18);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.feature {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--parchment-edge);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.feature h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--brown-0);
}
.feature p {
  margin: 0;
  font-size: 14px;
}
.check-list {
  margin: 0;
  padding-left: 20px;
}
.check-list li {
  margin-bottom: 8px;
}

/* ---------- Shop ---------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.shop-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--gold-deep);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--parchment-0), var(--parchment-1));
  box-shadow: 0 3px 10px var(--shadow);
  overflow: hidden;
}
.shop-card-art {
  font-size: 46px;
  text-align: center;
  padding: 20px 0 10px;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(240, 208, 127, 0.45),
    transparent 70%
  );
}
.shop-card-body {
  padding: 12px 14px 16px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.shop-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--brown-0);
  margin: 0 0 4px;
}
.shop-card-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  flex: 1;
}
.shop-card-price {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 10px;
}
.shop-card-price .usd {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
  display: block;
}
.shop-tag {
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--brown-0);
  color: var(--gold-1);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

/* ---------- Cart ---------- */
.cart-panel {
  padding: 16px 20px;
}
.cart-items {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--parchment-edge);
  padding-bottom: 8px;
  color: var(--ink);
}
.cart-item-name {
  font-weight: 700;
}
.cart-item-price {
  color: var(--gold-deep);
  font-weight: 700;
}
.cart-empty {
  color: var(--ink-soft);
  font-style: italic;
}
.cart-qty {
  font-size: 13px;
  color: var(--ink-soft);
}
.cart-remove {
  background: none;
  border: none;
  color: #9c3b2e;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
}
.cart-remove:hover {
  color: #c64a39;
}
.cart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--parchment-edge);
  padding-top: 10px;
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--font-display);
}
.cart-foot-total {
  font-size: 20px;
  color: var(--gold-deep);
  font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  padding: 9px 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--gold-deep);
  transition: transform 0.05s, filter 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-1), var(--gold-deep));
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-gold:hover:not(:disabled) {
  filter: brightness(1.07);
}
.btn-ghost {
  background: transparent;
  color: var(--gold-1);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(240, 208, 127, 0.12);
}
.btn-block {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.shop-card .btn {
  margin-top: auto;
}

/* ---------- Misc ---------- */
.muted {
  color: var(--parchment-1);
  opacity: 0.8;
}
.parchment .muted {
  color: var(--ink-soft);
  opacity: 1;
}
.small {
  font-size: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--gold-deep);
  background: linear-gradient(0deg, var(--brown-2), var(--brown-0));
  margin-top: 30px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px;
  text-align: center;
}
.footer-inner p {
  margin: 4px 0;
}

/* ---------- Currency: preview gold ---------- */
/* Distinct from the shop's .usd (muted block). Gold = in-game preview
   currency for houses, never the premium Azura coins. */
.gold {
  color: var(--gold-deep);
  font-weight: 700;
}
.sidebar .gold {
  color: var(--gold-1);
}

/* ---------- Holdings (sidebar) ---------- */
.holdings-name {
  margin: 0 0 4px;
  font-size: 16px;
}
.holdings-gold {
  margin: 8px 0 0;
  font-family: var(--font-display);
}

/* ---------- House preview auctions ---------- */
.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.house-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--gold-deep);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--parchment-0), var(--parchment-1));
  box-shadow: 0 3px 10px var(--shadow);
  color: var(--ink);
  padding: 14px 16px 16px;
}
.house-head {
  margin-bottom: 10px;
}
.house-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--brown-0);
  margin: 0;
}
.house-world {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.house-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}
.house-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  margin: 0;
}
.house-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--brown-0);
  font-size: 14px;
}
.house-bid {
  margin-top: auto;
  border-top: 1px dashed var(--parchment-edge);
  padding-top: 10px;
}
.resale-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.resale-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.resale-label {
  font-size: 12px;
  color: var(--ink-soft);
}
.resale-controls {
  display: flex;
  gap: 8px;
}
.resale-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  background: #fff8e8;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
}
.resale-row .btn {
  white-space: nowrap;
}
#auctions-planned {
  opacity: 0.85;
}
#auctions-planned .section-title {
  color: var(--ink-soft);
}

/* ---------- Forms (account creation) ---------- */
.field-error {
  color: #9c3b2e;
  font-size: 13px;
  margin: 2px 0 0;
  min-height: 1em;
}
.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
}
.field > label:not(.radio),
.field legend {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--brown-0);
  margin-bottom: 6px;
}
.field input[type="text"],
.field select {
  padding: 9px 11px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  background: #fff8e8;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}
.radio-group {
  border: 1px solid var(--parchment-edge);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 0;
}
.radio-group legend {
  padding: 0 6px;
}
.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 18px;
  color: var(--ink);
  font-family: var(--font-body);
}
.radio input {
  accent-color: var(--gold-deep);
}
.summary-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}
.summary-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--parchment-edge);
  padding-bottom: 6px;
}
.summary-list dt {
  color: var(--ink-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.summary-list dd {
  margin: 0;
  font-weight: 700;
  color: var(--brown-0);
}

/* ---------- Focus visibility (a11y) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar .panel {
    flex: 1 1 200px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-title {
    font-size: 26px;
  }
  .resale-controls {
    flex-direction: column;
  }
  .house-meta {
    grid-template-columns: 1fr 1fr;
  }
}
