* {
    -webkit-tap-highlight-color: transparent;
  }  

:root {
  --bg: #e4e4e4;
  --fg: #222;
  --accent: #4a90e2;
  --hover: #357ab8;
  --bubble-friend: #2196F3;
  --bubble-user: #1e9709;
  --message-font-size: 1rem;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-header-height: calc(84px + var(--app-safe-top));
  --bubble-user-correct: #1e9709;
  --bubble-user-incorrect: crimson;
  font-size: 20px;
}

html {
  min-height: 100%;
}

body {
  margin: 0;

  font-family: 'Arial', sans-serif;
  letter-spacing: 1px;
  color: var(--fg);
  background: var(--bg);

  overflow-x: hidden;
  overflow-y: visible;
}

main {
  margin-top: calc(60px + var(--app-safe-top));
  box-sizing: border-box;

  overflow: visible;
}

main#cue-content {
  padding: 1em 20px 80px;

  display: flex;
  flex-direction: column;

  box-sizing: border-box;

  overflow: visible;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding: calc(0.5em + var(--app-safe-top)) 1em 0.5em;
  background: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  z-index: 1010; /* Higher than settings menu */
  border-bottom: 1px solid #ccc;
  flex-shrink: 0;
}

#header-title {
  font-size: 32px;
  margin: 0;
}

#header-title a {
color: var(--fg);
text-decoration: none;
}

#header-title a:hover {
color: #357ab8;
}

#header-title a.active {
color: var(--accent);
}

#header-title a.focus {
  outline: none;
  box-shadow: none;
}

.menu button {
  border: none;
  cursor: pointer;
  padding: 0;
}

body.preload {
  visibility: hidden;
}

.menu button {
  border: none;
  cursor: pointer;
  padding: 0;
}

.blue-text {
  color: #4a90e2;
}

.circle-btn {
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 66px;
  height: 66px;
  font-size: 1.25em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.circle-btn img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
  .circle-btn:hover {
    background: #357ab8;
  }
}

.circle-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
}

.circle-btn.active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
  background: #357ab8;
}

.circle-btn:focus {
  outline: none;
  box-shadow: none;
}

/* Shared feedback style */
.interactive-btn {
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .interactive-btn:hover {
    filter: brightness(1.05);
  }
}

.interactive-btn:active {
  transform: scale(0.95);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

h2 {
  color: #4a90e2;
}

.font-preview {
  background: white;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
  margin-top: 8px;
  min-height: 166px;
}

#settingsMenu {
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f9f9f9;
  z-index: 1000;
  padding: 20px;
  display: none;
  overflow-y: auto;
  box-sizing: border-box;
}

#prove-status {
  accent-color: #4a90e2;
  width: 24px;
  height: 24px;
  transform: translateY(5px);
  pointer-events: none;
}

.app-title {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.subheader-title {
  font-size: 16px;
  text-align: center;
}

.position-indicator {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  font-size: 16px;
  text-align: center;
}

.question-indicator {
  font-weight: bold;
}

.menuExpander {
    background: #4a90e2;
    border: none;
    color: white;
    font-size: 36px;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    touch-action: manipulation;
    border-radius: 50%;
}

.expanded-menu {
  position: fixed;
  top: 60px;
  left: 0;
  background: white;
  width: 100%;
  display: none;
  z-index: 1000;
}

.settings-menu {
  position: fixed;
  background: white;
  width: 100%;
  display: none;
  z-index: 5;
  height: 100%;
}

.settings-item {
  display: grid;
  padding: 1em;
  gap: 1em
}

.language-selector {
  height: 2em;
  font-size: 20px;
}

.menu-visible {
  display: block;
}

.menu-item {
  border-bottom: 1px solid #ccc;
  border-top: none;
  border-left: none;
  border-right: none;
  padding: 0.5em 0 0.5em 0;
  width: stretch;
  background: white;
  font-size: 20px;
  text-align: left;
  display: flex;
  align-items: center;
}

.menu-item:active {
  background: #ccc;
}

@media (hover: hover) and (pointer: fine) {
  .menu-item:hover {
    background: #ccc;
  }
}

.menu-icon {
  height: 30px;
  width: 30px;
  margin-left: 6px;
}

.menu-label {
  margin-left: 6px;
}

.parts-list {
  width: calc(100% - 2em);
  margin: 4em 1em 1em;
  border-collapse: collapse;
  background: white;
}

.parts-list td {
  border: 1px solid black;
  padding: 1em;
}

.individual-parts a {
  color: black;
  text-decoration: none;
}

.individual-parts a:hover {
  color: blue;
}

.bold {
  font-weight: bold;
}