/* D-Eats PWA: welcome and sign-in screen, and the account row in Settings. Uses the app's colours and type. */
html.gated body > :not(#gate):not(script) { display: none !important; }
html.gated body { padding: 0 !important; background: var(--bg); }

#gate { min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--sans); }
#gate .g-in { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
#gate .g-cover { background: #B03F26; color: #FFF6EE; padding: max(2.2rem, env(safe-area-inset-top)) 0 2.4rem; }
#gate .g-brand { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; letter-spacing: -.01em; }
#gate .g-brand span { color: #FFD9C2; }
#gate h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 8vw, 3rem); line-height: 1.05; margin: 1.4rem 0 .8rem; letter-spacing: -.02em; }
#gate .g-lede { font-size: 1.12rem; line-height: 1.5; margin: 0; color: #FFEDE2; max-width: 36rem; }
#gate .g-body { padding-top: 1.6rem; padding-bottom: 3rem; }
#gate .g-feats { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .9rem; }
#gate .g-feats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .95rem 1.1rem; box-shadow: var(--shadow-1); }
#gate .g-feats b { display: block; font-family: var(--serif); font-size: 1.12rem; margin-bottom: .2rem; }
#gate .g-feats span { color: var(--ink-2); line-height: 1.45; }
@media (min-width: 700px) { #gate .g-feats { grid-template-columns: 1fr 1fr; } }

#gate .g-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-1); }
#gate h2 { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 .3rem; }
#gate .g-sub { margin: 0 0 1rem; color: var(--ink-2); }
#gate .g-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.1rem; }
@media (max-width: 420px) { #gate .g-plans { grid-template-columns: 1fr; } }
#gate .g-plan { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; padding: .8rem .85rem; border: 1.5px solid var(--line-2); border-radius: var(--r-s); background: var(--bg); color: var(--ink); cursor: pointer; font: inherit; }
#gate .g-plan.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); box-shadow: 0 0 0 1px var(--accent) inset; }
#gate .g-pname { font-weight: 700; }
#gate .g-price { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--accent); line-height: 1.15; }
#gate .g-pnote { font-size: .9rem; color: var(--muted); line-height: 1.3; }
#gate .g-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
#gate .g-form label { flex: 1 1 15rem; display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
#gate .g-form input { height: 3.25rem; border: 1.5px solid var(--line-2); border-radius: var(--r-s); padding: 0 .9rem; font: inherit; font-size: 1.05rem; background: var(--bg); color: var(--ink); }
#gate .g-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#gate .g-form .primary-btn, #gate .g-form .ghost-btn { flex: 0 0 auto; height: 3.25rem; }
#gate .g-fine { margin: .9rem 0 0; font-size: .92rem; color: var(--muted); line-height: 1.4; }
#gate .g-msg { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1.5px solid var(--accent); border-radius: var(--r); padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; line-height: 1.45; }
#gate .g-msg p { margin: 0 0 .6rem; }
#gate .g-preview { text-align: center; color: var(--muted); font-size: .92rem; margin: 1.4rem 0 .4rem; }
#gate .g-install { text-align: center; margin: 0; }
html:not(.can-install) #gate .g-install { display: none; }

/* Settings: account row */
.acct-who { margin: 0 0 .9rem; display: flex; flex-direction: column; gap: .15rem; }
.acct-who b { font-size: 1.05rem; word-break: break-all; }
.acct-who span { color: var(--muted); }

/* Server build: sign-in code, devices when the licence is full, iPhone hint, errors */
#gate .g-ios { background: var(--bg); border: 1px dashed var(--line-2); border-radius: var(--r-s); padding: .7rem .85rem; margin: .4rem 0 1rem; line-height: 1.45; color: var(--ink-2); }
#gate .g-codein { letter-spacing: .3em; font-size: 1.35rem !important; max-width: 12rem; }
#gate .g-devs { display: grid; gap: .5rem; margin: .7rem 0; }
#gate .g-dev { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: .65rem .8rem; cursor: pointer; }
#gate .g-dev input { margin-top: .3rem; accent-color: var(--accent); }
#gate .g-dev small { display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
#gate .g-contact { text-align: center; color: var(--muted); font-size: .92rem; margin: .8rem 0 0; }
#gate .g-contact a, #gate .g-msg a { color: var(--accent); }
#gate button.busy { opacity: .6; pointer-events: none; }
.g-fail { position: fixed; z-index: 9999; left: 1rem; right: 1rem; top: 1rem; max-width: 32rem; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--shadow-2, 0 8px 30px rgba(0,0,0,.18)); line-height: 1.45; }
.g-fail p { margin: 0 0 .7rem; }
