/* GATE DELAY - gd.css - build 001. Navy and teal, white page, built for a phone held in one hand. */
:root{
  color-scheme: light;
  --navy:#0E2A5C;      /* text, headings, the mark */
  --teal:#19C2B4;      /* the word Delay, dots, highlights (never small text on white) */
  --deep:#0A6F69;      /* teal dark enough for text and buttons */
  --page:#FFFFFF;
  --wash:#EEF4FB;      /* cards */
  --line:#D5E0EE;
  --quiet:#4A5A75;     /* second-line text */
  --mine:#DDEBFB;      /* my own messages */
  --warn:#A3261B;
  --r:16px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--navy);font:500 18px/1.45 "Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
[hidden]{display:none !important}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
button,input{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--deep);outline-offset:2px}

.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--page);z-index:5}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--navy)}
.brand img{display:block;border-radius:10px}
.word{font-size:26px;font-weight:800;letter-spacing:-.02em;line-height:1}
.word i{font-style:normal;color:var(--deep)}
.iconbtn{width:48px;height:48px;display:grid;place-items:center;border:0;border-radius:12px;background:transparent;cursor:pointer}
.iconbtn:active{background:var(--wash)}

.wrap{max-width:560px;margin:0 auto;padding:20px 16px 32px}
h1{margin:8px 0 10px;font-size:34px;line-height:1.1;font-weight:800;letter-spacing:-.02em}
.lead{margin:0 0 20px;color:var(--quiet)}
.h{margin:22px 0 10px;font-size:15px;font-weight:700;color:var(--quiet)}

.card{background:var(--wash);border:1px solid var(--line);border-radius:var(--r);padding:16px}
.lbl{display:block;margin:16px 0 6px;font-weight:700}
.lbl:first-child{margin-top:0}
.opt{font-weight:500;color:var(--quiet);font-size:15px}
input[type=text]{width:100%;min-height:54px;padding:12px 14px;border:2px solid var(--line);border-radius:12px;background:#FFFFFF;font-size:18px}
input[type=text]:focus{border-color:var(--deep);outline:0}
#aptInput{margin-top:10px}
#gateInput{max-width:160px;text-transform:uppercase}
.note{margin:6px 0 8px;min-height:0;color:var(--quiet);font-size:15px}
.note:empty{display:none}
.err{margin:12px 0 0;color:var(--warn);font-weight:700}
.err:empty{display:none}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:54px;padding:12px 18px;border-radius:14px;border:2px solid transparent;font-weight:800;font-size:18px;cursor:pointer;text-decoration:none}
.btn.wide{width:100%;margin-top:12px}
.btn.go{background:var(--navy);color:#FFFFFF}
.btn.go:active{background:#091E44}
.btn.ghost{background:#FFFFFF;border-color:var(--line);color:var(--navy)}
.btn.ghost:active{background:var(--wash)}
.btn[disabled]{opacity:.55;cursor:default}
.card .btn.ghost.wide:first-of-type{margin-top:0}
.link{border:0;background:none;padding:6px 0;color:var(--deep);font-weight:700;text-decoration:underline;cursor:pointer;min-height:44px}

/* airport picker rows (drawn by gd-pick.js) */
.pkbox{margin:0}
.pk{display:block;width:100%;text-align:left;min-height:56px;margin:8px 0 0;padding:10px 14px;border:2px solid var(--line);border-radius:12px;background:#FFFFFF;cursor:pointer}
.pk b{display:block;font-weight:800;font-size:18px;line-height:1.2}
.pk span{display:block;color:var(--quiet);font-size:15px}
.pk:active{background:var(--wash)}
.empty{margin:8px 0 0;color:var(--quiet);font-size:16px}

/* where you are */
.place{display:flex;align-items:center;gap:12px;background:var(--wash);border:1px solid var(--line);border-radius:var(--r);padding:14px}
.pin{flex:none;width:48px;height:48px;border-radius:50%;background:#D6E6F8;color:var(--navy);display:grid;place-items:center}
.where{flex:1;min-width:0}
.where b{display:block;font-size:22px;font-weight:800;line-height:1.15;letter-spacing:-.01em}
.where span{display:block;color:var(--quiet);font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill{flex:none;padding:8px 12px;border-radius:999px;background:#D3F3EF;color:#07524D;font-weight:800;font-size:15px;white-space:nowrap}
.sub{margin:8px 2px 0;color:var(--quiet);font-size:16px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}

/* people */
.people{display:flex;gap:10px;overflow-x:auto;padding:8px 4px 10px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.person{flex:none;width:88px;text-align:center;scroll-snap-align:start}
.face{width:64px;height:64px;margin:0 auto 6px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:26px;color:var(--navy)}
.person b{display:block;font-size:15px;font-weight:700;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.person .tag{display:block;font-size:13px;color:var(--quiet)}
.person.me .face{box-shadow:0 0 0 3px #FFFFFF,0 0 0 6px var(--teal)}
.lonely{margin:0;color:var(--quiet)}

/* chat */
.chat{display:flex;flex-direction:column;gap:12px;padding-bottom:96px}
.msg{display:flex;gap:10px;align-items:flex-end;max-width:92%}
.msg .face{flex:none;width:40px;height:40px;font-size:17px;margin:0}
.bub{background:var(--wash);border:1px solid var(--line);border-radius:18px 18px 18px 6px;padding:10px 14px;min-width:0}
.bub .who{display:block;font-size:14px;font-weight:700;color:var(--quiet)}
.bub .txt{display:block;overflow-wrap:anywhere}
.bub .at{display:flex;gap:10px;align-items:center;margin-top:2px;font-size:13px;color:var(--quiet)}
.bub .rep{border:0;background:none;padding:8px 0;margin:-6px 0;color:var(--quiet);font-size:13px;text-decoration:underline;cursor:pointer}
.msg.mine{align-self:flex-end;flex-direction:row-reverse}
.msg.mine .bub{background:var(--mine);border-color:#BFD6F3;border-radius:18px 18px 6px 18px}
.new{animation:rise .25s ease-out}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.still .new{animation:none}

.composer{position:fixed;left:0;right:0;bottom:0;display:flex;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--page);border-top:1px solid var(--line);max-width:560px;margin:0 auto}
.composer input{flex:1;min-width:0;border-radius:999px;padding-left:18px}
.send{flex:none;width:54px;height:54px;border-radius:50%;border:0;background:var(--navy);color:#FFFFFF;display:grid;place-items:center;cursor:pointer}
.send:active{background:#091E44}
.send[disabled]{opacity:.5}

/* sheets and toast */
.veil{position:fixed;inset:0;background:rgba(14,42,92,.45);display:flex;align-items:flex-end;justify-content:center;z-index:20;padding:12px}
.sheet{width:100%;max-width:520px;max-height:90vh;overflow:auto;background:#FFFFFF;border-radius:20px;padding:20px}
.sheet h2{margin:0 0 12px;font-size:24px;font-weight:800;letter-spacing:-.01em}
.sheet p{margin:0 0 10px}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;border-bottom:1px solid var(--line);font-weight:700}
.row input{width:28px;height:28px;accent-color:var(--deep)}
.src{margin:14px 0 4px;color:var(--quiet);font-size:16px}
.src summary{min-height:44px;display:flex;align-items:center;font-weight:700;color:var(--navy);cursor:pointer}
.quote{background:var(--wash);border-radius:12px;padding:10px 12px;overflow-wrap:anywhere}
.toast{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);max-width:90%;background:var(--navy);color:#FFFFFF;padding:12px 16px;border-radius:12px;font-weight:700;z-index:30;text-align:center}

@media (min-width:600px){ .veil{align-items:center} h1{font-size:40px} }
@media (prefers-reduced-motion:reduce){ .new{animation:none} }

/* paper: the chat as a plain sheet */
@media print{
  .top .iconbtn,.composer,.veil,.toast,.rep,#changeBtn,#setup{display:none !important}
  .top{position:static;border:0}
  .chat{padding-bottom:0}
  .people{flex-wrap:wrap;overflow:visible}
  body{font-size:12pt}
  .place,.bub,.card{border:1px solid #000;background:#fff}
}
