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

:root {
    --bk-bg: #0a0a0a;
    --bk-panel: #111;
    --bk-panel-2: #161616;
    --bk-panel-3: #1f1f1f;
    --bk-border: #242424;
    --bk-border-2: #333;
    --bk-text: #f0f0f0;
    --bk-muted: #999;
    --bk-dim: #666;
    --bk-accent: #c8194a;
    --bk-blue: #1a4a8a;
    --bk-radius: 8px;
    --bk-font: "Work Sans", "Comfortaa", Arial, sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 45px 0 0;
    background: var(--bk-bg);
    background-image: none;
    color: var(--bk-text);
    font-family: var(--bk-font);
    font-size: 15px;
    line-height: 1.5;
}

body.page-app {
    height: 100vh;
    overflow: hidden;
    padding-top: 48px;
}

a {
    color: var(--bk-text);
}

a:hover {
    color: var(--bk-accent);
}

.navbar-fixed {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 9999;
    background: var(--bk-panel);
    border-bottom: 1px solid #1e1e1e;
}

.navbar-fixed .navbar-primary {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border-radius: 0;
    display: flex;
    align-items: center;
    background: transparent;
    box-shadow: none;
}

.navbar-fixed .navbar-primary .navbar-logo {
    width: auto;
    height: 48px;
    color: var(--bk-text);
    font-family: var(--bk-font);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    border: 0;
}

.navbar-fixed .navbar-primary .navbar-logo i {
    width: 28px;
    height: 28px;
    position: relative;
    flex: 0 0 28px;
    border-radius: 0;
    background: transparent;
}

.navbar-fixed .navbar-primary .navbar-logo i::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    border-left: 5px solid var(--bk-accent);
    border-bottom: 5px solid var(--bk-accent);
    border-radius: 5px;
}

.navbar-fixed .navbar-primary .navbar-logo i::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 18px;
    height: 18px;
    border-top: 5px solid var(--bk-text);
    border-right: 5px solid var(--bk-text);
    border-radius: 5px;
}

.navbar-fixed .navbar-primary .navbar-logo > span {
    margin-left: 8px;
}

.navbar-fixed .navbar-primary .navbar-logo > span span,
.navbar-fixed .navbar-primary .navbar-logo > span small {
    color: var(--bk-text);
}

.navbar-fixed .navbar-primary .navbar-logo > span > span {
    color: var(--bk-accent);
}

.navbar-fixed .navbar-primary .navbar-logo > span small {
    display: none;
}

.navbar-fixed .navbar-primary .navbar-logo > span::after {
    content: "BETA";
    top: 0;
    right: -50px;
    width: auto;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--bk-accent);
    color: #fff;
    font-family: var(--bk-font);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .5px;
}

.navbar-fixed .navbar-primary .menu-primary {
    height: 48px;
    margin-left: auto;
    gap: 8px;
    font-family: var(--bk-font);
}

.navbar-fixed .navbar-primary .menu-primary > li {
    height: 32px;
    margin: 0;
}

.navbar-fixed .navbar-primary .menu-primary > li a,
.navbar-fixed .navbar-primary .menu-primary > li > span {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--bk-border);
    border-radius: 6px;
    color: var(--bk-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
}

.navbar-fixed .navbar-primary .menu-primary > li a:hover,
.navbar-fixed .navbar-primary .menu-primary > li > span:hover {
    background: #1a1a1a;
    border-color: var(--bk-border-2);
    color: var(--bk-text);
}

.navbar-fixed .navbar-primary .menu-primary > li.menu-btn a {
    padding: 0 12px;
    background: var(--bk-accent);
    border-color: var(--bk-accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
}

.navbar-fixed .navbar-primary .menu-primary > li ul {
    top: 40px;
    right: 0;
    left: auto;
    width: 170px;
    padding: 6px;
    background: var(--bk-panel-2);
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
}

.navbar-fixed .navbar-primary .menu-primary > li ul::before {
    display: none;
}

.navbar-fixed .navbar-primary .menu-primary > li.active > ul {
    top: 40px;
}

.navbar-fixed .navbar-primary .menu-primary > li ul > li a {
    justify-content: flex-start;
    border: 0;
    color: var(--bk-muted);
}

.navbar-fixed .navbar-primary .flag {
    height: 18px;
}

body.scroll-active .navbar-fixed .navbar-primary {
    background: transparent;
    box-shadow: none;
}

.container {
    max-width: 1120px;
}

.content-inner {
    color: var(--bk-text);
}

body:not(.page-app) .content-inner {
    padding-inline: 20px;
}

body:not(.page-app) header.content-inner {
    padding-top: 72px;
    padding-bottom: 54px;
}

body:not(.page-app) section.content-inner {
    padding-top: 42px;
    padding-bottom: 42px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--bk-text);
    font-family: var(--bk-font);
    letter-spacing: 0;
    text-transform: none;
}

h1 {
    font-size: clamp(34px, 6vw, 72px);
    line-height: .95;
    font-weight: 600;
}

h2,
h3 {
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.05;
    font-weight: 600;
}

p,
li {
    color: var(--bk-muted);
}

p.big {
    color: var(--bk-muted);
    font-size: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--bk-text);
    font-family: var(--bk-font);
    font-size: 22px;
}

.logo::before {
    display: none;
}

.logo span {
    color: var(--bk-text);
}

.btn {
    min-height: 40px;
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-radius);
    background: var(--bk-panel-3);
    color: var(--bk-text);
    font-family: var(--bk-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}

.btn:hover,
.btn:focus {
    border-color: var(--bk-accent);
    background: var(--bk-accent);
    color: #fff;
}

.btn.btn-app,
.sidebar .upload {
    background: var(--bk-accent);
    border-color: var(--bk-accent);
    color: #fff;
}

.wrapper,
.img-app,
.img-app-social,
.box-icon,
.notice {
    border: 1px solid var(--bk-border);
    border-radius: 16px;
    background: var(--bk-panel);
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

.img-app,
.img-app-social {
    border: 0;
}

.box-icon {
    border-radius: 16px;
}

.notice {
    color: var(--bk-muted);
}

.page-cgu section.content-inner {
    max-width: 900px;
    padding: 28px;
    border: 1px solid var(--bk-border);
    border-radius: 16px;
    background: var(--bk-panel);
}

.page-cgu section.content-inner p {
    color: #bbb;
}

/* Home */
.page-home {
    overflow-x: hidden;
    --home-accent: var(--bk-accent);
    --home-accent-2: #5b8def;
    --home-text: #ededed;
    --home-muted: #9b9b9b;
    --home-dim: #6f6f6f;
    --home-surface: #0d0d0e;
    --home-surface-2: #131315;
    --home-border: #1f1f22;
}

.page-home .container {
    width: min(1180px, calc(100% - 32px));
    max-width: none;
}

/* ===== Hero ===== */
.home-hero {
    position: relative;
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    padding: 64px 0 64px;
    overflow: hidden;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(200,25,74,.08), transparent 60%),
                radial-gradient(900px 500px at 90% 110%, rgba(91,141,239,.07), transparent 60%),
                #07070a;
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.home-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .55;
    will-change: transform;
}

.home-hero-blob-a {
    top: -120px;
    left: -80px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(200,25,74,.55), rgba(200,25,74,0) 70%);
    animation: home-float-a 22s ease-in-out infinite alternate;
}

.home-hero-blob-b {
    right: -120px;
    bottom: -160px;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(91,141,239,.45), rgba(91,141,239,0) 70%);
    animation: home-float-b 26s ease-in-out infinite alternate;
}

.home-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 80%);
}

.home-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 56px;
    align-items: center;
}

.home-hero-copy {
    max-width: 620px;
    animation: home-rise .9s cubic-bezier(.2,.8,.2,1) both;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px 12px 6px 10px;
    border: 1px solid var(--home-border);
    border-radius: 100px;
    background: rgba(255,255,255,.025);
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--home-accent);
    box-shadow: 0 0 0 4px rgba(200,25,74,.18);
    animation: home-pulse 2.4s ease-in-out infinite;
}

.home-title {
    position: relative;
    margin: 0;
    font-size: clamp(40px, 5.6vw, 76px);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.02em;
    color: #fff;
}

.home-title-line {
    position: relative;
    display: inline-block;
}

.page-home h1 {
    margin: 0;
}

.page-home h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.4vw, 60px);
    line-height: .98;
    letter-spacing: -.015em;
    font-weight: 700;
}

.page-home h3 {
    margin: 16px 0 6px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.005em;
}

.home-hero .big,
.home-section-head .big {
    max-width: 580px;
    margin: 22px 0 0;
    color: #c5c5c5;
    font-size: 18px;
    line-height: 1.6;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
}

.home-actions .btn-app,
.btn-lg {
    position: relative;
    width: auto;
    min-height: 52px;
    margin: 0;
    padding: 0 26px 0 56px;
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--home-accent), #e6286a);
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(200,25,74,.35), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}

.home-actions .btn-app::after,
.btn-lg::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
    transform: skewX(-20deg);
    animation: home-btn-shimmer 3.6s ease-in-out infinite;
    pointer-events: none;
}

.home-actions .btn-app:hover,
.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(200,25,74,.5), inset 0 1px 0 rgba(255,255,255,.25);
}

.home-actions .btn-app i {
    left: 22px;
}

@keyframes home-btn-shimmer {
    0%   { left: -120%; }
    60%  { left: 140%; }
    100% { left: 140%; }
}

.home-note {
    color: var(--home-dim);
    font-size: 12px;
    letter-spacing: .04em;
}

/* Hero stage : animated crop frame */
.home-hero-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
    animation: home-rise 1.1s cubic-bezier(.2,.8,.2,1) .15s both;
}

.home-hero-stage::before {
    content: "";
    position: absolute;
    inset: 6% 6%;
    background: radial-gradient(circle at 50% 50%, rgba(200,25,74,.22), transparent 60%);
    filter: blur(50px);
    z-index: 0;
    animation: home-pulse-glow 5s ease-in-out infinite;
}

.home-frame {
    position: relative;
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, rgba(200,25,74,.16), rgba(91,141,239,.1));
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.05);
    animation: home-frame-morph 12s cubic-bezier(.65,0,.35,1) infinite;
    z-index: 1;
}

.home-frame-grid {
    position: absolute;
    inset: 12%;
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 4px;
    background:
        linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.12) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.12) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
        linear-gradient(0deg, transparent calc(33.33% - .5px), rgba(255,255,255,.12) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.12) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}

.home-frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 0 solid var(--home-accent);
}

.home-frame-corner-tl { top: -2px; left: -2px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 4px; }
.home-frame-corner-tr { top: -2px; right: -2px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 4px; }
.home-frame-corner-bl { bottom: -2px; left: -2px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 4px; }
.home-frame-corner-br { bottom: -2px; right: -2px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 4px; }

.home-frame-labels {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translate(-50%, -100%);
    display: grid;
}

.home-frame-label {
    grid-area: 1 / 1;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--home-accent);
    color: #fff;
    font-family: var(--bk-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    box-shadow: 0 6px 18px rgba(200,25,74,.45);
    opacity: 0;
    animation: home-label 16s ease-in-out infinite;
}

.home-frame-label-1 { animation-delay: 0s; }
.home-frame-label-2 { animation-delay: 3s; }
.home-frame-label-3 { animation-delay: 6s; }
.home-frame-label-4 { animation-delay: 9s; }

@keyframes home-frame-morph {
    0%, 8%    { width: 360px; height: 360px; }
    25%, 33%  { width: 240px; height: 420px; }
    50%, 58%  { width: 460px; height: 258px; }
    75%, 83%  { width: 400px; height: 300px; }
    100%      { width: 360px; height: 360px; }
}

@keyframes home-label {
    0%, 8% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
    20%, 100% { opacity: 0; transform: translate(-50%, -100%) scale(.9); }
}

@keyframes home-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(200,25,74,.18); }
    50% { box-shadow: 0 0 0 9px rgba(200,25,74,0); }
}

@keyframes home-pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .55; transform: scale(1.08); }
}

@keyframes home-underline {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes home-rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes home-float-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(40px, 60px, 0) scale(1.08); }
}

@keyframes home-float-b {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-50px, -40px, 0) scale(1.12); }
}

/* ===== Marquee ===== */
.home-marquee {
    overflow: hidden;
    border-block: 1px solid var(--home-border);
    background: #08080a;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.home-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    align-items: center;
    padding: 22px 0;
    width: max-content;
    will-change: transform;
    animation: home-marquee-scroll 24s linear infinite;
}

.home-marquee-group {
    display: flex;
    flex: 0 0 auto;
    gap: 18px;
    align-items: center;
}

.home-marquee-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px 10px 18px;
    border: 1px solid var(--home-border);
    border-radius: 100px;
    background: rgba(255,255,255,.02);
    color: #d4d4d4;
    font-size: clamp(18px, 2.4vw, 26px);
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}

.home-marquee-item:hover {
    color: #fff;
    background: var(--brand-bg, rgba(255,255,255,.06));
    border-color: var(--brand, var(--home-accent));
    transform: translateY(-2px);
}

.home-marquee-logo {
    width: 22px;
    height: 22px;
    display: block;
    background: var(--brand, currentColor);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.home-marquee-item:hover .home-marquee-logo {
    transform: scale(1.18) rotate(-6deg);
}

.home-marquee-li { --brand: #0a66c2; --brand-bg: rgba(10,102,194,.12); }
.home-marquee-ig { --brand: #e1306c; --brand-bg: rgba(225,48,108,.14); }
.home-marquee-tt { --brand: #25f4ee; --brand-bg: rgba(37,244,238,.12); }
.home-marquee-yt { --brand: #ff0033; --brand-bg: rgba(255,0,51,.14); }
.home-marquee-x  { --brand: #ffffff; --brand-bg: rgba(255,255,255,.08); }
.home-marquee-fb { --brand: #1877f2; --brand-bg: rgba(24,119,242,.14); }

.home-marquee-li .home-marquee-logo { mask-image: url("../icons/linkedin-in.svg"); -webkit-mask-image: url("../icons/linkedin-in.svg"); }
.home-marquee-ig .home-marquee-logo { mask-image: url("../icons/instagram.svg"); -webkit-mask-image: url("../icons/instagram.svg"); }
.home-marquee-tt .home-marquee-logo { mask-image: url("../icons/tiktok.svg"); -webkit-mask-image: url("../icons/tiktok.svg"); }
.home-marquee-yt .home-marquee-logo { mask-image: url("../icons/youtube.svg"); -webkit-mask-image: url("../icons/youtube.svg"); }
.home-marquee-x  .home-marquee-logo { mask-image: url("../icons/x.svg"); -webkit-mask-image: url("../icons/x.svg"); }
.home-marquee-fb .home-marquee-logo { mask-image: url("../icons/facebook-f.svg"); -webkit-mask-image: url("../icons/facebook-f.svg"); }

@keyframes home-marquee-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(calc(-50% - 9px), 0, 0); }
}

/* ===== Sections ===== */
.home-section {
    padding-top: 110px;
    padding-bottom: 110px;
}

.home-section-head {
    max-width: 720px;
    margin: 0 0 56px;
    text-align: center;
    margin-inline: auto;
}

.home-section-head .home-eyebrow {
    margin-bottom: 18px;
}

.home-section-head h2 {
    margin-bottom: 18px;
}

.home-section-head p {
    color: #b6b6b6;
    font-size: 17px;
    line-height: 1.6;
}

/* ===== Format ratios showcase ===== */
.home-formats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-ratio {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
    min-height: 300px;
    padding: 28px 24px 24px;
    border: 1px solid var(--home-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #131316 0%, #0d0d10 100%);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
    overflow: hidden;
}

.home-ratio::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(200,25,74,.4), transparent 40%, transparent 60%, rgba(91,141,239,.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.home-ratio:hover {
    transform: translateY(-4px);
    border-color: rgba(200,25,74,.4);
    box-shadow: 0 24px 48px rgba(0,0,0,.4);
}

.home-ratio:hover::before {
    opacity: 1;
}

.home-ratio-frame {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 240px;
    background: rgba(255,255,255,.025);
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 8px;
    transition: border-color .3s ease, background .3s ease;
}

.home-ratio:hover .home-ratio-frame {
    border-style: solid;
    border-color: var(--home-accent);
    background: rgba(200,25,74,.08);
}

.home-ratio-tag {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--home-dim);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    transition: color .3s ease;
}

.home-ratio:hover .home-ratio-tag {
    color: #fff;
}

.home-ratio-meta {
    width: 100%;
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.home-ratio-meta strong {
    color: var(--home-text);
    font-size: 16px;
    font-weight: 600;
}

.home-ratio-meta span {
    color: var(--home-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.home-ratio-11 .home-ratio-frame  { aspect-ratio: 1 / 1;     max-width: 180px; }
.home-ratio-916 .home-ratio-frame { aspect-ratio: 9 / 16;    max-width: 120px; }
.home-ratio-169 .home-ratio-frame { aspect-ratio: 16 / 9;    max-width: 240px; }
.home-ratio-191 .home-ratio-frame { aspect-ratio: 1.91 / 1;  max-width: 240px; }
.home-ratio-43 .home-ratio-frame  { aspect-ratio: 4 / 3;     max-width: 220px; }
.home-ratio-32 .home-ratio-frame  { aspect-ratio: 3 / 2;     max-width: 230px; }

/* ===== Tools ===== */
.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-tool {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--home-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #131316 0%, #0d0d10 100%);
    overflow: hidden;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.home-tool::after {
    content: "";
    position: absolute;
    inset: -2px;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(220px 160px at var(--mx, 50%) var(--my, 0%), rgba(200,25,74,.18), transparent 60%);
    opacity: 0;
    transition: opacity .35s ease;
}

.home-tool:hover {
    transform: translateY(-4px);
    border-color: rgba(200,25,74,.4);
    box-shadow: 0 24px 48px rgba(0,0,0,.4);
}

.home-tool:hover::after {
    opacity: 1;
}

.home-tool h3 {
    margin: 0 0 6px;
    color: var(--home-text);
    font-size: 15px;
    font-weight: 600;
}

.home-tool p {
    margin: 0;
    color: #9c9c9c;
    font-size: 13px;
    line-height: 1.55;
}

.home-tool-visual {
    position: relative;
    height: 130px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
    border: 1px solid rgba(255,255,255,.04);
    overflow: hidden;
}

/* Simulated photo background, used by Crop and Zoom */
.home-tool-photo {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 28% 32%, #f6c089 0%, transparent 40%),
        radial-gradient(circle at 72% 60%, #c8194a 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, #5b8def 0%, transparent 55%),
        linear-gradient(135deg, #1a1230, #2a0e1a);
}

/* Crop : moving crop window over photo, with darken outside */
.home-tool-crop .home-tool-photo {
    inset: 6px;
    border-radius: 8px;
}

.home-tool-crop-window {
    position: absolute;
    inset: 24px 36px;
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.45);
    animation: home-tool-crop-window 5s cubic-bezier(.65,0,.35,1) infinite;
}

.home-tool-crop-c {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--home-accent);
    border-radius: 2px;
}

.home-tool-crop-c-tl { top: -5px; left: -5px; }
.home-tool-crop-c-tr { top: -5px; right: -5px; }
.home-tool-crop-c-bl { bottom: -5px; left: -5px; }
.home-tool-crop-c-br { bottom: -5px; right: -5px; }

@keyframes home-tool-crop-window {
    0%, 20%   { inset: 24px 36px; }
    33%, 53%  { inset: 14px 60px; }
    66%, 86%  { inset: 30px 18px; }
    100%      { inset: 24px 36px; }
}

/* Resize : two dimension labels with arrow */
.home-tool-resize .home-tool-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
}

.home-tool-dim {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.025);
    color: var(--home-muted);
    font-family: var(--bk-font);
    font-weight: 700;
    letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
    transition: color .3s ease, border-color .3s ease, background .3s ease, transform .3s ease;
}

.home-tool-dim-large {
    font-size: 14px;
    animation: home-dim-large 4s ease-in-out infinite;
}

.home-tool-dim-small {
    font-size: 12px;
    border-color: var(--home-accent);
    background: rgba(200,25,74,.18);
    color: #fff;
    animation: home-dim-small 4s ease-in-out infinite;
}

.home-tool-dim-arrow {
    width: 2px;
    height: 14px;
    background: linear-gradient(180deg, var(--home-muted), var(--home-accent));
    border-radius: 2px;
    position: relative;
}

.home-tool-dim-arrow::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-right: 2px solid var(--home-accent);
    border-bottom: 2px solid var(--home-accent);
    transform: rotate(45deg);
    border-radius: 1px;
}

@keyframes home-dim-large {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(.96); opacity: .65; }
}

@keyframes home-dim-small {
    0%, 100% { transform: scale(.96); opacity: .65; }
    50%      { transform: scale(1.04); opacity: 1; box-shadow: 0 6px 18px rgba(200,25,74,.35); }
}

/* Zoom : photo + magnifying loupe + zoom level */
.home-tool-zoom .home-tool-photo {
    inset: 6px;
    border-radius: 8px;
    animation: home-tool-photo-zoom 4s ease-in-out infinite;
    transform-origin: center;
}

.home-tool-loupe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: rgba(0,0,0,.18);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 0 4px rgba(0,0,0,.3), 0 12px 28px rgba(0,0,0,.5);
}

.home-tool-loupe::after {
    content: "";
    position: absolute;
    bottom: -14px;
    right: -8px;
    width: 18px;
    height: 5px;
    border-radius: 2px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 0 0 0 2px rgba(0,0,0,.3);
}

.home-tool-loupe i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    background: #fff;
    mask-image: url("../icons/magnifying-glass-plus.svg");
    -webkit-mask-image: url("../icons/magnifying-glass-plus.svg");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.home-tool-zoom-level {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--home-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 4px 12px rgba(200,25,74,.5);
    animation: home-zoom-level 4s ease-in-out infinite;
}

@keyframes home-tool-photo-zoom {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.4); }
}

@keyframes home-zoom-level {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); box-shadow: 0 6px 18px rgba(200,25,74,.7); }
}

/* Mirror : letter R + flipped R + axis */
.home-tool-mirror .home-tool-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
}

.home-tool-mirror-letter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(200,25,74,.35), rgba(200,25,74,.08));
    border: 1px solid rgba(200,25,74,.5);
    color: #fff;
    font-family: var(--bk-font);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(200,25,74,.25);
    animation: home-mirror-bounce 2.4s ease-in-out infinite;
}

.home-tool-mirror-letter-flip {
    transform: scaleX(-1);
    animation: home-mirror-flip 2.4s ease-in-out infinite;
}

.home-tool-mirror-axis {
    position: relative;
    width: 1px;
    height: 70px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,.4), transparent);
}

.home-tool-mirror-axis::before,
.home-tool-mirror-axis::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--home-accent);
}

.home-tool-mirror-axis::before { top: 0; }
.home-tool-mirror-axis::after  { bottom: 0; }

@keyframes home-mirror-bounce {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-3px); }
}

@keyframes home-mirror-flip {
    0%, 100% { transform: scaleX(-1) translateX(0); }
    50%      { transform: scaleX(1) translateX(3px); }
}

/* Filters : color chips */
.home-tool-filters .home-tool-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.home-tool-filter-chip {
    width: 36px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 6px 14px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.08);
    animation: home-tool-chip 3s ease-in-out infinite;
}

.home-tool-filter-chip:nth-child(1) { animation-delay: 0s; }
.home-tool-filter-chip:nth-child(2) { animation-delay: .15s; }
.home-tool-filter-chip:nth-child(3) { animation-delay: .3s; }
.home-tool-filter-chip:nth-child(4) { animation-delay: .45s; }
.home-tool-filter-chip:nth-child(5) { animation-delay: .6s; }

@keyframes home-tool-chip {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Adjustments : sliders with label + moving thumb */
.home-tool-adjust .home-tool-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
}

.home-tool-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-tool-slider b {
    flex: 0 0 78px;
    color: var(--home-muted);
    font-family: var(--bk-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-tool-slider > span {
    flex: 1 1 auto;
    position: relative;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,.1);
}

.home-tool-slider > span::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 18%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--home-accent), rgba(200,25,74,.35));
    animation: home-tool-fill 4s ease-in-out infinite;
}

.home-tool-slider > span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 18%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--home-accent);
    box-shadow: 0 0 0 3px rgba(200,25,74,.25);
    animation: home-tool-thumb 4s ease-in-out infinite;
}

.home-tool-slider:nth-child(1) > span::before,
.home-tool-slider:nth-child(1) > span::after { animation-delay: 0s; }
.home-tool-slider:nth-child(2) > span::before,
.home-tool-slider:nth-child(2) > span::after { animation-delay: .6s; }
.home-tool-slider:nth-child(3) > span::before,
.home-tool-slider:nth-child(3) > span::after { animation-delay: 1.2s; }

@keyframes home-tool-thumb {
    0%, 100% { left: 18%; }
    50%      { left: 78%; }
}

@keyframes home-tool-fill {
    0%, 100% { width: 18%; }
    50%      { width: 78%; }
}

/* Format tags */
.home-tool-format .home-tool-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.home-tool-format-tag {
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.02);
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    animation: home-tool-tag 4.5s ease-in-out infinite;
}

.home-tool-format-tag:nth-child(1) { animation-delay: 0s; }
.home-tool-format-tag:nth-child(2) { animation-delay: 1.5s; }
.home-tool-format-tag:nth-child(3) { animation-delay: 3s; }

@keyframes home-tool-tag {
    0%, 25%, 100% {
        border-color: rgba(255,255,255,.12);
        background: rgba(255,255,255,.02);
        color: var(--home-muted);
    }
    33%, 58% {
        border-color: var(--home-accent);
        background: rgba(200,25,74,.18);
        color: #fff;
    }
}

/* Privacy shield */
.home-tool-privacy .home-tool-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-tool-shield {
    position: relative;
    width: 64px;
    height: 76px;
    background: linear-gradient(180deg, rgba(200,25,74,.4), rgba(200,25,74,.12));
    border: 1px solid rgba(200,25,74,.5);
    border-radius: 50% 50% 12px 12px / 38% 38% 12px 12px;
    box-shadow: 0 12px 32px rgba(200,25,74,.3);
    animation: home-tool-shield 3s ease-in-out infinite;
}

.home-tool-shield-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    background: #fff;
    mask-image: url("../icons/fingerprint.svg");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url("../icons/fingerprint.svg");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

@keyframes home-tool-shield {
    0%, 100% { transform: translateY(0); box-shadow: 0 12px 32px rgba(200,25,74,.3); }
    50%      { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(200,25,74,.45); }
}

/* ===== Features ===== */
.home-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-top: 0;
}

.home-formats { padding-top: 0; }

.home-feature {
    position: relative;
    padding: 32px;
    border: 1px solid var(--home-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #131316 0%, #0d0d10 100%);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.home-feature:hover {
    transform: translateY(-4px);
    border-color: rgba(200,25,74,.35);
    box-shadow: 0 24px 48px rgba(0,0,0,.4);
}

.home-feature .box-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    border: 1px solid rgba(200,25,74,.25);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(200,25,74,.18), rgba(200,25,74,.05));
    box-shadow: 0 8px 22px rgba(200,25,74,.22), inset 0 1px 0 rgba(255,255,255,.06);
}

.home-feature .box-icon i {
    width: 24px;
    height: 24px;
    background: var(--home-text);
}

.home-feature h3 {
    margin: 0 0 8px;
    color: var(--home-text);
    font-size: 19px;
}

.home-feature p {
    color: #a8a8a8;
    font-size: 14px;
    line-height: 1.7;
}

/* ===== Final CTA ===== */
.home-cta {
    position: relative;
    padding: 110px 0;
    overflow: hidden;
    border-top: 1px solid var(--home-border);
    background: radial-gradient(800px 360px at 50% 0%, rgba(200,25,74,.12), transparent 60%), #08080a;
}

.home-cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.home-cta-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.home-cta h2 {
    margin: 16px 0 18px;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -.02em;
    background: linear-gradient(180deg, #fff 0%, #b8b8b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-cta .big {
    max-width: 620px;
    margin: 0 0 36px;
    color: #c5c5c5;
    font-size: 18px;
    line-height: 1.6;
}

.home-cta .home-actions {
    margin-top: 0;
    justify-content: center;
}

/* Scroll-driven reveal — graceful fallback in older browsers */
@supports (animation-timeline: view()) {
    .home-section .home-section-head,
    .home-ratio,
    .home-tool,
    .home-feature {
        animation: home-reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }

    @keyframes home-reveal {
        from { opacity: 0; transform: translateY(36px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-frame,
    .home-frame-label,
    .home-hero-blob,
    .home-eyebrow-dot,
    .home-actions .btn-app::after,
    .btn-lg::after,
    .home-tool-crop-window,
    .home-tool-photo,
    .home-tool-dim-large,
    .home-tool-dim-small,
    .home-tool-zoom-level,
    .home-tool-mirror-letter,
    .home-tool-filter-chip,
    .home-tool-slider > span::before,
    .home-tool-slider > span::after,
    .home-tool-format-tag,
    .home-tool-shield,
    .home-hero-stage,
    .home-hero-copy,
    .home-hero-stage::before {
        animation: none !important;
    }
}

.app-editor {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    display: flex;
    overflow: hidden;
    background: var(--bk-bg);
}

.app-editor-sidebar {
    width: 320px;
    min-width: 320px;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--bk-panel);
    border-right: 1px solid #1e1e1e;
}

.app-editor-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0d0d0d;
}

.page-app .container.pt-xl,
.page-app footer {
    display: none;
}

.page-app .sidebar {
    width: 100%;
    display: block;
    flex: none;
    padding: 0;
}

.page-app .sidebar,
.page-app .side-controls {
    min-height: auto;
}

.page-app .sidebar .action-button {
    padding: 12px 16px;
    border-bottom: 1px solid #1e1e1e;
}

.page-app .sidebar .btn {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 9px 14px 9px 42px;
    border-radius: var(--bk-radius);
    font-size: 12px;
    line-height: 1.2;
}

.page-app .download-toggle,
.page-app .image-adjustments,
.page-app .side-control {
    margin-top: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.page-app .download-toggle > .grid > div:nth-child(1) {
    border-bottom: 1px solid var(--bk-border);
}

.page-app .form-size,
.page-app .form-format {
    background: transparent;
}

.page-app input[type="number"],
.page-app select {
    height: 30px;
    border: 1px solid var(--bk-border);
    border-radius: 6px;
    background: var(--bk-panel-3);
    color: var(--bk-text);
    font-family: var(--bk-font);
    font-size: 12px;
}

.page-app input[type="range"] {
    accent-color: var(--bk-accent);
}

.page-app .form-size > div:nth-child(1),
.page-app .form-size > div:nth-child(3),
.page-app .form-format > div:nth-child(1) {
    color: var(--bk-dim);
    font-size: 12px;
    font-weight: 500;
}

.page-app .side-controls {
    display: block;
}

.page-app .side-controls > .flex {
    position: fixed;
    left: 50%;
    bottom: 10px;
    z-index: 20;
    transform: translateX(-50%);
}

.page-app .control-actions .actions {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    background: #161616;
}

.page-app .side-controls .actions .actions-zone {
    width: 32px;
    height: 32px;
    margin: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
}

.page-app .side-controls .actions .actions-zone:hover {
    background: #222;
    border: 0;
}

.page-app .side-controls .actions .actions-zone img {
    width: 16px;
    height: 16px;
    filter: invert(1);
    opacity: .7;
}

.page-app .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid #1e1e1e;
}

.page-app .buttons .btn-icon {
    flex: 1 1 calc(25% - 4px);
    min-width: 54px;
    height: 58px;
    margin: 0;
    border: 1px solid var(--bk-border);
    border-radius: 7px;
    background: transparent;
    box-shadow: none;
}

.page-app .buttons .btn-icon .icon {
    height: 20px;
    background: var(--bk-dim);
}

.page-app .buttons .btn-icon .title {
    color: var(--bk-dim);
    font-size: 9px;
    line-height: 1.15;
}

.page-app .buttons .btn-icon.active,
.page-app .buttons .btn-icon:hover {
    border-color: rgba(200,25,74,.45);
    background: rgba(200,25,74,.12);
}

.page-app .buttons .btn-icon.active .icon,
.page-app .buttons .btn-icon:hover .icon {
    background: var(--bk-text);
}

.page-app .buttons .btn-icon.active .title,
.page-app .buttons .btn-icon:hover .title {
    color: var(--bk-text);
}

.page-app .display {
    padding: 0 16px 16px;
    border-bottom: 1px solid #222;
}

.page-app .display h3,
.page-app .image-adjustments h3 {
    margin: 0;
    padding: 11px 0;
    color: #aaa;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-app .display hr {
    display: none;
}

.page-app .side-controls .action-btn {
    box-shadow: none;
}

.page-app .side-controls .action-btn-ratio-large {
    padding: 9px 6px;
    border: 1px solid var(--bk-border);
    border-radius: 8px;
    background: transparent;
}

.page-app .side-controls .action-btn-ratio-large:hover:not(.alert),
.page-app .side-controls .action-btn-ratio-large.active:not(.alert) {
    border-color: rgba(200,25,74,.5);
    background: rgba(200,25,74,.12);
}

.page-app .side-controls .action-btn-ratio-large b,
.page-app .side-controls .action-btn-ratio-large small {
    color: var(--bk-dim);
    font-size: 10px;
}

.page-app .side-controls .action-btn-ratio-large:hover:not(.alert) b,
.page-app .side-controls .action-btn-ratio-large.active:not(.alert) b {
    color: var(--bk-text);
}

.page-app .side-controls .action-btn-ratio-large .thumb {
    height: 36px;
    margin-bottom: 6px;
}

.page-app .side-controls .action-btn-ratio-large .thumb span {
    background: #2d2d2d;
}

.page-app .side-controls .action-btn-ratio-large.active:not(.alert) .thumb span,
.page-app .side-controls .action-btn-ratio-large:hover:not(.alert) .thumb span {
    background: var(--bk-accent);
}

.page-app .side-controls .action-btn-ratio-large .icon {
    display: none;
}

.page-app .side-controls .action-btn-ratio-large.alert {
    background: #1a1a1a;
    opacity: .6;
}

.page-app .side-controls .action-btn-ratio-large.alert::after {
    background: #33240f;
    color: #d9a34a;
}

.page-app .image-adjustments {
    padding: 0 16px 16px;
    border-bottom: 1px solid #222;
}

.page-app .adjustment-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.page-app .adjustment-preset {
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid #2d2d2d;
    border-radius: 20px;
    background: var(--bk-panel-3);
    color: #888;
    font-family: var(--bk-font);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
}

.page-app .adjustment-preset:hover,
.page-app .adjustment-preset.active {
    border-color: var(--bk-accent);
    background: var(--bk-accent);
    color: #fff;
}

.page-app .adjustment-control span {
    color: #888;
    font-size: 12px;
    font-weight: 400;
}

.page-app .adjustment-control b {
    color: var(--bk-accent);
}

.page-app .image-container {
    flex: 1;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 48px 72px;
}

.page-app .image-workspace {
    width: min(270px, 72vw);
    height: min(220px, 42vh);
    border: 2px dashed #2a2a2a;
    border-radius: 16px;
    background: #0d0d0d;
    color: #888;
}

.page-app .image-workspace:has(img[src]:not([src=""])) {
    width: 100%;
    height: 100%;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
}

.page-app .image-workspace:hover {
    border-color: #444;
}

.page-app .image-workspace.is-dragover {
    border-color: var(--bk-accent);
    background: #111;
}

.page-app .image-workspace .label {
    color: #888;
    font-family: var(--bk-font);
    font-size: 15px;
    font-weight: 500;
}

.page-app .image-workspace:hover .label {
    transform: none;
}

.page-app .image-workspace img,
.page-app .cropper-container {
    max-width: 100%;
    max-height: 100%;
}

.page-app .cropper-container {
    box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 24px 64px rgba(0,0,0,.6);
}

body.page-app .cropper-view-box {
    outline: 2px dashed rgba(255,255,255,.55);
}

body.page-app .cropper-point {
    width: 10px;
    height: 10px;
    border: 0;
    background: var(--bk-accent);
    box-shadow: 0 0 0 2px #111;
}

@media only screen and (max-width: 1000px) {
    body {
        padding-top: 56px;
    }

    .home-hero {
        min-height: auto;
        padding: 56px 0 56px;
    }

    .home-hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .home-hero-copy {
        max-width: none;
    }

    .home-title {
        font-size: clamp(40px, 10vw, 64px);
    }

    .home-hero .big,
    .home-cta .big {
        font-size: 16px;
    }

    .home-hero-stage {
        min-height: 340px;
    }

    .home-frame {
        width: 280px;
        height: 280px;
    }

    @keyframes home-frame-morph {
        0%, 8%    { width: 280px; height: 280px; }
        25%, 33%  { width: 180px; height: 320px; }
        50%, 58%  { width: 320px; height: 180px; }
        75%, 83%  { width: 300px; height: 220px; }
        100%      { width: 280px; height: 280px; }
    }

    .home-section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .home-section-head {
        margin-bottom: 36px;
    }

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

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

    .home-cta {
        padding: 64px 0;
    }

    .home-cta h2 {
        font-size: clamp(36px, 9vw, 64px);
    }

    .home-marquee-item {
        font-size: clamp(16px, 4.5vw, 22px);
        padding: 8px 18px 8px 14px;
        gap: 10px;
    }

    .home-marquee-logo {
        width: 18px;
        height: 18px;
    }

    body.page-app {
        height: auto;
        min-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .navbar-fixed .navbar-primary {
        height: 56px;
    }

    .navbar-fixed .navbar-primary .menu-primary > li:not(.sub-menu) {
        display: none;
    }

    .app-editor {
        height: auto;
        min-height: calc(100dvh - 56px);
        flex-direction: column;
        overflow: visible;
    }

    .app-editor-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        min-height: 0;
        overflow-y: visible;
        overflow-x: hidden;
        order: 2;
        border-right: 0;
        border-top: 1px solid #1e1e1e;
    }

    .app-editor-main {
        order: 1;
        min-height: 46dvh;
        overflow: visible;
    }

    .page-app .image-container {
        padding: 20px 16px 62px;
    }
}

/* Sidebar polish: closer to the reference app surface. */
.page-app .app-editor-sidebar {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 100%;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-app .app-editor-sidebar::-webkit-scrollbar {
    width: 4px;
}

.page-app .app-editor-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.page-app .app-editor-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.page-app .sidebar .action-button {
    display: block;
    padding: 10px 14px 10px;
    border-bottom: 0;
}

.page-app .sidebar .upload {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px 0 38px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    font-size: 11px;
}

.page-app .sidebar .upload i {
    left: 18px;
    width: 16px;
    mask-size: 16px;
    -webkit-mask-size: 16px;
    mask-image: url("assets/icons/upload.svg");
    -webkit-mask-image: url("assets/icons/upload.svg");
    border: 0;
}

.page-app .download-toggle {
    margin: 10px 0 0;
    padding: 0 0 12px;
    border-bottom: 1px solid #222;
    display: block !important;
}

.page-app .image-adjustments.hide {
    display: block !important;
}

.page-app .download-toggle::before,
.page-app .buttons::before,
.page-app .display::before,
.page-app .image-adjustments::before {
    display: flex;
    align-items: center;
    min-height: 26px;
    color: #aaa;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-app .download-toggle::before {
    content: "Export";
}

.page-app .buttons::before {
    content: "Plateforme";
    flex: 0 0 100%;
    min-height: 22px;
}

.page-app .download-toggle .grid {
    display: block;
}

.page-app .download-toggle > .grid > div:nth-child(1) {
    margin: 0 0 7px;
    padding: 0;
    border-bottom: 0;
}

.page-app .download-toggle .box-download {
    display: grid;
    gap: 7px;
}

.page-app .download-toggle .box-download > div {
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid #252525;
    border-radius: 8px;
    background: #151515;
}

.page-app .download-toggle .btn {
    justify-content: center;
    min-height: 34px;
    padding: 0 12px 0 34px;
    background: #173b6b;
    border-color: #22548e;
    border-radius: 7px;
    text-align: center;
}

.page-app .download-toggle .btn:hover {
    background: #1f5a9a;
    border-color: #2d70b8;
}

.page-app .download-toggle .download-size:not(.active) {
    display: none;
}

.page-app .download-toggle .download-size.active {
    display: flex !important;
    align-items: center;
}

.page-app .download-toggle .download-max {
    display: flex;
    align-items: center;
}

.page-app .download-toggle .download-max.hide {
    display: flex !important;
}

.page-app .download-toggle .download-max span,
.page-app .download-toggle .download-size span {
    color: #fff;
    font-size: 11px;
    font-weight: 500;
}

.page-app .download-toggle .download-size b {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.page-app .download-toggle i {
    left: 14px;
    right: auto;
    width: 14px;
    border-left: 0;
    background: #fff;
    opacity: .95;
    mask-image: url("assets/icons/download.svg");
    -webkit-mask-image: url("assets/icons/download.svg");
    mask-size: 14px;
    -webkit-mask-size: 14px;
}

.page-app .form-size,
.page-app .form-format {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 6px;
    align-items: center;
    margin: 0;
    border-radius: 0;
}

.page-app .form-format {
    grid-template-columns: 42px minmax(0, 1fr);
}

.page-app .form-size > div,
.page-app .form-format > div {
    width: auto !important;
}

.page-app .form-size > div:nth-child(1),
.page-app .form-size > div:nth-child(3),
.page-app .form-format > div:nth-child(1) {
    justify-content: flex-start;
    color: #7e7e7e;
    font-size: 11px;
}

.page-app .form-size #maxsize,
.page-app .form-format #format {
    appearance: auto;
    -webkit-appearance: auto;
    width: 100%;
    height: 26px;
    padding: 3px 8px;
    color-scheme: dark;
    background: #202020 !important;
    border: 1px solid #303030 !important;
    border-radius: 6px;
    color: var(--bk-text) !important;
    -webkit-text-fill-color: var(--bk-text);
    font-size: 11px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.page-app .form-format #format option {
    background: #1f1f1f;
    color: var(--bk-text);
}

.page-app .side-controls {
    margin: 0;
    padding: 0 14px;
    overflow-x: hidden;
}

.page-app .buttons {
    margin: 0 -14px;
    padding: 16px 14px 12px;
    gap: 6px;
    border-top: 1px solid #202020;
}

.page-app .buttons .btn-icon {
    flex-basis: calc(25% - 5px);
    min-width: 0;
    height: 54px;
    padding: 7px 4px;
    justify-content: center;
}

.page-app .buttons .btn-icon .icon {
    height: 18px;
    margin: 0;
}

.page-app .buttons .btn-icon .title {
    padding-top: 4px;
    overflow-wrap: anywhere;
}

.page-app .display {
    padding: 14px 0 16px;
}

.page-app .display h3 {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0;
}

.page-app .display-ratio h3 {
    display: none;
}

.page-app .aspect .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
    width: 100%;
}

.page-app .display-ratio .aspect .actions {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.page-app .side-controls .action-btn-ratio-large {
    grid-column: auto !important;
    width: auto;
    min-width: 0;
    min-height: 72px;
    align-content: center;
    padding: 8px 5px;
}

.page-app .side-controls .action-btn-ratio-large .thumb {
    height: 30px;
    margin-bottom: 5px;
}

.page-app .display-ratio .action-btn-ratio-large .thumb {
    height: 34px;
}

.page-app .side-controls .action-btn-ratio-large .thumb span {
    max-width: 38px;
    max-height: 34px;
}

.page-app .side-controls .action-btn-ratio-large.action-btn-11 .thumb span {
    width: 36px;
}

.page-app .side-controls .action-btn-ratio-large.action-btn-169 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-43 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-32 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-21 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-pano .thumb span {
    width: 38px;
}

.page-app .side-controls .action-btn-ratio-large.action-btn-916 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-34 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-23 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-45 .thumb span,
.page-app .side-controls .action-btn-ratio-large.action-btn-12 .thumb span {
    height: 34px;
}

.page-app .side-controls .action-btn-ratio-large b {
    display: block;
    max-width: 100%;
    min-height: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
}

.page-app .side-controls .action-btn-ratio-large small {
    display: block;
    margin-top: 2px;
    line-height: 1.1;
}

.page-app .image-adjustments {
    margin: 0;
    padding: 14px 0 20px;
    border-bottom: 0;
}

.page-app .image-adjustments h3 {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0;
}

.page-app .adjustment-presets {
    gap: 5px;
    margin-bottom: 15px;
}

.page-app .adjustment-preset {
    flex: 0 1 auto;
    min-height: 24px;
    padding: 4px 9px;
}

.page-app .adjustment-controls {
    gap: 13px;
}

.page-app .adjustment-control {
    gap: 6px;
}

.page-app .adjustment-control input[type="range"] {
    height: 2px;
    background: #2d2d2d;
    border-radius: 1px;
}

@media only screen and (max-width: 1000px) {
    .page-app .app-editor-sidebar {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        max-height: none;
        overflow-y: visible;
        overflow-x: hidden;
    }
}
