/* 平行坐标 · 像素美术版（PNG 素材驱动，CSS 只管布局/状态/简单动画） */

/* 像素字体：仅覆盖英文/数字，本地文件，断网可用 */
@font-face {
    font-family: 'Press Start 2P';
    src: url('assets/字体/PressStart2P.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* 缝合像素字体（Fusion Pixel，OFL-1.1）：清晰的中文像素字体，黑体风格
   分包加载：latin 包覆盖英文/数字，zh 包覆盖简体中文；本地文件，断网可用 */
@font-face {
    font-family: 'Fusion Pixel';
    src: url('assets/字体/FusionPixel-12px-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    /* 从 U+0020 起：换行等控制字符若落到这里，会白白下载整包 latin 字库。 */
    unicode-range: U+0020-00FF, U+2000-206F, U+3000-303F, U+FF00-FFEF;
}
/* 完整字库只作缺字回退（玩家自填名字、LLM 生成文本），子集覆盖的字不会触发下载。
   两段 unicode-range 由 _preview_tools/subset-fonts.py 生成，文本改动后重跑，勿手改。 */
@font-face {
    font-family: 'Fusion Pixel';
    src: url('assets/字体/FusionPixel-12px-zh.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    /* subset-fonts.py:full-range:begin */
    unicode-range: U+20-2207, U+2209-2211, U+2213-2247, U+2249-2263, U+2266-26A0, U+26A2-2712, U+2714-2725, U+2727-5576, U+5578-6331, U+6333-7B84, U+7B86-84E5, U+84E7-9CC4, U+9CC6-9E60, U+9E62-FEFE, U+FF00-10FFFF;
    /* subset-fonts.py:full-range:end */
}
/* 运行时文本子集：同名且声明在后，区间重叠时浏览器先匹配它，首屏只下载子集 */
@font-face {
    font-family: 'Fusion Pixel';
    src: url('assets/字体/FusionPixel-12px-zh-subset.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    /* subset-fonts.py:subset-range:begin */
    unicode-range: U+20-7E, U+A1-AC, U+AE-FF, U+394, U+2010-2027, U+2030-2033, U+203B, U+2190-2194, U+2460-2462, U+258C, U+25B6, U+263E, U+3000-3029, U+3036-303A, U+303C, U+303E-303F, U+4E00-4E01, U+4E03, U+4E07-4E0B, U+4E0D-4E0E, U+4E11, U+4E13-4E14, U+4E16, U+4E1A-4E1D, U+4E22, U+4E24-4E25, U+4E27, U+4E2A-4E2B, U+4E2D, U+4E30, U+4E32, U+4E34, U+4E39-4E3B, U+4E3E, U+4E45, U+4E48-4E49, U+4E4B-4E4C, U+4E4E-4E50, U+4E59, U+4E5D, U+4E5F-4E61, U+4E66, U+4E70-4E71, U+4E86, U+4E88-4E89, U+4E8B-4E8C, U+4E8E-4E8F, U+4E91-4E92, U+4E94-4E95, U+4E98, U+4E9A-4E9B, U+4EA1, U+4EA4, U+4EA6-4EA8, U+4EAB-4EAE, U+4EB2, U+4EBA, U+4EC0-4EC1, U+4EC4-4EC5, U+4EC7, U+4ECA-4ECB, U+4ECD-4ECE, U+4ED3-4ED4, U+4ED6, U+4ED8, U+4EE3-4EE5, U+4EEA, U+4EEC, U+4EF0, U+4EF6-4EF7, U+4EFB, U+4EFD, U+4EFF, U+4F01, U+4F0D, U+4F0F-4F11, U+4F17-4F1A, U+4F1E-4F20, U+4F24, U+4F2A-4F2B, U+4F2F-4F30, U+4F34, U+4F38, U+4F3C, U+4F46, U+4F4D-4F4F, U+4F53, U+4F55, U+4F59-4F5C, U+4F60, U+4F69, U+4F73, U+4F7F, U+4F83, U+4F8B, U+4F8D, U+4F9B, U+4F9D, U+4FA5, U+4FA7, U+4FB5, U+4FBF, U+4FC3, U+4FDD, U+4FE1, U+4FE9, U+4FEE-4FEF, U+500D, U+5012, U+5014, U+5019-501A, U+501F, U+5026, U+503A, U+503C, U+503E, U+5047, U+504F, U+505A, U+505C, U+5065, U+5076-5077, U+507F, U+5085, U+508D, U+50A8, U+50AC, U+50CF, U+50F5, U+513F-5141, U+5143-5146, U+5148-5149, U+514B, U+514D, U+5151, U+515C, U+5165, U+5168, U+516B-516E, U+5170-5171, U+5173-5174, U+5176-5178, U+517B-517D, U+5185, U+518C-518D, U+5192, U+5195, U+5197, U+5199, U+519B, U+51A0, U+51AC, U+51AF-51B0, U+51B2-51B3, U+51B5, U+51B7, U+51BB, U+51BD, U+51C0, U+51C6, U+51C9, U+51CC, U+51CF, U+51D1, U+51DB, U+51DD, U+51E0-51E1, U+51ED, U+51F3, U+51F8-51FB, U+51FD, U+51FF-5200, U+5203, U+5206-5207, U+5211-5212, U+5217, U+5219-521B, U+521D, U+5220, U+5224, U+5228-5229, U+522B, U+522E, U+5230, U+5236-523B, U+5241-5242, U+524A, U+524D, U+5250, U+5254, U+5256, U+525C, U+5265, U+5267, U+5269-526A, U+526F, U+5272, U+5288, U+529B, U+529D-52A1, U+52A3, U+52A8-52AB, U+52B1-52B3, U+52BF, U+52C3, U+52C9, U+52D2, U+52E4, U+52FA, U+52FE-5300, U+5305-5306, U+530D, U+5310, U+5316-5317, U+5319, U+5320, U+5323, U+5339-533B, U+533E, U+5341, U+5343, U+5347-5348, U+534A, U+534E-534F, U+5355-5357, U+535A, U+5360-5362, U+5367, U+536B, U+5370-5371, U+5373-5375, U+5377-5378, U+5382, U+5385-5386, U+5389, U+538B-538C, U+539A, U+539F, U+53A2, U+53A6, U+53A8, U+53BB, U+53C2, U+53C8-53CD, U+53D1, U+53D4, U+53D6-53D9, U+53E0, U+53E3-53E6, U+53E8-53EB, U+53ED-53F0, U+53F2-53F3, U+53F6-53F9, U+5401, U+5403-5404, U+5408-540A, U+540C-540E, U+5410-5411, U+5413, U+5417, U+541E, U+5426-5427, U+5429, U+542B-542D, U+542F, U+5431, U+5435, U+5438-5439, U+543C, U+5440, U+5446, U+5448, U+544A, U+5457-5458, U+545B-545C, U+5462, U+5468, U+5473, U+5475, U+547C-547D, U+548C, U+5490, U+5494-5495, U+5499-549A, U+54A3, U+54A7, U+54AC, U+54AF, U+54B1, U+54B3, U+54B8, U+54BD, U+54C0-54C1, U+54C6, U+54C8, U+54CD-54CE, U+54D1-54D2, U+54D4, U+54D7, U+54DD, U+54DF, U+54E5-54E8, U+54EA, U+54ED, U+54FC, U+5507, U+5514, U+5524, U+552E-5531, U+553E, U+5543-5544, U+5546, U+554A, U+5550, U+555C, U+5565-5567, U+556A, U+5578, U+5580, U+5582, U+5584, U+5587, U+5589-558A, U+5598-5599, U+559C-559D, U+55A7, U+55B7, U+55D2-55D4, U+55E1, U+55E4, U+55E6, U+55EF, U+55FD, U+5600, U+5608, U+560E, U+561B, U+561F, U+562C, U+5631-5632, U+5634, U+5636, U+563F, U+5654, U+5657, U+565C, U+5668, U+566A, U+567C, U+568E, U+5693, U+56A3, U+56BC, U+56CA, U+56D4, U+56DA-56DB, U+56DE, U+56E0, U+56E2, U+56ED, U+56F0, U+56F4, U+56FA, U+56FE, U+5706, U+5708, U+571F, U+5728, U+5730, U+573A, U+5740, U+5747, U+574A, U+574E-5751, U+5757, U+575A-575B, U+575D, U+5760-5761, U+5766, U+5769-576A, U+5782, U+5784, U+578B, U+5792, U+579B, U+57A2, U+57AB, U+57AE, U+57C2-57C3, U+57CB, U+57CE, U+57DA, U+57DF, U+57FA, U+5802, U+5806, U+5824, U+5835, U+584C, U+5851, U+5854, U+585E, U+586B, U+5883, U+5899, U+589E, U+58A8-58A9, U+58C1, U+58EB, U+58EE, U+58F0, U+58F3, U+58F6, U+5904, U+5907, U+590D, U+590F, U+5915-5916, U+591A, U+591C, U+591F, U+5927, U+5929-592B, U+592E, U+5931, U+5934, U+5938-593A, U+5947, U+5949, U+594F, U+5951, U+5954, U+5956-5957, U+5962, U+5973, U+5976, U+5979, U+597D, U+5982, U+5984, U+5987, U+59A5, U+59A8, U+59BB, U+59CB, U+59D0-59D1, U+59D3-59D4, U+59FF, U+5A01, U+5A18, U+5A31, U+5A46, U+5A6A, U+5A74, U+5A76-5A77, U+5AC2, U+5ACC, U+5AE9, U+5B50, U+5B54, U+5B57-5B59, U+5B64, U+5B66, U+5B69, U+5B81, U+5B83, U+5B87-5B89, U+5B8B-5B8C, U+5B8F, U+5B97-5B9E, U+5BA1-5BA4, U+5BAB, U+5BB3, U+5BB6, U+5BB9, U+5BBD-5BBF, U+5BC2, U+5BC4, U+5BC6, U+5BD2, U+5BDE-5BDF, U+5BE1, U+5BF8-5BF9, U+5BFB-5BFC, U+5BFF, U+5C01, U+5C04, U+5C06, U+5C0A, U+5C0F, U+5C11, U+5C14, U+5C16, U+5C18, U+5C1A, U+5C1D, U+5C24, U+5C2C, U+5C31, U+5C34, U+5C3A, U+5C3D-5C3E, U+5C40-5C42, U+5C45, U+5C49, U+5C4B, U+5C4F, U+5C51, U+5C55, U+5C5E, U+5C65, U+5C71, U+5C81, U+5C94, U+5C96-5C97, U+5CA9, U+5CAD, U+5CB8, U+5CCB, U+5CE8, U+5CED, U+5CF0, U+5CFB, U+5D0E, U+5D16, U+5D29, U+5D4C, U+5D99, U+5DC5, U+5DCD, U+5DE1, U+5DE5-5DE8, U+5DEB, U+5DEE, U+5DF1-5DF2, U+5DF4, U+5DF7, U+5DFE, U+5E01-5E03, U+5E06, U+5E08, U+5E0C, U+5E15-5E16, U+5E18, U+5E1A, U+5E26-5E27, U+5E2D-5E2E, U+5E38, U+5E3D, U+5E42, U+5E45, U+5E55, U+5E72-5E74, U+5E76, U+5E78, U+5E7B, U+5E7D, U+5E7F, U+5E84, U+5E8A, U+5E8F, U+5E93-5E95, U+5E97, U+5E9E-5E9F, U+5EA6-5EA7, U+5EAD, U+5EC9-5ECA, U+5ED3, U+5EF6, U+5EFA, U+5F00, U+5F02-5F04, U+5F08, U+5F0F, U+5F15, U+5F1F-5F20, U+5F25, U+5F27, U+5F2F, U+5F31, U+5F39-5F3A, U+5F52-5F53, U+5F55, U+5F62, U+5F64, U+5F69, U+5F71, U+5F7B-5F7C, U+5F80, U+5F84-5F85, U+5F88, U+5F8B, U+5F92, U+5F97, U+5FA1, U+5FAA, U+5FAE, U+5FB7, U+5FC3, U+5FC5-5FC6, U+5FCC-5FCD, U+5FD7-5FD9, U+5FE7, U+5FEB, U+5FF5, U+5FFD, U+6000-6001, U+6005, U+600E, U+6014-6015, U+601D, U+6025, U+6027-6028, U+602A, U+603B, U+6050, U+6052, U+6062, U+6064, U+6068, U+606D, U+606F-6070, U+6076, U+607C, U+6084, U+6089, U+6094, U+609A, U+60A0, U+60A3, U+60A8, U+60AC, U+60C5, U+60CA-60CB, U+60D5, U+60DC, U+60E6-60E8, U+60EB, U+60EE-60EF, U+60F3, U+60F6, U+60F9, U+6101, U+6108, U+610F, U+611F, U+6123, U+6127, U+613F, U+6148, U+614C, U+614E, U+6155, U+6162, U+6170, U+618B, U+618E, U+61BE, U+61C2, U+61D2, U+6208, U+620F-6212, U+6216, U+6218, U+621B, U+622A, U+6233-6234, U+6237, U+623E-6241, U+6247, U+624B, U+624D-624E, U+6251-6254, U+6258, U+625B, U+6263, U+6267, U+6269, U+626B-626D, U+626F-6270, U+6273, U+6276, U+6279, U+627E-6280, U+6284, U+6289-628A, U+6293, U+6295-6298, U+629A-629B, U+62A0, U+62A2, U+62A4-62A5, U+62AB-62AC, U+62B1, U+62B5, U+62B9, U+62BC-62BD, U+62BF, U+62C2-62C9, U+62CC-62CE, U+62D0, U+62D2-62D4, U+62D6, U+62D9, U+62DB, U+62E2-62E3, U+62E5-62E9, U+62EC-62EE, U+62F1, U+62F3-62F4, U+62FC-62FF, U+6301-6302, U+6307, U+6309, U+6311, U+6316, U+631B, U+6320-6321, U+6323-6325, U+6328, U+632A-632B, U+632F, U+633A, U+633D, U+6342, U+6346, U+634B, U+634E-634F, U+635E-635F, U+6361-6362, U+6367, U+636E, U+6376, U+637B, U+6380, U+6382, U+6387-6389, U+638C, U+638F-6390, U+6392, U+6396, U+63A0, U+63A2, U+63A5, U+63A7-63A9, U+63AC, U+63B0, U+63B7-63B8, U+63BA, U+63C9, U+63CF-63D0, U+63D2, U+63E1, U+63E3, U+63E9-63EA, U+63ED, U+63F4, U+63FD, U+6401, U+6405, U+640F-6410, U+6413, U+641C, U+642A, U+642C-642D, U+643A, U+6441, U+6444, U+6446-6447, U+644A, U+6454, U+6458, U+645E, U+6469, U+6478-6479, U+6482, U+6485, U+6487, U+6491-6492, U+6495, U+649E, U+64A4, U+64A9, U+64AC-64AE, U+64B5, U+64B8, U+64CD-64CE, U+64E6, U+6512, U+6518, U+6525, U+652F, U+6536, U+6539, U+653E-653F, U+6545, U+6548, U+654F, U+6551, U+6559, U+655B, U+655E, U+6562-6563, U+6566, U+656C, U+6570, U+6572, U+6574, U+6577, U+6587, U+6591, U+6597, U+6599, U+659C, U+659F, U+65A4-65A5, U+65AD, U+65AF-65B0, U+65B9, U+65BD, U+65C1, U+65C5, U+65CB, U+65E0, U+65E2, U+65E5-65E7, U+65E9, U+65F1, U+65F6-65F7, U+65FA, U+6602, U+660E-660F, U+6613, U+661F-6620, U+6625, U+6628, U+662D, U+662F, U+663E, U+6643, U+664C, U+6652-6653, U+6655, U+665A, U+6666, U+6668, U+666E-6670, U+6676, U+667A, U+667E, U+6682, U+6696-6697, U+66AE, U+66B4, U+66E6, U+66F2-66F4, U+66FE-6700, U+6708-6709, U+670D, U+6717, U+671B, U+671D, U+671F, U+6728, U+672A-672C, U+672F, U+6731, U+6734-6735, U+673A, U+6740, U+6742-6743, U+6746, U+6748-6749, U+674E-6751, U+6756, U+675F-6761, U+6765, U+6768, U+676F, U+6775, U+677E-677F, U+6781, U+6784, U+6790, U+6795, U+6797, U+679A, U+679C-679D, U+67A2-67A3, U+67AF, U+67B6, U+67C4, U+67D0, U+67D3-67D4, U+67DC, U+67DE, U+67E5, U+67EF, U+67F1, U+67F3-67F4, U+6805, U+6807-6808, U+680B, U+680F, U+6811, U+6813, U+6821, U+6837-6839, U+683C-683D, U+6842-6843, U+6846, U+6848, U+684C, U+6851, U+6863, U+6865, U+6869, U+6876, U+6881, U+6885, U+6897, U+68A2, U+68A6-68A7, U+68AD, U+68AF-68B0, U+68B3, U+68C0, U+68C2, U+68C9, U+68CB, U+68CD, U+68D2, U+68D5, U+68DA, U+68EE, U+68F1, U+68F5, U+6905, U+6912, U+695A, U+6963, U+6977, U+697C, U+6982, U+6986, U+69AD, U+69BB, U+69CC, U+69D0, U+69DB, U+69DF, U+69FD, U+6A21, U+6A2A, U+6A59, U+6A61, U+6A71, U+6A90, U+6B20-6B22, U+6B32, U+6B3A, U+6B3E, U+6B47, U+6B4C, U+6B62-6B66, U+6B6A, U+6B79, U+6B7B, U+6B86, U+6B8A-6B8B, U+6BB5, U+6BBF, U+6BC1, U+6BCD, U+6BCF, U+6BD2, U+6BD4-6BD5, U+6BDB, U+6BE1, U+6BEB, U+6BEF, U+6C11, U+6C14, U+6C1B, U+6C34, U+6C38, U+6C41-6C42, U+6C47, U+6C49, U+6C57, U+6C5E, U+6C60-6C61, U+6C64, U+6C6A, U+6C72, U+6C7D, U+6C81, U+6C88-6C89, U+6C8C, U+6C8F, U+6C93, U+6C99, U+6C9F, U+6CA1, U+6CA5, U+6CAB, U+6CB3, U+6CB8-6CB9, U+6CBB, U+6CBE-6CBF, U+6CC4, U+6CC9-6CCA, U+6CD5, U+6CDB, U+6CDE, U+6CE1-6CE3, U+6CE5, U+6CE8, U+6CEA, U+6CFB-6CFD, U+6D01, U+6D07, U+6D12, U+6D17, U+6D1E, U+6D25, U+6D32, U+6D3B-6D3E, U+6D41, U+6D45-6D47, U+6D4A-6D4B, U+6D4E-6D4F, U+6D51, U+6D53, U+6D69-6D6A, U+6D6E, U+6D77-6D78, U+6D82, U+6D88-6D89, U+6D8C, U+6D95, U+6DA6-6DA9, U+6DB2, U+6DB8, U+6DCB-6DCC, U+6DD8, U+6DE1, U+6DE4, U+6DEC, U+6DF1, U+6DF7, U+6DFB, U+6E05, U+6E0A, U+6E0D, U+6E10, U+6E17, U+6E20-6E21, U+6E23, U+6E29, U+6E2F, U+6E32, U+6E34, U+6E38, U+6E3A, U+6E4D, U+6E7F, U+6E83, U+6E85, U+6E90, U+6E9C, U+6EA2, U+6EAF, U+6ECB, U+6ED1, U+6EDA, U+6EDE, U+6EE1, U+6EE4, U+6EE9, U+6EF4, U+6F02, U+6F06, U+6F09, U+6F0F, U+6F13-6F14, U+6F20, U+6F2B, U+6F3E, U+6F6D-6F6E, U+6F84, U+6F88, U+6F9C, U+6FC0, U+7011, U+701A, U+704C, U+706B, U+706D, U+706F-7070, U+7075-7076, U+707C, U+707E, U+7089, U+7092, U+7095-7096, U+70AD, U+70B7-70B9, U+70BC-70BD, U+70C1-70C2, U+70C8, U+70CA, U+70D8, U+70DB, U+70DF, U+70E4, U+70E6-70E7, U+70EB, U+70ED, U+710A, U+7110, U+7119-711A, U+7126, U+7130, U+7136, U+714C, U+7164, U+7167-7168, U+716E, U+7184, U+718F, U+7194, U+7199, U+719F, U+71A8, U+71AC, U+71C3, U+71CE, U+71D5, U+71E5, U+7206, U+722A, U+722C, U+7231, U+7237, U+7239, U+723D, U+7247-7248, U+724C, U+7259, U+725B, U+7262, U+7269, U+7272, U+7275, U+7279, U+729F, U+72AC, U+72AF, U+72B6, U+72B9, U+72C2, U+72C8, U+72D7, U+72DE, U+72E0, U+72EC-72ED, U+72FC, U+730E, U+731B-731C, U+732B, U+732E, U+7384, U+7387, U+7389, U+738B, U+73A9, U+73AF-73B0, U+73BB, U+73C0, U+73CD, U+73E0, U+73ED, U+7403, U+7406, U+7410, U+7422, U+7425, U+7480, U+7483, U+74A8, U+74DC, U+74E2-74E4, U+74E6, U+74F6-74F7, U+7518, U+751A, U+751C, U+751F, U+7528-7529, U+752C, U+7530-7532, U+7535, U+7537-7538, U+753B, U+7545, U+754C, U+754F, U+7559, U+7565, U+756A, U+7578, U+758F, U+7591, U+7597, U+7599, U+75A4, U+75AE-75AF, U+75B2, U+75BC, U+75BE, U+75C2, U+75C5, U+75C7, U+75C9, U+75D2, U+75D5, U+75DB, U+75F4, U+7626, U+7629-762B, U+7656, U+767B, U+767D-767E, U+7682, U+7684, U+7686, U+768E, U+76AE, U+76B1, U+76C5-76C6, U+76CA, U+76CF-76D2, U+76D6-76D8, U+76DB, U+76DF, U+76EE-76EF, U+76F2, U+76F4, U+76F8-76F9, U+76FC, U+76FE, U+7701, U+7709, U+770B, U+771F-7720, U+7728, U+772F, U+7736, U+773C, U+7740-7741, U+7751, U+775B, U+7761, U+776B, U+7779, U+7784-7785, U+778C, U+778E, U+7792, U+779F, U+77A5, U+77A7, U+77AA, U+77AC, U+77B0, U+77B3, U+77D7, U+77DB, U+77E5, U+77E9, U+77EB, U+77ED-77EE, U+77F3, U+77FE, U+7801-7802, U+780C, U+7814, U+7816, U+781D, U+7827, U+7830, U+7834, U+7838, U+783E, U+7840, U+784C, U+785D, U+786C, U+786E, U+788C-788E, U+7891, U+7897-7898, U+789F, U+78A7, U+78B0-78B1, U+78BE, U+78C1, U+78C5, U+78D5, U+78E8, U+7934, U+793A, U+793C, U+793E, U+7956, U+795E, U+7965, U+7968, U+7981, U+798F, U+79BB, U+79BE, U+79C0-79C1, U+79C3, U+79C6, U+79CB, U+79CD, U+79D1-79D2, U+79D8, U+79E4, U+79E6-79E7, U+79E9, U+79EF-79F0, U+79FB, U+7A00, U+7A0B, U+7A0D, U+7A14, U+7A20, U+7A33, U+7A3F, U+7A57, U+7A74, U+7A76-7A77, U+7A79-7A7A, U+7A7F, U+7A81, U+7A84, U+7A91-7A92, U+7A96-7A98, U+7A9C-7A9D, U+7AA6, U+7ACB, U+7AD6, U+7AD9, U+7ADE-7AE0, U+7AEF, U+7AF9, U+7B03, U+7B11, U+7B14, U+7B1B, U+7B26, U+7B28, U+7B2C, U+7B3C, U+7B49, U+7B4B, U+7B50-7B52, U+7B54, U+7B56, U+7B5B, U+7B77, U+7B79, U+7B7E, U+7B80, U+7B8D, U+7B95, U+7B97, U+7BA1, U+7BAD, U+7BB1, U+7BC7, U+7BD3, U+7BE1, U+7BEE, U+7BF1, U+7BF7, U+7BFE, U+7C0C, U+7C27, U+7C2A, U+7C38, U+7C3F, U+7C73, U+7C7B, U+7C7D, U+7C89, U+7C92, U+7C97-7C98, U+7C9D, U+7CA5, U+7CAE, U+7CB1, U+7CB9, U+7CBE, U+7CCA, U+7CD5-7CD6, U+7CD9, U+7CDF, U+7CFB, U+7D0A, U+7D20, U+7D22, U+7D27, U+7D2B, U+7D2F, U+7D6E, U+7E41, U+7EA0, U+7EA2, U+7EA4, U+7EA6-7EA7, U+7EAA, U+7EAF, U+7EB1, U+7EB3, U+7EB5, U+7EB7-7EB9, U+7EBD, U+7EBF, U+7EC3-7EC4, U+7EC6-7EC8, U+7ECA, U+7ECF, U+7ED1-7ED3, U+7ED5, U+7ED9, U+7EDC-7EDF, U+7EE7, U+7EEA, U+7EED, U+7EEF-7EF0, U+7EF3-7EF5, U+7EF7-7EF8, U+7EFF-7F00, U+7F06, U+7F13, U+7F15-7F16, U+7F18, U+7F1D, U+7F20, U+7F29, U+7F34, U+7F38, U+7F3A, U+7F50-7F51, U+7F55, U+7F61, U+7F69-7F6A, U+7F6E, U+7F72, U+7F8A, U+7F8E, U+7F9E, U+7FA1, U+7FA4, U+7FC1, U+7FC5, U+7FD8, U+7FE0-7FE1, U+7FFB-7FFC, U+8000-8001, U+8003, U+8005, U+800C, U+8010, U+8017, U+8033, U+8037-8038, U+803D, U+804A, U+804C, U+8054, U+805A, U+806A, U+8083, U+8086, U+8089, U+808B-808C, U+8098, U+809A, U+80A0-80A2, U+80A4, U+80A9, U+80AF, U+80BA, U+80BF-80C0, U+80C3, U+80C6, U+80CC, U+80CE, U+80DA-80DC, U+80E1, U+80F3, U+80F6, U+80F8, U+80FD, U+8102, U+8106, U+8109-810A, U+810F-8111, U+8116, U+811A, U+8131, U+8138, U+813E, U+814B-814C, U+8150, U+8154-8155, U+8165, U+816E, U+8170, U+8174, U+8179, U+817B, U+817E-8180, U+818A, U+818F, U+819B, U+819D, U+81C2, U+81DC, U+81EA, U+81ED, U+81F3-81F4, U+8200, U+820C-820D, U+8212, U+821E, U+822A, U+822C, U+8231, U+8239, U+826F-8270, U+8272, U+827A, U+827E, U+8282, U+8292, U+82A6, U+82AF, U+82B1, U+82BD, U+82C7, U+82CD, U+82CF, U+82D4, U+82D7, U+82DB, U+82DE, U+82E5-82E6, U+82EB, U+82F1, U+8303-8304, U+8327, U+832B-832C, U+8336, U+8338, U+8349, U+8352, U+8361, U+8367, U+836B, U+836F, U+8377, U+83AB, U+83B7, U+83B9, U+83DC, U+8425, U+843D, U+846B, U+8482, U+8499, U+84B2, U+84B8, U+84C4, U+84DD, U+84EC, U+8511, U+852B, U+853B, U+853D, U+8584, U+85AA, U+85AF, U+85CF, U+85E4, U+8638, U+8651, U+865A, U+866B, U+8679, U+867D, U+8680, U+8695, U+86DB, U+86EE, U+86FE, U+8702, U+8712, U+8718, U+871C, U+8721, U+8725, U+8734, U+8737, U+873F, U+8749, U+878D, U+87BA, U+8840, U+884C, U+8857, U+8861, U+8863, U+8865, U+8868-8869, U+886B-886C, U+8884, U+888B, U+888D, U+8896, U+889C, U+88AB, U+88AD, U+88B1, U+88C1-88C2, U+88C5, U+88D5, U+88D9, U+88E4, U+88F3, U+88F8-88F9, U+8902, U+8910, U+8925, U+892A, U+8936, U+895F, U+897F, U+8981, U+8986, U+89C1-89C2, U+89C4, U+89C6, U+89C8-89C9, U+89D2, U+89E3, U+89E6, U+8A00, U+8A8A, U+8A93, U+8B66, U+8BA1-8BA2, U+8BA4-8BA5, U+8BA8-8BA9, U+8BAB, U+8BAD-8BAE, U+8BB0, U+8BB2, U+8BB8, U+8BBA, U+8BBD-8BBF, U+8BC1, U+8BC4, U+8BC6, U+8BC9-8BCA, U+8BCD, U+8BD5, U+8BDA-8BDB, U+8BDD, U+8BE2, U+8BE5-8BE6, U+8BED, U+8BEF, U+8BF1, U+8BF4, U+8BF7, U+8BFA-8BFB, U+8BFE, U+8C01, U+8C03, U+8C08, U+8C0B, U+8C10, U+8C22, U+8C28, U+8C2C, U+8C37, U+8C41, U+8C46, U+8C61, U+8C6B, U+8C8C, U+8D1F, U+8D21-8D23, U+8D25-8D2B, U+8D2F, U+8D34-8D35, U+8D37-8D39, U+8D44, U+8D4A-8D4C, U+8D4F, U+8D54, U+8D5A-8D5B, U+8D5E, U+8D60, U+8D62, U+8D64, U+8D70, U+8D75-8D77, U+8D81, U+8D85, U+8D8A, U+8D9F, U+8DA3, U+8DB3-8DB4, U+8DBE, U+8DC3-8DC4, U+8DCC, U+8DD1, U+8DDA-8DDB, U+8DDD, U+8DDF, U+8DE8, U+8DEA, U+8DEF, U+8DF3, U+8E09, U+8E0F, U+8E1E, U+8E22, U+8E29-8E2A, U+8E2E, U+8E31, U+8E39, U+8E3D, U+8E44, U+8E52, U+8E59-8E5A, U+8E6C-8E6D, U+8E72, U+8E7F, U+8E81, U+8EAB-8EAC, U+8EAF, U+8EB2, U+8EBA, U+8F66-8F68, U+8F6C, U+8F6E-8F70, U+8F74, U+8F7B, U+8F7D, U+8F7F, U+8F83, U+8F85-8F86, U+8F88-8F89, U+8F91, U+8F93, U+8F99, U+8F9B, U+8F9E, U+8FA3, U+8FA8, U+8FAB, U+8FB0, U+8FB9, U+8FBE, U+8FC1, U+8FC5, U+8FC7-8FC8, U+8FCE, U+8FD0-8FD1, U+8FD4, U+8FD8-8FD9, U+8FDB-8FDF, U+8FEB, U+8FF0, U+8FF7-8FF9, U+8FFD, U+9000-9003, U+9006, U+9009, U+900F-9010, U+9012, U+9014, U+901A-901B, U+901F-9020, U+9022, U+902E, U+903B-903C, U+903E, U+9047, U+904D, U+904F, U+9053, U+9057, U+905B, U+9065, U+906D-906E, U+9075, U+907F, U+9083, U+90A3, U+90A6, U+90AA, U+90BB, U+90C1, U+90CA, U+90D1, U+90DD, U+90E8, U+90FD, U+914D, U+9152, U+9175, U+9177-9178, U+917D, U+9187, U+9189, U+918B, U+9192, U+91C7, U+91C9-91CA, U+91CC-91CF, U+91D1, U+9274, U+9488-9489, U+949B, U+949D, U+949F, U+94A2, U+94A5, U+94A7, U+94A9, U+94AE, U+94B1, U+94B3, U+94BB, U+94C1, U+94C3, U+94C5, U+94DB-94DD, U+94EC-94ED, U+94F2, U+94F6, U+94F8, U+94FA, U+94FE, U+9500-9501, U+9503, U+9505, U+9508-9509, U+950B, U+9510, U+9519-951A, U+9521, U+9523-9524, U+9526, U+952E-952F, U+9539, U+953B, U+9547, U+954A, U+954C, U+955C, U+9570, U+957F, U+95E8-95EA, U+95ED-95EE, U+95F2, U+95F4, U+95F7-95F9, U+95FB, U+9600-9601, U+9605, U+9608, U+9614, U+961F, U+9632-9636, U+963B, U+963F-9640, U+9644-9645, U+9648, U+964B-964D, U+9650, U+9661-9662, U+9664, U+9669-966A, U+9676-9677, U+9686, U+968F-9690, U+9694, U+9699, U+969C, U+96A7, U+96BE, U+96C4-96C6, U+96D5, U+96E8, U+96EA, U+96F6-96F7, U+96FE, U+9700, U+9704, U+9706-9707, U+9713, U+971C, U+9732, U+9752, U+9759, U+975E, U+9760-9762, U+9769, U+9774, U+978B, U+978D, U+97A3, U+97A7, U+97AD, U+97E7, U+97E9, U+97F3, U+9875-9876, U+9879-987B, U+987E-987F, U+9884-9886, U+9888, U+988A, U+9891, U+9893, U+9897-9898, U+989C-989D, U+98A0, U+98A4, U+98CE, U+98D8, U+98DE-98DF, U+996D-996E, U+9970-9971, U+997C, U+997F, U+9986, U+9988, U+9992, U+9996, U+9999, U+9A6C, U+9A6E, U+9A70-9A71, U+9A73-9A74, U+9A76, U+9A7B-9A7C, U+9A7E-9A7F, U+9A82, U+9A86, U+9A8C, U+9A97, U+9AA1, U+9AA4, U+9AA8, U+9AB0, U+9AB8, U+9ABC, U+9AD8, U+9B3C, U+9B41-9B42, U+9B46, U+9B4F, U+9B54, U+9C7C, U+9C81, U+9C9C, U+9CB8, U+9CDE, U+9E1F, U+9E21, U+9E23, U+9E26, U+9E2D, U+9E30, U+9E45, U+9E49, U+9E64, U+9E66, U+9E7F, U+9EA6, U+9EBB, U+9EC4, U+9ECE-9ECF, U+9ED1, U+9ED8, U+9EDD, U+9EE2, U+9F13, U+9F20, U+9F3B, U+9F3E, U+9F50, U+9F7F, U+9F84, U+9F99, U+9F9F, U+FF01-FF65, U+FFE0-FFE6;
    /* subset-fonts.py:subset-range:end */
}

:root {
    --room: #120b06;
    --room-hi: #2b1c11;
    --paper: #efe0bd;
    --paper-soft: #e7d4ac;
    --paper-deep: #dcc79b;
    --ink: #3a2a18;
    --ink-soft: #6d5638;
    --ink-faint: #937a54;
    --amber: #e8a33d;
    --amber-hi: #f5c465;
    --amber-deep: #b97a1e;
    --amber-shadow: #7a4a10;
    --cream: #f5e9cd;
    --rift: #7ee8dc;
    --danger: #a8402e;
    --danger-soft: rgba(168, 64, 46, 0.14);
    --night: #5a6b8a;
    --night-ink: #3c4a66;
    --leaf: #7a9a4a;
    --leaf-ink: #4d6329;
    --px-font: 'Press Start 2P', 'Fusion Pixel', monospace;
    --serif: 'Fusion Pixel', Georgia, 'Songti SC', 'STSong', 'SimSun', 'Noto Serif CJK SC', serif;
    /* 素材路径默认值：与 assets.js 的 ART_ASSETS 对应，运行时可被 PC_ART 覆盖 */
    --art-frame: url('assets/UI/ui_dialog_bg.png');
    --art-btn: url('assets/UI/ui_button_default.png');
    --art-btn-active: url('assets/UI/ui_button_active.png');
    --art-icons: none;
    /* 新素材变量：默认 none，assets.js 解析成功后才写入；组 class 未启用时不会被引用 */
    --art-book-open: none;
    --art-tab: none;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    background: var(--room);
}

body {
    margin: 0;
    padding: 0;
    /* 立体书页：半透明径向渐晕叠加在亮底上，四周微暗把视线聚到书页，文字仍清晰 */
    background:
        radial-gradient(
            ellipse 120% 90% at 50% 14%,
            rgba(69, 48, 21, 0.35) 0%,
            rgba(43, 28, 17, 0.35) 45%,
            rgba(23, 14, 7, 0.35) 100%
        ),
        linear-gradient(#241609, #1a1108);
    background-color: var(--room);
    color: var(--ink);
    font-family:
        'Fusion Pixel',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        'Helvetica Neue',
        Arial,
        'Noto Sans SC',
        'PingFang SC',
        'Hiragino Sans GB',
        'Microsoft YaHei',
        sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img.pixel,
.map-img,
.map-zone-art,
.book-title-img,
.room-img.art-fallback,
.book-img.art-fallback,
.lamp-glow-img,
.map-cursor {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* 动态特效不是 UI 图标：允许浏览器做轻微重采样，避免低分辨率素材铺满视口后颗粒过粗。 */
/* 通用：视觉隐藏但保留功能（隐藏兼容控件用） */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ============ 开场层：像素卧室 ============ */
#intro-scene {
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow: hidden;
    background: var(--room);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 舞台：锁定 384×216 原生比例，叠加层全部按百分比落位，任何视口都不错位 */
#intro-stage {
    position: relative;
    width: min(100vw, calc(100vh * 384 / 216));
    aspect-ratio: 384 / 216;
    overflow: hidden;
    flex-shrink: 0;
}

.room-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill; /* 舞台已锁 384:216，填满即原生比例 */
}

.intro-heading {
    position: absolute;
    top: 7%;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.intro-title {
    min-height: 1.3em;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 14px;
    text-indent: 14px;
    color: var(--cream);
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6);
}

.intro-sub {
    margin-top: 12px;
    font-family: var(--px-font);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--amber);
}

/* 书本点击热区：独立闭合书 sprite（B01 v1.4，透明底）叠加在无书背景 bg_bedroom_night_v5.png 上；
   书中心 55.2%/58.5%、宽 13%，sprite 805×938 比例恰好填满整个热区（高 ≈ 27%）；
   背景不烘焙书本（像素美术设定书 v1.3 规则），v6 一体烘焙书（2026-08-13）已弃用 */
#intro-book {
    position: absolute;
    left: 48.7%;
    top: 45%;
    width: 13%;
    height: 27%; /* 热区高度：与 sprite 等比（宽 13% × 938/805 ≈ 高 27%） */
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.14s steps(2);
}

#intro-book:hover,
#intro-book:focus-visible {
    transform: translateY(-2px);
}

html.art-book-pixel #intro-book:hover .book-img,
html.art-book-pixel #intro-book:focus-visible .book-img {
    filter: drop-shadow(0 0 6px rgba(255, 206, 118, 0.35))
        drop-shadow(2px 4px 2px rgba(15, 8, 4, 0.65));
}

/* 独立书 sprite 重新显示：透明背景 + 轻微旋转与投影（见 .book-img 基础规则） */
#intro-book .book-img {
    display: block;
}

.book-img {
    display: block;
    width: 100%;
    transform: rotate(-2deg);
    filter: drop-shadow(3px 4px 2px rgba(15, 8, 4, 0.5))
        drop-shadow(9px 16px 20px rgba(15, 8, 4, 0.35));
}

/* 新版横向像素书保持 3:2 原图比例与原来的纵向占位；旧图回退仍沿用上方布局。
   透视已画入素材，取消额外旋转，让书边与桌边平行；投影继续由游戏样式提供。 */
html.art-book-pixel #intro-book {
    left: 38.5%;
    top: 49.5%;
    width: 23%;
    height: auto;
    aspect-ratio: 3 / 2;
}

html.art-book-pixel .book-img {
    transform: none;
    image-rendering: pixelated;
    filter: drop-shadow(
            clamp(1px, 0.14vw, 2px) clamp(1px, 0.21vw, 3px)
                clamp(1px, 0.14vw, 2px) rgba(15, 8, 4, 0.6)
        )
        drop-shadow(
            clamp(1px, 0.28vw, 4px) clamp(2px, 0.42vw, 6px)
                clamp(1px, 0.28vw, 4px) rgba(15, 8, 4, 0.2)
        );
}

/* 独立标题图仍停用，新版标题直接显示在书本封面内。 */

/* 图层 3：书本标题透明素材（book_title.png 40×12，对齐新 sprite 封面牌匾位） */
/* book_title.png 40x12 放大模糊，弃用；书本封面标题已删除（2026-08-12 用户确认） */
.book-title-img {
    display: none !important;
}

/* 图层 4：台灯光照素材 —— 停用。
   背景 bg_bedroom_night_v4.png 的台灯与灯光为烘焙一体图，任何独立光晕层
   都只能叠在台灯上方，收缩到灯泡处仍会压住灯罩下沿（A/B 对比验证），
   故隐藏该层；DOM 与 assets.js 配置保留，待有分层素材（灯罩前置层）再启用。 */
.lamp-glow-img {
    position: absolute;
    left: 22.14%; /* 85 / 384 */
    top: 16.67%; /* 36 / 216 */
    width: 15.63%; /* 60 / 384 */
    pointer-events: none;
    z-index: 1;
    display: none;
}

.intro-desk-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.intro-desk-video.is-ready {
    opacity: 1;
}

.intro-art-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.intro-lamp-veil,
.intro-desk-glow,
.intro-desk-dust,
.intro-props {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.intro-lamp-veil {
    z-index: 1;
    transition: background 0.24s steps(3), opacity 0.24s steps(3);
}

.intro-desk-glow {
    z-index: 1;
    transition: opacity 0.24s steps(3), background 0.24s steps(3);
    background: radial-gradient(
        ellipse 26% 32% at 30% 42%,
        rgba(255, 214, 140, 0.14) 0%,
        rgba(255, 190, 105, 0.05) 55%,
        transparent 100%
    );
}

.intro-desk-dust {
    z-index: 1;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#intro-scene[data-lamp='bright'] .intro-desk-glow {
    opacity: 1;
    background: radial-gradient(
        ellipse 34% 40% at 36% 48%,
        rgba(255, 224, 150, 0.24) 0%,
        rgba(255, 194, 102, 0.1) 58%,
        transparent 100%
    );
}
#intro-scene[data-lamp='warm'] .intro-lamp-veil {
    background: transparent;
}
#intro-scene[data-lamp='dim'] .intro-desk-glow {
    opacity: 0.45;
}
#intro-scene[data-lamp='dim'] .intro-lamp-veil {
    background: radial-gradient(
        ellipse 32% 36% at 38% 54%,
        rgba(12, 10, 18, 0.08) 0%,
        rgba(8, 9, 20, 0.42) 68%,
        rgba(5, 6, 15, 0.62) 100%
    );
}
#intro-scene[data-lamp='off'] .intro-desk-glow {
    opacity: 0;
}
#intro-scene[data-lamp='off'] .intro-lamp-veil {
    background: radial-gradient(
        ellipse 18% 22% at 64% 12%,
        rgba(92, 122, 184, 0.07) 0%,
        rgba(6, 8, 22, 0.66) 54%,
        rgba(4, 5, 14, 0.78) 100%
    );
}
#intro-scene[data-lamp='dim'] #intro-book .book-img {
    filter: brightness(0.78) drop-shadow(2px 4px 3px rgba(8, 5, 4, 0.75));
}
#intro-scene[data-lamp='off'] #intro-book .book-img {
    filter: brightness(0.54) contrast(1.06) drop-shadow(2px 4px 4px rgba(4, 4, 12, 0.85));
}

.intro-props {
    z-index: 2;
}

.intro-prop {
    position: absolute;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    pointer-events: auto;
    cursor: pointer;
    outline: none;
    border-radius: 2px;
}

.intro-prop:focus-visible {
    outline: 2px dashed rgba(255, 220, 140, 0.9);
    outline-offset: 2px;
}

.intro-prop-lamp { left: 5%; top: 9%; width: 32%; height: 50%; }
.intro-prop-coffee { left: 14%; top: 61%; width: 13.5%; height: 19%; }
.intro-prop-pen { left: 26%; top: 75%; width: 13%; height: 17%; }
.intro-prop-notes { left: 1.5%; top: 76%; width: 18.5%; height: 22.5%; }
.intro-prop-window { left: 54%; top: 0%; width: 18%; height: 22%; }

.intro-prop-toast {
    position: absolute;
    left: 50%;
    bottom: 11%;
    transform: translateX(-50%);
    z-index: 4;
    width: max-content;
    max-width: min(480px, 88%);
    padding: 5px 12px;
    background: rgba(20, 14, 11, 0.9);
    border: 2px solid #8a5f22;
    color: #f4e7cb;
    font: 12px/1.45 var(--px-font, 'Fusion Pixel', monospace);
    text-align: center;
    letter-spacing: 0.4px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
    pointer-events: none;
    white-space: normal;
}

.intro-sticky-card {
    position: absolute;
    left: 4%;
    bottom: 24%;
    width: min(268px, 76vw);
    z-index: 4;
    padding: 10px 12px 10px;
    background:
        repeating-linear-gradient(
            180deg,
            transparent 0 21px,
            rgba(128, 92, 48, 0.16) 21px 22px
        ),
        #ecd49d;
    color: #2b180b;
    border: 2px solid #2b180b;
    box-shadow:
        inset 0 0 0 1px rgba(255, 248, 224, 0.45),
        4px 4px 0 rgba(0, 0, 0, 0.55);
    transform: rotate(-1.2deg);
    font-family: var(--reading-font, 'Noto Serif SC', serif);
}

.intro-sticky-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(90, 58, 34, 0.35);
    font: 700 10.5px/1.2 var(--px-font, 'Fusion Pixel', monospace);
    color: #8b3a2b;
    letter-spacing: 0.8px;
}

.intro-sticky-close {
    background: transparent;
    border: 0;
    padding: 0 4px;
    color: #5a3a22;
    font: 700 15px/1 monospace;
    cursor: pointer;
}

.intro-sticky-close:hover {
    color: #8b3a2b;
}

.intro-sticky-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #2b180b;
}

.intro-sticky-foot {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.intro-sticky-next {
    background: rgba(90, 58, 34, 0.12);
    border: 1px solid rgba(90, 58, 34, 0.45);
    color: #4a2a14;
    padding: 2px 8px;
    font: 11px/1.3 var(--px-font, 'Fusion Pixel', monospace);
    cursor: pointer;
}

.intro-sticky-next:hover {
    background: rgba(139, 58, 43, 0.16);
    color: #2b180b;
}

#intro-scene:has(.intro-overlay:not(.hidden)) #intro-props,
#intro-scene:has(.intro-overlay:not(.hidden)) #intro-sticky-card,
#intro-scene:has(.intro-overlay:not(.hidden)) #intro-prop-toast {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .intro-desk-video,
    .intro-desk-dust {
        display: none !important;
    }
    #intro-book {
        transition: none;
    }
}

/* 时空裂缝：独立 img 元素，相对 384×216 舞台定位，由 intro.js 驱动帧序列。
   CSS 只负责定位与尺寸；默认隐藏，.on 时显示。
   尺寸约为舞台宽度 15%（12%～18% 区间），位于舞台内部边缘附近，
   不遮挡标题、书本与点击提示，不影响书本点击。 */
.intro-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4.5%;
    text-align: center;
    color: var(--cream);
    font-size: 14px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    animation: hintBlink 1.3s steps(2) infinite;
    z-index: 2;
}

/* 硬闪烁：只有 1 / 0 两态，无半透明中间帧 */
@keyframes hintBlink {
    0%,
    60% {
        opacity: 1;
    }
    61%,
    100% {
        opacity: 0;
    }
}

/* 像素菜单：瞬间出现，不做位移/淡入 */
.intro-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* 开场层小面板切换（菜单↔设置）：轻淡入上浮，节奏保持干脆 */
@keyframes introPaneIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.intro-overlay.intro-pane-in {
    animation: introPaneIn 0.22s ease both;
}

.menu-window {
    background: #241812;
    border: 3px solid var(--cream);
    outline: 3px solid #8a6d3f;
    outline-offset: 3px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
    padding: 30px 38px 26px;
    min-width: 280px;
}

.menu-title {
    text-align: center;
    color: var(--cream);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
    text-indent: 8px;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
}

.menu-sub {
    text-align: center;
    font-family: var(--px-font);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--amber);
    margin: 12px 0 22px;
}

.menu-note {
    color: #cbb98f;
    font-size: 13px;
    text-align: center;
    margin: 0;
    max-width: 260px;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 11px 14px;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--cream);
    font-size: 16px;
    font-family: inherit;
    letter-spacing: 2px;
    text-align: left;
    cursor: pointer;
}

.menu-item::before {
    content: '▶';
    margin-right: 10px;
    opacity: 0;
    color: var(--amber);
}

.menu-item:hover,
.menu-item:focus-visible {
    color: var(--amber-hi);
    background: rgba(245, 233, 205, 0.07);
    box-shadow: none;
    outline: none;
}

.menu-item:hover::before,
.menu-item:focus-visible::before,
.menu-item.cursor-on::before {
    opacity: 1;
}

.audio-volume-controls {
    margin: 4px 0 8px;
    padding: 8px 14px;
    border-left: 2px solid #8a6d3f;
    background: rgba(245, 233, 205, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbb98f;
    font-size: 13px;
    letter-spacing: 1px;
}

.audio-volume-row label {
    min-width: 60px;
    color: var(--cream);
}

.audio-volume-row input[type="range"] {
    flex: 1;
    min-width: 90px;
    accent-color: var(--amber);
    cursor: pointer;
}

.audio-volume-row span {
    min-width: 38px;
    text-align: right;
    color: var(--amber);
    font-family: var(--px-font);
    font-size: 11px;
}

/* 菜单中的破坏性项：暗红警示 */
.menu-item-danger {
    color: #d99a8a;
}

.menu-item-danger:hover,
.menu-item-danger:focus-visible {
    color: #f0b4a4;
    background: rgba(168, 64, 46, 0.14);
}

.menu-item-danger::before {
    color: var(--danger);
}

/* 书页转场：单张裂隙图叠加在半透明纸页遮罩上。
   裂隙图提供撕纸质感，纸色半透明渐变让盖上/揭开瞬间能看到底下内容透出来，
   避免整块死纯色生硬切换；回退模式用 transform 阶梯（GPU 合成层）控制扩散/收回节奏。 */
/* ============ 穿书转场（书页隧道卷入 → 穿页电光 → 落地） ============
   星露谷式干脆 + 隧道纵深：场景朝书本推进，同心书页环自外向内卷入中心，
   复古纸色/墨边/琥珀点缀，全程 transform/opacity，GPU 合成。
   推进/隧道焦点对准缩小后书本的视觉中心（约 x61% y60%）。 */

/* 星露谷式极简淡入淡出遮罩：整屏渐暗盖住 → 切换场景 → 渐亮揭开。
   深墨棕底色 fade-to-dark，贴合书页主题；全屏穿透点击，GPU 合成 opacity。 */
#zoom-fade {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    background: var(--ink);
    opacity: 0;
    will-change: opacity;
    transition: opacity 0.35s ease;
}
#zoom-fade.on {
    opacity: 1;
}
#zoom-fade.hidden {
    display: none;
}

/* reduced-motion：淡入淡出整体禁用，直接瞬时切换 */
@media (prefers-reduced-motion: reduce) {
    #zoom-fade {
        transition: none !important;
    }
}

/* 退出告别文字（书页遮罩停留时显示） */
/* ============ 应用主体 ============ */
#app {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

/* 隐私条 */
.privacy-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2e1812;
    color: #e8b4a0;
    padding: 7px 14px;
    font-size: 12px;
    margin-bottom: 18px;
    border: 2px solid rgba(168, 64, 46, 0.5);
}

.privacy-dot {
    width: 5px;
    height: 5px;
    background: var(--danger);
    flex-shrink: 0;
}

/* 字标 */
.wordmark {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 9px;
    text-indent: 9px;
    color: var(--cream);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
    margin-bottom: 20px;
    user-select: none;
}

.wordmark-en {
    display: block;
    margin-top: 7px;
    font-family: var(--px-font);
    font-size: 8px;
    letter-spacing: 3px;
    text-indent: 3px;
    color: var(--amber);
}

/* 顶栏：字标居中 + 右侧全局「合上书」 */
.app-bar {
    position: relative;
    margin-bottom: 20px;
}

.app-bar .wordmark {
    margin-bottom: 0;
}

#close-book-button {
    position: absolute;
    right: 0;
    top: 2px;
    padding: 7px 12px;
    font-size: 12px;
    letter-spacing: 1px;
}

/* 导航：木条上的书页签 */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #241812;
    padding: 7px;
    border: 3px solid var(--room);
    /* 硬台阶：两层深块叠出厚度，嵌进书页 */
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.4),
        0 7px 0 rgba(18, 11, 5, 0.55);
}

.tab {
    flex: 1;
    padding: 10px 8px;
    border: 2px solid transparent;
    background: transparent;
    box-shadow: none;
    color: #c4a068;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    transition:
        background 0.12s steps(2),
        color 0.12s steps(2);
}

.tab:hover {
    color: var(--cream);
}

.tab.active {
    background: var(--amber);
    border-color: var(--amber-shadow);
    color: var(--ink);
    font-weight: 700;
    /* 琥珀温光：只一丝，融进色调不跳 */
    box-shadow:
        0 3px 0 var(--amber-shadow),
        0 0 10px rgba(232, 163, 61, 0.22);
}

/* 视图切换：瞬间出现 */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* 书签切换：方向滑动（新页从点击方向滑入，steps 保持像素硬台阶手感） */
.view.active.slide-from-right {
    animation: viewSlideRight 0.26s steps(6);
}

.view.active.slide-from-left {
    animation: viewSlideLeft 0.26s steps(6);
}

@keyframes viewSlideRight {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes viewSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 面板 = 像素边框书页（PNG frame） */
.panel {
    /* 淡纸纤维纹理(3%) + 纸面底色 */
    background:
        repeating-linear-gradient(45deg, rgba(58, 42, 24, 0.03) 0 1px, transparent 1px 6px),
        var(--paper);
    border: 6px solid transparent;
    border-image: var(--art-frame) 6 fill / 6px / 5px stretch;
    /* 立体书页：像素式层叠硬台阶(贴像素风) + 纸面受光/背光 + 环境投影 */
    box-shadow:
        inset 0 3px 0 rgba(255, 251, 235, 0.5),
        inset 0 -4px 0 rgba(58, 42, 24, 0.18),
        0 4px 0 #2a1a0c,
        0 8px 0 #1c1108,
        0 12px 0 #120b05,
        0 18px 26px rgba(0, 0, 0, 0.45);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
}

.panel-ornament {
    position: absolute;
    top: 5px;
    left: 8px;
    right: 8px;
    height: 0;
    border-top: 2px dashed rgba(58, 42, 24, 0.22);
}

.page-mark {
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 2px 9px;
    border: 1px solid var(--ink-faint);
    color: var(--ink-faint);
    font-size: 11px;
    letter-spacing: 2px;
    transform: rotate(2deg);
    opacity: 0.8;
    user-select: none;
}

.panel h2 {
    margin: 0 0 6px 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ink);
}

.panel-desc {
    margin: 0 0 24px 0;
    font-size: 13px;
    font-weight: 600;
    color: #5a4526;
}

.panel p {
    margin: 0 0 16px 0;
    color: #5a4526;
    font-weight: 600;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* 表单 */
label {
    display: block;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--ink-soft);
}

input[type='text'],
select {
    width: 100%;
    padding: 11px 13px;
    margin-top: 8px;
    background: var(--paper-soft);
    border: 2px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    box-shadow: inset 2px 2px 0 rgba(58, 42, 24, 0.14);
}

input[type='text']:focus,
select:focus {
    outline: none;
    border-color: var(--amber-deep);
    box-shadow:
        inset 2px 2px 0 rgba(58, 42, 24, 0.14),
        0 0 0 2px rgba(232, 163, 61, 0.4);
}

input[type='text']::placeholder {
    color: var(--ink-faint);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233a2a18' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 34px;
}

select option {
    background: var(--paper);
    color: var(--ink);
}

/* 按钮：PNG 像素按钮 */
button {
    padding: 10px 16px;
    border: 6px solid transparent;
    border-image: var(--art-btn) 6 fill / 6px stretch;
    background: transparent;
    border-radius: 0;
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

/* 主按钮 */
button.primary,
#create-character-form button[type='submit'] {
    width: 100%;
    padding: 13px 20px;
    border-image-source: var(--art-btn-active);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-top: 8px;
}

button.primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

button.danger {
    color: var(--danger);
}

/* 字段 */
.field {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.field-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 4px;
}

/* 按钮组 */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.button-group button {
    padding: 9px 12px;
    font-size: 13px;
    min-height: 40px;
}

.button-group button.active {
    border-image-source: var(--art-btn-active);
    font-weight: 700;
}

#behavior-options button {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 96px;
    padding: 10px 6px;
    text-align: center;
}

/* 场景地图 */
/* 现实坐标图：容器固定 16:9（384×216 逻辑坐标系） */
.scene-map {
    position: relative;
    margin-top: 8px;
    border: 3px solid var(--ink);
    box-shadow: 5px 5px 0 rgba(58, 42, 24, 0.3);
    line-height: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--room); /* 旧 fallback 图信箱式放入时的衬底 */
}

/* 不拉伸变形：contain 放入，旧 256×160 fallback 图会留边 */
.map-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.map-zone {
    position: absolute;
    padding: 0;
    background: transparent;
    border: 2px dashed transparent;
    border-image: none;
    box-shadow: none;
    line-height: normal;
}

.map-zone:hover {
    border-color: rgba(245, 196, 101, 0.85);
    background: rgba(245, 196, 101, 0.14);
    filter: none;
}

.map-zone.sel {
    border-style: solid;
    border-color: rgba(232, 163, 61, 0.38);
    background: rgba(232, 163, 61, 0.09);
}

/* 区域高亮精灵：与热区同位同尺寸，点亮时盖在夜景底图上 */
.map-zone-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0;
    pointer-events: none;
}

.map-zone:hover .map-zone-art,
.map-zone.sel .map-zone-art {
    opacity: 1;
}

.map-label {
    position: absolute;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--cream);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 1px 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}

.map-zone.sel .map-label {
    background: var(--amber-shadow);
    color: var(--amber-hi);
    bottom: auto;
    top: -9px;
}

/* 玩家标记：锚定区域中心（设定书 9.2），随容器缩放；8×12 原生 ≈ 2.1% 图宽 */
.map-cursor {
    position: absolute;
    width: 2.1%;
    transform: translate(-50%, -92%); /* 脚底落在区域中心点 */
    transition:
        left 0.35s steps(6),
        top 0.35s steps(6);
    pointer-events: none;
    z-index: 2;
}

.coordinate-label {
    font-size: 11px;
    color: var(--ink-faint);
    letter-spacing: 2px;
    flex-shrink: 0;
}

/* 事件页三层坐标：现实/映界克制，今日投影最醒目 */
.event-coordinate-map {
    margin-bottom: 20px;
    padding: 10px 14px;
    border: 2px dashed rgba(58, 42, 24, 0.22);
}

.event-coordinate-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 3px 0;
    font-size: 13px;
}

.event-coordinate-row strong {
    color: var(--ink-soft);
}

.event-coordinate-row strong.coordinate-parallel {
    color: var(--amber-shadow);
}

.event-projection-row {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 2px dashed rgba(58, 42, 24, 0.18);
}

.event-coordinate-row strong.event-projection {
    font-size: 15px;
    color: var(--amber-deep);
    letter-spacing: 1px;
}

/* 倾向像素列表 */
.pixel-list {
    margin-top: 8px;
    border: 2px solid var(--ink);
    background: var(--paper-soft);
    box-shadow: inset 2px 2px 0 rgba(58, 42, 24, 0.12);
}

.pixel-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-image: none;
    box-shadow: none;
    color: var(--ink);
    font-size: 15px;
    font-family: inherit;
    letter-spacing: 2px;
    text-align: left;
    cursor: pointer;
}

.pixel-item + .pixel-item {
    border-top: 2px dashed rgba(58, 42, 24, 0.18);
}

.pixel-item::before {
    content: '▶';
    margin-right: 10px;
    opacity: 0;
    color: var(--amber-deep);
}

.pixel-item:hover {
    background: rgba(232, 163, 61, 0.14);
    filter: none;
}

.pixel-item:hover::before {
    opacity: 0.55;
}

.pixel-item.sel {
    background: rgba(232, 163, 61, 0.28);
    font-weight: 700;
}

.pixel-item.sel::before {
    opacity: 1;
}

/* 人物卡 */
.character-header {
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 2px dashed rgba(58, 42, 24, 0.25);
}

.character-name-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.player-avatar {
    width: 50px;
    height: 50px;
    background: var(--paper-deep);
    border: 3px solid var(--ink);
    box-shadow: 4px 4px 0 rgba(58, 42, 24, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    flex-shrink: 0;
    user-select: none;
}

.player-name {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--ink);
}

.player-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: var(--ink);
    color: var(--amber);
    font-family: var(--px-font);
    font-size: 10px;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 rgba(58, 42, 24, 0.3);
}

.character-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.player-tendency {
    padding: 4px 11px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    border: 2px solid var(--ink-faint);
}

.player-title {
    padding: 4px 11px;
    background: rgba(232, 163, 61, 0.24);
    color: var(--amber-shadow);
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--amber-deep);
}

/* 经验条：条在上，可读中文说明在下 */
.xp-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
}

.xp-bar {
    height: 10px;
    background: var(--paper-deep);
    border: 2px solid var(--ink);
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    width: 0;
    background: var(--amber);
    transition: width 0.3s steps(8);
}

/* XP 说明用正常字体，手机端也不得小于 12px */
.xp-label {
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* 状态标签 */
.statuses {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    min-height: 28px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    font-size: 12px;
    background: rgba(122, 154, 74, 0.2);
    color: var(--leaf-ink);
    border: 2px solid var(--leaf);
}

.status-tag::before {
    font-size: 11px;
}

.status-tag.status-low_energy {
    background: rgba(232, 163, 61, 0.22);
    color: var(--amber-shadow);
    border-color: var(--amber-deep);
}

.status-tag.status-low_energy::before {
    content: '⚡';
}

.status-tag.status-late_wanderer {
    background: rgba(90, 107, 138, 0.2);
    color: var(--night-ink);
    border-color: var(--night);
}

.status-tag.status-late_wanderer::before {
    content: '☾';
}

.status-tag.status-inspiration {
    background: rgba(122, 154, 74, 0.2);
    color: var(--leaf-ink);
    border-color: var(--leaf);
}

.status-tag.status-inspiration::before {
    content: '✦';
}

/* 属性区 */
.stats-section {
    margin-bottom: 24px;
}

.section-label {
    font-size: 11px;
    color: var(--ink-faint);
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-name {
    width: 72px;
    font-size: 13px;
    font-weight: 700;
    color: #2e2110;
    letter-spacing: 1px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 属性图标：暂无新素材，--art-icons 默认 none（空 16×16 占位；登记新素材后自动恢复） */
.stat-name::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: var(--art-icons);
    background-size: 80px 16px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.stat-energy::before {
    background-position: 0 0;
}
.stat-focus::before {
    background-position: -16px 0;
}
.stat-creativity::before {
    background-position: -32px 0;
}
.stat-social::before {
    background-position: -48px 0;
}
.stat-resilience::before {
    background-position: -64px 0;
}

/* 10 格像素槽 */
.stat-bar {
    flex: 1;
    height: 16px;
    display: flex;
    background: var(--paper-deep);
    border: 2px solid var(--ink);
    /* 槽内凹，像嵌进纸面 */
    box-shadow: inset 0 2px 0 rgba(58, 42, 24, 0.3);
}

.seg {
    flex: 1;
    border-left: 2px solid var(--ink);
}

.seg:first-child {
    border-left: none;
}

.seg.on {
    background: var(--amber);
    /* 点亮格上釉：上缘高光 + 下缘深琥珀，像有切面的像素宝石，亮而不跳 */
    box-shadow:
        inset 0 1px 0 rgba(255, 240, 200, 0.5),
        inset 0 -2px 0 rgba(185, 122, 30, 0.6);
}

.stat-value {
    width: 48px;
    font-weight: 600;
    color: #4a3720;
    text-align: right;
    font-size: 13px;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions button,
.actions .import-label {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.import-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 6px solid transparent;
    border-image: var(--art-btn) 6 fill / 6px stretch;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    margin: 0;
    font-family: inherit;
}

.import-label input {
    display: none;
}

/* 档案区：摘要 / 称号图鉴 / 档案管理 */
.archive-section {
    margin-bottom: 24px;
}

.archive-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 9px 2px;
    border-bottom: 2px dashed rgba(58, 42, 24, 0.18);
    font-size: 13px;
}

.archive-row:last-child {
    border-bottom: none;
}

.archive-key {
    color: var(--ink-faint);
    flex-shrink: 0;
}

.archive-val {
    color: var(--ink);
    text-align: right;
    font-weight: 700;
    word-break: break-all;
}

.archive-empty {
    color: var(--ink-faint);
    font-size: 13px;
    padding: 6px 2px;
}

/* 危险操作：与档案管理明显分组，按钮弱化、虚线警示 */
.danger-zone {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 2px dashed rgba(168, 64, 46, 0.4);
}

.danger-zone .section-label {
    color: rgba(168, 64, 46, 0.8);
}

#clear-save-button {
    border-image: none;
    border: 2px dashed var(--danger);
    background: transparent;
    color: var(--danger);
    padding: 8px 14px;
    font-size: 13px;
    opacity: 0.85;
}

#clear-save-button:hover {
    filter: none;
    opacity: 1;
    background: var(--danger-soft);
}

/* 映界面板 */
.event-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 26px;
}

.divider-line {
    flex: 1;
    height: 0;
    border-top: 2px dashed rgba(58, 42, 24, 0.3);
}

.divider-text {
    color: var(--amber-shadow);
    font-size: 13px;
    letter-spacing: 6px;
    text-indent: 6px;
    font-weight: 700;
}

.divider-text::before,
.divider-text::after {
    content: '✦';
    font-size: 10px;
    margin: 0 8px;
    opacity: 0.7;
}

.event-location {
    color: var(--amber-shadow);
    font-size: 13px;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 700;
}

.event-title {
    margin: 0 0 18px 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.35;
    color: var(--ink);
}

.event-narrative {
    font-family: var(--serif);
    color: #4a3620;
    line-height: 1.95;
    margin-bottom: 32px;
    font-size: 15.5px;
    min-height: 5.8em; /* 打字机期间版面不跳 */
}

.tw-cursor {
    color: var(--amber-deep);
    animation: hintBlink 0.8s steps(2) infinite;
}

.event-choices-label {
    font-size: 13px;
    color: var(--ink-faint);
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    line-height: 1.55;
    font-family: inherit;
}

.choice-key {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--px-font);
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.choice-text {
    flex: 1;
}

.choice-btn:hover .choice-key {
    background: var(--ink);
    color: var(--amber);
}

/* 选项数量自适应：4-5 个选项时进入紧凑模式（2-3 个保持宽松版式） */
.choices-compact {
    gap: 8px;
}

.choices-compact .choice-btn {
    padding: 10px 12px;
    line-height: 1.5;
}

.choices-compact .choice-key {
    width: 22px;
    height: 22px;
    font-size: 9px;
}

/* 完成状态 */
.event-done {
    padding: 13px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--amber-shadow);
    background: rgba(232, 163, 61, 0.14);
    border: 2px dashed var(--amber-deep);
}

/* 结算结果 */
.event-result {
    margin-top: 14px;
    padding: 16px 18px;
    background: rgba(232, 163, 61, 0.16);
    border: 2px dashed var(--amber-deep);
}

/* 结算后操作：查看日志 / 返回人物卡 / 合上书 */
.event-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 2px dashed rgba(58, 42, 24, 0.3);
}

.event-actions button {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
}

.result-line {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink);
}

.result-line:last-child {
    margin-bottom: 0;
}

.gain {
    color: var(--leaf-ink);
    font-weight: 700;
}

.title-gain {
    color: var(--amber-shadow);
    font-weight: 700;
}

/* 日志：像素日记本 */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    position: relative;
    padding: 14px 16px 14px 20px;
    background: var(--paper-soft);
    border: 2px solid var(--ink);
    border-left: 6px double var(--ink);
    box-shadow: 3px 3px 0 rgba(58, 42, 24, 0.24);
}
.log-group-title {
    margin: 1.35rem 0 0.5rem;
    color: var(--ink-faint);
    font-size: 1rem;
    font-weight: 700;
}
.view {
    overflow-x: clip;
}

.log-item:hover {
    background: #eedfae;
    filter: none;
}

.log-summary {
    background: rgba(232, 163, 61, 0.18);
    border-left-color: var(--amber-deep);
}

.log-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--ink);
    line-height: 1.4;
}

.log-detail {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.65;
}

.log-empty {
    text-align: center;
    color: var(--ink-faint);
    padding: 48px 0;
    font-size: 14px;
}

/* 存储错误提示 */
.storage-error {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    color: var(--cream);
    padding: 12px 22px;
    font-size: 14px;
    border: 3px solid #6d2418;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
    z-index: 100;
    max-width: 90%;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--room);
}

::-webkit-scrollbar-thumb {
    background: #4a3120;
    border: 2px solid var(--room);
}

::-webkit-scrollbar-thumb:hover {
    background: #6b4a2f;
}

/* ============ 素材 v2：打开的书本衬底（html.art-book-open 启用） ============ */
html.art-book-open #app::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--art-book-open);
    background-size: cover;
    background-position: center top;
    image-rendering: pixelated;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* ============ 素材 v2：UI 九宫格覆盖（html.art-ui-v2 启用） ============ */
/* 新 UI 素材（ui_*.png 裁剪版）切片契约：按钮 slice 1 / 主按钮与选中态 slice 2 /
   对话框 slice 2 / 输入框 slice 1；进度条与标签平铺或整幅拉伸 */

/* 按钮：深色像素按钮 + 奶油字 */
html.art-ui-v2 button,
html.art-ui-v2 .import-label {
    border-width: 7px;
    border-image: var(--art-btn) 6 fill / 7px stretch;
    color: var(--cream);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

/* 主按钮 / 选中态：琥珀按钮 + 深色字 */
html.art-ui-v2 button.primary,
html.art-ui-v2 #create-character-form button[type='submit'],
html.art-ui-v2 .button-group button.active {
    border-image: var(--art-btn-active) 6 fill / 7px stretch;
    color: #3a2a18;
    text-shadow: none;
}

/* 免按钮化元素：不被上面的通用按钮规则波及 */
html.art-ui-v2 .map-zone,
html.art-ui-v2 .pixel-item,
html.art-ui-v2 .menu-item,
html.art-ui-v2 #intro-book,
html.art-ui-v2 .intro-prop,
html.art-ui-v2 .intro-sticky-close {
    border-image: none;
    border: none;
    background: transparent;
    text-shadow: none;
}
html.art-ui-v2 .intro-prop {
    padding: 0;
    box-shadow: none;
}
html.art-ui-v2 .intro-sticky-close {
    padding: 0 4px;
    color: #5a3a22;
}
html.art-ui-v2 .intro-sticky-next {
    border-image: none;
    border: 1px solid rgba(90, 58, 34, 0.45);
    background: rgba(90, 58, 34, 0.12);
    color: #4a2a14;
    padding: 3px 9px;
    text-shadow: none;
}

html.art-ui-v2 .map-zone {
    border: 2px dashed transparent;
}

/* 通用按钮规则优先级更高，热区的 hover/选中态需在同优先级下重新声明 */
html.art-ui-v2 .map-zone:hover {
    border-color: rgba(245, 196, 101, 0.85);
    background: rgba(245, 196, 101, 0.14);
}

html.art-ui-v2 .map-zone.sel {
    border-style: solid;
    border-color: rgba(232, 163, 61, 0.38);
    background: rgba(232, 163, 61, 0.09);
}

html.art-ui-v2 .pixel-item {
    color: var(--ink);
}

html.art-ui-v2 .pixel-item + .pixel-item {
    border-top: 2px dashed rgba(58, 42, 24, 0.18);
}

html.art-ui-v2 .pixel-item:hover {
    background: rgba(232, 163, 61, 0.14);
}

html.art-ui-v2 .pixel-item.sel {
    background: rgba(232, 163, 61, 0.28);
}

html.art-ui-v2 .menu-item-danger:hover,
html.art-ui-v2 .menu-item-danger:focus-visible {
    background: rgba(168, 64, 46, 0.14);
}

html.art-ui-v2 .menu-item:hover,
html.art-ui-v2 .menu-item:focus-visible {
    background: rgba(245, 233, 205, 0.07);
}

/* 导航书签：像素书签形状 */

/* 导航书签（v2 像素素材）：默认 ui_tab_default / 选中 ui_tab_active，九宫格拉伸 */
html.art-ui-v2 .tabs .tab {
    border-width: 8px;
    border-image: var(--art-tab) 8 fill / 8px stretch;
    color: #cbb98f;
    background: transparent;
    box-shadow: none;
    font-synthesis: none;
    text-shadow: none;
}
html.art-ui-v2 .tabs .tab:hover {
    color: var(--cream);
}
/* 选中书签：纯色琥珀底 + 深字（木纹底对比度太低，弃用激活态素材） */
html.art-ui-v2 .tabs .tab.active {
    border-image: none;
    border-width: 2px;
    border-style: solid;
    border-color: var(--amber-shadow);
    background: var(--amber);
    color: var(--ink);
    font-weight: 700;
    box-shadow:
        0 3px 0 var(--amber-shadow),
        0 0 10px rgba(232, 163, 61, 0.22);
}

/* ============ 地图角色人物（v1：点区域走过去） ============
   脚底锚定：left/top 指到脚底点，transform 把图水平居中、垂直上移整高。
   显示高 38 逻辑像素（比区域建筑 40~50 小一号），宽按 128:216 ≈ 22。
   素材为 aligned 统一画布 128×216，脚底 y208；pixelated 保持像素锐利。 */
.map-player {
    position: absolute;
    width: 5.73%; /* 22 / 384 */
    height: 17.59%; /* 38 / 216 */
    /* left/top 已由 JS 设为脚底逻辑点的百分比；
     transform：水平居中(-50%)、垂直把图往上移整高(-100%)使脚底对齐锚点 */
    transform: translate(-50%, -100%);
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 6; /* 高于区域热区(默认)与高亮，低于 UI */
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
}

/* reduced-motion：人物不逐帧、不位移动画（由 JS 侧 fps/transition 控制，这里兜底） */
@media (prefers-reduced-motion: reduce) {
    .map-player {
        transition: none !important;
    }

    .view.active.slide-from-right,
    .view.active.slide-from-left {
        animation: none !important;
    }

    .intro-overlay.intro-pane-in {
        animation: none !important;
    }
}

/* ============ 手机端（≤480px）：导航标签单行紧凑 ============
   FusionPixel 12px 像素字体在 13px 下最长标签需 127px > 内容宽 91px，
   三标签全部折行成参差两行（按钮被撑到 70px 高，视觉"没对齐"）。
   修复：缩小字号到 11px、去字距、收缩自适应宽 + 居中，强制单行；行高显式收紧。 */
@media (max-width: 480px) {
    .tabs {
        gap: 4px;
        padding: 5px;
        margin-bottom: 16px;
        justify-content: center;
    }

    .tab {
        flex: 0 1 auto;
        font-size: 11px;
        letter-spacing: 0;
        line-height: 1.35;
        padding: 7px 5px;
        white-space: nowrap;
    }
}

/* 小屏地图热区：按钮几何保持与底图同比（测试按此断言），只用伪元素把可点范围补到 44px。 */
.map-zone::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
}

/* 小屏设置面板：原 38px 左右内边距在 320px 宽度下把字号控件挤出可视区。 */
@media (max-width: 480px) {
    .intro-overlay .menu-window {
        width: calc(100vw - 24px);
        max-width: 420px;
        min-width: 0;
        padding: 22px 16px 18px;
    }

    .intro-overlay .menu-title {
        font-size: 20px;
        letter-spacing: 6px;
        text-indent: 6px;
    }

    .intro-overlay .menu-note {
        max-width: none;
    }
}
