:root {
  --ink: #f3ead8;
  --ink-soft: rgba(243, 234, 216, 0.9);
  --muted: #c8bda6;
  --muted-soft: rgba(200, 189, 166, 0.78);
  --gold: #9b8e4a;
  --gold-soft: rgba(155, 142, 74, 0.45);
  --panel: rgba(8, 17, 25, 0.66);
  --line: rgba(220, 205, 158, 0.16);
  --topbar: rgba(6, 14, 22, 0.55);
  --footer: rgba(5, 11, 18, 0.88);
  --button-ink: #fbf4df;
  --theme-surface: rgba(7, 15, 24, 0.54);
  --theme-active: rgba(155, 142, 74, 0.38);
  --portal-modal-glass: rgba(11, 18, 24, 0.56);
  --portal-modal-glass-strong: rgba(16, 24, 30, 0.42);
  --portal-modal-ink: #f5ecd8;
  --portal-modal-muted: rgba(245, 236, 216, 0.84);
  --page-bg-position: center top;
  --page-bg-size: cover;
}

:root[data-scene="day"] {
  --ink: #17212b;
  --ink-soft: rgba(23, 33, 43, 0.9);
  --muted: #394453;
  --muted-soft: rgba(57, 68, 83, 0.82);
  --gold: #78672c;
  --gold-soft: rgba(120, 103, 44, 0.5);
  --panel: rgba(249, 246, 235, 0.72);
  --line: rgba(58, 48, 24, 0.18);
  --topbar: rgba(247, 243, 230, 0.72);
  --footer: rgba(247, 243, 230, 0.86);
  --button-ink: #fff9e8;
  --theme-surface: rgba(255, 252, 241, 0.66);
  --theme-active: rgba(120, 103, 44, 0.18);
  --portal-modal-glass: rgba(247, 243, 229, 0.34);
  --portal-modal-glass-strong: rgba(255, 252, 242, 0.26);
  --portal-modal-ink: #17212b;
  --portal-modal-muted: rgba(23, 33, 43, 0.82);
}

:root[data-scene="animation"] {
  --ink: #17212b;
  --ink-soft: rgba(23, 33, 43, 0.9);
  --muted: #394453;
  --muted-soft: rgba(57, 68, 83, 0.82);
  --gold: #78672c;
  --gold-soft: rgba(120, 103, 44, 0.5);
  --panel: rgba(249, 246, 235, 0.72);
  --line: rgba(58, 48, 24, 0.18);
  --topbar: rgba(247, 243, 230, 0.72);
  --footer: rgba(247, 243, 230, 0.86);
  --button-ink: #fff9e8;
  --theme-surface: rgba(255, 252, 241, 0.66);
  --theme-active: rgba(120, 103, 44, 0.18);
  --portal-modal-glass: rgba(247, 243, 229, 0.34);
  --portal-modal-glass-strong: rgba(255, 252, 242, 0.26);
  --portal-modal-ink: #17212b;
  --portal-modal-muted: rgba(23, 33, 43, 0.82);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: #07111b;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  transition: color 700ms ease, background-color 900ms ease;
}

body::before {
  content: none;
}

.scene-backgrounds,
.scene-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.scene-backgrounds {
  z-index: -2;
  overflow: hidden;
  background: #07111b;
}

.scene-background {
  background-position: var(--page-bg-position);
  background-size: var(--page-bg-size);
  background-repeat: no-repeat;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity 1400ms ease-in-out, filter 1400ms ease-in-out;
}

.scene-background-day {
  background-image: url("mytikas-bg-day.png");
}

.scene-background-evening {
  background-image: url("mytikas-bg-evening.png");
}

.scene-background-night {
  background-image: url("mytikas-bg-night.png");
}

:root[data-scene="day"] .scene-background-day,
:root[data-scene="evening"] .scene-background-evening,
:root[data-scene="night"] .scene-background-night {
  opacity: 1;
}

:root[data-scene="night"] .scene-background-night {
  filter: saturate(0.96) brightness(0.92);
}

.background-video {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

:root[data-scene="animation"] .background-video[data-video-scene="animation"] {
  opacity: 1;
}

:root[data-scene="animation"] .scene-background {
  opacity: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 0 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--topbar);
  backdrop-filter: blur(14px);
  transition: background-color 700ms ease, border-color 700ms ease, color 700ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.user-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold);
  letter-spacing: 0;
  transition: border-color 700ms ease, color 700ms ease;
}

.server-status-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold);
  transition: border-color 700ms ease, color 700ms ease, box-shadow 300ms ease, transform 300ms ease;
}

.server-status-link::before {
  content: "";
  width: 15px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 -3px 0 rgba(184, 159, 92, 0.24);
}

.server-status-link span {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4cdbff;
  box-shadow: 0 0 12px rgba(76, 219, 255, 0.75);
}

.server-status-link:hover,
.server-status-link:focus-visible {
  border-color: rgba(76, 219, 255, 0.72);
  box-shadow: 0 0 22px rgba(76, 219, 255, 0.14);
  transform: translateY(-1px);
}

.brand-logo {
  display: block;
  width: 244px;
  height: auto;
}

.brand-logo-dark {
  display: none;
}

:root[data-theme="light"] .brand-logo-light {
  display: none;
}

:root[data-theme="light"] .brand-logo-dark {
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 42px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

nav a {
  position: relative;
  padding: 28px 0 24px;
  color: rgba(243, 234, 216, 0.76);
  transition: color 700ms ease;
}

:root[data-theme="light"] nav a {
  color: rgba(23, 33, 43, 0.72);
}

nav a.active,
nav a:hover {
  color: var(--ink);
}

nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 2px;
  background: var(--gold);
}

.tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(243, 234, 216, 0.72);
  font-size: 11px;
  letter-spacing: 3px;
  transition: color 700ms ease;
}

:root[data-theme="light"] .tools {
  color: rgba(23, 33, 43, 0.72);
}

.scene-switcher {
  display: inline-grid;
  grid-template-columns: repeat(5, auto);
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--theme-surface);
  transition: background-color 700ms ease, border-color 700ms ease;
}

.scene-switcher button {
  appearance: none;
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 700ms ease, color 700ms ease;
}

.scene-switcher button.active,
.scene-switcher button:hover {
  background: var(--theme-active);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 82px);
  padding: 78px 5.2vw 32px;
}

.tree-note {
  position: absolute;
  top: clamp(150px, 31vh, 310px);
  right: clamp(135px, 17vw, 320px);
  z-index: 3;
}

.tree-note-trigger,
.tree-note-close {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.tree-note-trigger {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 159, 92, 0.72);
  border-radius: 50%;
  background: rgba(8, 17, 25, 0.62);
  color: #e9e7e1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 8px rgba(184, 159, 92, 0.08);
  transition: transform 220ms ease, box-shadow 260ms ease, background 260ms ease;
}

:root[data-theme="light"] .tree-note-trigger {
  background: rgba(247, 243, 230, 0.76);
  color: #17212b;
}

.tree-note-trigger:hover,
.tree-note-trigger:focus-visible,
.tree-note.open .tree-note-trigger {
  transform: translateY(-2px) scale(1.04);
  background: rgba(14, 22, 33, 0.84);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32), 0 0 0 11px rgba(184, 159, 92, 0.12), 0 0 22px rgba(76, 219, 255, 0.16);
}

.tree-note-panel {
  position: absolute;
  top: 46px;
  right: -18px;
  width: min(420px, calc(100vw - 40px));
  max-height: min(66vh, 560px);
  overflow: auto;
  padding: 24px 24px 22px;
  border: 1px solid rgba(184, 159, 92, 0.3);
  background: rgba(8, 17, 25, 0.88);
  color: #f3ead8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 12px, 0) scale(0.98);
  transform-origin: 88% 0;
  transition: opacity 240ms ease, transform 300ms ease;
}

.tree-note:hover .tree-note-panel,
.tree-note:focus-within .tree-note-panel,
.tree-note.open .tree-note-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

:root[data-theme="light"] .tree-note-panel {
  background: rgba(249, 246, 235, 0.9);
  color: #17212b;
}

.tree-note-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 1;
}

.panel-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tree-note-panel h3 {
  margin: 0 32px 14px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.15;
}

.tree-note-panel p {
  margin: 0 0 13px;
  color: currentColor;
  font-size: 14px;
  line-height: 1.62;
}

.tree-note-panel blockquote {
  margin: 18px 0 0;
  padding: 13px 0 0;
  border-top: 1px solid rgba(184, 159, 92, 0.34);
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.45;
}

.intro {
  width: min(560px, 92vw);
}

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

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 8vw, 116px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 16px;
}

.rule {
  width: min(420px, 74vw);
  height: 1px;
  margin: 34px 0 24px;
  background: linear-gradient(90deg, var(--gold-soft), rgba(155, 142, 74, 0.02));
}

h2 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 400;
  color: var(--ink-soft);
}

.lead {
  max-width: 500px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.button {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 24px;
  background: rgba(139, 130, 55, 0.82);
  color: var(--button-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.contact-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 16, 0.62);
  backdrop-filter: blur(12px);
}

.contact-panel {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(8, 17, 25, 0.82);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #f3ead8;
  transform: translateY(16px) scale(0.98);
  transition: transform 280ms ease;
}

.contact-modal.open .contact-panel {
  transform: translateY(0) scale(1);
}

.status-modal {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 52px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.status-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.status-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 16, 0.48);
  backdrop-filter: blur(8px);
}

.status-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 40px));
  height: min(760px, calc(100vh - 64px));
  border: 1px solid rgba(220, 205, 158, 0.26);
  background: rgba(8, 17, 25, 0.78);
  box-shadow: 0 32px 88px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f3ead8;
  transform: translateY(16px) scale(0.985);
  transition: transform 280ms ease;
  overflow: hidden;
}

.status-modal.open .status-panel {
  transform: translateY(0) scale(1);
}

.status-panel-head {
  display: grid;
  grid-template-columns: 1fr auto 34px;
  align-items: center;
  gap: 16px;
  padding: 18px 56px 14px 22px;
  border-bottom: 1px solid rgba(220, 205, 158, 0.14);
}

.status-panel h3 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.status-external {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.status-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.contact-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(220, 205, 158, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold);
  font-size: 22px;
  cursor: pointer;
}

.contact-panel h3 {
  margin: 6px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.contact-form,
.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form {
  gap: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-form label span {
  color: rgba(200, 189, 166, 0.9);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(220, 205, 158, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f3ead8;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 13px;
  outline: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 142px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(184, 159, 92, 0.78);
  box-shadow: 0 0 0 3px rgba(184, 159, 92, 0.12);
}

.contact-file small,
.contact-status {
  color: rgba(200, 189, 166, 0.78);
  font-size: 12px;
  line-height: 1.4;
}

.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit {
  justify-self: start;
  margin-top: 4px;
}

.contact-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.portal-section {
  margin-top: min(8vh, 72px);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.portal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-inline: 5.2vw;
}

.portal-controls {
  display: none;
  gap: 8px;
}

.portal-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--gold);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 260ms ease, color 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}

.portal-controls button:hover,
.portal-controls button:focus-visible {
  border-color: rgba(76, 219, 255, 0.58);
  color: var(--ink);
  box-shadow: 0 0 24px rgba(76, 219, 255, 0.14);
  transform: translateY(-1px);
}

.portal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(160px, 14vw, 210px);
  gap: 10px;
  isolation: isolate;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scroll-padding-inline: 5px;
  padding: 5px max(16px, 3.8vw) 20px;
  scrollbar-color: rgba(184, 159, 92, 0.7) rgba(255, 255, 255, 0.08);
}

.portal-card {
  position: relative;
  border-radius: 8px;
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(76, 219, 255, 0.22), transparent 30%),
    radial-gradient(circle at 78% 76%, rgba(184, 159, 92, 0.2), transparent 32%);
  opacity: 0;
  transition: opacity 360ms ease, transform 420ms ease;
}

.portal-card a {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 244px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.13);
  background-clip: padding-box;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-radius: inherit;
  clip-path: inset(0 round 8px);
  overflow: hidden;
  outline: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: paint;
  transition: transform 320ms ease, border-color 320ms ease, box-shadow 320ms ease, background-color 320ms ease;
}

.portal-embed-open {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 58px;
  min-height: 54px;
  padding: 5px 4px 4px;
  border: 1px solid rgba(184, 159, 92, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.28);
  color: #17212b;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  backdrop-filter: blur(12px) saturate(1.06);
  opacity: 0.78;
  transition: opacity 220ms ease, transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.portal-embed-open span {
  font-size: 17px;
  line-height: 1;
  color: #806d2d;
}

.portal-embed-open small {
  display: block;
  font-size: 7px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.portal-embed-open:hover,
.portal-embed-open:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(184, 159, 92, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.42);
  outline: none;
}

.portal-mark {
  --mark: #78672c;
  position: relative;
  display: grid;
  place-items: center;
  justify-self: start;
  width: 46px;
  height: 46px;
  margin: 0 0 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--mark);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.34)),
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.86), transparent 58%);
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.09), inset 0 0 0 5px rgba(255, 255, 255, 0.12);
  transition: transform 360ms ease, box-shadow 360ms ease, border-color 360ms ease;
}

.portal-mark::before {
  content: attr(data-glyph);
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0;
}

.portal-mark[data-glyph="360"]::before {
  font-size: 13px;
  letter-spacing: 1px;
}

.portal-mark::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 9px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.56;
  background:
    linear-gradient(90deg, transparent 0 18%, currentColor 18% 24%, transparent 24% 38%, currentColor 38% 44%, transparent 44% 56%, currentColor 56% 62%, transparent 62% 76%, currentColor 76% 82%, transparent 82%);
}

.portal-medal {
  display: grid;
  place-items: center;
  justify-self: start;
  width: 54px;
  height: 54px;
  margin: -2px 0 3px -2px;
  border-radius: 50%;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.12));
  transition: transform 360ms ease, filter 360ms ease;
}

.portal-medal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-emblem {
  display: grid;
  place-items: center;
  justify-self: start;
  width: 56px;
  height: 52px;
  margin: -2px 0 3px -3px;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.12));
  transition: transform 360ms ease, filter 360ms ease;
}

.portal-emblem img,
.portal-emblem video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-emblem video {
  border-radius: inherit;
}

.portal-emblem-depositum {
  width: 62px;
  height: 56px;
}

.portal-emblem-horizon {
  width: 58px;
  height: 58px;
  margin: -3px 0 1px -4px;
}

.portal-emblem-dzwonnik {
  width: 50px;
  height: 50px;
  margin: -1px 0 5px -2px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18)) drop-shadow(0 0 1px rgba(23, 33, 43, 0.32));
}

.portal-emblem-panteon {
  width: 56px;
  height: 52px;
  margin: -1px 0 4px -3px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.14));
}

.portal-emblem-panoptes {
  width: 54px;
  height: 54px;
  margin: -2px 0 3px -3px;
  border-radius: 50%;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.16)) drop-shadow(0 0 10px rgba(76, 219, 255, 0.12));
}

.portal-emblem-ups {
  width: 52px;
  height: 58px;
  margin: -4px 0 1px -3px;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.16)) drop-shadow(0 0 12px rgba(76, 219, 255, 0.1));
}

.portal-emblem-kodron-pl {
  width: 44px;
  height: 48px;
  margin: 0 0 6px -1px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.13));
}

.mark-gold { --mark: #8b752f; }
.mark-cyan { --mark: #1681a8; }
.mark-teal { --mark: #11877e; }
.mark-blue { --mark: #1e6fa8; }
.mark-green { --mark: #187d62; }
.mark-violet { --mark: #7a4ba6; }
.mark-amber { --mark: #a16412; }

.portal-card:hover::before,
.portal-card:focus-within::before,
.portal-card.portal-card-open::before {
  opacity: 1;
  transform: scale(1.015);
}

.portal-card:hover a,
.portal-card:focus-within a,
.portal-card.portal-card-open a {
  border-color: rgba(184, 159, 92, 0.46);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22), 0 0 24px rgba(184, 159, 92, 0.1);
  transform: translate3d(0, -3px, 0);
}

.portal-card.portal-card-open a {
  border-color: rgba(184, 159, 92, 0.68);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 232, 159, 0.18),
    0 0 30px rgba(184, 159, 92, 0.22);
}

.portal-modal {
  display: contents;
  padding: 0;
  pointer-events: none;
}

.portal-modal.open {
  pointer-events: none;
}

.portal-window-layer {
  display: contents;
  pointer-events: none;
}

.portal-modal-panel {
  position: fixed;
  left: 50%;
  top: 46%;
  width: min(760px, calc(100vw - 34px));
  max-height: calc(100vh - 52px);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(220, 188, 111, 0.62);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(145deg, var(--portal-modal-glass), var(--portal-modal-glass-strong)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 34px 92px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 245, 207, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: var(--portal-modal-ink);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
  backdrop-filter: blur(24px) saturate(1.18);
  cursor: grab;
  pointer-events: auto;
  transform: translate(-50%, -50%) translateY(16px) scale(0.985);
  transition: transform 280ms ease;
}

.portal-modal-panel.is-active {
  box-shadow:
    0 38px 98px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 245, 207, 0.24),
    0 0 34px rgba(184, 159, 92, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.portal-modal-panel.is-positioned {
  max-height: none;
  transform: none;
  transition: none;
}

.portal-modal-panel.is-opening {
  transform-origin: 0 0;
  will-change: transform, opacity, filter;
}

.portal-modal-panel.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.portal-modal-panel.is-resizing {
  user-select: none;
}

.portal-modal-scroll {
  height: 100%;
  max-height: inherit;
  overflow: auto;
  padding: clamp(24px, 3.2vw, 40px);
}

.portal-modal-panel::before,
.portal-modal-panel::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border-radius: 8px;
}

.portal-modal-panel::before {
  border: 1px solid rgba(184, 159, 92, 0.34);
}

.portal-modal-panel::after {
  border-top: 1px solid rgba(255, 228, 153, 0.58);
  border-bottom: 1px solid rgba(184, 159, 92, 0.2);
  mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.portal-modal.open .portal-modal-panel {
  transform: translate(-50%, -50%) scale(1);
}

.portal-modal.open .portal-modal-panel.is-positioned {
  transform: none;
}

@keyframes portalWindowDock {
  0% {
    left: var(--portal-open-left);
    top: var(--portal-open-top);
    width: var(--portal-open-width);
    height: var(--portal-open-height);
    opacity: 0.62;
    filter: saturate(1.08) brightness(1.05);
    transform: translate3d(0, 0, 0) scale(0.985);
  }
  56% {
    left: calc(var(--portal-final-left) - 8px);
    top: calc(var(--portal-final-top) - 8px);
    width: calc(var(--portal-final-width) + 16px);
    height: calc(var(--portal-final-height) + 14px);
    opacity: 0.94;
    filter: saturate(1.16) brightness(1.08);
    transform: translate3d(0, 0, 0) scale(1.01);
  }
  100% {
    left: var(--portal-final-left);
    top: var(--portal-final-top);
    width: var(--portal-final-width);
    height: var(--portal-final-height);
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.portal-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 159, 92, 0.46);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--portal-modal-ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.portal-modal-top {
  display: grid;
  grid-template-columns: minmax(94px, 132px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
  margin: 0 36px 18px 0;
}

.portal-modal-emblem {
  display: grid;
  place-items: center;
  min-width: 0;
}

.portal-modal-emblem .portal-medal,
.portal-modal-emblem .portal-emblem,
.portal-modal-emblem .portal-mark {
  width: clamp(92px, 14vw, 130px);
  height: clamp(92px, 14vw, 130px);
  margin: 0;
  justify-self: center;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.24));
}

.portal-modal-emblem .portal-emblem-dzwonnik,
.portal-modal-emblem .portal-emblem-kodron-pl {
  width: clamp(82px, 12vw, 118px);
  height: clamp(82px, 12vw, 118px);
}

.portal-modal-emblem .portal-emblem-panoptes {
  border-radius: 50%;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.24)) drop-shadow(0 0 18px rgba(76, 219, 255, 0.18));
}

.portal-modal-emblem img,
.portal-modal-emblem video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-modal-heading {
  min-width: 0;
}

.portal-modal-panel h3 {
  margin: 6px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.4vw, 54px);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--portal-modal-ink);
}

.portal-modal-url {
  margin: 0 0 22px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 2px;
}

.portal-modal-desc,
.portal-modal-full {
  margin: 0;
  max-width: 62ch;
  color: var(--portal-modal-muted);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.62;
}

.portal-modal-full {
  margin-top: 14px;
}

.portal-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.portal-modal-panel-embedded .portal-modal-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-modal-panel-embedded .portal-modal-top {
  margin-bottom: 0;
}

.portal-modal-panel-embedded .portal-modal-desc {
  max-width: 86ch;
}

.portal-embed-note {
  margin: -2px 0 0;
  max-width: 88ch;
  color: var(--portal-modal-muted);
  font-size: 13px;
  line-height: 1.5;
}

.portal-embed-frame-wrap {
  flex: 1 1 auto;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid rgba(184, 159, 92, 0.32);
  border-radius: 8px;
  background: rgba(4, 10, 16, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 18px 34px rgba(0, 0, 0, 0.18);
}

.portal-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #fff;
}

.portal-modal-actions,
.portal-modal-close,
.portal-modal-actions a,
.portal-modal-actions button {
  cursor: auto;
}

.portal-modal-actions a,
.portal-modal-actions button,
.portal-modal-close {
  cursor: pointer;
}

.portal-resize-handle {
  position: absolute;
  z-index: 2;
  pointer-events: auto;
}

.portal-resize-n,
.portal-resize-s {
  left: 18px;
  right: 18px;
  height: 16px;
  cursor: ns-resize;
}

.portal-resize-n { top: 0; }
.portal-resize-s { bottom: 0; }

.portal-resize-e,
.portal-resize-w {
  top: 18px;
  bottom: 18px;
  width: 16px;
  cursor: ew-resize;
}

.portal-resize-e { right: 0; }
.portal-resize-w { left: 0; }

.portal-resize-ne,
.portal-resize-se,
.portal-resize-sw,
.portal-resize-nw {
  width: 18px;
  height: 18px;
}

.portal-resize-ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.portal-resize-se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

.portal-resize-sw {
  left: 0;
  bottom: 0;
  cursor: nesw-resize;
}

.portal-resize-nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--portal-modal-ink);
  border: 1px solid rgba(184, 159, 92, 0.36);
}

.portal-card:hover .portal-mark,
.portal-card:focus-within .portal-mark {
  border-color: currentColor;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14), 0 0 18px rgba(184, 159, 92, 0.18);
  transform: translateY(-2px) scale(1.03);
}

.portal-card:hover .portal-medal,
.portal-card:focus-within .portal-medal {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.16)) drop-shadow(0 0 14px rgba(184, 159, 92, 0.18));
  transform: translateY(-2px) scale(1.04);
}

.portal-card:hover .portal-emblem,
.portal-card:focus-within .portal-emblem {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.16)) drop-shadow(0 0 14px rgba(184, 159, 92, 0.18));
  transform: translateY(-2px) scale(1.04);
}

.portal-copy {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 0 1px 1px;
  min-width: 0;
}

.portal-title {
  color: #17212b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.portal-url {
  color: #78672c;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
}

.portal-desc {
  color: rgba(23, 33, 43, 0.84);
  font-size: 12.5px;
  line-height: 1.38;
}

.portal-meta {
  align-self: end;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(23, 33, 43, 0.12);
  color: rgba(23, 33, 43, 0.58);
  font-size: 10px;
  letter-spacing: 0.5px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
  margin-top: min(8vh, 72px);
}

.tile {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: background-color 700ms ease, border-color 700ms ease, color 700ms ease;
}

.tile-link {
  display: block;
  height: 100%;
}

.icon {
  display: block;
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.tile h3 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.tile h3::after {
  content: "";
  display: block;
  width: 20px;
  height: 1px;
  margin-top: 10px;
  background: var(--gold);
}

.tile p {
  min-height: 44px;
  margin: 0 0 16px;
  color: var(--muted-soft);
  font-size: 12px;
  line-height: 1.55;
  transition: color 700ms ease;
}

.tile a {
  color: var(--muted-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tile-olimp,
.tile-archive,
.tile-observatory,
.tile-horizon {
  padding: 0;
  isolation: isolate;
}

.tile-olimp::before,
.tile-archive::before,
.tile-observatory::before,
.tile-horizon::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: -1;
  opacity: 0;
  background:
    radial-gradient(circle at 30% 24%, rgba(79, 224, 255, 0.28), transparent 22%),
    radial-gradient(circle at 76% 72%, rgba(184, 159, 92, 0.24), transparent 28%);
  transform: translate3d(-12px, 10px, 0) scale(0.96);
  transition: opacity 320ms ease, transform 520ms ease;
}

.tile-observatory::before {
  background:
    radial-gradient(circle at 32% 26%, rgba(76, 219, 255, 0.34), transparent 24%),
    radial-gradient(circle at 72% 74%, rgba(92, 107, 67, 0.3), transparent 30%);
}

.tile-archive::before {
  background:
    radial-gradient(circle at 30% 26%, rgba(184, 159, 92, 0.34), transparent 24%),
    radial-gradient(circle at 76% 72%, rgba(14, 22, 33, 0.44), transparent 30%),
    linear-gradient(125deg, rgba(184, 159, 92, 0.12), transparent 48%);
}

.tile-horizon::before {
  background:
    radial-gradient(circle at 34% 24%, rgba(76, 219, 255, 0.34), transparent 22%),
    radial-gradient(circle at 55% 55%, rgba(184, 159, 92, 0.2), transparent 28%),
    linear-gradient(115deg, transparent 18%, rgba(76, 219, 255, 0.14) 50%, transparent 74%);
}

.tile-olimp .tile-link,
.tile-archive .tile-link,
.tile-observatory .tile-link,
.tile-horizon .tile-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 154px;
  padding: 16px 14px 14px;
}

.olimp-orb {
  position: relative;
  display: block;
  width: 64px;
  aspect-ratio: 1;
  border: 1px solid rgba(184, 159, 92, 0.56);
  border-radius: 50%;
  background: rgba(14, 22, 33, 0.42);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transform: translate3d(0, 0, 0);
  transition: transform 420ms ease, box-shadow 420ms ease, border-color 420ms ease;
}

.olimp-orb::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  opacity: 0;
  border: 1px solid rgba(76, 219, 255, 0.5);
  transform: scale(0.82);
  transition: opacity 380ms ease, transform 520ms ease;
}

.observatory-orb {
  border-color: rgba(76, 219, 255, 0.5);
}

.horizon-orb {
  border-color: rgba(184, 159, 92, 0.62);
}

.depositum-orb {
  border-color: rgba(184, 159, 92, 0.7);
  background: rgba(8, 14, 22, 0.58);
}

.olimp-orb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.tile-copy,
.tile-title,
.tile-line,
.tile-text,
.tile-more {
  display: block;
}

.tile-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 2.4px;
  color: var(--ink);
  text-transform: uppercase;
  transition: color 700ms ease;
}

.tile-line {
  width: 20px;
  height: 1px;
  margin: 10px 0 12px;
  background: var(--gold);
}

.tile-text {
  min-height: 0;
  margin: 0 0 12px;
  color: var(--muted-soft);
  font-size: 11.2px;
  line-height: 1.36;
  text-transform: none;
  letter-spacing: 0;
  transition: color 700ms ease;
}

.tile-more {
  color: var(--muted-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.tile-olimp:hover::before,
.tile-olimp:focus-within::before,
.tile-archive:hover::before,
.tile-archive:focus-within::before,
.tile-observatory:hover::before,
.tile-observatory:focus-within::before,
.tile-horizon:hover::before,
.tile-horizon:focus-within::before {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.tile-olimp:hover .olimp-orb,
.tile-olimp:focus-within .olimp-orb,
.tile-archive:hover .olimp-orb,
.tile-archive:focus-within .olimp-orb,
.tile-observatory:hover .olimp-orb,
.tile-observatory:focus-within .olimp-orb,
.tile-horizon:hover .olimp-orb,
.tile-horizon:focus-within .olimp-orb {
  border-color: rgba(76, 219, 255, 0.76);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 24px rgba(76, 219, 255, 0.18);
  transform: translate3d(4px, -5px, 0) rotate(-2deg) scale(1.04);
}

.tile-olimp:hover .olimp-orb::after,
.tile-olimp:focus-within .olimp-orb::after,
.tile-archive:hover .olimp-orb::after,
.tile-archive:focus-within .olimp-orb::after,
.tile-observatory:hover .olimp-orb::after,
.tile-observatory:focus-within .olimp-orb::after,
.tile-horizon:hover .olimp-orb::after,
.tile-horizon:focus-within .olimp-orb::after {
  opacity: 1;
  transform: scale(1);
}

.tile-olimp:hover .tile-more,
.tile-olimp:focus-within .tile-more,
.tile-archive:hover .tile-more,
.tile-archive:focus-within .tile-more,
.tile-observatory:hover .tile-more,
.tile-observatory:focus-within .tile-more,
.tile-horizon:hover .tile-more,
.tile-horizon:focus-within .tile-more {
  color: var(--gold);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 5vw 28px;
  color: rgba(243, 234, 216, 0.72);
  background: var(--footer);
}

:root[data-theme="light"] footer {
  color: rgba(23, 33, 43, 0.72);
}

footer span {
  width: min(140px, 16vw);
  height: 1px;
  background: rgba(220, 205, 158, 0.16);
}

footer p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 5px;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 28px;
  }

  nav {
    display: none;
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-aspect-ratio: 16/10) {
  .scene-background {
    background-size: auto 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-background,
  .background-video,
  .portal-card::before,
  .portal-card a,
  .portal-mark,
  .portal-medal,
  .portal-emblem,
  .tile-olimp::before,
  .tile-archive::before,
  .tile-observatory::before,
  .tile-horizon::before,
  .olimp-orb,
  .olimp-orb::after,
  .tree-note-trigger,
  .tree-note-panel {
    transition: none;
  }
}

@media (max-width: 640px) {
  body {
    background-position: var(--page-bg-position);
    background-attachment: scroll;
  }

  .topbar {
    min-height: 72px;
    padding: 0 18px;
  }

  .brand {
    max-width: 200px;
  }

  .brand-logo {
    width: min(214px, 54vw);
  }

  .language,
  .user-icon {
    display: none;
  }

  .tools {
    gap: 0;
  }

  .scene-switcher button {
    padding: 0 5px;
    font-size: 8px;
    letter-spacing: 0.6px;
  }

  .hero {
    min-height: auto;
    padding: 58px 20px 28px;
  }

  .tree-note {
    top: 112px;
    right: 24px;
  }

  .tree-note-panel {
    position: fixed;
    top: 96px;
    left: 20px;
    right: 20px;
    width: auto;
    max-height: calc(100vh - 128px);
    transform-origin: 90% 0;
  }

  h1 {
    font-size: 56px;
    letter-spacing: 8px;
  }

  .lead {
    font-size: 15px;
  }

  .tiles {
    grid-template-columns: 1fr;
    margin-top: 48px;
  }

  .portal-section {
    margin-top: 48px;
  }

  .portal-head {
    align-items: flex-start;
    padding-inline: 20px;
  }

  .portal-rail {
    grid-auto-columns: minmax(220px, 74vw);
    gap: 10px;
    padding: 5px 20px 16px;
  }

  .portal-card a {
    min-height: 274px;
    padding: 9px;
  }

  .portal-mark {
    width: 48px;
    height: 48px;
  }

  .portal-medal {
    width: 52px;
    height: 52px;
  }

  .portal-emblem,
  .portal-emblem-depositum {
    width: 58px;
    height: 52px;
  }

  .portal-emblem-horizon {
    width: 54px;
    height: 54px;
  }

  .portal-emblem-dzwonnik {
    width: 48px;
    height: 48px;
  }

  .portal-emblem-panteon {
    width: 52px;
    height: 48px;
  }

  .portal-emblem-panoptes {
    width: 52px;
    height: 52px;
  }

  .portal-emblem-ups {
    width: 50px;
    height: 56px;
  }

  .portal-emblem-kodron-pl {
    width: 42px;
    height: 46px;
  }

  .portal-title {
    font-size: 15px;
  }

  .portal-url {
    font-size: 10.5px;
  }

  .portal-desc {
    font-size: 12.5px;
    line-height: 1.38;
  }

  .tile-olimp .tile-link,
  .tile-archive .tile-link,
  .tile-observatory .tile-link,
  .tile-horizon .tile-link {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .olimp-orb {
    width: 68px;
  }

  .contact-modal {
    padding: 16px;
  }

  .contact-panel {
    padding: 24px 18px;
  }

  .status-modal {
    padding: 14px;
  }

  .status-panel {
    width: calc(100vw - 28px);
    height: min(720px, calc(100vh - 28px));
  }

  .status-panel-head {
    grid-template-columns: 1fr 34px;
    padding: 16px 54px 12px 16px;
  }

  .status-external {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 24px 20px;
  }

  footer span {
    display: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  :root {
    --page-bg-size: auto 100%;
    --page-bg-position: 58% top;
  }

  .scene-background,
  .background-video {
    background-position: var(--page-bg-position);
    object-position: 58% top;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand status"
      "tools tools";
    row-gap: 8px;
    column-gap: 10px;
    min-height: 0;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    background: rgba(247, 243, 230, 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    backdrop-filter: blur(16px) saturate(1.08);
  }

  :root[data-theme="dark"] .topbar {
    background: rgba(6, 14, 22, 0.74);
  }

  .brand {
    grid-area: brand;
    max-width: none;
    min-width: 0;
  }

  .brand-logo {
    width: clamp(138px, 42vw, 184px);
  }

  nav,
  .language,
  .user-icon {
    display: none;
  }

  .tools {
    grid-area: tools;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
    color: rgba(23, 33, 43, 0.78);
  }

  :root[data-theme="dark"] .tools {
    color: rgba(243, 234, 216, 0.8);
  }

  .server-status-link {
    grid-area: status;
    justify-self: end;
    width: 34px;
    height: 34px;
  }

  .scene-switcher {
    display: flex;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .scene-switcher::-webkit-scrollbar {
    display: none;
  }

  .scene-switcher button {
    flex: 1 0 auto;
    min-height: 32px;
    padding: 0 10px;
    font-size: 9px;
    letter-spacing: 1px;
    white-space: nowrap;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 96px);
    padding: clamp(38px, 8vh, 72px) 18px 0;
  }

  .hero-shade {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(247, 243, 230, 0.62) 0%, rgba(247, 243, 230, 0.24) 52%, transparent 100%),
      linear-gradient(180deg, rgba(247, 243, 230, 0.28) 0%, transparent 44%, rgba(7, 15, 24, 0.28) 100%);
  }

  :root[data-theme="dark"] .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 10, 16, 0.68) 0%, rgba(5, 10, 16, 0.28) 58%, transparent 100%),
      linear-gradient(180deg, rgba(5, 10, 16, 0.28) 0%, transparent 42%, rgba(5, 10, 16, 0.42) 100%);
  }

  .intro {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    padding-top: 4px;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 10px;
    letter-spacing: 3px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(48px, 17vw, 76px);
    line-height: 0.92;
    letter-spacing: clamp(5px, 1.8vw, 9px);
    overflow-wrap: anywhere;
  }

  .rule {
    width: min(270px, 72vw);
    margin: 22px 0 18px;
  }

  h2 {
    max-width: 330px;
    margin-bottom: 12px;
    font-size: clamp(24px, 7.4vw, 34px);
    line-height: 1.08;
  }

  .lead {
    max-width: 330px;
    margin-bottom: 22px;
    font-size: 15px;
    line-height: 1.55;
  }

  .button {
    width: min(100%, 330px);
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    font-size: 10px;
    letter-spacing: 3px;
  }

  .tree-note {
    position: absolute;
    z-index: 2;
    top: clamp(190px, 34vh, 310px);
    right: 18px;
  }

  .tree-note-trigger {
    width: 38px;
    height: 38px;
    background: rgba(247, 243, 230, 0.72);
    color: #17212b;
  }

  :root[data-theme="dark"] .tree-note-trigger {
    background: rgba(8, 17, 25, 0.72);
    color: #f3ead8;
  }

  .tree-note-panel {
    position: fixed;
    top: max(104px, calc(env(safe-area-inset-top) + 92px));
    left: 14px;
    right: 14px;
    width: auto;
    max-height: calc(100svh - 126px);
    padding: 22px 18px 20px;
  }

  .portal-section {
    position: relative;
    z-index: 1;
    width: calc(100vw + 36px);
    margin: auto -18px 0;
    padding: 34px 0 calc(18px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 16, 0.36) 18%, rgba(5, 10, 16, 0.6) 100%);
  }

  .portal-head {
    padding: 0 18px 10px;
  }

  .portal-head .eyebrow {
    margin: 0;
  }

  .portal-rail {
    grid-auto-columns: minmax(236px, 78vw);
    gap: 12px;
    width: 100%;
    padding: 6px 18px 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .portal-rail::-webkit-scrollbar {
    display: none;
  }

  .portal-card {
    scroll-snap-align: center;
  }

  .portal-card a {
    min-height: 218px;
    max-height: 218px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.24);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
    backdrop-filter: blur(14px) saturate(1.08);
  }

  .portal-embed-open {
    top: 8px;
    right: 8px;
    width: 52px;
    min-height: 48px;
    padding: 4px;
  }

  .portal-embed-open span {
    font-size: 15px;
  }

  .portal-embed-open small {
    font-size: 6.5px;
    letter-spacing: 0.45px;
  }

  .portal-title {
    font-size: 18px;
    line-height: 1.05;
  }

  .portal-url {
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 1.1px;
    overflow-wrap: anywhere;
  }

  .portal-desc {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.35;
  }

  .portal-meta {
    margin-top: auto;
    padding-top: 10px;
    font-size: 11px;
    letter-spacing: 0.8px;
  }

  .portal-medal,
  .portal-emblem {
    width: 54px;
    height: 54px;
    margin-bottom: 7px;
  }

  .portal-emblem-depositum,
  .portal-emblem-horizon,
  .portal-emblem-panoptes,
  .portal-emblem-panteon {
    width: 56px;
    height: 56px;
  }

  .portal-emblem-dzwonnik,
  .portal-emblem-ups {
    width: 52px;
    height: 56px;
  }

  .portal-emblem-kodron-pl {
    width: 48px;
    height: 52px;
  }

  .portal-modal-panel {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
  }

  .portal-modal-panel-embedded {
    min-width: 0;
  }

  .portal-modal-panel-embedded .portal-modal-scroll {
    gap: 10px;
    padding: 18px 14px 16px;
  }

  .portal-modal-panel-embedded .portal-modal-top {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    margin-right: 36px;
  }

  .portal-modal-panel-embedded .portal-modal-emblem .portal-medal,
  .portal-modal-panel-embedded .portal-modal-emblem .portal-emblem,
  .portal-modal-panel-embedded .portal-modal-emblem .portal-mark {
    width: 58px;
    height: 58px;
  }

  .portal-modal-panel-embedded .portal-modal-desc,
  .portal-embed-note {
    font-size: 12px;
    line-height: 1.42;
  }

  .portal-embed-frame-wrap {
    min-height: 280px;
  }
}

@media (max-width: 390px) {
  .scene-switcher button {
    padding-inline: 8px;
    font-size: 8px;
  }

  h1 {
    font-size: clamp(44px, 16vw, 62px);
    letter-spacing: 4px;
  }

  .portal-rail {
    grid-auto-columns: minmax(224px, 82vw);
  }
}
