:root {
  --frame-width: 575px;
  --frame-offset: 80px;
  --frame-radius: 32px;
  --header-height: 56px;
  --ink: #fff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #0b0b0b;
  color: var(--ink);
  font-family: Sora, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }

a { color: inherit; }

.backdrop,
.frame {
  position: fixed;
  inset: 0;
  background: #0b0b0b url("../images/banner.jpg") center / cover no-repeat;
  pointer-events: none;
}

.backdrop::after,
.frame-dim {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.frame { display: none; }

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  pointer-events: none;
}

.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar-inner--start { justify-content: flex-start; }

.back-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(24px);
}

.share-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(24px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.share-btn svg { width: 24px; height: 24px; fill: currentColor; }

.share-btn:hover { background: rgba(255, 255, 255, 0.12); transform: scale(1.1); }
.share-btn:active { transform: scale(0.95); }

.share-popover {
  pointer-events: auto;
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  width: 260px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.share-popover p { margin: 0 0 8px; font-size: 13px; font-weight: 600; }

.share-popover input {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.share-popover button {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.page {
  position: relative;
  z-index: 2;
  width: min(100%, var(--frame-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(var(--header-height) + 20px) 16px 64px;
}

.profile { text-align: center; padding: 0 20px; }

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
}

.logo-wrap img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

h1 {
  margin: 24px 0 0;
  font-family: Sora, Arial, sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
}

.bio {
  width: 100%;
  max-width: 20rem;
  margin: 16px auto 0;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  opacity: 0.8;
}

.social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding: 0 16px;
}

.social a {
  display: flex;
  color: #fff;
  transition: opacity 0.2s ease;
}

.social a:hover { opacity: 0.7; }
.social svg { width: 28px; height: 28px; fill: currentColor; }

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.link-card {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: #FFFFFF1A;
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: background 0.2s ease;
}

.link-card:hover { background: rgba(255, 255, 255, 0.1); }

.link-card img {
  width: 180px;
  height: 120px;
  flex: 0 0 180px;
  object-fit: cover;
}

.link-card span {
  flex: 1;
  min-width: 0;
  padding: 20px 16px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
  padding: 4px 8px 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.85;
}

.legal a,
.legal button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.legal a:hover,
.legal button:hover { text-decoration: underline; }

.doc {
  position: relative;
  z-index: 2;
  width: min(100%, var(--frame-width));
  margin: 0 auto;
  padding: calc(var(--header-height) + 28px) 20px 48px;
}

.doc h1 {
  margin: 0;
  font-family: Sora, Arial, sans-serif;
  font-size: 1.75rem;
  line-height: 1.2;
}

.doc h2 {
  margin: 1.35rem 0 0.35rem;
  font-family: Sora, Arial, sans-serif;
  font-size: 1.05rem;
}

.doc p,
.doc li {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.doc ul { margin: 0.4rem 0 0; padding-left: 1.15rem; }

.doc a { color: inherit; }

.doc-updated {
  margin-top: 8px;
  font-size: 0.8rem;
  opacity: 0.65;
}

.cookie-layer {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 12px;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.cookie-layer[hidden] { display: none; }

.cookie-panel {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  padding: 2px 3px 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.cookie-panel.is-config {
  display: block;
  width: min(280px, 100%);
  padding: 10px 12px 6px;
  border-radius: 14px;
}

.cookie-line {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.cookie-panel.is-config .cookie-line {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.cookie-row span { display: flex; flex-direction: column; }
.cookie-row strong { font-size: 0.75rem; font-weight: 500; }
.cookie-row small { display: none; }

.cookie-row input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: #fff;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.cookie-panel.is-config .cookie-actions { margin-top: 8px; }

.cookie-actions button {
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.cookie-actions button:hover { color: #fff; }

#cookie-accept {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

#cookie-accept:hover { background: transparent; color: #fff; }

body.cookie-open .page,
body.cookie-open .doc { padding-bottom: 96px; }

body.cookie-config .page,
body.cookie-config .doc { padding-bottom: 240px; }

.share-popover[hidden] { display: none; }

@media (min-width: 640px) {
  .page { padding-left: 20px; padding-right: 20px; }
}

@media (min-width: 768px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .backdrop {
    transform: scale(1.1);
    filter: blur(40px);
    background-position: center;
  }

  .frame {
    display: block;
    top: var(--frame-offset);
    bottom: auto;
    left: 50%;
    right: auto;
    width: min(var(--frame-width), 100%);
    height: 100vh;
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: var(--frame-radius) var(--frame-radius) 0 0;
    background: #0b0b0b;
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.25);
  }

  .frame-image {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--frame-offset) * -1);
    height: 100vh;
    background: url("../images/banner.jpg") center top / cover no-repeat;
  }

  .topbar {
    top: var(--frame-offset);
    left: 50%;
    right: auto;
    width: min(var(--frame-width), 100%);
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: var(--frame-radius) var(--frame-radius) 0 0;
  }

  .page,
  .doc {
    position: fixed;
    top: var(--frame-offset);
    bottom: 0;
    left: 50%;
    width: min(var(--frame-width), 100%);
    min-height: 0;
    margin: 0;
    transform: translateX(-50%);
    overflow: auto;
    border-radius: var(--frame-radius) var(--frame-radius) 0 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  }

  .page { padding-left: 16px; padding-right: 16px; }

  .cookie-layer {
    bottom: 16px;
    width: max-content;
    max-width: calc(100vw - 128px);
  }
}

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

  .page,
  .doc {
    width: 100%;
    max-width: 100%;
  }

  h1 { font-size: 1.65rem; }

  .link-card { width: 100%; }

  .link-card img {
    width: 108px;
    height: 88px;
    flex: 0 0 108px;
  }

  .link-card span {
    width: 0;
    flex: 1 1 0;
    padding: 12px 12px;
    font-size: 0.875rem;
  }

  .legal { padding-left: 12px; padding-right: 12px; }

  .doc { padding-left: 16px; padding-right: 16px; }

  .doc p,
  .doc li { overflow-wrap: break-word; }

  .cookie-layer { bottom: 10px; max-width: calc(100% - 16px); }
  .cookie-line { font-size: 0.68rem; }
  .cookie-actions button { min-height: 24px; padding: 0 7px; font-size: 0.68rem; }
  body.cookie-open .page,
  body.cookie-open .doc { padding-bottom: 88px; }
  body.cookie-config .page,
  body.cookie-config .doc { padding-bottom: 280px; }
}
