:root {
  --gl-paper-alpha: .76;
  --gl-scene-dim: .28;
  --gl-ink-color: #45343c;
  --gl-ink-accent: #633b4e;
  --gl-letter-font: "Cormorant Garamond", Georgia, serif;
  --gl-letter-style: normal;
  --gl-letter-body-weight: 600;
  --gl-letter-heading-weight: 600;
  --gl-letter-meta-weight: 700;
  --gl-letter-signature-style: italic;
}

.gl-video-layer { position: fixed; z-index: -6; inset: 0; overflow: hidden; pointer-events: none; background: #171722; opacity: 0; transition: opacity .65s ease; }
.gl-video-active.gl-video-ready .gl-video-layer { opacity: 1; }
.gl-video-background { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(.94) contrast(1.04); transform: scale(1.012); }
.gl-video-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,13,21,calc(var(--gl-scene-dim) + .1)), rgba(30,20,34,var(--gl-scene-dim)) 48%, rgba(20,14,23,calc(var(--gl-scene-dim) + .04))), linear-gradient(180deg, rgba(15,15,24,.08), rgba(15,10,18,.36)); transition: background .8s ease; }
.gl-video-active #cinematicBg { opacity: 0; }
.gl-video-active .brand-card { border-color: rgba(255,255,255,.24); background: linear-gradient(145deg,rgba(31,25,35,.5),rgba(42,29,40,.24)); backdrop-filter: blur(18px) saturate(1.1); }
.gl-video-active .letter { border-color: rgba(255,255,255,.76); background: linear-gradient(145deg,rgba(255,252,244,var(--gl-paper-alpha)),rgba(255,242,232,calc(var(--gl-paper-alpha) - .05))); backdrop-filter: blur(24px) saturate(1.08); box-shadow: 0 34px 100px rgba(11,8,12,.52), inset 0 0 70px rgba(213,158,146,.08); }

body[data-gl-ink="ink"] { --gl-ink-color:#45343c; --gl-ink-accent:#633b4e; }
body[data-gl-ink="plum"] { --gl-ink-color:#65304d; --gl-ink-accent:#8b3f62; }
body[data-gl-ink="forest"] { --gl-ink-color:#29473d; --gl-ink-accent:#376452; }
body[data-gl-ink="midnight"] { --gl-ink-color:#26344b; --gl-ink-accent:#354e73; }
body[data-gl-type="classic"] { --gl-letter-font:"Cormorant Garamond",Georgia,serif;--gl-letter-style:normal;--gl-letter-body-weight:600;--gl-letter-heading-weight:600;--gl-letter-meta-weight:700;--gl-letter-signature-style:italic; }
body[data-gl-type="elegant"] { --gl-letter-font:Georgia,"Times New Roman",serif;--gl-letter-style:normal;--gl-letter-body-weight:500;--gl-letter-heading-weight:600;--gl-letter-meta-weight:700;--gl-letter-signature-style:italic; }
body[data-gl-type="clear"] { --gl-letter-font:"Manrope",system-ui,sans-serif;--gl-letter-style:normal;--gl-letter-body-weight:560;--gl-letter-heading-weight:700;--gl-letter-meta-weight:700;--gl-letter-signature-style:normal; }
body[data-gl-type="poetic"] { --gl-letter-font:"Cormorant Garamond",Georgia,serif;--gl-letter-style:italic;--gl-letter-body-weight:600;--gl-letter-heading-weight:600;--gl-letter-meta-weight:600;--gl-letter-signature-style:italic; }
body[data-gl-type="literary"] { --gl-letter-font:"Literata",Georgia,"Times New Roman",serif;--gl-letter-style:normal;--gl-letter-body-weight:500;--gl-letter-heading-weight:600;--gl-letter-meta-weight:600;--gl-letter-signature-style:italic; }
.letter #letterTitle,.letter .letter-text,.letter .letter-meta,.letter .signature,.letter .signature span,.letter .signature strong,.generated-card textarea { font-family:var(--gl-letter-font); }
.letter #letterTitle,.letter .letter-text,.letter .letter-meta,.generated-card textarea { font-style:var(--gl-letter-style); }
.letter .signature,.letter .signature span,.letter .signature strong { font-style:var(--gl-letter-signature-style); }
.letter .letter-text,.generated-card textarea { color:var(--gl-ink-color);font-weight:var(--gl-letter-body-weight);text-shadow:0 1px 2px rgba(255,255,255,.72); }
.letter #letterTitle,.letter .signature strong,.letter .letter-meta strong { color:var(--gl-ink-accent);font-weight:var(--gl-letter-heading-weight); }
.letter .letter-meta { font-weight:var(--gl-letter-meta-weight); }
body[data-gl-type="clear"] .letter .letter-text { font-size: clamp(17px,3vw,22px); line-height: 1.62; font-weight: 560; letter-spacing: .005em; }
body[data-gl-type="elegant"] .letter .letter-text { font-size: clamp(20px,3.7vw,27px); line-height: 1.48; font-weight: 500; }
body[data-gl-type="poetic"] .letter .letter-text { font-size:clamp(20px,3.7vw,27px);line-height:1.52;letter-spacing:.004em; }
body[data-gl-type="literary"] .letter .letter-text { font-size:clamp(19px,3.5vw,26px);line-height:1.56;letter-spacing:.003em; }

.gl-frame-layer { position:absolute; z-index:3; inset:7px; overflow:hidden; border-radius:7px 7px 12px 12px; pointer-events:none; opacity:0; transition:opacity .35s ease; }
body:not([data-gl-frame="none"]) .gl-frame-layer { opacity:1; }
.gl-frame-layer::before,.gl-frame-layer::after { content:""; position:absolute; inset:0; border-radius:inherit; }
.gl-orbit,.gl-corner { position:absolute; z-index:2; display:grid; place-items:center; font-style:normal; }
.gl-orbit { width:24px; height:24px; offset-path:inset(8px round 13px); animation:gl-frame-orbit 14s linear infinite; }
.gl-orbit-b { animation-delay:-7s; }
.gl-corner-a { left:11px; top:9px; }.gl-corner-b { right:11px; bottom:9px; }
body[data-gl-frame="hearts"] .gl-frame-layer::before { inset:3px; border:1px solid rgba(184,77,118,.56); box-shadow:inset 0 0 22px rgba(205,95,137,.12); }
body[data-gl-frame="hearts"] .gl-orbit { color:#ba537b; background:rgba(255,245,246,.76); border:1px solid rgba(186,83,123,.25); box-shadow:0 3px 12px rgba(127,47,79,.18); }
body[data-gl-frame="hearts"] .gl-corner { color:#bd5a7f; }
body[data-gl-frame="moon"] .gl-frame-layer::before { inset:3px; border:1px solid rgba(167,146,102,.62); box-shadow:inset 0 0 26px rgba(224,204,151,.16); }
body[data-gl-frame="moon"] .gl-frame-layer::after { inset:9px; border:1px dotted rgba(143,126,93,.3); }
body[data-gl-frame="moon"] .gl-orbit,body[data-gl-frame="moon"] .gl-corner { color:#9f8249; text-shadow:0 0 9px #f2d58e; }
body[data-gl-frame="forest"] .gl-frame-layer::before { inset:3px; border:1px solid rgba(69,104,80,.55); box-shadow:inset 0 0 29px rgba(70,115,84,.12); }
body[data-gl-frame="forest"] .gl-frame-layer::after { inset:8px; border:1px solid rgba(178,137,72,.38); }
body[data-gl-frame="forest"] .gl-orbit,body[data-gl-frame="forest"] .gl-corner { color:#54755f; }
body[data-gl-frame="pearl"] .gl-frame-layer::before { inset:4px; border:3px double rgba(180,116,140,.52); box-shadow:inset 0 0 0 4px rgba(255,255,255,.25),inset 0 0 26px rgba(201,139,161,.12); }
body[data-gl-frame="pearl"] .gl-orbit,body[data-gl-frame="pearl"] .gl-corner { color:#a8617d; background:radial-gradient(circle,#fff 0 25%,#edcad7 28% 55%,transparent 58%); }
.letter.gl-letter-alive .gl-frame-layer { animation:gl-frame-bloom 1.1s cubic-bezier(.16,1,.3,1); }

body.gl-premium-active:not([data-gl-frame="none"]) .ai-panel { border-color:var(--gl-vip-stroke);box-shadow:0 35px 110px rgba(7,5,9,.42),inset 0 0 0 1px var(--gl-vip-soft); }
body.gl-premium-active:not([data-gl-frame="none"]) .generated-card { position:relative;overflow:hidden;border-color:var(--gl-vip-stroke);box-shadow:0 18px 48px rgba(54,37,47,.12),inset 0 0 28px var(--gl-vip-soft); }
body.gl-premium-active:not([data-gl-frame="none"]) .generated-card::before { content:"";position:absolute;z-index:0;inset:6px;border:1px solid var(--gl-vip-stroke);border-radius:13px;pointer-events:none; }
body.gl-premium-active:not([data-gl-frame="none"]) .generated-card::after { content:var(--gl-vip-mark);position:absolute;z-index:0;right:13px;bottom:10px;color:var(--gl-vip-accent);font-size:15px;letter-spacing:.28em;opacity:.68;pointer-events:none; }
body.gl-premium-active:not([data-gl-frame="none"]) .generated-card > * { position:relative;z-index:1; }
body.gl-premium-active[data-gl-frame="hearts"] { --gl-vip-stroke:rgba(184,77,118,.52);--gl-vip-soft:rgba(205,95,137,.11);--gl-vip-accent:#b64f77;--gl-vip-mark:"♡  ✦  ♡"; }
body.gl-premium-active[data-gl-frame="moon"] { --gl-vip-stroke:rgba(167,146,102,.64);--gl-vip-soft:rgba(224,204,151,.14);--gl-vip-accent:#92743d;--gl-vip-mark:"☾  ✦"; }
body.gl-premium-active[data-gl-frame="forest"] { --gl-vip-stroke:rgba(69,104,80,.56);--gl-vip-soft:rgba(70,115,84,.11);--gl-vip-accent:#4f735c;--gl-vip-mark:"❦  ✦"; }
body.gl-premium-active[data-gl-frame="pearl"] { --gl-vip-stroke:rgba(180,116,140,.55);--gl-vip-soft:rgba(255,255,255,.3);--gl-vip-accent:#a8617d;--gl-vip-mark:"•  ◇  •"; }

.gl-visual-studio { margin-top:19px; padding:18px; border:1px solid rgba(146,89,110,.16); border-radius:20px; background:linear-gradient(150deg,rgba(255,255,255,.66),rgba(246,226,234,.48)); box-shadow:0 14px 40px rgba(100,55,75,.07); }
.gl-studio-head { display:flex; align-items:center; gap:11px; margin-bottom:16px; }
.gl-studio-head>span { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:50%; color:#fff4bd; background:linear-gradient(135deg,#b85d80,#76506f); box-shadow:0 8px 20px rgba(120,62,88,.2); }
.gl-studio-head small,.gl-studio-head h3 { display:block; margin:0; }.gl-studio-head small { color:#a3657e; font-size:7px; font-weight:800; letter-spacing:.17em; }.gl-studio-head h3 { color:#5b3a4b; font-family:"Cormorant Garamond",Georgia,serif; font-size:28px; line-height:1; }
.gl-studio-group { min-width:0; margin:14px 0 0; padding:0; border:0; }.gl-studio-group legend { color:#927281; font-size:9px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }.gl-studio-group>p { margin:4px 0 9px; color:#a08894; font-size:8px; }
.gl-scene-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }.gl-scene-grid button { position:relative; min-width:0; height:94px; overflow:hidden; padding:0; border:1px solid rgba(145,91,112,.17); border-radius:14px; color:white; background:linear-gradient(135deg,#59404e,#29232e); }
.gl-scene-grid button:first-child { background:linear-gradient(135deg,#b9919f,#6d5360); }.gl-scene-grid img { width:100%; height:100%; object-fit:cover; opacity:.86; }.gl-still-preview { position:absolute; inset:0; display:grid; place-items:center; font-size:25px; opacity:.55; }
.gl-scene-grid button>span { position:absolute; left:0; right:0; bottom:0; display:flex; align-items:center; gap:6px; padding:22px 9px 8px; background:linear-gradient(transparent,rgba(20,15,23,.84)); text-align:left; }.gl-scene-grid button i { font-style:normal; }.gl-scene-grid button b { display:none; }.gl-scene-grid button.is-active { border-color:#fff; box-shadow:0 0 0 2px #ba6a88,0 9px 24px rgba(99,50,72,.2); }
.gl-smart-toggle { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; width:100%; min-height:66px; margin-top:9px; padding:10px 12px; border:1px solid rgba(145,91,112,.16); border-radius:14px; color:#614451; background:rgba(255,255,255,.57); text-align:left; }.gl-smart-toggle>span:first-child { display:grid; place-items:center; width:33px; height:33px; border-radius:50%; color:#9b5872; background:#f1dae3; }.gl-smart-toggle>span:nth-child(2) { display:grid; gap:2px; }.gl-smart-toggle strong { font-size:9px; }.gl-smart-toggle small { color:#99818c; font-size:7px; line-height:1.3; }.gl-smart-toggle b { padding:5px 7px; border-radius:999px; color:#937883; background:#eee3e7; font-size:7px; }.gl-smart-toggle.is-active b { color:white; background:#8c5870; }
.gl-premium-block { margin-top:14px; padding-top:14px; border-top:1px solid rgba(145,91,112,.13); }.gl-premium-block>header { display:flex; align-items:center; justify-content:space-between; gap:10px; }.gl-premium-block>header div { display:grid; gap:2px; color:#674554; font-size:10px; font-weight:800; }.gl-premium-block>header small { color:#9c828e; font-size:7px; font-weight:500; }.gl-premium-block>header>b { padding:5px 8px; border-radius:999px; color:white; background:linear-gradient(135deg,#be6887,#7b5067); font-size:7px; letter-spacing:.12em; }
.gl-frame-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }.gl-frame-grid button,.gl-ink-grid button,.gl-type-grid button { position:relative; display:flex; align-items:center; gap:7px; min-width:0; min-height:42px; padding:7px 9px; border:1px solid rgba(145,91,112,.15); border-radius:11px; color:#745766; background:rgba(255,255,255,.55); font-size:8px; font-weight:800; text-align:left; }.gl-frame-grid button i { width:20px; height:20px; border:2px double #bb7892; border-radius:4px; }.gl-frame-grid button>b { margin-left:auto; color:#b86987;opacity:.52; }.gl-frame-grid button.is-active>b,.gl-ink-grid button.is-active>b,.gl-type-grid button.is-active>b { display:grid;place-items:center;width:19px;height:19px;border-radius:50%;color:#fff;background:#a75c79;opacity:1; }.gl-frame-grid button.is-active,.gl-ink-grid button.is-active,.gl-type-grid button.is-active { border-color:#b96f8b; color:#754259; background:#fff2f6; box-shadow:0 5px 16px rgba(103,54,75,.08); }
.gl-frame-grid [data-gl-frame="hearts"] i { border-color:#bd5a7f;border-radius:7px;box-shadow:inset 0 0 0 3px rgba(205,95,137,.1); }
.gl-frame-grid [data-gl-frame="moon"] i { border-color:#a98a4c;border-style:dotted;box-shadow:0 0 7px rgba(242,213,142,.65); }
.gl-frame-grid [data-gl-frame="forest"] i { border-color:#54755f;box-shadow:inset 0 0 0 2px rgba(178,137,72,.32); }
.gl-frame-grid [data-gl-frame="pearl"] i { border:3px double #b4748c;border-radius:50%;background:radial-gradient(circle,#fff 0 22%,#edcad7 25% 48%,transparent 52%); }
.gl-compact { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:9px; }.gl-compact legend { grid-column:1/-1; }.gl-ink-grid,.gl-type-grid { display:flex; gap:5px; min-width:0; overflow-x:auto; padding:2px; scrollbar-width:none; }.gl-ink-grid::-webkit-scrollbar,.gl-type-grid::-webkit-scrollbar { display:none; }.gl-ink-grid button,.gl-type-grid button { flex:0 0 auto; }.gl-ink-grid button i { width:15px; height:15px; border-radius:50%; background:#45343c; }.gl-ink-grid button[data-gl-ink="plum"] i{background:#65304d}.gl-ink-grid button[data-gl-ink="forest"] i{background:#29473d}.gl-ink-grid button[data-gl-ink="midnight"] i{background:#26344b}.gl-type-grid button i{display:none}.gl-type-grid [data-gl-type="poetic"] span{font-family:"Cormorant Garamond",Georgia,serif;font-size:10px;font-style:italic}.gl-type-grid [data-gl-type="literary"] span{font-family:"Literata",Georgia,"Times New Roman",serif;font-size:9px}
.gl-premium-block.is-locked [aria-disabled="true"] { opacity:.58; }.gl-premium-block.is-locked [aria-disabled="true"]::after { content:"✦"; position:absolute; right:6px; top:5px; color:#a6637e; font-size:7px; }
.gl-studio-status { min-height:13px; margin:10px 0 -4px; color:#7c5969; font-size:8px; text-align:center; }
.gl-premium-block>header>b { border:1px solid #d7aa3e;color:#5a3b00;background:linear-gradient(145deg,#fff3b5,#dca93a);box-shadow:0 5px 14px rgba(126,86,0,.16);font-weight:900; }

@keyframes gl-frame-orbit { to { offset-distance:100%; } }
@keyframes gl-frame-bloom { 0%{opacity:.15;filter:blur(3px);transform:scale(.985)} 100%{opacity:1;filter:none;transform:none} }

@media (min-width:700px) { .gl-scene-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.gl-frame-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:480px) { .gl-visual-studio { margin-inline:-2px; padding:14px; }.gl-scene-grid button { height:84px; }.gl-frame-grid button { min-height:45px; }.gl-video-active .letter { backdrop-filter:blur(17px) saturate(1.06); }.gl-orbit { animation-duration:18s; } }
@media (orientation:portrait) and (max-width:820px) { .gl-video-background { object-position:50% 50%; } }
@media (prefers-reduced-motion:reduce) { .gl-video-layer,.gl-video-shade,#cinematicBg { transition:none!important; }.gl-video-background { transform:none; }.gl-orbit,.letter.gl-letter-alive .gl-frame-layer { animation:none!important; }.gl-frame-layer { opacity:1; } }
html[data-gl-perf="lite"] .gl-video-active .letter,html[data-gl-perf="lite"] .gl-video-active .brand-card { backdrop-filter:none; }
html[data-gl-perf="lite"] .gl-orbit,html[data-gl-perf="lite"] .letter.gl-letter-alive .gl-frame-layer { animation:none!important; }
html[data-gl-perf="lite"] .gl-video-background { filter:saturate(.9);transform:none; }
html[data-gl-perf="mobile"] .gl-video-active .letter { border-color:rgba(255,255,255,.8);backdrop-filter:none;-webkit-backdrop-filter:none; }
html[data-gl-perf="mobile"] .gl-video-active .brand-card { background:linear-gradient(145deg,rgba(31,25,35,.7),rgba(42,29,40,.5));backdrop-filter:none;-webkit-backdrop-filter:none; }
html[data-gl-perf="mobile"] .gl-video-background { filter:none;transform:none; }
html[data-gl-perf="mobile"] .letter.gl-letter-alive .gl-frame-layer { animation:none!important; }
@media (prefers-contrast:more) { .gl-video-active .letter { --gl-paper-alpha:.94; border-width:2px; }.letter .letter-text { text-shadow:none; }.gl-visual-studio button { border-color:rgba(80,45,61,.45); } }
@media (forced-colors:active) { .gl-visual-studio,.gl-visual-studio button,.gl-video-active .letter { forced-color-adjust:none; border:1px solid CanvasText; }.gl-video-shade { background:rgba(0,0,0,.45); } }
