/* The member shell (account mode): home, sign-in, profile, ranking, help, settings, administrators. The game room has its own
   style.css; this file only adds the shell, the fonts and the gender rings the room uses too. Design: DESIGN/OFFICIAL/04-design-system.md */
@font-face{font-family:'Kanit';font-style:normal;font-display:swap;font-weight:500;src:url(/assets/fonts/kanit-thai-500-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'Kanit';font-style:normal;font-display:swap;font-weight:500;src:url(/assets/fonts/kanit-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Kanit';font-style:normal;font-display:swap;font-weight:600;src:url(/assets/fonts/kanit-thai-600-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'Kanit';font-style:normal;font-display:swap;font-weight:600;src:url(/assets/fonts/kanit-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-display:swap;font-weight:400;src:url(/assets/fonts/noto-sans-thai-thai-400-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-display:swap;font-weight:400;src:url(/assets/fonts/noto-sans-thai-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-display:swap;font-weight:600;src:url(/assets/fonts/noto-sans-thai-thai-600-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-display:swap;font-weight:600;src:url(/assets/fonts/noto-sans-thai-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{--ring-m:#3b82c4;--ring-f:#d9559a;--ring-n:#8a9a8f;--fill:#e6e4dc;--bad:#b3261e;--good:#2f7d5b;--head:'Kanit','Noto Sans Thai',Tahoma,system-ui,sans-serif;--body:'Noto Sans Thai',Tahoma,system-ui,sans-serif}
/* gender rings: 3px, on every picture of a person (the room uses these too) */
.ring-m{border-color:var(--ring-m)!important}.ring-f{border-color:var(--ring-f)!important}.ring-n{border-color:var(--ring-n)!important}
body.accounts{font-family:var(--body)}
body.accounts h1,body.accounts h2,body.accounts h3,body.accounts button{font-family:var(--head)}
body.accounts button{font-weight:500}
body.calm *,body.calm *::before,body.calm *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}

body.shell{background:var(--bg,#f5f1e6)}
body.shell .topbar{display:none}
body.shell main{max-width:none;padding:0}
.sh{max-width:480px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column;padding-bottom:calc(76px + env(safe-area-inset-bottom));font-size:15px;line-height:1.6}
.sh.noNav{padding-bottom:max(24px,env(safe-area-inset-bottom))}
.sh-top{display:flex;align-items:center;gap:10px;padding:14px 16px 8px}
.sh-top .sp,.sp{flex:1}
.sh-logo{display:flex;align-items:center;gap:9px;min-height:44px;font-family:var(--head);font-weight:600;font-size:17px;color:var(--ink);text-decoration:none}
.sh-mark{width:44px;height:44px;object-fit:contain;flex:none;display:block}.sh-mark.big{width:88px;height:88px;margin:0 auto}
.sh-where{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.sh-back{min-width:44px;font-size:22px;padding:0 6px;background:transparent}
.sh-title{font-family:var(--head);font-weight:600;font-size:18px;margin:0}
.sh-main{flex:1;display:flex;flex-direction:column;gap:12px;padding:6px 16px 16px}
.sh-h1{font-family:var(--head);font-weight:600;font-size:22px;line-height:30px;margin:0}
.sh-h2{font-family:var(--head);font-weight:600;font-size:17px;line-height:26px;margin:6px 0 0}
.sh-muted{font-size:13px;color:var(--muted);line-height:1.6;margin:0}
.sh-small{font-size:12px;color:var(--muted);line-height:1.5}
.sh-center{text-align:center}
.sh-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border-radius:14px;padding:11px 16px;background:var(--green);color:#fff;font-size:15px;font-weight:600;text-align:center;border:0;text-decoration:none;width:100%}
.sh-btn.sec{background:#fff;color:var(--green);border:1px solid var(--green)}
.sh-btn.ghost{background:transparent;color:var(--green);min-height:44px}
.sh-btn.danger{background:var(--bad);color:#fff}
.sh-btn.small{min-height:44px;font-size:14px;padding:9px 14px;width:auto}
.sh-btn:disabled{background:#b9b6a8;color:#fff;border-color:transparent;opacity:1}
.sh-btn.sec:disabled{background:#fff;color:#a5a89c;border:1px solid #cfcdbd}
.sh-row2{display:flex;gap:8px}.sh-row2>*{flex:1}
.sh-fld{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.sh-fld input,.sh-fld select,.sh-fld textarea{min-height:46px;border-radius:12px;border:1px solid #cfcdbd;background:#fff;padding:10px 13px;font-size:15px;font-weight:400;margin:0}
.sh-fld input:focus,.sh-fld select:focus,.sh-fld textarea:focus{border:2px solid var(--green);padding:9px 12px}
.sh-fld.ok input{border-color:var(--good)}.sh-fld.bad input{border-color:var(--bad)}
.sh-fld .hint{font-weight:400;font-size:12px;color:var(--muted)}.sh-fld .hint.err{color:var(--bad)}.sh-fld .hint.good{color:var(--good)}
.sh-pw{position:relative}.sh-pw input{width:100%;padding-right:70px}.sh-pw button{position:absolute;right:4px;top:3px;min-height:40px;padding:0 12px;background:transparent;color:var(--green);font-size:13px}
.sh-card{background:#fff;border:1px solid #e3e1d3;border-radius:16px;padding:12px 14px}
.sh-card.warn{background:#fbe8cc;border-color:#e6c07d;color:#6d4208}
.sh-card.info{background:#dcebf8;border-color:#9bbde0;color:#1d4f7c}
.sh-card.err{background:#fbdcd8;border-color:#e8a8a1;color:#8a1c14}
.sh-card.soft{background:#f1efe4}
.sh-card h3{margin:0 0 4px;font-size:15px}
.sh-chip{display:inline-block;border-radius:999px;padding:3px 11px;font-size:12px;font-weight:500;background:var(--fill);color:#4a4a42;font-family:var(--body)}
.sh-chip.g{background:#dcefe3;color:#23553c}.sh-chip.a{background:#fbe8cc;color:#6d4208}.sh-chip.r{background:#fbdcd8;color:#8a1c14}.sh-chip.b{background:#dcebf8;color:#1d4f7c}
.sh-guest{display:inline-block;border:1px solid #cfcdbd;background:var(--fill);color:#4a4a42;border-radius:999px;padding:1px 9px;font-size:11px;font-weight:600;margin-left:6px;vertical-align:middle}
.sh-soon{display:inline-block;border-radius:999px;padding:1px 8px;font-size:10px;font-weight:500;background:#fbe8cc;color:#6d4208;margin-left:6px;vertical-align:middle}
.sh-list{display:flex;flex-direction:column}
.sh-li{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;padding:8px 4px;border-bottom:1px solid #ece9dc;background:transparent;border-radius:0;color:var(--ink);text-align:left;width:100%;font-size:15px;font-weight:400;text-decoration:none}
.sh-li:last-child{border-bottom:0}
.sh-li .arrow{color:var(--muted)}
.sh-li.danger{color:var(--bad)}
.sh-rm{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e3e1d3;border-radius:14px;padding:8px 12px;min-height:56px;width:100%;text-align:left;font-weight:400;color:var(--ink)}
.sh-rm .grow{flex:1;min-width:0}.sh-rm .grow b{display:block;font-family:var(--head);font-weight:500;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-rm.me{border-color:var(--green);background:#dcefe3}
.sh-av{--s:44px;width:var(--s);height:var(--s);border-radius:50%;border:3px solid var(--ring-n);overflow:hidden;background:#e8dfc4;flex:none;display:inline-block}
.sh-av img{width:100%;height:100%;object-fit:cover;display:block}
.sh-avs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.sh-avs button{padding:0;min-height:0;background:transparent;border-radius:50%;aspect-ratio:1}
.sh-avs button .sh-av{--s:100%;width:100%;height:auto;aspect-ratio:1}
.sh-avs button[aria-pressed=true] .sh-av{outline:3px solid var(--green);outline-offset:2px}
.sh-seg{display:flex;gap:6px;flex-wrap:wrap}
.sh-seg button{flex:1;min-height:44px;border-radius:12px;border:2px solid #cfcdbd;background:#fff;color:var(--ink);padding:6px 8px;font-size:14px}
.sh-seg button[aria-pressed=true]{border-color:var(--green);background:#dcefe3}
.sh-seg button.m[aria-pressed=true]{border-color:var(--ring-m);background:#dcebf8}.sh-seg button.f[aria-pressed=true]{border-color:var(--ring-f);background:#fbe0ee}.sh-seg button.n[aria-pressed=true]{border-color:var(--ring-n);background:#e6e4dc}
.sh-tabs{display:flex;border-bottom:1px solid #e3e1d3}
.sh-tabs button{flex:1;background:transparent;border-radius:0;min-height:44px;padding:8px 2px;font-size:14px;color:var(--muted);border-bottom:3px solid transparent}
.sh-tabs button[aria-selected=true]{color:var(--green);border-bottom-color:var(--green);font-weight:600}
.sh-nav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;justify-content:center;background:#fffdf6f2;backdrop-filter:blur(8px);border-top:1px solid #e3e1d3;padding:6px 8px max(8px,env(safe-area-inset-bottom))}
.sh-nav .in{display:flex;width:100%;max-width:480px}
.sh-nav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;min-height:52px;font-size:11px;color:var(--muted);text-decoration:none;padding-top:4px;position:relative}
.sh-nav a i{width:24px;height:24px;border:2px solid #8a9a8f;border-radius:8px;display:block}
.sh-nav a[aria-current=page]{color:var(--green);font-weight:600}
.sh-dot,.sh-nav a[href] i.sh-dot{position:absolute;top:6px;left:calc(50% + 6px);width:11px;height:11px;border-radius:50%;background:var(--bad,#b3261e);border:2px solid #fffdf6;display:block}.sh-dot[hidden],.sh-nav a[href] i.sh-dot[hidden]{display:none}
.sh-people{gap:8px}
.sh-badge-card.locked{opacity:.6;filter:grayscale(.9)}.sh-badge-card.earned{border-color:var(--green)}.sh-badge-card small{display:block;font-weight:400}
.sh-progress{height:12px;border-radius:999px;background:var(--fill,#e8e6d8);overflow:hidden}.sh-progress i{display:block;height:100%;background:var(--green);border-radius:999px}
.sh-sw>span{flex:1;min-width:0}.sh-sw>span b,.sh-sw>span small{display:block}.sh-sw>span small{margin-top:2px;line-height:1.5}
.sh-top .sh-bell{margin-left:auto;flex:none}
.sh-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;background:transparent;color:var(--ink)}.sh-bell svg{width:24px;height:24px}.sh-bell .sh-dot{top:7px;left:auto;right:7px}
.sh-count{display:inline-block;min-width:20px;padding:0 6px;border-radius:999px;background:var(--bad,#b3261e);color:#fff;font-size:12px;line-height:20px;text-align:center}
.sh-person-row{gap:12px}.sh-person-row small,.sh-note small{display:block;color:var(--muted);font-size:12px;font-weight:400}
.sh-person-actions{display:flex;gap:6px;flex:none;align-items:center}.sh-person-actions .sh-btn{min-height:44px;margin:0}
.sh-note.unread{border-color:var(--green);background:#f1f7ee}.sh-note-line{display:block;font-size:14px;line-height:1.5}.sh-note{flex-wrap:wrap}.sh-note .grow{flex:1 1 150px}
.sh-nav a[aria-current=page] i{border-color:var(--green);background:#dcefe3}
.sh-nav a .dot{position:absolute;top:2px;right:26%;min-width:8px;height:8px;border-radius:50%;background:var(--bad)}
.sh-sheet-wrap{position:fixed;inset:0;z-index:60;background:#213c3266;display:flex;align-items:flex-end;justify-content:center;animation:sh-fade .15s ease}
.sh-sheet{width:100%;max-width:480px;max-height:92dvh;overflow:auto;background:var(--paper);border-radius:24px 24px 0 0;padding:10px 16px max(18px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;animation:sh-up .22s ease}
.sh-sheet .grab{width:36px;height:4px;border-radius:2px;background:#cfcdbd;margin:2px auto 4px;flex:none}
.sh-sheet .x{position:absolute;right:10px;top:8px;background:transparent;font-size:22px;min-height:44px;min-width:44px;padding:0}
@keyframes sh-up{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}@keyframes sh-fade{from{opacity:0}to{opacity:1}}
.sh-toggle{position:relative;width:46px;height:28px;border-radius:14px;background:#cfcdbd;border:0;padding:0;min-height:44px;flex:none;background-clip:content-box;border-top:8px solid transparent;border-bottom:8px solid transparent}
.sh-toggle[aria-pressed=true]{background-color:var(--green)}
.sh-toggle::after{content:'';position:absolute;top:2px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;transition:left .12s}
.sh-toggle[aria-pressed=true]::after{left:19px}
.sh-sw{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;border-bottom:1px solid #ece9dc;padding:4px}
.sh-skel{background:linear-gradient(90deg,#ece9dc,#f5f2e8,#ece9dc);background-size:200% 100%;animation:sh-sk 1.2s linear infinite;border-radius:12px;min-height:52px}
@keyframes sh-sk{to{background-position:-200% 0}}
.sh-podium{display:flex;justify-content:center;align-items:flex-end;gap:14px;padding:6px 0}
.sh-podium div{text-align:center;font-size:12px}
.sh-shields{display:flex;justify-content:center;gap:8px}
.sh-shields svg{width:30px;height:35px}
.sh-stat{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.sh-stat .sh-card{padding:8px}.sh-stat b{font-family:var(--head);font-size:20px;display:block}
.sh-table{width:100%;border-collapse:collapse;font-size:13px}.sh-table th{text-align:left;color:var(--muted);font-weight:500;padding:6px 4px}.sh-table td{padding:8px 4px;border-top:1px solid #ece9dc;vertical-align:middle}
.sh-dob{display:grid;grid-template-columns:1fr 2fr 1.4fr;gap:6px}.sh-dob select{min-height:46px;border-radius:12px;border:1px solid #cfcdbd;background:#fff;padding:0 8px;font-size:14px}
.sh-check{display:flex;gap:10px;align-items:flex-start;font-size:13px;font-weight:400}.sh-check input{width:22px;min-height:22px;height:22px;margin:2px 0 0;flex:none}
details.sh-fold>summary{min-height:44px;cursor:pointer;font-size:14px;display:flex;align-items:center;color:var(--green);font-weight:600}
details.sh-quiet{margin-top:22px;text-align:center}details.sh-quiet>summary{justify-content:center;font-size:13px;font-weight:400;color:var(--muted)}
@media(min-width:760px){.sh{margin-top:12px}.sh-nav .in{max-width:480px}}
/* the room's global ".danger" paints a red block; inside the shell a danger row is only red text */
.sh .sh-li.danger,.sh button.sh-li.danger,.sh-sheet button.sh-li.danger{background:transparent;color:var(--bad)}
.sh-li.danger .arrow,.sh-sheet button.sh-li.danger .arrow{color:inherit}
.sh .sh-btn.danger,.sh button.sh-btn.danger{background:var(--bad);color:#fff}
.sh-av{position:relative}.sh-av img{position:absolute;inset:0}
/* gender picker: a drawn symbol beside the word, never colour words; the colour of the symbol follows the photo ring */
.gender-seg button{display:flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
.gender-mark{flex:none}
.gender-mark.m{color:var(--gender-m,#2f6fb0)}.gender-mark.f{color:var(--gender-f,#c23c86)}.gender-mark.n{color:var(--gender-n,#5f6f66)}
/* chat with a friend: the friend row (tap the person for the menu, tap the bubble to chat) and the chat page */
.sh-row-main{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:44px;padding:0;background:transparent;border:0;color:inherit;text-align:left;font-weight:400}
.sh-chatbtn{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--green);color:var(--green);background:transparent;text-decoration:none}
.sh-chatbtn svg{width:22px;height:22px}.sh-chatbtn .sh-dot{top:1px;left:auto;right:1px}
.sh-person-row .grow small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-person-row .grow small.unread{color:var(--ink);font-weight:600}
.sh-chat-title{display:flex;align-items:center;gap:10px;min-width:0}.sh-chat-title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh[data-page="/chat"]{height:var(--app-height,100dvh);min-height:0;padding-bottom:max(8px,env(safe-area-inset-bottom));overflow:hidden}
.sh[data-page="/chat"] .sh-main{min-height:0;gap:8px;padding-bottom:0}
.sh-dm-log{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:4px 2px;overscroll-behavior:contain}
.sh-dm{max-width:82%;padding:7px 11px;border-radius:16px 16px 16px 4px;background:#fff;border:1px solid #e3e1d3;align-self:flex-start;overflow-wrap:anywhere}
.sh-dm.mine{align-self:flex-end;border-radius:16px 16px 4px 16px;background:#dcefe3;border-color:#bfdcca}
.sh-dm p{margin:0;white-space:pre-wrap;font-size:15px;line-height:1.5}
.sh-dm time{display:block;margin-top:1px;font-size:11px;color:var(--muted);text-align:right}
.sh-dm-day{align-self:center;margin:6px 0 2px;font-size:11px;color:var(--muted)}
.sh-dm-empty{margin:auto;padding:0 20px;text-align:center;font-size:13px;line-height:1.7;color:var(--muted)}
.sh-dm-form{display:flex;gap:8px;align-items:center;flex:none}
.sh-dm-form input{flex:1;min-width:0;min-height:46px;margin:0;border-radius:12px;border:1px solid #cfcdbd;background:#fff;padding:10px 13px;font-size:15px}
.sh-dm-form input:focus{border:2px solid var(--green);padding:9px 12px}
.sh-dm-form .sh-btn{width:auto;min-width:64px;min-height:46px}
