/* Trust the Bot: the DOM screens (splash, notebook, desk computer, 5pm launch, ending).
   Pixelify Sans (OFL, see assets/fonts/OFL-PixelifySans.txt) to match the pixel art. */
@font-face { font-family: 'Pixelify Sans'; font-weight: 400; src: url(assets/fonts/pixelify-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Pixelify Sans'; font-weight: 700; src: url(assets/fonts/pixelify-sans-latin-700-normal.woff2) format('woff2'); }
/* Pixelify's 2 and 5 read as 8 and S at small sizes, which matters in a game with a clock.
   Digits come from VT323 (OFL, see assets/fonts/OFL-VT323.txt) instead, scaled to match. */
@font-face { font-family: 'TTB Digits'; font-weight: 400 700; src: url(assets/fonts/vt323-latin-400-normal.woff2) format('woff2'); unicode-range: U+0030-0039; size-adjust: 125%; }
:root { --ink: #2d2f52; --ink2: #1c1d36; --paper: #f4efe1; --paper2: #e9e1cb; --green: #5fb36b; --red: #e0624f; --blue: #5b6ee1; --yellow: #ffd23f; --sky: #e9f3f5; }
html, body { margin: 0; height: 100%; background: #3a3950; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#game { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; }
#safe { position: fixed; visibility: hidden; pointer-events: none;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
canvas { image-rendering: pixelated; display: block; }

.ov { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
      padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
      font-family: 'TTB Digits', 'Pixelify Sans', monospace; color: var(--ink); touch-action: pan-y; }
.ov.dim { background: rgba(28, 29, 54, .78); }
.ov * { box-sizing: border-box; }
.card { background: var(--paper); border: 4px solid var(--ink); border-radius: 8px; box-shadow: 0 6px 0 var(--ink2); max-height: 100%; overflow: auto; }
.btn { font: inherit; font-size: 17px; font-weight: 700; padding: 10px 18px; border: 3px solid var(--ink); border-radius: 8px;
       background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn.go { background: var(--green); color: #fff; } .btn.no { background: var(--red); color: #fff; } .btn.blue { background: var(--blue); color: #fff; }
.btn.small { font-size: 14px; padding: 6px 11px; border-width: 2px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { opacity: .7; }
.face { image-rendering: pixelated; background-repeat: no-repeat; flex: none; }

/* ---------- splash ---------- */
#splash { background: radial-gradient(circle at 50% 30%, #4b4a78 0%, #2d2f52 60%, #1c1d36 100%); overflow: auto; align-items: flex-start; }
#splash .card { width: min(720px, 100%); margin: auto; padding: 24px 26px; }
#splash h1 { margin: 0; font-size: clamp(38px, 8vw, 64px); line-height: 1; letter-spacing: 1px; }
#splash h1 span { color: var(--blue); }
#splash .tag { font-size: clamp(17px, 3.4vw, 21px); margin: 8px 0 14px; font-weight: 700; }
#splash p { font-size: 16px; line-height: 1.45; margin: 0 0 12px; }
#splash .why { background: #fff6c9; border: 2px dashed #b59b3a; border-radius: 6px; padding: 10px 12px; margin: 4px 0 16px; }
#splash .why b { display: block; margin-bottom: 2px; }
#splash h2 { font-size: 16px; margin: 0 0 8px; }
.avatars { display: grid; grid-template-columns: repeat(5, max-content); gap: 10px; margin-bottom: 18px; }
.avatars button { background: #fff; border: 3px solid var(--paper2); border-radius: 8px; padding: 6px 10px 2px; cursor: pointer; }
@media (max-width: 520px) { .avatars { gap: 6px; } .avatars button { padding: 4px 5px 0; } #splash .card { padding: 18px 16px; } }
.avatars button.on { border-color: var(--blue); background: #eef0ff; box-shadow: 0 3px 0 var(--blue); }
#splash .foot { font-size: 13px; margin: 14px 0 0; }
#splash .kicker { font-size: 14px; font-weight: 700; color: var(--blue); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
#splash h1.h1s { font-size: clamp(30px, 6vw, 42px); margin-bottom: 12px; }

/* title screen: the office, dimmed, behind a big Botley and the title */
#splash.title-screen { align-items: center; justify-content: center;
  background: linear-gradient(rgba(28, 29, 54, .74), rgba(28, 29, 54, .9)),
              url(assets/maps/office_fg.png) center / 1536px auto no-repeat,
              url(assets/maps/office_bg.png) center / 1536px auto no-repeat, var(--ink2);
  image-rendering: pixelated; }
.title { text-align: center; color: #fff; max-width: 920px; padding: 10px; }
.title .hero { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
.title .bigbot { animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .35)); }
.title .bigbot svg { cursor: default; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.title .speech { position: relative; background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; padding: 8px 14px;
                 border: 3px solid var(--ink); border-radius: 10px; margin-bottom: 14px; animation: pop .5s ease-out .4s both; }
.title .speech::after { content: ''; position: absolute; left: 50%; bottom: -11px; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
#splash .title h1 { margin: 4px 0 0; font-size: clamp(48px, 12vw, 92px); line-height: 1; letter-spacing: 2px; color: #fff; text-shadow: 0 5px 0 var(--ink2); }
#splash .title h1 span { color: var(--yellow); }
#splash .title .tag { font-size: clamp(16px, 3.6vw, 22px); font-weight: 700; margin: 12px 0 26px; color: #e9e6ff; }
.btn.big { font-size: 24px; padding: 14px 40px; border-width: 4px; box-shadow: 0 5px 0 var(--ink); }
#splash .title .foot { color: #c9c6e6; margin-top: 22px; }
.title .foot a { color: #fff; }
.hat { display: none; }
.party .hat { display: inline; }

/* ---------- notebook ---------- */
#nb .card { width: min(460px, 100%); padding: 16px 18px; background: #fffbea; }
.nbh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.nbh b { font-size: 20px; }
.fact { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 2px dashed #e5dcb6; font-size: 15px; line-height: 1.35; }
.fact:last-child { border-bottom: 0; }
.fact small { display: block; font-size: 12px; opacity: .7; }

/* ---------- desk computer ---------- */
#desk { background: rgba(28, 29, 54, .55); }
.monitor { width: min(980px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--ink); border-radius: 14px; padding: 12px; box-shadow: 0 8px 0 var(--ink2); position: relative; }
.screen { background: var(--paper); border-radius: 6px; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--blue); color: #fff; font-size: 15px; }
.bar b { font-size: 17px; }
.bar .clock { margin-left: auto; font-size: 20px; font-weight: 700; background: var(--ink); padding: 2px 10px; border-radius: 4px; }
.bar .clock.late { background: var(--red); }
.pips { display: flex; gap: 3px; } .pips i { width: 11px; height: 11px; border: 2px solid #fff; border-radius: 2px; } .pips i.done { background: #fff; } .pips i.now { background: var(--yellow); }
.cols { display: flex; flex: 1; min-height: 0; }
.main { flex: 1; overflow: auto; padding: 14px; }
.side { width: 270px; flex: none; overflow: auto; background: #fffbea; border-left: 3px solid var(--paper2); padding: 12px; }
.side h3 { margin: 0 0 6px; font-size: 17px; }
.side .fact { font-size: 13px; padding: 6px 0; }
.req { display: flex; gap: 10px; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
.req small { display: block; font-size: 12px; opacity: .7; }
.req div { font-size: 15px; line-height: 1.3; }
.req.urgent { background: #ffe6df; border-color: var(--red); }
.botrow { display: flex; gap: 8px; align-items: center; margin: 2px 0 6px; font-size: 14px; }
.bot { flex: none; cursor: pointer; }   /* sized in whole art pixels by screens.js */
.line { display: block; width: 100%; text-align: left; font: inherit; font-size: 16px; line-height: 1.35; color: inherit; background: var(--sky);
        border: 2px solid #9fc3cc; border-radius: 6px; padding: 9px 11px; margin: 0 0 6px; cursor: pointer; }
.line:hover { border-color: var(--ink); }
.line.sel { background: #ffe0d6; border-color: var(--red); }
.line.off { cursor: default; opacity: .75; }
.hint { font-size: 13px; opacity: .75; margin: 2px 0 10px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bubble { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-size: 15px; line-height: 1.4; }
.bubble b { display: block; font-size: 13px; }
.bubble.botley { background: #eef0ff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip { font: inherit; font-size: 14px; text-align: left; padding: 7px 10px; border: 2px solid var(--ink); border-radius: 6px; background: #fffbea; cursor: pointer; color: inherit; }
.chip.sel { background: var(--yellow); }
.done-msg { font-size: 16px; padding: 10px 12px; border-radius: 6px; background: var(--paper2); margin-top: 10px; }
.msgs { position: absolute; right: 22px; top: 62px; display: flex; flex-direction: column; gap: 8px; z-index: 3; width: min(262px, calc(100% - 36px)); pointer-events: none; }
.msg { display: flex; gap: 8px; align-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 8px; padding: 8px 10px; font-size: 14px; line-height: 1.3;
       box-shadow: 0 4px 0 var(--ink2); animation: pop .3s ease-out; pointer-events: auto; }
.msg b { display: block; font-size: 12px; }
@keyframes pop { from { transform: translateY(-10px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.sticky { position: absolute; left: -6px; bottom: -10px; transform: rotate(-6deg); background: #fff07a; color: var(--ink); font: 700 12px 'TTB Digits', 'Pixelify Sans', monospace;
          padding: 6px 8px; border: 2px solid #c9b43a; cursor: pointer; z-index: 4; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.nbtab { display: none; }
@media (max-width: 760px) {
  .side { display: none; position: absolute; inset: 52px 12px 12px; width: auto; z-index: 5; border: 3px solid var(--ink); border-radius: 6px; }
  .side.open { display: block; }
  .nbtab { display: inline-block; }
  .bar .title { display: none; }
  .monitor { padding: 8px; border-radius: 10px; }
  .main { padding: 10px; }
  .line { font-size: 15px; }
}

/* ---------- 5pm launch ---------- */
#launch { background: var(--ink2); color: #fff; flex-direction: column; text-align: center; }
#launch .big { font-size: clamp(56px, 14vw, 120px); font-weight: 700; line-height: 1; }
#launch .sub { font-size: 20px; margin-top: 10px; opacity: .85; }
.out { width: min(620px, 100%); text-align: left; color: var(--ink); padding: 18px 20px; }
.out .tag2 { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; }
.out .tag2.good { background: var(--green); } .out .tag2.bad { background: var(--red); } .out .tag2.mid { background: #c99a2e; }
.out h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; }
.out p { font-size: 15px; line-height: 1.45; margin: 0 0 10px; }
.out .why { background: var(--paper2); border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.counter { font-size: 14px; opacity: .7; margin-bottom: 8px; }

/* ---------- ending ---------- */
#end .card { width: min(680px, 100%); padding: 20px 22px; }
#end h1 { margin: 0; font-size: clamp(30px, 7vw, 46px); line-height: 1.05; }
#end .score { font-size: 18px; margin: 4px 0 14px; }
#end ul { list-style: none; padding: 0; margin: 6px 0 14px; font-size: 16px; line-height: 1.6; }
#end .say { display: flex; gap: 10px; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 15px; line-height: 1.4; }
#end .take { background: var(--ink); color: #fff; border-radius: 8px; padding: 12px 14px; font-size: 17px; line-height: 1.4; margin: 14px 0; font-weight: 700; }
#end h2 { font-size: 17px; margin: 14px 0 4px; }
#end .secrets { font-size: 14px; line-height: 1.6; }

/* the dialogue box's words and headshot, drawn by the browser over the game's pixel-art frame */
#saytext { position: fixed; z-index: 10; display: none; pointer-events: none; color: var(--ink);
           font-family: 'TTB Digits', 'Pixelify Sans', monospace; line-height: 1.5; letter-spacing: .02em; }
#saytext .rest { visibility: hidden; }
#sayface { position: fixed; z-index: 10; display: none; pointer-events: none; }
#sayface .face { background-color: #fff; border: 2px solid var(--ink); border-radius: 4px; box-sizing: content-box; }

/* pixel icons (icons.js), sitting on the text line */
.pxicon { vertical-align: middle; image-rendering: pixelated; }
#end li .pxicon { margin-right: 8px; vertical-align: -1px; }
.nbh .pxicon, .side h3 .pxicon { vertical-align: -3px; margin-right: 4px; }
.big .rocket { vertical-align: -6px; }

/* sound on/off (M) */
#mute { position: fixed; right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); z-index: 95;
        width: 40px; height: 40px; border-radius: 8px; border: 3px solid var(--ink); background: var(--paper); font-size: 18px; line-height: 1;
        cursor: pointer; box-shadow: 0 3px 0 var(--ink2); padding: 0; }
#mute.off { opacity: .75; }

/* small achievement toast (secrets) */
#toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 90; font-family: 'TTB Digits', 'Pixelify Sans', monospace; font-size: 15px; font-weight: 700;
         background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; padding: 8px 14px; box-shadow: 0 4px 0 var(--ink2);
         transition: opacity .4s, transform .4s; opacity: 0; pointer-events: none; white-space: nowrap; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(4px); }
