/* Space Grotesk – keep local WOFF2, but include latin-ext so PL glyphs render correctly */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  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: "Space Grotesk";
  src: url("/fonts/space-grotesk-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  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: "Space Grotesk";
  src: url("/fonts/space-grotesk-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  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: "Space Grotesk";
  src: url("/fonts/space-grotesk-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  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 {
  /* Kolory z logo FiboApp */
  --navy: #0E152F;
  --navy-light: #1a2545;
  --red: #D2221C;
  --red-dark: #b81d18;
  --red-light: #e84a45;
  
  /* Jasny motyw */
  --bg: #f8f9fc;
  --bg-2: #ffffff;
  --card: #ffffff;
  --text: #0E152F;
  --muted: #5a6380;
  --line: rgba(14, 21, 47, 0.1);
  --accent: #D2221C;
  --accent-strong: #b81d18;
  --shadow: rgba(14, 21, 47, 0.08);
  --tile-surface: linear-gradient(180deg, #fcfdfe 0%, #f8f8fd 100%);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 15px/1.45 "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 80% at 10% -10%, rgba(210, 34, 28, 0.06), transparent 60%),
    radial-gradient(120% 80% at 100% 0%, rgba(14, 21, 47, 0.04), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 35%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 35%);
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.3;
}

.topbar {
  position: sticky;
  top: 0;
  padding: calc(8px + var(--safe-top)) 12px 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.topbar--with-back {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

.topbar-back {
  justify-self: start;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 12px;
  line-height: 1;
}

.topbar-back:hover {
  background: rgba(14, 21, 47, 0.05);
}

.topbar-title {
  justify-self: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-action {
  justify-self: end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: url("/icons/logo-transparent-96.png") center / contain no-repeat;
}

.brand-text {
  font-size: 19px;
  color: var(--navy);
}

.btn {
  background: var(--red);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.container {
  padding: 12px 12px calc(76px + var(--safe-bottom));
  max-width: 720px;
  margin: 0 auto;
}

.home .topbar {
  justify-content: center;
}

.home .container {
  padding: 20px 12px calc(24px + var(--safe-bottom));
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.home-cta {
  display: block;
  width: 75%;
  margin: 0 auto;
  padding: 0;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  text-decoration: none;
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
  transform: translateY(12px);
  opacity: 0;
  animation: tileIn 0.45s ease forwards;
  overflow: hidden;
}

.home-cta__bg {
  width: 100%;
  height: auto;
  aspect-ratio: 1536 / 300;
  object-fit: cover;
  display: block;
}

.home-cta:hover {
  transform: translateY(6px);
}

.home-cta:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  align-content: start;
  margin-top: 14px;
}

.home-wolumen {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 20px;
  background: var(--tile-surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
  transform: translateY(12px);
  opacity: 0;
  animation: tileIn 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.home-wolumen__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-wolumen__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--navy);
}

.home-wolumen__meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.home-wolumen__status {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0 4px;
}

.home-wolumen__list {
  display: grid;
  gap: 10px;
}

.home-wolumen__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(14, 21, 47, 0.03);
  border: 1px solid rgba(14, 21, 47, 0.08);
}

.home-wolumen__instrument {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-wolumen__symbol {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--navy);
}

.home-wolumen__desc {
  font-size: 12px;
  color: var(--muted);
}

.home-wolumen__thumbs {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-wolumen__thumb {
  position: relative;
  width: 92px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e152f;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(14, 21, 47, 0.12);
}

.home-wolumen__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-wolumen__thumb:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.home-wolumen__tf {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(14, 21, 47, 0.75);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.home-wolumen__thumb.is-missing {
  background: repeating-linear-gradient(
    45deg,
    rgba(14, 21, 47, 0.18),
    rgba(14, 21, 47, 0.18) 6px,
    rgba(14, 21, 47, 0.08) 6px,
    rgba(14, 21, 47, 0.08) 12px
  );
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

.home-wolumen__thumb.is-missing .home-wolumen__tf {
  background: rgba(14, 21, 47, 0.6);
}

.home-wolumen__thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  text-align: center;
  padding: 6px;
}

.home-wolumen__thumb-placeholder strong {
  display: block;
  font-weight: 600;
}

.premium-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--tile-surface);
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
  margin-bottom: 14px;
}

.premium-hero__title {
  margin: 0;
  font-size: 18px;
  color: var(--navy);
}

.premium-hero__desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.premium-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.premium-filter-tile {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px rgba(14, 21, 47, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.premium-filter-tile:hover {
  transform: translateY(-2px);
}

.premium-filter-tile:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.premium-filter-tile.is-active {
  background: var(--navy);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(14, 21, 47, 0.18);
}

.premium-status {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(14, 21, 47, 0.04);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.premium-list {
  display: grid;
  gap: 12px;
}

.premium-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
  display: grid;
  gap: 10px;
}

.premium-card__media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(14, 21, 47, 0.08);
  background: rgba(14, 21, 47, 0.02);
}

.premium-card__media img {
  display: block;
  width: 100%;
  height: auto;
}

.premium-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: repeating-linear-gradient(
    135deg,
    rgba(14, 21, 47, 0.06),
    rgba(14, 21, 47, 0.06) 10px,
    rgba(14, 21, 47, 0.02) 10px,
    rgba(14, 21, 47, 0.02) 20px
  );
}

.premium-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.premium-card__instrument {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
}

.premium-card__chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(14, 21, 47, 0.08);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}

.premium-card__chip--type {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.premium-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.premium-card__direction {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.premium-card__direction.is-up {
  background: rgba(26, 153, 119, 0.12);
  color: #0b6b52;
}

.premium-card__direction.is-down {
  background: rgba(210, 34, 28, 0.12);
  color: #b51212;
}

.premium-card__text {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.premium-card--expandable {
  cursor: pointer;
}

.premium-card--expandable:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.premium-card.is-expanded .premium-card__text {
  -webkit-line-clamp: unset;
  display: block;
  max-height: none;
}

.premium-card__levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}

.premium-card__levels span {
  font-weight: 600;
  color: var(--navy);
}

.premium-card__footer {
  font-size: 12px;
  color: var(--muted);
}

.premium-page {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
}

.premium-page .topbar {
  position: relative;
  flex: 0 0 auto;
}

.premium-page .container {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 12px;
}

.premium-lock-shell {
  position: relative;
}

.premium-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(14, 21, 47, 0.3);
  backdrop-filter: blur(6px) saturate(0.9);
  -webkit-backdrop-filter: blur(6px) saturate(0.9);
}

.premium-lock-overlay__title {
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: clamp(22px, 4.4vw, 34px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(14, 21, 47, 0.2);
}

@media (max-width: 540px) {
  .home-wolumen__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-wolumen__thumbs {
    width: 100%;
    justify-content: flex-start;
  }

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

  .premium-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .premium-lock-overlay__title {
    font-size: clamp(20px, 8vw, 28px);
    letter-spacing: 0.1em;
  }
}

.wolumen-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(14, 21, 47, 0.78);
  cursor: zoom-out;
}

.wolumen-lightbox[hidden] {
  display: none;
}

.wolumen-lightbox__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  max-height: 100%;
}

.wolumen-lightbox__close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(14, 21, 47, 0.66);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.wolumen-lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.wolumen-lightbox__img {
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 18px;
  background: #0e152f;
  box-shadow: 0 18px 40px rgba(14, 21, 47, 0.3);
  object-fit: contain;
  transition: transform 0.2s ease;
}

.wolumen-lightbox.is-rotated .wolumen-lightbox__img {
  transform: rotate(90deg);
  max-width: 90vh;
  max-height: 96vw;
}

.wolumen-lightbox__caption {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.wolumen-lightbox__hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox {
  cursor: default;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox__img {
  touch-action: pinch-zoom;
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox__img {
  max-width: min(96vw, 560px);
  max-height: min(72dvh, 560px);
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox__hint--rotate {
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  max-width: 320px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(14, 21, 47, 0.46);
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox.is-landscape {
  padding: 8px;
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox.is-landscape .wolumen-lightbox__frame {
  width: 100%;
  height: 100%;
  justify-content: center;
}

body[data-wolumen-lightbox-mode="landscape-zoom"] .wolumen-lightbox.is-landscape .wolumen-lightbox__img {
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 52px);
  border-radius: 12px;
}

body.is-lightbox-open {
  overflow: hidden;
}

.home-footer {
  margin-top: 18px;
  padding: 10px 0 0;
  text-align: center;
}

.home-footer__link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.home-footer__link:hover {
  text-decoration: underline;
}

.home-footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.home-footer__link--risk {
  font-size: 12px;
  line-height: 1.35;
  max-width: 320px;
  text-align: center;
  margin-bottom: 6px;
}

.wiki-page .home-footer {
  position: static;
  margin-top: 0;
  padding: 10px 0 calc(2px + min(var(--safe-bottom), 8px));
  margin-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  border-top: none;
}

.wiki-page .home-footer__links {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wiki-page .home-footer__link {
  font-size: 12px;
  line-height: 1.35;
}

.wiki-page .home-footer__link--risk {
  font-size: 11px;
  line-height: 1.35;
  max-width: 320px;
  margin-bottom: 2px;
}

body.wiki-page .container {
  padding-bottom: 0;
}

body.wiki-page {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.wiki-page .topbar {
  position: static;
}

.legal-card {
  padding: 18px;
}

.legal-title {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  color: var(--navy);
  letter-spacing: 0.3px;
}

.legal-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.legal-text p {
  margin: 0 0 12px;
}

.legal-text p:last-child {
  margin-bottom: 0;
}

.legal-site {
  font-weight: 600;
  text-align: center;
  color: var(--navy);
}

.home-tile {
  position: relative;
  aspect-ratio: 9 / 8;
  padding: clamp(10px, 3vw, 14px);
  border-radius: 20px;
  background: var(--tile-surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transform: translateY(12px);
  opacity: 0;
  animation: tileIn 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.home-tile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.home-tile--premium {
  padding: 0;
}

.home-tile--diamenty {
  padding: 0;
}

.home-tile--wolumen {
  padding: 0;
}

.home-tile--news {
  padding: 0;
}

.home-tile--mp360 {
  padding: 0;
}

.home-tile--live {
  padding: 0;
}

.home-tile--wiki {
  padding: 0;
}

.home-tile__icon {
  width: clamp(44px, 16vw, 88px);
  height: clamp(44px, 16vw, 88px);
  object-fit: contain;
  border-radius: 12px;
  background: var(--tile-surface);
  padding: 0;
  box-shadow: none;
}

.home-tile__label {
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-top: clamp(4px, 1.5vw, 8px);
}

.home-tile:hover {
  transform: translateY(6px);
}

.home-tile:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.home-tile > :not(.home-tile__bg) {
  position: relative;
  z-index: 1;
}

.live-page .container {
  padding: 16px 12px calc(24px + var(--safe-bottom));
}

.live-player {
  background: var(--tile-surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
}

.live-page .live-player + .live-player {
  margin-top: 16px;
}

.live-player__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 16px;
  background: #0e152f;
  border: 0;
}

.status {
  background: rgba(210, 34, 28, 0.08);
  border: 1px solid rgba(210, 34, 28, 0.2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  margin: 10px 0 12px;
}

.feed-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin: 6px 0 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(14, 21, 47, 0.04);
}

.feed-tab {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.feed-tab:active {
  transform: translateY(1px);
}

.feed-tab.is-active,
.feed-tab[aria-selected="true"] {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 21, 47, 0.2);
}

.feed-tab:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.calendar-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 10px;
}

.calendar-filters[hidden] {
  display: none;
}

.calendar-filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.calendar-filter span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calendar-toggle-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.calendar-toggle,
.calendar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.calendar-toggle.is-active,
.calendar-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.calendar-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar-chip {
  border-radius: 999px;
  min-width: 60px;
}

.calendar-toggle:focus-visible,
.calendar-chip:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.pull-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 8px;
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 0.2s ease, opacity 0.2s ease;
}

.pull-indicator.is-visible {
  height: 44px;
}

.pull-indicator .spinner {
  display: none;
}

.pull-indicator.is-refreshing .spinner {
  display: inline-block;
}

.pull-indicator.is-refreshing .pull-arrow {
  display: none;
}

.pull-indicator.is-ready .pull-arrow {
  transform: rotate(180deg);
}

.pull-arrow {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.pull-indicator[hidden] {
  display: none;
}

.feed-notice {
  position: static;
  bottom: auto;
  margin: 8px auto 12px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-loader {
  position: sticky;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 5;
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
}

.feed-loader[hidden] {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(14, 21, 47, 0.2);
  border-top-color: var(--red);
  animation: spin 0.8s linear infinite;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 16px var(--shadow), 0 1px 3px rgba(14, 21, 47, 0.04);
  transform: translateY(10px);
  opacity: 0;
  animation: cardIn 0.4s ease forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--navy);
}

.card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card h3 a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card h3 a:hover {
  color: var(--red);
}

.meta {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.card p {
  margin: 0;
  color: var(--text);
  opacity: 0.9;
}

.card__excerpt {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.calendar-row {
  border-left: 4px solid rgba(14, 21, 47, 0.18);
  padding: 12px 13px;
}

.calendar-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.calendar-row__timechip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(14, 21, 47, 0.18);
  background: rgba(14, 21, 47, 0.06);
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 5px 10px;
}

.calendar-row__meta {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.calendar-row__title {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.calendar-row__stats {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text);
}

.calendar-row__stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14, 21, 47, 0.04);
}

.calendar-row.is-past {
  border-left-color: rgba(14, 21, 47, 0.1);
  opacity: 0.86;
}

.calendar-row.is-holiday .calendar-row__timechip {
  border-color: rgba(14, 21, 47, 0.14);
  background: rgba(14, 21, 47, 0.05);
}

.calendar-past {
  margin-top: 8px;
  padding-top: 2px;
}

.calendar-past__toggle {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 21, 47, 0.04);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
}

.calendar-past__toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.calendar-past__content {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-past__content[hidden] {
  display: none !important;
}

.calendar-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
  border: 1px solid transparent;
}

.calendar-badge--high {
  color: #ffffff;
  background: var(--red);
  border-color: rgba(210, 34, 28, 0.45);
}

.calendar-badge--holiday {
  color: var(--navy);
  background: rgba(14, 21, 47, 0.08);
  border-color: var(--line);
}

.calendar-badge--past {
  color: var(--navy);
  background: rgba(14, 21, 47, 0.06);
  border-color: var(--line);
}

.card.is-clickable {
  cursor: pointer;
}

.card.is-clickable:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.tag {
  display: inline-block;
  background: rgba(14, 21, 47, 0.06);
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-top: 10px;
}

.card__tag {
  margin-top: 7px;
}

.tag.highlight {
  background: rgba(210, 34, 28, 0.1);
  border-color: rgba(210, 34, 28, 0.25);
  color: var(--red);
}

.sentinel {
  height: 1px;
}

@media (max-width: 640px) {
  .calendar-toggle,
  .calendar-chip {
    font-size: 11px;
    padding: 8px 9px;
  }
}

body.is-news-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.news-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  background: rgba(14, 21, 47, 0.62);
}

.news-overlay[hidden] {
  display: none;
}

.news-overlay__backdrop {
  position: absolute;
  inset: 0;
}

.news-overlay__sheet {
  position: relative;
  width: min(820px, 96vw);
  max-height: calc(100vh - 32px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 16px 16px;
  background: var(--tile-surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(14, 21, 47, 0.22);
  z-index: 1;
  overscroll-behavior: contain;
}

.news-overlay__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.news-overlay__title {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}

.news-overlay__meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.news-overlay__body {
  padding: 12px 16px 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.news-overlay__body p {
  margin: 0 0 12px;
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

.news-overlay__body p:last-child {
  margin-bottom: 0;
}

.news-overlay__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.news-overlay__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.news-overlay__tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--navy);
  background: rgba(14, 21, 47, 0.06);
  border: 1px solid var(--line);
}

.news-overlay__note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.news-overlay__actions {
  display: flex;
  gap: 10px;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 10px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  gap: 10px;
}

.tab {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(14, 21, 47, 0.02);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  background: rgba(14, 21, 47, 0.05);
}

.tab.active {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(14, 21, 47, 0.2);
}

/* Akcent czerwony dla ważnych elementów */
.accent {
  color: var(--red);
}

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn--ghost {
  background: rgba(14, 21, 47, 0.06);
  color: var(--navy);
  border: 1px solid var(--line);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--red-dark);
  }

  .btn-outline:hover {
    background: var(--red);
    color: #ffffff;
  }

  .btn--ghost:hover {
    background: rgba(14, 21, 47, 0.12);
  }

  .mp360-refresh-btn:hover {
    background: var(--red);
    color: #ffffff;
  }
}

.mp360-page {
  --mp360-accent: #d2221c;
  --mp360-accent-soft: rgba(210, 34, 28, 0.12);
  --mp360-accent-border: rgba(210, 34, 28, 0.24);
}

.mp360-page .container {
  padding-top: 16px;
}

.mp360-page .btn-outline {
  border-width: 1px;
}

.mp360-hero {
  display: grid;
  grid-template-columns: minmax(190px, 60%) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: var(--tile-surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
}

.mp360-ring {
  width: clamp(170px, 52vw, 200px);
  height: clamp(170px, 52vw, 200px);
  margin: 0 auto;
  position: relative;
}

.mp360-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.mp360-ring__track {
  fill: none;
  stroke: rgba(14, 21, 47, 0.12);
  stroke-width: 11;
}

.mp360-ring__progress {
  fill: none;
  stroke: var(--mp360-accent);
  stroke-width: 11;
  stroke-linecap: round;
  opacity: 0;
  transition: stroke-dashoffset 0.6s ease, stroke 0.25s ease, opacity 0.2s ease;
  filter: drop-shadow(0 10px 16px rgba(14, 21, 47, 0.14)) saturate(1.15);
}

.mp360-ring__seg {
  fill: none;
  stroke-width: 11;
  stroke-linecap: butt;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  opacity: 0;
  transition: opacity 0.2s ease;
  filter: drop-shadow(0 10px 16px rgba(14, 21, 47, 0.14)) saturate(1.15);
}

.mp360-ring.is-ready .mp360-ring__progress,
.mp360-ring.is-ready .mp360-ring__seg {
  opacity: 1;
}

.mp360-ring__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mp360-score {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mp360-regime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--mp360-accent-border);
  background: var(--mp360-accent-soft);
  color: var(--mp360-accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -4px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mp360-regime.is-hidden {
  opacity: 0;
  transform: translateY(4px);
}

.mp360-regime.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.mp360-meta {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
}

.mp360-meta__item {
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.mp360-meta__item--delta {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.mp360-meta__item--delta .mp360-meta__value {
  text-align: right;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.mp360-meta__label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.mp360-meta__value {
  display: block;
  font-weight: 700;
  color: var(--navy);
}

.mp360-meta__value.is-flash {
  animation: mp360Flash 0.75s ease;
}

.mp360-meta__value--pos {
  color: #22c55e;
}

.mp360-meta__value--neg {
  color: var(--red);
}

.mp360-meta__value--accent {
  color: var(--mp360-accent);
}

@keyframes mp360Flash {
  0%,
  100% {
    opacity: 1;
  }
  20% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
  60% {
    opacity: 0.25;
  }
  80% {
    opacity: 1;
  }
}

.mp360-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.mp360-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--red);
  background: #ffffff;
  color: var(--red);
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(210, 34, 28, 0.12);
  transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.mp360-refresh-btn svg {
  width: 16px;
  height: 16px;
}

.mp360-refresh-btn:active {
  transform: translateY(1px);
}

.mp360-refresh-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.mp360-stale-badge {
  align-self: center;
  background: rgba(14, 21, 47, 0.06);
  color: var(--navy);
  border: 1px solid rgba(14, 21, 47, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mp360-section {
  margin-top: 18px;
}

.mp360-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mp360-section__head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.mp360-carousel {
  display: block;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scroll-padding-left: 12px;
}

.mp360-carousel--loop {
  overflow: hidden;
  scroll-snap-type: none;
  touch-action: pan-y;
  cursor: grab;
}

.mp360-carousel--loop.is-dragging {
  cursor: grabbing;
}

.mp360-carousel__track {
  display: flex;
  gap: 12px;
  will-change: transform;
}

.mp360-carousel--loop .mp360-card {
  scroll-snap-align: none;
}

.mp360-carousel::-webkit-scrollbar {
  display: none;
}

.mp360-card {
  flex: 0 0 78%;
  position: relative;
  background: var(--tile-surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
  scroll-snap-align: start;
  overflow: hidden;
}

.mp360-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--card-accent, var(--mp360-accent)), rgba(14, 21, 47, 0));
}

.mp360-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mp360-card__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mp360-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-accent-soft, rgba(14, 21, 47, 0.06));
  border: 1px solid var(--card-accent-border, rgba(14, 21, 47, 0.12));
  color: var(--card-accent, var(--navy));
  flex: 0 0 auto;
}

.mp360-card__icon svg {
  width: 18px;
  height: 18px;
}

.mp360-card__label {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp360-card__value {
  font-size: 20px;
  font-weight: 800;
  color: var(--card-accent, var(--mp360-accent));
  flex: 0 0 auto;
}

.mp360-card__bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(14, 21, 47, 0.10);
  overflow: hidden;
  margin-bottom: 10px;
}

.mp360-card__bar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 2px;
  height: 14px;
  background: rgba(14, 21, 47, 0.28);
}

.mp360-card__bar-fill {
  height: 100%;
  width: var(--level, 50%);
  background: linear-gradient(90deg, var(--bar-color, var(--mp360-accent)), rgba(255, 255, 255, 0));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.mp360-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.mp360-chart {
  background: var(--tile-surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
}

.mp360-chart svg {
  width: 100%;
  height: 150px;
  display: block;
}

.mp360-chart__labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.mp360-chart__last {
  color: var(--muted);
  font-size: 12px;
}

.mp360-sparkline__grid {
  fill: none;
  stroke: rgba(14, 21, 47, 0.10);
  stroke-width: 0.8;
}

.mp360-sparkline__area {
  fill: rgba(14, 21, 47, 0.14);
  opacity: 0.14;
}

.mp360-sparkline__seg {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp360-sparkline__dot {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 0.9;
}

.mp360-sparkline__line {
  fill: none;
  stroke: var(--mp360-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp360-explain {
  background: var(--tile-surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 12px 24px var(--shadow), 0 2px 6px rgba(14, 21, 47, 0.06);
}

.mp360-explain__text p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mp360-explain__text p:last-child {
  margin-bottom: 0;
}

.mp360-explain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  background: rgba(14, 21, 47, 0.58);
}

.mp360-explain-overlay[hidden] {
  display: none;
}

.mp360-explain__backdrop {
  position: absolute;
  inset: 0;
}

.mp360-explain__sheet {
  position: relative;
  width: min(720px, 96vw);
  max-height: calc(100vh - 32px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 16px 16px;
  background: var(--tile-surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(14, 21, 47, 0.22);
  z-index: 1;
}

.mp360-explain__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.mp360-explain__head h2 {
  margin: 0;
  font-size: 16px;
}

.mp360-explain__subtitle {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.mp360-explain__body {
  padding: 12px 16px calc(18px + var(--safe-bottom));
  overflow-y: auto;
}

.mp360-explain__section {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 12px 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(14, 21, 47, 0.08);
}

.mp360-explain__section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, var(--section-accent, var(--mp360-accent)), rgba(14, 21, 47, 0));
}

.mp360-explain__section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.mp360-explain__section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.mp360-explain__icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--section-accent-soft, rgba(14, 21, 47, 0.1));
  color: var(--section-accent, var(--mp360-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.mp360-explain__icon svg {
  width: 16px;
  height: 16px;
}

.mp360-explain__value {
  margin-left: auto;
  font-weight: 700;
  color: var(--section-accent, var(--mp360-accent));
}

.mp360-explain__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(14, 21, 47, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}

.mp360-explain__bar span {
  display: block;
  height: 100%;
  width: calc(var(--section-level, 50) * 1%);
  background: var(--section-accent, var(--mp360-accent));
  border-radius: 999px;
}

.mp360-explain__desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

body.is-explain-open {
  overflow: hidden;
}

.mp360-explain__scale {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(14, 21, 47, 0.04);
}

.mp360-explain__scale-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp360-scale__item {
  display: grid;
  grid-template-columns: 14px auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  font-size: 13px;
  color: var(--text);
}

.mp360-scale__swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--swatch, var(--mp360-accent));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.mp360-scale__range {
  font-weight: 700;
  color: var(--navy);
}

.mp360-scale__label {
  font-weight: 600;
}

.mp360-scale__hint {
  grid-column: 2 / -1;
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 720px) {
  .mp360-card {
    flex: 0 0 45%;
  }

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

@media (max-width: 360px) {
  .mp360-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mp360-meta__item {
    text-align: left;
  }
}

@keyframes cardIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tileIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .home-tile {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .home-wolumen {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .wolumen-lightbox__img {
    transition: none;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(14, 21, 47, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 21, 47, 0.35);
}

/* A2HS Prompt */
.a2hs-topbar-btn {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.a2hs-topbar-btn:hover {
  opacity: 0.7;
}

/* Show only on mobile in browser mode */
@media (pointer: coarse) {
  .a2hs-topbar-btn:not([hidden]) {
    display: flex;
  }
}

.a2hs-prompt {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.a2hs-prompt.is-visible {
  opacity: 1;
  visibility: visible;
}

.a2hs-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 21, 47, 0.4);
}

.a2hs-prompt__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 12px calc(16px + var(--safe-bottom));
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(14, 21, 47, 0.18);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.a2hs-prompt.is-visible .a2hs-prompt__panel {
  transform: translateY(0);
}

.a2hs-prompt__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.a2hs-prompt__content {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.a2hs-prompt__content p {
  margin: 0 0 8px;
}

.a2hs-prompt__content ol {
  margin: 0;
  padding-left: 20px;
}

.a2hs-prompt__content li {
  margin-bottom: 4px;
}

.a2hs-inline-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
  color: currentColor;
}

.a2hs-inline-icon svg {
  width: 100%;
  height: 100%;
}

.a2hs-prompt__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.a2hs-prompt__install {
  flex: 1;
}

.a2hs-prompt__dismiss {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: rgba(14, 21, 47, 0.08);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.a2hs-prompt__dismiss:hover {
  background: rgba(14, 21, 47, 0.14);
}

/* Image page styles */
.image-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  box-sizing: border-box;
  overflow: hidden;
}

.image-page--stacked {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  height: auto;
  min-height: calc(100vh - 60px);
  min-height: calc(100dvh - 60px);
  overflow: visible;
}

.image-page--stacked .image-page__img {
  width: 100%;
  max-height: none;
}

.image-page__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(14, 21, 47, 0.1);
}
