/* chakra-petch-thai-500-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/chakra-petch-thai-500-normal-DeexCGiz.woff2) format('woff2'), url(/assets/chakra-petch-thai-500-normal-CJG_V2_m.woff) format('woff');
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}

/* chakra-petch-vietnamese-500-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(data:font/woff2;base64,d09GMgABAAAAAA6QAA4AAAAAJ8AAAA43AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoEKG44cHC4GYACCfBEICqQQnxYLghgAATYCJAOECgQgBYQmB4o+GzUjBdzxsHEAQMp3RFRsZpf8f0jQ1lD0erCtQp1UdKkbW6CciL91ZxoXkr+oJYWuN2JhAA2Cfg5poYVxzufRPb+6ktEOOSGnRvT8GOm8fQEGYeKAyDHpRCUy5+IiYxwUXVVrK1uhgOTd9/nnt32/z7mUXXARjMQKDMS+2IBJG0RaSyeqfRNZTKVvfuWLbDCwzWvyrOEN1mLhmu3mcoWZpIDC9FnYonAUeAZJMKhXzovTkLQewxNQCXFw+5kzDFOrAP4NutbsXtAJnuCnRgo8WPRsNOsj5uC8ISRdxP+tVdr+/e/v1Nyx2lt3TM9f3V1ImEggl/ju+jM1W1Pzl2hC1OE+4gr2TBCEiyUADyhUZGzcyryoCBklXJ4PD9/fN27mnuyxl+lfWhdaVoyjdiuwwsg8tVJtQLg1nbORaAah12tF18qrfT33n12BHYB5iFXhKAgKCIoiqFh88YhEGYgsEoRUCUKhFlFPiWjGIfpoEaPGEZPmEA4BxIJlxIoVxKpVjKtdg3G9mzAImKPfU5gjxzRaVO1i0Qv57S0OJOIBI6RRfCKekuAR/jFoAmFP78970b03750TolW5PFrdDiCYipWp/5BQYPq0R6YVe4RTJEGAIkJ06kQUiySQLrHbMRqBDOK3T/wDAUzbs7iKEFj9UBx2vRvcSFAN5mTKhOSvTPAQGA0I9B8gbsIjr6cTs6fbUSaY7buii3lubrOlRc0PPUh//cSOZkQMpZdyJsdomRocgF37HsuW/Cd/y0Yc+HO+zRf5KO+QwYTX4AVj8g6M5l9A/qk8lgdy19mUcovJdT7ekl/JfNyZpTdzfCJanNufbljU/NCDtjdW9kv9TGpSlsLIyWQDMaTuK098/ymRVIADIS7UqTpS+8hgwg7YZEz2wWh+Ew78V/2lfq8f63fK15DPfPx6/gf1Vr2SnOG5HTcghE1wCaEJ+cjpT60T5SmTlwkitnoIA8CpdaI8Grw0akrrBOJgFfFTChTIRRwqg39qXpJHCUpEwvipMvg0wzSfJkCasTjI1lT0b0V821RgekXGWyLR08gTY9BnDcf8aORGXcP4tqrFswoUFBfxbxVOlUGWvbIKKlGJraiMWwfJkjBnCXxjBhtdoxk3np3at+0Agu5HHAKjMRnTMBcVWIkq7EENjhes35pzsSIuo/97C3RoIUh2fmeVVA4oxAohQn6eTNiAAArqH0r4o+IfeBNKhDoGqEE88L3r8IhgnPmm0z3He86jHf+KAh+TA0OoWS9Mdv0okyyS2CAzc5IKdF425UPlqHB8cb8SkEEh0KwXD2eeX8/zDfkouEqAEqietEKKFBlkgPHmic7/xY9vJtJ9aNn/THl/zjiNjB2TboUkbeP+8UrX/fGSJx58GcyRyoMCyDqwTLYKteST6y00FCJBemww40LxnacNkSBFigwywvv16IqtAkylRID9Fcj9D01RnVJC3mcMnC7fuG6oSCEwA06n3AQzfaeHh2N9q03f26Y2atrv0TYR8jBQ/yQINmFAAAuXYZCfnld2sAWLh4L5WM+FIXFVUI56vt5rwvCYMEa24Tz75gih7UVJbOWXvfYXvNtg6ESGzz1Ljf/vHP+GzOSbyXtx2E347Wfgo9fIJMbKJgdsWf9vHNM1i8eRGFcrIJ9VOZdVN4rVI06vCO2idIrWJUa3SB0EWoiohGkTTk2oVZph6UZk0ErUJ9mAFINSDUnST2xMllG5zPJYSE2SMZAzymGSbUoBmyIzis0qMafQNAWHMk4V3Kp4VfOp4VfJo8GiegsaLVFaRpAxLARMALUC7IHchN4K099BrwMEQAZOS5Bh3TBrd6EW5APn5jTdMr2rs3w8NGoK2nH9ENe3tmYBV7x2rVlzPXSrvVqrUguSba7WGAx6tbUZGnMt20UOWsrWoNV34b2+m9J+mBeeIbmAh2McfprgCigLH9dOKBC/ufDi5Hz9C1rkIgt9JuTX3RRrLM3qU1LW06WLOdOwyHGTS9qn6SyJ7cvssBP1W50c84gnPDTImr1OMRZoZjTQgP6s3kWTT9hFfyqiSPup6YHDtB9kvpd+cc93nCkluIfrfNKFzjiRMQINTmjueDDPXtI/eQVJXeZ+WjGa9dE8TWd8D0b0prm9ZPT+Bzt4kVL2srXLN3mcb33pxZ3rAfdkF7nsOF+JERcM5YRh5XTS/mtgV6Abrjj0oqWpdXXWAXqXMgmC33wx5NwPA+8GM6F+D4xaBDHX9mlcpl+K7S5q2qjdz3ilL6fBpxr/ae3XNXP1ZMEkwr68dfFLW9P7Se9+U9tT1H+Meo/hztn//P4Xq61aa+WLsQ9uTt76kval7cmbceqbf2mXt46PjO9Y1v4L578xB81ofbnJ5+v1rXMZI5uf2HxkcQT+/cmp11U8Fu7odkevnX3kyXVi749Trzhz4eb/bS40c35/FS4n+jsffd7rv/g790jW+nBFemrN/qWKfnnQfmot24wa7dVarUD79cU3cgxNZvNx8+WDo8O6oY9f1RjGq/6f3SOFbtdQ9bhep/vCZKowmb7vab3l3q57+w39Q2/n6TV3bT61+QazBY3GSpOJb7r5id385YdfZE81G4xCkfzi+vvrQ2i9VSGrlnG/hF7DCYMM/L2sN16xL9yIyJjbcmH93PrH3Aef3s6o69rki0nZIUryse/l2xYJPx8O3HzIsLRuWFgoMZwYv7Fan8Kj7zfrlQMFE3m6f/2F455L07mhVYtBtumV9a9MxqfM5gcNixvN84vFGNytUb61sbuf6equM3RpXivFe6tP3Ka5Dc/syo5UbSnbUvW2+OiODORRP1QRqhqbvd3zmut9TgfpGqb+fQu+0i48NNGqFbRemcDDh7aBYnQrHmjjeh9AgT0RWZ3VGzpOJoXEx2rWOvBoKNYUI1/f35m5pSIkPlG1srjS1qViR0BevG4YuYdzjVfpE9qCSKUHJhk5x3rHKZtKj6SrS9V2tVJdlc55dNIb04VFyTGZhxVrqu9SQuU9X5/bPHv4yGnDyL3cPZhAH33Rj1Taq5Pj/7GrKXVT0ZEMtaJ9pr2ptSqD2yDNPWZhcTIyblY8JnwCtoAHmIlnNfrd2dzKzt14w5S11AnhWj310Borbv1aPem5VNojS1oSmqGSEkiJrZRgNUbolEp7ZHVNbGTK03DDlMzUSr8ThR0ljhJLozhKrNUYIUulPbKkMb94h5Vt3HG7MRKpFMek1FAv5U2sE5iUm1gQZqtG+sCRukqooDpUUF0AIjSt3XhWGoAlyNbY1A+0Vkfd66E1Vtz6tXrSc0e5sSxp0TRDCWlIYgNG6OhZL7rRNRF0FwXmuUB9pyaQMjE+lNIESW3ACB0960U3pNGq33Wj33RNFPtOWFRkFIuriTVrFoYiw41kia12wHxzJsxvogyCSjRfZIH8PmbiCpNiYejPZ6///+bq0N7zW7f6tmATwEIgs31Tqabl3SM06FVBOkqRJJXuoCTKb6Qq0xPs6r857ZrhuMhJs8CB1MDVg70UrKRgVDFP2ks6+30RRdHKP2ocLFeSU2G+a1oS1cNcfYfHJvlopCrTE5zWf2ue6sfsYafyszEs60tjmhELWdwV1dBdyVqPzSqGCtLShavztQkKB20F9LdNl9QCdSSfqTYkmcCrGt0d912ajOZU+hq4xUhyGxv9yow60RRh8KGczVH2hWTZi0kKyGSkYCUFo4p5hL5J9SqC8lNRgL8jFTqgKpEhstrEJz6JiU984jdfyEY87IW65CmgpnDrvjrPpFSQAqbwGByEx6zHZhVDBcYumlrSizX6Rg5SMqa3KFG+k/FzaFBD6HsUoIB1E8+ITAuV/4uEzD749TrzP/HVP6sIu/z28jbe9dP+g5mQAAr4nUv3+4K6ckUh4WmF1+kzoTG5PumzJObsWreM9uO6CrgAx6IFZ/n/IH2LalsOdb6F24bjHD+6MR3CceIr1J7JScrWdblsIcsy8k/6OBBMiW25s7OFahvuZrZVgdt/dsk1ShiWP4+F/x7W7q7O93ni7qZY/wwETGgn1ILv9NUaBbPMYpBpYYDPEfUXE7l2LKai/WMxo8GGIk9bzNdmbLGAXNW+0arAI4uc79dAkV9gM8/huUXOKbXg3OVv5TNvjsKAThpqdhYu8ywGzVhkY1eiz4xpDks89GbM13gjHy9WuVJlXbMR2zabZbHEcR/7DrxXsfIty4+sUZB66dXacViN7WE4m7PEba3zVmSXOrujmo/f6gfAzZkZ0ZwKZVkdlnbnZuwm1nOD/o4+TjNsea+anrd/8PzCzn6wZWHZnOOQxpdYLW/j46E4uypmNuVmnIDFEpPSCtSmAP3dv4rn019tAiqgGDeUw4bJbLHa7A6ny+3xFiMohhOIJHI5hUqrpTOYLDaHy+MLhCJxs0QqkyuUKrWmXavTG/ppJrPFarM7nC43jLitG8VwQk5eQTFN/3ZaWaVhVTV1DU0tbR1dPX0Dw8aMjE1MzcwtLK2asraxtbN3cHRydnFlsTlcHl8gFIklUtmofhqNGICX7ibcPAXXA+KYl4loICmUKkZpDBi8kgBbudbCv1bwOdUAkkJJxICDJoovDFDwD+f1BhWWg0GiNG7ZsFP+WNtb7lUIPOBJtM+jPiwpC+2xU6FgGAMhwn2KTw469/srFDB4tMTGUF8rvwyw+JgQdIhMbQCjMxGoUSPEnOqAyKEmYiLBEiVfJjh8KiAmmUrHasWjhZAxAqLW6o8BE0KwOgGCOhUk9LzSOYQYPqyt625gJUODU/3ldc+PqHh8WawCf1/GfYkT7aXRU3ipfOwt67RYWunD+9ry/wEmW3ffPvLd2RXLfn6b3hcar27E+fXfvx9+ofFfxuT2PJhXeP1Ho/2zmN8nAAA=) format('woff2'), url(/assets/chakra-petch-vietnamese-500-normal-BVzUBLGs.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* chakra-petch-latin-ext-500-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/chakra-petch-latin-ext-500-normal-gA6791b0.woff2) format('woff2'), url(/assets/chakra-petch-latin-ext-500-normal-BCHeNDEx.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* chakra-petch-latin-500-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/chakra-petch-latin-500-normal-BR1ody1F.woff2) format('woff2'), url(/assets/chakra-petch-latin-500-normal-CnUQnZ4D.woff) format('woff');
  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;
}/* chakra-petch-thai-600-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/chakra-petch-thai-600-normal-C620THcd.woff2) format('woff2'), url(/assets/chakra-petch-thai-600-normal-BiM5MXH8.woff) format('woff');
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}

/* chakra-petch-vietnamese-600-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(data:font/woff2;base64,d09GMgABAAAAAA5oAA4AAAAAJ6QAAA4PAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoEKG41yHC4GYACCfBEICqQQnx4LghgAATYCJAOECgQgBYQyB4o+Gx8jMwO2g7O6EoL/OoHOIUBs530xoSMqjSK03Gt9PUnRxTuEMTxWNNayfNTTvUy/qbSc7Knx/PNH/1t7nz8PTbNQVhbJBw70oUQBpmFC4XvXh+e3+efe9wgf6JyyNY4yCwsFCxMT2oQ2kmWn/syUh+/3a+f+RT1Rd2imeUND0/7puGSGSIhUmK5RPHRC3oq8Qb1yXpyGpPUYnoBK+S8AMGzb2ESqYHS5OTveO10MqkxQmMwG2NHv/7fWp+3q13enZxEcBPH4VJgkkEt8d73p6qlfU7vdy7PMvcQVnAmSi4wlAA8oVISN+0JGyAjjI6zI8bFVal3DpqAxQqiN8VirTeF14eu6/+wCvgDOEHNxKCgKKIoiqHA8EQiJaQipGQi5ZESqHEQeDaJIDcLAiLCwIRx8iIBBxLBZiDnmIOaaizHfAozFlmEQcKLOAUxJX2tE1vIi2AfV9r4zAAkWWGMGxSPUKxIsgQFeiC9kyTPUh8pz9QidEbq4u1fK3QgUU9pY/08JAftVXSzFDl3E+BkQQoSeHpFEjG8qSbNxGAJNSg9P/QIf9jrOVhF8c5+OPRZbYil+dBky3XQx8RsTLAIrH4F5RBDLsBLHKIzOVLSwbbm3IGSoLqb/9nerkUe+X++Pb/11P+37fbMv99k+rqws4kFxL4mrN3qpZ3pMdj7QXd3SdV1hGeyLRWKOErcCdkWkIIZMj2d7rBbnjWhFtYPaqZHWtbZS2yVUgznqpkEjj3xfJLy1auYxQRrVyY2oWFlZBF9gezH5e07k13yPnb/Mx3k3r+dFZbCKp8WjSsyLYKiIUb0/d3ItF1qF1il/asURnRp7pHyyL9UeaBUk4pbKWX3XNkzRUTE2UwVe3/xcX/k2OrbRQSLhaCbhgRhiy9mEYw1l1iorSElKUpIyVE4OKUhqpZSQKhOOssxSz1MIV/UFVqvOWU9MLbYlsHaxdtbaKWePQ28MxFayCZ/qC32zUU5YXRHpSEdlpAvLylhIpVoHrDZHWqvVJLBeDVdtBEr85UWgMJpIUyiGUimTiqmKasnW4fzQjVYnqk61ihDjv5zi6TCev+aE4PZVbW/CGwQQSAUh+BL4Gy5DCVE/4lANWPDbIiwhrN+db3DvdcV9rJ+c4sRN2LkEilTDio8ZyqHTBC4xfUUXucHGKte9uwrF4Rn/ZU8MCSwta7Nq1PIqLU+JR/xVfBSft6QfUaLEECMY27HasX9swuPVNL89L/1uH8jvDaatj1feHZICzZTrVNO8ec6r994KQ+RiRbyQ7pxGIUMO1QonJggJiBA9NZi2QERjaVciRIkSQ4xjf/hMkjRAkyER0D9u7L1BllkreNBzOxx+vHXKyIgE4BAGV3wHh/6gb6UamQfh3dV8uHsW9r6rfkfIdiCVjoJ3GFAw4A6D4Jdnww/4QIZFwTmZI8GQ8YlPgBzNlSEMy4Qwyjd/yc6vMdhtKAlPXPzkdv7lAaNGKHTkeZN+84k3woLt0XaB2SOHf18IfPIL00WRUVABPlz+bxz7ikSoMYNNjkFxnNJ1m2upcFXGqyZSJpRemArjVBIrx6clVCxECU4pAZ0pmkzVbBojCYOJ6k3SYLJGE9SJYiVlEaNDrE5yDkqtVNpEa6fQIp5LIo8kXsl8ErilCkjTJUOPLH2y9VMbkKlXvqA8wwrMpDELQdKYS8AGSA/4Cs2BKcL+GUwvoACacFWKJB34ee37rFfhuTen84nTu7vnT4ZBkYZ7+PiiVayQ5TgxKxSOE4olJ5GHkqPwAyHrLw8/Cpv4cJY66nqGOHyvCcQiPGaFIrxoD/ULF09+mm5RK2cWGzmfnbPOpkYxwxERE2pqEkOEEzrTHgqxdv1cxHIWxkIV1Fhx9GamiWugjfORao95epFIG+NZRdRs4YnYzfQkYfRcPWXAfy+HXWQTOURWylmIJZQUnWhwYRGZKEeM2NFCuDjxe6+sW5qZOCCliBSUi+bErMJGy+GUEI9trI0Ixibfrj6rPbSnhTQNRhHlHCJ60JMt2nll4RaAHpzaotJAW4joZnrCh6FoSxegp1WmHGYnFhIR4vP5nJu81DUdoRCXF+Ystk/bYUQmrl1krJs57mASb1Kv4CSoRLOoUTTJDxpUXdtCJk6H3AoYcUcVncasmaee7+eCWj/DM/I+HsP11rw05dVMXe21UxvEN1aZ4XMJ2PbE3if3dmQ74h0QjPT9OzKr4CRv+IfO2s/3xlJ3LPbpXw4GryZ73d7Eq9i/mvfEYffhp3iF8pEvXcEnLU7Ls0HXl6geCY4GUTDw9sCAfeCyInWtXrH647O9kXbs8R67I2fjnI39/vEew/GTl4m8AcqDFUHZ6udXy+zKYBHSS7Yra9Z6E4NEEZAmt8U/+vf9i6+k0mFz8UgS/YmQbp1ltZDqsoNlsv58j/cvj3e9z1Bfe/eitak+4Zn/C9+DK6kpubupsXHE6Upwuh4tyZu5vXl79WB108MZtaXL9r67d5bVBrUz0eka53bd8zaYzmdFDeg6OiKZmHLfaV85ClryVxeubneYUjL48yCqfzrvUe+0kLgQuCrvt83+dPZZ3Q63/+lxOKpfjJyT24gn9RhubDlL9MuhwL1xsMtrCQRiB38OtLQ4DuP8Pw/YZo12uJXX/MUEP+29nv8t5pJB+ZwDvnPNxqMe73ryhR2+7mi0pRnSH957zD3YfFA/qDfcp/71wZpft9i34Fy9WqGJzIrUXFVuGMVoFSV1uZlFme222P3U3JoTHky+FO3/wKn3dyzZ26ur5+vqe3EwqG9Pfr/k/eR2fV39ISQ4Jd/NaIb2f8MvE96TGYvGDA5v0Nl1SLM2l01/N/E9hVXz7oJ3a6s00S6QSG+vcYOt17WrQsiEgU4e6l0k/F2ZN3FE9cx0Q5q5x6wdm2IZ6pz5IXR55KTvpYbs9/QfTX4vyt77Rjeen1uu6zWut+3iVlHQR6JAJ13plQX3KvInjSifkRoyTd2mko+mWi7Eb/uE5ZJJ30X1u6deMe8zoACLAQEW0eJp94TbxTJtBrJ58ow43Vfl112lJ71Q/nLXfNsjD7rIjqRDJHRUhsicZeQuI4efZ/EBtKYn+mFlND11a08DTrZQskMGO9kh0yzD15pvG3mQ4joTOqGZWtyIAkihlu4UoXSknO7SO3V44Ksnnutyy0iNXFIj1wMgCo/KYBEpIDZglQz38Nnuo/KVX3eVnvRC+ctd843kQVfbkZSohVKHDN+VW7YsmUDLlOiL5f1h9gE4+0IpGnZE65Dhq9yyZYHklFOWHDIB5887FRoJUlB3d4KRY3gQ5Y3lgW4/xNAsAfR7JwWvDEMeCD+GABP4TwnGXvhj8cIH5o998dcHH1jv1xkZcALdYlbamE27V6ryM6ADKsfxWAsOylY015+OjmHepjdzMPrYpOSFXvQrmBmwn4K5FIwMY/tnIUrKnoyDkDgRr0/q6TMajNtnOWgeMYdZ67M4JVrRXH862pd5e+E0MDsksdPo45pBc3bhstAXrZbTxRt9XkhyPwbNKYkhtQfnpap9dDSGFA3g7eMvRAbkpyPxeJOc52eCXaF9SYdHx+MBoTsAHRxby8ENyM9DwuWYSTRz4uKwPPuiRYkZF5YUzKVgZBjbQq/T1HtmuQCsOF4fxSky3HQ9ItCBSXQgAh2zbvo0HnEn//ox5Bz3L+er0IgaZc01hEZc0D6L5pTGoGThf2+FNUVSIVVGfyY84X6QdZ+qStNTERD4flkZZ+M0/4UC5kvg72nHa/jmN23If0/b16oO7L0DDlFA4PcvzTcq3n0TI/7gLX9mBtiB1OLysu8JuOvrDeMyM/RjgkONKAlCrvOxT75Bc3L+GXmD/iwLbMY9dg94uPRzZFxLN3Iy3ZgQQONqbCB42sc+ugo5ODm7RlVAc5J7M72dKvDL+kVz5MAyuY/fc+o5temwwnfOJqr/KyJgo4yAFs/gmw0KjngxSFUI4FdIvAOIBF8fQIV59wBGkUOdLHsAT4mWA/jiZG0fJgs8Ceq4AflSq8NchgR8E9QhKYZNj/0j+w3xSVVPr1Ypv07dhnRq4BHk4pesmUevgBL9eriZeQxVJbpzH5l0KdKacQVkgiu8Os3Udj8/PaRPcFacWYlHq8UnXz2lytSQKViGaGr7zPQe3Wko3Sk7P3GZKbWzBsx9QoxP1eKGZEhbkUvGGAjPTaytNhjSrwvWVWGL12r9T6YdvtFPvhs+n+UTINszOaXq0q9XamuydIVLOo/raWeyuJSSefHo3wSQ4Q/+VdtAMlAMVTCEXcswLdvhdLk9Xp+/GAAhGEExvJwgGbVMFkWzOVweXyAUiZslUplcoVSpNe1and7QTzOZLVab3eF0uWHEbZUohhNy8gqK1faGGmWVmlTV1DU0tbR1dPX0DQyzGhmbmJqZW1ha1WJtY2tn7+Do5OziymJzuDy+QCgSS6TAsodqp1wGeOluws1TcD0gjrkdQDRASJHSB4NCgwEMuJsE2Mq1Fv7uIj6VagCEFCkDiAEc0QEU72KAgn84rzcQjAEDEhS9Xy2b88fa3nKvVIQn8DSo47GDFsos7bFT0tDImCBoYEfxSA46h/x4oYDBkSTqcafZRxlg8bxAQAeCDFUDDDpMECBdE4mpVAcQ5EgdQEyQiA2g5FEmOLwcQDAhQ4UOdn7xaIFABoMAgnp+/TGACQQCdgEBgguoIIHOZTtDiOHD2rruRufI0NDJ+su2/hEprnpZrAL/NmOcpJO0l24esavysbes02JpFSx6X1v+v7uoS/v27NvZTjOP99X6gt6BZngf3d/HuqD/pxgWf4JLOv+hl+DTfKgAAA==) format('woff2'), url(/assets/chakra-petch-vietnamese-600-normal-Pvj4qcw_.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* chakra-petch-latin-ext-600-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/chakra-petch-latin-ext-600-normal-CdGvbdDU.woff2) format('woff2'), url(/assets/chakra-petch-latin-ext-600-normal-nL80L4xU.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* chakra-petch-latin-600-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/chakra-petch-latin-600-normal-DVQm9bgb.woff2) format('woff2'), url(/assets/chakra-petch-latin-600-normal-DQKfcdKo.woff) format('woff');
  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;
}/* chakra-petch-thai-700-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/assets/chakra-petch-thai-700-normal-B7WL5pBr.woff2) format('woff2'), url(/assets/chakra-petch-thai-700-normal-vZLZ_5L8.woff) format('woff');
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}

/* chakra-petch-vietnamese-700-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(data:font/woff2;base64,d09GMgABAAAAAA5wAA4AAAAAJ4wAAA4WAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoEKG41sHC4GYACCfBEICqQInyILghgAATYCJAOECgQgBYQsB4o+GxcjBeOYBTgPoBL6nGZExWZ62f+H5MYYcgOacYlbSMPTuIlilcUg3bh+qqs6oqNVXejUQDSymGJuMduvvv8aYdela3/P0bAZOmIPYYK+6lwQz9Oczfu7ETZBtEZDWPCKYxqopR68SC1QqEKv1IS6HCcq5FR1QQ/Bhp0LHql78iVZxpsjqxWrRSpJVe5vABw/zh9vYgoPTNAYuvWR/wIAA+sSrMSTOvNV+lJeakttam4NzZRB4BzOtbdcurdREnq+XW9nAtBASqL7cv+3Vmbn99+/2xMkhSzcVohVJJBLfHf9TPVUamsZVcIdHAhV6GbmEIwiAguoTsg7d/LsuVPK3fNHkM2mm+zgTvvW2WvL+yiCQqJR/A6EoxLlPL75zponlSgld8fVJqrqUxw8gi/63bn/7AiQDsCNsJ6BAhQKAIVCISii2IghxBlGGC6JkGwUYYxcQr4iQonphBkChDoNhCbthKVWE3qsJayzjrDeehobbaKx1Q4aAhjMdD7N9/YHmPgNrFlB6g++YClxdADL4ihsOHl7Qcfxx0DDTljXV/cKpmzle2VNyvyu5UJeHlBo6OH7FhQggE1fvH85qZMbuwLBiVCtmjCSGztDxRV5IhBQFmHosR9nB90906Kb9R+Ci7baZju7ZB6ZKBESvrCgI2AVJKDdTxB20ElaQrtzcSjt4MHglPr31Pm7+jFEiMquhK9f+9O+3zf7cp/t432QmZngXrg90OI39upe2vMp/3SPdn/7uiUwWMI66JZkt0DaphuwTAejCQZFtq2MW+KNDXRmp5xMBbcVqRx0jVXZUIjKroTU1/Zoa7aig1WMcis7MzMlSMrf2Xb5Vbsw3+dL5H+cd/N6XszTzGCGR+F+SfZp2KfLmU/XLXd3sNx6YrbXs72Svetny8VF+kNO/J1TGTuXjLT08+T/zSNTVIjSPCspP5usSFleaLAV8873YYCjQvCsJJhtmwwfZmAGZmCGl9EgJtA0poFmcPFCTB3F2lPwdg8CZlOcajo0bDNtJdNCHS0qFL3dKfaCPviIL95Tg2CQCnGS8bnRhz6cgj5vSoP0GSP7wFSmYqWppKDkBQeF0HafAhTuH1UIRmACDsF0HIMTsBynoh8bChZ+i01gJk+S1MOCG/uHDJ72RvIPNXDcfOrp7wQPAUBAfkZwfMv/C3dQOFH8iIFiNh243xY6TrB+d12HO1s3i4f6yZVW5TvyFQ5KTMMolwynyQLxFkHiwU7JVhcmZawXplIY2Ij+0Y4aOozK0KYznY0tj7Ex2tB+2I7CnmKkDVSoUEMNNNM2winPc5hNjiD97bzO7+Ge/N6h2fp4tMUhcCm9zrqySN8x5xE7n/6RyTIgC4bnj2UaL1fqqGqyCR0oqFaG1uYgpjCqJRRUqFBDzeq/5vRI2g8cTHGA+lXG8X1VkQqxgdrfejA9vK60GJ9sACeH7b1w8J1WvqZ7L4b3bx8+z4L+YXO8IicA8rMKAS8NUIBpcTTkp9elA5i8dBQQjtfF0SRasmRpLsnNE03XwrQUz1+a665FdoaSKMmUjmzjNw1N05zAi58G6zefWG9wOMh/Gz+bLhe14oPnEvDBQyXy8DKlAjCX/xsHNkrEmC5Jg1yrrS4THEet317V6JorhueISeTUnezmxoV5IzjskN7Q/rBBXDOhPagzuBvf8kyGj9M3GUDyPGWZukpbmwtaK2RHHKgTs8FuwkP66AAb5EK8n4nJUSmu1KrIWoJYlgTgAEASgCKoFmjZYNsLLREABQAoCztjiKVKrkdJ13Z8jrie1paubm+bPxqhoZCC87r4rLru9Th1w3DrTmek0x1nxDrinFF2py5bIxISZuGLXLe6o/Qi4YYoX3dCVG1ruKxdZKNv1OVqNmqNgNHeaNT3qoBbM8SlhQfmGtycFpjXGk4lu9WlG3VaXXhNSuuieZodn63mbCRg8IHaqgFXqQRmMde8OptLv4aTQFeP1WtNyqdranQ1uJpc9cqokzqXZBuZGJK11ZAA1dWJ7M/qNfRZba32MDZHDHGJK6++1iii2FXXhRhuXteIqoOfu0lK5h/VKqWuYoqMsS5lNLlURxvqSh/VFfegMqakpkRprUtdwwm3LJ/gm62t4s7W9eieSeLiiaqvuXtH28KpLZ2xdaG8ZR5XjdHqCiRrDc7Kwwji6xhxBKTONcc1SMocbXWSUAVGrIYAxkZfYSBdb2BXqtRHMc81Bz86L6LcDnFOU9sfGStqSrTmUtpV8qTwsRqeOPfJc9smNWU1oQ9ssgaU1//78Tfd32/MD1MNYfyVz/b2Ppi6dO1S88HIK83fbuxf23/zbyZlA3/3iLfUrK65vbvnb9LA3tBecrpf7+7u6F7GknrMFeabs0sZrx7nWlsL+6pPXbw4wfTfevMyoLejrNe3N9581Izf6+vtnfasd2ndrK2xpletXZKYnMmfn39ecOpKjzqmT90+jmcvI5u6m5r+K/3+9PuJO/I7uwS/0929k6dW33/7ksm+5NC14/eyKm1e+qYZfn8o2G4G2x+/tP1sy9nqvup5r5dUFm2ofbR2+ey5jFuSGmwf0t5+3+KyHy97f+iO8oWLkv7PLIg5P6aAnIay96rfO8W/6vu5j6qf5vWMq6fBE0TsveXmi+aF3M6z/3S45jH11EWLk0z/w/3LgD8TOR37+tqiZy9Y4O37ecOwJnAZDz1tRt0VdBg8yH9M3E+LqU77/CZfnyfleMzpqVOv6Oza3dcaUzd/YRJdaTPHM/KClgtWm/nSO0/6vb+jnztmFAQr6/LqKm/POOvgXZzp00v2Vu89ZXLJkwemX72GyCUszJz4YOehi7eWTbOvvv1Wrur2rxp7bcG1Y1f55869luzmhGeSW5ns8wV+GTRgtm0/HtecCHQGyG+or0gcSB/IaPdVVOzGX62dlpt5Duxcsblmf3DVyjpqnZcpiRKxJxMt1j4lJ/7cxOJPqB/fu6q38p2ERWvN91E744c8460vrKiY/tPQgVuJB9btxmU5jd3xovgBtKtfxKbonvLBPbdNyRu0G+mpz3mYye8NXhQa9yjcLH3QHf0p24/ARKfgoEklT4vK3WbobRoRouQ1GcWTxVW8My17s3jErFDp4iHa2FbQR7HkwykUq2yGKypUGo9IQlVi0mD2lyX67I+IYL29wxbyUgu2kFfZDJcrVBoPETMLHSpJ6eV2NSbQaGwrHk04jlwcZ8dlL+iAyw45wuZlwGLKw2LKc0CA4kU1mphQuZsUnfO6dvFgcYqreGda9mbxiFmuq3mI1t8KZpCfMpTCcIWYosQQScCa0cEerN2c7CXYxt5hFjVSlmKGy2KKEoOIC0UXQzSRhOKO8VMHptmu7IpUkoJkm4KreAhMEUF3u4P4TRPDyUDdhRlAfB852MEG/OdxWC/8sfX3AfPFXx98MO97ATZQ27cv+CfvTlb5NgXqpHGWFDpAkKdqgjWkoYn7RLnugi7XdKEHyqFQQi8HyxBshWBIcGjdrQR1va4ldF+i/PtuUvJ0LqbsOpD7gF07IBeA2nM8VROsIQ0N2if9mlc7QUFoVo9zCsoyu/tCG8s21mnZKbrcA9mR9KEsST7CkCYl4w0NARBiP+iTADCq06kegK+tCFNdyUQXY3vX1OWk4EM6nCTGTl+gaqnVJD9TfAjjoWaSHq/poR7JMFSSnk1MIdgKwUhh8lAVkvsyvaWepEAiNN96Oyk57E3lJA95aC55yEOejuf6FPU8l38lI7K4zbpjPZALsTLohwG58LCSTMqS7ENS/wM33lt7UxAyQ6aw/G5C93bl+e9LCCDwhWP3f2tk0W83Du1LwBtb2l6jL343afw38/O0fs/5gOBAASDwe5f0R4b/vPEQhMPrbegMjQCJWm59tZttX33MUC3KJyaOaihJ6HvZeleF5K5zYaxXl2OdG5SyHnoDsOVLGbWHy4zv5ImJItdWh4R63K231WzjsTyXjZ8ld5lXp/hm5oA/lZ+03XhY09yuxaNWsXpz1dogbX1R9iHFL3sKDshfK6U7A19Mo4BT8JycMODuRJwhBv9rZdP3MzQ5vzN05s8Mm4rBDDtvQEdsDp7QIfMUPuaOS5BISC3HkS5J0+G34ETM3S418jhAiUAHkSHcmeNoeISIvoDzWY3X5Sk64pq2PisKKDKHE6yssahJDw5Zsxdq5uUaN98LlS/UNfFeqXBtuXV+1sHvx9+B4X0a6fPoCOsBayRci5NjvsiRCLQx2REa/ENnpI36UFtp3oERZpsCUhziGPdJB/gg5EWEw4VOsi5nj/XsrwAS3+vhr+aAEymKJhVX5zQ6g8lic7g8PkFSWdy6c+/BoyfPXnJ49eY9nw+fvnzT0NLRMzAyMbMUYWVj5+Dk4ubhLcHHLyBYQUhYRFRMXEJSSlpGVs6ppvIKikrKKqpqNfpT19Csp6Wto6unb2BoZGxiatbE3MLSytoGAAS1AEOgMDgCiUJjsDg8gUgiU6i2dvYOjqu1l0vInu/h/1BTvgtOLoXkBYQE6zmBoDjohkDhfl+b3zoi7YIAhARLXnERUnBXCqr/5b4/oIg1KATrN9Wn81Rtv9f3aYSbJ4cwS9oMBWwvqkNnw6HmOYGbBXwnGHbzNzOYvmnE/v1MhI4C4GMhkzCK9yGSNA/3vZF3QQJGgyev+Ygp+I4G4lMA0yhOiuVc5XhUlGG8LKsKDfNiJYNS4bAn6wyXCDlUged5ujtQpHgjG8+/vvnEUwO4f7/bVp8RXotGCy/qNevg87ptti/XsQ3P77+25OWk9RGfrGpqY13/tIf+O/X1ut7P/tta6P//MDW9vqqd72P0231NqLsHAAAA) format('woff2'), url(/assets/chakra-petch-vietnamese-700-normal-gQuUA8Wu.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* chakra-petch-latin-ext-700-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/assets/chakra-petch-latin-ext-700-normal-DAkvJhej.woff2) format('woff2'), url(/assets/chakra-petch-latin-ext-700-normal-BeviJPUl.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* chakra-petch-latin-700-normal */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/assets/chakra-petch-latin-700-normal-CnDBPjkL.woff2) format('woff2'), url(/assets/chakra-petch-latin-700-normal-D1s_c2du.woff) format('woff');
  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;
}/* space-grotesk-vietnamese-wght-normal */
@font-face {
  font-family: 'Space Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/assets/space-grotesk-vietnamese-wght-normal-D0rl6rjA.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* space-grotesk-latin-ext-wght-normal */
@font-face {
  font-family: 'Space Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/assets/space-grotesk-latin-ext-wght-normal-D9tNdqV9.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* space-grotesk-latin-wght-normal */
@font-face {
  font-family: 'Space Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/assets/space-grotesk-latin-wght-normal-BhU9QXUp.woff2) format('woff2-variations');
  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;
}/* Brace screen: how much of this hit do you stop, and with what. */
.battle:has(.dv) .hud-bottom {
  visibility: hidden;
}
.battle.in-fight:has(.dv) .fight-stage {
  bottom: 56vh;
  bottom: 56dvh;
}

.dv {
  --block: #9cc8ff;
  --recycle: var(--aether);
  --play: var(--holo);
  --hurt: #ff6b8e;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-height: min(64vh, 100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  grid-template-areas:
    "threat hand"
    "tabs hand"
    "meter hand"
    "free hand"
    "foot foot";
  grid-template-rows: auto auto auto 1fr auto;
  gap: 12px 28px;
  padding: 16px max(24px, var(--safe-r)) calc(14px + var(--safe-b))
    max(24px, var(--safe-l));
  color: var(--vellum);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 15, 0.94),
    rgba(5, 8, 10, 0.98)
  );
  border-top: 1px solid rgba(224, 70, 111, 0.5);
  box-shadow: 0 -24px 50px rgba(0, 0, 0, 0.5);
  animation: dv-rise 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.dv::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(224, 70, 111, 0.9) 30%,
    rgba(255, 162, 74, 0.9) 70%,
    transparent
  );
  filter: blur(1px);
}

/* ---------- threat ---------- */
.dv-threat {
  grid-area: threat;
  display: grid;
  gap: 12px;
}
.dv-attack .micro {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hurt);
  letter-spacing: 0.28em;
}
.dv-attack .micro em {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 142, 0.4);
  font-style: normal;
  letter-spacing: 0.06em;
  color: rgba(238, 243, 241, 0.75);
}
.dv-attack strong {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dv-attack strong span {
  color: var(--hurt);
}
.dv-attack p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(238, 243, 241, 0.72);
}
.dv-hp {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(238, 243, 241, 0.04);
  border: 1px solid rgba(238, 243, 241, 0.08);
}
.dv-portrait img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
}
.dv-hp-body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
}
.dv-hp-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  white-space: nowrap;
}
.dv-hp-head small {
  margin-left: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.dv-hp-head .is-hurt {
  color: var(--hurt);
}
.dv-hp-head .is-safe {
  color: #6ff0a8;
}
.dv-hp-bar {
  position: relative;
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(238, 243, 241, 0.08);
}
.dv-hp-bar i {
  height: 100%;
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.dv-hp-bar .keep {
  width: calc(var(--keep) * 100%);
  background: linear-gradient(90deg, #2bb57a, #6ff0a8);
}
.dv-hp-bar .loss {
  width: calc(var(--loss) * 100%);
  background: repeating-linear-gradient(
    135deg,
    var(--hurt) 0 4px,
    rgba(255, 107, 142, 0.45) 4px 8px
  );
  animation: dv-throb 1.1s ease-in-out infinite;
}
.dv-hp-bar .shield {
  width: calc(var(--shield) * 100%);
  background: var(--block);
}
.dv-hp-num {
  font-size: 12px;
  color: rgba(238, 243, 241, 0.6);
}
.dv-hp-num small {
  font-size: 11px;
}

/* ---------- defender tabs ---------- */
.dv-tabs {
  grid-area: tabs;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dv-tabs-hint {
  flex: 1 1 100%;
  color: #fde68a;
}
.dv-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.14);
  background: rgba(238, 243, 241, 0.04);
  color: rgba(238, 243, 241, 0.75);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.dv-tabs img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
}
.dv-tabs button[aria-current="true"] {
  border-color: var(--hc);
  color: var(--vellum);
}
.dv-tabs .is-hurt {
  color: var(--hurt);
}
.dv-tabs .is-safe {
  color: #6ff0a8;
}

/* ---------- guard meter ---------- */
.dv-meter {
  grid-area: meter;
  display: grid;
  gap: 8px;
}
.dv-meter-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.dv-meter-head .micro {
  color: var(--block);
  letter-spacing: 0.24em;
}
.dv-meter-head b {
  font-size: 22px;
  font-weight: 600;
}
.dv-meter-head b small {
  font-size: 13px;
  color: rgba(238, 243, 241, 0.5);
}
.dv-meter-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(238, 243, 241, 0.6);
}
.dv-meter.is-full .dv-meter-head em {
  color: #6ff0a8;
}
.dv-track {
  position: relative;
  display: flex;
  gap: 2px;
  height: 14px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(238, 243, 241, 0.06);
  border: 1px solid rgba(238, 243, 241, 0.1);
}
.dv-track i {
  flex: none;
  min-width: 6px;
  border-radius: 5px;
  animation: dv-fill 0.3s ease-out;
}
.dv-track .is-parry {
  background: linear-gradient(90deg, #ffd08a, var(--holo));
}
.dv-track .is-gear {
  background: linear-gradient(90deg, #7fb1e8, var(--block));
}
.dv-track .is-active {
  background: linear-gradient(90deg, #ffb46a, #f08a2c);
}
.dv-track .is-card {
  background: linear-gradient(90deg, #4fd1b8, var(--aether));
}
.dv-track-need {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: calc(var(--need) * 100%);
  width: 2px;
  border-radius: 1px;
  background: var(--hurt);
  box-shadow: 0 0 8px var(--hurt);
}
.dv-meter.is-full .dv-track {
  border-color: rgba(111, 240, 168, 0.6);
  box-shadow: 0 0 18px rgba(111, 240, 168, 0.25);
}
.dv-meter.is-full .dv-track-need {
  background: #6ff0a8;
  box-shadow: 0 0 8px #6ff0a8;
}

/* ---------- free blocks ---------- */
.dv-free {
  grid-area: free;
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dv-free button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.14);
  background: rgba(238, 243, 241, 0.04);
  color: rgba(238, 243, 241, 0.85);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.dv-free button b {
  color: var(--block);
}
.dv-free button small {
  font-size: 10px;
  color: var(--holo);
}
.dv-free button.is-active {
  border-color: rgba(255, 162, 74, 0.45);
}
.dv-free button[aria-pressed="true"] {
  border-color: var(--block);
  background: rgba(156, 200, 255, 0.14);
  color: var(--vellum);
}
.dv-free button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- hand ---------- */
.dv-hand {
  --cw: 134px;
  --ch: 212px;
  --k: 0.78;
  grid-area: hand;
  align-self: center;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
  padding: 18px 4px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dv-hand::-webkit-scrollbar {
  display: none;
}
.dv-card {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: calc(var(--cw) * var(--k));
}
.dv-card-face {
  width: calc(var(--cw) * var(--k));
  height: calc(var(--ch) * var(--k));
  transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.dv-card-face .card-hand,
.dv-card-face .card-hand:hover:not(.locked) {
  width: var(--cw);
  height: var(--ch);
  transform: scale(var(--k));
  transform-origin: top left;
  border-radius: 10px;
}
.dv-card.is-block .dv-card-face {
  transform: translateY(-12px);
}
.dv-card.is-block .card {
  box-shadow: 0 0 0 2px var(--block), 0 0 24px rgba(156, 200, 255, 0.4);
}
.dv-card.is-recycle .card {
  box-shadow: 0 0 0 2px var(--recycle), 0 0 24px rgba(111, 240, 214, 0.35);
}
.dv-card.is-play .dv-card-face {
  transform: translateY(-12px);
}
.dv-card.is-play .card {
  box-shadow: 0 0 0 2px var(--play), 0 0 24px rgba(255, 162, 74, 0.4);
}
.dv-uses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding: 2px;
  border-radius: 999px;
  background: rgba(238, 243, 241, 0.06);
  border: 1px solid rgba(238, 243, 241, 0.1);
}
.dv-uses button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(238, 243, 241, 0.6);
  font: inherit;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
}
.dv-uses button b {
  font-weight: 600;
}
.dv-uses button:disabled {
  opacity: 0.25;
  cursor: default;
}
.dv-uses button[data-use="block"][aria-pressed="true"] {
  background: var(--block);
  color: #08121a;
}
.dv-uses button[data-use="recycle"][aria-pressed="true"] {
  background: var(--recycle);
  color: #062019;
}
.dv-uses button[data-use="play"][aria-pressed="true"] {
  background: var(--play);
  color: #1a0d02;
}

/* ---------- footer ---------- */
.dv-foot {
  grid-area: foot;
  position: sticky;
  bottom: calc(-14px - var(--safe-b));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -8px calc(-14px - var(--safe-b));
  padding: 8px 8px calc(14px + var(--safe-b));
  background: linear-gradient(
    180deg,
    rgba(5, 8, 10, 0),
    rgba(5, 8, 10, 0.98) 26%
  );
}
.dv-note {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #fde68a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dv-btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.18);
  background: rgba(238, 243, 241, 0.04);
  color: var(--vellum);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dv-btn:hover:not(:disabled) {
  background: rgba(238, 243, 241, 0.09);
}
.dv-btn.is-primary {
  min-width: 200px;
  border: 0;
  background: linear-gradient(180deg, #ffb46a, #f08a2c);
  color: #1a0d02;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(255, 162, 74, 0.3);
}
.dv-btn.is-primary:disabled {
  filter: grayscale(1) brightness(0.5);
  box-shadow: none;
  cursor: default;
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .dv {
    max-height: 68vh;
    max-height: 68dvh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "threat"
      "tabs"
      "meter"
      "free"
      "hand"
      "foot";
    grid-template-rows: none;
    gap: 8px;
    padding: 10px 12px calc(10px + var(--safe-b));
  }
  .battle.in-fight:has(.dv) .fight-stage {
    bottom: 68vh;
    bottom: 68dvh;
  }
  .dv-portrait {
    display: none;
  }
  .dv-attack p {
    margin-top: 2px;
  }
  .dv-threat {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .dv-attack strong {
    font-size: 16px;
  }
  .dv-attack p {
    font-size: 11.5px;
  }
  .dv-hp {
    padding: 8px 10px;
  }
  .dv-portrait img {
    width: 32px;
    height: 32px;
  }
  .dv-meter-head b {
    font-size: 18px;
  }
  .dv-free {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .dv-free::-webkit-scrollbar {
    display: none;
  }
  .dv-hand {
    --cw: 88px;
    --ch: 138px;
    --k: 0.8;
    justify-content: flex-start;
    padding-top: 14px;
  }
  .dv-uses button {
    font-size: 8.5px;
  }
  .dv-btn {
    flex: 1;
    height: 38px;
    padding: 0 10px;
    font-size: 11px;
  }
  .dv-btn.is-primary {
    min-width: 0;
    flex: 1.4;
  }
  .dv-note {
    display: none;
  }
}

@keyframes dv-rise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}
@keyframes dv-throb {
  50% {
    opacity: 0.55;
  }
}
@keyframes dv-fill {
  from {
    opacity: 0;
    transform: scaleX(0.4);
  }
}
@media (max-height: 520px) {
  .dv {
    max-height: calc(100dvh - 56px);
    gap: 8px 20px;
    padding-top: 10px;
  }
  .dv-attack p {
    display: none;
  }
  .dv-threat {
    gap: 8px;
  }
  .dv-hand {
    align-self: start;
    --k: 0.62;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dv,
  .dv-track i,
  .dv-hp-bar .loss {
    animation: none;
  }
}
/* One chip style for stats, statuses, gear abilities, passives and terrain. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  --tone: rgba(238, 243, 241, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  max-width: 100%;
  padding: 0 7px 0 6px;
  border: 1px solid rgba(238, 243, 241, 0.1);
  border-left: 2px solid var(--tone);
  border-radius: 3px;
  background: rgba(238, 243, 241, 0.045);
  color: rgba(238, 243, 241, 0.82);
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.chip[tabindex="0"] {
  cursor: help;
}
.chip svg {
  flex: none;
  color: var(--tone);
}
.chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--vellum);
}
.chip-note {
  margin-left: 1px;
  padding: 1px 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  color: var(--tone);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip.is-good {
  --tone: #6ff0a8;
}
.chip.is-bad {
  --tone: #ff7a98;
}
.chip.is-neutral {
  --tone: #7fd8ff;
}
.chip.is-edge {
  --tone: var(--holo);
}
.chip.is-dim {
  opacity: 0.45;
}
.chip-tip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--holo);
}
.duel-round {
  max-width: calc(100vw - 32px);
}
.duel-plate {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  min-width: 0;
  padding: 0 14px;
  white-space: nowrap;
}
.dp-round {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.dp-round b {
  font-size: 22px;
  line-height: 1;
  color: var(--vellum);
}
.dp-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.dp-side.is-1 {
  flex-direction: row-reverse;
}
.dp-side.is-acting {
  border-color: color-mix(in srgb, var(--tc) 70%, transparent);
  background: color-mix(in srgb, var(--tc) 12%, transparent);
}
.dp-name {
  overflow: hidden;
  max-width: 96px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  color: var(--tc);
}
.dp-heroes {
  display: flex;
  gap: 4px;
}
.dp-hero {
  position: relative;
  display: block;
  width: 24px;
  height: 28px;
}
.dp-hero img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--tc);
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
}
.dp-hero i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--tc) calc(var(--v) * 100%),
    rgba(238, 243, 241, 0.14) 0
  );
}
.dp-hero.is-done img {
  opacity: 0.55;
}
.dp-hero.is-down img {
  opacity: 0.25;
  filter: grayscale(1);
  border-color: rgba(238, 243, 241, 0.2);
}
.dp-score {
  min-width: 22px;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  color: var(--vellum);
}
.dp-goal {
  flex: none;
  opacity: 0.7;
}
.duel-bar {
  padding-right: 14px;
}

.battle .duel-pick {
  z-index: 30;
}

.handover {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(16px, var(--safe-t, 0px)) 16px 16px;
  background: radial-gradient(
      ellipse at 50% 40%,
      color-mix(in srgb, var(--tc) 16%, transparent),
      transparent 60%
    ), #070d10;
}
.handover-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(420px, 100%);
  padding: 28px 24px;
  border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent);
  border-radius: 12px;
  background: rgba(13, 28, 32, 0.9);
  text-align: center;
}
.handover-card .micro {
  letter-spacing: 0.22em;
  color: rgba(238, 243, 241, 0.6);
}
.handover-card h2 {
  margin: 0;
  font-family: var(--display, inherit);
  font-size: 34px;
  line-height: 1.1;
  color: var(--tc);
}
.handover-card p {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--vellum);
}
.handover-card .btn {
  min-width: 200px;
  min-height: 46px;
}
.handover-card small {
  font-size: 11.5px;
  color: rgba(238, 243, 241, 0.55);
}

@media (max-width: 760px), (max-height: 520px) {
  .duel-round {
    max-width: none;
  }
  .duel-plate {
    gap: 6px;
    height: 34px;
    padding: 0 8px;
  }
  .dp-name,
  .dp-cap,
  .dp-goal span,
  .dp-round .micro {
    display: none;
  }
  .dp-goal::before {
    content: ":";
    font-size: 15px;
  }
  .dp-round b {
    font-size: 17px;
  }
  .dp-side {
    gap: 5px;
    padding: 2px 4px;
  }
  .dp-hero,
  .dp-hero img {
    width: 20px;
  }
  .dp-hero {
    height: 24px;
  }
  .dp-hero img {
    height: 20px;
  }
  .dp-score {
    min-width: 18px;
    font-size: 16px;
  }
  .handover-card h2 {
    font-size: 26px;
  }
}
@media (max-height: 520px) {
  .handover-card {
    gap: 6px;
    padding: 14px 20px;
  }
}

.duel-screen {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: auto;
  padding: max(14px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  background: var(--dusk);
  color: var(--vellum);
}
.duel-screen > * {
  position: relative;
}
.duel-screen > .dusk-backdrop {
  position: absolute;
}
.duel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.duel-head .sq-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--dusk-line);
  border-radius: 8px;
  background: var(--dusk-glass);
  color: var(--vellum);
}
.duel-head h1 {
  display: grid;
  margin: 0;
  font-size: clamp(20px, 3.4vw, 30px);
  line-height: 1.15;
}
.duel-head h1 span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff8c3f;
}
.duel-panel {
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(720px, 100%);
  padding: 24px 20px;
  border: 1px solid var(--dusk-line);
  border-radius: 14px;
  background: var(--dusk-glass);
  backdrop-filter: blur(10px);
  text-align: center;
}
.duel-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  width: 100%;
}
.duel-choice {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--dusk-line);
  border-radius: 10px;
  background: rgba(238, 243, 241, 0.04);
  color: var(--vellum);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.duel-choice:hover:not(:disabled),
.duel-choice:focus-visible {
  border-color: #ff8c3f;
  background: rgba(255, 162, 74, 0.1);
  transform: translateY(-2px);
}
.duel-choice:disabled {
  opacity: 0.5;
  cursor: default;
}
.duel-choice b {
  font-size: 17px;
}
.duel-choice small {
  font-size: 12.5px;
  color: rgba(238, 243, 241, 0.7);
}
.duel-lead {
  margin: 0;
  font-size: 16px;
}
.duel-wait {
  margin: 0;
  font-size: 13.5px;
  color: rgba(238, 243, 241, 0.7);
  animation: watch-pulse 1.6s ease-in-out infinite;
}
.duel-error {
  margin: 0;
  font-size: 13.5px;
  color: #ff8fa3;
}
.duel-go {
  min-width: 220px;
  min-height: 46px;
}
.duel-code {
  margin: 0;
  background: none;
  font-family: inherit;
  cursor: copy;
  padding: 8px 22px;
  border: 1px dashed var(--holo);
  border-radius: 10px;
  font-size: clamp(30px, 8vw, 46px);
  letter-spacing: 0.24em;
  color: var(--holo);
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
}
.duel-join {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--dusk-line);
}
.duel-join input {
  width: 9.5em;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--dusk-line);
  border-radius: 8px;
  background: rgba(7, 13, 16, 0.6);
  color: var(--vellum);
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}
.duel-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.duel-vs {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.6);
}
.duel-squad {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
}
.duel-squad ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.duel-squad li {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 2px;
  width: 92px;
  min-width: 0;
}
.duel-squad img {
  width: 56px;
  height: 56px;
  border: 1px solid var(--hc);
  border-radius: 8px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
}
.duel-squad b {
  font-size: 12px;
}
.duel-squad small {
  max-width: 100%;
  font-size: 9.5px;
  line-height: 1.25;
  text-align: center;
  color: rgba(238, 243, 241, 0.6);
}
.duel-result {
  grid-row: 1 / -1;
}
.duel-result h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.05;
  color: #ff8c3f;
}
.dr-sides {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dr-sides li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--dusk-line);
  border-radius: 10px;
  text-align: left;
}
.dr-sides li.is-winner {
  border-color: var(--tc);
  background: color-mix(in srgb, var(--tc) 10%, transparent);
}
.dr-name {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tc);
}
.dr-heroes {
  display: flex;
  gap: 6px;
}
.dr-heroes img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--tc);
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
}
.dr-score {
  min-width: 34px;
  font-size: 26px;
  text-align: right;
}
.dr-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.dr-actions .btn {
  min-width: 150px;
  min-height: 44px;
}
@media (max-width: 560px) {
  .duel-versus {
    grid-template-columns: 1fr;
  }
  .duel-squad li {
    width: 84px;
  }
}
@media (max-height: 520px) {
  .duel-panel {
    gap: 10px;
    padding: 12px 16px;
  }
  .duel-choice {
    min-height: 0;
    padding: 10px 14px;
  }
  .duel-squad img {
    width: 40px;
    height: 40px;
  }
  .duel-squad small {
    display: none;
  }
  .duel-versus {
    grid-template-columns: 1fr auto 1fr;
  }
  .dr-heroes img {
    width: 30px;
    height: 30px;
  }
}

.duel-as {
  margin: 0;
  font-size: 13px;
  color: rgba(238, 243, 241, 0.75);
}
.duel-as b {
  color: var(--vellum);
}
.duel-choice.is-ranked {
  border-color: color-mix(in srgb, #ff8c3f 55%, transparent);
}
.duel-list {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
}
.duel-list h2 {
  margin: 0;
  letter-spacing: 0.2em;
  color: #ff8c3f;
}
.duel-list p {
  margin: 0;
  font-size: 13px;
  color: rgba(238, 243, 241, 0.6);
}
.duel-list ul {
  display: grid;
  gap: 6px;
  max-height: 168px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.duel-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--dusk-line);
  border-radius: 8px;
}
.duel-list-who {
  overflow: hidden;
  font-size: 13.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.duel-list-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(238, 243, 241, 0.7);
}
.duel-list-tags em {
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #ff8c3f 22%, transparent);
  color: #ff8c3f;
  font-style: normal;
  font-weight: 600;
}
.duel-list .btn {
  min-width: 76px;
  min-height: 36px;
}

.duel-clock {
  flex: none;
  min-width: 3.2em;
  font-size: 13px;
  text-align: right;
  color: var(--vellum);
}

/* Online lobby: host public or private on the left, open public duels on the right. */
.duel-panel.is-wide {
  width: min(1080px, 100%);
  align-self: start;
  text-align: left;
}
.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  width: 100%;
}
.lobby-host,
.lobby-find {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}
.lobby-size {
  display: flex;
  gap: 4px;
}
.lobby-size button {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--dusk-line);
  background: rgba(238, 243, 241, 0.04);
  color: rgba(238, 243, 241, 0.75);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.lobby-size button[aria-checked="true"] {
  border-color: var(--holo);
  color: var(--vellum);
  background: rgba(255, 162, 74, 0.14);
  box-shadow: inset 0 -2px 0 var(--holo);
}
.lobby-hosts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lobby-hostbtn {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--dusk-line-strong);
  background: linear-gradient(
    160deg,
    rgba(255, 162, 74, 0.16),
    rgba(255, 162, 74, 0.03)
  );
  color: var(--vellum);
  font: inherit;
  text-align: left;
  cursor: pointer;
  clip-path: polygon(
    12px 0,
    100% 0,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    0 100%,
    0 12px
  );
  transition: background 0.15s, transform 0.15s;
}
.lobby-hostbtn.is-private {
  background: linear-gradient(
    160deg,
    rgba(111, 240, 214, 0.12),
    rgba(111, 240, 214, 0.02)
  );
}
.lobby-hostbtn svg {
  color: var(--holo);
}
.lobby-hostbtn.is-private svg {
  color: var(--aether);
}
.lobby-hostbtn b {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lobby-hostbtn small {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(238, 243, 241, 0.72);
}
.lobby-hostbtn:hover,
.lobby-hostbtn:focus-visible {
  background: rgba(255, 162, 74, 0.26);
  transform: translateY(-2px);
}
.lobby-hostbtn.is-private:hover,
.lobby-hostbtn.is-private:focus-visible {
  background: rgba(111, 240, 214, 0.2);
}
.lobby .duel-join {
  justify-content: flex-start;
}
.lobby .duel-join label {
  flex-basis: 100%;
}
.lobby-find {
  padding-left: 24px;
  border-left: 1px solid var(--dusk-line);
}
.lobby-find-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lobby-find-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lobby-find-head h2 b {
  min-width: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  color: #06201b;
  background: var(--aether);
}
.lobby-refresh {
  margin-left: auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--dusk-line-strong);
  background: none;
  color: var(--vellum);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.lobby-refresh:hover {
  border-color: var(--holo);
  color: var(--holo);
}
.lobby-find .duel-list ul {
  max-height: 260px;
}
.lobby-kind {
  padding: 2px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #160c1c;
  background: var(--holo);
  transform: skewX(-10deg);
}
.lobby-kind.is-private {
  background: var(--aether);
}
.lobby-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.lobby-share .btn {
  min-height: 42px;
  min-width: 120px;
}

@media (max-width: 760px) {
  .lobby {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .lobby-find {
    order: -1;
    padding-left: 0;
    border-left: 0;
  }
  .lobby-find .duel-list ul {
    max-height: 200px;
  }
  .lobby-hostbtn {
    min-height: 96px;
    padding: 12px;
  }
  .lobby-hostbtn b {
    font-size: 15px;
  }
}
@media (max-height: 520px) {
  .lobby-hostbtn {
    min-height: 0;
    padding: 10px 12px;
  }
  .lobby-hostbtn small {
    display: none;
  }
  .lobby-find .duel-list ul {
    max-height: 120px;
  }
}

/* Map language for the duel screens: medallion host cards, orb squads, spaced labels. */
.duel-choice {
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
}
.duel-choice:hover:not(:disabled),
.duel-choice:focus-visible {
  background: linear-gradient(90deg, rgba(255, 140, 63, 0.14), transparent),
    var(--mm-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75), 0 0 22px
    rgba(255, 140, 63, 0.16);
}
.duel-choice.is-ranked {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.5), inset 3px 0 0 #ff8c3f;
}
.lobby-size {
  gap: 6px;
}
.lobby-size button {
  border: 0;
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lobby-size button[aria-checked="true"] {
  color: #1d0f06;
  background: var(--ember);
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4);
}
.lobby-hostbtn {
  --lc: #ff8c3f;
  position: relative;
  overflow: hidden;
  gap: 8px;
  padding: 18px;
  border: 0;
  clip-path: none;
  background: radial-gradient(
      90% 80% at 100% 0%,
      color-mix(in srgb, var(--lc) 20%, transparent),
      transparent 70%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong), inset 0 2px 0 var(--lc);
  transition: box-shadow 0.2s, transform 0.2s;
}
.lobby-hostbtn.is-private {
  --lc: #6ff0d6;
  background: radial-gradient(
      90% 80% at 100% 0%,
      color-mix(in srgb, var(--lc) 16%, transparent),
      transparent 70%
    ), var(--mm-panel);
}
.lobby-hostbtn::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--lc) 40%, transparent);
  outline: 1px dashed color-mix(in srgb, var(--lc) 18%, transparent);
  outline-offset: 12px;
  pointer-events: none;
}
.lobby-hostbtn svg {
  box-sizing: content-box;
  padding: 9px;
  border-radius: 50%;
  color: var(--lc);
  background: radial-gradient(
    circle at 50% 35%,
    color-mix(in srgb, var(--lc) 24%, #1c1430),
    rgba(12, 9, 26, 0.95)
  );
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lc) 70%, transparent), 0 0 0
    4px rgba(14, 10, 28, 0.6), 0 0 0 5px
    color-mix(in srgb, var(--lc) 25%, transparent);
}
.lobby-hostbtn.is-private svg {
  color: var(--lc);
}
.lobby-hostbtn b {
  font-family: var(--mm-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.lobby-hostbtn:hover,
.lobby-hostbtn:focus-visible,
.lobby-hostbtn.is-private:hover,
.lobby-hostbtn.is-private:focus-visible {
  background: radial-gradient(
      90% 80% at 100% 0%,
      color-mix(in srgb, var(--lc) 30%, transparent),
      transparent 70%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--lc), inset 0 2px 0 var(--lc), 0 0 24px
    color-mix(in srgb, var(--lc) 22%, transparent);
}
.duel-join {
  border-top: 0;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent) top /
    100% 1px no-repeat;
}
.duel-join label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--holo);
}
.duel-join input {
  border: 0;
  border-radius: 2px;
  background: rgba(10, 7, 22, 0.8);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  font-family: var(--mm-title);
  font-weight: 600;
  outline: none;
}
.duel-join input:focus {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75), 0 0 16px
    rgba(255, 140, 63, 0.18);
}
.lobby-find {
  border-left: 0;
  background: linear-gradient(
      180deg,
      transparent,
      var(--mm-hair-strong) 20%,
      var(--mm-hair-strong) 80%,
      transparent
    )
    left / 1px 100% no-repeat;
}
.lobby-find-head h2 {
  font-family: var(--mm-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
}
.duel-list h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--holo);
}
.duel-list h2::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--holo);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.4);
}
.duel-list h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent);
}
.duel-list li {
  border: 0;
  border-radius: 999px 4px 4px 999px;
  padding-left: 16px;
  background: rgba(10, 7, 22, 0.6);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.duel-list-who {
  font-family: var(--mm-title);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lobby-refresh {
  border: 0;
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  font-family: var(--mm-title);
  font-weight: 600;
}
.lobby-refresh:hover {
  color: #1d0f06;
  background: var(--ember);
  box-shadow: none;
}
.lobby-kind {
  border-radius: 999px;
  transform: none;
}
.duel-code {
  border: 0;
  border-radius: 2px;
  font-family: var(--mm-title);
  font-weight: 600;
  background: rgba(10, 7, 22, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.6), 0 0 30px
    rgba(255, 140, 63, 0.15);
  outline: 1px dashed rgba(255, 176, 102, 0.3);
  outline-offset: 6px;
}
.duel-vs {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--mm-title);
  font-weight: 600;
  color: var(--holo);
  background: radial-gradient(
    circle at 50% 35%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  box-shadow: var(--mm-ring);
}
.duel-squad img {
  border: 0;
  border-radius: 50%;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px var(--hc), 0 0 0 4px rgba(14, 10, 28, 0.7), 0 0 0 5px
    color-mix(in srgb, var(--hc) 25%, transparent);
}
.duel-squad b {
  margin-top: 4px;
  font-family: var(--mm-title);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.duel-result h1 {
  font-family: var(--mm-title);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 30px rgba(255, 140, 63, 0.5);
}
.dr-sides li {
  border: 0;
  border-radius: 999px 4px 4px 999px;
  padding-left: 8px;
  background: rgba(10, 7, 22, 0.6);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.dr-sides li.is-winner {
  background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--tc) 18%, transparent),
      transparent 70%
    ), rgba(10, 7, 22, 0.6);
  box-shadow: inset 0 0 0 1px var(--tc), 0 0 22px
    color-mix(in srgb, var(--tc) 20%, transparent);
}
.dr-name {
  font-family: var(--mm-title);
  letter-spacing: 0.18em;
}
.dr-heroes img {
  border: 0;
  border-radius: 50%;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px var(--tc), 0 0 0 3px rgba(14, 10, 28, 0.8);
}
.dr-score {
  font-family: var(--mm-title);
  font-weight: 600;
  color: #fff;
}
.handover-card h2 {
  font-family: var(--mm-title);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
/* The battle dock: prompt, fanned hand and the few controls a fight needs. */
.battle .hud-bottom.is-fight {
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  max-height: none;
  padding: 0 max(16px, var(--safe-r)) calc(12px + var(--safe-b))
    max(16px, var(--safe-l));
  opacity: 1;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(5, 9, 11, 0.85) 28%,
    rgba(5, 9, 11, 0.96)
  );
  border: 0;
  box-shadow: none;
}

.fd {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) minmax(
      190px,
      250px
    );
  grid-template-areas:
    "left prompt right"
    "left hand right";
  align-items: end;
  gap: 6px 20px;
}

/* ---------- prompt ---------- */
.fd-prompt {
  grid-area: prompt;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(640px, 100%);
  min-height: 38px;
  padding: 5px 6px 5px 5px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.12);
  background: rgba(12, 19, 22, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: fd-rise 0.3s ease-out both;
}
.fd-tag {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 162, 74, 0.14);
  color: var(--holo);
  letter-spacing: 0.22em;
}
.fd-prompt.is-short .fd-tag {
  background: rgba(255, 107, 142, 0.15);
  color: #ff8fae;
}
.fd-prompt.is-recycle .fd-tag {
  background: rgba(111, 240, 214, 0.14);
  color: var(--aether);
}
.fd-prompt.is-wait .fd-tag {
  background: rgba(238, 243, 241, 0.08);
  color: rgba(238, 243, 241, 0.6);
}
.fd-prompt p {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(238, 243, 241, 0.85);
}
.fd-prompt p b {
  color: var(--vellum);
  font-weight: 600;
}
.fd-actions {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.fd-actions button {
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.2);
  background: transparent;
  color: var(--vellum);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.fd-actions button:hover {
  background: rgba(238, 243, 241, 0.08);
}
.fd-actions button.is-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #ffb46a, #f08a2c);
  color: #1a0d02;
  box-shadow: 0 4px 16px rgba(255, 162, 74, 0.35);
}

/* ---------- hand ---------- */
.fh {
  --cw: 134px;
  --ch: 212px;
  --k: 0.84;
  --step: min(
    calc(var(--cw) * var(--k) - 14px),
    calc((100% - var(--cw) * var(--k) - 28px) / max(1, var(--n) - 1))
  );
  grid-area: hand;
  position: relative;
  height: calc(var(--ch) * var(--k) + 26px);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.fh-slot {
  flex: none;
  width: var(--step);
  height: calc(var(--ch) * var(--k));
  position: relative;
  transform: translateY(calc(var(--o) * var(--o) * 1.6px))
    rotate(calc(var(--o) * 2deg));
  transform-origin: 50% 140%;
  transition: transform 0.34s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.2s;
  animation: fd-deal 0.5s var(--d) cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fh-slot:last-child {
  width: calc(var(--cw) * var(--k));
}
.fh-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--cw);
  height: var(--ch);
  transform: scale(var(--k));
  transform-origin: bottom left;
}
.fh .card-hand,
.fh .card-hand:hover:not(.locked),
.fh .card.selected {
  width: var(--cw);
  height: var(--ch);
  transform: none;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}
.fh .card::before {
  border-radius: 9px;
}
.fh .card::after {
  border-radius: 7px;
  border-color: rgba(255, 220, 180, 0.12);
}
.fh-slot:not(.is-locked):hover,
.fh-slot.is-picked {
  z-index: 20;
  transform: translateY(var(--lift, -30px)) rotate(0deg);
}
.fh-slot.is-picked .card {
  box-shadow: 0 0 0 2px var(--holo), 0 0 30px rgba(255, 162, 74, 0.45), 0 18px
    34px rgba(0, 0, 0, 0.55);
}
.fh-slot:not(.is-locked) .card::after {
  background: linear-gradient(
      115deg,
      transparent 35%,
      rgba(255, 255, 255, 0.08) 48%,
      transparent 60%
    )
    -120% 0 / 250% 100% no-repeat;
  transition: background-position 0.6s ease;
}
.fh-slot:not(.is-locked):hover .card::after {
  background-position: 120% 0;
}
.fh-slot.is-locked .card {
  filter: saturate(0.25) brightness(0.55);
}
.fh-slot.is-weapon::after {
  content: "Weapon";
  position: absolute;
  left: 50%;
  top: -16px;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.5);
}

/* ---------- left and right ---------- */
.fd-left {
  grid-area: left;
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: end;
  padding-bottom: 6px;
}
.fd-meta {
  display: grid;
  gap: 4px;
}
.fd-meta .micro {
  color: rgba(238, 243, 241, 0.6);
}
.fd-meta b {
  color: var(--vellum);
}
.fd-pips {
  display: flex;
  gap: 5px;
}
.fd-pips i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 162, 74, 0.6);
  transform: rotate(45deg);
}
.fd-pips i.on {
  background: var(--holo);
  box-shadow: 0 0 10px rgba(255, 162, 74, 0.6);
}
.fd-right {
  grid-area: right;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-self: end;
  padding-bottom: 6px;
}
.fd-tool {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 48px;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid rgba(238, 243, 241, 0.12);
  background: rgba(14, 21, 24, 0.9);
  color: rgba(238, 243, 241, 0.8);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.fd-tool:hover:not(:disabled) {
  background: rgba(238, 243, 241, 0.08);
}
.fd-tool:disabled {
  opacity: 0.35;
  cursor: default;
}
.fd-tool.is-on {
  border-color: rgba(111, 240, 214, 0.7);
  color: var(--aether);
  box-shadow: 0 0 16px rgba(111, 240, 214, 0.2);
}
.fd-end {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffb46a, #f08a2c);
  color: #1a0d02;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(255, 162, 74, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.fd-end:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255, 162, 74, 0.4);
}
.fd-end:disabled {
  filter: grayscale(1) brightness(0.5);
  box-shadow: none;
  cursor: default;
}
.fd-end small {
  opacity: 0.6;
}

@media (max-height: 820px) and (min-width: 761px) {
  .fh {
    --k: 0.68;
  }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .battle .hud-bottom.is-fight {
    padding: 0 8px calc(8px + var(--safe-b));
  }
  .fd {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "prompt prompt"
      "hand hand"
      "left right";
    gap: 6px 10px;
  }
  .fd-prompt {
    justify-self: stretch;
    border-radius: 12px;
    gap: 8px;
  }
  .fd-tag {
    padding: 5px 8px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
  .fd-prompt p {
    font-size: 12px;
  }
  .fd-actions button {
    padding: 0 11px;
  }
  .fh {
    --cw: 88px;
    --ch: 138px;
    --k: 0.9;
    height: calc(var(--ch) * var(--k) + 22px);
  }
  .fh-slot.is-weapon::after {
    display: none;
  }
  .fd-left {
    gap: 8px;
    padding-bottom: 0;
  }
  .fd-left .heat-dial,
  .fd-left .dial {
    transform: scale(0.8);
    margin: -8px;
  }
  .fd-right {
    display: flex;
    padding-bottom: 0;
  }
  .fd-tool {
    flex: none;
    width: 48px;
    min-height: 46px;
    font-size: 9px;
  }
  .fd-end {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 0 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
  }
  .fd-end small {
    display: none;
  }
}
@media (max-width: 760px) and (max-height: 700px) {
  .fh {
    --k: 0.74;
  }
  .fd-left .heat-dial,
  .fd-left .dial {
    transform: scale(0.7);
    margin: -12px;
  }
}
@media (max-height: 520px) and (min-width: 561px) {
  .battle .hud-bottom.is-fight {
    padding-bottom: calc(6px + var(--safe-b));
  }
  .fd {
    grid-template-columns: 96px minmax(0, 1fr) 236px;
    grid-template-areas:
      "left prompt right"
      "left hand right";
    align-items: end;
    gap: 4px 10px;
  }
  .fd-prompt {
    justify-self: stretch;
    max-width: none;
    animation: none;
    height: 34px;
    min-height: 0;
    padding: 3px 4px 3px 3px;
    gap: 8px;
    overflow: hidden;
  }
  .fd-tag {
    padding: 4px 9px;
  }
  .fd-prompt p {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12px;
  }
  .fd-prompt:has(.fd-actions) p {
    flex: 0 1 auto;
    max-width: 34%;
  }
  .fd-prompt:has(.fd-actions) p b + span {
    display: none;
  }
  .fd-prompt p span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fd-meter {
    display: none;
  }
  .fd-actions {
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
  }
  .fd-actions button {
    flex: none;
    min-height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }
  .fh {
    --cw: 88px;
    --ch: 138px;
    --k: 0.48;
    --lift: -6px;
    height: calc(var(--ch) * var(--k) + 10px);
  }
  .fd-left {
    justify-content: center;
    gap: 0;
  }
  .fd-left .heat-dial,
  .fd-left .dial {
    transform: scale(0.75);
    margin: -10px;
  }
  .fd-meta {
    display: none;
  }
  .fd-right {
    display: flex;
  }
  .fd-tool span {
    display: none;
  }
  .fd-tool {
    width: 44px;
    min-height: 40px;
  }
  .fd-end {
    min-height: 40px;
    font-size: 12px;
  }
  .fd-end small {
    display: none;
  }
}

@keyframes fd-deal {
  from {
    opacity: 0;
    translate: 0 60px;
  }
}
@keyframes fd-rise {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fh-slot,
  .fd-prompt {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }
}

.fd-end.is-urge {
  animation: fd-urge 1.4s ease-in-out infinite;
}
@keyframes fd-urge {
  50% {
    box-shadow: 0 0 0 3px rgba(255, 162, 74, 0.35), 0 10px 34px
      rgba(255, 162, 74, 0.55);
  }
}
.fd-prompt.is-defend {
  border-color: rgba(224, 70, 111, 0.45);
}
.fd-prompt.is-defend .fd-tag {
  background: rgba(224, 70, 111, 0.16);
  color: #ff8fae;
}
.fd-meter {
  flex: none;
  width: 90px;
  height: 8px;
  padding: 1px;
  border-radius: 4px;
  background: rgba(238, 243, 241, 0.08);
  border: 1px solid rgba(238, 243, 241, 0.12);
}
.fd-meter i {
  display: block;
  height: 100%;
  width: calc(var(--fill) * 100%);
  border-radius: 3px;
  background: linear-gradient(90deg, #7fb1e8, #9cc8ff);
  transition: width 0.3s ease;
}
.fd-meter.is-full {
  border-color: rgba(111, 240, 168, 0.6);
}
.fd-meter.is-full i {
  background: linear-gradient(90deg, #2bb57a, #6ff0a8);
}
.fd-actions button[aria-pressed="true"] {
  border-color: #9cc8ff;
  background: rgba(156, 200, 255, 0.16);
  color: var(--vellum);
}
.fd-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}
.fd-prompt.is-defend {
  flex-wrap: wrap;
  border-radius: 16px;
}
.fd-prompt.is-defend .fd-actions {
  justify-content: flex-start;
}

/* One dock height for every prompt, so the stage above never resizes. */
@media (min-height: 521px) {
  .fd-prompt,
  .fd-prompt.is-defend {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 26px 30px;
    align-content: center;
    align-items: center;
    gap: 8px 10px;
    width: min(640px, 100%);
    height: 84px;
    padding: 0 12px;
    border-radius: 14px;
    animation: none;
  }
  .fd-prompt:not(:has(.fd-actions)) {
    grid-template-rows: auto;
  }
  .fd-prompt p,
  .fd-prompt:has(.fd-actions) p {
    display: block;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fd-prompt:not(:has(.fd-actions)) p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    white-space: normal;
  }
  .fd-prompt:has(.fd-actions) p b + span {
    display: inline;
  }
  .fd-prompt p b {
    margin-right: 8px;
  }
  .fd-prompt .fd-meter {
    display: block;
    width: 64px;
  }
  .fd-prompt .fd-actions,
  .fd-prompt.is-defend .fd-actions {
    grid-column: 1 / -1;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .fd-prompt .fd-actions::-webkit-scrollbar {
    display: none;
  }
  .fd-prompt .fd-actions button {
    flex: none;
  }
}
@media (min-width: 761px) and (min-height: 521px) {
  .fd {
    grid-template-rows: 84px auto;
  }
  .fd-prompt {
    align-self: end;
  }
  .battle .hud-bottom.is-fight {
    padding-bottom: 14px;
  }
}
@media (max-width: 760px) and (min-height: 521px) {
  .fd-prompt,
  .fd-prompt.is-defend {
    width: auto;
  }
  .fd-left,
  .fd-right {
    height: 62px;
  }
  .fd-right {
    align-items: stretch;
  }
  .fd-tool,
  .fd-end {
    min-height: 0;
  }
  .fd-tool {
    width: 58px;
    padding: 6px 3px;
    letter-spacing: 0.02em;
  }
  .fd-tool span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-height: 520px) {
  .fd-prompt .fd-actions {
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .fd-prompt .fd-actions::-webkit-scrollbar {
    display: none;
  }
  .fd-prompt .fd-actions button {
    flex: none;
  }
}
/* Battle screen: a cut away from the map for one exchange. */
.battle.in-fight .hud-top,
.battle.in-fight .roster,
.battle.in-fight .inspect,
.battle.in-fight .board-labels,
.battle.in-fight .toast.enemy {
  visibility: hidden;
}

.fight-frame {
  position: absolute;
  inset: 0;
  container: fight / size;
}
.fight {
  --foe: #e0466f;
  --line: rgba(238, 243, 241, 0.12);
  --plate-min: 174px;
  --head: 86px;
  --gap: 16px;
  --fp-w: min(380px, 31cqw);
  --edge-l: max(var(--gap), 2.5cqw, var(--safe-l));
  --edge-r: max(var(--gap), 2.5cqw, var(--safe-r));
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--vellum);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  contain: strict;
  animation: fight-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.fight.is-leaving {
  animation: fight-out var(--out-for, 0.45s) var(--out-delay, 0.83s) ease-in
    both;
}
.fight-result {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  margin: 0;
  padding: 12px 28px;
  transform: translate(-50%, -50%);
  border-top: 1px solid rgba(255, 162, 74, 0.6);
  border-bottom: 1px solid rgba(255, 162, 74, 0.6);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(6, 10, 12, 0.92) 20%,
    rgba(6, 10, 12, 0.92) 80%,
    transparent
  );
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--vellum);
  animation: fight-result-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes fight-result-in {
  from {
    opacity: 0;
    letter-spacing: 0.4em;
  }
}
@container fight (max-width: 760px) {
  .fight-result {
    font-size: 13px;
    letter-spacing: 0.1em;
    padding: 10px 18px;
  }
}

/* ---------- backdrop ---------- */
.battle > canvas {
  transition: filter 0.5s ease;
}
.battle.in-fight > canvas {
  filter: blur(5px) brightness(0.72) saturate(0.9);
  transform: scale(1.04);
  transition: filter 0.6s ease, transform 0.6s ease;
}
.fight-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse 42% 60% at 28% 62%,
      color-mix(in srgb, var(--hc) 20%, transparent),
      transparent 70%
    ),
    radial-gradient(
      ellipse 42% 60% at 72% 58%,
      color-mix(in srgb, var(--foe) 18%, transparent),
      transparent 70%
    ),
    radial-gradient(
      ellipse 90% 50% at 50% 0%,
      rgba(255, 162, 74, 0.06),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(4, 8, 10, 0.78) 0%,
      rgba(4, 8, 10, 0.18) 30%,
      rgba(4, 8, 10, 0.12) 62%,
      rgba(4, 8, 10, 0.7) 100%
    );
}

/* ---------- plates ---------- */
.fp {
  position: absolute;
  top: calc(var(--gap) + var(--safe-t));
  width: var(--fp-w);
  min-height: var(--plate-min);
  padding: 12px 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: linear-gradient(
    180deg,
    rgba(16, 25, 29, 0.94),
    rgba(9, 14, 17, 0.9)
  );
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: fight-drop 0.45s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.fp.is-hero {
  left: var(--edge-l);
  --side: var(--hc);
}
.fp.is-foe {
  right: var(--edge-r);
  --side: var(--foe);
}
.fp::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--side);
  opacity: 0.45;
  transition: opacity 0.25s, box-shadow 0.25s;
}
.fp.is-active::before {
  opacity: 1;
  box-shadow: 0 0 14px var(--side);
}
.fp-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.fp.is-foe .fp-head {
  direction: rtl;
}
.fp.is-foe .fp-head > * {
  direction: ltr;
}
.fp-portrait {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--side) 65%, transparent);
  background: #0b1215;
}
.fp-portrait img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 14%;
     object-position: 50% 14%;
}
.fp-id {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.fp.is-foe .fp-id {
  text-align: right;
}
.fp-role {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--side) 70%, white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-hp {
  white-space: nowrap;
  font-size: 12px;
  color: rgba(238, 243, 241, 0.55);
}
.fp-hp b {
  font-size: 20px;
  font-weight: 600;
  color: var(--vellum);
}
.fp-hp em {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  font-style: normal;
  color: #9cc8ff;
}
.fp-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(238, 243, 241, 0.08);
  overflow: hidden;
}
.fp-bar i,
.fp-bar s {
  position: absolute;
  top: 0;
  bottom: 0;
  transition: width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), left 0.45s
    cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fp-bar i {
  left: 0;
  width: calc(var(--hp) * 100%);
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--side) 70%, black),
    var(--side)
  );
}
.fp-bar u {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--hp) * 100%);
  width: calc(var(--loss, 0) * 100%);
  background: repeating-linear-gradient(
    135deg,
    #ff6b8e 0 4px,
    rgba(255, 107, 142, 0.4) 4px 8px
  );
  transition: left 0.35s, width 0.35s;
  animation: fight-pulse 1.1s ease-in-out infinite;
}
.fp-bar s {
  left: calc((var(--hp) + var(--loss, 0)) * 100%);
  width: calc(var(--sh) * 100%);
  background: #9cc8ff;
}
.fp.is-foe .fp-bar {
  transform: scaleX(-1);
}
.fp .chips {
  max-height: 48px;
  overflow: hidden;
}
.fp.is-foe .chips {
  justify-content: flex-end;
}
.fp .chip {
  flex: none;
}

/* ---------- banner ---------- */
.fight-banner {
  position: absolute;
  top: calc(var(--gap) * 1.5 + var(--plate-h, var(--plate-min)) + var(--safe-t));
  left: 50%;
  width: min(640px, calc(100cqw - 32px));
  height: var(--head);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-content: start;
  gap: 8px;
  text-align: center;
}
.fight-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  height: 20px;
  padding: 0 14px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.85);
}
.fight-step span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: fight-swap 0.3s ease both;
}
.fight-step b {
  flex: none;
}
.fight-step em {
  font-style: normal;
  color: rgba(238, 243, 241, 0.35);
}
.fight-step b {
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(224, 70, 111, 0.55);
  color: #ff8fae;
  font-weight: 400;
  letter-spacing: 0.12em;
}
.fight-step i {
  flex: none;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.35;
  transition: opacity 0.3s, background 0.3s, box-shadow 0.3s;
}
.fight-step i.is-hero {
  color: var(--hc);
}
.fight-step i.is-foe {
  color: var(--foe);
}
.fight-banner.is-hero .fight-step i.is-hero,
.fight-banner.is-foe .fight-step i.is-foe {
  opacity: 1;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.fight-call {
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.incoming {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 7px 12px;
  text-align: left;
  color: var(--vellum);
  background: repeating-linear-gradient(
      -45deg,
      rgba(224, 70, 111, 0.16) 0 6px,
      transparent 6px 12px
    ), rgba(28, 10, 16, 0.9);
  border: 1px solid rgba(224, 70, 111, 0.75);
  border-left-width: 4px;
  border-radius: 3px;
  box-shadow: 0 0 22px rgba(224, 70, 111, 0.25);
  animation: incoming-in 0.28s ease both;
}
.incoming-tag {
  padding: 3px 7px;
  border-radius: 2px;
  color: #1a0710;
  background: #ff8fae;
  letter-spacing: 0.16em;
  animation: incoming-pulse 1.4s ease-in-out infinite;
}
.incoming-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.incoming-body strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
}
.incoming-body em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: rgba(238, 243, 241, 0.6);
}
.incoming-body small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  color: rgba(238, 243, 241, 0.78);
}
@keyframes incoming-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
}
@keyframes incoming-pulse {
  50% {
    opacity: 0.75;
  }
}
@keyframes fight-swap {
  from {
    opacity: 0;
  }
}

/* ---------- stage ---------- */
.fight-stage {
  --floor: clamp(18px, 9%, 54px);
  position: absolute;
  left: 0;
  right: 0;
  top: calc(
    var(--gap) *
    2.5 +
    var(--plate-h, var(--plate-min)) +
    var(--head) +
    var(--safe-t)
  );
  bottom: calc(var(--dock-h, 180px) + 4px);
}
.fight-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--floor);
  pointer-events: none;
}
.fight-slot {
  position: absolute;
  bottom: calc(var(--floor) + var(--lift));
  width: var(--size);
  height: var(--size);
  transition: bottom 0.35s ease, left var(--glide, 0ms) ease-in-out;
}
.fight-slot.is-hero {
  left: calc((0.5 - var(--spread, 0.2)) * 100% - var(--size) / 2);
  animation: fight-enter-l 0.55s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.fight-slot.is-foe {
  left: calc((0.5 + var(--spread, 0.2)) * 100% - var(--size) / 2);
  animation: fight-enter-r 0.55s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.fight-assist {
  position: absolute;
  bottom: var(--floor);
  width: var(--size);
  height: var(--size);
  pointer-events: none;
  animation: fight-assist-in 0.22s ease-out both;
}
.fight-assist.is-hero {
  left: max(0px, calc((0.5 - var(--spread, 0.2)) * 100% - var(--size) * 1.7));
}
.fight-assist.is-foe {
  left: min(
    calc(100% - var(--size)),
    calc((0.5 + var(--spread, 0.2)) * 100% + var(--size) * 0.7)
  );
}
.fight-assist-name {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  padding: 2px 7px;
  font-family: var(--label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--vellum);
  background: rgba(12, 10, 24, 0.82);
  border: 1px solid var(--hair);
}
@keyframes fight-assist-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
}
.fight-fig {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.fight-fig:not(:disabled) {
  cursor: pointer;
}
.fight-disc {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: -5%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(0, 0, 0, 0.6),
    rgba(0, 0, 0, 0.2) 70%,
    transparent
  );
}
.fight-slot.is-active .fight-disc {
  box-shadow: inset 0 0 0 1px rgba(255, 162, 74, 0.75), 0 0 18px
    rgba(255, 162, 74, 0.3);
}
.fight-fig.is-aimed .fight-disc {
  box-shadow: inset 0 0 0 2px rgba(255, 162, 74, 0.95), 0 0 26px
    rgba(255, 162, 74, 0.45);
  animation: fight-pulse 1.1s ease-in-out infinite;
}
.fight-sprite {
  position: absolute;
  left: -50%;
  bottom: 0;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background-image: var(--sheet);
  background-size: var(--grid);
  background-position: 0 var(--row);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transform: scaleX(var(--flip));
}
.fight-sprite.is-loop {
  animation: fight-frames var(--dur) steps(var(--steps), jump-end) infinite;
}
.fight-slot.is-hero .fight-fig.is-attack {
  animation: fight-lunge-r 0.42s ease-out;
}
.fight-slot.is-foe .fight-fig.is-attack {
  animation: fight-lunge-l 0.42s ease-out;
}
.fight-fig.is-hit {
  animation: fight-shake 0.3s linear;
}
.fight-fig.is-hit .fight-sprite {
  filter: brightness(1.8) sepia(1) hue-rotate(-50deg) saturate(4);
}
.fight-aim {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 162, 74, 0.8);
  background: rgba(22, 13, 4, 0.92);
  color: var(--holo);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  animation: fight-aim-in 0.25s ease-out both;
}
.fight-aim b {
  font-size: 13px;
  font-weight: 600;
}
.fight-pop {
  position: absolute;
  top: 22%;
  left: 50%;
  font-size: 40px;
  font-weight: 700;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.6);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  animation: fight-pop 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.fight-pop.is-dmg {
  color: #ff6b8e;
}
.fight-pop.is-heal {
  color: #6ff0a8;
}
.fight-pop.is-guard {
  color: #9cc8ff;
  font-size: 24px;
}
.fight-pop.is-info {
  color: rgba(238, 243, 241, 0.85);
  font-size: 24px;
}

/* ---------- phones ---------- */
@container fight (max-width: 760px) {
  .fight {
    --plate-min: 112px;
    --gap: 8px;
    --fp-w: calc(50cqw - 12px);
    --edge-l: 8px;
    --edge-r: 8px;
  }
  .fp {
    padding: 8px 9px;
    gap: 6px;
    border-radius: 5px;
  }
  .fp-head {
    gap: 4px 7px;
  }
  .fp-id {
    display: contents;
  }
  .fp-role {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .fp-portrait {
    grid-row: 2;
  }
  .fp-name {
    grid-column: 2;
    grid-row: 2;
  }
  .fp-hp {
    grid-row: 2;
  }
  .fp-id .focus-pips {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .fp.is-foe .fp-role,
  .fp.is-foe .fp-name {
    text-align: right;
  }
  .fp .chips {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .fp .chips::-webkit-scrollbar {
    display: none;
  }
  .fp-portrait {
    width: 30px;
    height: 30px;
  }
  .fp-role {
    font-size: 8.5px;
    letter-spacing: 0.02em;
    line-height: 1.15;
    text-transform: none;
  }
  .fp-name {
    font-size: 12.5px;
    letter-spacing: 0.04em;
  }
  .fp-hp b {
    font-size: 14px;
  }
  .fp-hp small {
    font-size: 10px;
  }
  .fp .chip-label {
    display: none;
  }
  .fp .chip {
    padding: 0 5px;
    gap: 3px;
  }
  .fp .chip-note {
    display: none;
  }
  .fight-banner {
    gap: 4px;
  }
  .fight-step {
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .fight-slot.is-hero {
    left: calc(27% - var(--size) / 2);
  }
  .fight-slot.is-foe {
    left: calc(73% - var(--size) / 2);
  }
  .fight-pop {
    font-size: 30px;
  }
}
@container fight (max-width: 760px) and (max-height: 700px) {
  .fight {
    --plate-min: 86px;
    --head: 70px;
  }
  .fp-effects {
    display: none;
  }
}
@container fight (max-height: 520px) {
  .fight {
    --plate-min: 72px;
    --gap: 8px;
    --fp-w: min(280px, 27cqw);
    --edge-l: max(var(--gap), 2.5cqw, var(--safe-l));
    --edge-r: max(var(--gap), 2.5cqw, var(--safe-r));
  }
  .fp-role {
    letter-spacing: 0.02em;
    text-transform: none;
  }
  .fp-effects {
    display: none;
  }
  .fp {
    grid-template-columns: minmax(40px, 1fr) auto;
    align-items: center;
    min-height: 0;
    padding: 7px 9px;
    gap: 5px 8px;
  }
  .fp-head {
    grid-column: 1 / -1;
  }
  .fp-stats {
    flex-wrap: nowrap;
    max-height: none;
  }
  .fp-portrait {
    width: 28px;
    height: 28px;
  }
  .fp-name {
    font-size: 13px;
  }
  .fp-stats .chip-label {
    display: none;
  }
  .fight {
    --head: 64px;
  }
  .fight-banner {
    top: calc(var(--gap) + var(--safe-t));
    width: calc(
      100cqw -
      2 *
      (var(--fp-w) + max(var(--edge-l), var(--edge-r))) -
      16px
    );
    gap: 4px;
  }
  .action-call.in-fight {
    height: 30px;
    margin-bottom: 4px;
  }
  .fight-slot.is-hero {
    left: max(
      calc(var(--edge-l) + var(--fp-w) + 4px),
      calc((0.5 - var(--spread, 0.2)) * 100% - var(--size) / 2)
    );
  }
  .fight-slot.is-foe {
    left: min(
      calc(100% - var(--edge-r) - var(--fp-w) - 4px - var(--size)),
      calc((0.5 + var(--spread, 0.2)) * 100% - var(--size) / 2)
    );
  }
  .action-call.in-fight strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fight-step em,
  .fight-step em + span,
  .fight-step b {
    display: none;
  }
  .fight-stage {
    top: calc(
      var(--gap) *
      2 +
      max(var(--plate-h, var(--plate-min)), var(--head)) +
      var(--safe-t)
    );
  }
}

/* ---------- motion ---------- */
@keyframes fight-in {
  from {
    clip-path: polygon(0 0, 0 0, -20% 100%, 0 100%);
  }
  to {
    clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%);
  }
}
@keyframes fight-out {
  to {
    opacity: 0;
  }
}
@keyframes fight-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
@keyframes fight-aim-in {
  from {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
}
@keyframes fight-drop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes fight-enter-l {
  from {
    opacity: 0;
    transform: translateX(-10cqw);
  }
}
@keyframes fight-enter-r {
  from {
    opacity: 0;
    transform: translateX(10cqw);
  }
}
@keyframes fight-frames {
  from {
    background-position-x: 0%;
  }
  to {
    background-position-x: var(--end);
  }
}
@keyframes fight-lunge-r {
  40% {
    transform: translateX(14%);
  }
}
@keyframes fight-lunge-l {
  40% {
    transform: translateX(-14%);
  }
}
@keyframes fight-shake {
  25% {
    transform: translateX(-3%);
  }
  50% {
    transform: translateX(3%);
  }
  75% {
    transform: translateX(-1.5%);
  }
}
@keyframes fight-pulse {
  50% {
    opacity: 0.55;
  }
}
@keyframes fight-pop {
  from {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.8);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -46px) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fight,
  .fight-slot,
  .fp,
  .fight-pop,
  .fight-aim {
    animation-duration: 0.01s !important;
  }
}

.battle.in-fight .toast {
  top: auto;
  bottom: calc(var(--dock-h, 200px) + 64px);
}

.fp-form {
  margin-left: 8px;
  padding: 1px 6px;
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #0b1518;
  background: var(--fc);
  box-shadow: 0 0 12px color-mix(in srgb, var(--fc) 70%, transparent);
}

/* ---------- statuses under each fighter ---------- */
.fight-status {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  z-index: 3;
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  transform: translateX(-50%);
}
.fight-status .chip {
  height: 20px;
  padding: 0 5px;
  background: rgba(10, 14, 18, 0.88);
}
.fight-status .chip-label,
.fight-status .chip-note {
  display: none;
}

/* ---------- plate chips never clip ---------- */
.fp .chips {
  flex-wrap: nowrap;
  max-height: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.fp .chips::-webkit-scrollbar {
  display: none;
}
.fp-kit {
  display: contents;
}
.fp-kit .chip-label,
.fp-kit .chip-note {
  display: none;
}

.fight-shots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.fight-bolt,
.fight-beam,
.fight-impact {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}
.fight-bolt {
  width: 34px;
  height: 8px;
  margin: -4px 0 0 -30px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--shot) 55%, #fff);
  box-shadow: 0 0 10px var(--shot), 0 0 22px var(--shot);
  transform-origin: 30px 4px;
}
.fight-beam {
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff, var(--shot));
  box-shadow: 0 0 12px var(--shot), 0 0 28px var(--shot);
  transform-origin: 0 3px;
}
.fight-impact {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff 0 18%,
    var(--shot) 40%,
    transparent 70%
  );
  mix-blend-mode: screen;
}
.fight-shot-art {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  translate: -50% -50%;
  image-rendering: pixelated;
  max-width: none;
}
.fight-turn {
  position: absolute;
  left: 0;
  top: 0;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(
    circle,
    #000 0 38%,
    #1b0f33 50%,
    #d8ccff 58%,
    rgba(167, 139, 250, 0.4) 66%,
    transparent 74%
  );
}
/* Battle HUD: notched plates, hairlines, amber brackets, portrait art. */
.battle {
  --plate: linear-gradient(180deg, rgba(12, 26, 29, 0.94), rgba(6, 14, 16, 0.9));
  --hair: rgba(238, 243, 241, 0.13);
  --cut: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
  --cut-sm: polygon(
    0 0,
    calc(100% - 6px) 0,
    100% 6px,
    100% 100%,
    6px 100%,
    0 calc(100% - 6px)
  );
  --label: "Chakra Petch", "Space Grotesk Variable", sans-serif;
  --ink-text: #0b1518;
}

.battle .micro {
  font-family: var(--label);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.battle .num {
  font-family: var(--label);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.battle .jade {
  color: var(--aether);
}

.battle .plate {
  position: relative;
  background: var(--plate);
  border: 1px solid var(--hair);
  clip-path: var(--cut);
}
.battle .plate::before,
.battle .plate::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
}
.battle .plate::before {
  top: 3px;
  left: 3px;
  border-top: 1px solid var(--holo);
  border-left: 1px solid var(--holo);
}
.battle .plate::after {
  right: 3px;
  bottom: 3px;
  border-right: 1px solid var(--holo);
  border-bottom: 1px solid var(--holo);
}

/* ---------- top ---------- */
.battle .hud-top {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: 16px;
  right: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
  pointer-events: none;
}
.battle .hud-top > * {
  pointer-events: auto;
}
.hud-round {
  display: flex;
  gap: 6px;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
}
.battle .hud-left {
  min-width: 0;
}
.round-plate {
  min-width: 0;
}
.round-plate .micro {
  flex: none;
  white-space: nowrap;
}
.round-plate .round-rule + .micro {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-sq {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--vellum);
  background: var(--plate);
  border: 1px solid var(--hair);
  clip-path: var(--cut-sm);
}
.hud-sq:hover {
  color: var(--holo);
}
.round-plate {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 14px;
}
.round-plate .big {
  font-size: 24px;
  line-height: 1;
  color: var(--vellum);
}
.round-plate .par.over {
  color: var(--rift);
}
.round-rule {
  width: 1px;
  height: 18px;
  background: var(--hair);
}
.round-pips {
  display: flex;
  align-items: center;
  gap: 3px;
}
.round-pips i {
  width: 4px;
  height: 11px;
  transform: skewX(-20deg);
  background: var(--rift);
  box-shadow: 0 0 6px rgba(214, 64, 106, 0.6);
}
.round-pips .num {
  margin-left: 6px;
  font-size: 15px;
  color: var(--vellum);
}

.rail {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0 0 16px;
  list-style: none;
  max-width: 50vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail-token {
  position: relative;
  flex: none;
  width: 30px;
  height: 40px;
  background: #0b1a1d;
  border-bottom: 2px solid var(--tc);
  clip-path: var(--cut-sm);
  transition: width 0.25s, height 0.25s, opacity 0.25s;
}
.rail-token img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
}
.rail-token.enemy {
  background: #1a0b11;
}
.rail-token.done {
  opacity: 0.32;
  filter: grayscale(0.8);
}
.rail-token.active {
  width: 42px;
  height: 56px;
  border-bottom: 3px solid var(--holo);
  clip-path: none;
  outline: 1px solid var(--holo);
  outline-offset: 1px;
}
.rail-now {
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  color: var(--holo) !important;
  font-size: 8.5px !important;
}
.rail-token.unseen {
  width: 24px;
  opacity: 0.75;
}
.rail-unknown small {
  font-size: 8px;
  margin-left: 1px;
}
.rail-unknown {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--label);
  font-weight: 700;
  color: var(--tc);
}

.tools-plate {
  display: flex;
  justify-self: end;
  padding: 0 4px;
}
.battle .tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 40px;
  height: 40px;
  color: rgba(238, 243, 241, 0.8);
  background: transparent;
  border: 0;
}
.battle .tool + .tool {
  border-left: 1px solid var(--hair);
}
.battle .tool .micro {
  font-size: 7.5px;
}
.battle .tool:hover:not(:disabled) {
  color: var(--holo);
}
.battle .tool.on {
  color: var(--holo);
}
.tools-plate .tool.on {
  color: var(--rift);
}
.battle .tool:disabled {
  opacity: 0.3;
}

/* ---------- squad roster ---------- */
.roster {
  position: absolute;
  left: 16px;
  top: calc(84px + var(--safe-t));
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roster-slot {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 9px;
  width: 190px;
  height: 54px;
  padding: 0 10px 0 0;
  text-align: left;
  background: var(--plate);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--hc);
  clip-path: var(--cut-sm);
  transition: transform 0.2s;
}
.roster-slot img {
  width: 44px;
  height: 52px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 14%;
     object-position: 50% 14%;
}
.roster-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.roster-role {
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--mute);
}
.roster-caption {
  align-self: center;
  display: grid;
  gap: 1px;
  margin-left: 4px;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--vellum);
  text-shadow: 0 1px 3px #000;
}
.roster-caption b {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.roster-meta .micro {
  color: var(--vellum);
}
.roster-slot.active {
  transform: translateX(8px);
  border-color: var(--holo);
  border-left-color: var(--hc);
}
.roster-slot.down {
  opacity: 0.4;
  filter: grayscale(1);
}
.roster-slot:hover:not(.down) {
  transform: translateX(8px);
}
.roster-status {
  position: absolute;
  right: 8px;
  top: 6px;
  display: flex;
  gap: 3px;
}
.roster-status i {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
}

.battle .hp {
  display: flex;
  align-items: center;
  gap: 2px;
}
.battle .hp i {
  width: 6px;
  height: 6px;
  transform: skewX(-20deg);
  background: rgba(238, 243, 241, 0.12);
}
.battle .hp i.on {
  background: #bff5e6;
  box-shadow: 0 0 4px rgba(191, 245, 230, 0.4);
}
.battle .hp i.half {
  background: linear-gradient(90deg, #bff5e6 50%, rgba(238, 243, 241, 0.12) 50%);
}
.hp-shield {
  margin-left: 4px;
  font-family: var(--label);
  font-size: 10px;
  color: #9cc8ff;
}

/* ---------- bottom ---------- */
.battle .hud-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(12px + var(--safe-b));
  display: grid;
  grid-template-columns: minmax(320px, 380px) 1fr minmax(250px, 290px);
  align-items: end;
  gap: 16px;
  pointer-events: none;
}
.battle .hud-bottom > * {
  pointer-events: auto;
}

.hh-plate {
  display: flex;
  align-items: flex-end;
}
.hh-portrait {
  position: relative;
  z-index: 2;
  flex: none;
  width: 104px;
  height: 140px;
  margin-right: -12px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hc) 30%, #0b1a1d),
    #071012
  );
  border-bottom: 3px solid var(--hc);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
}
.hh-portrait img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 10%;
     object-position: 50% 10%;
}
.hh-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 12px 24px;
}
.hh-name {
  font-family: var(--label);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vellum);
}
.hh-hp {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hh-hp .num {
  font-size: 15px;
  color: var(--vellum);
}
.hh-hp small {
  font-size: 11px;
  color: var(--mute);
}
.hh-stats {
  display: flex;
  gap: 14px;
  margin: 2px 0 0;
}
.hh-stats div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hh-stats dd {
  margin: 0;
  font-size: 13px;
  color: var(--vellum);
}
.hh-stats .dim {
  opacity: 0.45;
}
.hh-stats .warn dd,
.hh-stats .warn dt {
  color: #fb7185;
}
.hh-stats .hot dd {
  color: var(--holo);
}
.hh-passive {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: #aebbb8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hh-passive b {
  color: var(--hc);
  font-weight: 600;
}
.hh-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hh-status li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 6px;
  font-family: var(--label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc);
  background: rgba(238, 243, 241, 0.05);
  border-left: 2px solid var(--sc);
}
.enemy-phase {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
}
.enemy-phase strong {
  font-family: var(--label);
  font-size: 16px;
  font-weight: 600;
  color: var(--rift);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.battle .hud-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  pointer-events: none;
}
.battle .hud-hand > * {
  pointer-events: auto;
}
.battle .hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 18px;
}
.fan-slot {
  position: relative;
  margin: 0 -14px;
  transform-origin: 50% 170%;
  transform: translateY(var(--drop)) rotate(var(--rot));
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.battle .fan-slot .card-hand {
  transform: none;
}
.fan-slot.picked {
  transform: none;
}
.battle .fan-slot.picked .card-hand {
  transform: translateY(-16px);
  box-shadow: 0 0 0 1px var(--holo), 0 0 26px rgba(255, 162, 74, 0.45), 0 16px
    30px rgba(0, 0, 0, 0.5);
}
@media (hover: hover) {
  .fan-slot:hover {
    z-index: 40 !important;
    transform: none;
  }
  .battle .fan-slot:hover .card-hand:not(.locked),
  .battle .fan-slot .card-hand:hover:not(.locked) {
    transform: translateY(-12px);
  }
}

.hand-side {
  position: relative;
  flex: none;
}
.hand-side.weapon {
  margin-right: 34px;
  padding-right: 16px;
}
.hand-side.cache {
  margin-left: 34px;
  padding-left: 16px;
}
.hand-side::before {
  content: "";
  position: absolute;
  top: 40%;
  bottom: 0;
  border-left: 2px dashed rgba(238, 243, 241, 0.25);
}
.hand-side.weapon::before {
  right: 0;
}
.hand-side.cache::before {
  left: 0;
  border-color: rgba(94, 231, 255, 0.6);
}
.battle .hand-side .card-hand {
  transform: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.battle .hand-side.picked .card-hand {
  transform: translateY(-16px);
}
@media (hover: hover) {
  .battle .hand-side .card-hand:hover:not(.locked) {
    transform: translateY(-12px);
  }
}

.readout {
  display: flex;
  align-items: stretch;
  gap: 12px;
  max-width: min(100%, 600px);
  min-height: 38px;
  padding-right: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 162, 74, 0.14),
    rgba(8, 19, 22, 0.9) 34%
  );
  border: 1px solid rgba(255, 162, 74, 0.32);
  clip-path: var(--cut-sm);
}
.readout.wide {
  width: min(100%, 600px);
}
.readout-tag {
  display: grid;
  place-items: center;
  padding: 0 10px;
  color: var(--ink-text) !important;
  background: var(--holo);
}
.readout-body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 6px 0;
  font-size: 13px;
  color: #d9dfdc;
}
.readout-title {
  font-family: var(--label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vellum);
}
.readout-tagline {
  color: #ff6fae;
}
.readout .mute {
  color: var(--mute);
}
.readout .note {
  color: #fde68a;
}
.readout .hit {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--rift);
}
.readout .hit.ally {
  color: var(--aether);
}
.readout .hit i {
  font-style: normal;
  color: var(--mute);
}
.readout .hit b {
  color: var(--vellum);
}
.readout .hit em {
  font-family: var(--label);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8fab;
}
.readout-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.readout-slot {
  height: 0;
}
.hud-hand.lifted .readout {
  margin-bottom: 92px;
}
.hud-btn {
  height: 28px;
  padding: 0 12px;
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vellum);
  background: transparent;
  border: 1px solid rgba(238, 243, 241, 0.25);
  clip-path: var(--cut-sm);
}
.hud-btn:hover {
  color: var(--holo);
  border-color: var(--holo);
}
.hud-btn.primary {
  color: var(--ink-text);
  background: var(--holo);
  border-color: var(--holo);
}

.turn-cluster {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.turn-top {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}
.actions-plate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 6px 4px 12px;
}
.diamonds {
  display: flex;
  gap: 6px;
  height: 14px;
  align-items: center;
}
.diamonds i {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border: 1px solid var(--holo);
}
.diamonds i.on {
  background: var(--holo);
  box-shadow: 0 0 8px rgba(255, 162, 74, 0.7);
}
.tool-row {
  display: flex;
  margin-left: -6px;
}
.tool-row .tool {
  width: 34px;
  height: 34px;
}
.dial {
  position: relative;
  flex: none;
  width: 96px;
  height: 96px;
  cursor: help;
}
.dial svg {
  position: absolute;
  inset: 0;
}
.dial .od {
  fill: none;
  stroke: rgba(185, 166, 232, 0.2);
  stroke-width: 5;
}
.dial .od.on {
  stroke: var(--heroic);
  filter: drop-shadow(0 0 4px rgba(185, 166, 232, 0.7));
}
.heat-dial {
  --glow: #ff8a5c;
  position: relative;
  flex: none;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  background: none;
  color: #ffd2b8;
  cursor: help;
}
.heat-dial svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.heat-dial .hd-halo {
  fill: none;
  stroke: var(--glow);
  stroke-width: 1;
  opacity: 0.12;
}
.heat-dial .hd-seg {
  fill: none;
  stroke: rgba(255, 138, 92, 0.16);
  stroke-width: 6;
  transition: stroke 0.25s, filter 0.25s;
}
.heat-dial .hd-seg.on {
  stroke: #ff8a5c;
  filter: drop-shadow(0 0 5px rgba(255, 138, 92, 0.8));
}
.heat-dial .hd-core {
  fill: rgba(22, 10, 8, 0.94);
  stroke: rgba(255, 138, 92, 0.45);
  stroke-width: 1.2;
}
.hd-face {
  position: absolute;
  inset: 22px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  align-content: center;
  gap: 1px;
  text-align: center;
  pointer-events: none;
}
.hd-face b,
.hd-face .micro {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.hd-face svg {
  position: static;
  color: #ff8a5c;
}
.hd-face b {
  font-size: 18px;
  line-height: 1;
  color: #ffe2d2;
  text-shadow: 0 0 10px rgba(255, 138, 92, 0.6);
}
.hd-face .micro {
  font-size: 6.5px !important;
  letter-spacing: 0.14em;
  color: #ffb594 !important;
  white-space: nowrap;
}
.heat-dial.is-ready {
  cursor: pointer;
}
.heat-dial.is-ready .hd-halo {
  opacity: 0.6;
  stroke-width: 2;
  animation: hd-breathe 1.2s ease-in-out infinite;
}
.heat-dial.is-ready .hd-core {
  fill: #ff8a5c;
  stroke: #ffd2b8;
  animation: hd-core 1.2s ease-in-out infinite;
}
.heat-dial.is-ready .hd-face svg,
.heat-dial.is-ready .hd-face b,
.heat-dial.is-ready .hd-face .micro {
  color: #1a0904 !important;
  text-shadow: none;
}
.heat-dial.is-ready .hd-face b {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.heat-dial.is-ready[aria-disabled="true"] {
  cursor: help;
}
.heat-dial.is-ready:not([aria-disabled="true"]):hover .hd-core {
  fill: #ffb08a;
}
.heat-dial.is-boosted .hd-seg {
  stroke: rgba(255, 70, 70, 0.18);
}
.heat-dial.is-boosted .hd-seg.on {
  stroke: #ff4d4d;
  filter: drop-shadow(0 0 6px rgba(255, 77, 77, 0.9));
}
.heat-dial.is-boosted .hd-halo {
  opacity: 0.55;
  stroke-width: 3;
  animation: hd-flicker 2.4s steps(6) infinite;
}
.heat-dial.is-boosted .hd-core {
  stroke: var(--glow);
  stroke-width: 2;
}
.heat-dial.is-boosted .hd-face b {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glow);
  text-shadow: 0 0 10px var(--glow);
}
@keyframes hd-breathe {
  50% {
    opacity: 1;
    stroke-width: 4;
  }
}
@keyframes hd-core {
  50% {
    fill: #ffb08a;
  }
}
@keyframes hd-flicker {
  0%,
  100% {
    opacity: 0.55;
  }
  33% {
    opacity: 0.85;
  }
  66% {
    opacity: 0.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  .heat-dial .hd-halo,
  .heat-dial .hd-core {
    animation: none !important;
  }
}
.dial-core {
  fill: rgba(7, 16, 18, 0.94);
  stroke: rgba(111, 240, 214, 0.55);
  stroke-width: 1.2;
}
.dial b {
  position: absolute;
  left: 0;
  right: 0;
  top: 27px;
  text-align: center;
  font-size: 30px;
  line-height: 1;
  color: var(--aether);
  text-shadow: 0 0 12px rgba(111, 240, 214, 0.55);
}
.dial .micro {
  position: absolute;
  left: 0;
  right: 0;
  top: 58px;
  text-align: center;
  font-size: 7.5px !important;
  color: #a8f5e6 !important;
}
.memory-plate {
  display: grid;
  gap: 6px;
  padding: 8px 12px 8px;
}
.mem-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.mem-head b {
  font-size: 15px;
  color: var(--holo);
}
.memory-plate.over .mem-head b,
.memory-plate.over .mem-head .micro {
  color: #fb7185 !important;
}
.mem-cells {
  display: flex;
  gap: 3px;
}
.mem-cells i {
  flex: 1;
  min-width: 6px;
  height: 9px;
  border: 1px solid rgba(255, 162, 74, 0.45);
  transform: skewX(-18deg);
}
.mem-cells i.on {
  background: var(--holo);
  box-shadow: 0 0 6px rgba(255, 162, 74, 0.55);
}
.mem-cells i.room {
  border-style: dashed;
  border-color: rgba(111, 240, 214, 0.7);
}
.mem-cells i.spill {
  border-color: #fb7185;
  background: #fb7185;
  box-shadow: 0 0 8px rgba(251, 113, 133, 0.7);
}
.mem-room {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mem-room .micro {
  flex: 1;
}
.mem-room b {
  min-width: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--aether);
}
.mem-room button {
  width: 22px;
  height: 22px;
  line-height: 1;
  color: var(--ink-text, #e6f1ef);
  background: rgba(111, 240, 214, 0.08);
  border: 1px solid rgba(111, 240, 214, 0.35);
}
.mem-room button:disabled {
  opacity: 0.3;
}
.battle .end-turn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px 0 28px;
  font-family: var(--label);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-text);
  background: linear-gradient(100deg, #eef3f1, #cfeee6);
  border: 0;
  clip-path: var(--cut);
  transition: filter 0.2s;
}
.battle .end-turn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: repeating-linear-gradient(-45deg, #f2d14b 0 5px, #0b1518 5px 10px);
}
.battle .end-turn .micro {
  color: #2a4448;
}
.battle .end-turn:hover:not(:disabled) {
  filter: brightness(1.08) drop-shadow(0 0 12px rgba(111, 240, 214, 0.45));
}
.battle .end-turn:disabled {
  opacity: 0.35;
  filter: grayscale(1);
}

/* ---------- floating ---------- */
.battle .toast {
  position: absolute;
  left: 50%;
  top: calc(96px + var(--safe-t));
  transform: translateX(-50%);
  padding: 7px 16px;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}
.battle .toast.enemy {
  color: var(--rift);
}
.battle .inspect {
  position: absolute;
  right: 16px;
  top: calc(64px + var(--safe-t));
  width: 250px;
  max-height: calc(100vh - 360px);
  max-height: calc(100dvh - 360px);
  overflow-y: auto;
  padding: 12px;
  font-size: 12.5px;
}
.battle .inspect.hover {
  pointer-events: none;
  max-height: 46vh;
  max-height: 46dvh;
  opacity: 0.94;
}
.battle .card-peek {
  position: absolute;
  left: 200px;
  bottom: calc(190px + var(--safe-b));
  z-index: 20;
  scroll-margin: var(--safe-t) var(--safe-r, 0px) var(--safe-b)
    var(--safe-l, 0px);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transform: translate(var(--peek-dx, 0px), var(--peek-dy, 0px))
    scale(var(--peek-k, 1));
  transform-origin: bottom left;
  animation: peek-in 0.14s ease-out;
}
@media (min-width: 761px) and (min-height: 521px) {
  .battle.in-fight .card-peek {
    left: max(16px, var(--safe-l));
    bottom: calc(var(--dock-h, 240px) + 8px);
  }
}
.battle .card-peek.raised {
  bottom: auto;
  top: calc(84px + var(--safe-t));
  left: auto;
  right: 16px;
  z-index: 40;
  align-items: flex-start;
  transform-origin: top right;
}
.battle .peek-glossary {
  width: 220px;
  margin: 0;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.4;
}
.battle .peek-glossary dt {
  font-family: var(--label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.battle .peek-glossary dd {
  margin: 0;
  color: #c9d2cf;
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .battle .hud-top {
    left: 6px;
    right: 6px;
    top: calc(6px + var(--safe-t));
    grid-template-columns: 1fr auto;
    gap: 6px;
  }
  .battle .rail {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    padding-bottom: 14px;
  }
  .round-pips i,
  .round-rule,
  .round-plate > .micro:first-child {
    display: none;
  }
  .round-pips .num {
    margin-left: 0;
    color: var(--rift);
  }
  .round-plate {
    height: 36px;
    padding: 0 10px;
    gap: 7px;
  }
  .hud-sq {
    width: 36px;
    height: 36px;
  }
  .battle .tool {
    width: 30px;
    height: 36px;
  }
  .tools-plate {
    padding: 0 2px;
  }
  .battle .tool .micro {
    display: none;
  }
  .battle .hud-bottom {
    left: 6px;
    right: 6px;
    bottom: calc(6px + var(--safe-b));
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "unit turn"
      "hand hand";
    gap: 6px;
  }
  .battle .hud-unit {
    grid-area: unit;
    min-width: 0;
  }
  .battle .hud-turn {
    grid-area: turn;
  }
  .battle .hud-hand {
    grid-area: hand;
    align-items: stretch;
    gap: 6px;
  }
  .hh-portrait {
    width: 50px;
    height: 66px;
    margin-right: -8px;
  }
  .hh-info {
    padding: 6px 8px 7px 14px;
    gap: 4px;
  }
  .hh-name {
    font-size: 15px;
  }
  .hh-stats,
  .hh-passive,
  .hh-status {
    display: none;
  }
  .hh-info > .micro {
    font-size: 9px;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
  }
  .turn-cluster {
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
  }
  .actions-plate {
    display: none;
  }
  .memory-plate {
    padding: 6px 8px;
    gap: 4px;
  }
  .mem-room .micro {
    display: none;
  }
  .dial {
    width: 66px;
    height: 66px;
  }
  .dial b {
    top: 19px;
    font-size: 21px;
  }
  .dial .micro {
    display: none;
  }
  .heat-dial {
    width: 66px;
    height: 66px;
  }
  .hd-face {
    inset: 15px;
  }
  .hd-face .micro {
    display: none;
  }
  .battle .end-turn {
    height: auto;
    padding: 0 12px 0 20px;
    font-size: 13px;
  }
  .battle .end-turn .micro {
    display: none;
  }
  .battle .hand {
    height: 110px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 0;
    scrollbar-width: none;
  }
  .fan-slot {
    margin: 0 2px;
  }
  .hand-side.weapon {
    margin-right: 8px;
    padding-right: 8px;
  }
  .hand-side.cache {
    margin-left: 8px;
    padding-left: 8px;
  }
  .battle .fan-slot .card-hand,
  .battle .hand-side .card-hand {
    transform: translateY(22%);
  }
  .hand-side::before {
    top: 22%;
  }
  .hud-hand.lifted .readout {
    margin-bottom: 30px;
  }
  .readout,
  .readout.wide {
    width: 100%;
    max-width: none;
  }
  .battle .inspect {
    left: 6px;
    right: 6px;
    top: auto;
    bottom: calc(230px + var(--safe-b));
    width: auto;
    max-height: 36vh;
    max-height: 36dvh;
  }
  .battle .toast {
    top: calc(96px + var(--safe-t));
    max-width: calc(100vw - 24px);
    white-space: normal;
    text-align: center;
  }
  .battle .card-peek {
    left: 6px;
    bottom: calc(230px + var(--safe-b));
  }
}

.roster-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.roster-hand {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 30px;
  padding: 0 6px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  color: var(--vellum);
  background: var(--plate);
  border: 1px solid var(--hair);
  clip-path: var(--cut-sm);
}
.roster-hand[aria-pressed="true"] {
  border-color: var(--holo);
  color: var(--holo);
}

.hand-view {
  position: absolute;
  z-index: 25;
  left: 258px;
  top: calc(84px + var(--safe-t));
  display: grid;
  gap: 10px;
  max-width: min(760px, calc(100vw - 260px));
  padding: 12px 14px 14px;
  border-left: 3px solid var(--hc) !important;
}
.hand-view header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hand-view header img {
  width: 40px;
  height: 40px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  clip-path: var(--cut-sm);
}
.hand-view header > div {
  display: grid;
  flex: 1;
  min-width: 0;
}
.hand-view header strong {
  font-family: var(--label);
  font-size: 16px;
  color: var(--hc);
}
.hv-counts {
  color: var(--mute);
}
.hv-warn {
  color: #fb7185;
}
.hv-cards {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.hv-group {
  display: grid;
  align-content: start;
  gap: 4px;
}
.hv-row {
  display: flex;
  gap: 6px;
}
.hand-view .card {
  zoom: 0.78;
}
.hv-empty {
  font-size: 13px;
  color: var(--mute);
}
.card.mark-spent {
  --mark: #94a3b8;
  opacity: 0.55;
}

@media (max-width: 760px), (max-height: 520px) {
  .roster.compact {
    left: 6px;
    top: calc(118px + var(--safe-t));
    flex-direction: row;
    gap: 4px;
  }
  .roster.compact .roster-slot {
    display: none;
  }
  .roster.compact .roster-hand {
    min-width: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    overflow: hidden;
  }
  .roster.compact .roster-hand img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    -o-object-position: top;
       object-position: top;
    opacity: 0.55;
  }
  .roster.compact .roster-hand span {
    position: relative;
    text-shadow: 0 1px 3px #000;
  }
  .hand-view {
    left: 6px;
    right: 6px;
    top: calc(170px + var(--safe-t));
    max-width: none;
  }
  .hand-view .card {
    zoom: 0.62;
  }
}

.roster-slot.boosted,
.hh-plate.boosted .hh-portrait {
  border-color: var(--fc);
  animation: form-pulse 1.4s ease-in-out infinite;
}
.hh-form {
  margin-left: 8px;
  padding: 1px 6px;
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #0b1518;
  background: var(--fc);
  box-shadow: 0 0 12px color-mix(in srgb, var(--fc) 70%, transparent);
}
@keyframes form-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px var(--fc), 0 0 10px
      color-mix(in srgb, var(--fc) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 1px var(--fc), 0 0 22px
      color-mix(in srgb, var(--fc) 85%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .roster-slot.boosted,
  .hh-plate.boosted .hh-portrait {
    animation: none;
    box-shadow: 0 0 0 1px var(--fc);
  }
}

.battle .card-peek.sticky {
  pointer-events: auto;
  touch-action: none;
}
.battle .card-peek {
  flex-wrap: nowrap;
}
.battle .card-peek .peek-glossary {
  flex: none;
  width: 210px;
}
.battle .peek-close {
  position: absolute;
  top: -14px;
  right: -10px;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.readout .cost-check {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  color: var(--aether);
}
.readout .cost-check.short {
  color: #ff7a6b;
}

/* ---------- compact phone dock ---------- */
@media (max-width: 760px), (max-height: 520px) {
  .battle .hud-top {
    left: calc(6px + var(--safe-l, 0px));
    right: calc(6px + var(--safe-r, 0px));
    top: calc(4px + var(--safe-t));
    grid-template-columns: auto 1fr auto;
    gap: 4px;
  }
  .battle .rail {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    padding: 0 0 12px;
    gap: 3px;
  }
  .rail-token {
    width: 24px;
    height: 32px;
  }
  .rail-token.active {
    width: 30px;
    height: 38px;
  }
  .rail-now {
    bottom: -12px;
    font-size: 7.5px !important;
  }
  .hud-sq,
  .round-plate {
    height: 36px;
  }
  .hud-sq {
    width: 36px;
  }
  .battle .tool {
    width: 32px;
    height: 36px;
  }
  .roster.compact {
    top: calc(98px + var(--safe-t));
    left: calc(6px + var(--safe-l, 0px));
  }
  .roster.compact .roster-hand {
    width: 36px;
    height: 36px;
  }

  .battle .hud-bottom {
    left: calc(6px + var(--safe-l, 0px));
    right: calc(6px + var(--safe-r, 0px));
    bottom: calc(4px + var(--safe-b));
    grid-template-columns: auto 1fr auto auto auto;
    grid-template-areas:
      "read read read read read"
      "unit tools heat dial end"
      "mem mem mem mem mem"
      "hand hand hand hand hand";
    align-items: center;
    gap: 4px;
  }
  .battle .hud-hand,
  .battle .hud-turn,
  .turn-cluster,
  .turn-top {
    display: contents;
  }
  .battle .hud-hand > .readout,
  .battle .hud-hand > .readout-slot {
    grid-area: read;
  }
  .battle .hud-hand > .hand {
    grid-area: hand;
  }
  .battle .hud-unit {
    grid-area: unit;
  }
  .actions-plate {
    grid-area: tools;
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    padding: 0 2px;
    min-width: 0;
    background: none;
    border: 0;
  }
  .actions-plate > .micro,
  .actions-plate .diamonds {
    display: none;
  }
  .actions-plate .tool-row {
    display: flex;
    gap: 2px;
  }
  .actions-plate .tool {
    width: 44px;
    height: 44px;
  }
  .actions-plate .tool .micro {
    display: none;
  }
  .dial {
    grid-area: dial;
    width: 46px;
    height: 46px;
  }
  .heat-dial {
    grid-area: heat;
    width: 46px;
    height: 46px;
  }
  .hd-face {
    inset: 10px;
  }
  .hd-face svg,
  .hd-face .micro {
    display: none;
  }
  .hd-face b,
  .heat-dial.is-ready .hd-face b {
    font-size: 11px;
  }
  .heat-dial.is-boosted .hd-face b {
    font-size: 7px;
  }
  .dial b {
    top: 11px;
    font-size: 17px;
  }
  .memory-plate {
    grid-area: mem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
  }
  .memory-plate .mem-head {
    flex: none;
    gap: 6px;
  }
  .memory-plate .mem-cells {
    flex: 1;
  }
  .memory-plate .mem-room {
    flex: none;
  }
  .memory-plate .mem-room button {
    width: 30px;
    height: 30px;
  }
  .memory-plate .mem-room .micro {
    display: none;
  }
  .battle .end-turn {
    grid-area: end;
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }
  .battle .end-turn .micro {
    display: none;
  }

  .hh-portrait {
    width: 44px;
    height: 44px;
    margin-right: 0;
  }
  .hh-info {
    display: none;
  }

  .readout,
  .readout.wide {
    width: 100%;
    max-width: none;
    max-height: 26vh;
    max-height: 26dvh;
    overflow-y: auto;
    gap: 8px;
  }
  .readout-tag {
    padding: 0 6px;
    font-size: 8.5px !important;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
  .readout-body {
    gap: 2px 8px;
    padding: 5px 0;
    font-size: 12px;
    line-height: 1.35;
  }
  .readout-title {
    font-size: 12px;
  }
  .readout-actions {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
  }
  .readout-actions .hud-btn {
    min-height: 36px;
    min-width: 64px;
  }
  .hud-hand.lifted .readout {
    margin-bottom: 0;
  }

  .battle .hand {
    height: 104px;
    margin: 0;
    padding: 16px 2px 0;
    justify-content: flex-start;
    overflow: visible;
  }
  .battle .fan-slot,
  .battle .hand-side {
    transform: none !important;
  }
  .battle .fan-slot .card-hand,
  .battle .hand-side .card-hand {
    width: 68px;
    height: 86px;
    transform: none;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  }
  .battle .hand .card-hand.selected {
    transform: translateY(-10px);
  }
  .battle .hand .card-hand .card-top {
    padding: 5px 3px 2px 4px;
    flex-wrap: wrap;
  }
  .battle .hand .card-hand .cname {
    order: 3;
    flex-basis: 100%;
    font-size: 7.5px;
    letter-spacing: 0.02em;
  }
  .battle .hand .card-hand .type-line {
    font-size: 6.5px;
    margin: 2px 3px 0;
  }
  .battle .hand .card-hand .cfoot,
  .battle .hand .card-hand .ctext {
    display: none;
  }
  .hand-side::before {
    top: 0;
  }

  .battle .inspect {
    left: 6px;
    right: 6px;
    top: auto;
    bottom: calc(var(--dock-h, 240px) + 8px);
    width: auto;
    max-height: 32vh;
    max-height: 32dvh;
    overflow-y: auto;
  }
  .battle .card-peek,
  .battle .card-peek.raised {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(var(--dock-h, 240px) + 8px);
    transform: translateX(-50%)
      translate(var(--peek-dx, 0px), var(--peek-dy, 0px))
      scale(var(--peek-k, 1));
    transform-origin: bottom center;
    justify-content: center;
  }
  .battle .card-peek .peek-glossary {
    width: 170px;
  }
  .battle .toast {
    top: calc(98px + var(--safe-t));
    max-width: calc(100vw - 24px);
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .roster.compact {
    top: calc(var(--hud-b, 129px) + 6px);
  }
  .hand-view {
    top: calc(var(--hud-b, 129px) + 50px);
  }
  .roster.compact .roster-caption {
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(6, 14, 16, 0.66);
  }
}
@media (max-height: 520px) {
  .battle .rail {
    grid-column: 2;
    grid-row: 1;
  }
  .hand-view {
    top: calc(var(--hud-y, 4px) + 92px);
  }
  .roster.compact {
    top: calc(var(--hud-y, 4px) + 52px);
    left: auto;
    right: calc(6px + var(--safe-r, 0px));
  }
  .roster.compact .roster-caption {
    order: -1;
    margin: 0 4px 0 0;
    text-align: right;
  }
  .battle .toast {
    top: calc(50px + var(--safe-t));
  }
  .battle .hud-bottom {
    grid-template-columns: auto 1fr auto auto auto auto;
    grid-template-areas:
      "read read read read read read"
      "tools hand mem heat dial end";
    align-items: end;
  }
  .battle .hud-unit {
    display: none;
  }
  .actions-plate .tool {
    width: 40px;
  }
  .battle .hand {
    height: 84px;
  }
  .fan-slot {
    margin: 0
      min(
        1px,
        calc(
          (100% - 8px - var(--sides, 0) * 82px - var(--fan, 6) * 68px) /
          (2 * max(1, var(--fan, 6)))
        )
      );
  }
  .hand-side.weapon {
    margin-right: 6px;
    padding-right: 6px;
  }
  .hand-side.cache {
    margin-left: 6px;
    padding-left: 6px;
  }
  .memory-plate {
    flex-direction: column;
    align-items: stretch;
    width: 84px;
  }
  .memory-plate .mem-head .micro,
  .memory-plate .mem-room {
    display: none;
  }
  .readout,
  .readout.wide {
    max-height: 30vh;
    max-height: 30dvh;
  }
  .readout-actions {
    flex-direction: row;
  }
}

/* ---------- turn phases ---------- */
.battle .hud-left {
  display: grid;
  justify-items: start;
  gap: 6px;
}
.phase-track {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 3px;
  list-style: none;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.12);
  background: rgba(8, 14, 16, 0.82);
  pointer-events: auto;
}
.phase-track li,
.phase-track span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.45);
  transition: background 0.25s, color 0.25s;
}
.phase-track .is-on {
  background: rgba(255, 162, 74, 0.16);
  color: var(--holo);
}
.phase-track.is-enemy .is-on {
  background: rgba(224, 70, 111, 0.16);
  color: #ff8fae;
}
.phase-battle {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--holo);
  color: #1a0d02;
  font-size: 9px;
  letter-spacing: 0.12em;
}
@media (max-width: 760px) {
  .battle .hud-left {
    justify-items: center;
  }
  .phase-track li,
  .phase-track span {
    padding: 2px 8px;
    font-size: 9px;
  }
}

/* ---------- desktop bottom bar: hero strip and prompt above a full-width hand ---------- */
@media (min-width: 761px) and (min-height: 521px) {
  .battle .hud-bottom:not(.is-fight) {
    grid-template-columns: auto minmax(0, 1fr) minmax(250px, 290px);
    grid-template-areas:
      "unit read turn"
      "hand hand turn";
    gap: 8px 16px;
    max-height: none;
  }
  .battle .hud-bottom:not(.is-fight) .hud-unit {
    grid-area: unit;
    align-self: end;
  }
  .battle .hud-bottom:not(.is-fight) .hud-turn {
    grid-area: turn;
    align-self: end;
  }
  .battle .hud-bottom:not(.is-fight) .hud-hand {
    display: contents;
  }
  .battle .hud-bottom:not(.is-fight) .hud-hand > .readout,
  .battle .hud-bottom:not(.is-fight) .hud-hand > .readout-slot {
    grid-area: read;
    align-self: end;
    justify-self: center;
    margin: 0;
  }
  .battle .hud-bottom:not(.is-fight) .hand {
    grid-area: hand;
    justify-content: center;
  }
  .battle .hud-bottom:not(.is-fight) .fan-slot {
    transform: none;
  }
  .battle .hud-bottom:not(.is-fight) .fan-slot,
  .battle .hud-bottom:not(.is-fight) .hand-side {
    margin: 0 min(4px, calc((100% - var(--n, 6) * 134px) / (2 * var(--n, 6))));
  }
  .battle .hud-unit .hh-plate {
    align-items: stretch;
  }
  .battle .hud-unit .hh-portrait {
    width: 58px;
    height: auto;
    margin-right: -8px;
  }
  .battle .hud-unit .hh-info {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 4px 18px;
    padding: 8px 14px 8px 18px;
  }
  .battle .hud-unit .hh-info > .micro {
    grid-column: 1 / -1;
  }
  .battle .hud-unit .hh-name {
    font-size: 17px;
  }
  .battle .hud-unit .hh-stats {
    margin: 0;
  }
  .battle .hud-unit .hh-effects {
    grid-column: 1 / -1;
    max-width: 420px;
  }
}

/* ---------- ally picker ---------- */
.battle .ally-picker {
  position: absolute;
  left: 50%;
  bottom: calc(var(--dock-h, 240px) + 10px);
  z-index: 25;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px;
  border: 1px solid rgba(238, 243, 241, 0.14);
  border-radius: 10px;
  background: rgba(9, 15, 18, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  animation: peek-in 0.16s ease-out;
}
.ally-picker-title {
  color: var(--holo);
  letter-spacing: 0.2em;
}
.ally-picker-row {
  display: flex;
  gap: 8px;
}
.ally-pick {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 92px;
  padding: 8px 6px;
  border: 1px solid rgba(238, 243, 241, 0.12);
  border-radius: 8px;
  background: rgba(238, 243, 241, 0.04);
  color: var(--vellum);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.ally-pick:hover:not(:disabled) {
  background: rgba(238, 243, 241, 0.08);
  transform: translateY(-2px);
}
.ally-pick.is-aimed {
  border-color: var(--holo);
  box-shadow: 0 0 0 1px var(--holo), 0 0 20px rgba(255, 162, 74, 0.3);
}
.ally-pick:disabled {
  opacity: 0.4;
  cursor: default;
}
.ally-pick > img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
}
.ally-pick-name {
  max-width: 100%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ally-pick-hp {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
}
.ally-pick-hp i {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    #6ff0a8 calc(var(--v) * 100%),
    rgba(238, 243, 241, 0.1) 0
  );
}
.ally-pick-hp b {
  font-size: 10px;
  color: rgba(238, 243, 241, 0.7);
}
.ally-pick-reach {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ally-pick.is-now .ally-pick-reach {
  background: rgba(111, 240, 168, 0.14);
  color: #6ff0a8;
}
.ally-pick.is-move .ally-pick-reach {
  background: rgba(255, 162, 74, 0.14);
  color: var(--holo);
}
.ally-pick.is-none .ally-pick-reach {
  color: rgba(238, 243, 241, 0.6);
}
.ally-picker-hint {
  font-size: 11px;
  color: rgba(238, 243, 241, 0.6);
}
@media (max-width: 760px) {
  .ally-pick {
    width: 74px;
    padding: 6px 4px;
  }
  .ally-pick > img {
    width: 38px;
    height: 38px;
  }
  .ally-pick-name {
    font-size: 9.5px;
  }
}

/* ---------- auto bar ---------- */
.battle {
  --safe-t: calc(env(safe-area-inset-top, 0px) + 50px);
}
.watch-bar {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  z-index: 70;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(720px, calc(100vw - 16px));
  height: 36px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 162, 74, 0.35);
  background: rgba(8, 13, 16, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.watch-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(238, 243, 241, 0.35);
}
.watch-dot.is-on {
  background: #ff5c7a;
  box-shadow: 0 0 10px #ff5c7a;
  animation: watch-pulse 1.4s ease-in-out infinite;
}
.watch-tag {
  flex: none;
  color: var(--holo);
  letter-spacing: 0.18em;
}
.watch-bar p {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(238, 243, 241, 0.88);
  animation: peek-in 0.2s ease-out;
}
.watch-bar button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.18);
  background: rgba(238, 243, 241, 0.06);
  color: var(--vellum);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.watch-bar button.is-go {
  border-color: transparent;
  background: linear-gradient(180deg, #ffb46a, #f08a2c);
  color: #1a0d02;
  font-weight: 600;
}
@keyframes watch-pulse {
  50% {
    opacity: 0.4;
  }
}
@media (max-width: 760px) {
  .watch-tag {
    display: none;
  }
  .watch-bar p {
    font-size: 11px;
  }
}

.action-call {
  --side: var(--aether);
  position: absolute;
  left: max(16px, var(--safe-l, 0px));
  right: max(16px, var(--safe-r, 0px));
  top: calc(10px + var(--safe-t, 0px));
  z-index: 60;
  max-width: 980px;
  height: 46px;
  margin: 0 auto;
  padding: 0 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(
    180deg,
    rgba(22, 32, 38, 0.96),
    rgba(9, 14, 18, 0.95)
  );
  border: 1px solid rgba(238, 243, 241, 0.3);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 1px 0
    rgba(255, 255, 255, 0.08), 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  animation: action-call-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.action-call.is-leaving {
  animation: action-call-out 0.26s ease both;
}
.action-call.is-enemy {
  --side: var(--rift, #ff6b8e);
}
.action-call::before,
.action-call::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  background: var(--side);
  box-shadow: 0 0 10px var(--side);
  transform: translateY(-50%) rotate(45deg);
}
.action-call::before {
  left: 18px;
}
.action-call::after {
  right: 18px;
}
.action-call strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--vellum, #eef3f1);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.action-call.in-fight {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: min(560px, 100%);
  height: 40px;
  margin: 0 auto 8px;
}
.action-call.in-fight strong {
  font-size: 19px;
}
@keyframes action-call-in {
  from {
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes action-call-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.battle .hud-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.battle.is-calling .hud-top {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
@media (max-width: 760px), (max-height: 520px) {
  .action-call {
    height: 40px;
    padding: 0 40px;
  }
  .action-call strong {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .action-call {
    animation-duration: 0.01s;
    animation-fill-mode: none;
  }
}

.battle .hand,
.readout {
  animation: hud-rise 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes hud-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .battle .hand,
  .readout {
    animation: none;
  }
}

@media (max-height: 520px) {
  .battle .turn-top .dial .micro,
  .battle .fd-left .dial .micro {
    display: none;
  }
}
.round-plate .stage-event {
  color: #fb923c;
}

.battle .hud-bottom,
.battle .roster {
  transition: opacity 0.45s ease;
}
.battle.is-briefing .hud-top,
.battle.is-briefing .roster,
.battle.is-briefing .hud-bottom {
  opacity: 0;
  pointer-events: none;
}

.stage-intro {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: center;
  padding: 0;
  border: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(8, 6, 18, 0.2) 0%,
    rgba(8, 6, 18, 0.62) 100%
  );
  font: inherit;
  text-align: center;
  color: #fff;
  cursor: pointer;
  animation: si-veil 0.5s ease both;
}
.stage-intro.is-out {
  animation: si-veil-out 0.42s ease both;
}
.si-band {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-bottom: 8vh;
  margin-bottom: 8dvh;
  padding: 24px max(20px, 8vw) 22px;
  border-top: 1px solid rgba(255, 176, 102, 0.75);
  border-bottom: 1px solid rgba(255, 176, 102, 0.75);
  background: linear-gradient(
    90deg,
    rgba(13, 10, 28, 0) 0%,
    rgba(13, 10, 28, 0.94) 18%,
    rgba(13, 10, 28, 0.94) 82%,
    rgba(13, 10, 28, 0) 100%
  );
  animation: si-band 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.is-out .si-band {
  animation: si-band-out 0.42s ease both;
}
.si-band > * {
  animation: si-line 0.5s 0.18s ease both;
}
.si-band > strong {
  animation-delay: 0.28s;
}
.si-band > .si-note {
  animation-delay: 0.42s;
}
.si-band > .si-skip {
  animation-delay: 0.9s;
}
.stage-intro .si-place {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--holo, #ffa24a);
}
.stage-intro strong {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: clamp(22px, 4.6vw, 40px);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.stage-intro .si-note {
  max-width: 46em;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(238, 243, 241, 0.84);
}
.stage-intro .si-skip {
  margin-top: 4px;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.45);
}
@keyframes si-veil {
  from {
    opacity: 0;
  }
}
@keyframes si-veil-out {
  to {
    opacity: 0;
  }
}
@keyframes si-band {
  from {
    opacity: 0;
    transform: scaleY(0.2);
  }
}
@keyframes si-band-out {
  to {
    opacity: 0;
    transform: scaleY(0.2);
  }
}
@keyframes si-line {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (max-height: 520px) {
  .si-band {
    margin-bottom: 0;
    padding: 10px 16px 12px;
    gap: 4px;
  }
  .stage-intro .si-note {
    font-size: 11.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage-intro,
  .si-band,
  .si-band > * {
    animation: none;
  }
}
.roster-caption em {
  margin-left: 8px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--mute, #8fa3a3);
}
.roster-caption em.is-hot {
  color: var(--aether, #6ff0d6);
}
.focus-pips {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 4px;
  vertical-align: middle;
}
.focus-pips i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(207, 230, 255, 0.55);
  transform: rotate(45deg) skew(12deg, 12deg);
  transition: background 0.25s, box-shadow 0.35s, border-color 0.25s;
}
.focus-pips i.on {
  border-color: #eaf6ff;
  background: linear-gradient(135deg, #ffffff, #8fd0ff);
  box-shadow: 0 0 8px rgba(143, 208, 255, 0.9);
}
.focus-pips.is-full i.on {
  animation: focus-ready 1.6s ease-in-out infinite;
}
.focus-pips.is-pressure i {
  border-color: rgba(251, 191, 36, 0.55);
}
.focus-pips.is-pressure i.on {
  border-color: #fff3d1;
  background: linear-gradient(135deg, #fff3d1, #fbbf24);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.9);
}
.roster-caption .focus-pips {
  margin-left: 8px;
}
@keyframes focus-ready {
  50% {
    box-shadow: 0 0 14px rgba(255, 255, 255, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .focus-pips.is-full i.on {
    animation: none;
  }
}
.roster-slot .focus-pips {
  position: absolute;
  right: 6px;
  bottom: 5px;
  gap: 5px;
  padding: 0;
}
.roster-slot .focus-pips i {
  width: 6px;
  height: 6px;
}

/* ---------- turn record and card choice ---------- */
.hud-btn {
  white-space: nowrap;
}
.hud-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.battle .hud-bottom:not(.is-fight) .hud-turn {
  position: relative;
}
.turn-log,
.tl-asking {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: 100%;
}
.turn-log {
  display: flex;
  flex-direction: column;
  max-height: min(
    52vh,
    420px,
    calc(100vh - var(--dock-h, 240px) - var(--hud-y, 60px) - 16px)
  );
  max-height: min(
    52dvh,
    420px,
    calc(100dvh - var(--dock-h, 240px) - var(--hud-y, 60px) - 16px)
  );
  background: var(--dusk-glass);
  border: 1px solid var(--dusk-line-strong);
  clip-path: var(--cut-sm);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  animation: tl-in 0.18s ease-out both;
}
.tl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 6px 14px;
  border-bottom: 1px solid var(--dusk-line);
}
.tl-head > .micro:first-child {
  margin-right: auto;
  color: var(--holo) !important;
}
.tl-keys {
  white-space: nowrap;
}
.tl-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
  color: var(--mute);
}
.tl-close:hover {
  color: var(--vellum);
}
.tl-list {
  position: relative;
  min-height: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
}
.tl-list::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 24px;
  width: 1px;
  background: rgba(238, 243, 241, 0.14);
}
.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 4px 12px 4px 14px;
  font-size: 13px;
  text-align: left;
  color: #d9dfdc;
}
.tl-row:hover:not(:disabled):not(.is-picked) {
  background: rgba(255, 162, 74, 0.07);
}
.tl-step {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-family: var(--label);
  font-size: 11px;
  font-weight: 700;
  color: var(--vellum);
  background: #22302f;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.tl-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-row.is-picked {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(255, 140, 63, 0.26),
    rgba(255, 140, 63, 0.03)
  );
  box-shadow: inset 3px 0 0 #ff8c3f;
}
.tl-row.is-picked .tl-step {
  color: var(--ink-text);
  background: var(--ember);
}
.tl-row.is-now .tl-step {
  color: var(--ink-text);
  background: var(--vellum);
}
.tl-row.is-undone {
  color: var(--mute);
}
.tl-row.is-undone .tl-text {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 140, 63, 0.75);
}
.tl-row.is-undone .tl-step {
  background: #1a2423;
  color: var(--mute);
}
.tl-row.is-locked {
  color: var(--mute);
  cursor: default;
}
.tl-now {
  color: var(--vellum) !important;
}
.tl-lock {
  width: 8px;
  height: 9px;
  margin-right: 2px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  box-shadow: 0 -3px 0 -1.5px currentColor;
}
.tl-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-top: 1px solid var(--dusk-line);
}
.tl-note {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  color: var(--mute);
}
.tl-go {
  flex: none;
  height: 34px;
  padding: 0 20px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-text);
  background: var(--ember);
  clip-path: var(--cut-sm);
}
.tl-go:hover:not(:disabled) {
  filter: brightness(1.1);
}
.tl-go:disabled {
  opacity: 0.35;
}
.tl-asking {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  color: #fde68a;
}
@keyframes tl-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.readout .choice-line {
  white-space: nowrap;
}
.readout .choice-line b {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--holo);
}
.readout .choice-line.is-off {
  color: var(--mute);
}
.readout .choice-line .short {
  font-style: normal;
  color: #fb923c;
}
.battle .ask-undo {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
  padding: 14px 16px;
  transform: translate(-50%, -50%);
}
.ask-undo ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #d9dfdc;
}
.ask-undo-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 760px), (max-height: 520px) {
  .turn-log,
  .tl-asking {
    left: 0;
    width: auto;
    bottom: calc(100% + 6px);
  }
  .turn-log {
    max-height: min(
      46vh,
      calc(100vh - var(--dock-h, 240px) - var(--hud-y, 60px) - 16px)
    );
    max-height: min(
      46dvh,
      calc(100dvh - var(--dock-h, 240px) - var(--hud-y, 60px) - 16px)
    );
  }
  .tl-keys {
    display: none;
  }
  .tl-row {
    min-height: 42px;
  }
  .readout .choice-line {
    white-space: normal;
  }
}
@media (max-height: 520px) {
  .turn-log,
  .tl-asking {
    left: auto;
    width: min(360px, 60vw);
  }
  .turn-log {
    max-height: calc(100vh - var(--dock-h, 240px) - var(--hud-y, 60px) - 16px);
    max-height: calc(100dvh - var(--dock-h, 240px) - var(--hud-y, 60px) - 16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .turn-log {
    animation: none;
  }
}
.set-panel {
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: grid;
  gap: 18px;
  padding: 22px 22px 20px;
  color: var(--vellum);
}
.set-head {
  display: grid;
  gap: 2px;
}
.set-head .micro {
  color: var(--holo);
}
.set-head h2 {
  font-family: var(--label);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.set-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent) top /
    100% 1px no-repeat;
}
.set-section > .micro,
.set-row > .micro,
.set-field > .micro {
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--holo);
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.set-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  cursor: pointer;
}
.set-switch span {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: rgba(10, 7, 22, 0.9);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  transition: background 0.2s, box-shadow 0.2s;
}
.set-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #5a4870, #2a1f40);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.45);
  transition: transform 0.25s cubic-bezier(0.2, 1.3, 0.4, 1), background 0.2s;
}
.set-switch[aria-checked="true"] {
  color: #fff;
}
.set-switch[aria-checked="true"] span {
  background: rgba(255, 140, 63, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.7), 0 0 16px
    rgba(255, 140, 63, 0.25);
}
.set-switch[aria-checked="true"] span::after {
  transform: translateX(24px);
  background: var(--ember);
  box-shadow: 0 0 10px rgba(255, 150, 70, 0.6);
}

.set-slider {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.set-slider[aria-disabled="true"] {
  opacity: 0.4;
}
.set-slider .num {
  text-align: right;
  font-size: 13px;
  color: var(--mute);
}
.set-slider input {
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  height: 28px;
  background: transparent;
  cursor: pointer;
}
.set-slider input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #ff8c3f 0%,
    #ffbf6e var(--v),
    rgba(255, 228, 204, 0.14) var(--v)
  );
}
.set-slider input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #ff8c3f 0%,
    #ffbf6e var(--v),
    rgba(255, 228, 204, 0.14) var(--v)
  );
}
.set-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffd0a0, #ff8c3f);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.7), 0 0 12px rgba(255, 150, 70, 0.5);
}
.set-slider input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffd0a0, #ff8c3f);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.7);
}
.set-slider input:focus-visible {
  outline: 1px solid var(--holo);
  outline-offset: 2px;
}

.set-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.set-choices button,
.set-btn {
  height: 40px;
  padding: 0 14px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  background: rgba(238, 243, 241, 0.04);
  border: 1px solid var(--hair);
  clip-path: var(--cut-sm);
}
.set-choices button[aria-pressed="true"] {
  color: var(--vellum);
  border-color: rgba(242, 180, 94, 0.55);
  box-shadow: inset 0 -2px 0 var(--holo);
}
.set-btn {
  color: var(--vellum);
}
.set-btn:disabled {
  opacity: 0.4;
}
.set-btn.primary {
  color: var(--ink-text);
  background: linear-gradient(100deg, #eef3f1, #cfeee6);
  border-color: transparent;
}

.set-field {
  display: grid;
  gap: 6px;
}
.set-field input {
  height: 40px;
  padding: 0 12px;
  font-family: var(--mm-title);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--vellum);
  background: rgba(10, 7, 22, 0.8);
  border: 1px solid var(--dusk-line-strong);
  border-radius: 2px;
}
.set-field input:focus {
  outline: none;
  border-color: var(--holo);
}

.set-note {
  margin: 4px 0 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(238, 243, 241, 0.7);
}
/* Painted title scene: five parallax layers covering the screen, a hero idling on the promontory tip. */
.title-art {
  --px: 0;
  --py: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1c1230;
  animation: home-fade 2.4s ease-out both;
}
.ta-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, calc(100vh * var(--aspect)));
  aspect-ratio: var(--aspect);
  transform: translate(-50%, -50%)
    translate(calc(var(--fx, 0) * 1%), calc(var(--fy, 0) * 1%)) scale(1.06);
  transition: transform 1.2s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.title-art.is-drifting .ta-stage {
  transform: translate(-50%, -50%)
    translate(calc(var(--fx, 0) * 1%), calc(var(--fy, 0) * 1%)) scale(1.1);
}
.ta-layer,
.ta-hero {
  transform: translate3d(
    calc(var(--px) * var(--d) * -28px),
    calc(var(--py) * var(--d) * -14px),
    0
  );
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.ta-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.ta-layer:nth-child(3) {
  animation: ta-glow 6s ease-in-out infinite alternate;
}
.ta-layer:nth-child(4) {
  animation: ta-drift 18s ease-in-out infinite alternate;
}
.ta-hero {
  position: absolute;
  width: 0;
  height: 0;
}
.ta-hero > * {
  position: absolute;
  left: 0;
  bottom: 0;
  translate: -25% 6%;
}
@keyframes ta-glow {
  from {
    filter: brightness(0.94);
  }
  to {
    filter: brightness(1.08) saturate(1.1);
  }
}
@keyframes ta-drift {
  from {
    translate: -0.6% 0;
  }
  to {
    translate: 0.6% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ta-layer,
  .ta-hero {
    animation: none;
    transition: none;
  }
}
/* Afterglow skin shared by the menus: the painted dusk sky, dimmed, behind glass panels and ember buttons. */
.dusk-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--dusk);
  filter: brightness(0.46) saturate(0.85) blur(3px);
  animation: dusk-in 1.2s ease-out both;
}
.dusk-backdrop img {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 60% 50%;
     object-position: 60% 50%;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
}
@keyframes dusk-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dusk-backdrop {
    animation: none;
  }
}
/* Squad screens: header, squad bar and the shared stage panel. The squad picker itself is styled in squad/roster.css. */
.squad-screen {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 76px minmax(0, 1fr) auto 92px;
  grid-template-areas:
    "top"
    "lineup"
    "dossier"
    "foot";
  -moz-column-gap: clamp(20px, 2.6vw, 40px);
       column-gap: clamp(20px, 2.6vw, 40px);
  padding: var(--safe-t) max(24px, 3vw, var(--safe-r)) var(--safe-b)
    max(24px, 3vw, var(--safe-l));
  overflow: hidden;
  background: var(--dusk);
  color: var(--vellum);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sq-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      55% 65% at 40% 55%,
      color-mix(in srgb, var(--hc) 26%, transparent),
      transparent 70%
    ),
    linear-gradient(
      90deg,
      rgba(12, 10, 28, 0.82) 0%,
      rgba(12, 10, 28, 0.25) 30%,
      rgba(12, 10, 28, 0.1) 60%,
      rgba(12, 10, 28, 0.55) 100%
    ),
    linear-gradient(
      180deg,
      rgba(12, 10, 28, 0.7) 0%,
      transparent 14%,
      transparent 80%,
      rgba(12, 10, 28, 0.85) 100%
    );
  transition: background 0.6s;
}
.squad-screen .dusk-backdrop,
.squad-screen .sq-backdrop {
  position: fixed;
}
.squad-screen > :not(.sq-backdrop, .dusk-backdrop) {
  position: relative;
}

.sq-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--dusk-line);
}
.sq-top h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.sq-top h1 span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.36em;
  color: var(--holo);
}
.sq-back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--dusk-line-strong);
  background: rgba(14, 12, 34, 0.6);
  color: var(--vellum);
  transform: rotate(45deg) scale(0.78);
  transition: border-color 0.2s;
}
.sq-back svg {
  transform: rotate(-45deg);
}
.sq-back:hover {
  border-color: var(--holo);
}

.sq-brief {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--mute);
}

.sq-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hc);
}
.sq-kicker i,
.sq-top h1 i,
.sq-stage i {
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.sq-side {
  grid-area: side;
  align-self: center;
  display: grid;
  gap: 24px;
  max-height: calc(100% - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 20px;
  border: 0;
  background: var(--mm-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--mm-hair), 0 18px 50px rgba(5, 3, 14, 0.5);
  scrollbar-width: thin;
}
.sq-side h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--holo);
}
.sq-side h3::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--holo);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.4);
}
.sq-side h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent);
}
.sq-sizes,
.sq-diffs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.sq-diffs {
  grid-template-columns: repeat(4, 1fr);
}
.sq-sizes button,
.sq-diffs button {
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  color: rgba(238, 232, 242, 0.65);
  font-family: var(--mm-title);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.sq-sizes button:hover,
.sq-diffs button:hover {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.6);
}
.sq-sizes button strong {
  display: block;
  font-weight: 500;
  color: inherit;
}
.sq-sizes button span {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: none;
  opacity: 0.8;
}
.sq-sizes button[aria-checked="true"],
.sq-diffs button[aria-checked="true"] {
  background: var(--ember);
  color: #1d0f06;
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4), 0 6px 18px
    rgba(255, 120, 50, 0.25);
}
.sq-stage {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.sq-stage canvas {
  width: 100%;
  height: auto;
  max-height: 150px;
  -o-object-fit: contain;
     object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.9;
  border: 0;
  background: rgba(10, 8, 24, 0.5);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.sq-stage span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
.sq-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(238, 232, 242, 0.68);
}
.sq-seed {
  display: flex;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
}
.sq-seed:focus-within {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75), 0 0 16px
    rgba(255, 140, 63, 0.18);
}
.sq-seed input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: rgba(10, 7, 22, 0.8);
  color: #fff;
  font-family: var(--mm-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  outline: none;
  -moz-user-select: text;
       user-select: text;
  -webkit-user-select: text;
}
.sq-seed button {
  display: grid;
  place-items: center;
  width: 46px;
  border: 0;
  background: rgba(255, 140, 63, 0.1);
  box-shadow: inset 1px 0 0 var(--mm-hair-strong);
  color: var(--holo);
  transition: background 0.2s, color 0.2s;
}
.sq-seed button:hover {
  background: var(--ember);
  color: #1d0f06;
}

.sq-foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 0;
  background: linear-gradient(
      90deg,
      transparent,
      var(--mm-hair-strong) 20%,
      var(--mm-hair-strong) 80%,
      transparent
    )
    top / 100% 1px no-repeat;
}
.sq-slots {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sq-slots li {
  flex: 0 1 190px;
  min-width: 0;
}
.sq-slot,
.sq-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  padding: 0 14px 0 4px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  overflow: hidden;
}
.sq-slots li {
  display: flex;
}
.sq-slot {
  flex: 1;
  min-width: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hc) 55%, transparent),
    inset 0 -2px 0 var(--hc);
  animation: sq-slot 0.35s ease-out both;
}
.sq-slot-drop {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--mm-panel);
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--hc) 55%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--hc) 55%, transparent), inset 0 -2px 0
    var(--hc);
  color: rgba(238, 243, 241, 0.85);
  transition: color 0.2s, background 0.2s;
}
.sq-slot-drop:hover {
  color: #fff;
  background: rgba(214, 64, 106, 0.45);
}
.sq-tools {
  display: flex;
  gap: 8px;
}
.sq-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  color: var(--vellum);
  font-family: var(--mm-title);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.sq-tools button:hover:not(:disabled) {
  background: var(--ember);
  box-shadow: none;
  color: #1d0f06;
}
.sq-tools button:disabled {
  opacity: 0.35;
}
.sq-slots img {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px var(--hc), 0 0 0 3px rgba(14, 10, 28, 0.8);
}
.sq-slot-id {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.sq-slot-id b {
  font-weight: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sq-slot-id small {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(238, 243, 241, 0.62);
}
.sq-empty {
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(10, 7, 22, 0.45);
  box-shadow: none;
  outline: 1px dashed rgba(255, 228, 204, 0.22);
  outline-offset: -1px;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(238, 243, 241, 0.4);
}
.sq-go {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 220px;
  min-height: 56px;
  padding: 0 26px;
  border: 0;
  background: var(--ember);
  color: #1d0f06;
  font: inherit;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
  transition: filter 0.2s, opacity 0.2s;
}
.sq-go span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.sq-go small {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
}
.sq-go:hover:not(:disabled) {
  filter: drop-shadow(0 0 14px var(--ember-glow)) brightness(1.06);
}
.sq-go:disabled {
  opacity: 0.35;
}

@media (max-width: 760px) {
  .squad-screen {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--safe-t) 16px calc(204px + var(--safe-b));
  }
  .stage-screen {
    padding-bottom: calc(90px + var(--safe-b));
  }
  .sq-brief {
    display: none;
  }
  .sq-tools {
    flex: 1 1 100%;
  }
  .sq-tools button {
    flex: 1;
    padding: 0 8px;
    letter-spacing: 0.12em;
  }
  .sq-top {
    flex: none;
    height: 64px;
  }
  .sq-top h1 {
    font-size: 16px;
    letter-spacing: 0.16em;
  }
  .sq-kicker {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 10px;
    letter-spacing: 0.2em;
  }
  .sq-side {
    margin-top: 24px;
    max-height: none;
    overflow: visible;
  }
  .squad-screen .sq-foot {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px calc(10px + var(--safe-b));
    background: linear-gradient(
        90deg,
        transparent,
        var(--mm-hair-strong) 20%,
        var(--mm-hair-strong) 80%,
        transparent
      )
      top / 100% 1px no-repeat, rgba(12, 9, 26, 0.95);
    backdrop-filter: blur(8px);
  }
  .sq-slots {
    flex: 1 1 100%;
    gap: 6px;
  }
  .sq-slots li {
    flex: 1 1 0;
  }
  .sq-slot,
  .sq-empty {
    height: 44px;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .sq-slot-drop {
    width: 30px;
  }
  .sq-slots img {
    width: 36px;
    height: 36px;
  }
  .sq-slot {
    justify-content: center;
    padding: 0 0 0 4px;
  }
  .sq-slot .sq-slot-id {
    display: none;
  }
  .sq-go {
    flex: 1 1 100%;
    min-height: 48px;
    justify-items: center;
  }
}
@keyframes sq-info {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes sq-slot {
  from {
    opacity: 0;
    scale: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .squad-screen * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .squad-screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-rows: 44px minmax(0, 1fr) 60px;
    grid-template-areas:
      "top top"
      "lineup dossier"
      "foot foot";
    -moz-column-gap: 16px;
         column-gap: 16px;
    overflow: hidden;
    padding: var(--safe-t) max(14px, var(--safe-r)) var(--safe-b)
      max(14px, var(--safe-l));
  }
  .sq-top {
    height: auto;
  }
  .sq-top h1 {
    font-size: 14px;
  }
  .sq-brief {
    display: flex;
    font-size: 9.5px;
    letter-spacing: 0.14em;
  }
  .sq-kicker {
    gap: 6px;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    white-space: nowrap;
  }
  .sq-side {
    gap: 12px;
    max-height: none;
    margin: 0;
    padding: 10px 12px;
    overflow: visible;
  }
  .sq-diffs button {
    min-height: 32px;
    padding: 4px 6px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .sq-stage canvas {
    max-height: 110px;
  }
  .squad-screen .sq-foot {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0;
    background: none;
    backdrop-filter: none;
  }
  .sq-slots {
    flex: 1;
    gap: 6px;
  }
  .sq-slots li {
    flex: none;
  }
  .sq-slots {
    flex: none;
  }
  .sq-slot {
    flex: none;
    justify-content: center;
    width: 46px;
    padding: 0 0 0 3px;
  }
  .sq-slot .sq-slot-id {
    display: none;
  }
  .sq-slot-drop {
    width: 24px;
  }
  .sq-empty {
    width: 66px;
  }
  .sq-tools {
    margin-right: auto;
  }
  .sq-slot,
  .sq-empty {
    height: 44px;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .sq-tools {
    flex: none;
    gap: 6px;
  }
  .sq-tools button {
    flex: none;
    padding: 0 10px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .sq-slots img {
    width: 36px;
    height: 36px;
  }
  .sq-go {
    flex: none;
    min-width: 170px;
    min-height: 44px;
    justify-items: end;
  }
}
/* Codex in the map language: sigil orbs on hairline panels, spaced capitals, and the heroes who play
   each class or job as ringed bust orbs. */
.codex-screen {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(40px + var(--safe-b));
  scrollbar-width: thin;
}
.codex-screen .sq-top {
  height: 76px;
}
.cx-intro,
.cx-note {
  max-width: 760px;
  margin: 26px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(238, 232, 242, 0.82);
}
.cx-note {
  margin: 0 0 18px;
}
.cx-section {
  margin-top: 38px;
}
.cx-section h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  font-family: var(--mm-title);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #fff;
}
.cx-section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent);
}
.cx-section h2 small {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--holo);
}
.cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.cx-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 18px;
  background: radial-gradient(
      120% 70% at 0% 0%,
      color-mix(in srgb, var(--hc) 16%, transparent),
      transparent 60%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0
    color-mix(in srgb, var(--hc) 70%, transparent);
}
.cx-head,
.cx-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cx-head > span:last-child,
.cx-hero > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.cx-sigil {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--hc);
  background: radial-gradient(
    circle at 50% 35%,
    color-mix(in srgb, var(--hc) 26%, #1c1430),
    rgba(12, 9, 26, 0.95)
  );
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hc) 70%, transparent), 0 0 0
    5px rgba(14, 10, 28, 0.6), 0 0 0 6px
    color-mix(in srgb, var(--hc) 25%, transparent), 0 0 22px
    color-mix(in srgb, var(--hc) 25%, transparent);
}
.cx-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hc);
}
.cx-entry h3 {
  margin: 0;
  font-family: var(--mm-title);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
}
.cx-entry p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(238, 232, 242, 0.86);
}
.cx-entry b {
  color: #fff;
  font-weight: 600;
}
.cx-weak {
  padding: 10px 12px;
  background: rgba(255, 228, 204, 0.03);
  box-shadow: inset 2px 0 0 var(--brass);
  color: rgba(214, 204, 224, 0.8) !important;
}
.cx-weak b {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass);
}

.cx-members {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin: auto 0 0;
  padding: 14px 0 0;
  list-style: none;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent) top /
    100% 1px no-repeat;
}
.cx-members li {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 64px;
  text-align: center;
}
.cx-members img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px var(--hc), 0 0 0 4px rgba(14, 10, 28, 0.6), 0 0 0 5px
    rgba(255, 228, 204, 0.1);
}
.cx-members strong {
  font-family: var(--mm-title);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cx-members small {
  font-size: 9.5px;
  line-height: 1.2;
  color: rgba(238, 243, 241, 0.55);
}

.cx-hero img {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 2px var(--hc), 0 0 0 6px rgba(14, 10, 28, 0.6), 0 0 0 7px
    color-mix(in srgb, var(--hc) 30%, transparent), 0 0 26px
    color-mix(in srgb, var(--hc) 30%, transparent);
}

.cx-enemy {
  padding-top: 0;
}
.cx-enemy-art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 1;
  max-height: 240px;
  margin: 0 -22px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  cursor: pointer;
}
.cx-enemy-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 40%;
     object-position: 50% 40%;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 80% at 40% 45%,
    #000 50%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 70% 80% at 40% 45%,
    #000 50%,
    transparent 100%
  );
}
.cx-enemy-art::after {
  content: "";
  position: absolute;
  left: 40%;
  top: 46%;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hc) 45%, transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cx-enemy-art .sprite-loop {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 4px;
}
.cx-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(214, 204, 224, 0.75);
}
.cx-stats li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.cx-stats b {
  font-family: var(--mm-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
}
.cx-attacks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(238, 232, 242, 0.86);
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent) top /
    100% 1px no-repeat;
}
.cx-attacks strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hc);
}

@media (max-width: 760px) {
  .squad-screen.codex-screen {
    display: block;
    padding-bottom: calc(32px + var(--safe-b));
  }
  .codex-screen .sq-top {
    height: 64px;
  }
  .cx-intro {
    margin-top: 18px;
    font-size: 14px;
  }
  .cx-section h2 {
    font-size: 17px;
    letter-spacing: 0.24em;
  }
  .cx-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cx-entry {
    padding: 18px 16px 16px;
  }
  .cx-enemy-art {
    margin: 0 -16px;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .squad-screen.codex-screen {
    display: block;
    overflow-y: auto;
  }
  .codex-screen .sq-top {
    height: 44px;
  }
}
.lib-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 22px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.6);
}
.lib-totals b {
  font-family: var(--mm-title);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 140, 63, 0.45);
}
.lib-totals i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--holo);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.35);
}

.lib-tabs {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  border-bottom: 1px solid var(--dusk-line);
}
.lib-tabs button {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.6);
  cursor: pointer;
}
.lib-tabs button[aria-pressed="true"] {
  border-bottom-color: #ff8c3f;
  color: #fff;
}

.lib-filters {
  display: grid;
  gap: 0;
  margin-top: 16px;
  padding: 6px 18px;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.lib-filter {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 0;
}
.lib-filter + .lib-filter {
  background: linear-gradient(90deg, var(--mm-hair), transparent) top / 100% 1px
    no-repeat;
}
.lib-filter-name {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--holo);
}
.lib-filter-name::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--holo);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.35);
}
.lib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.library-screen .lib-chips .chip-btn {
  flex: none;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.lib-hero {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: -9px;
}
.lib-hero img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px var(--hc), 0 0 0 2px rgba(14, 10, 28, 0.8);
}

.lib-rarity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.lib-rarity b {
  font-weight: 600;
  color: var(--r);
}

.lib-count {
  margin: 18px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.6);
}
.lib-count b {
  font-family: var(--mm-title);
  font-size: 14px;
  color: #fff;
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px 12px;
  margin-top: 16px;
}
.lib-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(300px, 1fr) auto;
  justify-items: stretch;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.lib-slot .card {
  min-width: 0;
  margin: 0 auto;
  cursor: default;
}

.lib-users,
.lib-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 11px;
  color: rgba(238, 243, 241, 0.72);
}
.lib-users span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lib-users img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px rgba(255, 228, 204, 0.35);
}
.lib-note {
  letter-spacing: 0.08em;
  color: var(--holo);
}

.lib-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.lib-item {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 18px;
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0
    rgba(255, 176, 102, 0.4);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(238, 232, 242, 0.84);
}
.lib-item header {
  display: grid;
  gap: 3px;
}
.lib-item strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mm-title);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
.lib-item em {
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff8c3f;
}
.lib-item .micro {
  text-transform: capitalize;
}
.lib-item p {
  margin: 0;
}
.lib-item b {
  color: #fff;
  font-weight: 500;
}
.lib-item .lib-users {
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 10px;
  border-top: 0;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent) top /
    100% 1px no-repeat;
}

@media (max-width: 760px) {
  .lib-filter {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .lib-filters {
    padding: 4px 12px;
  }
  .lib-filter {
    padding: 8px 0;
  }
  .lib-filter-name {
    padding-top: 0;
  }
  .lib-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .lib-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 8px;
  }
  .lib-slot {
    grid-template-rows: minmax(250px, 1fr) auto;
  }
  .lib-tabs button {
    flex: 1;
    padding: 0 8px;
  }
}

.lib-more {
  grid-column: 1 / -1;
  height: 1px;
}
.gallery-screen h2 {
  margin: 0 0 12px;
  font-family: var(--mm-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #fff;
}
.gal-wings > section > h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  letter-spacing: 0.32em;
}
.gal-wings > section > h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent);
}

.gal-albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.gal-album {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
  transition: box-shadow 0.2s;
}
.gal-album[data-on="true"] {
  background: radial-gradient(
      100% 120% at 0% 50%,
      rgba(255, 140, 63, 0.16),
      transparent 60%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.7), 0 0 26px
    rgba(255, 140, 63, 0.16);
}
.gal-album[data-on="true"] h2 {
  color: #ffbf6e;
}
.gal-album-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.gal-album-head h2 {
  margin: 0;
  min-width: 0;
  line-height: 1.3;
}
.gal-disc {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--holo);
  background: radial-gradient(
    circle at 50% 35%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  box-shadow: var(--mm-ring);
}
.gal-disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
}
.gal-disc::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #0d0a1c;
  box-shadow: 0 0 0 2px rgba(255, 228, 204, 0.35);
}
.gal-disc:not(:has(img))::after {
  display: none;
}
.gal-album[data-on="true"] .gal-disc {
  box-shadow: var(--mm-ring-on);
}
.gal-album[data-on="true"] .gal-disc img {
  animation: gal-spin 14s linear infinite;
}
@keyframes gal-spin {
  to {
    transform: rotate(360deg);
  }
}
.gallery-screen .gal-tracks .chip-btn,
.gallery-screen .gal-places .chip-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
}
.gallery-screen .gal-places .chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
}
.gal-places img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 228, 204, 0.4);
}
.gal-tracks,
.gal-places {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gal-vista {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.gal-view {
  position: relative;
  min-height: 300px;
  height: 62vh;
  height: 62dvh;
  border: 0;
  overflow: hidden;
  background: #0b0a14;
  box-shadow: inset 0 0 0 1px var(--mm-hair), 0 20px 50px rgba(4, 2, 12, 0.45);
}
.gal-view::after {
  content: "";
  position: absolute;
  inset: 10px;
  background:
    linear-gradient(var(--holo), var(--holo)) 0 0 / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 0 0 / 1px 16px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 0 / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 0 / 1px 16px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 0 100% / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 0 100% / 1px 16px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 100% / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 100% / 1px 16px
    no-repeat;
  opacity: 0.7;
  pointer-events: none;
}
.gal-view canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.gal-caption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--holo);
  text-shadow: 0 1px 8px #000;
  pointer-events: none;
}
.gal-caption b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mm-title);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
}
.gal-turn {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: flex;
  gap: 10px;
}
.gal-turn button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 236, 220, 0.85);
  background: radial-gradient(
    circle at 50% 35%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.45), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 220, 190, 0.18);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.gal-turn button:hover {
  color: #1a0f14;
  background: var(--ember);
}
.gal-turn button:last-child svg {
  transform: scaleX(-1);
}

.gal-wings {
  display: grid;
  gap: 26px;
  margin-top: 20px;
}
.gal-works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.gal-work {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 999px 999px 4px 4px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #241a3a, #0b0a14);
  cursor: zoom-in;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.gal-work::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  pointer-events: none;
  transition: box-shadow 0.2s;
}
.gal-works.is-wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.gal-works.is-wide .gal-work {
  aspect-ratio: 16 / 9;
  border-radius: 4px;
}
.gal-works.is-wide .gal-work img {
  -o-object-position: center;
     object-position: center;
}
.gal-work img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}
.gal-work span {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 10px 9px;
  font-family: var(--mm-title);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  background: linear-gradient(transparent, rgba(8, 6, 16, 0.92));
}
.gal-works.is-wide .gal-work span {
  text-align: left;
  padding-left: 14px;
}
.gal-work:hover,
.gal-work:focus-visible {
  transform: translateY(-3px);
}
.gal-work:hover::after,
.gal-work:focus-visible::after {
  box-shadow: inset 0 0 0 2px #ff8c3f, 0 0 0 0 transparent;
}

.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 14px;
  padding: calc(16px + var(--safe-t, 0px)) 16px calc(18px + var(--safe-b, 0px));
  border: 0;
  background: radial-gradient(
      ellipse at 50% 45%,
      rgba(40, 24, 56, 0.6),
      transparent 70%
    ), rgba(6, 5, 12, 0.95);
  color: #fff;
  font-family: var(--mm-title);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: zoom-out;
}
.gal-lightbox img {
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  -o-object-fit: contain;
     object-fit: contain;
}

@media (max-width: 760px), (max-height: 520px) {
  .gal-works {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
  .gal-works.is-wide {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .gal-places {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .gal-places .chip-btn {
    flex: none;
  }
  .gal-view {
    height: 56vh;
    height: 56dvh;
  }
}

@media (max-height: 520px) {
  .gal-view {
    min-height: 200px;
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gal-album[data-on="true"] .gal-disc img {
    animation: none;
  }
}
.gallery-screen .gal-tracks .chip-btn {
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
}
/* Field guide: chapter rail, copy plate and a live visual for each chapter. */
.guide {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px 20px;
  padding: calc(16px + var(--safe-t)) max(20px, 3vw) calc(20px + var(--safe-b));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23ffe4cc' stroke-opacity='0.09' vector-effect='non-scaling-stroke'%3E%3Cellipse cx='1060' cy='470' rx='640' ry='380'/%3E%3Cellipse cx='1060' cy='470' rx='420' ry='250' stroke-dasharray='14 6'/%3E%3Cellipse cx='1060' cy='470' rx='900' ry='540' stroke-opacity='0.05' stroke-dasharray='2 7'/%3E%3C/g%3E%3C/svg%3E")
    center / cover no-repeat,
    radial-gradient(
      ellipse at 70% 40%,
      rgba(255, 140, 63, 0.08),
      transparent 60%
    ), var(--dusk);
  color: var(--vellum);
  overflow: hidden;
}

.guide-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-title {
  display: grid;
  gap: 2px;
  padding: 8px 16px 9px;
}
.guide-title strong {
  font-family: var(--label);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.guide-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.guide-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  text-align: left;
  font-family: var(--mm-title);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.55);
  border: 0;
  background: none;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
.guide-nav button .num {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--holo);
  opacity: 0.6;
}
.guide-nav button:hover {
  color: var(--vellum);
  background: rgba(255, 228, 204, 0.04);
}
.guide-nav button[aria-current="true"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 140, 63, 0.18), transparent);
  box-shadow: inset 3px 0 0 var(--holo);
}
.guide-nav button[aria-current="true"] .num {
  opacity: 1;
}

.guide-stage {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
}
.guide-copy {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  animation: home-in 0.45s ease-out both;
}
.guide-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 22px 24px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.guide-kicker {
  color: var(--holo);
}
.guide-copy h2 {
  font-family: var(--mm-title);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
}
.guide-copy p {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(238, 232, 242, 0.86);
}
.guide-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.guide-facts li {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--holo);
  background: rgba(255, 140, 63, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.3);
}
.guide-pager {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--hair);
}
.guide-btn {
  height: 40px;
  padding: 0 18px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vellum);
  background: rgba(238, 243, 241, 0.05);
  border: 1px solid var(--hair);
  clip-path: var(--cut-sm);
}
.guide-btn.primary {
  margin-left: auto;
  color: #1d0f06;
  background: var(--ember);
  border-color: transparent;
}
.guide-btn:disabled {
  opacity: 0.3;
}

.guide-visual {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--mm-panel);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.guide-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.guide-cards,
.guide-heroes {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, 210px);
  grid-auto-rows: 1fr;
  align-content: start;
  align-content: safe center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  overflow-y: auto;
}
.guide-heroes .hero-card {
  width: 210px;
}
.guide-gear,
.guide-statuses {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  align-content: start;
  align-content: safe center;
  gap: 10px;
  padding: 20px;
  overflow-y: auto;
}
.guide-gear li {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #c9d6d3;
}
.guide-gear strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mm-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}
.guide-ability {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--hair);
  color: #e6cf9a;
}
.guide-statuses > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-left: 3px solid var(--sc) !important;
}
.guide-statuses dt {
  font-family: var(--label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc);
}
.guide-statuses dd {
  font-size: 12.5px;
  line-height: 1.45;
  color: #c9d6d3;
}
.guide-keys {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-content: start;
  align-content: safe center;
  gap: 10px 20px;
  padding: 24px;
}
.guide-keys > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.guide-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--holo);
  background: radial-gradient(
    circle at 50% 30%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.4), inset 0 -3px 0
    rgba(255, 176, 102, 0.35);
}
.guide-keys dd {
  font-size: 13.5px;
  color: #c9d6d3;
}

@media (max-width: 900px) {
  .guide {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b));
  }
  .guide-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .guide-nav button {
    flex: none;
    height: 36px;
  }
  .guide-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  .guide-copy {
    order: 2;
  }
  .guide-text {
    padding: 16px 16px 12px;
  }
  .guide-pager {
    padding: 10px 16px 12px;
  }
  .guide-copy h2 {
    font-size: 22px;
  }
  .guide-copy p {
    font-size: 13.5px;
  }
}

.guide-visual .guide-say {
  top: auto;
  right: auto;
  z-index: 2;
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 9px 14px;
  font-family: var(--label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--vellum);
  box-shadow: inset 3px 0 0 var(--holo);
  pointer-events: none;
  animation: guide-say 0.35s ease-out both;
}
@keyframes guide-say {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.guide-kits {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
  align-content: safe center;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
}
.guide-kits article {
  display: grid;
  gap: 6px;
  padding: 12px 14px 14px;
}
.guide-kit-sprites {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 2px;
  background: radial-gradient(
    ellipse at 50% 85%,
    rgba(111, 240, 214, 0.12),
    transparent 70%
  );
}
.guide-kits strong {
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--holo);
}
.guide-kits p {
  font-size: 12.5px;
  line-height: 1.45;
  color: #c9d6d3;
}
.guide-steps {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-content: start;
  align-content: safe center;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}
.guide-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  -moz-column-gap: 12px;
       column-gap: 12px;
  row-gap: 6px;
  align-items: center;
  padding: 14px 16px 16px;
}
.guide-step-n {
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: var(--label);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--holo);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.guide-steps strong {
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--holo);
}
.guide-steps p {
  grid-column: 1 / -1;
  align-self: start;
  font-size: 12.5px;
  line-height: 1.5;
  color: #c9d6d3;
}
.guide-keywords dt {
  text-transform: none;
}
.guide-glossary {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
  overflow-y: auto;
}
.guide-glossary h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 8px;
  font-family: var(--label);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--vellum);
}
.guide-glossary h3 span {
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: #9fb0ad;
}
.guide-glossary .guide-keywords {
  height: auto;
  padding: 0;
  overflow: visible;
}

@media (max-width: 900px) {
  .guide-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }
  .guide-steps li {
    -moz-column-gap: 8px;
         column-gap: 8px;
    row-gap: 4px;
    padding: 10px 10px 12px;
  }
  .guide-step-n {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .guide-steps strong {
    font-size: 11.5px;
  }
  .guide-steps p {
    font-size: 11.5px;
    line-height: 1.4;
  }
}

.guide-phase {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}
.guide-call .action-call {
  top: 52px;
  left: 12px;
  right: 12px;
}
.guide-visual .fight-frame {
  z-index: 2;
  --dock-h: 60px;
}
.guide-visual .guide-say {
  z-index: 4;
}

.guide-board {
  position: absolute;
  inset: 0;
  transition: opacity 0.35s ease;
}
.guide-board.is-fading {
  opacity: 0;
}

.guide-hand {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  transform: translateX(-50%) scale(var(--hand-scale, 1));
  transform-origin: 50% 100%;
  pointer-events: none;
}
@media (min-width: 761px) {
  .guide-hand {
    --hand-scale: 0.8;
  }
}
.guide-visual .guide-say {
  bottom: calc(var(--hand-h, 0px) + 16px);
}
.guide-hand .hand {
  display: flex;
  align-items: flex-end;
}
.guide-hand .fan-slot {
  margin: 0 3px;
  transform: none;
}
.guide-hand .hand-side.cache .card {
  animation: guide-cache 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes guide-cache {
  from {
    opacity: 0;
    transform: translateX(-60px) scale(0.9);
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .guide {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px 12px;
    padding: calc(8px + var(--safe-t)) max(12px, var(--safe-r))
      calc(8px + var(--safe-b)) max(12px, var(--safe-l));
  }
  .guide-nav {
    align-self: center;
  }
  .guide-stage {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .guide-copy {
    order: 0;
  }
  .guide-text {
    gap: 8px;
    padding: 12px 14px 8px;
  }
  .guide-pager {
    padding: 8px 14px 10px;
  }
  .guide-btn {
    height: 36px;
  }
}
/* Ranks: seed search, a podium for the top three, then the list. */
.ranks {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  padding: calc(16px + var(--safe-t)) max(20px, calc(50vw - 420px))
    calc(32px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(
      ellipse at 50% 0%,
      rgba(255, 140, 63, 0.12),
      transparent 55%
    ), var(--dusk);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  color: var(--vellum);
}
.rk-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rk-title {
  display: grid;
  gap: 2px;
  padding: 8px 16px 9px;
}
.rk-title strong {
  font-family: var(--label);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
}
.rk-search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  font-family: var(--label);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--vellum);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hair);
  clip-path: var(--cut-sm);
}
.rk-search input:focus {
  outline: none;
  border-color: var(--holo);
}
.rk-btn {
  height: 40px;
  padding: 0 16px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vellum);
  background: rgba(238, 243, 241, 0.05);
  border: 1px solid var(--hair);
  clip-path: var(--cut-sm);
}
.rk-btn.primary {
  color: #1d0f06;
  background: var(--ember);
  border-color: transparent;
}
.rk-rule {
  margin-top: -4px;
  font-size: 12.5px;
  color: var(--mute);
}
.rk-status {
  padding: 18px 20px;
  font-size: 14px;
  color: var(--mute);
}
.rk-status.error {
  color: #fb7185;
}

.rk-squad {
  display: flex;
  gap: 3px;
}
.rk-squad img {
  width: 26px;
  height: 26px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  clip-path: var(--cut-sm);
}
.rk-detail {
  font-size: 12px;
  color: var(--mute);
}
.rk-rounds {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-left: auto;
}
.rk-rounds b {
  font-size: 22px;
}
.rk-place {
  font-size: 20px;
  color: var(--holo);
}

.rk-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.rk-top {
  display: grid;
  gap: 6px;
  padding: 16px 16px 14px;
}
.rk-top .rk-place {
  font-size: 34px;
  line-height: 1;
}
.rk-top.rk-1 {
  border-color: rgba(242, 180, 94, 0.55) !important;
  box-shadow: inset 0 3px 0 var(--holo);
}
.rk-top.rk-2 .rk-place {
  color: #d9e4e2;
}
.rk-top.rk-3 .rk-place {
  color: #c99a6b;
}
.rk-name {
  font-family: var(--label);
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-top .rk-rounds {
  margin-left: 0;
}

.rk-list {
  display: grid;
  gap: 6px;
}
.rk-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
}
.rk-list .rk-place {
  width: 30px;
  font-size: 16px;
}
.rk-who {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.rk-who strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranks .mine {
  border-color: var(--holo) !important;
  background: linear-gradient(90deg, rgba(242, 180, 94, 0.12), transparent 60%),
    var(--plate);
}

@media (max-width: 700px) {
  .rk-search {
    flex-wrap: wrap;
  }
  .rk-search input {
    flex-basis: calc(100% - 60px);
  }
  .rk-btn {
    flex: 1;
  }
  .rk-podium {
    grid-template-columns: 1fr;
  }
  .rk-list .rk-squad {
    display: none;
  }
}

.rk-sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 0;
}
.rk-sizes .rk-btn .micro {
  margin-left: 6px;
  opacity: 0.7;
}

.ranks .plate {
  border-color: var(--dusk-line);
  background: var(--dusk-glass);
}

.rk-count {
  margin: 0 0 6px;
  letter-spacing: 0.16em;
  color: var(--mute);
}
.rk-mine {
  margin-bottom: 10px;
}

/* Map language: medal places, orb squads, hairline rows. */
.ranks {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23ffe4cc' stroke-opacity='0.09' vector-effect='non-scaling-stroke'%3E%3Cellipse cx='800' cy='300' rx='640' ry='380'/%3E%3Cellipse cx='800' cy='300' rx='420' ry='250' stroke-dasharray='14 6'/%3E%3Cellipse cx='800' cy='300' rx='900' ry='540' stroke-opacity='0.05' stroke-dasharray='2 7'/%3E%3C/g%3E%3C/svg%3E")
    center top / cover no-repeat fixed,
    radial-gradient(
      ellipse at 50% 0%,
      rgba(255, 140, 63, 0.12),
      transparent 55%
    ), var(--dusk);
}
.ranks .plate {
  border: 0;
  background: var(--mm-panel);
}
.ranks .rk-search input {
  border: 0;
  border-radius: 2px;
  clip-path: none;
  font-family: var(--mm-title);
  background: rgba(10, 7, 22, 0.8);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
}
.ranks .rk-search input:focus {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75), 0 0 16px
    rgba(255, 140, 63, 0.18);
}
.ranks .rk-rule,
.ranks .rk-count {
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.rk-squad {
  gap: 0;
}
.rk-squad img {
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border-radius: 50%;
  clip-path: none;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 2px #120d24, 0 0 0 3px rgba(255, 228, 204, 0.3);
}
.rk-squad img:first-child {
  margin-left: 0;
}
.rk-rounds b {
  font-family: var(--mm-title);
  font-weight: 600;
  color: #fff;
}
.rk-name,
.rk-who strong {
  font-family: var(--mm-title);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rk-list .rk-place {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--mm-title);
  font-size: 13px;
  font-weight: 600;
  color: var(--holo);
  background: rgba(14, 10, 28, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.45);
}
.rk-top {
  justify-items: center;
  gap: 8px;
  padding: 20px 16px 16px;
  text-align: center;
}
.rk-top .rk-place {
  --medal: #f2b45e;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-family: var(--mm-title);
  font-size: 28px;
  font-weight: 600;
  color: var(--medal);
  background: radial-gradient(
    circle at 50% 30%,
    color-mix(in srgb, var(--medal) 28%, #1c1430),
    rgba(12, 9, 26, 0.95)
  );
  box-shadow: 0 0 0 1px var(--medal), 0 0 0 5px rgba(14, 10, 28, 0.7), 0 0 0 6px
    color-mix(in srgb, var(--medal) 30%, transparent), 0 0 26px
    color-mix(in srgb, var(--medal) 30%, transparent);
}
.rk-top.rk-1 {
  box-shadow: inset 0 0 0 1px rgba(242, 180, 94, 0.55), inset 0 3px 0 #f2b45e !important;
}
.rk-top.rk-2 .rk-place {
  --medal: #d9e4e2;
  color: #d9e4e2;
}
.rk-top.rk-3 .rk-place {
  --medal: #c99a6b;
  color: #c99a6b;
}
.ranks .mine {
  background: linear-gradient(90deg, rgba(255, 140, 63, 0.16), transparent 60%),
    var(--mm-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75), inset 3px 0 0 #ff8c3f !important;
}
.battle.ranks .rk-title.plate {
  box-shadow: none;
}
.battle.ranks .rk-btn {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .battle.ranks .rk-btn {
    padding: 0 10px;
    font-size: 11.5px;
    letter-spacing: 0.08em;
  }
  .rk-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: start;
    align-items: center;
    text-align: left;
    padding: 12px 14px;
  }
  .rk-top .rk-place {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
  .rk-top .rk-squad {
    display: none;
  }
}

.rk-sizes.rk-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.rk-sizes.rk-scroll .rk-btn {
  flex: none;
}
.ranks .rk-btn.rk-play {
  flex: none;
  align-self: flex-start;
  width: auto;
  min-width: 220px;
  min-height: 44px;
}
.rk-climb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 18px;
}
.rk-climb strong {
  font-family: var(--mm-title);
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--holo);
}
.rk-climb span {
  font-size: 13px;
  color: var(--mute);
}
/* Title screen: the painted parallax vista, the logo and the press any key line. */
.home {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--dusk);
  color: var(--vellum);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.home-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      90deg,
      rgba(11, 9, 26, 0.88) 0%,
      rgba(11, 9, 26, 0.6) 26%,
      rgba(11, 9, 26, 0.08) 52%,
      rgba(11, 9, 26, 0) 70%
    ), linear-gradient(0deg, rgba(11, 9, 26, 0.85) 0%, rgba(11, 9, 26, 0) 22%),
    linear-gradient(180deg, rgba(11, 9, 26, 0.5) 0%, rgba(11, 9, 26, 0) 18%);
}

.home-main {
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(24px, 7vw, var(--safe-l));
  width: min(600px, 48vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 3.6vh, 36px);
  gap: clamp(18px, 3.6dvh, 36px);
}

.home-logo {
  animation: home-rise 1.8s 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.home-title {
  margin: 0;
  line-height: 0;
}
.home-title img {
  display: block;
  width: min(480px, 40vw);
  height: auto;
  filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 30px rgba(255, 150, 70, 0.18));
  -webkit-user-drag: none;
}

.home-press {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.86);
  animation: home-fade 1s 2s ease-out both, home-breathe 2.8s 3s ease-in-out
    infinite;
}
.home-press-touch {
  display: none;
}
@media (hover: none) {
  .home-press-touch {
    display: inline;
  }
  .home-press-keys {
    display: none;
  }
}

.home-foot {
  position: absolute;
  left: max(24px, 7vw, var(--safe-l));
  right: max(24px, 4vw, var(--safe-r));
  bottom: calc(22px + var(--safe-b));
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--dusk-line);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(238, 243, 241, 0.7);
  animation: home-fade 1.2s 1.6s ease-out both;
}
.home-help {
  flex: 1;
  min-width: 0;
  animation: home-fade 0.4s ease-out both;
}

@keyframes home-fade {
  from {
    opacity: 0;
  }
}
@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
}
@keyframes home-slide {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
}
@keyframes home-breathe {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home *,
  .home .title-art {
    animation: none !important;
    transition: none !important;
  }
}
/* Main menu inside the painted vista: every mode is a lit marker in the scene (markers live in the title art's
   stage and share its parallax and drift), and one caption at the bottom names the selected mode. */
.home.is-open {
  --mm-gutter: max(32px, 4vw, var(--safe-l));
  --mm-cap-h: 132px;
}
.home .ta-hero {
  transition: opacity 0.6s;
}
.home.is-open .ta-hero {
  opacity: 0;
}
.home.is-open .home-veil {
  background: radial-gradient(
    55% 38% at 0% 0%,
    rgba(11, 9, 26, 0.75),
    rgba(11, 9, 26, 0) 75%
  );
}
.home.is-open .home-main {
  z-index: 4;
  top: calc(22px + var(--safe-t));
  bottom: auto;
  left: var(--mm-gutter);
  width: auto;
  justify-content: flex-start;
  pointer-events: none;
}
.home-title img {
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.6s;
}
.home.is-open .home-logo {
  animation: none;
}
.home.is-open .home-title img {
  width: min(210px, 30vw);
}

.mm-map {
  --orb: min(92px, 9vh);
  --orb-main: min(150px, 14vh);
  --medal: 46px;
  position: absolute;
  inset: 0;
  z-index: 2;
}
.mm-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(10, 7, 22, 0.42) 0%,
    rgba(10, 7, 22, 0.82) 72%
  );
  pointer-events: none;
}
.mm-linework {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  animation: mm-fade 1.2s 0.1s ease-out both;
}
.mm-linework * {
  fill: none;
  stroke: rgba(255, 228, 204, 0.26);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.mm-orbit.is-far {
  stroke: rgba(255, 228, 204, 0.12);
  stroke-dasharray: 2 7;
}
.mm-orbit.is-near {
  stroke: rgba(255, 228, 204, 0.16);
  stroke-dasharray: 14 6;
}
.mm-axis {
  stroke: rgba(255, 228, 204, 0.1);
}
.mm-spoke {
  stroke: rgba(255, 200, 150, 0.16);
  stroke-dasharray: 3 5;
}

.mm-node {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(246, 236, 226, 0.86);
  font-family: "Chakra Petch", system-ui, sans-serif;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: color 0.2s;
  animation: mm-node-in 0.7s calc(0.1s + var(--i) * 45ms)
    cubic-bezier(0.2, 0.8, 0.2, 1) both;
  -webkit-tap-highlight-color: transparent;
}
.mm-node:hover,
.mm-node.is-at {
  color: #fff;
}
.mm-disc {
  position: relative;
  display: grid;
  place-items: center;
}
.mm-text {
  position: absolute;
  display: grid;
  gap: 4px;
  white-space: nowrap;
  text-align: left;
  pointer-events: none;
}
.mm-name {
  padding-left: 0.42em;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(8, 5, 18, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: letter-spacing 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mm-node.is-at .mm-name {
  letter-spacing: 0.5em;
}
.mm-tag {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--holo);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.mm-orb .mm-disc {
  width: var(--orb);
  height: var(--orb);
  border-radius: 50%;
  transition: transform 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.mm-orb.is-arcade .mm-disc {
  width: var(--orb-main);
  height: var(--orb-main);
}
.mm-orb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  filter: saturate(1.05) brightness(0.92);
  -webkit-user-drag: none;
}
.mm-orb .mm-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 30%,
    rgba(255, 240, 220, 0.18) 0%,
    rgba(255, 240, 220, 0) 34%,
    rgba(6, 4, 14, 0) 52%,
    rgba(6, 4, 14, 0.72) 86%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 230, 205, 0.35), 0 0 34px
    rgba(255, 150, 70, 0.12);
}
.mm-orb .mm-disc::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 228, 204, 0.22);
  outline: 1px dashed rgba(255, 228, 204, 0.14);
  outline-offset: 8px;
  transition: border-color 0.25s, inset 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.mm-orb .mm-text {
  top: calc(100% + 22px);
  left: 50%;
  transform: translateX(-50%);
  justify-items: center;
  text-align: center;
}
.mm-orb.is-north .mm-text {
  top: auto;
  bottom: calc(100% + 22px);
}
.mm-orb.is-at .mm-disc {
  transform: scale(1.07);
}
.mm-orb.is-at .mm-disc::before {
  inset: -16px;
  border-color: rgba(255, 176, 102, 0.85);
  animation: mm-spin 26s linear infinite;
}
.mm-orb.is-at .mm-disc::after {
  box-shadow: inset 0 0 0 1px rgba(255, 210, 160, 0.7), 0 0 48px
    rgba(255, 150, 70, 0.35);
}

.mm-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mm-medal .medal {
  --size: var(--medal);
}
.mm-medal .mm-text {
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  justify-items: center;
  text-align: center;
}
.mm-medal .mm-name {
  font-size: 11px;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
}
.mm-medal.is-at .mm-name {
  letter-spacing: 0.36em;
}
.mm-medal .medal.is-at {
  transform: scale(1.08);
}

.mm-reticle {
  position: absolute;
  inset: -22px;
  pointer-events: none;
  animation: mm-reticle 0.32s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
.mm-medal .mm-reticle {
  inset: -13px;
}
.mm-reticle i {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 0 solid var(--holo);
  filter: drop-shadow(0 0 4px rgba(255, 150, 70, 0.7));
}
.mm-reticle i:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}
.mm-reticle i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}
.mm-reticle i:nth-child(3) {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}
.mm-reticle i:nth-child(4) {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.mm-caption {
  position: absolute;
  z-index: 3;
  left: var(--mm-gutter);
  right: max(32px, 4vw, var(--safe-r));
  bottom: calc(24px + var(--safe-b));
  height: var(--mm-cap-h);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  pointer-events: none;
}
.mm-caption::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: calc(var(--mm-cap-h) + 120px + var(--safe-b));
  background: linear-gradient(
    0deg,
    rgba(10, 7, 22, 0.92) 0%,
    rgba(10, 7, 22, 0.7) 45%,
    rgba(10, 7, 22, 0) 100%
  );
}
.mm-cap-text {
  min-width: 0;
  max-width: 640px;
  animation: mm-caption 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.mm-cap-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--holo);
}
.mm-cap-kicker b {
  color: rgba(238, 243, 241, 0.7);
}
.mm-cap-title {
  margin: 2px 0 6px;
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 18px rgba(255, 150, 70, 0.35);
}
.mm-cap-help {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(238, 243, 241, 0.86);
}
.mm-cap-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--mute);
}
.home.is-compact-map .mm-cap-facts span:nth-child(n + 2) {
  display: none;
}
.mm-cap-facts b {
  margin-left: 4px;
  font-weight: 600;
  color: var(--vellum);
}
.mm-cap-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: auto;
}
.mm-cap-choices button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--dusk-line-strong);
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  color: var(--vellum);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(6px);
  animation: mm-caption 0.35s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mm-cap-choices button em {
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--aether);
}
.mm-cap-choices button:hover,
.mm-cap-choices button.is-at {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
}
.mm-cap-choices button:hover em,
.mm-cap-choices button.is-at em {
  color: #1a0f14;
}

.mm-map.is-compact {
  --orb: clamp(56px, 8vw, 80px);
  --orb-main: clamp(84px, 12vw, 116px);
  --medal: clamp(40px, 6vw, 48px);
}
.mm-map.is-short {
  --orb: 48px;
  --orb-main: 72px;
  --medal: 36px;
}
.mm-map.is-short .mm-tag {
  display: none;
}
.mm-map.is-compact .mm-orb .mm-text {
  top: calc(100% + 16px);
}
.mm-map.is-compact .mm-orb.is-north .mm-text {
  top: auto;
  bottom: calc(100% + 16px);
}
.mm-map.is-compact .mm-orb .mm-disc::before {
  inset: -8px;
  outline-offset: 5px;
}
.mm-map.is-compact .mm-orb.is-at .mm-disc::before {
  inset: -11px;
}
.mm-map.is-compact .mm-name {
  font-size: 12px;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
}
.mm-map.is-compact .mm-node.is-at .mm-name {
  letter-spacing: 0.32em;
}
.mm-map.is-compact .mm-medal .mm-text {
  display: none;
}
.mm-map.is-compact .mm-medal .mm-name {
  font-size: 9.5px;
  letter-spacing: 0.2em;
}
.mm-map.is-compact .mm-medal.is-at .mm-name {
  letter-spacing: 0.24em;
}
.mm-map.is-compact .mm-reticle {
  inset: -16px;
}
.mm-map.is-compact .mm-medal .mm-reticle {
  inset: -10px;
}

.mm-map.is-wide {
  --orb: 44px;
  --orb-main: 64px;
  --medal: 32px;
}
.mm-map.is-wide .mm-tag {
  display: none;
}
.home.is-wide-map .mm-caption {
  top: calc(58px + var(--safe-t));
  bottom: calc(10px + var(--safe-b));
  left: max(18px, var(--safe-l));
  right: auto;
  width: min(270px, 32vw);
  height: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}
.home.is-wide-map .mm-caption::before {
  top: 0;
  right: auto;
  width: calc(min(270px, 32vw) + 120px + var(--safe-l));
  height: auto;
  background: linear-gradient(
    90deg,
    rgba(10, 7, 22, 0.92) 0%,
    rgba(10, 7, 22, 0.7) 60%,
    rgba(10, 7, 22, 0) 100%
  );
}
.home.is-wide-map .mm-cap-choices {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
}
.home.is-wide-map .mm-cap-choices button {
  width: 100%;
  min-height: 34px;
}

@keyframes mm-node-in {
  from {
    opacity: 0;
    scale: 0.85;
  }
}
@keyframes mm-fade {
  from {
    opacity: 0;
  }
}
@keyframes mm-spin {
  to {
    rotate: 360deg;
  }
}
@keyframes mm-reticle {
  from {
    opacity: 0;
    scale: 1.35;
  }
}
@keyframes mm-caption {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 760px) {
  .home-veil {
    background: linear-gradient(
        180deg,
        rgba(11, 9, 26, 0.86) 0%,
        rgba(11, 9, 26, 0.68) 52%,
        rgba(11, 9, 26, 0) 76%
      ), linear-gradient(0deg, rgba(11, 9, 26, 0.92) 0%, rgba(11, 9, 26, 0) 24%);
  }
  .home-main {
    left: 24px;
    right: 24px;
    width: auto;
    justify-content: flex-start;
    padding-top: calc(clamp(20px, 6vh, 56px) + var(--safe-t));
    padding-top: calc(clamp(20px, 6dvh, 56px) + var(--safe-t));
  }
  .home-title img {
    width: min(320px, 78vw);
  }
  .home-foot {
    left: 24px;
    right: 24px;
    font-size: 11.5px;
  }
  .home.is-open {
    --mm-gutter: 18px;
    --mm-cap-h: 168px;
  }
  .home.is-open .home-veil {
    background: radial-gradient(
      90% 22% at 0% 0%,
      rgba(11, 9, 26, 0.75),
      rgba(11, 9, 26, 0) 80%
    );
  }
  .home.is-open .home-main {
    top: calc(14px + var(--safe-t));
    right: auto;
    padding-top: 0;
  }
  .home.is-open .home-title img {
    width: 136px;
  }
  .mm-caption {
    right: var(--mm-gutter);
    bottom: calc(16px + var(--safe-b));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
  }
  .mm-cap-title {
    font-size: 28px;
  }
  .mm-cap-help {
    font-size: 13.5px;
    line-height: 1.45;
  }
  .mm-cap-choices {
    flex-wrap: nowrap;
    justify-content: stretch;
    gap: 6px;
  }
  .mm-cap-choices li {
    flex: 1;
    min-width: 0;
  }
  .mm-cap-choices button {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 0 6px;
    font-size: 11.5px;
    letter-spacing: 0.06em;
    white-space: normal;
    text-align: center;
  }
  .mm-cap-choices button em {
    display: none;
  }
}

@media (max-height: 520px) {
  .home-main {
    top: calc(10px + var(--safe-t));
    bottom: calc(40px + var(--safe-b));
    justify-content: flex-start;
    gap: 10px;
  }
  .home-title img {
    width: auto;
    height: clamp(44px, 15vh, 64px);
    height: clamp(44px, 15dvh, 64px);
  }
  .home-foot {
    bottom: calc(8px + var(--safe-b));
    padding-top: 6px;
  }
  .home.is-open {
    --mm-gutter: max(18px, var(--safe-l));
    --mm-cap-h: 72px;
  }
  .home.is-open .home-main {
    top: calc(10px + var(--safe-t));
  }
  .home.is-open .home-title img {
    width: auto;
    height: 34px;
  }
  .mm-map {
    --orb: min(62px, 15vh);
    --orb-main: min(96px, 24vh);
    --medal: 34px;
  }
  .mm-name {
    font-size: 12px;
    letter-spacing: 0.3em;
  }
  .mm-medal .mm-name {
    font-size: 9px;
    letter-spacing: 0.2em;
  }
  .mm-medal .mm-text {
    top: calc(100% + 8px);
  }
  .mm-caption {
    right: max(18px, var(--safe-r));
    bottom: calc(10px + var(--safe-b));
    align-items: flex-end;
    gap: 16px;
  }
  .mm-caption::before {
    height: calc(var(--mm-cap-h) + 60px + var(--safe-b));
  }
  .mm-cap-kicker {
    font-size: 9.5px;
  }
  .mm-cap-title {
    margin: 0 0 2px;
    font-size: 22px;
  }
  .mm-cap-help {
    font-size: 12px;
    line-height: 1.35;
  }
  .mm-cap-choices {
    flex-wrap: nowrap;
  }
  .mm-cap-choices button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-node,
  .mm-linework,
  .mm-reticle,
  .mm-orb .mm-disc::before,
  .mm-cap-text,
  .mm-cap-choices button {
    animation: none !important;
  }
}
/* Shared screen frame in the main menu's language: dimmed painting, orbit linework, medallion buttons,
   spaced capitals for headings, dark caption panels and ember choices. */
.sf {
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--vellum);
  background: var(--dusk);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
}
.sf > .dusk-backdrop {
  filter: brightness(0.34) saturate(0.8) blur(2px);
}
.sf::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 66% 52%,
    rgba(10, 7, 22, 0.15) 0%,
    rgba(10, 7, 22, 0.75) 80%
  );
}
.sf-linework {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: sf-fade 1.2s ease-out both;
}
.sf-linework * {
  fill: none;
  stroke: rgba(255, 228, 204, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.sf-linework .is-near {
  stroke-dasharray: 14 6;
}
.sf-linework .is-far {
  stroke: rgba(255, 228, 204, 0.07);
  stroke-dasharray: 2 7;
}
.sf > * {
  position: relative;
  z-index: 1;
}
.sf > .dusk-backdrop,
.sf > .sf-linework {
  position: absolute;
  z-index: 0;
}

.sf-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sf-heading {
  display: grid;
  gap: 2px;
}
.sf-heading small,
.sf-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--holo);
}
.sf-heading h1,
.sf-title {
  margin: 0;
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 18px rgba(255, 150, 70, 0.3);
}

.medal {
  --size: 46px;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 236, 220, 0.85);
  background: radial-gradient(
    circle at 50% 35%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.45), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 220, 190, 0.18);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.25s, transform 0.3s
    cubic-bezier(0.2, 1.3, 0.4, 1);
}
.medal:hover,
.medal:focus-visible,
.medal.is-at {
  color: #1a0f14;
  background: var(--ember);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 220, 0.7), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 176, 102, 0.7), 0 0 26px
    rgba(255, 150, 70, 0.45);
}

.sf-panel {
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.86),
    rgba(10, 7, 22, 0.94)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.12), 0 20px 50px
    rgba(4, 2, 12, 0.45);
  backdrop-filter: blur(6px);
}
.sf-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--holo);
}
.sf-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 228, 204, 0.22), transparent);
}

.sf-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--dusk-line-strong);
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  color: var(--vellum);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sf-choice:hover:not(:disabled),
.sf-choice.is-at {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
}
.sf-choice:disabled {
  opacity: 0.45;
  cursor: default;
}
.sf-choice.is-quiet {
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
}
.sf-choice.is-warn {
  border-color: #fda4af;
  color: #1a0f14;
  background: #fda4af;
}

@keyframes sf-fade {
  from {
    opacity: 0;
  }
}
/* Hero loadout: stats up top, weapon and deck side by side, equipment slots below. */
.battle .lo {
  position: absolute;
  top: calc(96px + var(--safe-t));
  right: 16px;
  bottom: calc(16px + var(--safe-b));
  width: min(640px, calc(100vw - 360px));
}
.lo {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "traits traits"
    "stats stats"
    "weapon deck"
    "gear gear";
  align-content: start;
  gap: 16px 18px;
  padding: 0 20px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  color: var(--vellum);
}

.lo-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.32em !important;
  color: var(--holo) !important;
}
.lo-label::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--holo);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    rgba(255, 176, 102, 0.4);
}
.lo-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent);
}

.lo-head {
  grid-area: head;
  position: relative;
  display: flex;
  align-items: flex-end;
  height: clamp(140px, 19vh, 200px);
  height: clamp(140px, 19dvh, 200px);
  margin: 0 -20px;
  padding: 0 20px 16px;
  overflow: hidden;
  border-bottom: 0;
  background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--hc) 70%, transparent),
      transparent 80%
    )
    bottom / 100% 1px no-repeat,
    radial-gradient(
      80% 120% at 85% 20%,
      color-mix(in srgb, var(--hc) 26%, transparent),
      transparent 70%
    );
}
.lo-art {
  position: absolute;
  top: 0;
  right: 0;
  width: 66%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 15%;
     object-position: 50% 15%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  animation: lo-art 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.lo-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 45%,
    rgba(12, 10, 28, 0.82) 100%
  );
  pointer-events: none;
}
.lo-name {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 0;
}
.lo-name .micro {
  font-weight: 600;
  letter-spacing: 0.3em !important;
  color: var(--hc) !important;
}
.lo-name strong {
  display: block;
  font-family: var(--mm-title);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 28px color-mix(in srgb, var(--hc) 55%, transparent), 0 2px
    10px rgba(8, 6, 20, 0.9);
}
.lo-traits {
  grid-area: traits;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
}
.lo-traits p {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(238, 232, 242, 0.86);
}
.lo-traits > p > b:not(.kw) {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--holo);
}
.lo-close {
  display: none;
}
@keyframes lo-art {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

.lo-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  border: 0;
}
.lo-stat {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px 11px;
  border: 0;
  background: rgba(10, 7, 22, 0.55);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0
    color-mix(in srgb, var(--hc, var(--holo)) 55%, transparent);
}
.lo-stat:first-child {
  padding-left: 12px;
}
.lo-stat dt {
  font-weight: 600;
  letter-spacing: 0.24em !important;
}
.lo-stat dd {
  font-family: var(--mm-title);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}
.lo-stat small {
  margin-left: 4px;
  font-size: 12px;
  color: var(--holo);
}

.lo-weapon {
  grid-area: weapon;
}
.lo-weapon-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.lo-weapon-body > .card {
  flex: none;
}
.lo-choices {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.lo-choice {
  display: grid;
  gap: 4px;
  padding: 10px 12px 11px;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(238, 232, 242, 0.78);
  background: rgba(10, 7, 22, 0.55);
  border: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  transition: box-shadow 0.15s, background 0.15s;
}
.lo-choice strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mm-title);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  flex-wrap: wrap;
}
.lo-choice strong em {
  flex-basis: 100%;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--hc);
}
.lo-choice:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.55);
}
.lo-choice[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(255, 140, 63, 0.16), transparent),
    rgba(10, 7, 22, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.8), inset 3px 0 0 #ff8c3f, 0
    0 18px rgba(255, 140, 63, 0.15);
}

.lo-deck {
  grid-area: deck;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lo-deck p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.lo-deck p b {
  font-family: var(--mm-title);
  font-size: 28px;
  font-weight: 600;
  color: #fff;
}
.lo-deck ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  font-size: 13px;
  text-transform: capitalize;
  color: #c9d6d3;
}
.lo-deck li b {
  display: inline-block;
  min-width: 22px;
  color: var(--vellum);
}
.lo-btn {
  height: 44px;
  margin-top: auto;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #1d0f06;
  background: var(--ember);
  border: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4), 0 8px 22px
    rgba(255, 120, 50, 0.22);
  transition: filter 0.2s;
}
.lo-btn:hover {
  filter: brightness(1.08);
}

.lo-gear {
  grid-area: gear;
}
.lo-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.lo-slot {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 92px;
  padding: 10px 11px 11px;
  text-align: left;
  color: var(--vellum);
  background: rgba(10, 7, 22, 0.55);
  border: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  transition: box-shadow 0.15s;
}
.lo-slot:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.55);
}
.lo-slot strong {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.lo-slot-meta {
  font-size: 11.5px;
  color: rgba(238, 232, 242, 0.6);
}
.lo-slot[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.85), inset 0 -3px 0 #ff8c3f;
}
.lo-ability {
  font-size: 12px;
  color: #e6cf9a;
}
.lo-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .battle .lo {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 82dvh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "traits"
      "stats"
      "weapon"
      "gear"
      "deck";
    padding: 0 14px calc(16px + var(--safe-b));
    background: linear-gradient(180deg, #1b1638, #0d0b20);
    transform: translateY(105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 20;
  }
  .battle .lo.open {
    transform: none;
  }
  .lo-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
  }
  .lo-head {
    height: 168px;
    margin: 0 -14px;
    padding: 0 14px 12px;
  }
  .lo-traits {
    grid-template-columns: minmax(0, 1fr);
  }
  .lo-stat {
    padding: 8px 6px 9px;
  }
  .lo-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .lo-stat dd {
    font-size: 17px;
  }
  .lo-slots,
  .lo-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lo-weapon-body > .card {
    display: none;
  }
}

.lo-form {
  margin-top: 6px;
  min-height: 30px;
  padding: 0 14px;
  font-family: var(--mm-title);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  background: rgba(12, 10, 28, 0.78);
  border: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.55);
}
.lo-form[aria-pressed="true"] {
  color: #1d0f06;
  background: var(--ember);
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4);
}

.deck-picker {
  display: grid;
  gap: 6px;
}
.deck-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.deck-pick {
  max-width: 100%;
  padding: 6px 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--mm-title);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(238, 232, 242, 0.78);
  background: rgba(10, 7, 22, 0.6);
  border: 1px solid var(--mm-hair-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.deck-pick:hover {
  color: #fff;
  border-color: rgba(255, 176, 102, 0.6);
}
.deck-pick[aria-checked="true"] {
  color: #1d0f06;
  border-color: transparent;
  background: var(--ember);
  box-shadow: 0 0 14px rgba(255, 140, 63, 0.25);
}
.deck-pick.is-new {
  border-style: dashed;
  color: var(--holo);
}
.deck-sync {
  color: rgba(238, 243, 241, 0.55);
}
.deck-sync.is-synced {
  color: #86efac;
}
.deck-sync.is-error {
  color: #fda4af;
}
.deck-signin {
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--holo);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.lo-kit-note {
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(238, 243, 241, 0.6);
}
/* Preparations: the real battlefield in 3D with the squad, intel and loadout docked around it. */
.prep-survey {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--dusk);
  color: var(--vellum);
}

.prep-survey .survey-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.prep-survey .ps-top {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.prep-survey .ps-top > * {
  pointer-events: auto;
}
.prep-survey .ps-title {
  display: grid;
  gap: 3px;
  padding: 9px 16px 10px;
  min-width: 0;
}
.prep-survey .ps-title strong {
  font-family: var(--label);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.prep-survey .ps-fight {
  margin-left: auto;
  min-width: 190px;
  gap: 18px;
}

.prep-survey .ps-squad {
  position: absolute;
  left: 16px;
  top: calc(96px + var(--safe-t));
  display: grid;
  gap: 8px;
  width: 220px;
}
.prep-survey .ps-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 12px 0 6px;
  text-align: left;
  color: var(--vellum);
  transition: border-color 0.15s, transform 0.15s;
}
.prep-survey .ps-hero-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.prep-survey .ps-hero strong {
  font-family: var(--label);
  font-size: 15px;
  font-weight: 700;
}
.prep-survey .ps-hero:hover {
  transform: translateX(3px);
}
.prep-survey .ps-hero.active {
  border-color: var(--hc);
  box-shadow: inset 3px 0 0 var(--hc);
}
.prep-survey .ps-hero.picked {
  border-color: var(--holo);
  animation: ps-pulse 1.1s ease-in-out infinite;
}
@keyframes ps-pulse {
  50% {
    border-color: transparent;
  }
}
.prep-survey .ps-hint {
  margin: 2px 4px 0;
  line-height: 1.5;
  text-shadow: 0 1px 4px #000;
}

.prep-survey .ps-intel {
  position: absolute;
  left: 16px;
  bottom: calc(16px + var(--safe-b));
  display: grid;
  gap: 8px;
  padding: 10px 14px 12px;
  max-width: min(560px, calc(100% - 32px));
}
.prep-survey .ps-intel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prep-survey .ps-intel li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 3px;
  background: rgba(214, 64, 106, 0.08);
  border: 1px solid rgba(214, 64, 106, 0.35);
  clip-path: var(--cut-sm);
  font-size: 12.5px;
}
.prep-survey .ps-intel img {
  width: 30px;
  height: 30px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  clip-path: var(--cut-sm);
}
.prep-survey .ps-intel b {
  color: var(--rift);
}

.prep-survey .gear-slot-label {
  font-family: var(--label);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

@media (max-width: 900px) {
  .prep-survey .ps-fight {
    min-width: 0;
    height: 44px;
    padding: 0 14px 0 24px;
    font-size: 14px;
  }
  .prep-survey .ps-fight .micro {
    display: none;
  }
  .prep-survey .ps-title strong {
    font-size: 14px;
  }
  .prep-survey .ps-squad {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(12px + var(--safe-b));
    width: auto;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }
  .prep-survey .ps-hero .micro {
    display: none;
  }
  .prep-survey .ps-hint {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    width: -moz-max-content;
    width: max-content;
    max-width: 100%;
    margin: 0;
    padding: 5px 12px;
    transform: translateX(-50%);
    text-align: center;
    text-shadow: none;
    background: rgba(14, 11, 30, 0.86);
    border: 1px solid var(--dusk-line);
    clip-path: var(--cut-sm);
  }
  .prep-survey .ps-intel {
    top: calc(80px + var(--safe-t));
    bottom: auto;
    left: 12px;
    padding: 7px 10px 8px;
  }
  .prep-survey .ps-intel-name {
    display: none;
  }
}

/* Map language: orb plates for the party, enemy orbs for intel, spaced capitals over the survey. */
.prep-survey {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
}
.prep-survey::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
      180deg,
      rgba(12, 10, 28, 0.88) 0%,
      rgba(12, 10, 28, 0) 18%
    ),
    linear-gradient(90deg, rgba(12, 10, 28, 0.72) 0%, rgba(12, 10, 28, 0) 22%),
    radial-gradient(
      120% 80% at 50% 120%,
      rgba(255, 140, 63, 0.12),
      transparent 60%
    );
}
.prep-survey .ps-top,
.prep-survey .ps-squad,
.prep-survey .ps-intel {
  z-index: 1;
}
.prep-survey .ps-top {
  align-items: center;
}
.prep-survey .ps-top::before {
  content: "";
  position: absolute;
  inset: calc(-12px - var(--safe-t)) -16px -22px;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 22, 0.78),
    rgba(8, 8, 22, 0.5) 60%,
    rgba(8, 8, 22, 0)
  );
  pointer-events: none;
}
.prep-survey .ps-title {
  flex: 1 1 auto;
  padding: 0 4px;
  text-shadow: 0 1px 2px rgba(4, 6, 14, 0.9);
}
.prep-survey .ps-title > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-survey .ps-title .micro:first-child {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--holo) !important;
}
.prep-survey .ps-title strong {
  font-family: var(--mm-title);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #fff;
}
.prep-survey .ps-fight {
  display: grid;
  flex: none;
  justify-items: end;
  align-content: center;
  gap: 2px;
  margin-left: auto;
  min-width: 200px;
  min-height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 2px;
  background: var(--ember);
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4), 0 10px 30px
    rgba(255, 120, 50, 0.25);
  color: #1d0f06;
  font: inherit;
  clip-path: none;
  transition: filter 0.2s;
}
.prep-survey .ps-fight span {
  font-family: var(--mm-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.prep-survey .ps-fight small {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
}
.prep-survey .ps-fight:hover {
  filter: brightness(1.08);
}

.prep-survey .ps-squad {
  width: 272px;
  gap: 10px;
}
.prep-survey .ps-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 76px;
  padding: 0 14px 0 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px 4px 4px 999px;
  background: radial-gradient(
      120% 160% at 0% 50%,
      color-mix(in srgb, var(--hc) 20%, transparent),
      transparent 55%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.2s, background 0.2s;
}
.prep-survey .ps-hero img {
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  filter: saturate(0.75) brightness(0.85);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hc) 70%, transparent), 0 0 0
    4px rgba(14, 10, 28, 0.75), 0 0 0 5px
    color-mix(in srgb, var(--hc) 25%, transparent);
  transition: filter 0.25s, box-shadow 0.25s;
}
.prep-survey .ps-hero-text {
  position: relative;
  z-index: 1;
  gap: 3px;
}
.prep-survey .ps-hero-text .micro {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--hc) !important;
}
.prep-survey .ps-hero strong {
  font-family: var(--mm-title);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
}
.prep-survey .ps-hero-kit {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: rgba(238, 232, 242, 0.62);
}
.prep-survey .ps-hero-slot {
  position: absolute;
  left: 50px;
  bottom: 6px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  color: var(--holo);
  background: rgba(14, 10, 28, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 176, 102, 0.6);
}
.prep-survey .ps-hero:hover {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.45);
}
.prep-survey .ps-hero:hover img {
  filter: none;
}
.prep-survey .ps-hero.active {
  background: radial-gradient(
      120% 160% at 0% 50%,
      color-mix(in srgb, var(--hc) 32%, transparent),
      transparent 60%
    ), linear-gradient(90deg, transparent 40%, rgba(255, 140, 63, 0.12)),
    var(--mm-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75), 0 0 24px
    rgba(255, 140, 63, 0.18);
}
.prep-survey .ps-hero.active img {
  filter: none;
  box-shadow: var(--mm-ring-on);
}
.prep-survey .ps-hero.picked {
  animation: ps-pick 1.1s ease-in-out infinite;
}
@keyframes ps-pick {
  50% {
    box-shadow: inset 0 0 0 1px rgba(111, 240, 214, 0.9), 0 0 22px
      rgba(111, 240, 214, 0.35);
  }
}
.prep-survey .ps-hint {
  justify-self: start;
  margin: 2px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(238, 232, 242, 0.82);
  text-shadow: none;
  background: rgba(12, 9, 26, 0.9);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
}

.prep-survey .ps-intel {
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
  backdrop-filter: blur(10px);
}
@media (min-width: 901px) {
  .prep-survey .lo.plate {
    border: 0;
    background: radial-gradient(
        80% 30% at 100% 0%,
        color-mix(in srgb, var(--hc, var(--holo)) 14%, transparent),
        transparent 70%
      ), var(--mm-panel);
    box-shadow: inset 0 0 0 1px var(--mm-hair), 0 18px 50px rgba(5, 3, 14, 0.5);
  }
}
.prep-survey .ps-intel > .micro {
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--holo);
}
.prep-survey .ps-intel ul {
  gap: 8px 10px;
}
.prep-survey .ps-intel li {
  position: relative;
  gap: 8px;
  padding: 3px 14px 3px 3px;
  border: 0;
  border-radius: 999px;
  clip-path: none;
  background: rgba(10, 7, 22, 0.7);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.35);
  font-family: var(--mm-title);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.prep-survey .ps-intel img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  clip-path: none;
  -o-object-position: 50% 18%;
     object-position: 50% 18%;
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.7);
}
.prep-survey .ps-intel b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #fff;
  background: #b5203f;
}

@media (max-width: 900px) {
  .prep-survey .ps-squad {
    width: auto;
    gap: 6px;
  }
  .prep-survey .ps-hero {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    height: 92px;
    padding: 8px 4px 6px;
    border-radius: 46px 46px 4px 4px;
    background: radial-gradient(
        100% 70% at 50% 0%,
        color-mix(in srgb, var(--hc) 24%, transparent),
        transparent 70%
      ), var(--mm-panel);
  }
  .prep-survey .ps-hero img {
    width: 48px;
    height: 48px;
  }
  .prep-survey .ps-hero-text {
    justify-items: center;
    max-width: 100%;
  }
  .prep-survey .ps-hero strong {
    font-size: 11.5px;
    letter-spacing: 0.14em;
  }
  .prep-survey .ps-hero-kit,
  .prep-survey .ps-hero-slot {
    display: none;
  }
  .prep-survey .ps-hint {
    border: 0;
    clip-path: none;
  }
  .prep-survey .ps-intel li {
    padding: 2px 8px 2px 2px;
  }
  .prep-survey .ps-intel img {
    width: 28px;
    height: 28px;
  }
  .prep-survey .ps-fight {
    min-width: 0;
    min-height: 44px;
    padding: 0 18px 0 24px;
  }
  .prep-survey .ps-fight small {
    display: none;
  }
  .prep-survey .ps-title strong {
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .prep-survey .ps-fight {
    padding: 0 12px 0 16px;
  }
  .prep-survey .ps-title strong {
    font-size: 13px;
    letter-spacing: 0.14em;
  }
  .prep-survey .ps-title .micro:first-child {
    letter-spacing: 0.16em;
  }
  .prep-survey .ps-fight span {
    font-size: 14px;
    letter-spacing: 0.14em;
  }
  .prep-survey .ps-hero {
    min-width: 0;
  }
  .prep-survey .ps-hero-text {
    min-width: 0;
  }
  .prep-survey .ps-hero strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    letter-spacing: 0.08em;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .prep-survey .ps-hero {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    height: 56px;
    padding: 0 10px 0 6px;
    border-radius: 999px 4px 4px 999px;
    background: radial-gradient(
        120% 160% at 0% 50%,
        color-mix(in srgb, var(--hc) 24%, transparent),
        transparent 55%
      ), var(--mm-panel);
  }
  .prep-survey .ps-hero img {
    width: 42px;
    height: 42px;
  }
  .prep-survey .ps-hero-text {
    justify-items: start;
  }
}
/* Squad picker: every hero as a bust arch grouped by class, the focused hero's painting and dossier beside it,
   the squad bar below. On phones the dossier is a sheet that slides up when a hero is tapped. */
.squad-screen.sq-pick {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 32vw);
  grid-template-rows: 76px minmax(0, 1fr) 92px;
  grid-template-areas:
    "top top"
    "roster focus"
    "foot foot";
  row-gap: 14px;
}

.sq-left {
  grid-area: roster;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sq-jobs {
  flex: none;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sq-jobs button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(14, 10, 30, 0.6);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  color: rgba(238, 243, 241, 0.66);
  font-family: var(--mm-title);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sq-jobs button:hover {
  color: #fff;
}
.sq-jobs button[aria-pressed="true"] {
  background: var(--ember);
  box-shadow: none;
  color: #1d0f06;
}
.sq-pick .sq-brief {
  margin-left: auto;
}
.sq-pick .sq-top h1 {
  white-space: nowrap;
}

.sq-roster {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 18px 24px;
  padding: 6px 6px 10px 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 228, 204, 0.2) transparent;
  --arch: clamp(70px, 5.6vw, 96px);
}
.sq-run {
  display: grid;
  gap: 8px;
  align-content: start;
}
.sq-run-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mm-title);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cc);
}
.sq-run-label::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--cc), 0 0 0 3px rgba(14, 10, 28, 0.8), 0 0 0 4px
    color-mix(in srgb, var(--cc) 40%, transparent);
}
.sq-run-label::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--cc) 50%, transparent),
    transparent
  );
}
.sq-arches {
  display: flex;
  gap: 8px;
}

.sq-arch {
  position: relative;
  flex: none;
  width: var(--arch);
  aspect-ratio: 84 / 116;
  padding: 0;
  border: 0;
  border-radius: calc(var(--arch) / 2) calc(var(--arch) / 2) 8px 8px;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 30%,
    color-mix(in srgb, var(--hc) 30%, #1a1430),
    #0e0a1e
  );
  box-shadow: 0 0 0 1px rgba(255, 228, 204, 0.22), 0 6px 14px rgba(0, 0, 0, 0.4);
  filter: saturate(0.82) brightness(0.86);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease,
    opacity 0.2s;
  animation: sq-info 0.4s ease-out both;
}
.sq-arch img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 0;
     object-position: 50% 0;
}
.sq-arch-name {
  position: absolute;
  inset: auto 0 0;
  padding: 16px 4px 6px;
  background: linear-gradient(180deg, transparent, rgba(8, 6, 20, 0.92) 60%);
  color: #fff;
  font-family: var(--mm-title);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sq-arch.is-in {
  filter: none;
}
.sq-arch.is-off {
  opacity: 0.28;
}
@media (hover: hover) {
  .sq-arch:hover {
    filter: none;
    transform: translateY(-3px);
  }
}
.sq-arch.is-focus {
  filter: none;
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--hc), 0 0 0 5px rgba(14, 10, 28, 0.6), 0 0 0 6px
    rgba(255, 176, 102, 0.7), 0 0 22px rgba(255, 150, 70, 0.35);
}
.sq-arch-slot {
  position: absolute;
  top: 7px;
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 2px rgba(10, 7, 22, 0.9);
  color: #1d0f06;
  font-size: 11px;
  font-weight: 700;
}

.sq-focus {
  grid-area: focus;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(160px, 1fr) auto;
  border-radius: 18px;
  overflow: hidden;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), 0 20px 40px rgba(0, 0, 0, 0.35);
}
.sq-focus-close {
  display: none;
}
.sq-paint {
  position: relative;
  min-height: 0;
  overflow: hidden;
  animation: sq-info 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sq-paint img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 14%;
     object-position: 50% 14%;
}
.sq-paint::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    circle at 50% 30%,
    color-mix(in srgb, var(--hc) 24%, transparent),
    transparent 60%
  );
  mix-blend-mode: screen;
}
.sq-paint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 7, 22, 0.97));
}
.sq-pick .sq-identity {
  position: absolute;
  inset: auto 22px 14px;
  z-index: 2;
  display: grid;
  gap: 6px;
}
.sq-pick .sq-kicker {
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10.5px;
  letter-spacing: 0.26em;
}
.sq-kicker-job {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sq-pick .sq-name {
  margin: 0;
  font-family: var(--mm-title);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
}
.sq-pick .sq-dossier {
  display: grid;
  gap: 12px;
  max-height: 46vh;
  max-height: 46dvh;
  padding: 6px 22px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  animation: sq-info 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sq-pick .sq-blurb {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(238, 243, 241, 0.7);
}
.sq-pick .sq-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.sq-pick .sq-stats > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 228, 204, 0.05);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.sq-pick .sq-stats dt {
  font-size: 10.5px;
  color: rgba(238, 243, 241, 0.5);
}
.sq-pick .sq-stats dd {
  margin: 0;
  font-family: var(--mm-title);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.sq-pick .sq-traits {
  display: grid;
  gap: 8px;
}
.sq-pick .sq-passive {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 228, 204, 0.03);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.sq-pick .sq-passive > span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mm-title);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--hc);
}
.sq-pick .sq-passive p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(238, 243, 241, 0.82);
}
.sq-pick .sq-toggle {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--ember);
  color: #1d0f06;
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: filter 0.2s, opacity 0.2s;
}
.sq-pick .sq-toggle:hover:not(:disabled) {
  filter: brightness(1.08);
}
.sq-pick .sq-toggle.is-in {
  background: rgba(14, 10, 30, 0.7);
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  color: #fff;
}
.sq-pick .sq-toggle:disabled {
  opacity: 0.4;
}

@media (max-width: 1100px) {
  .squad-screen.sq-pick {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 760px) {
  .squad-screen.sq-pick {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
  }
  .sq-pick .sq-left {
    flex: 1;
    margin-top: 10px;
  }
  .sq-pick .sq-jobs {
    margin: 0 -16px;
    padding: 0 16px;
  }
  .sq-pick .sq-roster {
    display: block;
    margin: 0 -16px;
    padding: 0 16px calc(200px + var(--safe-b));
    --arch: auto;
  }
  .sq-pick .sq-run {
    margin-bottom: 16px;
  }
  .sq-pick .sq-arches {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sq-pick .sq-arch {
    width: auto;
    border-radius: 999px 999px 8px 8px;
  }
  .sq-pick .sq-focus {
    position: fixed;
    inset: auto 0 0;
    height: 80vh;
    height: 80dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(105%);
    transition: transform 0.28s ease;
  }
  .sq-pick .sq-focus.is-open {
    transform: none;
  }
  .sq-pick .sq-focus-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(14, 10, 30, 0.75);
    box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
    color: #fff;
  }
  .sq-pick .sq-dossier {
    max-height: none;
    padding-bottom: calc(18px + var(--safe-b));
  }
  .sq-pick .sq-name {
    font-size: 30px;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .squad-screen.sq-pick {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: 44px minmax(0, 1fr) 60px;
    row-gap: 8px;
  }
  .sq-pick .sq-roster {
    --arch: 58px;
    gap: 10px 14px;
  }
  .sq-pick .sq-arch-name {
    font-size: 8.5px;
    letter-spacing: 0.08em;
  }
  .sq-pick .sq-focus {
    grid-template-rows: 120px minmax(0, 1fr);
  }
  .sq-pick .sq-dossier {
    max-height: none;
    padding: 4px 14px 12px;
  }
  .sq-pick .sq-blurb {
    display: none;
  }
  .sq-pick .sq-name {
    font-size: 22px;
  }
}

@media (max-width: 760px) {
  .squad-screen.sq-pick > .sq-focus {
    z-index: 30;
  }
}
/* Stage selection: a large map preview with its briefing, the expedition settings and the way on to the squad. */
.stage-screen {
  grid-template-columns: minmax(0, 1fr) 350px;
  grid-template-rows: 76px minmax(0, 1fr) 92px;
  grid-template-areas:
    "top top"
    "map side"
    "foot foot";
}
.st-map {
  grid-area: map;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
  min-height: 0;
  padding: 22px 0;
  animation: sq-info 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.st-frame {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 0;
  padding: 22px 22px 40px;
  background: radial-gradient(
      ellipse 60% 55% at 50% 48%,
      rgba(255, 140, 63, 0.1),
      transparent 70%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), 0 18px 50px rgba(5, 3, 14, 0.5);
}
.st-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  background:
    linear-gradient(var(--holo), var(--holo)) 0 0 / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 0 0 / 1px 16px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 0 / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 0 / 1px 16px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 0 100% / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 0 100% / 1px 16px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 100% / 16px 1px
    no-repeat, linear-gradient(var(--holo), var(--holo)) 100% 100% / 1px 16px
    no-repeat;
  opacity: 0.7;
  pointer-events: none;
}
.st-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(78%, 70vh);
  aspect-ratio: 1.6;
  border-radius: 50%;
  border: 1px dashed rgba(255, 228, 204, 0.1);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.st-frame canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  -o-object-fit: contain;
     object-fit: contain;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 22px rgba(4, 2, 12, 0.7));
}
.st-legend {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 14px;
  display: flex;
  gap: 18px;
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.62);
}
.st-legend span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 3px rgba(14, 10, 28, 0.9), 0 0 0 4px
    color-mix(in srgb, var(--dot) 50%, transparent), 0 0 10px var(--dot);
}
.st-brief {
  display: grid;
  gap: 14px;
  align-content: center;
  min-width: 0;
  --hc: var(--holo);
}
.st-brief h2 {
  margin: -2px 0 0;
  font-family: var(--mm-title);
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 24px rgba(255, 140, 63, 0.35);
}
.st-brief h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 -2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--holo);
}
.st-brief h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent);
}
.st-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: 0;
}
.st-facts > div {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0
    rgba(255, 176, 102, 0.45);
}
.st-facts dt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.55);
}
.st-facts dd {
  margin: 0;
  font-family: var(--mm-title);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #fff;
}
.st-foes {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.st-foes li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 78px;
  font-family: var(--mm-title);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.82);
}
.st-foes img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 18%;
     object-position: 50% 18%;
  background: radial-gradient(circle at 50% 35%, #3a1426, #12091c);
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.75), 0 0 0 4px rgba(14, 10, 28, 0.7),
    0 0 0 5px rgba(244, 63, 94, 0.25), 0 0 18px rgba(244, 63, 94, 0.25);
}
.st-foes b {
  position: absolute;
  top: -4px;
  right: 6px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #fff;
  background: #b5203f;
  box-shadow: 0 0 0 2px rgba(14, 10, 28, 0.95);
}
.st-summary {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  font-family: var(--mm-title);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mute);
}
.st-summary i,
.sq-brief i {
  flex: none;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

@media (max-width: 1100px) {
  .stage-screen {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .st-map {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .st-map {
    display: block;
    flex: none;
    padding: 14px 0 0;
  }
  .st-frame {
    height: 38vh;
    height: 38dvh;
    padding: 14px 14px 34px;
  }
  .st-legend {
    left: 16px;
    bottom: 10px;
  }
  .st-brief {
    margin-top: 18px;
  }
  .st-summary {
    display: none;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .stage-screen {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-rows: 44px minmax(0, 1fr) 60px;
    grid-template-areas:
      "top top"
      "map side"
      "foot foot";
  }
  .st-map {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    padding: 8px 0;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .st-frame {
    height: 100%;
    padding: 10px 10px 26px;
  }
  .st-frame::before {
    inset: 6px;
  }
  .st-legend {
    left: 12px;
    bottom: 7px;
    gap: 12px;
    font-size: 8.5px;
    letter-spacing: 0.18em;
  }
  .st-brief {
    margin: 0;
    gap: 8px;
    align-content: start;
  }
  .st-brief h2 {
    font-size: 20px;
  }
  .st-facts > div {
    padding: 6px 10px;
  }
  .st-facts dd {
    font-size: 17px;
  }
  .st-facts {
    gap: 6px;
  }
  .st-foes {
    gap: 8px 10px;
  }
  .st-foes li {
    width: 58px;
    font-size: 8.5px;
    letter-spacing: 0.08em;
  }
  .st-foes img {
    width: 38px;
    height: 38px;
  }
  .st-foes b {
    right: 0;
    min-width: 20px;
    height: 17px;
    font-size: 9.5px;
  }
  .stage-screen .sq-side {
    grid-area: side;
    align-self: stretch;
    min-height: 0;
    max-height: none;
    margin: 8px 0;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .st-summary {
    display: none;
  }
  .stage-screen .sq-foot {
    justify-content: flex-end;
  }
}

.st-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  opacity: 0.22;
  filter: saturate(0.7) blur(2px);
  -webkit-mask-image: radial-gradient(
    ellipse 70% 70% at 50% 45%,
    #000 30%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 70% 70% at 50% 45%,
    #000 30%,
    transparent 100%
  );
  pointer-events: none;
}
.st-orb {
  position: relative;
  display: block;
  width: clamp(84px, 9vw, 128px);
  aspect-ratio: 1;
  margin: 0 0 4px;
  border-radius: 50%;
  box-shadow: var(--mm-ring), 0 0 40px rgba(255, 140, 63, 0.18);
}
.st-orb::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 228, 204, 0.16);
  pointer-events: none;
}
.st-orb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  filter: saturate(1.05);
}
.st-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(
      circle at 32% 26%,
      rgba(255, 255, 255, 0.22),
      transparent 40%
    ), radial-gradient(circle at 50% 50%, transparent 55%, rgba(8, 5, 18, 0.6));
  pointer-events: none;
}

@media (max-width: 760px) {
  .st-orb {
    display: none;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .st-orb {
    display: none;
  }
}

.st-lands {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.st-lands button {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(14, 10, 30, 0.72);
  box-shadow: var(--mm-ring);
  color: rgba(238, 232, 242, 0.7);
  cursor: pointer;
  transition: box-shadow 0.2s, filter 0.2s;
}
.st-lands img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  filter: brightness(0.62) saturate(0.8);
  transition: filter 0.2s;
}
.st-lands button:hover img {
  filter: brightness(0.9);
}
.st-lands button[aria-checked="true"] {
  box-shadow: var(--mm-ring-on);
  color: #fff;
}
.st-lands button[aria-checked="true"] img {
  filter: none;
}
.squad-screen.arcade-screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.arcade-screen .sq-top {
  flex: none;
  height: 76px;
}
.ar-points {
  margin: 0 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #cfc6d6;
}
.ar-points b {
  margin-right: 6px;
  font-family: var(--mm-title);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--holo);
}

.ar-strip {
  flex: none;
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.ar-track {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.ar-track li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-family: var(--mm-title);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.45);
}
.ar-track li::before {
  content: "";
  position: absolute;
  top: 11px;
  right: 50%;
  width: 100%;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 228, 204, 0.3) 0 6px,
    transparent 6px 10px
  );
}
.ar-track li:first-child::before {
  display: none;
}
.ar-track li.is-done::before,
.ar-track li.is-now::before {
  background: linear-gradient(90deg, var(--holo), #ffd8b0);
}
.ar-track i {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin: 4px;
  border: 0;
  border-radius: 50%;
  background: #120d24;
  box-shadow: 0 0 0 1px rgba(255, 228, 204, 0.4), 0 0 0 4px
    rgba(14, 10, 28, 0.9);
}
.ar-track .is-boss i {
  width: 22px;
  height: 22px;
  margin: 0;
  background: radial-gradient(circle at 50% 35%, #4a1426, #170814);
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.8), 0 0 0 4px rgba(14, 10, 28, 0.9),
    0 0 0 5px rgba(244, 63, 94, 0.25);
}
.ar-track .is-bonus i {
  background: #120d24;
  box-shadow: 0 0 0 1px var(--brass), 0 0 0 4px rgba(14, 10, 28, 0.9), 0 0 0 5px
    rgba(214, 178, 106, 0.25);
}
.ar-track .is-done i {
  background: radial-gradient(circle at 50% 35%, #ffd0a0, #ff8c3f);
  box-shadow: 0 0 0 1px rgba(255, 220, 190, 0.6), 0 0 0 4px
    rgba(14, 10, 28, 0.9);
}
.ar-track .is-boss.is-done i {
  background: radial-gradient(circle at 50% 35%, #ff7a94, #b5203f);
  box-shadow: 0 0 0 1px rgba(255, 180, 190, 0.6), 0 0 0 4px
    rgba(14, 10, 28, 0.9);
}
.ar-track .is-now i {
  background: #fff;
  box-shadow: 0 0 0 2px #ff8c3f, 0 0 0 5px rgba(14, 10, 28, 0.9), 0 0 0 6px
    rgba(255, 176, 102, 0.6), 0 0 18px rgba(255, 150, 70, 0.6);
  animation: ar-now 2s ease-in-out infinite;
}
@keyframes ar-now {
  50% {
    box-shadow: 0 0 0 2px #ff8c3f, 0 0 0 5px rgba(14, 10, 28, 0.9), 0 0 0 9px
      rgba(255, 176, 102, 0.35), 0 0 26px rgba(255, 150, 70, 0.7);
  }
}
.ar-track .is-now,
.ar-track .is-done {
  color: var(--vellum);
}
.ar-track .is-now {
  color: var(--holo);
}

.ar-track .has-event span::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: #fb923c;
  vertical-align: middle;
}

.ar-squad,
.ar-accords {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ar-squad {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-content: start;
}
.ar-squad li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px;
  border: 0;
  border-radius: 999px 4px 4px 999px;
  background: radial-gradient(
      120% 160% at 0% 50%,
      color-mix(in srgb, var(--hc) 20%, transparent),
      transparent 55%
    ), rgba(10, 7, 22, 0.6);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
}
.ar-squad img {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 16%;
     object-position: 50% 16%;
  box-shadow: 0 0 0 1px var(--hc), 0 0 0 3px rgba(14, 10, 28, 0.8);
}
.ar-squad li > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
  padding-right: 12px;
}
.ar-squad strong {
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
}
.ar-squad small {
  font-size: 10.5px;
  color: rgba(238, 243, 241, 0.6);
}
.ar-squad small b {
  font-weight: 600;
  color: var(--vellum);
}
.ar-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.ar-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fbf7a, #9ff0bf);
}

.ar-accords {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.ar-accords li {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px 11px;
  border: 0;
  background: rgba(10, 7, 22, 0.55);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0
    color-mix(in srgb, var(--ac) 35%, transparent);
  opacity: 0.62;
}
.ar-accords li.is-held {
  background: radial-gradient(
      100% 80% at 0% 0%,
      color-mix(in srgb, var(--ac) 14%, transparent),
      transparent 70%
    ), rgba(10, 7, 22, 0.6);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0 var(--ac);
  opacity: 1;
}
.ar-accords li.is-quorum {
  background: color-mix(in srgb, var(--ac) 16%, rgba(10, 7, 22, 0.6));
  box-shadow: inset 0 0 0 1px var(--ac), inset 0 2px 0 var(--ac), 0 0 20px
    color-mix(in srgb, var(--ac) 25%, transparent);
}
.ar-accords strong {
  overflow: hidden;
  font-family: var(--mm-title);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  color: var(--ac);
}
.ar-accords small {
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(238, 243, 241, 0.62);
}
.ar-pips {
  display: flex;
  gap: 6px;
}
.ar-pips i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.ar-pips i.on {
  background: var(--ac);
  box-shadow: 0 0 8px color-mix(in srgb, var(--ac) 70%, transparent);
}

.ar-report {
  flex: none;
  margin: 0;
  font-size: 13px;
  color: #d8d0de;
}

.ar-phase {
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  gap: 16px;
}
.ar-phase h2 {
  display: grid;
  gap: 8px;
  margin: 0;
  font-family: var(--mm-title);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
}
.ar-phase h2 small {
  max-width: 640px;
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(238, 232, 242, 0.75);
}

.ar-brief {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
}
.ar-brief .st-frame {
  height: auto;
  max-height: 46vh;
  max-height: 46dvh;
  aspect-ratio: 4 / 3;
}
.ar-brief .st-frame canvas {
  position: absolute;
  top: 22px;
  left: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 62px);
}
.ar-brief .st-brief h2 {
  margin: 0;
}
.ar-brief-note {
  margin: 0;
  max-width: 520px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #cfc6d6;
}

.ar-event {
  margin: 0;
  max-width: 520px;
  padding: 11px 14px;
  border: 0;
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.14), transparent 80%),
    rgba(10, 7, 22, 0.55);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.35), inset 3px 0 0 #fb923c;
  font-size: 13px;
  line-height: 1.45;
  color: #e6e0ea;
}
.ar-rewards {
  display: grid;
  gap: 8px;
  list-style: none;
}
.ar-accords em {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  color: var(--ac);
}
.ar-event b {
  display: block;
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fb923c;
}

.ar-offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 320px));
  justify-content: center;
  gap: 16px;
}
.ar-offer {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-height: 230px;
  padding: 22px 22px 16px;
  overflow: hidden;
  border: 0;
  background: radial-gradient(
      90% 60% at 100% 0%,
      color-mix(in srgb, var(--ac) 22%, transparent),
      transparent 70%
    ), var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0 var(--ac);
  color: var(--vellum);
  font: inherit;
  text-align: left;
  transition: transform 0.18s, box-shadow 0.18s;
}
.ar-offer::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent);
  outline: 1px dashed color-mix(in srgb, var(--ac) 20%, transparent);
  outline-offset: 14px;
  pointer-events: none;
}
.ar-offer:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 60%, transparent),
    inset 0 2px 0 var(--ac);
}
.ar-offer.is-chosen {
  box-shadow: inset 0 0 0 1px var(--ac), inset 0 2px 0 var(--ac), 0 0 0 1px
    var(--ac), 0 18px 44px -18px var(--ac);
  transform: translateY(-4px);
}
.ar-offer-kicker {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ac);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 55%, transparent);
}
.ar-offer strong {
  font-family: var(--mm-title);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
}
.ar-offer-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(238, 232, 242, 0.86);
}
.ar-offer-foot {
  padding-top: 10px;
  border-top: 0;
  background: linear-gradient(90deg, var(--mm-hair-strong), transparent) top /
    100% 1px no-repeat;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.6);
}

.ar-heroes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 250px));
  justify-content: center;
  gap: 14px;
}
.ar-hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 125px 125px 4px 4px;
  background: radial-gradient(
      100% 60% at 50% 0%,
      color-mix(in srgb, var(--hc) 22%, transparent),
      transparent 70%
    ), var(--mm-panel);
  color: var(--vellum);
  font: inherit;
  text-align: left;
  transition: transform 0.18s, box-shadow 0.18s;
}
.ar-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong), inset 0 -3px 0
    color-mix(in srgb, var(--hc) 55%, transparent);
  pointer-events: none;
  transition: box-shadow 0.18s;
}
.ar-hero:hover::after {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hc) 70%, transparent),
    inset 0 -3px 0 var(--hc);
}
.ar-hero.is-chosen {
  box-shadow: 0 18px 44px -18px rgba(255, 140, 63, 0.8);
  transform: translateY(-4px);
}
.ar-hero.is-chosen::after {
  box-shadow: inset 0 0 0 2px #ff8c3f, inset 0 0 0 6px rgba(14, 10, 28, 0.45),
    inset 0 0 0 7px rgba(255, 176, 102, 0.5), inset 0 -3px 0 #ff8c3f;
}
.ar-hero-art {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: color-mix(in srgb, var(--hc) 18%, #0c0a1c);
}
.ar-hero-art img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 10%;
     object-position: 50% 10%;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.ar-hero-body {
  display: grid;
  align-content: start;
  gap: 7px;
  margin-top: -18px;
  padding: 0 18px 16px;
  position: relative;
  z-index: 1;
}
.ar-hero-body strong {
  font-family: var(--mm-title);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 14px rgba(8, 5, 18, 0.9);
}
.ar-hero-body small {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hc);
}
.ar-hero-passive {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(238, 232, 242, 0.84);
}
.ar-hero-passive > b:first-child {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--holo);
}
.ar-leanings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.ar-leanings i {
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 55%, transparent);
  background: color-mix(in srgb, var(--ac) 8%, transparent);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ac);
}

.squad-screen.arcade-screen > .ar-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 calc(14px + var(--safe-b));
  background: linear-gradient(
      90deg,
      transparent,
      var(--mm-hair-strong) 20%,
      var(--mm-hair-strong) 80%,
      transparent
    )
    top / 100% 1px no-repeat, rgb(12, 10, 28);
  box-shadow: 0 0 0 100vmax rgb(12, 10, 28);
  clip-path: inset(-1px -100vmax 0);
  border-top: 0;
}
.ar-foot p {
  margin: 0;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.45;
  color: #cfc6d6;
}

@media (max-width: 900px) {
  .ar-accords {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .squad-screen.arcade-screen {
    display: flex;
    gap: 12px;
    padding-bottom: 0;
  }
  .arcade-screen .sq-top {
    height: 64px;
  }
  .arcade-screen .sq-top h1 {
    min-width: 0;
  }
  .arcade-screen .sq-top h1 span {
    gap: 6px;
    font-size: 9.5px;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }
  .ar-points {
    flex: none;
    display: grid;
    justify-items: end;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
  .ar-points b {
    margin-right: 0;
    font-size: 19px;
  }
  .ar-strip {
    gap: 10px;
    padding: 12px;
  }
  .ar-track li span {
    font-size: 8.5px;
    letter-spacing: 0.06em;
  }
  .ar-squad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ar-squad img {
    width: 40px;
    height: 40px;
  }
  .ar-squad small {
    font-size: 9.5px;
  }
  .ar-accords li {
    padding: 6px 7px;
  }
  .ar-accords small {
    display: none;
  }
  .ar-brief {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .ar-brief .st-frame {
    max-height: 30vh;
    max-height: 30dvh;
    aspect-ratio: 16 / 9;
  }
  .ar-offers {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .ar-offer {
    min-height: 0;
    gap: 6px;
    padding: 14px 16px 12px;
  }
  .ar-offer strong {
    font-size: 17px;
  }
  .ar-offer-text {
    font-size: 13.5px;
  }
  .ar-offer.is-chosen,
  .ar-hero.is-chosen {
    transform: none;
  }
  .ar-heroes {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .ar-hero {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto;
    border-radius: 60px 4px 4px 60px;
  }
  .ar-hero-art {
    aspect-ratio: auto;
    height: 100%;
    min-height: 128px;
  }
  .ar-hero-art img {
    -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent);
    mask-image: linear-gradient(90deg, #000 70%, transparent);
  }
  .ar-hero-body {
    margin: 0;
    padding: 12px 12px 12px 4px;
  }
  .ar-hero-body strong {
    font-size: 16px;
  }
  .squad-screen.arcade-screen > .ar-foot {
    padding: 10px 0 calc(10px + var(--safe-b));
    gap: 12px;
  }
  .ar-foot .sq-tools {
    flex: none;
  }
  .ar-foot p {
    display: none;
  }
  .ar-foot .sq-go {
    min-width: 150px;
    flex: 1;
  }
}

@media (max-height: 520px) and (min-width: 561px) {
  .squad-screen.arcade-screen {
    display: flex;
    gap: 10px;
    padding-bottom: 0;
    overflow-y: auto;
  }
  .arcade-screen .sq-top {
    height: 44px;
  }
  .ar-strip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    padding: 10px 12px;
  }
  .ar-track {
    grid-column: 1 / -1;
  }
  .ar-squad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ar-squad img {
    width: 34px;
    height: 34px;
  }
  .ar-accords {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ar-accords small {
    display: none;
  }
  .ar-phase {
    gap: 10px;
  }
  .ar-phase h2 small {
    display: none;
  }
  .ar-offer {
    min-height: 0;
    gap: 6px;
    padding: 12px 14px 10px;
  }
  .ar-offer strong {
    font-size: 15px;
  }
  .ar-offer-text {
    font-size: 12.5px;
  }
  .ar-heroes {
    grid-template-columns: repeat(auto-fit, minmax(0, 190px));
  }
  .ar-hero {
    border-radius: 95px 95px 4px 4px;
  }
  .ar-hero-art {
    aspect-ratio: 16 / 9;
  }
  .ar-hero-passive {
    display: none;
  }
  .squad-screen.arcade-screen > .ar-foot {
    padding: 8px 0 calc(8px + var(--safe-b));
  }
  .ar-foot p {
    display: none;
  }
  .ar-foot .sq-go {
    min-height: 44px;
  }
}

.ar-post {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  max-width: 640px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 0 2px 0
    rgba(255, 176, 102, 0.5);
}
.ar-post p {
  flex: 1 1 100%;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: #e6e0ea;
}
.ar-post label {
  display: flex;
  flex: 1 1 180px;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--holo);
}
.ar-post input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  background: rgba(10, 7, 22, 0.8);
  outline: none;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}
.ar-post input:focus {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.75);
}
.ar-post button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--mm-hair-strong);
  background: rgba(14, 10, 30, 0.72);
  font-family: var(--mm-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e6e0ea;
  cursor: pointer;
}
.ar-post button[type="submit"] {
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4);
  background: var(--ember);
  color: #1a0d05;
}
.ar-post button:disabled {
  opacity: 0.5;
  cursor: default;
}

.ar-event.is-helpful {
  border-color: rgba(111, 240, 214, 0.45);
  border-left-color: #6ff0d6;
  background: rgba(111, 240, 214, 0.08);
}
.ar-event.is-helpful b {
  color: #6ff0d6;
}
.ar-site {
  margin: 0;
  max-width: 520px;
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  color: rgba(230, 224, 234, 0.72);
}

.ar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.ar-tools p {
  flex: 1 1 240px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #f3d9c2;
}
.ar-tools.is-asking {
  padding: 10px 12px;
  border: 0;
  background: rgba(244, 63, 94, 0.08);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.5);
}
.ar-tools button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--dusk-line);
  background: var(--dusk-glass);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(230, 224, 234, 0.82);
  cursor: pointer;
}
.ar-tools button:hover {
  border-color: #ff8c3f;
  color: #fff;
}
.ar-tools button.is-danger {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.2);
  color: #fff;
}

.ar-picks {
  display: grid;
  gap: 8px;
  max-width: 640px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.ar-picks li {
  padding: 11px 14px;
  border: 0;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair), inset 3px 0 0 #ff8c3f;
  font-size: 13.5px;
  line-height: 1.45;
  color: #e6e0ea;
}

.ar-tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ar-tiers button {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--dusk-line);
  background: var(--dusk-glass);
  font: inherit;
  text-align: left;
  color: rgba(230, 224, 234, 0.72);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ar-tiers button:hover {
  border-color: rgba(255, 176, 102, 0.6);
}
.ar-tiers button.is-on {
  border-color: #ff8c3f;
  background: rgba(255, 140, 63, 0.14);
  color: #fff;
}
.ar-tiers strong {
  font-family: var(--mm-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ar-tiers small {
  font-size: 11px;
  opacity: 0.75;
}
.ar-tiers p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(238, 232, 242, 0.78);
}
@media (max-width: 560px) {
  .ar-tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ar-foot .sq-go {
  margin-left: auto;
}
/* Decks in the map language: a rail of hero orbs, the hero's painting with its name, and the loadout as a
   dark caption panel whose deck shelf uses the shared choice buttons. */
.sf.dk {
  --dk-panel: min(720px, 54vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--dk-panel);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px 28px;
  padding: calc(18px + var(--safe-t)) max(28px, var(--safe-r))
    calc(18px + var(--safe-b)) max(28px, var(--safe-l));
}
.dk > .sf-head {
  grid-column: 1 / -1;
}

.dk-rail {
  grid-column: 1 / -1;
  display: flex;
  gap: clamp(4px, 0.7vw, 12px);
  overflow-x: auto;
  padding: 10px 6px 6px;
  scrollbar-width: none;
}
.dk-hero {
  display: grid;
  justify-items: center;
  gap: 7px;
  flex: none;
  width: clamp(56px, 4.4vw, 66px);
  padding: 0;
  border: 0;
  background: none;
  color: rgba(246, 236, 226, 0.6);
  cursor: pointer;
  transition: color 0.2s;
}
.dk-hero-disc {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 228, 204, 0.3), 0 0 0 5px
    rgba(14, 10, 28, 0.55), 0 0 0 6px rgba(255, 228, 204, 0.1);
  transition: box-shadow 0.25s, transform 0.3s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.dk-hero-disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  filter: brightness(0.55) saturate(0.7);
  transition: filter 0.2s;
}
.dk-hero:hover {
  color: rgba(246, 236, 226, 0.9);
}
.dk-hero:hover .dk-hero-disc img {
  filter: brightness(0.85);
}
.dk-hero.is-at {
  color: #fff;
}
.dk-hero.is-at .dk-hero-disc {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--hc), 0 0 0 5px rgba(14, 10, 28, 0.55), 0 0 0 6px
    rgba(255, 176, 102, 0.7), 0 0 24px rgba(255, 150, 70, 0.35);
}
.dk-hero.is-at .dk-hero-disc img {
  filter: none;
}
.dk-hero-name {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dk-hero-count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
  color: #06201b;
  background: var(--aether);
}

.dk-show {
  position: relative;
  min-height: 0;
  margin: 0;
  animation: dk-show 0.45s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.dk-painting {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    ellipse 58% 56% at 50% 42%,
    #000 52%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 58% 56% at 50% 42%,
    #000 52%,
    transparent 100%
  );
}
.dk-show::before,
.dk-show::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.dk-show::before {
  height: 78%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--hc) 34%, transparent) 0%,
    transparent 68%
  );
}
.dk-show::after {
  height: 70%;
  border: 1px solid color-mix(in srgb, var(--hc) 55%, transparent);
  outline: 1px dashed rgba(255, 228, 204, 0.14);
  outline-offset: 14px;
}
.dk-show figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.dk-show strong {
  padding-left: 0.42em;
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 22px color-mix(in srgb, var(--hc) 60%, transparent), 0 2px
    8px rgba(5, 3, 15, 0.9);
}

.dk .lo {
  grid-column: 2;
  grid-row: 3;
  min-height: 0;
  margin: 0;
  padding: 18px 22px 22px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "traits traits"
    "stats stats"
    "deck deck"
    "weapon weapon"
    "gear gear";
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.86),
    rgba(10, 7, 22, 0.94)
  );
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.12), 0 20px 50px
    rgba(4, 2, 12, 0.45);
  backdrop-filter: blur(6px);
  animation: dk-panel 0.3s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.dk .lo-head {
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: none;
}
.dk .lo-head::after,
.dk .lo-art,
.dk .lo-name > .micro,
.dk .lo-name > strong {
  display: none;
}
.dk .lo-label {
  font-size: 10.5px !important;
  font-weight: 600;
  letter-spacing: 0.34em !important;
  color: var(--holo) !important;
}
.dk .lo-label::before {
  display: none;
}

.dk-shelf {
  display: grid;
  gap: 10px;
  margin: 6px 0 12px;
}
.lo-deck .dk-shelf ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  text-transform: none;
  list-style: none;
}
.lo-deck .dk-shelf li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 8px 0 0;
  background: rgba(238, 243, 241, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.1);
}
.lo-deck .dk-shelf li.is-on {
  background: color-mix(in srgb, var(--hc) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hc) 70%, transparent),
    inset 3px 0 0 var(--hc);
}
.dk-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--vellum);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dk-name b {
  overflow: hidden;
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dk-on {
  flex: none;
  padding: 1px 8px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a0f14;
  background: var(--ember);
}
.dk-acts {
  display: flex;
  flex: none;
  gap: 4px;
}
.dk-rename {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
  padding-left: 10px;
}
.dk-rename input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--holo);
  background: rgba(5, 3, 15, 0.6);
  color: var(--vellum);
  font: inherit;
  font-size: 14px;
}
.dk-empty {
  margin: 0;
  font-size: 13px;
  color: var(--mute);
}
.dk-new {
  justify-self: start;
}

@keyframes dk-show {
  from {
    opacity: 0;
    transform: translateX(-3vw);
  }
}
@keyframes dk-panel {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

@media (max-width: 900px) {
  .sf.dk {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    padding: calc(12px + var(--safe-t)) 14px calc(12px + var(--safe-b));
  }
  .dk-show {
    display: none;
  }
  .dk .lo {
    grid-column: 1;
    padding: 0 14px 18px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "traits"
      "stats"
      "deck"
      "weapon"
      "gear";
  }
  .dk .lo-head {
    height: 150px;
    margin: 0 -14px;
    padding: 0 14px 12px;
    overflow: hidden;
  }
  .dk .lo-head::after,
  .dk .lo-art {
    display: block;
  }
  .dk .lo-name > .micro,
  .dk .lo-name > strong {
    display: block;
  }
  .dk-hero {
    width: 58px;
  }
  .dk-hero-disc {
    width: 46px;
    height: 46px;
  }
  .lo-deck .dk-shelf li {
    flex-wrap: wrap;
    padding: 0 0 8px;
  }
  .dk-acts {
    flex-wrap: wrap;
    padding-left: 14px;
  }
}

@media (max-width: 560px) {
  .lo-deck .dk-shelf li .dk-name,
  .lo-deck .dk-shelf li .dk-rename {
    flex: 1 1 100%;
  }
}

@media (max-height: 520px) {
  .sf.dk {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px 14px;
    padding: calc(8px + var(--safe-t)) max(14px, var(--safe-r))
      calc(8px + var(--safe-b)) max(14px, var(--safe-l));
  }
  .dk > .sf-head .medal {
    --size: 38px;
  }
  .dk .sf-heading h1 {
    font-size: 18px;
  }
  .dk-rail {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px 8px;
  }
  .dk-hero {
    width: 60px;
  }
  .dk-hero-disc {
    width: 40px;
    height: 40px;
  }
  .dk .lo {
    grid-column: 2;
    grid-row: 2;
  }
  .dk .lo-head {
    height: 110px;
  }
}
.battle.tut {
  --safe-t: env(safe-area-inset-top, 0px);
}
.tut {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.tut-pick {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
}
.tut-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 0;
  overflow: hidden;
  background: var(--mm-panel);
  box-shadow: inset 0 0 0 1px var(--mm-hair);
  animation: home-in 0.4s ease-out both;
}
.tut-feature::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hc) 55%, transparent);
  outline: 1px dashed rgba(255, 228, 204, 0.14);
  outline-offset: 14px;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--hc) 28%, transparent),
    transparent 68%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.tut-painting {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 12%;
     object-position: 50% 12%;
  -webkit-mask-image: radial-gradient(
    ellipse 54% 44% at 50% 44%,
    #000 55%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 54% 44% at 50% 44%,
    #000 55%,
    transparent 100%
  );
}
.tut-about {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 100%;
  padding: 90px 24px 22px;
  overflow-y: auto;
  scrollbar-width: none;
  background: linear-gradient(
    to top,
    rgba(10, 7, 22, 0.97) 55%,
    rgba(10, 7, 22, 0.7) 80%,
    transparent
  );
}
.tut-about > .micro {
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--hc);
}
.tut-about h2 {
  font-family: var(--mm-title);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.34em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 22px color-mix(in srgb, var(--hc) 55%, transparent);
}
.tut-about p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(238, 232, 242, 0.86);
}
.tut-lessons {
  display: grid;
  gap: 6px;
}
.tut-lessons li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mm-title);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238, 232, 242, 0.88);
}
.tut-lessons .num {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--holo);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 102, 0.6);
}
.tut-weak .micro,
.tut-say .micro,
.tut-result .micro {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--holo);
}
.tut-about .guide-btn {
  align-self: flex-start;
  margin: 4px 0 0;
  height: 44px;
}

.tut-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: safe center;
  gap: 12px 8px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 14px 4px;
}
.tut-roster button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(238, 232, 242, 0.62);
  cursor: pointer;
  transition: color 0.2s;
}
.tut-roster img {
  width: clamp(48px, 5.4vw, 76px);
  aspect-ratio: 1;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 18%;
     object-position: 50% 18%;
  filter: brightness(0.6) saturate(0.75);
  box-shadow: var(--mm-ring);
  transition: filter 0.2s, box-shadow 0.25s, transform 0.3s
    cubic-bezier(0.2, 1.3, 0.4, 1);
}
.tut-roster button:hover {
  color: #fff;
}
.tut-roster button:hover img {
  filter: brightness(0.9);
}
.tut-roster button[aria-current="true"] {
  color: #fff;
}
.tut-roster button[aria-current="true"] img {
  filter: none;
  transform: scale(1.08);
  box-shadow: var(--mm-ring-on);
}
.tut-name {
  font-family: var(--mm-title);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
}
.tut-tick {
  position: absolute;
  top: -4px;
  right: calc(50% - clamp(30px, 3.4vw, 44px));
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px !important;
  color: #06201b;
  background: var(--aether);
}

.tut-stage .guide-text {
  overflow-y: auto;
  scrollbar-width: none;
}
.tut-say,
.tut-result {
  padding: 10px 12px;
  border-left: 2px solid #ff8c3f;
  background: rgba(255, 140, 63, 0.07);
  animation: guide-say 0.35s ease-out both;
}
.tut-result {
  border-left-color: var(--holo);
  background: rgba(94, 231, 255, 0.06);
  color: var(--vellum);
  font-weight: 600;
}
.tut-result .micro {
  color: var(--holo);
}
.tut-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #9fb0b0;
}
.tut-hint.is-on {
  color: #ff8c3f;
  font-weight: 600;
}

.tut-visual .fight-frame {
  z-index: 2;
  --dock-h: var(--hand-h, 150px);
}
.tut-hand {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: -moz-max-content;
  width: max-content;
  transform: translateX(-50%) scale(var(--fit, 1));
  transform-origin: 50% 100%;
}
.tut-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.tut-readouts {
  display: flex;
  gap: 6px;
}
.tut-readouts li {
  padding: 5px 9px;
  white-space: nowrap;
  background: var(--dusk-glass, rgba(12, 10, 24, 0.82));
  border: 1px solid var(--hair);
}
.tut-readouts b {
  color: var(--holo);
}
.tut-tools {
  display: flex;
  gap: 6px;
}
.tut-tool {
  height: 44px;
  white-space: nowrap;
  background: rgba(12, 10, 24, 0.82);
  opacity: 0.45;
}
.tut-tool.is-live {
  opacity: 1;
  color: #1d0f06;
  background: var(--ember);
  border-color: transparent;
}
.tut-hand.is-hinting .tut-tool.is-live,
.tut-hand.is-hinting .card:not(.locked) {
  animation: tut-pulse 0.9s ease-in-out infinite;
}
@keyframes tut-pulse {
  50% {
    filter: brightness(1.35);
    transform: translateY(-4px);
  }
}
.tut .tut-hand .hand {
  display: flex;
  align-items: flex-end;
  height: auto;
  padding: 0;
  overflow: visible;
}
.tut .tut-hand .fan-slot {
  margin: 0 3px;
  transform: none;
}
.tut .tut-hand .hand-side.weapon {
  margin-right: 10px;
  padding-right: 10px;
}

@media (max-width: 900px) {
  .tut-pick {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .tut-roster {
    display: flex;
    gap: 6px;
    padding: 12px 6px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tut-roster button {
    flex: 0 0 68px;
  }
  .tut-roster img {
    width: 48px;
  }
  .tut-about {
    padding: 60px 14px 14px;
  }
  .tut-about h2 {
    font-size: 26px;
  }
  .tut-about p {
    font-size: 13px;
  }
  .tut-stage {
    grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr);
  }
  .tut-stage .guide-text {
    gap: 8px;
  }
  .tut-stage .guide-copy h2 {
    font-size: 19px;
  }
  .tut-brief.is-read {
    display: none;
  }
}

@media (orientation: portrait) {
  .tut-visual .fight-slot.is-hero {
    left: calc((0.5 - var(--spread, 0.2)) * 100% - var(--size) / 2);
  }
  .tut-visual .fight-slot.is-foe {
    left: calc((0.5 + var(--spread, 0.2)) * 100% - var(--size) / 2);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .tut {
    padding-left: max(12px, var(--safe-l));
    padding-right: max(12px, var(--safe-r));
    gap: 8px;
  }
  .tut .guide-top {
    position: absolute;
    top: calc(8px + var(--safe-t));
    left: max(12px, var(--safe-l));
    z-index: 5;
  }
  .tut .guide-title {
    display: none;
  }
  .tut {
    grid-template-rows: minmax(0, 1fr);
  }
  .tut-pick {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .tut-roster {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 6px;
    overflow-y: auto;
  }
  .tut-roster img {
    width: 38px;
  }
  .tut-name {
    font-size: 9px;
    letter-spacing: 0.16em;
  }
  .tut-about {
    padding: 14px 14px 12px 60px;
    gap: 5px;
  }
  .tut-lessons {
    display: none;
  }
  .tut-stage {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .tut-stage .guide-copy {
    order: 0;
  }
  .tut-stage .guide-text {
    padding: 12px 14px 8px 56px;
    gap: 6px;
  }
  .tut-stage .guide-copy h2 {
    font-size: 17px;
  }
  .tut-stage .guide-copy p {
    font-size: 12.5px;
    line-height: 1.4;
  }
  .tut-stage .guide-pager {
    padding: 6px 14px 8px;
  }
  .tut-brief.is-read {
    display: none;
  }
}
/* The main menu's language applied to every menu screen through the classes they already share:
   squad-screen (Library, Codex, Gallery, stage, squad, Arcade), the guide and ranks plates (Guide,
   Tutorials, Ranks), the duel screens and the settings dialog. The in-game battle screen is not touched. */
:root {
  --mm-panel: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.86),
    rgba(10, 7, 22, 0.94)
  );
  --mm-hair: rgba(255, 228, 204, 0.12);
  --mm-hair-strong: rgba(255, 228, 204, 0.24);
  --mm-ring: 0 0 0 1px rgba(255, 228, 204, 0.3), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 228, 204, 0.1);
  --mm-ring-on: 0 0 0 2px var(--hc, var(--holo)), 0 0 0 5px
    rgba(14, 10, 28, 0.55), 0 0 0 6px rgba(255, 176, 102, 0.7), 0 0 24px
    rgba(255, 150, 70, 0.35);
  --mm-title: "Chakra Petch", system-ui, sans-serif;
}

.squad-screen,
.duel-screen,
.battle.ranks,
.battle.guide,
.battle.modal-backdrop,
.battle.prep-survey {
  --plate: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.88),
    rgba(10, 7, 22, 0.94)
  );
  --hair: rgba(255, 228, 204, 0.13);
}

.squad-screen::after,
.duel-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23ffe4cc' stroke-opacity='0.11' vector-effect='non-scaling-stroke'%3E%3Cellipse cx='1060' cy='470' rx='640' ry='380'/%3E%3Cellipse cx='1060' cy='470' rx='420' ry='250' stroke-dasharray='14 6'/%3E%3Cellipse cx='1060' cy='470' rx='900' ry='540' stroke-opacity='0.06' stroke-dasharray='2 7'/%3E%3Cline x1='0' y1='470' x2='1600' y2='470' stroke-opacity='0.07'/%3E%3C/g%3E%3C/svg%3E")
    center / cover no-repeat;
}
.squad-screen > :not(.sq-backdrop, .dusk-backdrop),
.duel-screen > :not(.dusk-backdrop) {
  z-index: 1;
}

.sq-back,
.battle.ranks .rk-top-bar > .hud-sq,
.battle.guide .guide-top > .hud-sq,
.battle.prep-survey .ps-top > .hud-sq {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  clip-path: none;
  color: rgba(255, 236, 220, 0.85);
  background: radial-gradient(
    circle at 50% 35%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.45), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 220, 190, 0.18);
  transform: none;
  transition: color 0.2s, background 0.2s, box-shadow 0.25s;
}
.sq-back svg {
  transform: none;
}
.sq-back:hover,
.sq-back:focus-visible,
.battle.ranks .rk-top-bar > .hud-sq:hover,
.battle.guide .guide-top > .hud-sq:hover,
.battle.prep-survey .ps-top > .hud-sq:hover {
  color: #1a0f14;
  background: var(--ember);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 220, 0.7), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 176, 102, 0.7), 0 0 26px
    rgba(255, 150, 70, 0.45);
}

.sq-top {
  border-bottom: 0;
  background: linear-gradient(90deg, rgba(255, 228, 204, 0.22), transparent 70%)
    bottom / 100% 1px no-repeat;
}
.sq-top h1,
.duel-head h1 {
  flex: 1;
  min-width: 0;
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
}
.sq-top h1 span,
.duel-head h1 span {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--holo);
}

.battle.ranks .rk-title,
.battle.guide .guide-title {
  padding: 0 6px;
  background: none;
  border: 0;
  clip-path: none;
}
.battle.ranks .rk-title::before,
.battle.ranks .rk-title::after,
.battle.guide .guide-title::before,
.battle.guide .guide-title::after {
  display: none;
}
.battle.ranks .rk-title .micro,
.battle.guide .guide-title .micro {
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--holo);
}
.battle.ranks .rk-title strong,
.battle.guide .guide-title strong {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
}
.battle.ranks .plate,
.battle.guide .plate,
.battle.modal-backdrop .plate,
.battle.prep-survey .plate {
  clip-path: none;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--hair), 0 20px 50px rgba(4, 2, 12, 0.4);
}

.lib-tabs {
  gap: 6px;
  border-bottom: 0;
}
.lib-tabs button,
.battle.ranks .rk-btn,
.battle.guide .guide-btn,
.battle.modal-backdrop .set-btn,
.battle.modal-backdrop .set-choices button {
  min-height: 40px;
  height: auto;
  padding: 0 18px;
  border: 1px solid var(--dusk-line-strong);
  border-radius: 2px;
  clip-path: none;
  background: rgba(14, 10, 30, 0.72);
  color: var(--vellum);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lib-tabs button:hover,
.lib-tabs button[aria-pressed="true"],
.battle.ranks .rk-btn:hover,
.battle.ranks .rk-btn.primary,
.battle.guide .guide-btn:hover:not(:disabled),
.battle.guide .guide-btn.primary,
.battle.modal-backdrop .set-btn:hover,
.battle.modal-backdrop .set-btn.primary,
.battle.modal-backdrop .set-choices button[aria-pressed="true"] {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
}

.battle.guide .guide-nav button[aria-current="true"] {
  color: #fff;
  box-shadow: inset 3px 0 0 var(--holo);
}

.duel-head .sq-back {
  border: 0;
  border-radius: 50%;
}
.duel-panel {
  border: 0;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.86),
    rgba(10, 7, 22, 0.94)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.12), 0 20px 50px
    rgba(4, 2, 12, 0.45);
}
.duel-choice {
  border-radius: 2px;
}
.duel-choice b {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.set-panel {
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.96),
    rgba(10, 7, 22, 0.98)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.14), 0 24px 60px
    rgba(4, 2, 12, 0.6);
}
.set-head .micro {
  font-weight: 600;
  letter-spacing: 0.3em;
}
.set-head h2 {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .deck-head {
    flex-wrap: wrap;
  }
  .deck-head .deck-name {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .deck-head > div {
    flex: 1 1 0;
  }
  .deck-head h2 {
    overflow: visible;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 0.08em;
    white-space: normal;
  }
  .sq-top h1,
  .duel-head h1 {
    font-size: 15px;
    letter-spacing: 0.18em;
  }
  .sq-top h1 span,
  .duel-head h1 span {
    font-size: 9.5px;
    letter-spacing: 0.22em;
  }
  .battle.ranks .rk-title strong,
  .battle.guide .guide-title strong {
    font-size: 16px;
    letter-spacing: 0.2em;
  }
  .sq-back,
  .battle.ranks .rk-top-bar > .hud-sq,
  .battle.guide .guide-top > .hud-sq {
    width: 40px;
    height: 40px;
  }
}

@media (max-height: 520px) {
  .sq-top h1,
  .duel-head h1 {
    gap: 0;
    font-size: 16px;
    line-height: 1.15;
    letter-spacing: 0.2em;
  }
  .sq-top h1 span,
  .duel-head h1 span {
    font-size: 9px;
    letter-spacing: 0.22em;
  }
  .battle.ranks .rk-title strong,
  .battle.guide .guide-title strong {
    font-size: 15px;
    letter-spacing: 0.2em;
  }
  .battle.ranks .rk-title .micro,
  .battle.guide .guide-title .micro {
    display: none;
  }
  .sq-back,
  .battle.ranks .rk-top-bar > .hud-sq,
  .battle.guide .guide-top > .hud-sq {
    width: 36px;
    height: 36px;
    box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.45), 0 0 0 3px
      rgba(14, 10, 28, 0.55);
  }
}

/* Deck builder overlay. */
.deck-builder {
  --line: rgba(255, 228, 204, 0.14);
  --bracket: rgba(255, 176, 102, 0.6);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23ffe4cc' stroke-opacity='0.08' vector-effect='non-scaling-stroke'%3E%3Cellipse cx='800' cy='470' rx='700' ry='400'/%3E%3Cellipse cx='800' cy='470' rx='460' ry='260' stroke-dasharray='14 6'/%3E%3C/g%3E%3C/svg%3E")
    center / cover no-repeat,
    radial-gradient(
      ellipse at 50% 0%,
      rgba(255, 140, 63, 0.08),
      transparent 60%
    ), var(--dusk);
}
.deck-head {
  border-bottom: 0;
  background: linear-gradient(90deg, rgba(255, 228, 204, 0.22), transparent 70%)
    bottom / 100% 1px no-repeat;
}
.deck-head h2 {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.deck-head .icon-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 236, 220, 0.85);
  background: radial-gradient(
    circle at 50% 35%,
    rgba(52, 36, 70, 0.95),
    rgba(14, 10, 28, 0.95)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 220, 190, 0.45), 0 0 0 4px
    rgba(14, 10, 28, 0.55), 0 0 0 5px rgba(255, 220, 190, 0.18);
}
.deck-head .icon-btn:hover {
  color: #1a0f14;
  background: var(--ember);
}
.deck-builder .input {
  border-radius: 2px;
  border-color: var(--dusk-line-strong);
  background: rgba(10, 7, 22, 0.8);
  font-family: "Chakra Petch", system-ui, sans-serif;
  letter-spacing: 0.06em;
}
.deck-builder .input:focus {
  border-color: var(--holo);
}
.squad-screen .chip-btn,
.duel-screen .chip-btn,
.deck-builder .chip-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 2px;
  border-color: var(--dusk-line-strong);
  background: rgba(14, 10, 30, 0.72);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.squad-screen .chip-btn:hover,
.squad-screen .chip-btn[aria-pressed="true"],
.duel-screen .chip-btn:hover,
.duel-screen .chip-btn[aria-pressed="true"],
.deck-builder .chip-btn:hover,
.deck-builder .chip-btn[aria-pressed="true"] {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
}
.deck-side.panel {
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.86),
    rgba(10, 7, 22, 0.94)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.12);
}
.deck-builder .btn {
  border-color: var(--dusk-line-strong);
  background: rgba(14, 10, 30, 0.72);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.deck-builder .btn:hover:not(:disabled),
.deck-builder .btn-primary {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
  box-shadow: none;
}
.deck-builder .btn-primary::before,
.deck-builder .btn-primary::after {
  display: none;
}
.deck-builder .btn-ghost {
  background: transparent;
}
.deck-count {
  color: #06201b;
  background: var(--aether);
}

/* Arcade: difficulty tiers, run tools and the go buttons. */
.ar-tiers button {
  border-color: var(--dusk-line-strong);
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
}
.ar-tiers button:hover {
  border-color: var(--holo);
}
.ar-tiers button.is-on {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
}
.ar-tiers button.is-on small {
  opacity: 0.85;
}
.ar-tiers strong {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.ar-tools button {
  border-color: var(--dusk-line-strong);
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.ar-tools button:hover {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
}
.sq-go {
  clip-path: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.4), 0 10px 30px
    rgba(255, 120, 50, 0.25);
}
.sq-go span {
  font-family: "Chakra Petch", system-ui, sans-serif;
}

/* Generic buttons and inputs inside menu screens take the caption's choice style. */
.squad-screen .btn,
.duel-screen .btn,
.results-screen .btn,
.handover .btn {
  border-color: var(--dusk-line-strong);
  border-radius: 2px;
  background: rgba(14, 10, 30, 0.72);
  color: var(--vellum);
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  box-shadow: none;
}
.squad-screen .btn:hover:not(:disabled),
.duel-screen .btn:hover:not(:disabled),
.results-screen .btn:hover:not(:disabled),
.handover .btn:hover:not(:disabled),
.squad-screen .btn-primary,
.duel-screen .btn-primary,
.results-screen .btn-primary,
.handover .btn-primary {
  border-color: transparent;
  color: #1a0f14;
  background: var(--ember);
  box-shadow: 0 0 22px rgba(255, 140, 63, 0.25);
}
.squad-screen .btn-primary::before,
.squad-screen .btn-primary::after,
.duel-screen .btn-primary::before,
.duel-screen .btn-primary::after,
.results-screen .btn-primary::before,
.results-screen .btn-primary::after,
.handover .btn-primary::before,
.handover .btn-primary::after {
  display: none;
}
.squad-screen .btn-ghost,
.duel-screen .btn-ghost {
  background: transparent;
}
.squad-screen .input,
.duel-screen .input,
.results-screen .input {
  border-radius: 2px;
  border-color: var(--dusk-line-strong);
  background: rgba(10, 7, 22, 0.8);
  font-family: "Chakra Petch", system-ui, sans-serif;
}

/* Stage results. */
.results-screen {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23ffe4cc' stroke-opacity='0.09' vector-effect='non-scaling-stroke'%3E%3Cellipse cx='800' cy='450' rx='640' ry='380'/%3E%3Cellipse cx='800' cy='450' rx='420' ry='250' stroke-dasharray='14 6'/%3E%3C/g%3E%3C/svg%3E")
    center / cover no-repeat,
    radial-gradient(
      ellipse at 50% 40%,
      rgba(255, 140, 63, 0.1),
      transparent 60%
    ), var(--dusk);
}
.results-screen .title {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 26px rgba(255, 150, 70, 0.4);
}
.results-screen .panel {
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.86),
    rgba(10, 7, 22, 0.94)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.12);
}
.results-screen .display {
  font-family: "Chakra Petch", system-ui, sans-serif;
  letter-spacing: 0.06em;
}
.handover-card {
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(14, 10, 30, 0.94),
    rgba(10, 7, 22, 0.97)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 228, 204, 0.14), 0 24px 60px
    rgba(4, 2, 12, 0.6);
}

.battle.ranks .plate.rk-title,
.battle.guide .plate.guide-title {
  box-shadow: none;
  backdrop-filter: none;
}
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {

  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {

  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {

  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {

  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {

  .container {
    max-width: 1536px;
  }
}
.\!visible {
  visibility: visible !important;
}
.visible {
  visibility: visible;
}
.static {
  position: static;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.sticky {
  position: sticky;
}
.inset-0 {
  inset: 0px;
}
.right-1 {
  right: 0.25rem;
}
.top-1 {
  top: 0.25rem;
}
.z-10 {
  z-index: 10;
}
.m-2 {
  margin: 0.5rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mt-0\.5 {
  margin-top: 0.125rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-1\.5 {
  margin-top: 0.375rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-8 {
  margin-top: 2rem;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.contents {
  display: contents;
}
.\!hidden {
  display: none !important;
}
.hidden {
  display: none;
}
.h-11 {
  height: 2.75rem;
}
.h-2\.5 {
  height: 0.625rem;
}
.h-8 {
  height: 2rem;
}
.h-9 {
  height: 2.25rem;
}
.h-full {
  height: 100%;
}
.min-h-0 {
  min-height: 0px;
}
.w-2\.5 {
  width: 0.625rem;
}
.w-8 {
  width: 2rem;
}
.w-9 {
  width: 2.25rem;
}
.w-full {
  width: 100%;
}
.min-w-0 {
  min-width: 0px;
}
.max-w-lg {
  max-width: 32rem;
}
.max-w-xs {
  max-width: 20rem;
}
.flex-1 {
  flex: 1 1 0%;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.touch-none {
  touch-action: none;
}
.select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.resize {
  resize: both;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.place-items-center {
  place-items: center;
}
.items-center {
  align-items: center;
}
.items-baseline {
  align-items: baseline;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-5 {
  gap: 1.25rem;
}
.gap-x-4 {
  -moz-column-gap: 1rem;
       column-gap: 1rem;
}
.gap-x-5 {
  -moz-column-gap: 1.25rem;
       column-gap: 1.25rem;
}
.gap-y-1 {
  row-gap: 0.25rem;
}
.-space-x-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(-0.5rem * var(--tw-space-x-reverse));
  margin-left: calc(-0.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}
.divide-x > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-x-reverse: 0;
  border-right-width: calc(1px * var(--tw-divide-x-reverse));
  border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse)));
}
.divide-\[var\(--line\)\] > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--line);
}
.overflow-hidden {
  overflow: hidden;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rounded-full {
  border-radius: 9999px;
}
.border {
  border-width: 1px;
}
.border-2 {
  border-width: 2px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-\[var\(--line\)\] {
  border-color: var(--line);
}
.bg-\[\#0d1530\] {
  --tw-bg-opacity: 1;
  background-color: rgb(13 21 48 / var(--tw-bg-opacity, 1));
}
.bg-\[var\(--ink\)\] {
  background-color: var(--ink);
}
.p-0 {
  padding: 0px;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.pb-3 {
  padding-bottom: 0.75rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.text-\[11px\] {
  font-size: 11px;
}
.text-\[13\.5px\] {
  font-size: 13.5px;
}
.text-\[13px\] {
  font-size: 13px;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}
.uppercase {
  text-transform: uppercase;
}
.capitalize {
  text-transform: capitalize;
}
.italic {
  font-style: italic;
}
.leading-relaxed {
  line-height: 1.625;
}
.leading-snug {
  line-height: 1.375;
}
.text-\[\#86efac\] {
  --tw-text-opacity: 1;
  color: rgb(134 239 172 / var(--tw-text-opacity, 1));
}
.text-\[\#9cc8ff\] {
  --tw-text-opacity: 1;
  color: rgb(156 200 255 / var(--tw-text-opacity, 1));
}
.text-\[\#b9bed0\] {
  --tw-text-opacity: 1;
  color: rgb(185 190 208 / var(--tw-text-opacity, 1));
}
.text-\[\#c5c9d8\] {
  --tw-text-opacity: 1;
  color: rgb(197 201 216 / var(--tw-text-opacity, 1));
}
.text-\[\#cbd5e1\] {
  --tw-text-opacity: 1;
  color: rgb(203 213 225 / var(--tw-text-opacity, 1));
}
.text-\[\#fb7185\] {
  --tw-text-opacity: 1;
  color: rgb(251 113 133 / var(--tw-text-opacity, 1));
}
.text-\[\#fda4af\] {
  --tw-text-opacity: 1;
  color: rgb(253 164 175 / var(--tw-text-opacity, 1));
}
.text-\[\#fdba74\] {
  --tw-text-opacity: 1;
  color: rgb(253 186 116 / var(--tw-text-opacity, 1));
}
.text-\[var\(--brass\)\] {
  color: var(--brass);
}
.text-\[var\(--mute\)\] {
  color: var(--mute);
}
.text-\[var\(--vellum\)\] {
  color: var(--vellum);
}
.underline {
  text-decoration-line: underline;
}
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.outline {
  outline-style: solid;
}
.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.sepia {
  --tw-sepia: sepia(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.backdrop-filter {
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
@keyframes enter {

  from {
    opacity: var(--tw-enter-opacity, 1);
    transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
  }
}
@keyframes exit {

  to {
    opacity: var(--tw-exit-opacity, 1);
    transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
  }
}
.ease-in {
  animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ease-in-out {
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.ease-out {
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.running {
  animation-play-state: running;
}
.paused {
  animation-play-state: paused;
}

:root {
  --ink: #071012;
  --deep: #0c191c;
  --panel: rgba(9, 21, 24, 0.8);
  --panel-solid: #0d1c20;
  --line: rgba(220, 236, 232, 0.16);
  --line-soft: rgba(220, 236, 232, 0.08);
  --brass: #e6cf9a;
  --brass-dim: #9c8a62;
  --aether: #6ff0d6;
  --holo: #ffa24a;
  --rift: #d6406a;
  --vellum: #eef3f1;
  --mute: #8fa3a3;
  --attack: #f0b48a;
  --skill: #6ff0d6;
  --heroic: #b9a6e8;
  --haze: #f3c7b4;
  --bracket: rgba(230, 207, 154, 0.75);
  --dusk: #0e0c22;
  --dusk-glass: linear-gradient(
    180deg,
    rgba(32, 26, 62, 0.74),
    rgba(13, 11, 30, 0.84)
  );
  --dusk-line: rgba(255, 210, 175, 0.16);
  --dusk-line-strong: rgba(255, 190, 140, 0.36);
  --ember: linear-gradient(90deg, #ffbf6e, #ff8c3f);
  --ember-glow: rgba(255, 150, 70, 0.55);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--vellum);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow: hidden;
  touch-action: manipulation;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.display {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.15rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(12, 27, 31, 0.72);
  color: var(--vellum);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.btn:hover {
  border-color: rgba(111, 240, 214, 0.55);
  background: rgba(16, 38, 42, 0.85);
  box-shadow: 0 0 18px rgba(111, 240, 214, 0.12);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.btn-primary {
  position: relative;
  padding-inline: 1.9rem;
  background: linear-gradient(180deg, #f6faf8, #d3e2de);
  color: #0a1a1d;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(111, 240, 214, 0.22);
}
.btn-primary::before,
.btn-primary::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--aether);
  transform: translateY(-50%) rotate(45deg);
}
.btn-primary::before {
  left: 10px;
}
.btn-primary::after {
  right: 10px;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ffffff, #e2eeeb);
  border-color: #ffffff;
  box-shadow: 0 0 28px rgba(111, 240, 214, 0.35);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(220, 236, 232, 0.06);
  border-color: var(--line-soft);
}
.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
}

.panel {
  background:
    linear-gradient(var(--bracket), var(--bracket)) top left / 12px
    1px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) top left / 1px 12px
    no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) bottom right / 12px 1px
    no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) bottom right / 1px 12px
    no-repeat,
    linear-gradient(180deg, rgba(111, 240, 214, 0.04), transparent 40%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- screens ---------- */
.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: radial-gradient(
      1200px 600px at 50% 0%,
      rgba(111, 240, 214, 0.1),
      transparent 70%
    ),
    radial-gradient(
      900px 500px at 15% 105%,
      rgba(243, 199, 180, 0.12),
      transparent 70%
    ),
    radial-gradient(
      800px 500px at 90% 100%,
      rgba(185, 166, 232, 0.12),
      transparent 70%
    ), linear-gradient(180deg, #0b1a1d, var(--ink) 60%);
}

.astrolabe {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(120vw, 900px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.5;
}
.astrolabe .ring-a {
  transform-origin: 50% 50%;
  animation: spin 160s linear infinite;
}
.astrolabe .ring-b {
  transform-origin: 50% 50%;
  animation: spin 240s linear infinite reverse;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .astrolabe .ring-a,
  .astrolabe .ring-b {
    animation: none;
  }
}

.title {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 10vw, 6.4rem);
  line-height: 1;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #dceae6 55%, #8fb8b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(111, 240, 214, 0.25));
}

.choice {
  border: 1px solid var(--line);
  background: rgba(10, 23, 27, 0.7);
  border-radius: 3px;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover {
  border-color: rgba(111, 240, 214, 0.45);
}
.choice[aria-pressed="true"] {
  border-color: var(--aether);
  background: linear-gradient(
      180deg,
      rgba(111, 240, 214, 0.12),
      rgba(111, 240, 214, 0.02)
    ), rgba(10, 23, 27, 0.8);
  box-shadow: inset 0 0 0 1px rgba(111, 240, 214, 0.25), 0 0 24px
    rgba(111, 240, 214, 0.12);
}

.input {
  min-height: 44px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 18, 0.7);
  color: var(--vellum);
  padding: 0 0.85rem;
}
.input:focus {
  outline: none;
  border-color: var(--brass);
}

/* ---------- home ---------- */
@keyframes peek-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}
@keyframes home-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes home-fade {
  from {
    opacity: 0;
  }
}
@keyframes title-in {
  from {
    opacity: 0;
    letter-spacing: 0.6em;
    filter: blur(8px);
  }
}
@keyframes scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}
@keyframes kenburns {
  from {
    transform: scale(1.04) translateY(0);
  }
  to {
    transform: scale(1.12) translateY(-2%);
  }
}
@keyframes pulse-dot {
  50% {
    opacity: 0.35;
  }
}

/* ---------- shared bits ---------- */
.gem {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border: 1px solid #f2a65a;
}
.gem.on {
  background: #f2a65a;
  box-shadow: 0 0 8px rgba(242, 166, 90, 0.7);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex: none;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(238, 243, 241, 0.1);
  color: #cfd3e1;
}
.chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.card {
  --cut: 11px;
  --art-h: 96px;
  --r: #7d9193;
  position: relative;
  flex: none;
  width: 134px;
  height: 212px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto var(--art-h) auto minmax(0, 1fr) auto auto;
  text-align: left;
  color: var(--vellum);
  border-radius: 5px;
  background: linear-gradient(
    170deg,
    rgba(238, 243, 241, 0.75),
    rgba(238, 243, 241, 0.18) 35%,
    rgba(238, 243, 241, 0.1) 65%,
    color-mix(in srgb, var(--o) 70%, transparent)
  );
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s,
    filter 0.18s, box-shadow 0.2s;
  transform-origin: bottom center;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 4px;
  background: radial-gradient(
      120% 50% at 50% 0%,
      color-mix(in srgb, var(--o) 14%, transparent),
      transparent 70%
    ), linear-gradient(180deg, #0f2125, #081316 70%, #0b1a1d);
}
.card::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid color-mix(in srgb, var(--r) 24%, transparent);
  border-radius: 3px;
  pointer-events: none;
}
.card > * {
  position: relative;
  grid-column: 1;
}
.card .pitch-bar {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--p);
  box-shadow: 0 0 10px var(--p);
  z-index: 2;
}
.card .card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 7px 4px 8px;
  z-index: 1;
}
.card .pitch {
  flex: none;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #061012;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 28%,
    #ffffff 0,
    color-mix(in srgb, var(--p) 60%, #ffffff) 22%,
    var(--p) 55%,
    color-mix(in srgb, var(--p) 55%, #000000) 100%
  );
  box-shadow: 0 0 10px color-mix(in srgb, var(--p) 80%, transparent), inset 0
    -2px 3px rgba(0, 0, 0, 0.25);
}
.card .cname {
  flex: 1;
  min-width: 0;
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.card .cost {
  flex: none;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--vellum);
  background: transparent;
  border: 1px solid rgba(238, 243, 241, 0.55);
  border-radius: 50%;
}
.card .cost.od {
  color: #160a26;
  background: var(--heroic);
  border-color: var(--heroic);
}
.card .card-top {
  grid-row: 1;
}
.card .art-window {
  grid-row: 2;
  z-index: 0;
  min-height: 0;
  margin: 0 1px;
  overflow: hidden;
  border-block: 1px solid color-mix(in srgb, var(--r) 34%, transparent);
  background: #060f11;
}
.card .type-line {
  grid-row: 3;
}
.card .ctext {
  grid-row: 4;
}
.card .cfoot {
  grid-row: 5;
}
.card .cline {
  grid-row: 6;
}
.card .card-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.card.rarity-legendary .art-window::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 45%,
    rgba(201, 162, 255, 0.25) 52%,
    transparent 65%
  );
  background-size: 250% 100%;
  animation: holo 3.6s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes holo {
  0%,
  100% {
    background-position: 120% 0;
  }
  50% {
    background-position: -20% 0;
  }
}
.card .type-line {
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  gap: 4px;
  margin: 3px 6px 0;
  padding: 2px 3px 3px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(
      90deg,
      transparent,
      rgba(238, 243, 241, 0.06),
      transparent
    )
    bottom / 100% 1px no-repeat;
}
.card .type-line > * {
  flex: none;
  white-space: nowrap;
}
.card .type-start {
  display: inline-flex;
  align-items: center;
}
.card .type-start .pips {
  margin-right: 0.7em;
  padding-left: 0.3em;
}
.card .pips {
  display: inline-flex;
  align-items: center;
  gap: 0.34em;
  padding: 0 0.2em;
}
.card .pips i {
  width: 0.7em;
  height: 0.7em;
  transform: rotate(45deg);
  background: var(--r);
  box-shadow: 0 0 0.6em color-mix(in srgb, var(--r) 65%, transparent);
}
.card.rarity-basic .pips i {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--r);
}
.card .cline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 9px 7px;
  font: 600 8px / 1 "Space Grotesk Variable", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.card .cline .rarity-word {
  color: var(--r);
}
.card .cline .cnum {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}
.card:has(.cline) .cfoot {
  padding-bottom: 4px;
}
.card .type-line .owner {
  color: var(--mute);
}
.card .type-line .zone::before {
  content: "\00b7";
  margin: 0 0.5em;
  color: rgba(238, 243, 241, 0.35);
}
.card .zone-map {
  color: var(--aether);
}
.card .zone-fight {
  color: var(--holo);
}
.card .zone-both {
  color: #b8c4c1;
}
.card .ctext {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 3px 8px 0;
  font-size: 9.6px;
  line-height: 1.3;
  color: #d4dfdc;
}
.card .ctext b {
  font-weight: 700;
}
.card .cfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 6px;
  font-size: 8.5px;
  color: var(--mute);
}
.card .cfoot .range {
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}
.card .hotkey {
  opacity: 0.6;
}
.card .stat {
  min-width: 26px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
}
.card .stat:empty {
  visibility: hidden;
}
.card .stat.power {
  color: #f0b48a;
  border: 1px solid rgba(240, 180, 138, 0.6);
  background: rgba(240, 180, 138, 0.1);
  border-radius: 2px;
}
.card .stat.guard {
  color: #9cc8ff;
  border: 1px solid rgba(156, 200, 255, 0.6);
  background: rgba(156, 200, 255, 0.1);
  border-radius: 2px;
}
.card .mark {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #050816;
  background: var(--mark, var(--brass));
  box-shadow: 0 0 16px var(--mark, var(--brass));
  z-index: 2;
}
.card.mark-block {
  --mark: #7cb4ff;
}
.card.mark-burn {
  --mark: var(--p);
}
.card.mark-attached {
  --mark: #ff6fae;
}
.card.mark-play {
  --mark: #fde047;
}
.card.mark-cache {
  --mark: #5ee7ff;
}
.card.mark-burn,
.card.mark-block {
  filter: brightness(0.85);
}
@media (hover: hover) {
  .card-hand:hover:not(.locked) {
    transform: translateY(-44px) scale(1.42);
    z-index: 5;
  }
  .defend .card-hand:hover:not(.locked),
  .hand-view .card-hand:hover:not(.locked),
  .lo .card-hand:hover:not(.locked),
  .guide-cards .card-hand:hover:not(.locked) {
    transform: translateY(-4px);
  }
}
.card.selected {
  transform: translateY(-18px);
  box-shadow: 0 0 0 1px var(--aether), 0 0 26px rgba(111, 240, 214, 0.45), 0
    16px 30px rgba(0, 0, 0, 0.5);
  z-index: 4;
}
.card.locked {
  filter: saturate(0.3) brightness(0.65);
}
.card.other {
  opacity: 0.85;
}
.card-full {
  width: 230px;
  height: 356px;
}
.card-full .card-top {
  padding: 12px 11px 6px 12px;
}
.card-full .pitch,
.card-full .cost {
  width: 26px;
  height: 26px;
  font-size: 14px;
}
.card-full .cname {
  font-size: 17px;
}
.card-full {
  --art-h: 160px;
}
.card-full .cline {
  font-size: 10.5px;
  padding: 0 13px 11px;
}
.card-full .type-line {
  font-size: 11px;
  margin: 5px 10px 0;
}
.card-full .ctext {
  font-size: 13.5px;
  padding: 7px 12px 0;
}
.card-full .cfoot {
  font-size: 11px;
  padding: 4px 10px 10px;
}
.card-full .stat {
  min-width: 38px;
  height: 24px;
  font-size: 15px;
}

.banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.banner h2 {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0.12em;
  color: var(--brass);
  text-shadow: 0 0 30px rgba(217, 178, 111, 0.4);
  animation: banner 1.1s ease forwards;
}
@keyframes banner {
  0% {
    opacity: 0;
    letter-spacing: 0.4em;
  }
  25% {
    opacity: 1;
    letter-spacing: 0.14em;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 12, 0.7);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}
.modal-backdrop > .panel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
@media (hover: none), (max-height: 520px) {
  .pause-keys {
    display: none;
  }
}

.coach {
  position: absolute;
  z-index: 40;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--dock-h, 200px) - 120px);
  overflow-y: auto;
  padding: 14px 16px;
  border-color: var(--brass-dim);
  box-shadow: 0 0 0 1px rgba(217, 178, 111, 0.15), 0 20px 40px
    rgba(0, 0, 0, 0.5);
}

.kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-size: 11px;
  text-align: center;
  color: var(--mute);
}

.prose-tight p {
  margin: 0 0 0.6rem;
  line-height: 1.55;
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .card-hand {
    width: 88px;
    height: 138px;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  }
  .card-hand .card-top {
    padding: 6px 4px 3px 5px;
    gap: 3px;
  }
  .card-hand .cname {
    font-size: 8.8px;
  }
  .card-hand .pitch,
  .card-hand .cost {
    width: 14px;
    height: 14px;
    font-size: 8.5px;
  }
  .card-hand .type-line {
    margin: 2px 4px 0;
    font-size: 7px;
  }
  .card-hand .type-line .owner,
  .card-hand .ctext {
    display: none;
  }
  .card-hand .cfoot {
    padding: 2px 4px 5px;
  }
  .card-hand .cfoot .range {
    display: none;
  }
  .card-hand .stat {
    min-width: 20px;
    height: 14px;
    font-size: 9.5px;
  }
}

/* ---------- cycles, defend, deck builder ---------- */
.cycles-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 34px;
  height: 18px;
  padding: 0 6px;
  margin-right: 6px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  color: #04131a;
  background: var(--aether);
  box-shadow: 0 0 10px rgba(127, 227, 240, 0.45);
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.deck-btn {
  position: absolute;
  left: 12px;
  bottom: 8px;
  height: 32px;
  min-height: 0;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
}
.deck-builder {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: radial-gradient(
      90% 60% at 50% 0%,
      rgba(127, 227, 240, 0.08),
      transparent
    ), var(--ink);
}
.deck-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  border-bottom: 1px solid var(--line);
}
.deck-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  padding: 12px 16px calc(12px + var(--safe-b));
}
.deck-pool {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deck-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(14, 21, 44, 0.8);
  color: var(--vellum);
  font-size: 12px;
}
.chip-btn[aria-pressed="true"] {
  border-color: var(--brass);
  color: var(--brass);
}
.deck-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px 10px;
  padding: 12px 4px 24px;
  justify-items: center;
}
.deck-slot {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.card-deck {
  --art-h: 138px;
  width: 100%;
  max-width: 220px;
  height: 100%;
  min-height: 300px;
  grid-template-rows: auto var(--art-h) auto minmax(min-content, 1fr) auto auto;
}
.card-deck .cname {
  font-size: 13px;
}
.card-deck .ctext {
  flex: 1 0 auto;
  overflow: visible;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 9px 6px;
}
.card-deck .type-line {
  font-size: 10px;
}
.deck-grid .card-deck:hover:not(.locked) {
  transform: translateY(-4px);
}
.deck-count {
  position: absolute;
  right: 6px;
  top: -8px;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  color: #050816;
  background: var(--brass);
}
.deck-side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}
.deck-name {
  flex: 0 1 220px;
  min-width: 0;
  margin-left: auto;
}
.deck-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.deck-actions .btn-primary {
  grid-column: 1 / -1;
}
.deck-rules {
  font-size: 12px;
  display: grid;
  gap: 3px;
}
.deck-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.deck-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 4px;
  font-size: 13px;
  text-align: left;
  border-radius: 6px;
}
.deck-list button:hover {
  background: rgba(255, 255, 255, 0.05);
}
.deck-list i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
@media (max-width: 760px) {
  .deck-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: 8px 8px calc(8px + var(--safe-b));
    gap: 8px;
  }
  .deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }
  .deck-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .deck-actions .btn {
    min-height: 34px;
    padding: 0 6px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .deck-actions .btn-primary {
    min-height: 40px;
    font-size: 12px;
  }
  .card-deck {
    --art-h: 104px;
    min-height: 250px;
  }
  .card-deck .cname {
    font-size: 11.5px;
  }
  .card-deck .ctext {
    font-size: 11px;
  }
  .deck-side {
    max-height: 30vh;
    max-height: 30dvh;
    padding: 10px;
    gap: 6px;
  }
  .deck-rules .rule-ok {
    display: none;
  }
}

/* ---------- card images and rarity ---------- */
.card .card-img {
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
}
.rarity-basic {
  --r: #7d9193;
}
.rarity-common {
  --r: #d3dcda;
}
.rarity-rare {
  --r: #f2cc6c;
}
.rarity-legendary {
  --r: #ffc77d;
}
.pips {
  display: inline-flex;
  align-items: center;
  gap: 0.34em;
  padding: 0 0.2em;
}
.pips i {
  width: 0.7em;
  height: 0.7em;
  transform: rotate(45deg);
  background: var(--r);
  box-shadow: 0 0 0.6em color-mix(in srgb, var(--r) 65%, transparent);
}
.pips-basic i {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--r);
}
.pips-legendary i {
  background: linear-gradient(135deg, #fff6dc, #ffb86b 45%, #c9a2ff);
  box-shadow: 0 0 0.7em rgba(255, 190, 120, 0.8);
}
.card.rarity-rare {
  background: linear-gradient(
    170deg,
    #fff0c2,
    rgba(242, 204, 108, 0.6) 30%,
    rgba(238, 243, 241, 0.14) 62%,
    color-mix(in srgb, var(--o) 70%, transparent)
  );
}
.card.rarity-rare::after {
  border-color: color-mix(in srgb, var(--r) 55%, transparent);
}
.card.rarity-rare .art-window {
  grid-row: 1 / 3;
  margin-top: 1px;
  border-top: 0;
  border-radius: 4px 4px 0 0;
}
.card.rarity-rare .art-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 14, 16, 0.84) 0,
    rgba(6, 14, 16, 0.4) 20%,
    transparent 36%
  );
  z-index: 1;
  pointer-events: none;
}
.card.rarity-legendary .art-window {
  grid-row: 1 / -1;
  margin: 1px;
  border: 0;
  border-radius: 4px;
}
.card.rarity-legendary .art-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 14, 16, 0.75) 0%,
    transparent 22%,
    transparent 45%,
    rgba(6, 14, 16, 0.92) 70%
  );
  z-index: 1;
}
.card.rarity-legendary > :not(.art-window) {
  z-index: 2;
}
.card.rarity-legendary .ctext {
  flex: none;
  margin: 2px 5px 0;
  padding: 4px 6px;
  border-radius: 2px;
  background: rgba(8, 20, 23, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(238, 243, 241, 0.12);
}
.card.rarity-legendary {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  background: linear-gradient(
    150deg,
    #fff3d0,
    var(--brass) 30%,
    rgba(238, 243, 241, 0.3) 55%,
    var(--o)
  );
}

/* ---------- hero card ---------- */
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 240px;
  border-radius: 6px;
  padding: 1px;
  background: linear-gradient(160deg, #fff3d0, var(--brass) 35%, var(--o));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  flex: none;
}
.hero-card > * {
  position: relative;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 5px;
  background: linear-gradient(180deg, #0f2125, #081316);
}
.hero-art {
  height: 220px;
  margin: 6px 6px 0;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(238, 243, 241, 0.2);
  background: radial-gradient(
      circle at 50% 40%,
      color-mix(in srgb, var(--o) 40%, transparent),
      transparent 70%
    ), #0b1a1d;
}
.hero-art img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 50% 15%;
     object-position: 50% 15%;
  display: block;
}
.hero-art-fallback {
  height: 100%;
  display: grid;
  place-items: center;
}
.hero-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0a1416;
  background: var(--brass);
}
.hero-plate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 4px;
}
.hero-name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--o);
}
.hero-title {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 4px 8px;
  margin: 0 6px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.hero-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--mute);
}
.hero-stats b {
  font-size: 15px;
  color: var(--vellum);
}
.hero-stats em {
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-passive {
  flex: 1;
  padding: 8px 12px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #d4dfdc;
}
.hero-passive-name {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.hero-card.compact {
  width: 100%;
  height: 100%;
}
.hero-card.compact .hero-art {
  height: 150px;
}
.hero-card.compact .hero-name {
  font-size: 15px;
}
.hero-card.compact .hero-passive {
  font-size: 11.5px;
  padding-bottom: 10px;
}

.hero-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-auto-rows: 1fr auto;
  gap: 8px 14px;
}
.hero-choice {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: 8px;
  padding: 0;
  text-align: left;
  border-radius: 8px;
  transition: transform 0.15s, opacity 0.15s, filter 0.15s;
  opacity: 0.6;
  filter: saturate(0.6);
}
.hero-choice:hover {
  opacity: 0.85;
}
.hero-choice[aria-pressed="true"] {
  opacity: 1;
  filter: none;
  transform: translateY(-3px);
}
.hero-choice[aria-pressed="true"] .hero-card {
  box-shadow: 0 0 0 2px var(--aether), 0 0 28px rgba(111, 240, 214, 0.3), 0 14px
    34px rgba(0, 0, 0, 0.5);
}
.hero-blurb {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--mute);
  padding: 0 2px;
}

.gear-slot-label {
  align-self: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

@media (max-width: 560px) {
  .hero-pick {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hero-card.compact .hero-art {
    height: 120px;
  }
  .hero-card.compact .hero-stats em {
    display: none;
  }
  .hero-blurb {
    display: none;
  }
}

/* ---------- 3D board labels ---------- */
.board-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.board-label {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: rgba(4, 9, 11, 0.62);
  border-radius: 3px;
  text-shadow: 0 0 3px #04090b, 0 2px 0 #04090b;
  will-change: transform, opacity;
}
.board-label.big {
  padding: 0;
  font-size: 24px;
  background: none;
  text-shadow: 0 0 3px #04090b, 0 0 8px #04090b, 0 2px 0 #04090b;
}

.flip-x {
  transform: scaleX(-1);
}

.stage-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stage-size {
  display: grid;
  gap: 10px;
  padding: 12px;
  text-align: left;
}
.stage-size .stage-thumb {
  width: 100%;
  aspect-ratio: 1;
  -o-object-fit: contain;
     object-fit: contain;
  image-rendering: pixelated;
  background: #05080a;
  border: 1px solid rgba(111, 240, 214, 0.18);
}
.stage-size-text {
  display: grid;
  gap: 4px;
}
@media (max-width: 640px) {
  .stage-sizes {
    gap: 8px;
  }
  .stage-size {
    padding: 8px;
  }
  .stage-size .micro {
    font-size: 9px !important;
  }
}

.sprite-loop {
  display: inline-block;
  flex: none;
  background-repeat: no-repeat;
  background-position-x: 0;
  image-rendering: pixelated;
}
.sprite-loop.playing {
  animation-name: sprite-run;
  animation-iteration-count: infinite;
}
.sprite-loop.flip {
  transform: scaleX(-1);
}
@keyframes sprite-run {
  to {
    background-position-x: calc(var(--frames) * var(--cell) * -1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sprite-loop.playing {
    animation: none;
  }
}

/* ---------- keywords and touch ---------- */
.kw {
  font-weight: 700;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: help;
}
.rtag {
  display: inline-block;
  margin: 0 0.3em 0.12em 0;
  padding: 0 0.42em;
  border-radius: 3px;
  font-size: 0.86em;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: baseline;
}
.rtag .kw {
  color: inherit !important;
  text-decoration: none;
}
.rtag-when {
  background: rgba(238, 243, 241, 0.92);
  color: #14101f;
}
.rtag-limit {
  box-shadow: inset 0 0 0 1px rgba(238, 243, 241, 0.6);
  color: #eef3f1;
}
.rtag-if {
  background: rgba(94, 231, 255, 0.18);
  color: #a9eeff;
}
.rtag-foe {
  background: rgba(251, 113, 133, 0.2);
  color: #ffb3c0;
}
.rtag-cost {
  background: rgba(255, 140, 63, 0.22);
  color: #ffbf8f;
}
.kw-tip {
  position: fixed;
  z-index: 200;
  display: grid;
  gap: 4px;
  max-width: calc(100vw - 24px);
  padding: 11px 13px;
  border: 1px solid rgba(238, 243, 241, 0.16);
  border-radius: 8px;
  background: rgba(10, 17, 20, 0.97);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  color: #dfe7e4;
  pointer-events: auto;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  animation: peek-in 0.12s ease-out;
}
.kw-tip strong {
  font-size: 13px;
}
.card,
.battle,
.hand,
.kw {
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
}
.coach-centre {
  top: 34%;
}
.coach-top {
  top: calc(104px + var(--safe-t));
}
.coach-dock {
  bottom: calc(var(--dock-h, 200px) + 12px);
}
