@font-face {
  font-family: Cinzel;
  src: url("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("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("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("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;
  --ink: #070e18;
  --surface: #0b1523;
  --gold: #eccb8b;
  --gold-bright: #f7dfac;
  --amethyst: #c588f5;
  --text: #f5f0e6;
  --muted: #aab9cb;
  background: var(--ink);
}

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

body {
  min-block-size: 100vh;
  min-block-size: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.portal-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgb(224 190 124 / .16);
  background: rgb(7 14 24 / .86);
  backdrop-filter: blur(12px);
}

.portal-header-inner {
  width: min(100% - 3rem, 80rem);
  min-height: 4.1rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.portal-brand-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #f6e7c8;
  text-decoration: none;
  font-family: Cinzel, Georgia, serif;
  font-size: .92rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-brand-link img {
  display: block;
  width: 2rem;
  height: 2rem;
  filter: drop-shadow(0 0 .45rem rgb(108 192 248 / .3));
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
}

.portal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding-inline: .8rem;
  border-radius: .3rem;
  color: #cad6e4;
  font-size: .86rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.portal-nav a:hover {
  color: var(--text);
  background: rgb(255 255 255 / .05);
}

.portal-nav .portal-nav-guide {
  margin-left: .35rem;
  border: 1px solid rgb(219 182 114 / .5);
  background: linear-gradient(180deg, #2a2218, #1b1610);
  color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgb(255 232 184 / .16);
}

.portal-nav .portal-nav-guide:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #372c1d, #241c13);
  color: #fff3d6;
}

.access {
  position: relative;
  isolation: isolate;
  flex: 1 0 auto;
  display: grid;
  align-items: center;
  padding: clamp(2rem, 4.5vw, 4rem) clamp(1.5rem, 5.65vw, 5.5rem);
  background:
    linear-gradient(96deg, rgb(7 14 24 / .93) 0%, rgb(7 14 24 / .8) 40%, rgb(7 14 24 / .28) 68%, rgb(7 14 24 / .08) 100%),
    linear-gradient(180deg, rgb(7 14 24 / .45) 0%, transparent 22%, transparent 78%, rgb(7 14 24 / .82) 100%),
    #08131d url("komnata-krysztalu.webp") 72% center / cover no-repeat;
}

.access-content {
  width: min(100%, 34.5rem);
  min-width: 0;
}

.core-brand {
  display: flex;
  align-items: center;
  gap: clamp(.55rem, 1vw, .9rem);
  max-width: 24rem;
}

.core-emblem {
  width: clamp(3rem, 5.2vw, 4.75rem);
  height: auto;
  flex: none;
  filter: drop-shadow(0 .2rem .8rem rgb(3 8 18 / .75));
}

.core-wordmark {
  width: min(100%, 19rem);
  height: auto;
  min-width: 0;
  filter: drop-shadow(0 .2rem .7rem rgb(3 8 18 / .85));
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 1.55rem 0 0;
  color: var(--gold);
  font: 550 .74rem/1.4 Cinzel, Georgia, serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.portal-eyebrow::before {
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(236 203 139 / .78));
  content: "";
}

.access h1 {
  margin: .6rem 0 0;
  color: var(--gold-bright);
  font: 500 clamp(1.9rem, 3.3vw, 2.85rem)/1.12 Cinzel, Georgia, serif;
  letter-spacing: .018em;
  text-shadow: 0 .18rem 1rem rgb(3 7 14 / .85);
  text-wrap: balance;
}

.access-subtitle {
  margin: .75rem 0 0;
  max-width: 48ch;
  color: #c1cedd;
  font-size: .96rem;
  line-height: 1.6;
  text-wrap: balance;
}

.access-card {
  position: relative;
  margin-top: 1.55rem;
  padding: 1.45rem 1.5rem 1.55rem;
  border: 1px solid rgb(224 190 124 / .24);
  border-radius: .65rem;
  background:
    radial-gradient(ellipse 90% 80% at 100% 0%, rgb(164 88 228 / .12), transparent 62%),
    rgb(9 17 29 / .82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1.25rem 3.25rem rgb(2 5 12 / .6);
}

.access-card::before {
  position: absolute;
  inset-inline: 14%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(236 203 139 / .58), rgb(197 136 245 / .48), transparent);
  content: "";
}

.access-form {
  display: grid;
  gap: .75rem;
  width: 100%;
}

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

.access-form label {
  color: #dde5f0;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.access-form input {
  width: 100%;
  min-height: 3.2rem;
  padding: .72rem 1rem;
  border: 1px solid rgb(134 166 198 / .34);
  border-radius: .4rem;
  background: rgb(7 14 24 / .92);
  font: inherit;
  font-size: .98rem;
  color: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.access-form input::placeholder {
  color: #8295ab;
}

.access-form input:focus {
  border-color: rgb(197 136 245 / .75);
  box-shadow: 0 0 0 3px rgb(168 92 232 / .2);
  outline: none;
}

.access-form .access-submit {
  width: 100%;
  margin-top: .25rem;
  min-height: 3.25rem;
  padding: .72rem 1.25rem;
  border: 1px solid rgb(219 162 248 / .58);
  border-radius: .4rem;
  background: linear-gradient(180deg, #793a75, #4d214c);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: .015em;
  color: #fff5fc;
  box-shadow: inset 0 1px 0 rgb(255 224 255 / .28), 0 .45rem 1.4rem rgb(6 8 18 / .52);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.access-form .access-submit:hover:not(:disabled) {
  border-color: #eabfff;
  background: linear-gradient(180deg, #8b4487, #5b2859);
  box-shadow: inset 0 1px 0 rgb(255 224 255 / .38), 0 .55rem 1.8rem rgb(168 85 218 / .28);
  transform: translateY(-1px);
}

.access-form .access-submit:disabled {
  opacity: .68;
  cursor: wait;
}

.access :is(a, button, input):focus-visible {
  outline: 2px solid #a3dbff;
  outline-offset: 3px;
}

.access-links {
  margin-top: .95rem;
  padding-top: .95rem;
  border-top: 1px solid rgb(134 166 198 / .16);
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
}

.access-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .55rem .9rem;
  border: 1px solid rgb(134 166 198 / .28);
  border-radius: .38rem;
  background: rgb(15 27 43 / .72);
  color: #d6e0ec;
  font-size: .88rem;
  font-weight: 550;
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.access-guide-btn:hover {
  border-color: rgb(236 203 139 / .52);
  background: rgb(22 38 60 / .92);
  color: var(--gold-bright);
}

.access-logout {
  grid-column: 1 / -1;
  min-height: 2.75rem;
  padding: .5rem .85rem;
  border: 1px solid rgb(134 166 198 / .26);
  border-radius: .38rem;
  background: rgb(15 27 43 / .6);
  color: #e6c9f6;
  font-size: .88rem;
  font-weight: 550;
  cursor: pointer;
}

.access-logout:hover {
  border-color: rgb(219 162 248 / .58);
  color: #fff;
}

.access-logout[hidden] {
  display: none;
}

#status, #cards {
  margin-block: .9rem 0;
}

#status:empty, #cards:empty, #view:empty {
  display: none;
}

#status {
  width: 100%;
  padding: .6rem .8rem;
  border: 1px solid rgb(134 166 198 / .2);
  border-radius: .38rem;
  background: rgb(8 16 27 / .9);
  font-size: .88rem;
  line-height: 1.45;
}

#status.ok {
  border-color: rgb(125 214 140 / .35);
  color: #b7f0be;
}

#status.err {
  border-color: rgb(240 132 138 / .4);
  color: #ffc1c4;
}

#cards {
  display: grid;
  gap: .55rem;
}

#cards button {
  width: 100%;
  min-height: 2.9rem;
  padding: .6rem .95rem;
  border: 1px solid rgb(236 203 139 / .38);
  border-radius: .38rem;
  background: linear-gradient(180deg, #17273b, #0f1b2b);
  color: var(--gold-bright);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#cards button:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #1f344e, #152438);
}

#view:not(:empty) {
  padding: 1.5rem clamp(1rem, 5.65vw, 5.5rem);
}

@media (max-width: 760px) {
  .portal-header-inner {
    width: calc(100% - 2rem);
    min-height: 3.6rem;
    padding-block: .35rem;
  }

  .portal-nav a {
    padding-inline: .6rem;
    font-size: .81rem;
  }

  .access {
    display: block;
    padding: min(41svh, 21rem) 1.1rem 2rem;
    background: var(--ink);
  }

  .access::before {
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: min(52svh, 27rem);
    content: "";
    background:
      linear-gradient(0deg, var(--ink) 4%, rgb(7 14 24 / .35) 45%, transparent 100%),
      url("komnata-krysztalu.webp") 84% center / cover no-repeat;
  }

  .access-content {
    width: min(100%, 30rem);
    margin-inline: auto;
  }

  .core-brand {
    max-width: 19rem;
  }

  .access h1 {
    font-size: 1.8rem;
  }

  .access-card {
    padding: 1.25rem 1.15rem 1.3rem;
  }

  .access-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .portal-header-inner {
    width: calc(100% - 1.5rem);
  }

  .portal-brand-link {
    font-size: .82rem;
    letter-spacing: .12em;
  }

  .portal-brand-link img {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-form .access-submit {
    transition: none;
  }

  .access-form .access-submit:hover:not(:disabled) {
    transform: none;
  }
}
