:root {
    overscroll-behavior: none;
}

#dot {
    display: none;
    width: 10px;
    height: 10px;
    position: relative;
    background-color: green;
    top: 0;
    left: 0;
    z-index: 100;
}

html {
    background-color: black;
    background-image: url('../images/optimized/wallpaper/wallpaper.jpg');
    background-image: image-set(
        url('../images/optimized/wallpaper/wallpaper.avif') type('image/avif'),
        url('../images/optimized/wallpaper/wallpaper.webp') type('image/webp'),
        url('../images/optimized/wallpaper/wallpaper.jpg') type('image/jpeg')
    );
    color: white;
}

body {
    overscroll-behavior-y: none;
    text-align: center;
}

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

html {
    overflow: hidden auto;
}

*:focus {
    outline: none;
}

.readerModeOnly {
    height: 0px;
    margin: 0px;
    font-size: 0px;
    opacity: 0;
}

i {
    font-style: italic;
}

#wrapper {
    min-height: 100%;
    position: relative;
    width: 100%;
    text-align: center;
    top: 0px;
    overflow: hidden;
}

.hasname {
    display: none;
}

#belowfold {
    /* make the spacing adapt to the computed hero size; fallback to 50px */
    /*padding-top: calc(var(--frank-size, 300px) * 0.04); /* ~4% of hero height */
    position: relative;
    top: 0px;
    /* min-height should account for the hero; use a proportion of --frank-size */
    /* min-height: calc(100% - (var(--frank-size, 300px) * 0.32)); */
    z-index: 1015; /* raised so content sits above .frank-background */
}

.clear {
    clear: both;
}

a {
    color: inherit;
}

.js {
    display: none;
}

h1 {
    font-size: 30px;
    text-shadow: 2px 2px rgba(0,0,0,0.6);
}

div {
    font-size: 20px;
}

.nowrap {
    white-space: nowrap;
}

.quote {
    font: 18px 'Merienda One', Times, serif;
}

.italic {
    font-style: oblique;
}

.leftalign {
    text-align: left;
}

#response {
    margin-top: 10px;
}

#welcome, #info, #location {
    position: relative;
    z-index: 100;
    color: white;
    text-align: center;
}

#imagewrapper {
    position: absolute;
    top: -300px;
    left: 50%;
    margin-left: -2000px;
    width: 4000px;
}

#shadowleft, #shadowright {
    transform: translate3d(0, 0, 0);
    -webkit-perspective: 1000;
    perspective: 1000;
    position: fixed;
    top: 0px;
    left: 0px;
    width: calc(50% - 300px);
    min-width: 100px;
    height: 100vh;
    opacity: 0.8;
        background-image: url('../images/optimized/shadow_l/shadow_l-quant.png');
        background-image: image-set(
            url('../images/optimized/shadow_l/shadow_l.avif') type('image/avif'),
            url('../images/optimized/shadow_l/shadow_l.webp') type('image/webp'),
            url('../images/optimized/shadow_l/shadow_l-quant.png') type('image/png')
        );
    background-repeat: repeat-y;
    background-size: contain;
    z-index: 0;
}

#shadowright {
    left: auto;
    right: 0px;
        background-image: url('../images/optimized/shadow_r/shadow_r-quant.png');
        background-image: image-set(
            url('../images/optimized/shadow_r/shadow_r.avif') type('image/avif'),
            url('../images/optimized/shadow_r/shadow_r.webp') type('image/webp'),
            url('../images/optimized/shadow_r/shadow_r-quant.png') type('image/png')
        );
}

#stain {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
        background-image: url('../images/optimized/stain/stain-quant.png');
        background-image: image-set(
            url('../images/optimized/stain/stain.avif') type('image/avif'),
            url('../images/optimized/stain/stain.webp') type('image/webp'),
            url('../images/optimized/stain/stain-quant.png') type('image/png')
        );
    background-repeat: repeat-x;
    background-size: 100% 100%;
    background-blend-mode: multiply;
}

#info, #location {
    font-size: 24px;
}

#content, #centercontent {
    /* pointer-events: none; */
    position: relative;
    width: calc(100% - 40px);
    max-width: 800px;
    position: relative;
    margin: 0 auto;
    margin-bottom: calc(var(--frank-size, 1300px) * 0.10);
}

/* local font-face: prefer modern WOFF2 with TTF/OTF fallback */
@font-face {
    font-family: 'Salium';
    src: url('../fonts/Salium.woff2') format('woff2'),
         url('../fonts/Salium.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'VerondSon';
    src: url('../fonts/VerondSon-Regular.woff2') format('woff2'),
         url('../fonts/VerondSon-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Riemish';
    src: url('../fonts/Riemish.woff2') format('woff2'),
        url('../fonts/Riemish.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    /* font-display: swap removed to prevent font swapping on summon-text */
}

/* Summon banner shown above Frank's head to hint at scrolling */
.summon-note {
    /* Fixed above Frank's head; JS updates `top` and `opacity`. */
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0 6px;
    pointer-events: none; /* decorative */
    top: max(8px, calc( 100svh - var(--frank-size) * 0.75 ));
    opacity: 1;
    /* transition: top 260ms ease, opacity 320ms ease; */
    z-index: 99999; /* top-most */
}
.summon-text {
    font-family: 'Riemish', 'Salium', 'VerondSon', 'Merienda One', 'Segoe Script', 'Brush Script MT', cursive;
    font-size: clamp(48px, 11vw, 96px);
    color: #ffd27f;
    /* drop shadow + subtle darker outline using multiple text-shadows for
       broader support (text-stroke isn't universally supported) */
    text-shadow: 0 6px 12px rgba(0,0,0,0.55),
                 0 2px 4px rgba(0,0,0,0.4),
                 0 0 1px rgba(0,0,0,0.6);
    letter-spacing: 0.6px;
    transform: rotate(-1.5deg);
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    /* disable text selection for a cleaner UI */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin-bottom: -30px;
    min-height: 56px;
}
.summon-arrow {
    width: calc(var(--frank-size) * 0.2);
    height: auto;
    /* assume square art; if arrow.png has a different aspect ratio we can adjust this */
    aspect-ratio: 1 / 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url('../images/arrow.png');
    transform: translateY(-2px);
    /* keep it responsive on small viewports */
    max-width: 80vw;
    max-height: 80vh;
    min-width: 48px;
    min-height: 48px;
}

/* Respect reduced motion: avoid animations and subtle transforms */
@media (prefers-reduced-motion: reduce) {
    .summon-arrow { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .summon-text { transform: none; box-shadow: none; }
}

.notitle .ui-dialog-titlebar {
    display: none;
}

#sendinvite div {
    display: inline-block;
}

#sendinvite input, #rsvp button {
    width: 120px;
}

#sendinvite #inviteemail {
    width: 260px;
}

#loading {
    display: none;
}

#message, .sometext {
    width: 100%;
    position: relative;
    margin-top: 30px;
    margin-bottom: 30px;
    font-size: 22px;
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 20px;
    box-sizing: border-box;
    border-radius: 10px;
    text-shadow: 2px 2px #000000;
}

.buttons {
    font-size: 14px;
    margin-bottom: 30px;
}

.button.ui-state-default {
    background-color: rgba(0,0,0,0.6);
    background-image: none;
    color: orange;
}

.button.ui-state-hover {
    background-color: black;
    background-image: none;
    color: orange;
    border-color: black !important;
}

p {
    margin-bottom: 20px;
}

#nohash {
    display: none;
}

#rsvp button.mod {
    width: 50px;
}

#rsvp button.ui-button, #rsvp input.ui-button {
    margin-left: .1em;
}

button.respbutton {
    margin-right: 10px;
    display: none;
    font-size: 0.9em;
}

#summary, #noresponse {
    display: none;
}

#rsvpinfo .rsvpstep {
    display: none;
}

#rsvpcomment textarea {
    width: calc(min(100% - 10px, 500px));
    box-sizing: border-box;
    resize: none;
}

.ui-button-text {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#rsvp, #invite, #dialog, #confirm {
    text-align: center;
    margin: 0 auto 0 auto;
    z-index: 100;
}

#dialogbg {
    z-index: 100;
}

.ui-spinner, button {
    margin: 10px;
}

.dialog input, .dialog .ui-button.ui-state-default {
    background-image: none !important;
    background-color: rgba(85,85,85,0.7) !important;
}

.dialog input.ui-state-focus, .dialog .ui-button.ui-state-active, .dialog .ui-button.ui-state-focus {
    background-color: rgba(255,187,0,0.7) !important;
}

.dialog input.ui-state-hover, .dialog button.ui-state-hover {
    background-color: rgba(255,200,0,0.7) !important;
}

#numguests {
    width: 30px;
    text-align: center;
}

input[type=text], input[type=password] {
    text-align: left;
    font-weight: bold !important;
    font-size: 18px !important;
}

.ui-dialog {
    z-index: 100001;
}

#dialogbg {
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 200px;
    height: 200px;
    background-color: #768b52;
    opacity: 0.9;
    border-radius: 8px;
    padding: 12px 12px;
    z-index: 100000;
}

div.ui-widget-content {
    background-image: none;
    background: transparent;
    /*
       background-color: rgb(0, 0, 0);
       background-color: rgba(0, 0, 0, 0.3);
       */
    /*  background-color: rgba(48, 24, 83, 0.75);*/
}

button {
    border-radius: 5px;
}

button.rsvpbutton.ui-state-default, a.rsvpbutton.ui-state-default {
    background-image: none;
    background-color: #00bb00;
    color: black;
}

button.rsvpbutton.ui-state-hover, a.rsvpbutton.ui-state-hover {
    background-image: none;
    background-color: #00ff00;
}


/*textarea, select {
    background-color: black;
    color: white;
    border: 0px;
}*/

#rsvparea, #rsvptable {
    font-family: Segoe UI,Arial,sans-serif;
    /*  border: 2px solid #904020;*/
    border-radius: 8px;
    padding: 10px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    background-color: black;
    background-color: rgba(100,100,100,0.3);
    color: white;
}

#rsvparea {
    padding-top: 5px;
    position: relative; /* make z-index work */
    top: 0px;
    min-height: calc(100% - 415px);
    z-index: 1015; /* between brain (1010) and bottom (1020) */
}

#rsvparea #nohash {
    position: relative;
    z-index: 1016;
}

#rsvptable {
    display: none;
    font-size: 16px;
}

#rsvptable.ui-tabs .ui-tabs-nav li.ui-tabs-active {
    margin-bottom: 0px;
    padding-bottom: 0px;
}

#rsvptable.ui-tabs .ui-tabs-nav li a {
    padding: 0.2em 0.4em 0.2em 0.4em;
}

#rsvptable.ui-tabs ul.ui-tabs-nav {
    background-color: transparent;
    background-image: none;
    padding: 0;
}

.small {
    font-size: 14px;
}

#sendinvite {
    margin-top: 10px;
}

.rsvpreply {
    text-align: left;
    padding: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.rsvpreply.listend {
    border: none;
}

.rsvpreply div {
    font-size: 16px;
}

.rsvpcomment {
    padding-left: 30px;
}

.rsvpname, .rsvpresponse {
    font-weight: bold;
}

.rsvpyes .rsvpresponse, .response .rsvpyes {
    font-weight: bold;
    color: rgb(0,255,0);
}

.rsvpmaybe .rsvpresponse, .response .rsvpmaybe {
    font-weight: bold;
    color: yellow;
}

.rsvpno .rsvpresponse, .response .rsvpno {
    font-weight: bold;
    color: darkRed;
}

.ui-tabs .ui-tabs-panel.rsvptab {
    padding: 5px;
    background-color: rgba(0,0,0,0.2);
}

.badge.ui-icon {
    position: relative;
    top: 2px;
    margin-right: 5px;
    display: inline-block;
    border-radius: 8px;
    background-image: url(icons/ui-icons_222222_256x240.png);
}

/*
   #rsvparea {
    font-family: Segoe UI,Arial,sans-serif;
}
*/

.ui-icon-yes { 
    background-position: -64px -145px; 
    background-color: rgba(0,255,0);
}
.ui-icon-no { 
    background-position: -80px -129px; 
    background-color: red;
}
.ui-icon-maybe { 
    background-position: -48px -145px; 
    background-color: yellow;
}
.ui-icon-noresp { 
    background-position: 0px -129px; 
    background-color: gray;
}

#admin {
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 23px;
    z-index: 300;
    background-color: orange;
    text-align: center;
    z-index: 200000;
}

#rsvpcomment {
    margin-top: 10px;
}

.bold {
    font-weight: bold;
}

.underline {
    text-decoration: underline;
}

.examples {
    width: 800px;
    position: relative;
    left: 50%;
    margin-left: -400px;
}

.examples td {
    width: 400px;
    padding: 0 20px;
    font-size: 22px;
    font-weight: bold;
}

.labelrow td {
    padding-top: 30px;
}

#centercontent {
    width: 800px;
    top: 20px;
    margin-left: -400px;
    left: 50%;
}

.bigger {
    font-size: 24px;
}

#disclaimer {
    padding: 10px;
    border: 2px solid red;
    background: #ff5555;
    color: black;
    margin-bottom: 20px;
}

#idealink {
    margin-top: 8px;
    font-size: 20px;
}

#result {
    position: relative;
    width: 100%;
    height: 300px;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden;
    padding: 5px 0px;
    margin-top: -50px;
}

#idea {
    position: relative;
    width: calc(100% - 20px);
    left: 10px;
    font-weight: bold;
    font-size: 30px;
    color: black;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    top: -50%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.emoji {
    position: relative;
    margin-top: 10px;
}

#result {
    display: table;
    table-layout: fixed;
}

#middle {
    position: absolute;
    top: 50%;
    display: table-cell;
    vertical-align: middle;
    width: 100%;
    position: static;
}

#notch {
    position: relative;
    
    width: 0; 
    height: 0; 

    left: calc(50% + 25px);
    top: -50px;

    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
  
    border-bottom: 50px solid rgba(255,255,255,0.9);
}

#resultwrapper {
    position: relative;
    max-width: 440px;
    width: 100%;
    margin: 0px auto 0px auto;
    background-color: rgba(255,255,255,0.9);
    border-radius: 10px;
}

.thumb, #clickagain {
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    margin: 0px;
    bottom: -40px;
    left: 0px;
    cursor: pointer;
    display: none;
}

button.ui-button {
    background-image: none;
}

button.thumb.ui-state-default {
    background-color: rgba(0,204,0,0.3); /* #00cc00 */;
    color: black;
}

button.thumb.ui-state-hover {
    background-color: rgba(0,255,0,0.5);
}

#thumbsdown.ui-state-default {
    background-color: rgba(221,0,0,0.3); /* #dd0000; */
}

#thumbsdown.ui-state-hover {
    background-color: rgba(255,0,0,0.5);
}

.thumb {
    height: 40px;
    bottom: -50px;
}

.thumb .ui-button-text {
    padding: .2em .6em;
}

#clickagain {
    width: 200px;
    text-align: center;
    left: 50%;
    margin-left: -100px;
    text-decoration: none;
    cursor: default;
}

#thumbsup {
    left: auto;
    right: 0px;
}

#clickinfo {
    font-size: 22px;
}

.health li:before {
    content: "- ";
}

/* Small-screen clamps to avoid calculation edge-cases when the window becomes very narrow */
@media (max-width: 0px) {
  /* Make content slightly narrower but keep sensible padding */
  #content, #centercontent {
    width: calc(100% - 20px);
    max-width: 420px;
    margin: 0 auto;
  }

  /* Fixed layers: use a stable bottom so transforms don't produce large jumps */
  .frank-layer {
    bottom: -40px !important; /* clamp the visual anchor on very small screens */
    transform: none; /* allow JS to reapply transforms but avoid compound effects */
  }

  /* Ensure belowfold spacing can't go negative and keeps page content readable */
  #belowfold {
    min-height: calc(100% - 120px); /* fallback when --frank-size math isn't ideal */
    padding-top: 8px;
  }
}