html, body, div {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
}

html {
    height: 100%;
}

body {
    overflow: hidden;
    background-color: #000;
    height: 100%;
    font-family: sans-serif;
    font-size: 0.9em;
}

ul {
    margin: 30px;
    padding: 0px;
}

p {
    margin: 0px;
    padding-top:10px;
    padding-bottom:10px;
}

h3 {
    margin: 0px;
    padding-top:20px;
    padding-bottom:10px;
}

canvas {
    -webkit-tap-highlight-color: transparent;
}

#main {
    position: fixed;
    left:     50%;
    top:      50%;
}

#ttgScreenCanvas, #ttgErrorCanvas
{
    position:absolute;
    left:0px;
    top:0px;
}

#ttgBarCanvas
{
    position:absolute;
    left:0px;
}

/* Error Styles */
#error {
    color: #2F4F4F;
    height: 100%;
    padding: 20px;
    background-color: #FFF;
}

#errorTitle {
    font-weight: bold;
    font-size: 1.3em;
    padding-bottom: 10px;
}

#errorMessage {
    font-size: 1.2em;
    font-weight: bold;
}

#errorCode {
    font-size: 0.8em;
    font-weight: bold;
    padding-top: 10px;
}

#errorDebug {
    padding-top: 15px;
    font-size: 0.8em;
}

.textButton {
    background-color: #FFFFFF;
    border: none;
    color: black;
    padding: 15px 32px;
    margin: 0px 32px;
    width: 320px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 26px;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px #999;
    border: 2px solid #F0F0F0;
    outline: none;
}

.textButton:active {
    background-color: #000000;
    color: white;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

#demo-mode-main {
    width: 50%;
    /*background-color: red;*/
}

#demo-mode-options {
    overflow-y: auto;
    scrollbar-width: thin;
    /*background-color: red;*/
}

#demo-mode-button, #demo-mode-rtp-button, .demo-mode-option, .demo-mode-rtp-option{
    color: #FFFFFF;
    background-color: #000000;
    padding: 8px;
    opacity: 80%;
    margin: 4px;
    border-radius: 8px;
    font-family: "Yantramanav";
    font-style: normal;
    font-weight: bold;
}

#demo-mode-error {
    font-size: 20px;
    width: 320px;
    height: 140px;
}

@font-face
{
    font-family: "Yantramanav";
    font-style: normal;
    font-weight: 400;
    src: local("Yantramanav"), local("Yantramanav-Regular"), url("../fonts/Yantramanav.woff2") format("woff2");
}

@font-face
{
    font-family: "Futura";
    font-style: all;
    font-weight: 400;
    src: local("Futura_medium"), url("../fonts/NotoSans-Medium.woff2") format("woff2");
}

@font-face
{
    font-family: "Futura_bold";
    font-style: all;
    font-weight: 600;
    src: local("Futura_bold"), url("../fonts/NotoSans-Bold.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto";
    font-style: all;
    font-weight: 400;
    src: local("Noto"), url("../fonts/NotoSans-Medium.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto Sans";
    font-style: all;
    font-weight: 400;
    src: local("Noto Sans"), url("../fonts/NotoSans-Medium.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto_medium";
    font-style: all;
    font-weight: 400;
    src: local("Noto_medium"), url("../fonts/NotoSans-Medium.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto_bold";
    font-style: all;
    font-weight: 600;
    src: local("Noto_bold"), url("../fonts/NotoSans-Bold.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto_semi_bold";
    font-style: all;
    font-weight: 500;
    src: local("Noto_semi_bold"), url("../fonts/NotoSans-Bold.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto_extra_bold";
    font-style: all;
    font-weight: 600;
    src: local("Noto_extra_bold"), url("../fonts/NotoSans-Bold.woff2") format("woff2");
}

@font-face
{
    font-family: "Noto_black";
    font-style: all;
    font-weight: 600;
    src: local("Noto_black"), url("../fonts/NotoSans-Black.woff2") format("woff2");
}

/* --- Error-screen reload affordance (2026-08-04) -------------------------------------------------
   The inactivity-timeout screen told players to "reload the game" while offering no way to do it:
   the error screen is canvas-drawn (nothing tappable), and `body { overflow: hidden }` above means the
   document never scrolls, so iOS Safari never offers pull-to-refresh either. Reported on a real iPhone.

   `ttg-error-mode` is applied by ErrorView.showError ONLY, so the scroll lock stays in force during
   live gameplay — unlocking it there would let the mobile address bar show/hide on drag, changing
   viewport height and driving the resize path (which has a bug history). Nothing to disturb post-error.
   ------------------------------------------------------------------------------------------------ */
html.ttg-error-mode, body.ttg-error-mode {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
}

#ttgReloadBar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 32px;
    /* keep clear of the iPhone home indicator / notch when present */
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: center;
    z-index: 2147483647;
    pointer-events: none;      /* only the button itself is interactive */
}

/* Icon-only on purpose: a circular refresh arrow needs no translation, which the previous hardcoded
   English "Reload" label did (the framework ships 20+ locales). The button still carries the text
   node as its accessible name for screen readers -- font-size:0 hides it visually without removing
   it from the accessibility tree.

   Built as a gold "coin": dark bezel ring + gold body + top gloss + bottom shade, to sit naturally
   next to the casino chrome instead of reading as a browser control. */
#ttgReloadBtn {
    pointer-events: auto;
    position: relative;
    width: 88px;               /* was 64px - this is the one control a stuck player must find */
    height: 88px;
    padding: 0;
    font-size: 0;              /* hides the "Reload" text node, keeps the accessible name */
    line-height: 0;
    color: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background-image:
        radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 58%),
        linear-gradient(180deg, #fff0b4 0%, #f8cf68 36%, #e5ac36 64%, #c2871b 100%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    box-shadow:
        0 0 0 2px rgba(94, 58, 6, .60),          /* crisp dark bezel                */
        0 0 0 6px rgba(255, 226, 150, .22),      /* soft gold halo, lifts off art   */
        0 10px 26px rgba(0, 0, 0, .55),          /* depth                           */
        inset 0 2px 1px rgba(255, 255, 255, .85),/* top gloss                       */
        inset 0 -4px 7px rgba(94, 58, 6, .32);   /* bottom shade -> domed, not flat */
    transition: transform .14s cubic-bezier(.2, .7, .3, 1),
                box-shadow .14s ease,
                filter .14s ease;
}

/* The glyph lives on its own layer so the click animation can spin ONLY the arrow -- rotating the
   whole button would drag the gloss and drop shadow around with it and look broken. */
#ttgReloadBtn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a2405' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 12a8.5 8.5 0 1 1-2.49-6.01'/%3E%3Cpolyline points='20.5 4.5 20.5 10 15 10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}

/* Expanding ring, drawn on click. Sits behind nothing and eats no taps. */
#ttgReloadBtn::after {
    content: "";
    position: absolute;
    left: -6px;
    top: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 232, 155, .95);
    opacity: 0;
    pointer-events: none;
}

#ttgReloadBtn:hover {
    filter: brightness(1.05);
}

#ttgReloadBtn:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 2px rgba(94, 58, 6, .60),
        0 0 0 7px rgba(255, 255, 255, .85),
        0 10px 26px rgba(0, 0, 0, .55),
        inset 0 2px 1px rgba(255, 255, 255, .85),
        inset 0 -4px 7px rgba(94, 58, 6, .40);
}

/* Pressed: the coin sinks into the surface. */
#ttgReloadBtn:active {
    transform: translateY(3px) scale(.95);
    filter: brightness(.94);
    box-shadow:
        0 0 0 2px rgba(94, 58, 6, .60),
        0 0 0 6px rgba(255, 226, 150, .22),
        0 3px 8px rgba(0, 0, 0, .5),
        inset 0 3px 7px rgba(94, 58, 6, .50);
}

/* Click confirmation. The handler adds .ttg-reloading and delays the actual reload slightly, so the
   player gets feedback that the tap landed instead of staring at a frozen screen. */
#ttgReloadBtn.ttg-reloading {
    transform: scale(.97);
    filter: brightness(1.08);
}

#ttgReloadBtn.ttg-reloading::before {
    animation: ttgReloadSpin .62s cubic-bezier(.3, .05, .25, 1);
}

#ttgReloadBtn.ttg-reloading::after {
    animation: ttgReloadRipple .55s ease-out forwards;
}

@keyframes ttgReloadSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ttgReloadRipple {
    0%   { opacity: .95; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.6); }
}

/* Respect the OS setting - the affordance must still work, it just stops moving. */
@media (prefers-reduced-motion: reduce) {
    #ttgReloadBtn,
    #ttgReloadBtn.ttg-reloading::before,
    #ttgReloadBtn.ttg-reloading::after {
        transition: none;
        animation: none;
    }
}
