/* Bobby's Game — layout for iPad landscape. Game art is drawn on the canvas;
   this file only styles the few HTML overlays (start, pause, grown-up settings). */
:root {
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ink: #26304f;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; background: #0d1326; color: var(--ink);
  font-family: var(--font);
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}
canvas#game { position: fixed; left: 0; top: 0; display: block; touch-action: none; }
button { font-family: inherit; border: 0; cursor: pointer; touch-action: manipulation; color: inherit; }
.hidden { display: none !important; }

.overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- start screen ---------- */
#boot { background: linear-gradient(#7fd4ff, #c9f0ff 55%, #b9ec9c 56%, #8fd96f); }
.boot-card { text-align: center; }
.boot-title { font-size: min(19vw, 30vh); font-weight: 900; letter-spacing: .02em; line-height: 1; margin-bottom: 4vh;
  -webkit-text-stroke: 10px #fff; paint-order: stroke fill; text-shadow: 0 10px 0 rgba(0,0,0,.12); }
.boot-title span { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
.boot-title span:nth-child(1) { color: #ff4d6d; }
.boot-title span:nth-child(2) { color: #ff9f1c; animation-delay: .12s; }
.boot-title span:nth-child(3) { color: #2ecc71; animation-delay: .24s; }
.boot-title span:nth-child(4) { color: #4cc9f0; animation-delay: .36s; }
.boot-title span:nth-child(5) { color: #9b5de5; animation-delay: .48s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.2vh); } }
.boot-row { display: flex; gap: 5vw; justify-content: center; }
.big-btn {
  min-width: 30vw; padding: 3.4vh 3vw; border-radius: 40px; background: #fff;
  box-shadow: 0 12px 0 rgba(0,0,0,.16); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.big-btn b { font-size: min(6vw, 9vh); font-weight: 900; }
.big-btn small { font-size: min(2.6vw, 4vh); font-weight: 700; opacity: .7; }
.big-btn.play { flex-direction: row; gap: 3vw; padding: 3.6vh 5vw 3.6vh 4vw; }
.big-btn.play b { color: #2ecc71; font-size: min(7vw, 10vh); }
.play-tri { width: 0; height: 0; border-left: min(6vw, 9vh) solid #2ecc71; border-top: min(3.6vw, 5.4vh) solid transparent;
  border-bottom: min(3.6vw, 5.4vh) solid transparent; }
.big-btn:active { transform: translateY(8px); box-shadow: 0 4px 0 rgba(0,0,0,.16); }

/* sign-up on the first visit */
.signup { background: #fff; border-radius: 28px; padding: 18px 24px 20px; width: min(560px, 92vw); margin: 0 auto; text-align: left;
  box-shadow: 0 14px 0 rgba(0,0,0,.14); max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.signup h2 { margin: 0 0 10px; font-size: 26px; text-align: center; }
.signup label { display: block; font-weight: 800; font-size: 15px; margin: 8px 0 0; }
.signup input { display: block; width: 100%; margin-top: 4px; padding: 11px 14px; border-radius: 14px; border: 2px solid #d5dbea; font: inherit; font-size: 19px;
  background: #f7f9fe; color: var(--ink); -webkit-user-select: text; user-select: text; }
.signup input:focus { outline: none; border-color: #4c8dff; background: #fff; }
.su-note { font-size: 13px; line-height: 1.4; opacity: .7; margin-top: 6px; }
.su-err { color: #d33; font-weight: 700; font-size: 15px; min-height: 20px; margin-top: 8px; }
.su-go { display: block; width: 100%; margin-top: 6px; padding: 14px; border-radius: 18px; background: #2ecc71; color: #fff; font-size: 26px; font-weight: 900;
  box-shadow: 0 8px 0 rgba(0,0,0,.14); }
.su-go:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0,0,0,.14); }
.boot-card.form .boot-title { font-size: min(10vw, 14vh); margin-bottom: 1.5vh; -webkit-text-stroke: 6px #fff; }

/* ---------- rotate hint ---------- */
#rotate { background: #26304f; color: #fff; z-index: 60; text-align: center; font-size: 30px; font-weight: 800; }
.rotate-icon { font-size: 110px; animation: tilt 1.8s ease-in-out infinite; }
.rotate-card .en { font-size: 20px; opacity: .75; margin-top: 8px; font-weight: 600; }
@keyframes tilt { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* ---------- in-game bar ---------- */
#hud { position: fixed; top: 0; left: 0; right: 0; height: 70px; z-index: 10; pointer-events: none;
  display: flex; align-items: center; justify-content: center; padding: 8px 14px; }
.hud-btn { pointer-events: auto; position: absolute; left: 14px; top: 10px; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(38,48,79,.55); display: flex; align-items: center; justify-content: center; }
.hud-btn:active { transform: scale(.92); }
#chips { display: flex; gap: 12px; background: rgba(255,255,255,.78); padding: 6px 14px; border-radius: 40px;
  box-shadow: 0 4px 0 rgba(0,0,0,.10); }
.chip { width: 46px; height: 46px; border-radius: 50%; font-size: 26px; line-height: 46px; text-align: center;
  background: #e6ebf5; opacity: .45; position: relative; transition: transform .25s, opacity .25s; }
.chip.now { opacity: 1; background: #ffd23f; transform: scale(1.18); box-shadow: 0 0 0 4px #fff, 0 0 0 7px #ff9f1c; }
.chip.done { opacity: 1; background: #b9f0c9; }
.chip.done::after { content: "✓"; position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: #2ecc71; color: #fff; font-size: 15px; line-height: 22px; font-weight: 900; }
#lvl { position: absolute; right: 16px; top: 16px; background: rgba(38,48,79,.55); color: #fff; font-weight: 800;
  font-size: 20px; padding: 8px 16px; border-radius: 24px; }

/* ---------- pause ---------- */
#pause { background: rgba(20,26,50,.72); z-index: 40; }
.pause-card { display: flex; gap: 44px; align-items: center; }
.round-btn { width: 150px; height: 150px; border-radius: 50%; font-size: 68px; color: #fff; line-height: 1;
  box-shadow: 0 12px 0 rgba(0,0,0,.25); }
.round-btn:active { transform: translateY(8px); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.round-btn.green { background: #2ecc71; width: 200px; height: 200px; font-size: 96px; padding-left: 14px; }
.round-btn.blue { background: #4c8dff; }
.round-btn.orange { background: #ff9f1c; }

/* ---------- grown-up settings ---------- */
#settings, #cropper { background: rgba(20,26,50,.72); z-index: 50; }
.panel { background: #fff; border-radius: 28px; width: min(820px, 94vw); max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.4); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; background: #f2f5fb; }
.panel-head h2 { margin: 0; font-size: 24px; }
.panel-body { padding: 8px 22px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #e8ecf5; flex-wrap: wrap; }
.row > label { flex: 0 0 220px; font-weight: 800; font-size: 18px; }
.row .ctl { flex: 1 1 300px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .note { flex-basis: 100%; font-size: 14px; opacity: .7; line-height: 1.4; }
.seg { display: inline-flex; background: #e8ecf5; border-radius: 14px; padding: 4px; }
.seg button { padding: 10px 18px; border-radius: 11px; background: transparent; font-weight: 800; font-size: 16px; }
.seg button.on { background: #4c8dff; color: #fff; }
.btn { padding: 11px 18px; border-radius: 14px; background: #4c8dff; color: #fff; font-weight: 800; font-size: 16px; }
.btn.ghost { background: #e8ecf5; color: var(--ink); }
.btn.danger { background: #ff5d5d; }
.btn.ok { background: #2ecc71; }
.btn:active { transform: scale(.96); }
input[type=range] { flex: 1; height: 34px; accent-color: #4c8dff; touch-action: pan-x; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: #e8ecf5 center/cover no-repeat; border: 4px solid #fff;
  box-shadow: 0 0 0 3px #4c8dff; display: flex; align-items: center; justify-content: center; font-size: 40px; }
details.rec { width: 100%; }
details.rec summary { font-weight: 800; font-size: 18px; padding: 14px 0; cursor: pointer; }
.rec-group { font-weight: 900; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; opacity: .55; margin: 14px 0 4px; }
.rec-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #e8ecf5; }
.rec-row .txt { flex: 1; font-size: 16px; line-height: 1.3; -webkit-user-select: text; user-select: text; }
.rec-row .dot { width: 12px; height: 12px; border-radius: 50%; background: #d5dbea; flex: 0 0 12px; }
.rec-row.has .dot { background: #2ecc71; }
.rec-row.file .dot { background: #4c8dff; }
.ico { width: 46px; height: 46px; border-radius: 50%; background: #e8ecf5; font-size: 20px; flex: 0 0 46px; }
.ico.rec { background: #ff5d5d; color: #fff; }
.ico.rec.live { animation: pulse .7s infinite; border-radius: 12px; }
@keyframes pulse { 50% { opacity: .55; } }
.tips { font-size: 15px; line-height: 1.5; background: #fff8e1; border-radius: 16px; padding: 12px 16px; margin-top: 14px; }
.tips b { display: block; margin-bottom: 4px; }

/* names & progress in the grown-up settings */
.row input.txt { padding: 9px 12px; border-radius: 12px; border: 2px solid #d5dbea; font: inherit; font-size: 17px; background: #f7f9fe; color: var(--ink);
  -webkit-user-select: text; user-select: text; width: 200px; max-width: 100%; }
.row input.txt:focus { outline: none; border-color: #4c8dff; background: #fff; }
.field { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 800; opacity: .9; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; margin: 6px 0; }
.stat { background: #f2f5fb; border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-size: 22px; color: #4c8dff; }
.stat span { font-size: 13px; opacity: .75; }
.stat small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; }
.hard { font-size: 14px; line-height: 1.5; width: 100%; }
.hard i { font-style: normal; display: inline-block; background: #ffe5ec; border-radius: 8px; padding: 1px 8px; margin: 2px 4px 2px 0; }

/* the skill games use the bar without the four stage chips */
#hud.mini #chips { display: none; }

/* parents' Skill Map */
#skillmap { background: rgba(20,26,50,.72); z-index: 50; }
.panel-body.sm { padding: 0 22px 22px; }
.panel-body.sm .panel-head { margin: 0 -22px 8px; }
.panel-head h2 small { font-size: 15px; opacity: .6; font-weight: 700; }
.sm-rec { border-radius: 16px; padding: 12px 16px; font-size: 16px; line-height: 1.5; margin: 8px 0 14px; }
.sm-rec b { font-size: 18px; }
.sm-group { margin: 10px 0; border: 1px solid #e8ecf5; border-radius: 18px; overflow: hidden; }
.sm-ghead { color: #fff; font-weight: 900; font-size: 17px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; }
.sm-ghead span { font-weight: 700; opacity: .85; font-size: 14px; }
.sm-ghead b { margin-left: auto; background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 10px; }
.sm-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #f0f3f9; }
.sm-ico { font-size: 34px; flex: 0 0 44px; text-align: center; }
.sm-txt { flex: 1; font-size: 15px; line-height: 1.35; }
.sm-txt b { font-size: 16px; }
.sm-txt em { font-style: normal; font-size: 13px; opacity: .7; margin-left: 6px; }
.dots i { font-style: normal; letter-spacing: 2px; color: #d5dbea; font-size: 15px; }
.sm-sent { opacity: .85; }
.sm-meta { font-size: 12px; opacity: .55; margin-top: 2px; }
.sm-play { flex: 0 0 auto; padding: 8px 14px; }
.sm-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.sm-note { margin-top: 12px; font-size: 13px; opacity: .65; line-height: 1.45; }
.sm-rep { padding: 10px 4px; border-bottom: 1px solid #e8ecf5; cursor: pointer; font-size: 15px; }
.sm-rep:active { background: #f2f5fb; }
.sm-mail { font-size: 15px; -webkit-user-select: text; user-select: text; }
.sm-mail table { font-size: 14px; }

/* photo cropper */
.crop-card { background: #fff; border-radius: 28px; padding: 20px; text-align: center; width: min(460px, 92vw); }
.crop-card canvas { width: 320px; height: 320px; border-radius: 50%; background: #e8ecf5; touch-action: none; display: block; margin: 6px auto 12px; }
.crop-card .ctl { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
