


body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    padding-bottom: 2rem; /* match or exceed footer height */
    text-align: center;
}

h1 {
    margin-top: 1rem;
    color: #2c3e50;
}

button {
    padding: 10px 20px;
    font-size: 1.2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 2rem;
}

button:hover {
    background-color: #2980b9;
}

#container_header_logo {
       width: 100%;
       max-width: 300px;
       margin: 0 auto;
       padding: 2px;
       display: flex;
       justify-content: center;
      /* border: 2px solid red;*/
}

.svg-wrapper {
  text-align: center;  /* centers inline-block elements */
/* border: 2px solid green; */

}

.svg-wrapper svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
  padding: 0;
  display: block;
  line-height: 0;
}

.line-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0; /* keep this */
}
#lineDisplay {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  row-gap: 0.8px; /* even tighter gap */
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

.line-row > * {
  margin-top: 0;
  margin-bottom: 0;
}

.letter-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;   /* smaller box */
  height: 1.4rem;
  border: 1px solid #000;
  font-weight: 900;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 0.7rem; /* smaller text */
  line-height: 1;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0.35rem; /* proportionally smaller */
  cursor: default;
  pointer-events: none;
}

.letter-box:hover {
  background: #fff;
}

.letter-box.active {
  background: lightblue;
  color: #000;
  pointer-events: none;
}

.letter-box.edge-pink {
  background: #D9C1F7;
  color: #000;
  pointer-events: none;
}

.arrow-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.4rem;   /* match letter-box */
  height: 1.4rem;
  font-weight: 900;
  color: #aaa;
  font-size: 1rem; /* scaled down */
  line-height: 1;
  transform: translateY(-0.25px);
}


:root {
  --footer-height: 10px;   /* adjust as needed */
}
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ddd;
  color: #999;
  text-align: center;
  padding: 0.5rem 1rem; /* controls height */
  font-size: 0.6rem;
  font-family: sans-serif;
  z-index: 1000;
}
#onscreenKeyboard {
  position: fixed;
  bottom: calc(0.5rem * 2 + 0.5rem); /* or measure actual footer height */
  left: 0;
  right: 0;
  background: #ddd;
  padding: 0.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  z-index: 1001;
}

.keyboard-row {
  display: flex;
  flex: 1;
  gap: 4px;               /* spacing between keys */
  margin: 0;
  padding: 0 4px;         /* tiny side padding so keys don’t touch screen edge */
}

#onscreenKeyboard button {
  flex: 1;
  margin: 0;
  padding: 0.5rem 0;
  font-size: min(6vw, 1.5rem); /* scales up on small screens */
  font-weight: bold;
  line-height: 1;
  border: none;
  background: #777;
  border-radius: 4px;
  cursor: pointer;
}


#onscreenKeyboard button:hover {
  background: #555;
}



#menu {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  height: 0px;     
}

#menu ~ * {
  margin-top: 0;
}

#menu button {
  padding: 0.2rem 0.2rem;
  font-size: 1rem;
  background: none;
  font-family: sans-serif;
  color: #999;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  height: 100%;
  line-height: 1;


  /* White outline behind text */
  text-shadow:
    0 0 2px white,
    0 0 4px white,
    0 0 6px white;
}

#menu button:hover {
  color: #666;
}

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  padding: 0px;
  z-index: 9999; /* ensures it's on top of almost everything */
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 8px 12px;
  width: 95vw;       /* nearly full width */
  height: 95vh;      /* nearly full height */
  overflow-y: auto;
  border-radius: 4px; /* smaller radius for edge feel */
  text-align: center;
  line-height: 1.2;
  box-sizing: border-box; /* ensures padding doesn't push it beyond viewport */
}

#UpperInfoDisplay {
  position: relative;
  top: 0;
  text-align: center;
  left: 0;
  height: 20;
  width: 100%;
  overflow: hidden;
}

#stats {
  position: relative;
  inset: 0;
  display: none;
  padding: 0px;
}

/* Base link style for the whole site */
a {
  color: #555; /* dark grey */
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

/* Hover & focus states */
a:hover,
a:focus {
  color: #000; /* black */
  transform: translateY(-1px); /* subtle lift */
}

/* Optional: make icons align nicely with text */
a i {
  vertical-align: middle;
}

/* Optional: if you want a consistent font & spacing for all links */
a {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.3px;
}


/* Base button style */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  background-color: #aaa;       /* dark grey background */
  color: #fff;                  /* white text for contrast */
  border: none;                 /* clean edges */
  border-radius: 4px;           /* subtle rounding */
  padding: 0.5rem 1rem;         /* comfortable click area */
  font-size: 1rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.3px;        /* same refined spacing as links */
  cursor: pointer;
  transition: background-color 0.25s ease, 
              transform 0.25s ease, 
              box-shadow 0.25s ease;
}

/* Hover & focus states */
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus {
  background-color: #666;       /* black on hover */
  transform: translateY(-1px);  /* subtle lift */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* soft shadow */
  outline: none;                /* remove default focus outline */
}

/* Active (pressed) state */
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);     /* reset lift */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


#shakespeare_head_container {
  position: absolute;   /* positioned relative to the nearest positioned ancestor, or <body> */
  top: 5px;
  left: 50%;
  transform: translateX(100px);
  width: 60px;
  height: auto;
  z-index: 9999;
  background: transparent;
  pointer-events: auto;
  opacity: 0.6;
}


/*
#shakespeare_head_container {
  position: fixed;      
  bottom: 190px;        
  right: 0px;           
  width: 100px;         
  height: auto;         
  z-index: 9999;        
  background: transparent;
  pointer-events: auto; 
}
*/

#shakespeare_head_container svg {
  display: block;        /* removes inline gap */
  max-width: 100%;       /* never exceed container width */
  height: auto;          /* keep aspect ratio */
}


/* =========================================
   THEME MENU — Architectural Buttons (Clickable)
   ========================================= */

#theme_menu {
  --tm-text: #222;
  --tm-border: #bfbfbf;
  --tm-bg: rgba(255,255,255,0.6); /* light fill, blends with page */
  --tm-bg-active: rgba(0,0,0,0.05);
  --tm-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --tm-shadow-press: 0 0 0 rgba(0,0,0,0);
  --tm-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tm-transition: all 160ms ease;

  display: flex;
  flex-direction: column;
  align-items: center; /* horizontal center */
  padding: 1rem;
  max-width: 340px;
  margin: 0 auto;
  border-top: 1px solid var(--tm-border);
  border-bottom: 1px solid var(--tm-border);
}

/* Buttons as precise blocks */
#theme_menu button {
  all: unset;
  display: block;
  width: 100%;
  color: var(--tm-text);
  cursor: pointer;
  padding: 0.4rem 0; /* tight vertical rhythm */
  text-align: center;
  font-family: var(--tm-font);
  border-bottom: 1px solid var(--tm-border);
  background-color: var(--tm-bg);
  box-shadow: var(--tm-shadow);
  -webkit-tap-highlight-color: transparent;
  transition: var(--tm-transition);
}

/* Remove border from last button */
#theme_menu button:last-child {
  border-bottom: none;
}

/* Typography inside buttons */
#theme_menu button h2 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hover for desktop */
@media (hover: hover) {
  #theme_menu button:hover {
    background-color: var(--tm-bg-active);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }
}

/* Tap/active feedback for mobile & desktop */
#theme_menu button:active {
  background-color: var(--tm-bg-active);
  transform: translateY(0);
  box-shadow: var(--tm-shadow-press);
}

/* Focus-visible for accessibility */
#theme_menu button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
