/* iw site styles for the sign-in and welcome pages (on top of identity-php's identity.css).
   The front door's look since 2026-11-17 (the user: "the same style as the front door feel"): the white tile board,
   Exo 2, the deep-blue gradient title. Since 1.6.0 the cards are the in-game windows' dark glass with glossy pill buttons. */
:root { --bg:#F7FBFF; --card:rgba(255,255,255,.78); --fg:#14213D; --muted:#4A5D80; --line:rgba(20,33,61,.14);
        --accent:#2F6FE4; --accent-fg:#fff; --bad:#c62828; --glow:rgba(110,198,255,.55);
        --f:"Exo 2","Segoe UI","Helvetica Neue",Arial,sans-serif; color-scheme: light; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-height: 100vh; min-height: 100dvh; }   /* the logo and sign-in sit in the middle of the screen */
body { background: var(--bg); color: var(--fg); font: 17px/1.45 var(--f);
       display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
       padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
                max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
main { width: 100%; max-width: 400px; text-align: center; position: relative; z-index: 1; }
:focus-visible { outline: 2px solid #3d8bff; outline-offset: 3px; }

/* the tile board (client/ui/tile-board.js): the front door's own board, the same code, drifting slowly towards us */
#iw-board { position: fixed; inset: 0; z-index: 0; background: var(--bg); pointer-events: none; overflow: hidden; }
#iw-board canvas { position: absolute; inset: 0; display: block; }

/* the title, like the front door's logo */
h1 { margin: 0 0 18px; font-weight: 800; font-size: clamp(22px, 7vw, 34px); letter-spacing: .14em; text-transform: uppercase;
     line-height: 1.1; background: linear-gradient(180deg, #2b3f6e 0%, #14213D 55%, #3d6fb8 100%);
     -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
     animation: iw-in .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes iw-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { h1 { animation: none; } }
.muted { color: var(--muted); }
.err { color: var(--bad); }
.stack, #box { display: grid; gap: 10px; margin-top: 12px; }
#box:empty { display: none; }

/* identity-php's screens: the in-game windows' dark frosted glass (the user, 2026-11-17: "make the login screen also follow
   the style of the internal windows", "all of this needs to be updated"); the page around them stays light */
.idn, .iw-way, .iw-details, .pf-card { --w-text: #F4F8FF; --w-muted: #D3DEEF;
       background: rgba(14,24,52,.6) !important; color: var(--w-text);   /* the front door's --glass, as in "Do you want to continue?" */
       -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
       border: 1px solid rgba(255,255,255,.42) !important; border-radius: 22px !important; color-scheme: dark;
       box-shadow: 0 0 0 1px rgba(110,198,255,.12), 0 10px 26px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.28); }
.idn { display: grid; gap: 10px; text-align: left; padding: 18px; max-width: none; }
.idn .idn-title, .iw-way .idn-title, .iw-details > summary { color: var(--w-text); }
.idn .idn-hint, .idn .idn-msg, .iw-way .idn-hint, .iw-way .idn-msg, .idn label, .iw-way label { color: var(--w-muted); }
.idn a, .iw-way a, .iw-details a { color: #9CC8FF; }
.idn .idn-error, .idn .idn-danger, .iw-way .idn-error { color: #FF9C8A; }
.idn .idn-ok, .iw-way .idn-ok { color: #8FE3A8; }
.idn .idn-codetext, .iw-way .idn-codetext { color: #fff; }
.idn .idn-qr svg, .iw-way .idn-qr svg, .idn .idn-qr img { background: #fff; border-radius: 12px; padding: 8px; }
.idn-btn, #box > .idn-btn, main .idn-btn { position: relative; overflow: hidden; width: 100%; min-height: 52px; border-radius: 999px; --bc: #4A5D80;
       border: 1.5px solid rgba(255,255,255,.7); color: #fff; font: 700 14px/1.2 var(--f); letter-spacing: .08em; text-transform: uppercase;
       cursor: pointer; margin-top: 8px; transition: transform .15s, box-shadow .15s;
       background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 70%, #fff) 0%, var(--bc) 48%, color-mix(in srgb, var(--bc) 75%, #000) 100%);
       box-shadow: 0 0 18px color-mix(in srgb, var(--bc) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.6), 0 8px 20px rgba(0,0,0,.25); }
/* the buttons are the in-game windows' glossy pills (the user, 2026-11-17: "follow the style of the internal windows … the
   outside doesn't need a glass pane.. but the buttons"): the main one in blue, the others slate, the same shine on top */
.idn-btn::before { content: ""; position: absolute; left: 4%; right: 4%; top: 0; height: 48%; border-radius: 999px 999px 40% 40%;
       background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); pointer-events: none; }
.idn-btn:active { transform: scale(.97); }
.idn-btn.idn-primary, #box > .idn-btn.idn-primary, main .idn-btn.idn-primary { --bc: var(--accent); color: var(--accent-fg) !important; }
.idn-btn:disabled { opacity: .6; }
.idn-input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 14px;
             background: rgba(4,8,20,.35); color: #fff; font: 16px var(--f); }
.idn-input::placeholder { color: rgba(184,199,224,.7); }
/* (codes) */
.idn-codetext { font: 700 18px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; word-break: break-all; text-align: center; }
.idn-title { font-weight: 800; letter-spacing: .04em; margin: 0; }
.idn-hint, .idn-msg { font-size: 15px; margin: 0; }

/* the quiet sign-out link at the bottom of the welcome page (own devices) */
main .idn-btn.iw-signout { background: none; border: 0; box-shadow: none; color: var(--muted); font-weight: 600; min-height: 44px; margin-top: 16px; }
main .idn-btn.iw-signout::before { display: none; }

/* login screen as two separate choices (index.html twoWays) */
.idn.iw-twoways { background: none !important; border: 0 !important; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; gap: 12px; color: var(--fg); color-scheme: light; }
.idn.iw-twoways > .idn-title { color: var(--fg); }
.idn.iw-twoways > .idn-hint, .idn.iw-twoways > .idn-msg { color: var(--muted); }
.idn.iw-twoways > .idn-error { color: var(--bad); }
/* a sign-in error, shown under the way the player used (index.html keepInView) */
.idn-error.iw-alert:not(:empty) { color: #fff !important; background: rgba(176,0,32,.85); border-radius: 12px; padding: 10px 14px; font-weight: 600; text-align: left; }
.iw-way { display: grid; gap: 8px; text-align: left; padding: 18px; }
.iw-way .idn-btn { margin-top: 4px; }
.iw-twoways .idn-or { display: flex; align-items: center; gap: 12px; opacity: 1; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .2em; font-size: 12px; }
.iw-twoways .idn-or::before, .iw-twoways .idn-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Welcome page: the profile card's save ticks in the site's colours, and the closed "Account details" section */
.pf-icon.pf-go { background: var(--accent); color: var(--accent-fg); }
.iw-details { margin-top: 16px; text-align: left; }
.iw-details > summary { cursor: pointer; padding: 15px 18px; font-weight: 800; letter-spacing: .04em; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.iw-details > summary::-webkit-details-marker { display: none; }
.iw-details > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--w-muted); border-bottom: 2px solid var(--w-muted); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.iw-details[open] > summary::after { transform: rotate(-135deg); }
.iw-details > #acctbox, .iw-details > #acctactions { padding: 0 18px 18px; }
#acctbox:empty { display: none; }
#acctactions { margin-top: 0; }

/* Versions in small print at the bottom of the start and welcome pages (§14) */
.iw-ver { margin: 24px 0 0; font-size: 12px; color: var(--muted); opacity: .8; }
