@font-face {
    font-family: "Rise Product Sans";
    src: url("fonts/product_sans_light.ttf") format("truetype");
    font-style: normal;
    font-weight: 300;
    font-display: block;
}

@font-face {
    font-family: "Rise Product Sans";
    src: url("fonts/product_sans_regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

@font-face {
    font-family: "Rise Product Sans";
    src: url("fonts/product_sans_medium.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
    font-display: block;
}

@font-face {
    font-family: "Rise Product Sans";
    src: url("fonts/product_sans_bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: block;
}

@font-face {
    font-family: "Rise Dreamscape";
    src: url("fonts/dreamscape.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

@font-face {
    font-family: "Rise Icon 4";
    src: url("fonts/icon-4.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

@font-face {
    font-family: "Rise Module Icons";
    src: url("fonts/rise-module-icons.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

:root {
    color-scheme: dark;
    background: #090a0d;
    font-family: "Rise Product Sans", sans-serif;
}

* {
    box-sizing: border-box;
}

html, body, #rise-web-shell {
    width: 100%;
    height: 100%;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
}

body {
    position: fixed;
    inset: 0;
    overscroll-behavior: none;
    background:
        radial-gradient(circle at 50% 22%, rgba(53, 58, 70, .34), transparent 45%),
        linear-gradient(145deg, #171a21, #090a0d 68%);
}

#rise-canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#rise-mobile-input {
    position: fixed;
    left: max(1px, env(safe-area-inset-left));
    bottom: max(1px, env(safe-area-inset-bottom));
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    color: transparent;
    background: transparent;
    caret-color: transparent;
    resize: none;
    z-index: -1;
}

#rise-web-status {
    position: fixed;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    display: grid;
    grid-template-columns: 22px minmax(220px, auto);
    align-items: center;
    gap: 5px 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 13px;
    background: rgba(17, 18, 24, .94);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .38);
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    line-height: 1.35;
    pointer-events: none;
}

#rise-web-status[data-ready="true"] {
    display: none;
}

#rise-web-status[data-error="true"] {
    border-color: rgba(255, 103, 129, .35);
    min-width: min(540px, calc(100vw - 32px));
}

#rise-loading-title {
    color: rgba(255, 255, 255, .94);
    font-weight: 500;
}

#rise-loading-stage {
    grid-column: 2;
    color: rgba(255, 255, 255, .48);
    font-size: 11px;
}

#rise-loading-error {
    grid-column: 1 / -1;
    max-width: min(680px, calc(100vw - 68px));
    max-height: 220px;
    margin: 9px 0 0;
    overflow: auto;
    white-space: pre-wrap;
    color: #ff94a7;
    font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
    pointer-events: auto;
    user-select: text;
}

.rise-loader {
    grid-row: 1 / span 2;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .14);
    border-top-color: #8b78ff;
    border-radius: 50%;
    animation: rise-loading-spin .8s linear infinite;
}

#rise-web-status[data-error="true"] .rise-loader {
    border: 0;
    animation: none;
}

#rise-web-status[data-error="true"] .rise-loader::before {
    content: "!";
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 103, 129, .2);
    color: #ff94a7;
    font-weight: 800;
}

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