@font-face {
  font-family: "Hongyun Rounded";
  src: url("/fonts/gensen-rounded/gensen-rounded2tw-r-v2100.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+2002-2003,U+2010-2012,U+2015-2016,U+2018-201A,U+201E,U+2020-2021,U+2025,U+2027,U+2030,U+2032-2033,U+2035,U+2039-203C,U+2042,U+2047-2049,U+2051,U+2190,U+3000,U+3003-303F,U+4E09,U+4E24,U+4E2A,U+4E3A,U+4E48-4E49,U+4E88,U+4E92,U+4EAB,U+4EC0,U+4ECD-4ECE,U+4EE5,U+4EFB,U+4EFD,U+4F20,U+4F3C,U+4F4D,U+4F53,U+4F55,U+4F59,U+4F5C,U+4F60,U+4F7F,U+4FA7,U+4FBF,U+4FE1,U+5076,U+50A8,U+50CF,U+5145,U+5148,U+5176-5177,U+5192,U+5199,U+51B3,U+521D,U+5220,U+522E,U+5237,U+526A,U+529F,U+52A1,U+5305,U+5316,U+5373,U+5385,U+53D1,U+53D7-53D8,U+53E3,U+5404,U+5426,U+542B,U+542F,U+547D,U+54CD,U+5668,U+56DE,U+56E0,U+5747,U+586B,U+5904,U+5907,U+5916,U+591A,U+592A,U+5931,U+5934,U+5947,U+5957,U+597D,U+5982,U+5B57-5B58,U+5B83,U+5BA2,U+5BA4,U+5BB9,U+5BFB,U+5C04,U+5C31,U+5C3E,U+5DE5,U+5DEE,U+5DF1,U+5E94,U+5EFA,U+5F02,U+5F0F,U+5F15,U+5F52,U+5F71,U+5F84,U+5F97,U+5FC3,U+600E,U+606F-6070,U+61C2,U+623F,U+6267,U+6279,U+628A,U+62D2,U+62D6,U+62E9,U+62FC,U+6301,U+6388,U+6392,U+6478,U+64CD,U+652F,U+6587,U+65E7,U+65E9,U+6620,U+662F,U+6635,U+670D,U+6765,U+677F,U+6784,U+6846,U+6A21,U+6B62,U+6B64-6B65,U+6C42,U+6CD5,U+6D4B,U+6D4F,U+6D88,U+6E05,U+6EE1,U+7126,U+72B6,U+731C,U+73B0,U+751F,U+7531,U+767E,U+7981,U+79BB,U+79CD,U+79D1,U+79F0,U+7A33,U+7A97,U+7ACB,U+7AD9,U+7AEF,U+7B7E,U+7EBF,U+7ECF,U+7ED9,U+7EDC-7EDD,U+7EE7,U+7F16,U+7F3A,U+7F51,U+8005,U+805A,U+81EA,U+81F4,U+82E5,U+83B7,U+884C,U+8981,U+89C1,U+89C8,U+89E3,U+89E6,U+8BAE,U+8BBF,U+8BC6,U+8BDD,U+8BE5,U+8BF4,U+8D25-8D26,U+8D34,U+8D77,U+8D85,U+8D8A,U+8DB3,U+8DE8,U+8EAB,U+8F83,U+8FD1,U+8FD4,U+8FD8-8FD9,U+8FDB,U+9001,U+9010,U+9047,U+90E8,U+90FD,U+91CA,U+91CC,U+94AE,U+95EE,U+9664,U+968F,U+96F6,U+9700,U+9AA4,U+FF01-FF07,U+FF0A,U+FF0D-FF0E,U+FF10-FF19,U+FF1C-FF5B,U+FF5D-FFA0,U+FFE0-FFE6,U+FFE8-FFEE;
}
@font-face {
  font-family: "Hongyun Rounded";
  src: url("/fonts/gensen-rounded/gensen-home-r-20261026.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+20-7E,U+A0-FF,U+2013-2014,U+201C-201D,U+2022,U+2026,U+2192-2193,U+2212,U+25D0,U+3001-3002,U+4E00,U+4E0A-4E0B,U+4E0D-4E0E,U+4E14,U+4E2D,U+4E3B,U+4E4B,U+4E5F,U+4E8E,U+4EA4,U+4EC5,U+4EE3,U+4EF6,U+4F1A,U+4F8B,U+4F9B,U+4FDD,U+503C,U+505C,U+5141,U+5165,U+5168,U+516C-516D,U+5171,U+5173,U+5185,U+518D,U+51B2,U+51C6,U+51CF,U+51FA,U+5206-5207,U+5217,U+5219,U+5224,U+5230,U+5236,U+524D,U+52A0,U+52A8-52A9,U+52BF,U+5339-533A,U+534A,U+5355,U+5357,U+5361,U+5386,U+539F,U+53CC,U+53D6,U+53E0,U+53EA,U+53EF,U+53F2,U+53F7,U+5408,U+540C,U+540E,U+5458,U+548C,U+54AA,U+56F4,U+5728,U+5730,U+5740,U+589E,U+590D,U+5927,U+5929,U+5956,U+59CB,U+5B50,U+5B8C,U+5B9A,U+5BF9,U+5BFC,U+5C0F,U+5C11,U+5C55,U+5DF2,U+5E03,U+5E2E,U+5E38,U+5E76,U+5E8F,U+5F00,U+5F53,U+5F55,U+5F62,U+5F85,U+5FC5,U+5FEB,U+6001,U+6062,U+6210,U+6216,U+6240,U+624B,U+624D,U+6253,U+627E,U+6293,U+62FF,U+6307,U+6309,U+6321,U+6362,U+636E,U+63A5,U+63CF-63D0,U+63ED,U+64E6,U+6536,U+6539,U+6548,U+6570,U+6574,U+65AD,U+65B0,U+65B9,U+65E0,U+65E5,U+65F6,U+660E,U+663E,U+6653,U+6682,U+6697,U+66F4,U+6700,U+6709,U+671F,U+672A,U+672C,U+673A,U+6742,U+6761,U+679C,U+67E5,U+6807,U+680F,U+6837-6838,U+683C,U+68C0,U+6B21,U+6B63,U+6BB5,U+6BCF,U+6CA1,U+70B9,U+7167,U+7247,U+724C,U+7406,U+7528,U+754C,U+7559,U+7684,U+76D6,U+76D8,U+76EE,U+76F4,U+76F8,U+770B,U+786E,U+793A,U+79C1,U+7A0D,U+7A7A,U+7A81,U+7B2C,U+7B49,U+7B97,U+7BA1,U+7C7B,U+7CBE,U+7D22,U+7EC4,U+7ED3,U+7EDF,U+7EED,U+7F6E,U+804A,U+80FD,U+811A,U+81F3,U+822A,U+8303,U+864E,U+8868,U+8986,U+89C4,U+8BA1,U+8BA4,U+8BB0,U+8BB8,U+8BBE,U+8BD5,U+8BE2,U+8BF7,U+8BFB,U+8C03,U+8C79,U+8DF3,U+8F7B,U+8F7D,U+8F93,U+8FB9,U+8FC7,U+8FD0,U+8FDE,U+8FF0,U+9009,U+90BB,U+914D,U+91CD,U+94FE,U+9501,U+952E,U+95ED,U+95F4,U+9650,U+9690,U+9762,U+9875,U+9879-987B,U+9898,U+9996,U+9A8C,U+9AD8,U+9E3F,U+9ED8,U+9F20,U+9F99,U+FF08-FF09,U+FF0B-FF0C,U+FF0F,U+FF1A-FF1B,U+FF5C;
}
@font-face {
  font-family: "Hongyun Rounded";
  src: url("/fonts/gensen-rounded/gensen-rounded2tw-m-v2100.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+2002-2003,U+2010-2012,U+2015-2016,U+2018-201A,U+201E,U+2020-2021,U+2025,U+2027,U+2030,U+2032-2033,U+2035,U+2039-203C,U+2042,U+2047-2049,U+2051,U+2190,U+3000,U+3003-303F,U+4E09,U+4E24,U+4E2A,U+4E3A,U+4E48-4E49,U+4E88,U+4E92,U+4EAB,U+4EC0,U+4ECD-4ECE,U+4EE5,U+4EFB,U+4EFD,U+4F20,U+4F3C,U+4F4D,U+4F53,U+4F55,U+4F59,U+4F5C,U+4F60,U+4F7F,U+4FA7,U+4FBF,U+4FE1,U+5076,U+50A8,U+50CF,U+5145,U+5148,U+5176-5177,U+5192,U+5199,U+51B3,U+521D,U+5220,U+522E,U+5237,U+526A,U+529F,U+52A1,U+5305,U+5316,U+5373,U+5385,U+53D1,U+53D7-53D8,U+53E3,U+5404,U+5426,U+542B,U+542F,U+547D,U+54CD,U+5668,U+56DE,U+56E0,U+5747,U+586B,U+5904,U+5907,U+5916,U+591A,U+592A,U+5931,U+5934,U+5947,U+5957,U+597D,U+5982,U+5B57-5B58,U+5B83,U+5BA2,U+5BA4,U+5BB9,U+5BFB,U+5C04,U+5C31,U+5C3E,U+5DE5,U+5DEE,U+5DF1,U+5E94,U+5EFA,U+5F02,U+5F0F,U+5F15,U+5F52,U+5F71,U+5F84,U+5F97,U+5FC3,U+600E,U+606F-6070,U+61C2,U+623F,U+6267,U+6279,U+628A,U+62D2,U+62D6,U+62E9,U+62FC,U+6301,U+6388,U+6392,U+6478,U+64CD,U+652F,U+6587,U+65E7,U+65E9,U+6620,U+662F,U+6635,U+670D,U+6765,U+677F,U+6784,U+6846,U+6A21,U+6B62,U+6B64-6B65,U+6C42,U+6CD5,U+6D4B,U+6D4F,U+6D88,U+6E05,U+6EE1,U+7126,U+72B6,U+731C,U+73B0,U+751F,U+7531,U+767E,U+7981,U+79BB,U+79CD,U+79D1,U+79F0,U+7A33,U+7A97,U+7ACB,U+7AD9,U+7AEF,U+7B7E,U+7EBF,U+7ECF,U+7ED9,U+7EDC-7EDD,U+7EE7,U+7F16,U+7F3A,U+7F51,U+8005,U+805A,U+81EA,U+81F4,U+82E5,U+83B7,U+884C,U+8981,U+89C1,U+89C8,U+89E3,U+89E6,U+8BAE,U+8BBF,U+8BC6,U+8BDD,U+8BE5,U+8BF4,U+8D25-8D26,U+8D34,U+8D77,U+8D85,U+8D8A,U+8DB3,U+8DE8,U+8EAB,U+8F83,U+8FD1,U+8FD4,U+8FD8-8FD9,U+8FDB,U+9001,U+9010,U+9047,U+90E8,U+90FD,U+91CA,U+91CC,U+94AE,U+95EE,U+9664,U+968F,U+96F6,U+9700,U+9AA4,U+FF01-FF07,U+FF0A,U+FF0D-FF0E,U+FF10-FF19,U+FF1C-FF5B,U+FF5D-FFA0,U+FFE0-FFE6,U+FFE8-FFEE;
}
@font-face {
  font-family: "Hongyun Rounded";
  src: url("/fonts/gensen-rounded/gensen-home-m-20261026.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+20-7E,U+A0-FF,U+2013-2014,U+201C-201D,U+2022,U+2026,U+2192-2193,U+2212,U+25D0,U+3001-3002,U+4E00,U+4E0A-4E0B,U+4E0D-4E0E,U+4E14,U+4E2D,U+4E3B,U+4E4B,U+4E5F,U+4E8E,U+4EA4,U+4EC5,U+4EE3,U+4EF6,U+4F1A,U+4F8B,U+4F9B,U+4FDD,U+503C,U+505C,U+5141,U+5165,U+5168,U+516C-516D,U+5171,U+5173,U+5185,U+518D,U+51B2,U+51C6,U+51CF,U+51FA,U+5206-5207,U+5217,U+5219,U+5224,U+5230,U+5236,U+524D,U+52A0,U+52A8-52A9,U+52BF,U+5339-533A,U+534A,U+5355,U+5357,U+5361,U+5386,U+539F,U+53CC,U+53D6,U+53E0,U+53EA,U+53EF,U+53F2,U+53F7,U+5408,U+540C,U+540E,U+5458,U+548C,U+54AA,U+56F4,U+5728,U+5730,U+5740,U+589E,U+590D,U+5927,U+5929,U+5956,U+59CB,U+5B50,U+5B8C,U+5B9A,U+5BF9,U+5BFC,U+5C0F,U+5C11,U+5C55,U+5DF2,U+5E03,U+5E2E,U+5E38,U+5E76,U+5E8F,U+5F00,U+5F53,U+5F55,U+5F62,U+5F85,U+5FC5,U+5FEB,U+6001,U+6062,U+6210,U+6216,U+6240,U+624B,U+624D,U+6253,U+627E,U+6293,U+62FF,U+6307,U+6309,U+6321,U+6362,U+636E,U+63A5,U+63CF-63D0,U+63ED,U+64E6,U+6536,U+6539,U+6548,U+6570,U+6574,U+65AD,U+65B0,U+65B9,U+65E0,U+65E5,U+65F6,U+660E,U+663E,U+6653,U+6682,U+6697,U+66F4,U+6700,U+6709,U+671F,U+672A,U+672C,U+673A,U+6742,U+6761,U+679C,U+67E5,U+6807,U+680F,U+6837-6838,U+683C,U+68C0,U+6B21,U+6B63,U+6BB5,U+6BCF,U+6CA1,U+70B9,U+7167,U+7247,U+724C,U+7406,U+7528,U+754C,U+7559,U+7684,U+76D6,U+76D8,U+76EE,U+76F4,U+76F8,U+770B,U+786E,U+793A,U+79C1,U+7A0D,U+7A7A,U+7A81,U+7B2C,U+7B49,U+7B97,U+7BA1,U+7C7B,U+7CBE,U+7D22,U+7EC4,U+7ED3,U+7EDF,U+7EED,U+7F6E,U+804A,U+80FD,U+811A,U+81F3,U+822A,U+8303,U+864E,U+8868,U+8986,U+89C4,U+8BA1,U+8BA4,U+8BB0,U+8BB8,U+8BBE,U+8BD5,U+8BE2,U+8BF7,U+8BFB,U+8C03,U+8C79,U+8DF3,U+8F7B,U+8F7D,U+8F93,U+8FB9,U+8FC7,U+8FD0,U+8FDE,U+8FF0,U+9009,U+90BB,U+914D,U+91CD,U+94FE,U+9501,U+952E,U+95ED,U+95F4,U+9650,U+9690,U+9762,U+9875,U+9879-987B,U+9898,U+9996,U+9A8C,U+9AD8,U+9E3F,U+9ED8,U+9F20,U+9F99,U+FF08-FF09,U+FF0B-FF0C,U+FF0F,U+FF1A-FF1B,U+FF5C;
}
@font-face {
  font-family: "Hongyun Rounded";
  src: url("/fonts/gensen-rounded/gensen-rounded2tw-b-v2100.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+2002-2003,U+2010-2012,U+2015-2016,U+2018-201A,U+201E,U+2020-2021,U+2025,U+2027,U+2030,U+2032-2033,U+2035,U+2039-203C,U+2042,U+2047-2049,U+2051,U+2190,U+3000,U+3003-303F,U+4E09,U+4E24,U+4E2A,U+4E3A,U+4E48-4E49,U+4E88,U+4E92,U+4EAB,U+4EC0,U+4ECD-4ECE,U+4EE5,U+4EFB,U+4EFD,U+4F20,U+4F3C,U+4F4D,U+4F53,U+4F55,U+4F59,U+4F5C,U+4F60,U+4F7F,U+4FA7,U+4FBF,U+4FE1,U+5076,U+50A8,U+50CF,U+5145,U+5148,U+5176-5177,U+5192,U+5199,U+51B3,U+521D,U+5220,U+522E,U+5237,U+526A,U+529F,U+52A1,U+5305,U+5316,U+5373,U+5385,U+53D1,U+53D7-53D8,U+53E3,U+5404,U+5426,U+542B,U+542F,U+547D,U+54CD,U+5668,U+56DE,U+56E0,U+5747,U+586B,U+5904,U+5907,U+5916,U+591A,U+592A,U+5931,U+5934,U+5947,U+5957,U+597D,U+5982,U+5B57-5B58,U+5B83,U+5BA2,U+5BA4,U+5BB9,U+5BFB,U+5C04,U+5C31,U+5C3E,U+5DE5,U+5DEE,U+5DF1,U+5E94,U+5EFA,U+5F02,U+5F0F,U+5F15,U+5F52,U+5F71,U+5F84,U+5F97,U+5FC3,U+600E,U+606F-6070,U+61C2,U+623F,U+6267,U+6279,U+628A,U+62D2,U+62D6,U+62E9,U+62FC,U+6301,U+6388,U+6392,U+6478,U+64CD,U+652F,U+6587,U+65E7,U+65E9,U+6620,U+662F,U+6635,U+670D,U+6765,U+677F,U+6784,U+6846,U+6A21,U+6B62,U+6B64-6B65,U+6C42,U+6CD5,U+6D4B,U+6D4F,U+6D88,U+6E05,U+6EE1,U+7126,U+72B6,U+731C,U+73B0,U+751F,U+7531,U+767E,U+7981,U+79BB,U+79CD,U+79D1,U+79F0,U+7A33,U+7A97,U+7ACB,U+7AD9,U+7AEF,U+7B7E,U+7EBF,U+7ECF,U+7ED9,U+7EDC-7EDD,U+7EE7,U+7F16,U+7F3A,U+7F51,U+8005,U+805A,U+81EA,U+81F4,U+82E5,U+83B7,U+884C,U+8981,U+89C1,U+89C8,U+89E3,U+89E6,U+8BAE,U+8BBF,U+8BC6,U+8BDD,U+8BE5,U+8BF4,U+8D25-8D26,U+8D34,U+8D77,U+8D85,U+8D8A,U+8DB3,U+8DE8,U+8EAB,U+8F83,U+8FD1,U+8FD4,U+8FD8-8FD9,U+8FDB,U+9001,U+9010,U+9047,U+90E8,U+90FD,U+91CA,U+91CC,U+94AE,U+95EE,U+9664,U+968F,U+96F6,U+9700,U+9AA4,U+FF01-FF07,U+FF0A,U+FF0D-FF0E,U+FF10-FF19,U+FF1C-FF5B,U+FF5D-FFA0,U+FFE0-FFE6,U+FFE8-FFEE;
}
@font-face {
  font-family: "Hongyun Rounded";
  src: url("/fonts/gensen-rounded/gensen-home-b-20261026.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+20-7E,U+A0-FF,U+2013-2014,U+201C-201D,U+2022,U+2026,U+2192-2193,U+2212,U+25D0,U+3001-3002,U+4E00,U+4E0A-4E0B,U+4E0D-4E0E,U+4E14,U+4E2D,U+4E3B,U+4E4B,U+4E5F,U+4E8E,U+4EA4,U+4EC5,U+4EE3,U+4EF6,U+4F1A,U+4F8B,U+4F9B,U+4FDD,U+503C,U+505C,U+5141,U+5165,U+5168,U+516C-516D,U+5171,U+5173,U+5185,U+518D,U+51B2,U+51C6,U+51CF,U+51FA,U+5206-5207,U+5217,U+5219,U+5224,U+5230,U+5236,U+524D,U+52A0,U+52A8-52A9,U+52BF,U+5339-533A,U+534A,U+5355,U+5357,U+5361,U+5386,U+539F,U+53CC,U+53D6,U+53E0,U+53EA,U+53EF,U+53F2,U+53F7,U+5408,U+540C,U+540E,U+5458,U+548C,U+54AA,U+56F4,U+5728,U+5730,U+5740,U+589E,U+590D,U+5927,U+5929,U+5956,U+59CB,U+5B50,U+5B8C,U+5B9A,U+5BF9,U+5BFC,U+5C0F,U+5C11,U+5C55,U+5DF2,U+5E03,U+5E2E,U+5E38,U+5E76,U+5E8F,U+5F00,U+5F53,U+5F55,U+5F62,U+5F85,U+5FC5,U+5FEB,U+6001,U+6062,U+6210,U+6216,U+6240,U+624B,U+624D,U+6253,U+627E,U+6293,U+62FF,U+6307,U+6309,U+6321,U+6362,U+636E,U+63A5,U+63CF-63D0,U+63ED,U+64E6,U+6536,U+6539,U+6548,U+6570,U+6574,U+65AD,U+65B0,U+65B9,U+65E0,U+65E5,U+65F6,U+660E,U+663E,U+6653,U+6682,U+6697,U+66F4,U+6700,U+6709,U+671F,U+672A,U+672C,U+673A,U+6742,U+6761,U+679C,U+67E5,U+6807,U+680F,U+6837-6838,U+683C,U+68C0,U+6B21,U+6B63,U+6BB5,U+6BCF,U+6CA1,U+70B9,U+7167,U+7247,U+724C,U+7406,U+7528,U+754C,U+7559,U+7684,U+76D6,U+76D8,U+76EE,U+76F4,U+76F8,U+770B,U+786E,U+793A,U+79C1,U+7A0D,U+7A7A,U+7A81,U+7B2C,U+7B49,U+7B97,U+7BA1,U+7C7B,U+7CBE,U+7D22,U+7EC4,U+7ED3,U+7EDF,U+7EED,U+7F6E,U+804A,U+80FD,U+811A,U+81F3,U+822A,U+8303,U+864E,U+8868,U+8986,U+89C4,U+8BA1,U+8BA4,U+8BB0,U+8BB8,U+8BBE,U+8BD5,U+8BE2,U+8BF7,U+8BFB,U+8C03,U+8C79,U+8DF3,U+8F7B,U+8F7D,U+8F93,U+8FB9,U+8FC7,U+8FD0,U+8FDE,U+8FF0,U+9009,U+90BB,U+914D,U+91CD,U+94FE,U+9501,U+952E,U+95ED,U+95F4,U+9650,U+9690,U+9762,U+9875,U+9879-987B,U+9898,U+9996,U+9A8C,U+9AD8,U+9E3F,U+9ED8,U+9F20,U+9F99,U+FF08-FF09,U+FF0B-FF0C,U+FF0F,U+FF1A-FF1B,U+FF5C;
}

:root {
  --bg: #fff9f5;
  --surface: #ffffff;
  --surface-2: #fff4eb;
  --surface-3: #fff9d9;
  --ink: #3d1713;
  --muted: #7b5148;
  --line: #f1c4b3;
  --brand: #ed271f;
  --brand-2: #ff5c22;
  --gold: #f7b916;
  --gold-deep: #c98200;
  --deep: #a31312;
  --success: #13875e;
  --page-wash: rgba(255, 255, 255, .1);
  --shadow: 0 14px 38px rgba(164, 31, 22, .13);
  --radius: 20px;
  font-family: "Hongyun Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1d0d0c;
  --surface: #2b1513;
  --surface-2: #3a1b18;
  --surface-3: #40241a;
  --ink: #fff7e9;
  --muted: #e6bcb0;
  --line: #714039;
  --brand: #ff5549;
  --brand-2: #ff7a35;
  --gold: #ffd053;
  --gold-deep: #ffbf20;
  --deep: #7f1815;
  --success: #66d7a8;
  --page-wash: rgba(30, 8, 7, .78);
  --shadow: 0 16px 42px rgba(0, 0, 0, .32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(var(--page-wash), var(--page-wash)), url("/assets/hongyun-lottery-bg-20261026-q90.webp");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
button, select, input, textarea { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 75%, white); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 99; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; transform: translateY(-200%); background: var(--deep); color: #fff; border-radius: 10px; }
.skip-link:focus-visible { width: auto; height: auto; padding: 10px 14px; overflow: visible; clip-path: none; opacity: 1; pointer-events: auto; transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  min-height: 66px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 8px max(18px, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 7px 24px rgba(150, 29, 20, .1);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: max-content; color: inherit; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { color: var(--brand); font-size: 23px; font-weight: 800; letter-spacing: .02em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.brand-mark { position: relative; display: block; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, #ff4f37, #d91318 62%, #9c0711); box-shadow: inset 0 0 0 3px #fff, 0 4px 12px rgba(218, 23, 25, .28); }
.brand-mark::after { content: ""; position: absolute; left: 7px; top: 23px; width: 30px; height: 4px; border-radius: 99px; background: var(--gold); transform: rotate(-25deg); }
.brand-mark i { position: absolute; z-index: 1; border-radius: 50%; background: #fff; border: 2px solid var(--gold); }
.brand-mark i:nth-child(1) { width: 9px; height: 9px; left: 7px; bottom: 7px; }
.brand-mark i:nth-child(2) { width: 12px; height: 12px; left: 19px; top: 12px; background: var(--gold); border-color: #fff1a6; }
.brand-mark i:nth-child(3) { width: 8px; height: 8px; right: 6px; top: 9px; }

.quick-nav { justify-self: center; display: flex; align-items: center; gap: 5px; }
.quick-nav a { min-width: 70px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; color: var(--muted); border-radius: 12px; text-decoration: none; font-size: 12px; font-weight: 600; }
.quick-nav a:hover, .quick-nav a:focus-visible, .quick-nav a[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.quick-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); background: var(--surface); box-shadow: 0 5px 15px rgba(154, 34, 25, .1); cursor: pointer; }

/* Compact legacy header markup on content pages. */

main { width: min(100%, 1224px); margin: 0 auto; padding: 14px 22px 58px; }
.live-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(390px, .83fr);
  min-height: 230px;
  overflow: hidden;
  border: 2px solid var(--brand);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.live-lead { position: relative; padding: 20px 28px; overflow: hidden; color: #fff; background: linear-gradient(128deg, #a80a12 0%, #e92520 48%, #ff5b24 100%); }
.live-lead::after { content: ""; position: absolute; right: -55px; bottom: -80px; width: 250px; height: 250px; border: 22px solid rgba(255, 205, 60, .18); border-radius: 50%; }
.live-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.live-lead .eyebrow { display: flex; align-items: center; margin: 0; color: #ffe9ac; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 220, 97, .15); }
.status-dot.ready { background: #7df0bd; }
.status-dot.waiting { background: #ffe174; }
.status-dot.conflict { background: #fff; }
.countdown-chip { flex: 0 0 auto; padding: 7px 11px; border: 1px solid rgba(255,255,255,.32); border-radius: 99px; color: #fff5d7; background: rgba(116, 0, 7, .2); font-size: 11px; }
.countdown-chip strong { margin-left: 5px; color: #fff; font-variant-numeric: tabular-nums; }
.issue-line { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 12px; margin-top: 10px; }
.issue-line span { color: #ffe0b5; font-size: 13px; }
.issue-line strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.draw-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 13px 0 10px; }
.draw-line b { color: #ffe49b; font-size: 18px; font-weight: 600; }
.ball, .sum { display: grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ball { color: #b11416; background: linear-gradient(145deg, #fff, #fff4dd 70%); border: 4px solid var(--gold); box-shadow: inset 0 -7px 12px rgba(225, 134, 0, .14), 0 7px 16px rgba(83, 0, 4, .25); }
.sum { color: #9e1014; background: linear-gradient(145deg, #ffe26d, #f6ad09); border: 4px solid #fff0ae; box-shadow: 0 7px 16px rgba(83, 0, 4, .25); }
.draw-meta { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.draw-meta > span { display: inline-flex; padding: 5px 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; color: #fff; background: rgba(111,0,7,.24); font-size: 11px; }

.recent-panel { padding: 0 22px 8px; background: color-mix(in srgb, var(--surface) 96%, transparent); }
.section-kicker { height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -22px; padding: 0 22px; color: #8c1715; border-bottom: 1px solid #f0d6c8; background: linear-gradient(90deg, #fff7e3, #fff); font-size: 14px; font-weight: 800; }
.section-kicker small { color: #7a3d00; font-size: 10px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { min-height: 56px; display: grid; grid-template-columns: minmax(112px,1fr) auto auto; align-items: center; gap: 13px; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); font-size: 11px; }
.recent-list li:last-child { border-bottom: 0; }
.recent-list span { font-variant-numeric: tabular-nums; }
.recent-list span em { color: var(--muted); font-size: 9px; }
.recent-list strong { color: var(--brand); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent-list > li > em { min-width: 38px; padding: 4px 7px; border-radius: 99px; color: #8d4f00; background: #fff0b3; font-size: 9px; font-style: normal; text-align: center; }
.skeleton { height: 43px; opacity: .5; background: linear-gradient(90deg, transparent, rgba(237,39,31,.13), transparent); background-size: 200% 100%; animation: pulse 1.4s infinite; }
@keyframes pulse { to { background-position: -200% 0; } }

.mini-scratch { min-width: 0; padding: 0 20px 12px; background: color-mix(in srgb, var(--surface) 96%, transparent); }
.mini-scratch:focus-visible { outline: 3px solid var(--gold); outline-offset: -5px; }
.mini-scratch .section-kicker { margin-inline: -20px; padding-inline: 20px; }
.mini-scratch-stage { position: relative; min-height: 116px; margin-top: 11px; overflow: hidden; border: 2px solid var(--gold); border-radius: 16px; background: url('/assets/hongyun28-scratch-bg-20261026-q90.webp') center/cover, var(--surface-2); }
.mini-scratch-result { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; padding: 10px; text-align: center; }
.mini-scratch-result p { margin: 0; color: var(--muted); font-size: 10px; }
.mini-equation { display: flex; align-items: center; gap: 7px; }
.mini-equation b, .mini-equation em { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #8f1713; background: #fff; border: 2px solid var(--gold); font-size: 17px; font-style: normal; font-variant-numeric: tabular-nums; }
.mini-equation em { color: #7a160f; background: #ffd44f; }
.mini-equation i { color: var(--brand); font-size: 11px; font-style: normal; }
.mini-scratch-result > small { color: var(--brand); font-size: 9px; }
.mini-scratch-stage canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .2s ease; }
.mini-scratch-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mini-scratch-actions .small-button { min-height: 32px; padding: 5px 8px; font-size: 9px; }
.mini-scratch-actions a { margin-left: auto; color: var(--brand); font-size: 9px; font-weight: 800; text-decoration: none; }
.mini-scratch-note { margin: 7px 0 0; color: var(--muted); font-size: 9px; }

.history-section { margin-top: 15px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand) 36%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.history-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 18px 20px 13px; }
.history-head h1 { margin: 0; color: var(--deep); font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.history-head p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.history-search { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.history-search input { width: 190px; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); }
.history-table-wrap { max-width: 100%; overflow: auto; border-block: 1px solid var(--line); background: var(--surface); }
.history-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 11px; }
.history-table th, .history-table td { height: 48px; padding: 7px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); text-align: center; white-space: nowrap; }
.history-table thead th { position: sticky; top: 0; z-index: 1; height: 42px; color: #fff; background: linear-gradient(105deg, var(--deep), var(--brand)); font-size: 10px; }
.history-table tbody th { color: var(--ink); font-variant-numeric: tabular-nums; text-align: left; }
.history-table tbody th small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 400; }
.history-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 62%, var(--surface)); }
.history-equation { display: inline-flex; align-items: center; gap: 4px; }
.history-equation b, .history-equation em { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: color-mix(in srgb, var(--gold) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 72%, var(--line)); font-size: 12px; font-style: normal; }
.history-equation em { color: #7a160f; background: #ffd859; }
.history-equation i { color: var(--muted); font-size: 9px; font-style: normal; }
.history-tag { padding: 4px 7px; border-radius: 99px; color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.pagination { display: flex; align-items: center; gap: 6px; padding: 12px 16px 14px; overflow-x: auto; }
.pagination button { flex: 0 0 auto; min-width: 34px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); cursor: pointer; }
.pagination button:disabled { opacity: .38; cursor: not-allowed; }
.pagination button[aria-current="page"] { color: #fff; border-color: var(--brand); background: var(--brand); }
.page-numbers { display: flex; gap: 4px; }
.pagination > strong { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 600; }

.insights-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 15px; margin-top: 15px; }
.insight-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.insight-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.insight-head h2 { margin: 0; color: var(--deep); font-size: 22px; }
.insight-head label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.insight-head select { min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.insight-head > strong { padding: 8px 10px; border-radius: 10px; color: #8b1e14; background: #fff3b9; font-size: 16px; }
.panel-note { margin: 9px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.dragon-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.dragon-list article { min-width: 0; display: grid; gap: 4px; padding: 11px; border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.dragon-list article span, .dragon-list article small { color: var(--muted); font-size: 8px; }
.dragon-list article strong { color: var(--brand); font-size: 24px; line-height: 1; }
.dragon-list article strong small { margin-left: 2px; color: inherit; }
.dragon-list article b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.empty-copy { grid-column: 1 / -1; margin: 0; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 11px; }
.today-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.today-groups section { padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.today-groups section:nth-child(3) { grid-column: 1 / -1; }
.today-groups h3 { margin: 0 0 7px; color: var(--brand); font-size: 11px; }
.today-groups section > div { display: grid; grid-template-columns: 1fr auto 42px; align-items: center; gap: 5px; padding: 3px 0; color: var(--muted); font-size: 9px; }
.today-groups section > div strong { color: var(--ink); font-size: 11px; }
.today-groups section > div small { text-align: right; }
:root[data-theme="dark"] .history-head h1, :root[data-theme="dark"] .insight-head h2 { color: var(--ink); }

.sequence-workbench { margin-top: 15px; padding: 19px 20px 16px; border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 95%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.workbench-head, .results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.workbench-head h1, .results-head h2, .content-page h1, .subpage-card h1 { margin: 0; color: var(--deep); font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; }
:root[data-theme="dark"] .workbench-head h1, :root[data-theme="dark"] .content-page h1, :root[data-theme="dark"] .subpage-card h1 { color: var(--ink); }
.range-badge { display: flex; align-items: baseline; gap: 6px; padding: 8px 11px; border: 1px solid #efb51a; border-radius: 12px; color: #8b1e14; background: #fff3b9; white-space: nowrap; }
.range-badge strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.range-badge span { font-size: 10px; }
.sequence-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 13px 0 9px; }
.examples, .slot-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.text-button, .small-button, .secondary-button { min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); cursor: pointer; }
.text-button { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.small-button { font-size: 11px; }
.small-button:disabled, .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.sequence-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(142px, 1fr)); gap: 8px; align-items: stretch; }
.sequence-slot { --slot-tone: var(--brand); position: relative; min-width: 0; padding: 11px 10px 10px; border: 1px solid color-mix(in srgb, var(--slot-tone) 52%, var(--line)); border-top: 4px solid var(--slot-tone); border-radius: 14px; background: linear-gradient(155deg, var(--surface), color-mix(in srgb, var(--slot-tone) 7%, var(--surface))); }
.sequence-slot:nth-child(2), .sequence-slot:nth-child(6) { --slot-tone: var(--brand-2); }
.sequence-slot:nth-child(3) { --slot-tone: var(--gold-deep); }
.sequence-slot:nth-child(4) { --slot-tone: #b3165b; }
.sequence-slot:nth-child(5) { --slot-tone: #168d73; }
.sequence-slot:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; z-index: 2; width: 14px; display: grid; place-items: center; transform: translateY(-50%); color: var(--brand); background: var(--surface); font-weight: 800; }
.slot-number { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .08em; }
.slot-number::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--slot-tone); }
.sequence-slot label { display: grid; gap: 4px; margin-top: 6px; color: var(--muted); font-size: 9px; }
.sequence-slot select, .sequence-slot input { width: 100%; min-width: 0; min-height: 36px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); }
.sum-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; }
.search-options { display: flex; align-items: center; gap: 11px; margin-top: 13px; }
.check-row { display: flex; align-items: center; gap: 7px; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.check-row span { font-size: 11px; white-space: nowrap; }
.overlap-help { color: var(--brand); font-size: 10px; text-underline-offset: 3px; }
.primary-actions { margin-left: auto; display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.primary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 17px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(115deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 20px rgba(228, 40, 29, .23); text-decoration: none; font-weight: 800; cursor: pointer; }
.primary-button:disabled { opacity: .46; cursor: not-allowed; }
.action-status { min-height: 17px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.matches-section { margin-top: 15px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 95%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.results-head { align-items: center; margin: -18px -18px 0; padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0; color: #fff; background: linear-gradient(105deg, #a60c13, var(--brand)); }
.results-head .eyebrow { color: #ffd88b; }
.results-head h2 { color: #fff; font-size: 22px; }
.results-head > p { margin: 0; color: #ffe1c5; font-size: 11px; }
.match-list { display: grid; gap: 11px; margin-top: 12px; }
.empty-state { min-height: 90px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 15px; border: 1px dashed color-mix(in srgb, var(--brand) 42%, var(--line)); border-radius: 15px; background: var(--surface); text-align: center; }
.empty-state span { color: var(--brand); font-size: 25px; }
.empty-state h3 { margin: 0; font-size: 14px; }
.empty-state p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.match-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.match-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; color: #fff; background: linear-gradient(95deg, var(--deep), var(--brand)); }
.match-title h3 { margin: 0; font-size: 13px; }
.match-title span { color: #ffe4b0; font-size: 10px; }
.match-track { display: flex; align-items: stretch; gap: 7px; padding: 11px; overflow-x: auto; }
.draw-tile { flex: 0 0 112px; padding: 9px; border: 1px solid color-mix(in srgb, var(--gold) 56%, var(--line)); border-radius: 11px; background: color-mix(in srgb, #fff0b2 56%, var(--surface)); }
.draw-tile.context { opacity: .7; border-color: var(--line); background: transparent; }
.draw-tile.gap-before { position: relative; margin-left: 15px; }
.draw-tile.gap-before::before { content: "断"; position: absolute; left: -19px; top: 50%; transform: translateY(-50%); color: var(--brand); font-size: 9px; }
.draw-tile small { display: block; color: var(--muted); font-size: 9px; }
.draw-tile strong { display: block; margin: 5px 0; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.draw-tile em { color: var(--brand); font-size: 9px; font-style: normal; }
.load-more { display: block; margin: 14px auto 0; padding: 9px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); cursor: pointer; }
.load-more[hidden] { display: none; }

footer { width: min(100%, 1180px); margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; padding: 18px 22px; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); color: var(--muted); font-size: 10px; }
footer p { margin: 0; }
footer nav { display: flex; gap: 13px; }
footer a { color: var(--brand); text-decoration: none; }

.subpage-main { max-width: 980px; padding-top: 22px; }
.subpage-card, .content-page { padding: 24px; border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.return-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--brand); text-decoration: none; font-size: 12px; font-weight: 800; }
.subpage-intro, .content-lead { color: var(--muted); font-size: 13px; line-height: 1.75; }
.scratch-card { position: relative; min-height: 360px; margin-top: 18px; overflow: hidden; display: grid; place-items: center; border: 2px solid var(--gold); border-radius: 22px; background: url('/assets/hongyun28-scratch-bg-20261026-q90.webp') center/cover, var(--surface-2); }
.scratch-result { z-index: 1; padding: 20px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow); text-align: center; }
.scratch-result .draw-line { justify-content: center; }
.scratch-result p { color: var(--muted); }
.scratch-canvas { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .2s ease; }
.scratch-card:focus, .scratch-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.scratch-controls { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 13px; flex-wrap: wrap; }
.scratch-note { color: var(--muted); font-size: 11px; }

.chat-page { max-width: 1120px; }
.chat-shell { min-height: 620px; display: grid; grid-template-rows: auto minmax(360px,1fr) auto auto; margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.chat-topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 15px; color: #fff; background: linear-gradient(105deg, var(--deep), var(--brand)); }
.chat-topbar .return-link { margin: 0; padding: 7px 10px; border-radius: 9px; color: #fff; background: rgba(255,255,255,.13); }
.chat-topbar h1 { margin: 0; font-size: 19px; font-weight: 800; }
.connection-pill { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.connection-pill > span { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.connection-pill[data-state="connected"] > span { background: #7cddb3; }
.connection-pill[data-state="offline"] > span { background: #ffb098; }
.connection-pill button { padding: 5px 8px; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; color: inherit; background: transparent; cursor: pointer; }
.chat-body { min-height: 0; display: grid; grid-template-columns: 220px 1fr; }
.chat-profile { display: grid; align-content: start; justify-items: center; gap: 12px; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--surface-2); }
.profile-avatar, .chat-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--surface); }
.profile-avatar { width: 82px; height: 82px; border: 4px solid var(--gold); box-shadow: var(--shadow); }
.profile-avatar img, .chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-profile label { width: 100%; display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.chat-profile input, .chat-compose textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); }
.chat-profile small { color: var(--muted); text-align: center; line-height: 1.5; }
.chat-messages { min-height: 0; max-height: 560px; display: grid; align-content: start; gap: 12px; padding: 18px; overflow-y: auto; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.chat-empty { margin: auto; color: var(--muted); text-align: center; }
.chat-message { max-width: 720px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: start; gap: 10px; }
.chat-avatar { width: 42px; height: 42px; border: 2px solid var(--gold); }
.chat-message > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px 14px 14px; background: var(--surface); }
.chat-message header { display: flex; align-items: center; gap: 9px; }
.chat-message header b { color: var(--deep); font-size: 12px; }
:root[data-theme="dark"] .chat-message header b { color: var(--gold); }
.chat-message header b[data-admin="true"]::after { content: "管理员"; margin-left: 6px; padding: 2px 5px; border-radius: 6px; color: #fff; background: var(--brand); font-size: 8px; }
.chat-message time { color: var(--muted); font-size: 9px; }
.chat-message p { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.chat-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px; border-top: 1px solid var(--line); background: var(--surface-2); }
.chat-compose textarea { min-height: 54px; resize: vertical; }
.chat-error { min-height: 20px; margin: 0; padding: 0 13px 8px; color: var(--brand); background: var(--surface-2); font-size: 12px; }

.content-page { max-width: 900px; margin: 0 auto; }
.content-page .content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 22px; }
.content-page article { padding: 17px; border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: 15px; background: var(--surface); }
.content-page article:nth-child(4n+2) { border-top-color: var(--brand-2); }
.content-page article:nth-child(4n+3) { border-top-color: var(--gold); }
.content-page article:nth-child(4n) { border-top-color: #b3165b; }
.content-page h2 { margin: 0 0 8px; color: var(--deep); font-size: 17px; }
:root[data-theme="dark"] .content-page h2 { color: var(--ink); }
.content-page p, .content-page li { color: var(--muted); font-size: 13px; line-height: 1.75; }
.content-page ul, .content-page ol { padding-left: 20px; }
.content-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.content-links a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand); background: var(--surface); text-decoration: none; font-size: 11px; font-weight: 800; }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page strong { color: var(--brand); font-size: 80px; font-weight: 800; line-height: 1; }
.error-page h1 { margin: 8px 0; }
.error-page p { color: var(--muted); }

@media (min-width: 901px) {
  .ball, .sum { width: 72px; height: 72px; font-size: 35px; }
  .draw-line b { font-size: 21px; }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: auto auto; gap: 6px 12px; padding: 7px 14px 8px; }
  .quick-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; }
  .icon-button { justify-self: end; }
  .live-strip { grid-template-columns: 1fr; }
  .mini-scratch { padding-bottom: 14px; }
  .mini-scratch-stage { min-height: 136px; }
  .sequence-slots { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .insights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { background-attachment: scroll; background-size: auto 844px; }
  .site-header { position: static; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 20px; }
  .brand small { max-width: 150px; margin-top: 4px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .quick-nav { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 3px; }
  .quick-nav a { min-width: 0; min-height: 44px; flex-direction: column; gap: 1px; padding: 4px 2px; font-size: 9px; }
  .quick-nav svg { width: 17px; height: 17px; }
  main { padding: 9px 10px 48px; }
  .live-strip { border-radius: 19px; }
  .live-lead { padding: 16px 18px 15px; }
  .issue-line { margin-top: 8px; }
  .draw-line { gap: 6px; margin: 11px 0 9px; }
  .ball, .sum { width: 49px; height: 49px; border-width: 3px; font-size: 24px; }
  .draw-line b { font-size: 15px; }
  .mini-scratch { padding: 0 14px 13px; }
  .mini-scratch .section-kicker { height: 39px; margin: 0 -14px; padding: 0 14px; }
  .mini-scratch-stage { min-height: 120px; }
  .mini-scratch-actions { flex-wrap: wrap; }
  .mini-scratch-actions a { width: 100%; margin-left: 0; text-align: right; }
  .recent-list li { min-height: 47px; grid-template-columns: minmax(96px,1fr) auto auto; gap: 7px; padding: 5px 0; }
  .recent-list strong { font-size: 13px; }
  .history-head { display: grid; padding: 15px; }
  .history-search input { width: min(100%, 260px); }
  .history-table { min-width: 780px; }
  .history-table th, .history-table td { height: 45px; padding-inline: 9px; }
  .pagination { padding-inline: 10px; }
  .pagination > strong { margin-left: 4px; }
  .sequence-workbench, .matches-section, .insight-panel, .subpage-card, .content-page { padding: 15px; }
  .sequence-workbench { margin-top: 11px; }
  .workbench-head h1 { font-size: 23px; }
  .sequence-toolbar { align-items: flex-start; }
  .sequence-slots { grid-template-columns: 1fr; }
  .sequence-slot:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -13px; transform: translateX(50%); }
  .search-options { align-items: flex-start; flex-wrap: wrap; }
  .primary-actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .primary-button { grid-column: 1 / -1; }
  .primary-actions button { width: 100%; }
  .matches-section .results-head { margin: -15px -15px 0; padding: 13px 15px; }
  .results-head { display: grid; gap: 5px; }
  .today-groups { grid-template-columns: 1fr; }
  .today-groups section:nth-child(3) { grid-column: auto; }
  footer { display: grid; padding: 17px 12px; }
  .scratch-card { min-height: 300px; }
  .chat-body { grid-template-columns: 1fr; }
  .chat-profile { grid-template-columns: 58px 1fr; align-items: center; justify-items: stretch; gap: 9px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-avatar { grid-row: 1 / 3; width: 58px; height: 58px; }
  .chat-profile small { text-align: left; }
  .chat-messages { min-height: 340px; max-height: 54vh; }
  .chat-page { padding: 0; }
  .chat-shell { min-height: 100vh; margin-top: 0; border: 0; border-radius: 0; }
  .chat-topbar { grid-template-columns: 1fr auto; padding: 10px; }
  .chat-topbar h1 { grid-column: 1 / -1; grid-row: 1; font-size: 18px; }
  .chat-topbar .return-link { grid-row: 2; }
  .connection-pill { grid-row: 2; }
  .chat-compose { padding: 10px; }
  .content-page .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .site-header { padding-inline: 9px; }
  .brand small { display: none; }
  .quick-nav a { font-size: 8px; }
  main { padding-inline: 8px; }
  .live-lead { padding-inline: 13px; }
  .ball, .sum { width: 43px; height: 43px; font-size: 21px; }
  .draw-line { gap: 4px; }
  .mini-scratch { padding-inline: 12px; }
  .mini-scratch .section-kicker { margin-inline: -12px; padding-inline: 12px; }
  .recent-list li { grid-template-columns: minmax(84px,1fr) auto auto; gap: 4px; }
  .recent-list strong { font-size: 12px; }
  .recent-list > li > em { min-width: 31px; padding-inline: 4px; }
  .sequence-workbench { padding: 12px; }
  .history-head { padding: 12px; }
  .dragon-list { grid-template-columns: 1fr; }
  .primary-actions { grid-template-columns: 1fr; }
  .primary-button { grid-column: auto; }
  .match-track { padding: 9px; }
  .draw-tile { flex-basis: 103px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Reserve the existing 50-row history height only before its first response. */
@media (min-width: 621px) {
  .history-table-wrap:has(.history-loading) { min-height: 2444.5px; }
}

