@font-face {
  font-family: Cinzel;
  src: url("/rpgcards-komnata/cinzel-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Cinzel;
  src: url("/rpgcards-komnata/cinzel-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  src: url("/rpgcards-komnata/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter;
  src: url("/rpgcards-komnata/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --background: #070e18;
  --surface: #0c1624;
  --line: rgb(134 166 198 / .2);
  --gold: #eccb8b;
  --gold-bright: #f7dfac;
  --amethyst: #b77ce8;
  --text: #f5f0e6;
  --muted: #aab9cb;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: var(--gold);
  text-underline-offset: .22em;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

a:hover {
  color: var(--gold-bright);
}

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid #a3dbff;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  inset: .7rem auto auto 1rem;
  z-index: 30;
  padding: .6rem 1rem;
  border: 1px solid var(--gold);
  border-radius: .35rem;
  background: var(--surface);
}

.skip-link:not(:focus) {
  clip-path: inset(100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(224 190 124 / .16);
  background: rgb(7 14 24 / .86);
  backdrop-filter: blur(12px);
}

.topbar__inner,
.frame {
  width: min(calc(100% - 3rem), 80rem);
  margin-inline: auto;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.2rem;
  gap: .5rem 1.4rem;
  flex-wrap: wrap;
  padding-block: .5rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: .58rem;
  max-width: 100%;
  text-decoration: none;
}

.wordmark img {
  display: block;
  height: auto;
}

.wordmark img:first-child {
  width: 2.3rem;
  filter: drop-shadow(0 0 .45rem rgb(108 192 248 / .3));
}

.wordmark img:last-child {
  width: min(9.4rem, 42vw);
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .85rem;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: .45rem 1.05rem;
  border: 1px solid rgb(219 182 114 / .52);
  border-radius: .35rem;
  background: linear-gradient(180deg, #2a2218, #1b1610);
  color: var(--gold-bright);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 232 184 / .16);
}

.topbar nav a:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #372c1d, #241c13);
  color: #fff3d6;
  box-shadow: 0 0 1rem rgb(236 203 139 / .16);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  margin-block: 1.75rem 2.25rem;
  min-height: 17.5rem;
  padding: clamp(1.75rem, 4.5vw, 3.6rem);
  border: 1px solid rgb(224 190 124 / .24);
  border-radius: .75rem;
  background:
    linear-gradient(96deg, rgb(7 14 24 / .95) 8%, rgb(7 14 24 / .86) 44%, rgb(7 14 24 / .38) 74%, rgb(7 14 24 / .14) 100%),
    url("/rpgcards-komnata/komnata-krysztalu.webp") 76% 42% / cover no-repeat,
    #0b1523;
  box-shadow: 0 1.25rem 3.25rem rgb(2 6 12 / .48);
}

.hero::before {
  position: absolute;
  inset-inline: 14%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(236 203 139 / .58), rgb(183 124 232 / .45), transparent);
  content: "";
}

.hero__text {
  max-width: 44rem;
}

h1,
h2 {
  margin: 0;
  color: var(--gold-bright);
  font-family: Cinzel, Georgia, serif;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: .018em;
}

h1 {
  font-size: clamp(1.95rem, 3.8vw, 3.2rem);
  text-shadow: 0 .18rem 1rem rgb(3 7 14 / .75);
  text-wrap: balance;
}

.hero p {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: #cdd8e6;
  font-size: clamp(.98rem, 1.5vw, 1.08rem);
  line-height: 1.68;
}

.guide-layout {
  display: grid;
  grid-template-columns: 16.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.desktop-toc {
  position: sticky;
  top: 5.35rem;
  max-height: calc(100vh - 6.6rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(134 166 198 / .34) transparent;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: linear-gradient(180deg, #0d1827, #09111c);
  box-shadow: 0 .85rem 2.25rem rgb(2 6 12 / .36);
}

.desktop-toc::-webkit-scrollbar {
  width: 6px;
}

.desktop-toc::-webkit-scrollbar-track {
  background: transparent;
}

.desktop-toc::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgb(134 166 198 / .3);
}

.desktop-toc::-webkit-scrollbar-thumb:hover {
  background: rgb(236 203 139 / .5);
}

.toc {
  padding: 1.15rem 1.15rem 1.25rem;
}

.toc h2 {
  margin-bottom: .9rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgb(134 166 198 / .16);
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.toc-group + .toc-group {
  margin-top: .95rem;
}

.toc-group__title {
  display: inline-block;
  padding-block: .15rem;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}

.toc-group__title:hover {
  color: var(--gold-bright);
}

.toc-group ul {
  margin: .3rem 0 0;
  padding: 0;
  list-style: none;
}

.toc-group li a {
  display: block;
  padding: .24rem 0 .24rem .75rem;
  border-left: 1px solid rgb(134 166 198 / .2);
  color: var(--muted);
  font-size: .875rem;
  text-decoration: none;
}

.toc-group li a:hover {
  border-left-color: var(--gold);
  color: var(--text);
  background: rgb(255 255 255 / .03);
}

.mobile-toc {
  display: none;
}

.guide-note {
  margin-bottom: 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgb(183 124 232 / .24);
  border-left: 3px solid var(--amethyst);
  border-radius: .5rem;
  background: rgb(22 20 38 / .55);
  color: #ccd6e4;
  font-size: .94rem;
}

.guide-note p {
  margin: 0;
}

.guide-note p + p {
  margin-top: .5rem;
}

.guide-group {
  margin-bottom: 2.75rem;
  scroll-margin-top: 5.35rem;
}

.guide-group > h2 {
  margin-bottom: 1.15rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgb(224 190 124 / .2);
  font-size: clamp(1.5rem, 2.7vw, 2.05rem);
}

.guide-section {
  position: relative;
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.2rem;
  padding: clamp(1.2rem, 2.4vw, 1.75rem);
  scroll-margin-top: 5.35rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: linear-gradient(180deg, rgb(20 35 55 / .46), rgb(11 20 33 / .88) 45%, rgb(9 16 27 / .96));
  box-shadow: 0 .85rem 2.25rem rgb(2 6 12 / .34);
  transition: border-color 180ms ease;
}

.guide-section::before {
  position: absolute;
  inset-inline: 1.5rem;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(236 203 139 / .34), transparent);
  content: "";
}

.guide-section--compact {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr);
  align-items: start;
}

.guide-section:target {
  border-color: rgb(236 203 139 / .62);
  box-shadow: 0 0 0 1px rgb(236 203 139 / .22), 0 .85rem 2.25rem rgb(2 6 12 / .44);
}

.guide-section h3 {
  margin: 0 0 .5rem;
  color: var(--gold-bright);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.12rem, 1.9vw, 1.38rem);
  font-weight: 550;
  line-height: 1.28;
  letter-spacing: .015em;
}

.guide-section__where {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .92rem;
}

.guide-section__where strong {
  color: #dce5f0;
  font-weight: 600;
}

.guide-section dl {
  margin: 0;
}

.guide-section dl > div + div {
  margin-top: .85rem;
}

.guide-section dt {
  color: var(--gold);
  font-size: .94rem;
  font-weight: 650;
}

.guide-section dd {
  margin: .18rem 0 0;
  color: #cbd7e5;
  font-size: .94rem;
  line-height: 1.64;
}

.guide-section dd strong {
  color: var(--text);
  font-weight: 600;
}

.guide-section__visuals {
  display: grid;
  gap: .9rem;
  min-width: 0;
}

figure {
  width: min(100%, var(--image-width));
  margin: 0;
}

figure a {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgb(134 166 198 / .28);
  border-radius: .5rem;
  background: #060c14;
  box-shadow: 0 .65rem 1.8rem rgb(2 5 11 / .45);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

figure a:hover {
  border-color: rgb(236 203 139 / .65);
  box-shadow: 0 .8rem 2rem rgb(2 5 11 / .58), 0 0 1rem rgb(236 203 139 / .14);
}

figure img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin: 2rem 0 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .92rem;
}

@media (max-width: 960px) {
  .frame,
  .topbar__inner {
    width: min(calc(100% - 2rem), 80rem);
  }

  .guide-layout {
    display: block;
  }

  .desktop-toc {
    display: none;
  }

  .mobile-toc {
    display: block;
    margin-bottom: 1.15rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: linear-gradient(180deg, #0d1827, #09111c);
  }

  .mobile-toc summary {
    padding: .75rem 1rem;
    color: var(--gold-bright);
    font-family: Cinzel, Georgia, serif;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-toc .toc {
    padding-top: .25rem;
  }

  .mobile-toc .toc-group li a {
    font-size: .95rem;
    padding-block: .42rem;
  }
}

@media (max-width: 640px) {
  .hero {
    margin-top: 1rem;
    min-height: 0;
    padding: 1.75rem 1.25rem;
    background-position: right center;
    background-image:
      linear-gradient(95deg, rgb(7 14 24 / .95), rgb(7 14 24 / .86) 62%, rgb(7 14 24 / .55)),
      url("/rpgcards-komnata/komnata-krysztalu.webp");
  }

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

  .guide-section {
    padding: 1.15rem;
  }
}

.screen-viewer {
  width: fit-content;
  max-width: calc(100vw - 1rem);
  max-height: min(94dvh, 65rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(224 190 124 / .36);
  border-radius: .65rem;
  background: #0a1320;
  color: var(--text);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .7);
}

.screen-viewer[open] {
  display: flex;
  flex-direction: column;
}

.screen-viewer::backdrop {
  background: rgb(4 8 15 / .86);
  backdrop-filter: blur(4px);
}

.screen-viewer__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--line);
  background: #0d1827;
}

.screen-viewer__toolbar button {
  min-height: 2.5rem;
  padding: .4rem .85rem;
  border: 1px solid rgb(219 182 114 / .52);
  border-radius: .35rem;
  background: linear-gradient(180deg, #2a2218, #1b1610);
  color: var(--gold-bright);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}

.screen-viewer__toolbar button:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #372c1d, #241c13);
}

.screen-viewer__toolbar button:focus-visible,
.screen-viewer__scroll:focus-visible {
  outline: 2px solid #a3dbff;
  outline-offset: -3px;
}

.screen-viewer__scroll {
  overflow: auto;
}

.screen-viewer__scroll img {
  display: block;
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
