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

:root {
  --bg: #f5f5f5;
  --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;
}

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

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    border: 2px solid #4a90e2;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: relative;
    margin-right: 8px;
    margin-bottom: 1px;
    vertical-align: middle;
}

input[type="radio"]:checked::before {
content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background-color: #4a90e2;
    border-radius: 50%;
}

body.preload {
  visibility: hidden;
}

body {
  margin: 0;
  font-family: 'Noto Sans', sans-serif;
  letter-spacing: 1px;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

main {
  flex: 1;
  overflow-y: auto;
  box-sizing: border-box;
  min-height: 0;
  background: var(--bg);
}

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: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-header-height);
  z-index: 1010; /* Higher than settings menu */
  border-bottom: 1px solid #ccc;
  flex-shrink: 0;
}

html, body {
  height: 100%;
}

#header-title {
  font-size: 30px;
  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;
}

.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;
}