@font-face {
  font-family: "TDC Noto Sans";
  src: url("fonts/NotoSans-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TDC Noto Sans";
  src: url("fonts/NotoSans-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TDC Noto Sans";
  src: url("fonts/NotoSans-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TDC Noto Serif";
  src: url("fonts/NotoSerif-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TDC Noto Serif";
  src: url("fonts/NotoSerif-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family:
    var(--font-ui), ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "TDC Noto Sans";
  --font-display: "TDC Noto Serif";
  --surface: #171817;
  --surface-soft: rgba(26, 27, 26, 0.78);
  --line: rgba(255, 255, 255, 0.16);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.68);
  --accent: #f2cf7d;
  --safe-top: max(14px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #e9e7e2;
}

body {
  overflow: hidden;
  color: var(--text);
}

body.is-home {
  overflow: auto;
  color: #20211f;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  position: relative;
  width: min(100%, 470px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: #171817;
  box-shadow: 0 0 70px rgba(20, 20, 18, 0.2);
}

.is-hidden {
  display: none !important;
}

.home-shell {
  min-height: 100dvh;
  padding: 18px clamp(14px, 4vw, 44px) 44px;
  color: #20211f;
  background:
    linear-gradient(180deg, #fbfaf7 0%, #edeae2 100%);
}

.home-header {
  display: flex;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.home-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-brand,
.home-language,
.home-account {
  display: inline-flex;
  height: 44px;
  align-items: center;
  border: 1px solid rgba(32, 33, 31, 0.12);
  border-radius: 999px;
  color: #20211f;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
}

.home-brand {
  gap: 8px;
  padding: 9px 18px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.88);
  font-weight: 820;
  letter-spacing: 0;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(15, 20, 30, 0.12);
}

.brand-logo-image {
  display: block;
  width: clamp(170px, 18vw, 245px);
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(10, 18, 36, 0.12));
}

.home-language,
.home-account {
  gap: 6px;
  padding: 0 13px;
  font-weight: 800;
  cursor: pointer;
}

.home-language .icon,
.home-account .icon {
  width: 18px;
  height: 18px;
}

.home-account {
  max-width: 150px;
}

.home-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-intro {
  max-width: 1180px;
  margin: 44px auto 18px;
}

.home-intro h1 {
  max-width: 820px;
  margin: 0;
  color: #20211f;
  font-size: clamp(2.1rem, 6vw, 5.4rem);
  font-weight: 840;
  line-height: 0.98;
  letter-spacing: 0;
}

.home-intro p {
  max-width: 650px;
  margin: 18px 0 0;
  color: #67665f;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.45;
}

.home-controls {
  display: flex;
  max-width: 860px;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}

.home-search {
  display: flex;
  min-width: 0;
  height: 54px;
  flex: 1;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(32, 33, 31, 0.14);
  border-radius: 16px;
  color: #6f6d66;
  background: #fff;
}

.home-search .icon {
  width: 19px;
  height: 19px;
}

.home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #20211f;
  background: transparent;
}

.home-create-button {
  display: inline-flex;
  height: 54px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #20211f;
  border-radius: 16px;
  color: #fff;
  font-weight: 760;
  background: #20211f;
  cursor: pointer;
  white-space: nowrap;
}

.home-create-button .icon {
  width: 19px;
  height: 19px;
}

.home-category-tabs,
.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-category-tabs {
  max-width: 1180px;
  margin: 22px auto 0;
  padding-bottom: 4px;
}

.home-category-tabs::-webkit-scrollbar,
.category-strip::-webkit-scrollbar {
  display: none;
}

.category-pill {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(32, 33, 31, 0.12);
  border-radius: 999px;
  color: #353630;
  font-weight: 720;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  white-space: nowrap;
}

.category-pill.is-active {
  border-color: #20211f;
  color: #fff;
  background: #20211f;
}

.home-functions {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 18px auto 0;
}

.function-tile {
  display: flex;
  min-height: 68px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(32, 33, 31, 0.12);
  border-radius: 8px;
  color: #282923;
  font-weight: 740;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.function-tile .icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.home-grid {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 22px auto 0;
}

.home-footer {
  display: flex;
  max-width: 1180px;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px auto 0;
  padding: 18px 0 80px;
}

.home-footer a {
  border-radius: 999px;
  padding: 10px 13px;
  color: #36352f;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  text-decoration: none;
}

.portal-ad {
  display: grid;
  width: 100%;
  max-width: 1180px;
  min-height: 96px;
  margin: 18px auto 0;
  overflow: hidden;
  border: 1px solid rgba(32, 33, 31, 0.1);
  border-radius: 8px;
  color: #20211f;
  background: rgba(255, 255, 255, 0.88);
}

.portal-ad.is-hidden {
  display: none !important;
}

.ad-label {
  align-self: start;
  padding: 5px 8px 0;
  color: #8a8f98;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.ad-slot-content {
  display: grid;
  min-height: 74px;
  place-items: center;
}

.ad-slot-content > iframe,
.ad-slot-content > img {
  max-width: 100%;
}

.portal-ad-card {
  position: absolute;
  z-index: 6;
  top: calc(var(--safe-top) + 112px);
  right: 14px;
  left: 14px;
  max-width: none;
  min-height: 54px;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(20, 22, 25, 0.48);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.portal-ad-card .ad-label {
  color: rgba(255, 255, 255, 0.62);
}

.portal-ad-card .ad-slot-content {
  min-height: 42px;
}

.template-preview-banner {
  position: fixed;
  z-index: 60;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(92vw, 680px);
  padding: 10px 14px;
  color: #14224a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(20, 34, 74, 0.14);
  border-left: 4px solid #e30613;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.template-preview-banner a {
  flex: 0 0 auto;
  color: #e30613;
  text-decoration: none;
  white-space: nowrap;
}

.template-preview-banner a:hover {
  text-decoration: underline;
}

.template-preview-banner.is-hidden {
  display: none;
}

.interia-bottom-nav {
  position: absolute;
  z-index: 9;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(8px, env(safe-area-inset-left));
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(17, 30, 58, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 38px rgba(6, 16, 36, 0.22);
  backdrop-filter: blur(18px) saturate(120%);
}

.interia-bottom-nav button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  gap: 3px;
  border: 0;
  color: #14224a;
  background: transparent;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 850;
  cursor: pointer;
}

.interia-bottom-nav button:nth-child(3) {
  color: #fff;
  background: #e30613;
}

.interia-bottom-nav .icon {
  width: 20px;
  height: 20px;
}

.home-powered-by {
  display: flex;
  width: 100%;
  gap: 4px;
  align-items: center;
  margin: 6px 0 0;
  color: rgba(54, 53, 47, 0.62);
  font-size: 0.84rem;
  font-weight: 760;
}

.home-footer .home-powered-by a {
  border-radius: 0;
  padding: 0;
  color: #20211f;
  background: transparent;
  font-weight: 850;
}

.home-footer .home-powered-by a:hover {
  text-decoration: underline;
}

.cookie-banner {
  position: fixed;
  z-index: 30;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: flex;
  max-width: 720px;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(32, 33, 31, 0.12);
  border-radius: 24px;
  margin: 0 auto;
  padding: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(43, 38, 30, 0.2);
  backdrop-filter: blur(18px);
}

.cookie-banner p {
  margin: 4px 0 0;
  color: #66645d;
  font-size: 0.92rem;
}

.cookie-banner button {
  min-height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  background: #20211f;
  font-weight: 850;
}

.home-card {
  position: relative;
  display: block;
  min-height: 270px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #2f3230;
  box-shadow: 0 14px 36px rgba(32, 33, 31, 0.13);
  cursor: pointer;
  text-decoration: none;
}

.home-card:focus-visible {
  outline: 3px solid #fb5277;
  outline-offset: 3px;
}

.home-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.home-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 12, 0.08) 0%, rgba(10, 12, 12, 0.18) 35%, rgba(10, 12, 12, 0.68) 100%);
}

.home-card:hover img {
  transform: scale(1.035);
}

.home-card-copy {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 13px;
  left: 12px;
}

.home-card-copy span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.68rem;
  font-weight: 760;
  background: rgba(18, 19, 18, 0.42);
  backdrop-filter: blur(10px);
}

.home-card-copy strong {
  display: block;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.home-card-copy p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-card.text-hidden .home-card-copy,
.card.text-hidden .card-content {
  display: none;
}

.feed {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}

.feed::-webkit-scrollbar {
  display: none;
}

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

.card {
  position: relative;
  container-type: inline-size;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #2f3230;
}

.card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--object-position, center);
  transform: scale(1.015);
}

.card::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  mix-blend-mode: normal;
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.24) 0 1px, transparent 3px),
    radial-gradient(circle at 72% 62%, rgba(255, 226, 164, 0.22) 0 2px, transparent 6px),
    linear-gradient(118deg, transparent 12%, rgba(255, 255, 255, 0.12) 42%, transparent 68%);
  background-size: 150px 190px, 230px 280px, 100% 100%;
  transform: translateZ(0);
  animation: effect-soft-base 11s ease-in-out infinite alternate;
}

.card.effect-sun-glint::before {
  opacity: 0.68;
  background:
    radial-gradient(circle at 74% 22%, rgba(255, 245, 190, 0.5), transparent 16%),
    linear-gradient(115deg, transparent 15%, rgba(255, 247, 206, 0.22) 46%, transparent 65%);
  animation: effect-drift 9s ease-in-out infinite alternate;
}

.card.effect-pollen::before {
  opacity: 0.62;
  background:
    radial-gradient(circle at 18% 82%, rgba(255, 240, 170, 0.42) 0 2px, transparent 4px),
    radial-gradient(circle at 64% 68%, rgba(255, 255, 225, 0.34) 0 1px, transparent 3px),
    radial-gradient(circle at 82% 34%, rgba(255, 219, 160, 0.32) 0 2px, transparent 5px);
  background-size: 120px 160px, 180px 220px, 210px 260px;
  animation: effect-float-up 13s linear infinite;
}

.card.effect-soft-sparkle::before {
  opacity: 0.58;
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.52) 0 1px, transparent 3px),
    radial-gradient(circle at 76% 58%, rgba(255, 255, 255, 0.45) 0 1px, transparent 3px),
    radial-gradient(circle at 44% 76%, rgba(255, 236, 194, 0.42) 0 1px, transparent 4px);
  background-size: 170px 190px, 230px 260px, 260px 310px;
  animation: effect-twinkle 5.8s ease-in-out infinite alternate;
}

.card.effect-water-shimmer::before {
  opacity: 0.56;
  background: repeating-linear-gradient(100deg, transparent 0 26px, rgba(190, 235, 255, 0.18) 28px 31px, transparent 34px 62px);
  filter: blur(0.4px);
  animation: effect-shimmer 8s ease-in-out infinite;
}

.card.effect-stardust::before {
  opacity: 0.72;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 14%, rgba(210, 230, 255, 0.58) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 48%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px);
  background-size: 120px 150px, 190px 240px, 260px 310px;
  animation: effect-twinkle 7s ease-in-out infinite alternate;
}

.card.effect-moon-glow::before {
  opacity: 0.62;
  background:
    radial-gradient(circle at 72% 18%, rgba(220, 235, 255, 0.48), transparent 18%),
    radial-gradient(circle at 50% 46%, rgba(160, 190, 255, 0.16), transparent 42%);
  animation: effect-breathe 8s ease-in-out infinite alternate;
}

.card.effect-aurora::before {
  opacity: 0.56;
  background:
    linear-gradient(118deg, transparent 22%, rgba(122, 255, 213, 0.2) 38%, rgba(174, 132, 255, 0.18) 50%, transparent 70%),
    linear-gradient(72deg, transparent 30%, rgba(76, 178, 255, 0.16) 48%, transparent 64%);
  filter: blur(10px);
  animation: effect-drift 12s ease-in-out infinite alternate;
}

.card.effect-warm-haze::before {
  opacity: 0.56;
  background:
    radial-gradient(circle at 32% 74%, rgba(255, 184, 116, 0.4), transparent 22%),
    radial-gradient(circle at 76% 18%, rgba(255, 238, 190, 0.34), transparent 20%);
  filter: blur(8px);
  animation: effect-breathe 9s ease-in-out infinite alternate;
}

.card.effect-petal-glow::before {
  opacity: 0.58;
  background:
    radial-gradient(ellipse at 18% 28%, rgba(255, 202, 218, 0.42) 0 4px, transparent 10px),
    radial-gradient(ellipse at 72% 64%, rgba(255, 230, 238, 0.36) 0 5px, transparent 12px),
    radial-gradient(ellipse at 48% 84%, rgba(255, 174, 196, 0.28) 0 4px, transparent 10px);
  background-size: 180px 230px, 240px 290px, 210px 270px;
  animation: effect-float-up 16s linear infinite;
}

.card.effect-golden-bokeh::before {
  opacity: 0.62;
  background:
    radial-gradient(circle at 24% 76%, rgba(255, 210, 118, 0.32), transparent 8%),
    radial-gradient(circle at 82% 42%, rgba(255, 246, 198, 0.24), transparent 7%),
    radial-gradient(circle at 54% 24%, rgba(255, 196, 92, 0.2), transparent 9%);
  filter: blur(2px);
  animation: effect-breathe 6.5s ease-in-out infinite alternate;
}

.card.effect-floating-dust::before {
  opacity: 0.56;
  background:
    radial-gradient(circle at 20% 72%, rgba(255, 255, 240, 0.42) 0 1px, transparent 3px),
    radial-gradient(circle at 70% 32%, rgba(255, 240, 200, 0.34) 0 1px, transparent 3px);
  background-size: 150px 210px, 220px 280px;
  animation: effect-float-up 18s linear infinite;
}

.card.effect-light-rays::before {
  opacity: 0.52;
  background:
    conic-gradient(from 210deg at 72% 0%, transparent 0deg, rgba(255, 249, 215, 0.22) 14deg, transparent 30deg, rgba(255, 255, 255, 0.16) 42deg, transparent 62deg);
  animation: effect-drift 10s ease-in-out infinite alternate;
}

.light-effect-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.light-effect-layer::before,
.light-effect-layer::after,
.light-effect-layer i {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  pointer-events: none;
}

.light-effect-layer::before {
  width: 54%;
  height: 30%;
  top: 12%;
  right: -10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34), rgba(255, 238, 190, 0.18) 38%, transparent 70%);
  filter: blur(10px);
  animation: light-orb-drift 10s ease-in-out infinite alternate;
}

.light-effect-layer::after {
  width: 42%;
  height: 22%;
  left: -12%;
  bottom: 18%;
  background: radial-gradient(circle, rgba(255, 210, 122, 0.22), rgba(255, 255, 255, 0.14) 42%, transparent 72%);
  filter: blur(12px);
  animation: light-orb-drift 12s ease-in-out infinite alternate-reverse;
}

.light-effect-layer i {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.75),
    0 0 24px rgba(255, 221, 150, 0.38);
  animation: light-particle-rise 8s ease-in-out infinite;
}

.light-effect-layer i:nth-child(1) { left: 18%; top: 72%; animation-delay: -1.2s; }
.light-effect-layer i:nth-child(2) { left: 72%; top: 24%; width: 5px; height: 5px; animation-delay: -3.4s; }
.light-effect-layer i:nth-child(3) { left: 83%; top: 58%; width: 9px; height: 9px; animation-delay: -5.2s; }
.light-effect-layer i:nth-child(4) { left: 36%; top: 32%; width: 4px; height: 4px; animation-delay: -6.6s; }
.light-effect-layer i:nth-child(5) { left: 54%; top: 82%; width: 6px; height: 6px; animation-delay: -2.1s; }

.theme-ink .light-effect-layer::before {
  background: radial-gradient(circle, rgba(255, 248, 218, 0.24), rgba(255, 196, 112, 0.14) 38%, transparent 72%);
}

.theme-ink .light-effect-layer i {
  background: rgba(255, 240, 196, 0.68);
}

.card.effect-sun-glint .light-effect-layer::before {
  top: -4%;
  right: -18%;
  width: 72%;
  height: 42%;
  background: radial-gradient(circle, rgba(255, 252, 210, 0.5), rgba(255, 201, 92, 0.22) 36%, transparent 70%);
  animation: light-orb-drift 8s ease-in-out infinite alternate;
}

.card.effect-sun-glint .light-effect-layer::after {
  inset: 0;
  width: auto;
  height: auto;
  background: conic-gradient(from 218deg at 82% 2%, transparent 0deg, rgba(255, 248, 210, 0.24) 10deg, transparent 22deg, rgba(255, 220, 142, 0.16) 35deg, transparent 54deg);
  filter: blur(0.2px);
  animation: light-rays-sweep 11s ease-in-out infinite alternate;
}

.card.effect-pollen .light-effect-layer::before {
  top: 18%;
  right: 6%;
  width: 46%;
  height: 54%;
  background: radial-gradient(circle, rgba(255, 232, 126, 0.22), rgba(255, 186, 113, 0.16) 42%, transparent 72%);
}

.card.effect-pollen .light-effect-layer i,
.card.effect-floating-dust .light-effect-layer i {
  width: 4px;
  height: 4px;
  background: rgba(255, 242, 178, 0.78);
  animation: light-particle-drift 12s linear infinite;
}

.card.effect-soft-sparkle .light-effect-layer::before {
  top: 10%;
  left: 8%;
  right: auto;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.36), rgba(226, 238, 255, 0.18) 40%, transparent 74%);
}

.card.effect-soft-sparkle .light-effect-layer i,
.card.effect-stardust .light-effect-layer i {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(190, 216, 255, 0.45);
  animation: light-sparkle-blink 4.8s ease-in-out infinite;
}

.card.effect-water-shimmer .light-effect-layer::before {
  inset: 0;
  width: auto;
  height: auto;
  background: repeating-linear-gradient(102deg, transparent 0 28px, rgba(160, 232, 255, 0.22) 30px 33px, transparent 36px 68px);
  filter: blur(0.8px);
  animation: light-water-slide 7s ease-in-out infinite;
}

.card.effect-water-shimmer .light-effect-layer::after {
  left: 4%;
  right: auto;
  bottom: 16%;
  width: 82%;
  height: 18%;
  background: linear-gradient(100deg, transparent, rgba(220, 250, 255, 0.22), transparent);
  filter: blur(6px);
  animation: light-water-slide 9s ease-in-out infinite alternate;
}

.card.effect-water-shimmer .light-effect-layer i {
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: rgba(215, 250, 255, 0.62);
  box-shadow: 0 0 12px rgba(134, 230, 255, 0.4);
  animation: light-water-slide 6s ease-in-out infinite;
}

.card.effect-stardust .light-effect-layer::before {
  top: 0;
  right: 0;
  width: 100%;
  height: 48%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.5) 0 1px, transparent 3px),
    radial-gradient(circle at 64% 22%, rgba(210, 232, 255, 0.42) 0 1px, transparent 3px),
    radial-gradient(circle at 84% 58%, rgba(255, 255, 255, 0.35) 0 1px, transparent 3px);
  background-size: 120px 140px, 180px 210px, 230px 280px;
  animation: light-sparkle-blink 6s ease-in-out infinite alternate;
}

.card.effect-moon-glow .light-effect-layer::before {
  top: -8%;
  right: -22%;
  width: 78%;
  height: 50%;
  background: radial-gradient(circle, rgba(222, 238, 255, 0.48), rgba(146, 178, 255, 0.18) 38%, transparent 72%);
  animation: light-moon-breathe 9s ease-in-out infinite alternate;
}

.card.effect-moon-glow .light-effect-layer i {
  background: rgba(210, 230, 255, 0.74);
  box-shadow:
    0 0 12px rgba(210, 230, 255, 0.7),
    0 0 26px rgba(120, 160, 255, 0.32);
  animation: light-sparkle-blink 7s ease-in-out infinite;
}

.card.effect-aurora .light-effect-layer::before {
  top: 3%;
  left: -20%;
  right: auto;
  width: 124%;
  height: 44%;
  border-radius: 42% 58% 48% 52%;
  background:
    linear-gradient(112deg, transparent 8%, rgba(94, 255, 204, 0.28) 28%, rgba(186, 128, 255, 0.24) 50%, rgba(75, 165, 255, 0.18) 68%, transparent 88%);
  filter: blur(12px);
  animation: light-aurora-flow 12s ease-in-out infinite alternate;
}

.card.effect-aurora .light-effect-layer::after {
  top: 22%;
  left: -18%;
  bottom: auto;
  width: 106%;
  height: 24%;
  background: linear-gradient(88deg, transparent 12%, rgba(110, 255, 182, 0.16), transparent 78%);
  filter: blur(14px);
  animation: light-aurora-flow 16s ease-in-out infinite alternate-reverse;
}

.card.effect-warm-haze .light-effect-layer::before {
  top: auto;
  right: -22%;
  bottom: 10%;
  width: 74%;
  height: 44%;
  background: radial-gradient(circle, rgba(255, 180, 94, 0.34), rgba(255, 118, 92, 0.16) 44%, transparent 74%);
  filter: blur(14px);
  animation: light-warm-breathe 8s ease-in-out infinite alternate;
}

.card.effect-warm-haze .light-effect-layer i {
  background: rgba(255, 222, 172, 0.68);
  box-shadow:
    0 0 12px rgba(255, 196, 120, 0.62),
    0 0 26px rgba(255, 128, 80, 0.26);
  animation: light-particle-drift 10s ease-in-out infinite;
}

.card.effect-petal-glow .light-effect-layer::before {
  top: 18%;
  left: -14%;
  right: auto;
  width: 58%;
  height: 48%;
  background: radial-gradient(ellipse, rgba(255, 187, 209, 0.32), rgba(255, 128, 170, 0.16) 42%, transparent 74%);
  animation: light-petal-float 12s ease-in-out infinite alternate;
}

.card.effect-petal-glow .light-effect-layer i {
  width: 10px;
  height: 5px;
  border-radius: 70% 35% 70% 35%;
  background: rgba(255, 205, 220, 0.68);
  box-shadow: 0 0 16px rgba(255, 140, 180, 0.36);
  animation: light-petal-float 9s ease-in-out infinite;
}

.card.effect-golden-bokeh .light-effect-layer::before {
  top: 8%;
  right: -12%;
  width: 72%;
  height: 72%;
  background:
    radial-gradient(circle at 24% 70%, rgba(255, 214, 120, 0.34), transparent 12%),
    radial-gradient(circle at 74% 28%, rgba(255, 246, 198, 0.3), transparent 10%),
    radial-gradient(circle at 50% 48%, rgba(255, 172, 82, 0.2), transparent 16%);
  filter: blur(2px);
  animation: light-bokeh-pulse 8s ease-in-out infinite alternate;
}

.card.effect-golden-bokeh .light-effect-layer i {
  width: 16px;
  height: 16px;
  background: rgba(255, 222, 148, 0.44);
  box-shadow: 0 0 24px rgba(255, 198, 96, 0.4);
  animation: light-bokeh-pulse 7s ease-in-out infinite alternate;
}

.card.effect-light-rays .light-effect-layer::before {
  inset: 0;
  width: auto;
  height: auto;
  background: conic-gradient(from 204deg at 88% -4%, transparent 0deg, rgba(255, 255, 255, 0.2) 8deg, transparent 18deg, rgba(255, 230, 168, 0.15) 30deg, transparent 50deg);
  filter: blur(0.4px);
  animation: light-rays-sweep 13s ease-in-out infinite alternate;
}

.card.effect-light-rays .light-effect-layer i {
  width: 3px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  box-shadow: 0 0 18px rgba(255, 244, 206, 0.34);
  animation: light-rays-sweep 8s ease-in-out infinite alternate;
}

.card.effect-water-shimmer .light-effect-layer i:nth-child(1) { left: 8%; top: 36%; }
.card.effect-water-shimmer .light-effect-layer i:nth-child(2) { left: 48%; top: 52%; }
.card.effect-water-shimmer .light-effect-layer i:nth-child(3) { left: 66%; top: 68%; }
.card.effect-petal-glow .light-effect-layer i:nth-child(2) { transform: rotate(24deg); }
.card.effect-petal-glow .light-effect-layer i:nth-child(4) { transform: rotate(-18deg); }

.card.is-croppable {
  touch-action: none;
  cursor: grab;
}

.card.is-croppable.is-cropping {
  cursor: grabbing;
}

.crop-drag-hint {
  position: absolute;
  z-index: 4;
  top: 92px;
  left: 50%;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  max-width: calc(100% - 110px);
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 16, 15, 0.42);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 840;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.crop-drag-hint .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.card.is-cropping .crop-drag-hint {
  opacity: 0;
}

.card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 47% 48%, rgba(11, 15, 17, 0.28) 0, rgba(11, 15, 17, 0.12) 43%, transparent 72%),
    linear-gradient(180deg, rgba(5, 7, 8, 0.22) 0%, transparent 23%, transparent 58%, rgba(5, 7, 8, 0.56) 100%);
}

.card.theme-ink::after {
  background:
    radial-gradient(circle at 46% 48%, rgba(255, 253, 247, 0.5) 0, rgba(255, 253, 247, 0.2) 45%, transparent 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 28%, transparent 66%, rgba(42, 34, 30, 0.18) 100%);
}

@keyframes effect-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.06); }
}

@keyframes effect-float-up {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 18px -260px, -24px -320px, 30px -280px; }
}

@keyframes effect-twinkle {
  from { opacity: 0.52; filter: brightness(1); }
  to { opacity: 0.82; filter: brightness(1.34); }
}

@keyframes effect-shimmer {
  from { transform: translateX(-6%) rotate(0.001deg); }
  50% { transform: translateX(4%) rotate(0.001deg); }
  to { transform: translateX(-6%) rotate(0.001deg); }
}

@keyframes effect-breathe {
  from { transform: scale(1); opacity: 0.52; }
  to { transform: scale(1.06); opacity: 0.78; }
}

@keyframes effect-soft-base {
  from { background-position: 0 0, 0 0, center; filter: brightness(1); }
  to { background-position: 10px -80px, -14px -110px, center; filter: brightness(1.08); }
}

@keyframes light-orb-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.55; }
  to { transform: translate3d(3%, 3%, 0) scale(1.08); opacity: 0.86; }
}

@keyframes light-particle-rise {
  0% { transform: translate3d(0, 16px, 0) scale(0.7); opacity: 0; }
  22% { opacity: 0.72; }
  62% { opacity: 0.9; }
  100% { transform: translate3d(14px, -70px, 0) scale(1.08); opacity: 0; }
}

@keyframes light-particle-drift {
  0% { transform: translate3d(-8px, 18px, 0) scale(0.75); opacity: 0; }
  24% { opacity: 0.72; }
  70% { opacity: 0.86; }
  100% { transform: translate3d(26px, -92px, 0) scale(1.12); opacity: 0; }
}

@keyframes light-sparkle-blink {
  0%, 100% { transform: scale(0.7); opacity: 0.22; }
  48% { transform: scale(1.28); opacity: 0.95; }
}

@keyframes light-water-slide {
  from { transform: translate3d(-7%, 0, 0); opacity: 0.42; }
  50% { opacity: 0.74; }
  to { transform: translate3d(8%, 0, 0); opacity: 0.5; }
}

@keyframes light-moon-breathe {
  from { transform: scale(0.96); opacity: 0.48; }
  to { transform: scale(1.08); opacity: 0.86; }
}

@keyframes light-aurora-flow {
  from { transform: translate3d(-5%, -2%, 0) skewX(-8deg); opacity: 0.48; }
  to { transform: translate3d(5%, 4%, 0) skewX(8deg); opacity: 0.78; }
}

@keyframes light-warm-breathe {
  from { transform: translate3d(-2%, 2%, 0) scale(0.98); opacity: 0.44; }
  to { transform: translate3d(3%, -2%, 0) scale(1.1); opacity: 0.82; }
}

@keyframes light-petal-float {
  from { transform: translate3d(-8px, 18px, 0) rotate(-8deg); opacity: 0.18; }
  42% { opacity: 0.74; }
  to { transform: translate3d(18px, -84px, 0) rotate(18deg); opacity: 0; }
}

@keyframes light-bokeh-pulse {
  from { transform: scale(0.96); opacity: 0.42; }
  to { transform: scale(1.08); opacity: 0.86; }
}

@keyframes light-rays-sweep {
  from { transform: translate3d(-2%, -1%, 0) rotate(-1deg); opacity: 0.38; }
  to { transform: translate3d(3%, 2%, 0) rotate(2deg); opacity: 0.76; }
}

.card-content {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: calc(50% - 18px);
  width: min(calc(100% - 104px), 350px);
  max-height: min(54%, 520px);
  padding-right: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  text-wrap: balance;
  color: #fff;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.56);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.theme-ink .card-content {
  color: #463b37;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.72);
}

.card-content {
  cursor: text;
}

.card.is-editing-copy .card-content {
  width: min(calc(100% - 104px), 350px);
  padding-right: 0;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.56);
}

.card.is-editing-copy.theme-ink .card-content {
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.72);
}

.card.is-editing-copy .card-title,
.card.is-editing-copy .card-message {
  min-height: 1.15em;
  outline: 0;
  border-radius: 12px;
  caret-color: currentColor;
}

.inline-copy-field {
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-shadow:
    0 3px 24px rgba(0, 0, 0, 0.56),
    0 0 12px rgba(255, 255, 255, 0.3);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.inline-title-editor,
.inline-copy-title {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-size: var(--card-title-size, clamp(2.05rem, 10cqw, 3.45rem));
  font-weight: 800;
  line-height: 1.02;
}

.inline-message-editor,
.inline-copy-message {
  font-family: var(--font-ui), ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--card-message-size, clamp(1rem, 4.15cqw, 1.32rem));
  font-weight: 650;
  line-height: 1.42;
}

.theme-ink .inline-copy-field {
  text-shadow:
    0 2px 18px rgba(255, 255, 255, 0.72),
    0 0 10px rgba(70, 59, 55, 0.18);
}

.inline-copy-field::selection {
  background: rgba(255, 255, 255, 0.34);
}

.theme-ink .inline-copy-field::selection {
  background: rgba(70, 59, 55, 0.18);
}

.card.is-editing-copy .card-title:focus,
.card.is-editing-copy .card-message:focus {
  text-shadow:
    0 3px 24px rgba(0, 0, 0, 0.56),
    0 0 14px rgba(255, 255, 255, 0.48),
    0 0 1px rgba(255, 255, 255, 0.84);
}

.card.is-editing-copy.theme-ink .card-title:focus,
.card.is-editing-copy.theme-ink .card-message:focus {
  text-shadow:
    0 2px 18px rgba(255, 255, 255, 0.72),
    0 0 12px rgba(70, 59, 55, 0.22),
    0 0 1px rgba(70, 59, 55, 0.42);
}

.card-title {
  max-width: 100%;
  margin: 0;
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-size: var(--card-title-size, clamp(2.05rem, 10cqw, 3.45rem));
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.card-message {
  margin: 24px auto 0;
  font-family: var(--font-ui), ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--card-message-size, clamp(1rem, 4.15cqw, 1.32rem));
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.action-rail {
  position: absolute;
  z-index: 4;
  right: max(4px, env(safe-area-inset-right));
  bottom: calc(112px + var(--safe-bottom));
  display: grid;
  gap: 14px;
  justify-items: center;
}

.rail-item {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: #fff;
}

.rail-button {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  color: #fff;
  background: rgba(25, 26, 25, 0.46);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(14px) saturate(120%);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.rail-button .icon {
  width: 25px;
  height: 25px;
}

.rail-button:hover,
.rail-button:focus-visible {
  background: rgba(20, 20, 20, 0.7);
}

.rail-button:active {
  transform: scale(0.9);
}

.rail-button.is-active {
  color: #ffe19a;
  background: rgba(33, 30, 24, 0.72);
}

.rail-button.is-active .icon {
  fill: currentColor;
}

.rail-button.is-soft {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(25, 26, 25, 0.34);
}

.background-fab {
  position: absolute;
  z-index: 4;
  left: 14px;
  bottom: calc(112px + var(--safe-bottom));
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(24, 25, 24, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.background-fab .icon {
  width: 25px;
  height: 25px;
}

.background-fab:hover,
.background-fab:focus-visible {
  background: rgba(20, 20, 20, 0.7);
}

.background-fab:active {
  transform: scale(0.9);
}

.rail-label {
  max-width: 62px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
  font-weight: 680;
  letter-spacing: -0.01em;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.rail-label.forward-label {
  max-width: 82px;
  line-height: 1.05;
  white-space: normal;
}

.rail-label.install-label {
  max-width: 78px;
  line-height: 1.05;
  white-space: normal;
}

.pwa-install-nudge {
  position: fixed;
  z-index: 8;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(18px + var(--safe-bottom));
  left: max(12px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 108, 143, 0.28), transparent 38%),
    rgba(19, 20, 18, 0.74);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.pwa-install-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pwa-install-copy strong {
  font-size: 0.95rem;
  font-weight: 900;
}

.pwa-install-copy span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pwa-install-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: #191916;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.pwa-install-primary .icon {
  width: 17px;
  height: 17px;
}

.pwa-install-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.brand-watermark {
  position: absolute;
  z-index: 3;
  left: 20px;
  bottom: calc(20px + var(--safe-bottom));
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.58);
  opacity: var(--brand-logo-opacity, 0.68);
  pointer-events: none;
}

.theme-ink .brand-watermark {
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.32));
}

.brand-watermark img {
  display: block;
  width: var(--brand-logo-size, 148px);
  max-width: min(72vw, 320px);
  height: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.46));
}

body[data-logo-position="bottom-center"] .brand-watermark {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

body[data-logo-position="bottom-right"] .brand-watermark {
  right: 20px;
  left: auto;
}

.topbar {
  position: absolute;
  z-index: 8;
  top: var(--safe-top);
  right: 14px;
  left: 14px;
  display: flex;
  gap: 9px;
  align-items: center;
  pointer-events: none;
}

.recipient-field,
.topbar-actions {
  pointer-events: auto;
}

.recipient-field {
  display: flex;
  min-width: 0;
  height: 50px;
  flex: 1;
  gap: 9px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(23, 24, 23, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px) saturate(135%);
}

.recipient-field .icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.recipient-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 0.87rem;
  background: transparent;
}

.recipient-field input::placeholder {
  color: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.recipient-field:focus-within {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(16, 17, 16, 0.68);
}

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

.glass-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(23, 24, 23, 0.5);
  backdrop-filter: blur(18px) saturate(135%);
  cursor: pointer;
}

.glass-button {
  height: 50px;
  border-radius: 999px;
}

.language-button {
  display: flex;
  min-width: 58px;
  gap: 5px;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.language-button .icon {
  width: 18px;
  height: 18px;
}

.home-button {
  width: 50px;
  padding: 0;
}

.home-button .icon {
  width: 19px;
  height: 19px;
}

.more-button {
  width: 50px;
  padding: 0;
}

.dots {
  display: grid;
  gap: 3px;
}

.dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.swipe-hint {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: calc(24px + var(--safe-bottom));
  left: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: auto;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.7rem;
  font-weight: 650;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
}

.swipe-hint .icon {
  width: 17px;
  height: 17px;
}

.swipe-hint.is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

.category-strip {
  position: absolute;
  z-index: 7;
  top: calc(var(--safe-top) + 60px);
  right: 14px;
  left: 14px;
  padding-bottom: 4px;
  pointer-events: auto;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-strip .category-pill {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  background: rgba(23, 24, 23, 0.5);
  backdrop-filter: blur(16px);
}

.category-strip .category-pill.is-active {
  border-color: rgba(255, 255, 255, 0.65);
  color: #20211f;
  background: rgba(255, 255, 255, 0.86);
}

@media (min-width: 900px) {
  body.is-builder .category-strip {
    position: fixed;
    top: 50%;
    right: auto;
    left: max(18px, calc(50vw - 455px));
    width: 196px;
    max-height: min(72dvh, 650px);
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(23, 24, 23, 0.35);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(18px) saturate(130%);
    transform: translateY(-50%);
  }

  body.is-builder .category-strip .category-pill {
    width: 100%;
    justify-content: flex-start;
    min-height: 42px;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: left;
    line-height: 1.22;
    white-space: normal;
  }
}

.shared-create-cta {
  position: absolute;
  z-index: 8;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  left: 16px;
  display: none;
  min-height: 56px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #20211f;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px) saturate(130%);
  cursor: pointer;
}

.shared-create-cta .icon {
  width: 19px;
  height: 19px;
}

body.is-shared .recipient-field {
  display: none;
}

body.is-shared .topbar,
body.is-shared .category-strip,
body.is-shared .swipe-hint {
  display: none;
}

body.is-shared .builder-only {
  display: none;
}

body.is-shared {
  overflow: auto;
  color: #20211f;
  background: #efede7;
}

body.is-shared .app-shell {
  width: min(100%, 470px);
  height: auto;
  min-height: 100dvh;
  padding: 12px 12px calc(18px + var(--safe-bottom));
  overflow: visible;
  background: #efede7;
  box-shadow: none;
}

body.is-shared .feed {
  height: auto;
  overflow: visible;
  scroll-snap-type: none;
  touch-action: pan-y;
}

body.is-shared .card {
  width: min(100%, 390px);
  height: auto;
  min-height: 0;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 8px;
  scroll-snap-align: none;
  box-shadow: 0 18px 48px rgba(32, 33, 31, 0.18);
}

body.is-shared .card-content {
  width: min(84%, 380px);
  padding-right: 0;
}

body.is-shared .action-rail {
  right: max(6px, env(safe-area-inset-right));
  bottom: 26px;
}

body.is-shared .shared-create-cta {
  position: static;
  display: flex;
  margin: 10px auto 0;
  width: min(100%, 390px);
}

.sheet-dialog {
  width: min(100%, 470px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #20211f;
  background: transparent;
}

.sheet-dialog::backdrop {
  background: rgba(7, 8, 7, 0.54);
  backdrop-filter: blur(5px);
}

.sheet-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(86dvh, 760px);
  padding: 10px 18px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  border-radius: 26px 26px 0 0;
  color: #22231f;
  background: rgba(249, 248, 244, 0.98);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.2);
  animation: sheet-in 230ms cubic-bezier(0.22, 0.75, 0.26, 1);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 15px;
  border-radius: 999px;
  background: #d2d1ca;
}

.sheet-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #807f77;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-heading h2 {
  margin: 0;
  color: #20211f;
  font-size: 1.45rem;
  letter-spacing: 0;
  line-height: 1.1;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-color: rgba(30, 31, 28, 0.08);
  border-radius: 50%;
  color: #31322f;
  background: #ecebe6;
  backdrop-filter: none;
}

.sheet-actions {
  display: grid;
  gap: 9px;
}

.mobile-static-links {
  display: none;
}

.sheet-action {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #e5e3db;
  border-radius: 17px;
  color: #262722;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.sheet-action:hover,
.sheet-action:focus-visible {
  border-color: #cbc8bb;
  background: #faf9f4;
}

.sheet-action.primary-action {
  border-color: #32332e;
  color: #fff;
  background: #262722;
}

.action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #4d4e48;
  background: #efeee9;
}

.primary-action .action-icon {
  color: #262722;
  background: #f1d999;
}

.action-copy {
  min-width: 0;
}

.action-copy strong {
  display: block;
  font-size: 0.94rem;
  letter-spacing: 0;
}

.chevron {
  width: 19px;
  height: 19px;
  color: #9a9991;
}

.primary-action .chevron {
  color: rgba(255, 255, 255, 0.65);
}

.action-value {
  color: #77776f;
  font-size: 0.82rem;
}

.language-sheet {
  max-height: min(80dvh, 660px);
}

.language-list {
  display: grid;
  gap: 8px;
}

.background-sheet {
  max-height: min(84dvh, 720px);
}

.background-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.background-option {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: #2f3230;
  cursor: pointer;
}

.background-option img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.background-upload-option {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #222826, #5e665f);
}

.upload-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.upload-placeholder .icon {
  position: static;
  display: block;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
}

.background-option::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, 0.62) 100%);
}

.background-option span {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  left: 10px;
  font-size: 0.82rem;
  font-weight: 780;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.background-option .icon {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: none;
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 50%;
  color: #20211f;
  background: rgba(255, 255, 255, 0.88);
}

.background-option.is-active {
  border-color: #20211f;
}

.background-option.is-active .icon {
  display: block;
}

.crop-controls {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #dfd8cb;
  border-radius: 18px;
  background: #fffaf0;
}

.crop-controls[hidden] {
  display: none;
}

.crop-preview {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #2f3230;
}

.crop-controls h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.crop-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop-object-position, 50% 50%);
}

.crop-fields {
  display: grid;
  gap: 10px;
}

.crop-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 820;
  color: #403d36;
}

.crop-field input[type="range"] {
  width: 100%;
  accent-color: #20211f;
}

@media (max-width: 430px) {
  .crop-controls {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

.language-option {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid #e5e3db;
  border-radius: 15px;
  color: #282923;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.language-option span:first-child {
  font-weight: 680;
}

.language-option .icon {
  display: none;
  width: 21px;
  height: 21px;
}

.language-option.is-active {
  border-color: #b49b5e;
  background: #fffaf0;
}

.language-option.is-active .icon {
  display: block;
}

.editor-sheet {
  max-height: min(88dvh, 720px);
}

.account-sheet,
.admin-sheet,
.share-sheet {
  max-height: min(88dvh, 760px);
}

.account-intro,
.account-note {
  margin: 0 0 14px;
  color: #696861;
  font-size: 0.94rem;
  line-height: 1.45;
}

.account-panel,
.social-login-list,
.share-dialog-actions {
  display: grid;
  gap: 9px;
}

.social-login-button,
.account-logout {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  border: 1px solid #dedbd0;
  border-radius: 18px;
  padding: 10px 13px;
  color: #20211f;
  background: #fff;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.social-login-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-logo-preview {
  display: grid;
  min-height: 112px;
  place-items: center;
  border-radius: 22px;
  margin-bottom: 12px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(10, 14, 22, 0.92), rgba(45, 58, 82, 0.9)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15), transparent 34%);
}

.admin-logo-preview img {
  display: block;
  width: min(210px, 70%);
  height: auto;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.38));
}

.admin-file-button {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}

.admin-file-button input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.admin-sheet select,
.admin-sheet input[type="range"] {
  width: 100%;
}

.provider-mark,
.account-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #20211f;
  background: #efeee9;
  font-weight: 860;
}

.provider-mark .icon {
  width: 19px;
  height: 19px;
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dedbd0;
  border-radius: 20px;
  padding: 13px;
  background: #fff;
}

.account-profile p {
  margin: 3px 0 0;
  color: #696861;
}

.account-product-panel,
.user-dashboard section {
  border: 1px solid #dedbd0;
  border-radius: 20px;
  padding: 14px;
  background: #fff;
}

.account-product-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.account-product-panel p,
.user-dashboard p {
  margin: 5px 0 0;
  color: #696861;
  font-size: 0.9rem;
  line-height: 1.4;
}

.account-panel-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-top: 10px;
  padding: 0 14px;
  color: #fff;
  background: #20211f;
  font-weight: 850;
  text-decoration: none;
}

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

.user-dashboard section {
  display: grid;
  gap: 5px;
}

.user-dashboard span {
  color: #20211f;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.provider-google .provider-mark {
  color: #4285f4;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2dfd6;
}

.provider-facebook .provider-mark {
  color: #fff;
  background: #1877f2;
}

.provider-apple .provider-mark {
  color: #fff;
  background: #111;
}

.provider-microsoft .provider-mark {
  color: #f25022;
  background: linear-gradient(135deg, #f25022 0 49%, #7fba00 50% 100%);
  -webkit-text-fill-color: transparent;
}

.account-logout {
  justify-content: center;
  color: #fff;
  background: #262722;
}

.empty-state,
.feed-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  border: 1px dashed #cfccc0;
  border-radius: 28px;
  padding: 28px;
  color: #696861;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  line-height: 1.45;
}

.feed-empty {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  border-radius: 0;
}

.feed-empty p {
  max-width: 300px;
}

.search-empty {
  position: relative;
  overflow: hidden;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(215, 207, 190, 0.72);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 231, 183, 0.44), transparent 34%),
    radial-gradient(circle at 85% 24%, rgba(255, 133, 165, 0.14), transparent 28%),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 58px rgba(72, 65, 48, 0.1);
}

.search-empty h2 {
  margin: 0;
  color: #23251f;
  font-size: clamp(1.45rem, 5vw, 2.25rem);
  letter-spacing: -0.04em;
}

.search-empty p {
  margin: 0;
  max-width: 430px;
  color: #716d64;
}

.search-empty-create,
.search-tag-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(100%, 520px);
}

.search-empty-create {
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(47, 48, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(68, 60, 44, 0.08);
}

.search-empty-create strong,
.search-tag-panel > span {
  color: #282a24;
  font-size: 0.98rem;
  font-weight: 900;
}

.search-empty-create span {
  max-width: 420px;
  color: #716d64;
  font-size: 0.92rem;
}

.search-create-card {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #242721, #fb5277);
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 13px 28px rgba(251, 82, 119, 0.22);
}

.search-create-card:hover,
.search-create-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(251, 82, 119, 0.28);
}

.search-clear-button {
  min-height: 40px;
  border: 1px solid rgba(47, 48, 42, 0.15);
  border-radius: 999px;
  padding: 0 15px;
  color: #34352f;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  cursor: pointer;
}

.search-clear-button:hover,
.search-clear-button:focus-visible {
  border-color: #242721;
  background: #fff;
}

.search-empty-query {
  display: inline-flex;
  justify-self: center;
  max-width: min(100%, 420px);
  padding: 7px 12px;
  border-radius: 999px;
  color: #3d3b35;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.search-empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  justify-self: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #222822, #fb5277);
  box-shadow: 0 14px 30px rgba(251, 82, 119, 0.22);
}

.search-empty-icon .icon {
  width: 25px;
  height: 25px;
}

.search-suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 520px;
}

.search-suggestion {
  min-height: 36px;
  border: 1px solid rgba(47, 48, 42, 0.08);
  border-radius: 999px;
  padding: 0 13px;
  color: #302f2a;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 860;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(68, 60, 44, 0.08);
}

.search-suggestion:hover,
.search-suggestion:focus-visible {
  color: #fff;
  background: #242721;
}

.share-preview {
  display: block;
  width: min(100%, 230px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 14px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.share-link-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: #696861;
  font-size: 0.84rem;
  font-weight: 760;
}

.share-link-field input {
  width: 100%;
  border: 1px solid #dedbd0;
  border-radius: 15px;
  padding: 12px 13px;
  color: #20211f;
  background: #fff;
  font: inherit;
}

.photos-sheet {
  max-height: min(88dvh, 760px);
}

.photos-list {
  display: grid;
  gap: 10px;
}

.photo-option {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
  border: 1px solid #dedbd0;
  border-radius: 18px;
  padding: 9px;
  color: #20211f;
  background: #fff;
}

.photo-public-switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 2px 0 0;
  padding: 10px 12px;
  border: 1px solid #e6decd;
  border-radius: 16px;
  color: #3c3a34;
  background: #fbf8f0;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.photo-public-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-public-switch span {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d8d0c2;
  transition: background 0.18s ease;
}

.photo-public-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(24, 22, 18, 0.18);
  transition: transform 0.18s ease;
}

.photo-public-switch input:checked + span {
  background: #20231f;
}

.photo-public-switch input:checked + span::after {
  transform: translateX(18px);
}

.photo-public-switch input:disabled + span {
  opacity: 0.62;
}

.photo-public-status {
  color: #7a6432;
  font-weight: 840;
}

.photo-use-button {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  min-width: 0;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.photo-option img {
  width: 66px;
  height: 86px;
  border-radius: 13px;
  object-fit: cover;
}

.photo-option span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.photo-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-option small {
  color: #77756e;
}

.photo-option em {
  color: #7a6432;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 820;
  white-space: nowrap;
}

.photo-delete-button {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #8f342b;
  background: #f8e7e2;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.form-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #4b4c46;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid #d8d6ce;
  border-radius: 14px;
  outline: 0;
  color: #22231f;
  font-size: 1rem;
  line-height: 1.4;
  background: #fff;
}

.form-field input {
  height: 52px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 118px;
  padding: 13px 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #9a854f;
  box-shadow: 0 0 0 3px rgba(186, 158, 89, 0.16);
}

.editor-note {
  margin: 10px 0 0;
  color: #85847c;
  font-size: 0.74rem;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 18px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 740;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #262722;
  color: #fff;
  background: #262722;
}

.secondary-button {
  border: 1px solid #d8d6ce;
  color: #393a35;
  background: #fff;
}

.toast {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: calc(22px + var(--safe-bottom));
  left: 20px;
  width: fit-content;
  max-width: min(90vw, 390px);
  margin: auto;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 650;
  text-align: center;
  background: rgba(25, 26, 25, 0.88);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.23);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes sheet-in {
  from {
    transform: translateY(22px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 370px) {
  .topbar {
    right: 9px;
    left: 9px;
    gap: 6px;
  }

  .recipient-field {
    height: 46px;
    padding: 0 12px;
  }

  .recipient-field input {
    font-size: 0.76rem;
  }

  .glass-button {
    height: 46px;
  }

  .more-button {
    width: 46px;
  }

  .language-button {
    min-width: 50px;
    padding: 0 9px;
  }

  .language-button .icon {
    display: none;
  }

  .card-content {
    left: calc(50% - 18px);
    width: min(calc(100% - 88px), 330px);
    padding-right: 0;
  }
}

@media (max-width: 899px) {
  body.is-builder .category-strip {
    padding-right: 30px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  }
}

@media (max-width: 620px) {
  .home-button {
    display: none;
  }

  .mobile-static-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(32, 33, 31, 0.08);
  }

  .mobile-static-links a {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #e4e2da;
    border-radius: 999px;
    color: #5f6059;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 720;
    text-decoration: none;
  }

  .mobile-static-links a:focus-visible,
  .mobile-static-links a:hover {
    border-color: #bbb8aa;
    color: #262722;
  }

  .home-shell {
    padding: 14px 12px 32px;
  }

  .home-intro {
    margin-top: 30px;
  }

  .home-controls {
    display: grid;
  }

  .home-create-button,
  .home-search {
    width: 100%;
  }

  .home-functions {
    grid-template-columns: 1fr;
  }

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

  .home-card {
    min-height: 240px;
  }

  .home-card-copy strong {
    font-size: 1rem;
  }

  .home-card-copy p {
    -webkit-line-clamp: 2;
  }
}

@media (min-width: 471px) {
  .sheet-dialog {
    left: 50%;
    transform: translateX(-50%);
  }
}

body[data-portal-template="warm"] {
  --portal-page-start: #fffaf4;
  --portal-page-end: #e9e3d8;
  --portal-ink: #26251f;
  --portal-muted: #6c675e;
  --portal-surface: rgba(255, 255, 255, 0.78);
  --portal-border: rgba(47, 42, 33, 0.12);
  --portal-accent: #e95874;
  --portal-glass: rgba(31, 29, 25, 0.52);
}

body[data-portal-template="minimal"] {
  --portal-page-start: #ffffff;
  --portal-page-end: #edf1ee;
  --portal-ink: #19201d;
  --portal-muted: #66716b;
  --portal-surface: rgba(255, 255, 255, 0.92);
  --portal-border: rgba(25, 32, 29, 0.13);
  --portal-accent: #2f7562;
  --portal-glass: rgba(24, 31, 28, 0.58);
}

body[data-portal-template="midnight"] {
  --portal-page-start: #0e1421;
  --portal-page-end: #1b2940;
  --portal-ink: #f2f6ff;
  --portal-muted: #a9b8d1;
  --portal-surface: rgba(31, 45, 67, 0.78);
  --portal-border: rgba(197, 217, 255, 0.18);
  --portal-accent: #74a7ff;
  --portal-glass: rgba(10, 18, 31, 0.72);
}

body[data-portal-template="rose"] {
  --portal-page-start: #fff8fa;
  --portal-page-end: #edd5dd;
  --portal-ink: #4f2838;
  --portal-muted: #80616d;
  --portal-surface: rgba(255, 249, 251, 0.84);
  --portal-border: rgba(99, 48, 67, 0.13);
  --portal-accent: #d94f7b;
  --portal-glass: rgba(74, 32, 48, 0.58);
}

body[data-portal-template="interia"] {
  --portal-page-start: #ffffff;
  --portal-page-end: #eef2f7;
  --portal-ink: #14224a;
  --portal-muted: #5d6573;
  --portal-surface: rgba(255, 255, 255, 0.96);
  --portal-border: rgba(20, 34, 74, 0.14);
  --portal-accent: #e30613;
  --portal-glass: rgba(15, 24, 48, 0.62);
}

body.is-home .home-shell {
  color: var(--portal-ink);
  background: linear-gradient(180deg, var(--portal-page-start), var(--portal-page-end));
}

body.is-home .home-intro h1,
body.is-home .home-brand,
body.is-home .home-language,
body.is-home .home-account,
body.is-home .function-tile,
body.is-home .home-footer a,
body.is-home .home-footer .home-powered-by a {
  color: var(--portal-ink);
}

body.is-home .home-intro p,
body.is-home .home-powered-by {
  color: var(--portal-muted);
}

body.is-home .home-brand,
body.is-home .home-language,
body.is-home .home-account,
body.is-home .home-search,
body.is-home .function-tile,
body.is-home .category-pill,
body.is-home .home-footer a,
body.is-home .cookie-banner {
  border-color: var(--portal-border);
  background: var(--portal-surface);
}

body.is-home .home-create-button,
body.is-home .category-pill.is-active,
body.is-home .cookie-banner button {
  background: var(--portal-accent);
}

body[data-portal-template="minimal"].is-home .home-brand,
body[data-portal-template="minimal"].is-home .function-tile,
body[data-portal-template="minimal"].is-home .home-card {
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(25, 32, 29, 0.08);
}

body[data-portal-template="minimal"].is-home .home-intro h1 {
  font-family: var(--font-ui), ui-sans-serif, sans-serif;
  font-weight: 780;
}

body[data-portal-template="midnight"].is-home .brand-logo-image {
  filter: brightness(0) invert(1) drop-shadow(0 3px 12px rgba(0, 0, 0, 0.24));
}

body[data-portal-template="midnight"].is-home .home-search input,
body[data-portal-template="midnight"].is-home .home-search input::placeholder {
  color: var(--portal-ink);
}

body[data-portal-template="midnight"].is-home .category-pill.is-active,
body[data-portal-template="midnight"].is-home .home-create-button {
  color: #0d1522;
}

body[data-portal-template="rose"].is-home .home-card,
body[data-portal-template="rose"].is-home .function-tile {
  border-radius: 22px;
}

body[data-portal-template="rose"].is-home .home-intro h1 {
  font-family: var(--font-display), Georgia, serif;
}

body[data-portal-template="interia"].is-home .home-shell {
  padding-top: 0;
  background:
    linear-gradient(180deg, #ffffff 0 170px, #f4f6fa 170px 100%);
}

body[data-portal-template="interia"].is-home .home-header {
  padding: 14px 0 13px;
  border-bottom: 4px solid #e30613;
}

body[data-portal-template="interia"].is-home .home-brand {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body[data-portal-template="interia"].is-home .home-language,
body[data-portal-template="interia"].is-home .home-account {
  border-radius: 8px;
  background: #f2f5fa;
}

body[data-portal-template="interia"].is-home .home-intro {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(20, 34, 74, 0.1);
  border-left: 7px solid #14224a;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(20, 34, 74, 0.08);
}

body[data-portal-template="interia"].is-home .home-intro h1 {
  max-width: 760px;
  color: #14224a;
  font-size: clamp(2rem, 4.8vw, 4.6rem);
  font-weight: 900;
}

body[data-portal-template="interia"].is-home .home-search,
body[data-portal-template="interia"].is-home .home-create-button,
body[data-portal-template="interia"].is-home .function-tile,
body[data-portal-template="interia"].is-home .category-pill,
body[data-portal-template="interia"].is-home .home-card,
body[data-portal-template="interia"].is-home .home-footer a {
  border-radius: 6px;
}

body[data-portal-template="interia"].is-home .home-create-button,
body[data-portal-template="interia"].is-home .category-pill.is-active {
  border-color: #e30613;
  background: #e30613;
}

body[data-portal-template="interia"].is-home .home-functions {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

body[data-portal-template="interia"].is-home .function-tile {
  min-height: 58px;
  border-left: 4px solid #14224a;
  box-shadow: none;
}

body[data-portal-template="interia"].is-home .home-grid {
  gap: 12px;
}

body[data-portal-template="interia"].is-home .home-card {
  box-shadow: 0 8px 24px rgba(20, 34, 74, 0.08);
}

body[data-portal-template="interia"].is-home .home-card-copy span {
  border-radius: 4px;
  background: #e30613;
}

body[data-portal-template="interia"].is-builder .topbar,
body[data-portal-template="interia"].is-pwa .topbar {
  top: calc(var(--safe-top) + 6px);
}

body[data-portal-template="interia"].is-builder .recipient-field,
body[data-portal-template="interia"].is-builder .glass-button,
body[data-portal-template="interia"].is-pwa .recipient-field,
body[data-portal-template="interia"].is-pwa .glass-button {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #14224a;
}

body[data-portal-template="interia"].is-builder .recipient-field input,
body[data-portal-template="interia"].is-pwa .recipient-field input,
body[data-portal-template="interia"].is-builder .recipient-field input::placeholder,
body[data-portal-template="interia"].is-pwa .recipient-field input::placeholder {
  color: #14224a;
}

body[data-portal-template="interia"].is-builder .category-strip,
body[data-portal-template="interia"].is-pwa .category-strip {
  top: calc(var(--safe-top) + 68px);
}

body[data-portal-template="interia"] .category-strip.is-emphasized {
  animation: interia-strip-pulse 900ms ease;
}

@keyframes interia-strip-pulse {
  0%,
  100% {
    filter: none;
  }
  40% {
    filter: drop-shadow(0 0 14px rgba(227, 6, 19, 0.55));
  }
}

@media (max-width: 760px) {
  body[data-portal-template="interia"].is-builder:not(.is-shared) .interia-bottom-nav,
  body[data-portal-template="interia"].is-pwa:not(.is-shared) .interia-bottom-nav {
    display: grid;
  }

  body[data-portal-template="interia"].is-builder:not(.is-shared) .action-rail,
  body[data-portal-template="interia"].is-pwa:not(.is-shared) .action-rail,
  body[data-portal-template="interia"].is-builder:not(.is-shared) .background-fab,
  body[data-portal-template="interia"].is-pwa:not(.is-shared) .background-fab {
    bottom: calc(88px + var(--safe-bottom));
  }

  body[data-portal-template="interia"].is-builder:not(.is-shared) .swipe-hint,
  body[data-portal-template="interia"].is-pwa:not(.is-shared) .swipe-hint {
    bottom: calc(78px + var(--safe-bottom));
  }
}

body[data-portal-template="interia"].is-pwa:not(.is-shared) .interia-bottom-nav {
  display: grid;
}

body.is-pwa .glass-button,
body.is-pwa .recipient-field,
body.is-pwa .category-strip .category-pill,
body.is-pwa .rail-button,
body.is-pwa .background-fab,
body.is-pwa .category-strip {
  border-color: var(--portal-border);
  background-color: var(--portal-glass);
}

body.is-pwa .category-strip .category-pill.is-active,
body.is-pwa .rail-button.is-active {
  color: #fff;
  background: var(--portal-accent);
}

body[data-portal-template="minimal"].is-pwa .card-title {
  font-family: var(--font-ui), ui-sans-serif, sans-serif;
  font-weight: 800;
}

body[data-portal-template="minimal"].is-pwa .glass-button,
body[data-portal-template="minimal"].is-pwa .recipient-field,
body[data-portal-template="minimal"].is-pwa .rail-button,
body[data-portal-template="minimal"].is-pwa .background-fab {
  border-radius: 14px;
}

body[data-portal-template="rose"].is-pwa .glass-button,
body[data-portal-template="rose"].is-pwa .recipient-field,
body[data-portal-template="rose"].is-pwa .rail-button,
body[data-portal-template="rose"].is-pwa .background-fab {
  box-shadow: 0 12px 30px rgba(97, 35, 59, 0.2);
}

@media (min-width: 761px) {
  body.is-builder .glass-button,
  body.is-builder .recipient-field,
  body.is-builder .category-strip .category-pill,
  body.is-builder .rail-button,
  body.is-builder .background-fab,
  body.is-builder .category-strip {
    border-color: var(--portal-border);
    background-color: var(--portal-glass);
  }

  body.is-builder .category-strip .category-pill.is-active,
  body.is-builder .rail-button.is-active {
    color: #fff;
    background: var(--portal-accent);
  }

  body[data-portal-template="minimal"].is-builder .card-title {
    font-family: var(--font-ui), ui-sans-serif, sans-serif;
    font-weight: 800;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
