/* Presentation only: the existing free-round href and modal handlers are kept.
   Graphite/doodles come from the same shared layer as login and deposit. */
.modal-shell[data-modal="demo"] .modal-card--demo {
    width: min(100%, 430px);
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px);
    padding: 60px 26px 26px;
    border-radius: 32px;
    border-color: rgba(125, 160, 135, .27);
    overscroll-behavior: contain;
}

.modal-shell[data-modal="demo"] .modal-close {
    --modal-close-size: 44px;
    --modal-close-inset: 12px;
    --modal-close-radius: 50%;
    --modal-close-transform: none;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    background: #1c2220;
    touch-action: manipulation;
}

.modal-shell[data-modal="demo"] .modal-close svg { width: 20px; height: 20px; }
.modal-shell[data-modal="demo"] .demo-modal-copy { gap: 20px; }

.modal-shell[data-modal="demo"] .demo-modal-copy h3 {
    max-width: 100%;
    color: #f5f7f5;
    font: 400 clamp(27px, 7.5vw, 32px)/1.06 "Titan One Local", "Lilita One Local", sans-serif;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.modal-shell[data-modal="demo"] .demo-modal-copy h3 span {
    display: block;
    margin-top: 3px;
    color: #ffd447;
    font-size: clamp(42px, 12vw, 52px);
    text-shadow: 0 3px 0 #79621e;
}
.modal-shell[data-modal="demo"] .demo-modal-copy p {
    max-width: 100%;
    font-family: "Lilita One Local", sans-serif;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: .005em;
    text-wrap: pretty;
}
.modal-shell[data-modal="demo"] .demo-modal-intro { color: #f3f6f2; font-size: 20px; }
.modal-shell[data-modal="demo"] .demo-modal-intro b { font-weight: 400; color: #ffe17a; }

.modal-shell[data-modal="demo"] .demo-modal-details {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #cbd6cf;
    font-size: 18px;
}
.modal-shell[data-modal="demo"] .demo-modal-details b { font-weight: 400; color: #f5f7f3; }

.modal-shell[data-modal="demo"] .demo-modal-hint {
    color: #d2ddd5;
    font-family: "Lilita One Local", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
    letter-spacing: 0;
    text-wrap: balance;
}

.modal-shell[data-modal="demo"] .modal-actions { margin-top: 10px; }
.modal-shell[data-modal="demo"] .demo-modal-cta {
    position: relative;
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 12px 18px 16px;
    border: 2px solid #345a31;
    border-radius: 16px;
    background: linear-gradient(180deg, #9cd957 0%, #7fc440 40%, #62a52e 45%, #508e24 100%);
    color: #fff;
    box-shadow: inset 0 2px 0 #c3ed83, inset 0 -4px 0 #3b711d, 0 3px 0 #101b14;
    font: 400 22px/1.15 "Lilita One Local", sans-serif;
    letter-spacing: .025em;
    text-shadow: 0 2px 0 #426d30;
    touch-action: manipulation;
}

.modal-shell[data-modal="demo"] .demo-modal-cta::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 7px;
    width: 16px;
    height: 5px;
    border-radius: 50%;
    transform: rotate(-24deg);
    background: #e2ffc3;
    pointer-events: none;
}

.modal-shell[data-modal="demo"] .demo-modal-cta:active { transform: translateY(2px); box-shadow: inset 0 2px 0 #c3ed83, inset 0 -2px 0 #3b711d; }
.modal-shell[data-modal="demo"] :is(button, a):focus-visible { outline: 3px solid #f5f7f5; outline-offset: 3px; }

@media (max-width: 520px) {
    .modal-shell[data-modal="demo"] .modal-card--demo { padding: 60px 20px 22px; border-radius: 28px; }
}

/* Compact mobile/webview heights: keep the action visible without hiding copy. */
@media (max-width: 360px), (max-height: 700px) {
    .modal-shell[data-modal="demo"] .modal-card--demo { padding: 58px 16px 18px; }
    .modal-shell[data-modal="demo"] .demo-modal-copy { gap: 16px; }
    .modal-shell[data-modal="demo"] .demo-modal-copy h3 { font-size: clamp(25px, 7.2vw, 29px); }
    .modal-shell[data-modal="demo"] .demo-modal-copy h3 span { font-size: clamp(40px, 11vw, 46px); }
    .modal-shell[data-modal="demo"] .demo-modal-intro { font-size: 18px; }
    .modal-shell[data-modal="demo"] .demo-modal-details { font-size: 16px; }
    .modal-shell[data-modal="demo"] .demo-modal-hint { font-size: 14px; }
    .modal-shell[data-modal="demo"] .demo-modal-cta { min-height: 52px; font-size: 20px; padding-block: 10px 14px; }
}
