@font-face {
  font-family: ArchiveHeading;
  src: url('../../engine/idle-game-engine/assets/fonts/cormorant-garamond/CormorantGaramondCyrillic[wght].ttf') format('truetype');
  unicode-range: U+0400-052F;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #120f0d;
  --surface: #1b1612;
  --gold: #f2d59b;
  --text: #f2e9d8;
  --muted: #cdbfae;
  --line: #7c6247;
  --heading: ArchiveHeading, Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 18px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 16px/1.55 Georgia, 'Times New Roman', serif;
}
a { color: var(--gold); text-underline-offset: .23em; }
a:hover { color: #fff0c1; }
:focus-visible { outline: 2px solid #fbd992; outline-offset: 4px; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2 { font-family: var(--heading); font-weight: 600; line-height: 1.02; }
h1 { font-size: clamp(48px, 8vw, 92px); }
h2 { font-size: clamp(35px, 4.8vw, 56px); }
p + p { margin-top: 10px; }
.masthead, main, .store-footer, .document-page footer { width: min(100% - 40px, 1216px); margin-inline: auto; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid #5b4732;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-decoration: none; }
.brand img { width: 88px; height: auto; display: block; }
.masthead nav, .store-footer nav, .document-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; }
.masthead nav a, .store-footer a, .document-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.masthead nav a { font-size: 14px; text-decoration-thickness: 1px; }
main { padding-block: 22px 44px; }
.store-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 330px;
  padding: clamp(26px, 5vw, 70px);
  background: linear-gradient(90deg, #0f0a08 0%, #100b09e8 23%, #120c09a8 43%, #120c0910 67%),
    url('art/seal-forge.webp') center / cover no-repeat, #1b100a;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 5px #180f0a78;
}
.hero-copy { max-width: 431px; }
.hero-copy > p:first-of-type { max-width: 32ch; margin-top: 12px; font-size: clamp(17px, 2vw, 22px); }
.store-status { color: var(--muted); font-size: 14px; }
.store-hero--account { min-height: 208px; padding-block: 25px; }
.store-hero--account h1 { font-size: clamp(45px, 7vw, 74px); }
.text-link { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; font-size: 13px; }
.premium-feature, .account, .product, .document-section {
  border: 8px solid #705840;
  border-image: url('art/shop-leather.webp') 28 fill stretch;
  background-color: var(--surface);
}
.premium-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  margin-top: 22px;
  overflow: hidden;
}
.premium-copy { padding: clamp(20px, 3.4vw, 46px); }
.premium-heading { display: flex; align-items: center; gap: 11px; }
.premium-heading img { flex: 0 0 auto; object-fit: contain; }
.premium-period { color: var(--gold); margin-top: 9px; }
.premium-copy ul { padding-left: 20px; margin-block: 17px 15px; color: var(--muted); }
.premium-copy li + li { margin-top: 6px; }
.premium-scene { display: block; width: 100%; height: 100%; min-height: 220px; max-height: 360px; object-fit: cover; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 14px; }
.price-line strong, .seal-price { color: var(--gold); font-size: 27px; font-variant-numeric: tabular-nums; }
.price-line small { color: var(--muted); font-size: 13px; }
.seal-section { margin-top: 39px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px 30px; margin-bottom: 18px; }
.section-heading p { color: var(--muted); max-width: 58ch; }
.seal-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.seal-card {
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 12px 8px 13px;
  border: 8px solid #705840;
  border-image: url('art/shop-walnut.webp') 32 fill stretch;
  background-color: var(--surface);
  text-align: center;
}
.seal-card img {
  display: block;
  width: min(100%, 152px);
  height: 136px;
  object-fit: contain;
  filter: drop-shadow(0 8px 9px #000a);
}
.seal-card h3 { font-size: clamp(16px, 1.6vw, 23px); line-height: 1.15; margin-top: 7px; }
.seal-price { font-size: 22px; margin-top: 5px; }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 20px; }
.product, .account { padding: clamp(16px, 2.5vw, 32px); }
.product h2, .account h2 { font-size: clamp(30px, 3.8vw, 42px); }
.catalog { margin: 16px 0 0; padding: 0; list-style: none; }
.catalog li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: center;
  min-height: 84px;
  padding: 7px 0;
  border-top: 1px solid #705236;
}
.catalog img { width: 70px; height: 70px; object-fit: contain; }
.catalog strong, .catalog small { display: block; }
.catalog small { color: var(--muted); font-size: 13px; }
.catalog .price { color: var(--gold); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog button { grid-column: 2 / -1; justify-self: end; min-width: 96px; }
button, input, a.button {
  font: inherit;
  color: var(--text);
  border: 1px solid #896a4a;
  border-radius: 0;
  padding: 11px 14px;
  min-height: 46px;
  background: #120f0d;
}
button { cursor: pointer; touch-action: manipulation; }
button:hover, a.button:hover { border-color: var(--gold); }
button:disabled { opacity: .68; cursor: wait; }
input { width: 100%; min-width: 0; }
label { display: block; font-size: 15px; margin: 10px 0 5px; }
#login, a.button {
  width: 100%;
  margin-top: 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  background: #441f16;
  border: 6px solid #956749;
  border-image: url('art/shop-buy.webp') 24 fill stretch;
  padding: 6px 12px;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
}
.account-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.account-heading img { flex: 0 0 auto; width: 52px; height: 52px; object-fit: contain; }
.form-copy, .notice, #availability { color: var(--muted); font-size: 15px; }
.social { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(137px, 100%), 1fr)); gap: 8px; margin-top: 9px; }
.social button { padding-inline: 8px; font-size: 14px; }
#availability { margin-top: 8px; }
#premium-active, #seals-balance { padding: 10px 13px; margin-top: 12px; border: 1px solid var(--line); color: var(--gold); background: #311d105f; }
#status { font-size: 14px; color: var(--gold); margin: 14px 0; overflow-wrap: anywhere; }
#status[data-error="true"] { color: #ffc1aa; }
.notice { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.signed-label, .reference { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#account-email { overflow-wrap: anywhere; font-size: 18px; margin-top: 6px; }
#signout { margin-top: 12px; }
#order { padding-top: 12px; border-top: 1px solid var(--line); }
#order-state { font-size: 18px; color: var(--gold); }
#checkout-notice { margin-top: 10px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.order-actions button, #signout, .catalog button { font-size: 13px; }
.store-footer, .document-page footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 28px;
  flex-wrap: wrap;
  border-top: 1px solid #5b4732;
  padding-block: 18px 24px;
  font-size: 14px;
}
.store-contact { display: grid; align-content: start; overflow-wrap: anywhere; word-break: normal; }
.store-contact a { min-height: 32px; }
.document-page main { width: min(100% - 40px, 840px); }
.document-page h1 { font-size: clamp(43px, 7vw, 70px); }
.document-nav { margin: 12px 0 18px; }
.document-section { padding: clamp(17px, 3vw, 27px); margin-top: 14px; }
.document-section h2 { margin-bottom: 10px; font-size: clamp(30px, 5vw, 44px); }
.document-section h3 { margin-top: 14px; color: var(--gold); font-size: 18px; }
.document-section ul, .document-section ol { padding-left: 22px; margin-block: 8px; }
.document-section dt { font-weight: bold; }
.document-section dd { margin-inline-start: 0; margin-bottom: 8px; overflow-wrap: anywhere; }
.document-status, .document-meta { color: var(--muted); margin-top: 9px; }
.skip { position: fixed; top: 10px; left: 12px; clip-path: inset(50%); background: #21150f; padding: 12px; z-index: 5; }
.skip:focus { clip-path: none; }
@media (min-width: 1100px) {
  .catalog li { grid-template-columns: 70px minmax(0, 1fr) auto auto; }
  .catalog button { grid-column: auto; }
}
@media (max-width: 740px) {
  .section-heading { display: block; }
  .section-heading p { margin-top: 9px; }
  .seal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .account { grid-row: 1; }
}
@media (max-width: 540px) {
  .masthead, main, .store-footer, .document-page main, .document-page footer { width: calc(100% - 28px); }
  .masthead { min-height: 65px; gap: 8px; }
  .brand img { width: 68px; }
  .masthead nav { gap: 0 10px; justify-content: end; }
  .masthead nav a { font-size: 13px; }
  main { padding-block: 12px 30px; }
  .store-hero {
    align-items: end;
    min-height: 312px;
    padding: 157px 19px 20px;
    background: linear-gradient(180deg, #1a0c0700 60px, #120c0980 116px, #120c09 190px),
      url('art/seal-forge.webp') 55% top / auto 206px no-repeat, #120c09;
  }
  .store-hero--account {
    min-height: 0;
    padding: 16px;
    background: linear-gradient(90deg, #120c09 0%, #120c09f2 43%, #120c0928 95%),
      url('art/seal-forge.webp') 74% center / cover no-repeat, #120c09;
  }
  .store-hero--account .hero-copy > p:first-of-type { max-width: 24ch; margin-top: 7px; font-size: 16px; }
  .premium-feature { grid-template-columns: 1fr; margin-top: 15px; }
  .premium-copy { padding: 15px; }
  .premium-scene { height: 170px; min-height: 0; object-position: 50% 62%; }
  .seal-section { margin-top: 26px; }
  .seal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .seal-card { padding: 4px 5px 11px; }
  .seal-card img { height: 105px; }
  .seal-card:last-child {
    grid-column: 1 / -1;
    grid-template: 1fr 1fr / 96px minmax(0, 1fr);
    justify-items: start;
    gap: 0 12px;
    text-align: left;
  }
  .seal-card:last-child img { grid-row: 1 / -1; height: 95px; }
  .seal-card:last-child h3 { align-self: end; }
  .catalog li { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 4px 8px; }
  .catalog img { width: 60px; height: 60px; }
  .catalog .price { font-size: 14px; }
  .store-footer nav, .document-nav { gap: 0 16px; }
}
