:root {
  color-scheme: dark;
  --app-vh: 1vh;
  --device-top-pad: 0px;
  --device-bottom-pad: 0px;
  --bg: #10181f;
  --panel: #111920;
  --panel-2: #1b252d;
  --line: #2b3842;
  --input-bg: #0b1218;
  --rail-bg: rgba(13, 21, 28, .92);
  --tab-bg: rgba(13, 21, 28, .96);
  --card-bg: linear-gradient(180deg, rgba(18, 27, 35, .99), rgba(13, 21, 28, .99));
  --card-soft-bg: rgba(28, 38, 47, .62);
  --media-bg: #070d12;
  --text: #f7f2ec;
  --muted: #b8b3ae;
  --teal: #35c3b5;
  --coral: #c94f92;
  --gold: #e7ad42;
  --green: #35c3b5;
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
  --tab-1: #e7ad42;
  --tab-2: #ee5b52;
  --tab-3: #35c3b5;
  --tab-4: #c94f92;
  --tab-5: #d8d0c6;
  --tab-6: #2f8f89;
  --tab-7: #f18b59;
  --tab-active: #e7ad42;
  --tab-active-text: #16110a;
  --banner-gold: #e7ad42;
  --banner-coral: #ee5b52;
  --banner-teal: #35c3b5;
  --banner-magenta: #c94f92;
  --banner-cream: #d8d0c6;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f7;
  --panel: #ffffff;
  --panel-2: #edf2f1;
  --line: #d8e0df;
  --input-bg: #ffffff;
  --rail-bg: rgba(255, 255, 255, .9);
  --tab-bg: rgba(255, 255, 255, .94);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 249, .98));
  --card-soft-bg: rgba(229, 238, 236, .72);
  --media-bg: #e8eeee;
  --text: #101316;
  --muted: #64706f;
  --teal: #0f9f8d;
  --coral: #d84f3b;
  --gold: #d99a25;
  --green: #228456;
  --shadow: 0 18px 50px rgba(18, 31, 34, .12);
}

body[data-accent="berry"] {
  --teal: #d85ea8;
  --coral: #ff7f7f;
  --gold: #ffc857;
  --green: #7bd389;
}

body[data-accent="sunset"] {
  --teal: #ff9f68;
  --coral: #ff6f91;
  --gold: #ffd166;
  --green: #7bd389;
}

body[data-accent="ocean"] {
  --teal: #48bfe3;
  --coral: #ff7a90;
  --gold: #f9c74f;
  --green: #80ed99;
}

body[data-accent="ember"] { --teal: #f9735b; --coral: #ff4f7b; --gold: #ffc15a; --green: #60d394; }
body[data-accent="violet"] { --teal: #9b7cff; --coral: #ef6bb8; --gold: #ffd166; --green: #7bd389; }
body[data-accent="glacier"] { --teal: #67d8ff; --coral: #91a7ff; --gold: #d7f7ff; --green: #80edc7; }

body[data-accent="after-lavender"] { --teal: #9b8cff; --coral: #ff6b9d; --gold: #ffd166; --green: #72efdd; }
body[data-accent="after-rose"] { --teal: #ff74b8; --coral: #ff5c8a; --gold: #ffd166; --green: #8ff7d2; }
body[data-accent="after-cyan"] { --teal: #53d8ff; --coral: #b082ff; --gold: #f8d86a; --green: #72efdd; }
body[data-accent="after-gold"] { --teal: #f6c85f; --coral: #ff7a90; --gold: #ffe45e; --green: #7bd389; }

body[data-accent="editorial-ink"] { --teal: #356f68; --coral: #9f5a4b; --gold: #b7862f; --green: #4d7d57; }
body[data-accent="editorial-sage"] { --teal: #5d8064; --coral: #b9856f; --gold: #c7a96c; --green: #718f5e; }
body[data-accent="editorial-clay"] { --teal: #9c6f54; --coral: #bd6b53; --gold: #d39a48; --green: #6f855f; }
body[data-accent="editorial-denim"] { --teal: #456f91; --coral: #a96873; --gold: #c8a24c; --green: #597f6b; }

body[data-accent="arcade-neon"] { --teal: #31f5c8; --coral: #ff4fd8; --gold: #ffe45e; --green: #7cff6b; }
body[data-accent="arcade-pink"] { --teal: #ff4fd8; --coral: #ff6fb1; --gold: #ffe45e; --green: #31f5c8; }
body[data-accent="arcade-lime"] { --teal: #7cff6b; --coral: #31f5c8; --gold: #ffe45e; --green: #b6ff5e; }
body[data-accent="arcade-orange"] { --teal: #ff8a1f; --coral: #ff4fd8; --gold: #ffe45e; --green: #31f5c8; }

body[data-accent="garden-moss"] { --teal: #8ed081; --coral: #ff9a76; --gold: #d9c56f; --green: #66d39a; }
body[data-accent="garden-sage"] { --teal: #a7c49a; --coral: #d79a7a; --gold: #d8c293; --green: #8ed081; }
body[data-accent="garden-peach"] { --teal: #ff9a76; --coral: #f48f84; --gold: #f3c87a; --green: #8ed081; }
body[data-accent="garden-sky"] { --teal: #7db7d8; --coral: #f2a07d; --gold: #d9c56f; --green: #8ed081; }

body[data-accent="gallery-blue"] { --teal: #5d74f2; --coral: #e45b88; --gold: #c99b32; --green: #36a66f; }
body[data-accent="gallery-plum"] { --teal: #8c6bd8; --coral: #d75f92; --gold: #c99b32; --green: #5d74f2; }
body[data-accent="gallery-coral"] { --teal: #e45b88; --coral: #ff7a70; --gold: #d7a84a; --green: #36a66f; }
body[data-accent="gallery-slate"] { --teal: #667085; --coral: #9b6b7d; --gold: #b89555; --green: #5d8f75; }

body[data-accent="herd-moss"] { --teal: #6b8f5b; --coral: #d8c293; --gold: #e1c890; --green: #a7c49a; }
body[data-accent="herd-sage"] { --teal: #8da67c; --coral: #e6d7bd; --gold: #dcc8a6; --green: #a7c49a; }
body[data-accent="herd-clay"] { --teal: #8c7a56; --coral: #dcc8a6; --gold: #e7d2aa; --green: #8da67c; }
body[data-accent="herd-sky"] { --teal: #87a9bd; --coral: #c9d8b8; --gold: #d8c293; --green: #6b8f5b; }

body[data-accent="pillion-blue"] { --teal: #2ca7ff; --coral: #5f63ff; --gold: #9b4dff; --green: #35d6ff; }
body[data-accent="pillion-purple"] { --teal: #9b4dff; --coral: #6c5cff; --gold: #2ca7ff; --green: #68e1ff; }
body[data-accent="pillion-ice"] { --teal: #8bdcff; --coral: #9b8cff; --gold: #dfe8ff; --green: #6ee7f9; }
body[data-accent="pillion-white"] { --teal: #ffffff; --coral: #9b4dff; --gold: #2ca7ff; --green: #5f63ff; }

body[data-accent="wyt-cyan"] { --teal: #46d1c9; --coral: #ff6b6b; --gold: #f2b844; --green: #46d1c9; }
body[data-accent="wyt-coral"] { --teal: #ff6b6b; --coral: #d9469a; --gold: #f2b844; --green: #46d1c9; }
body[data-accent="wyt-gold"] { --teal: #f2b844; --coral: #ff6b6b; --gold: #ffd166; --green: #46d1c9; }
body[data-accent="wyt-cream"] { --teal: #e6e1da; --coral: #ff6b6b; --gold: #f2b844; --green: #46d1c9; }

body[data-gui-theme="classic"] {
  color-scheme: dark;
  --bg: #10181f;
  --panel: #111920;
  --panel-2: #1b252d;
  --line: #2b3842;
  --input-bg: #0b1218;
  --rail-bg: rgba(13, 21, 28, .92);
  --tab-bg: rgba(13, 21, 28, .96);
  --card-bg: linear-gradient(180deg, rgba(18, 27, 35, .99), rgba(13, 21, 28, .99));
  --card-soft-bg: rgba(28, 38, 47, .62);
  --media-bg: #070d12;
  --text: #f7f2ec;
  --muted: #b8b3ae;
  --teal: #35c3b5;
  --coral: #c94f92;
  --gold: #e7ad42;
  --green: #35c3b5;
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
  --tab-1: #e7ad42;
  --tab-2: #ee5b52;
  --tab-3: #35c3b5;
  --tab-4: #c94f92;
  --tab-5: #d8d0c6;
  --tab-6: #2f8f89;
  --tab-7: #f18b59;
  --tab-active: #e7ad42;
  --tab-active-text: #16110a;
  --banner-gold: #e7ad42;
  --banner-coral: #ee5b52;
  --banner-teal: #35c3b5;
  --banner-magenta: #c94f92;
  --banner-cream: #d8d0c6;
}

body[data-gui-theme="afterhours"] {
  color-scheme: dark;
  --bg: #08090d;
  --panel: #11131b;
  --panel-2: #1b1d2a;
  --line: #2d3042;
  --input-bg: #0b0d13;
  --card-bg: linear-gradient(180deg, rgba(28, 30, 43, .98), rgba(13, 15, 22, .98));
  --card-soft-bg: rgba(44, 47, 66, .48);
  --media-bg: #05060a;
  --text: #f6f2ff;
  --muted: #aaa6bd;
  --teal: #9b8cff;
  --coral: #ff6b9d;
  --gold: #ffd166;
  --green: #72efdd;
  --tab-1: #3c3278;
  --tab-2: #9b3f73;
  --tab-3: #315a93;
  --tab-4: #6b3fa0;
  --tab-5: #2b7a73;
  --tab-6: #9a6a2c;
  --tab-7: #604a9d;
  --tab-active: #9b8cff;
  --tab-active-text: #09080f;
}

body[data-gui-theme="editorial"] {
  color-scheme: light;
  --bg: #f4f0e8;
  --panel: #fffaf1;
  --panel-2: #ebe2d2;
  --line: #d4c6ad;
  --input-bg: #fffdf7;
  --card-bg: linear-gradient(180deg, rgba(255, 250, 241, .98), rgba(238, 229, 211, .98));
  --card-soft-bg: rgba(226, 214, 194, .68);
  --media-bg: #ded2bd;
  --text: #1d1a16;
  --muted: #726855;
  --teal: #356f68;
  --coral: #b85c4b;
  --gold: #b7862f;
  --green: #4d7d57;
  --tab-1: #356f68;
  --tab-2: #b85c4b;
  --tab-3: #587495;
  --tab-4: #866d4f;
  --tab-5: #4d7d57;
  --tab-6: #b7862f;
  --tab-7: #806c9d;
  --tab-active: #f0c96f;
  --tab-active-text: #21180a;
}

body[data-gui-theme="arcade"] {
  color-scheme: dark;
  --bg: #10081f;
  --panel: #1b1230;
  --panel-2: #2b1c4a;
  --line: #49346f;
  --input-bg: #140b24;
  --card-bg: linear-gradient(180deg, rgba(43, 28, 74, .98), rgba(23, 13, 41, .98));
  --card-soft-bg: rgba(84, 49, 134, .42);
  --media-bg: #0a0614;
  --text: #fff8ff;
  --muted: #c9b8dc;
  --teal: #31f5c8;
  --coral: #ff4fd8;
  --gold: #ffe45e;
  --green: #7cff6b;
  --tab-1: #1ab6d4;
  --tab-2: #ff4fd8;
  --tab-3: #7c52ff;
  --tab-4: #ff8a1f;
  --tab-5: #42d96b;
  --tab-6: #e4cf36;
  --tab-7: #d54cff;
  --tab-active: #31f5c8;
  --tab-active-text: #080612;
}

body[data-gui-theme="garden"] {
  color-scheme: dark;
  --bg: #0f1711;
  --panel: #17231a;
  --panel-2: #213426;
  --line: #35513c;
  --input-bg: #111b14;
  --card-bg: linear-gradient(180deg, rgba(33, 52, 38, .98), rgba(18, 28, 21, .98));
  --card-soft-bg: rgba(44, 71, 51, .5);
  --media-bg: #09100b;
  --text: #f2f7ea;
  --muted: #adbaa8;
  --teal: #8ed081;
  --coral: #ff9a76;
  --gold: #d9c56f;
  --green: #66d39a;
  --tab-1: #3d7651;
  --tab-2: #bb6f55;
  --tab-3: #4f7f70;
  --tab-4: #6c7550;
  --tab-5: #2f8c5d;
  --tab-6: #9c863a;
  --tab-7: #55715f;
  --tab-active: #a7d97d;
  --tab-active-text: #091209;
}

body[data-gui-theme="gallery"] {
  color-scheme: light;
  --bg: #f7f7fa;
  --panel: #ffffff;
  --panel-2: #ececf4;
  --line: #d8d8e5;
  --input-bg: #ffffff;
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(241, 241, 247, .99));
  --card-soft-bg: rgba(233, 233, 242, .82);
  --media-bg: #e6e6ee;
  --text: #14141d;
  --muted: #626275;
  --teal: #5d74f2;
  --coral: #e45b88;
  --gold: #c99b32;
  --green: #36a66f;
  --tab-1: #5d74f2;
  --tab-2: #e45b88;
  --tab-3: #56a1b7;
  --tab-4: #8c6bd8;
  --tab-5: #36a66f;
  --tab-6: #c99b32;
  --tab-7: #7d7f92;
  --tab-active: #111827;
  --tab-active-text: #ffffff;
}

body[data-gui-theme="herd"] {
  color-scheme: light;
  --bg: #f3efe6;
  --panel: #fffaf0;
  --panel-2: #ebe3d3;
  --line: #ddd1ba;
  --input-bg: #fffdf7;
  --rail-bg: rgba(255, 250, 240, .92);
  --tab-bg: rgba(255, 250, 240, .96);
  --card-bg: linear-gradient(180deg, rgba(255, 250, 240, .99), rgba(242, 235, 221, .99));
  --card-soft-bg: rgba(232, 224, 207, .74);
  --media-bg: #e3dbc8;
  --text: #2f3b33;
  --muted: #69735f;
  --teal: #6b8f5b;
  --coral: #d8c293;
  --gold: #e1c890;
  --green: #a7c49a;
  --shadow: 0 18px 54px rgba(56, 71, 48, .18);
  --tab-1: #a7c49a;
  --tab-2: #6b8f5b;
  --tab-3: #d8c293;
  --tab-4: #c9d8b8;
  --tab-5: #f1efe3;
  --tab-6: #2f3b33;
  --tab-7: #d7e6f4;
  --tab-active: #6b8f5b;
  --tab-active-text: #fffaf0;
  --banner-gold: #d8c293;
  --banner-coral: #c9d8b8;
  --banner-teal: #6b8f5b;
  --banner-magenta: #a7c49a;
  --banner-cream: #fffaf0;
}

body[data-gui-theme="herd"][data-accent="herd-moss"] {
  --teal: #6b8f5b;
  --coral: #dcc8a6;
  --gold: #e5c98e;
  --green: #a7c49a;
  --tab-1: #a7c49a;
  --tab-2: #6b8f5b;
  --tab-3: #dcc8a6;
  --tab-4: #d7e6f4;
  --tab-5: #f3efe6;
  --tab-6: #2f3b33;
  --tab-7: #c9d8b8;
  --tab-active: #6b8f5b;
  --tab-active-text: #fffaf0;
  --banner-gold: #dcc8a6;
  --banner-coral: #c9d8b8;
  --banner-teal: #6b8f5b;
  --banner-magenta: #a7c49a;
  --banner-cream: #f3efe6;
}

body[data-gui-theme="herd"][data-accent="herd-sage"] {
  --teal: #789b68;
  --coral: #d8cfa5;
  --gold: #e6ca78;
  --green: #b8cf9f;
  --tab-1: #e6ca78;
  --tab-2: #789b68;
  --tab-3: #b8cf9f;
  --tab-4: #d8cfa5;
  --tab-5: #f5f0de;
  --tab-6: #44573b;
  --tab-7: #cadcb8;
  --tab-active: #789b68;
  --tab-active-text: #fffaf0;
  --banner-gold: #e6ca78;
  --banner-coral: #d8cfa5;
  --banner-teal: #789b68;
  --banner-magenta: #b8cf9f;
  --banner-cream: #fffaf0;
}

body[data-gui-theme="herd"][data-accent="herd-clay"] {
  --teal: #ba7f47;
  --coral: #d99b62;
  --gold: #e7bd72;
  --green: #8fa66f;
  --tab-1: #e7bd72;
  --tab-2: #ba7f47;
  --tab-3: #d99b62;
  --tab-4: #8fa66f;
  --tab-5: #f7ead5;
  --tab-6: #704424;
  --tab-7: #d6c39a;
  --tab-active: #ba7f47;
  --tab-active-text: #fffaf0;
  --banner-gold: #e7bd72;
  --banner-coral: #d99b62;
  --banner-teal: #ba7f47;
  --banner-magenta: #8fa66f;
  --banner-cream: #fffaf0;
}

body[data-gui-theme="herd"][data-accent="herd-sky"] {
  --teal: #6e9fbb;
  --coral: #c7d9c2;
  --gold: #d8c58a;
  --green: #7f9968;
  --tab-1: #d8c58a;
  --tab-2: #6e9fbb;
  --tab-3: #c7d9c2;
  --tab-4: #8eb8cd;
  --tab-5: #eef4ef;
  --tab-6: #35576b;
  --tab-7: #7f9968;
  --tab-active: #6e9fbb;
  --tab-active-text: #fffaf0;
  --banner-gold: #d8c58a;
  --banner-coral: #c7d9c2;
  --banner-teal: #6e9fbb;
  --banner-magenta: #8eb8cd;
  --banner-cream: #fffaf0;
}

body[data-gui-theme="pillion-neon"],
body[data-gui-theme="wyt"] {
  color-scheme: dark;
  --bg: #05070b;
  --panel: #0b0e14;
  --panel-2: #141923;
  --line: #242a36;
  --input-bg: #080b11;
  --rail-bg: rgba(5, 7, 11, .92);
  --tab-bg: rgba(5, 7, 11, .96);
  --card-bg: linear-gradient(180deg, rgba(13, 16, 23, .99), rgba(5, 7, 11, .99));
  --card-soft-bg: rgba(21, 27, 38, .68);
  --media-bg: #020305;
  --text: #fbfbff;
  --muted: #9ba4b5;
  --teal: #2ec4b6;
  --coral: #8d4dff;
  --gold: #2ca7ff;
  --green: #2ec4b6;
  --shadow: 0 24px 70px rgba(0, 0, 0, .52);
  --tab-1: #ffffff;
  --tab-2: #9b4dff;
  --tab-3: #5f63ff;
  --tab-4: #2ca7ff;
  --tab-5: #11151d;
  --tab-6: #272f40;
  --tab-7: #6f44ff;
  --tab-active: #2ca7ff;
  --tab-active-text: #06110f;
  --banner-gold: #2ca7ff;
  --banner-coral: #5f63ff;
  --banner-teal: #34b3ff;
  --banner-magenta: #9b4dff;
  --banner-cream: #ffffff;
  --pillion-purple: #9b4dff;
  --pillion-indigo: #5f63ff;
  --pillion-blue: #2ca7ff;
}

body[data-gui-theme="wyt"] {
  --bg: #111820;
  --panel: #151f27;
  --panel-2: #1f2b34;
  --line: #2c3d48;
  --input-bg: #0b141b;
  --rail-bg: rgba(8, 16, 23, .9);
  --tab-bg: rgba(8, 16, 23, .94);
  --card-bg: linear-gradient(180deg, rgba(20, 29, 37, .99), rgba(9, 16, 22, .99));
  --card-soft-bg: rgba(30, 42, 51, .66);
  --media-bg: #05090d;
  --text: #f1eee8;
  --muted: #a9a7a1;
  --bg: #111820;
  --panel: #151f27;
  --panel-2: #1f2b34;
  --line: #2c3d48;
  --input-bg: #0b141b;
  --teal: #46d1c9;
  --coral: #ff6b6b;
  --gold: #f2b844;
  --green: #46d1c9;
  --tab-1: #f2b844;
  --tab-2: #ff6b6b;
  --tab-3: #46d1c9;
  --tab-4: #d9469a;
  --tab-5: #e6e1da;
  --tab-6: #203a34;
  --tab-7: #9b5ca8;
  --tab-active: #46d1c9;
}

body[data-gui-theme="herd"] {
  font-family: Nunito, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-gui-theme="pillion-neon"],
body[data-gui-theme="wyt"] {
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f7;
  --panel: #ffffff;
  --panel-2: #edf2f1;
  --line: #d8e0df;
  --input-bg: #ffffff;
  --rail-bg: rgba(255, 255, 255, .9);
  --tab-bg: rgba(255, 255, 255, .94);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 249, .98));
  --card-soft-bg: rgba(229, 238, 236, .72);
  --media-bg: #e8eeee;
  --text: #101316;
  --muted: #64706f;
  --shadow: 0 18px 50px rgba(18, 31, 34, .12);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10181f;
  --panel: #111920;
  --panel-2: #1b252d;
  --line: #2b3842;
  --input-bg: #0b1218;
  --rail-bg: rgba(13, 21, 28, .92);
  --tab-bg: rgba(13, 21, 28, .96);
  --card-bg: linear-gradient(180deg, rgba(18, 27, 35, .99), rgba(13, 21, 28, .99));
  --card-soft-bg: rgba(28, 38, 47, .62);
  --media-bg: #070d12;
  --text: #f7f2ec;
  --muted: #b8b3ae;
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

body[data-accent="mint"] {
  --teal: #35c3b5;
  --coral: #c94f92;
  --gold: #e7ad42;
  --green: #35c3b5;
}

body[data-accent="berry"] {
  --teal: #d85ea8;
  --coral: #ff7f7f;
  --gold: #ffc857;
  --green: #7bd389;
}

body[data-accent="sunset"] {
  --teal: #ff9f68;
  --coral: #ff6f91;
  --gold: #ffd166;
  --green: #7bd389;
}

body[data-accent="ocean"] {
  --teal: #48bfe3;
  --coral: #ff7a90;
  --gold: #f9c74f;
  --green: #80ed99;
}

body[data-gui-theme="pillion-neon"][data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070b;
  --panel: #0b0e14;
  --panel-2: #141923;
  --line: #242a36;
  --input-bg: #080b11;
  --rail-bg: rgba(5, 7, 11, .92);
  --tab-bg: rgba(5, 7, 11, .96);
  --card-bg: linear-gradient(180deg, rgba(13, 16, 23, .99), rgba(5, 7, 11, .99));
  --card-soft-bg: rgba(21, 27, 38, .68);
  --media-bg: #020305;
  --text: #fbfbff;
  --muted: #9ba4b5;
  --shadow: 0 28px 78px rgba(0, 0, 0, .62);
}

body[data-gui-theme="pillion-neon"][data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fc;
  --panel: #ffffff;
  --panel-2: #edf0f8;
  --line: #dfe3ef;
  --input-bg: #ffffff;
  --rail-bg: rgba(255, 255, 255, .92);
  --tab-bg: rgba(255, 255, 255, .96);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(241, 244, 252, .99));
  --card-soft-bg: rgba(230, 234, 246, .74);
  --media-bg: #e7ebf5;
  --text: #05070b;
  --muted: #606a7b;
  --shadow: 0 20px 58px rgba(25, 37, 64, .13);
}

body[data-gui-theme="classic"][data-theme="dark"] {
  --bg: #10181f;
  --panel: #111920;
  --panel-2: #1b252d;
  --line: #2b3842;
  --input-bg: #0b1218;
  --rail-bg: rgba(13, 21, 28, .92);
  --tab-bg: rgba(13, 21, 28, .96);
  --card-bg: linear-gradient(180deg, rgba(18, 27, 35, .99), rgba(13, 21, 28, .99));
  --card-soft-bg: rgba(28, 38, 47, .62);
  --media-bg: #070d12;
  --text: #f7f2ec;
  --muted: #b8b3ae;
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

body[data-gui-theme="afterhours"][data-theme="dark"] {
  --bg: #08090d;
  --panel: #11131b;
  --panel-2: #1b1d2a;
  --line: #2d3042;
  --input-bg: #0b0d13;
  --rail-bg: rgba(8, 9, 13, .92);
  --tab-bg: rgba(8, 9, 13, .96);
  --card-bg: linear-gradient(180deg, rgba(28, 30, 43, .98), rgba(13, 15, 22, .98));
  --card-soft-bg: rgba(44, 47, 66, .48);
  --media-bg: #05060a;
  --text: #f6f2ff;
  --muted: #aaa6bd;
  --shadow: 0 28px 76px rgba(0, 0, 0, .62);
}

body[data-gui-theme="editorial"][data-theme="dark"] {
  --bg: #181511;
  --panel: #211d18;
  --panel-2: #2d261e;
  --line: #4a4033;
  --input-bg: #14110e;
  --rail-bg: rgba(24, 21, 17, .92);
  --tab-bg: rgba(24, 21, 17, .96);
  --card-bg: linear-gradient(180deg, rgba(39, 34, 28, .98), rgba(22, 19, 15, .98));
  --card-soft-bg: rgba(58, 49, 39, .58);
  --media-bg: #100d0a;
  --text: #fbf3e8;
  --muted: #b8aa95;
  --shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

body[data-gui-theme="arcade"][data-theme="dark"] {
  --bg: #10081f;
  --panel: #1b1230;
  --panel-2: #2b1c4a;
  --line: #49346f;
  --input-bg: #140b24;
  --rail-bg: rgba(16, 8, 31, .92);
  --tab-bg: rgba(16, 8, 31, .96);
  --card-bg: linear-gradient(180deg, rgba(43, 28, 74, .98), rgba(23, 13, 41, .98));
  --card-soft-bg: rgba(84, 49, 134, .42);
  --media-bg: #0a0614;
  --text: #fff8ff;
  --muted: #c9b8dc;
  --shadow: 0 28px 82px rgba(0, 0, 0, .58);
}

body[data-gui-theme="garden"][data-theme="dark"] {
  --bg: #0f1711;
  --panel: #17231a;
  --panel-2: #213426;
  --line: #35513c;
  --input-bg: #111b14;
  --rail-bg: rgba(15, 23, 17, .92);
  --tab-bg: rgba(15, 23, 17, .96);
  --card-bg: linear-gradient(180deg, rgba(33, 52, 38, .98), rgba(18, 28, 21, .98));
  --card-soft-bg: rgba(44, 71, 51, .5);
  --media-bg: #09100b;
  --text: #f2f7ea;
  --muted: #adbaa8;
  --shadow: 0 26px 72px rgba(0, 0, 0, .52);
}

body[data-gui-theme="gallery"][data-theme="dark"] {
  --bg: #11131b;
  --panel: #181b26;
  --panel-2: #222637;
  --line: #373d52;
  --input-bg: #0e1119;
  --rail-bg: rgba(17, 19, 27, .92);
  --tab-bg: rgba(17, 19, 27, .96);
  --card-bg: linear-gradient(180deg, rgba(32, 36, 51, .98), rgba(16, 18, 26, .98));
  --card-soft-bg: rgba(46, 51, 70, .56);
  --media-bg: #0b0d13;
  --text: #f7f7fb;
  --muted: #b2b4c1;
  --shadow: 0 26px 72px rgba(0, 0, 0, .5);
}

body[data-gui-theme="herd"][data-theme="dark"] {
  --bg: #131912;
  --panel: #1b2319;
  --panel-2: #263222;
  --line: #3b4a35;
  --input-bg: #10160f;
  --rail-bg: rgba(19, 25, 18, .92);
  --tab-bg: rgba(19, 25, 18, .96);
  --card-bg: linear-gradient(180deg, rgba(36, 47, 32, .98), rgba(18, 24, 17, .98));
  --card-soft-bg: rgba(48, 62, 43, .56);
  --media-bg: #0b100a;
  --text: #f3f0e5;
  --muted: #b5bea9;
  --shadow: 0 24px 68px rgba(0, 0, 0, .48);
}

body[data-gui-theme="wyt"][data-theme="dark"] {
  --bg: #111820;
  --panel: #151f27;
  --panel-2: #1f2b34;
  --line: #2c3d48;
  --input-bg: #0b141b;
  --rail-bg: rgba(8, 16, 23, .9);
  --tab-bg: rgba(8, 16, 23, .94);
  --card-bg: linear-gradient(180deg, rgba(20, 29, 37, .99), rgba(9, 16, 22, .99));
  --card-soft-bg: rgba(30, 42, 51, .66);
  --media-bg: #05090d;
  --text: #f1eee8;
  --muted: #a9a7a1;
  --shadow: 0 24px 70px rgba(0, 0, 0, .52);
}

body[data-gui-theme="pillion-neon"] {
  --pillion-purple: #9b4dff;
  --pillion-indigo: #5f63ff;
  --pillion-blue: #2ca7ff;
  --tab-1: #ffffff;
  --tab-2: #9b4dff;
  --tab-3: #5f63ff;
  --tab-4: #2ca7ff;
  --tab-5: color-mix(in srgb, var(--panel) 88%, #ffffff);
  --tab-6: color-mix(in srgb, var(--panel-2) 88%, #2ca7ff);
  --tab-7: #6f44ff;
  --tab-active: #2ca7ff;
  --tab-active-text: #05070b;
  --banner-gold: #2ca7ff;
  --banner-coral: #5f63ff;
  --banner-teal: #34b3ff;
  --banner-magenta: #9b4dff;
  --banner-cream: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  min-height: calc(var(--app-vh) * 100);
  overflow-x: hidden;
  overflow-y: auto;
  background: radial-gradient(circle at top left, rgba(47, 208, 180, .12), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.device-ios {
  --device-top-pad: env(safe-area-inset-top);
  --device-bottom-pad: env(safe-area-inset-bottom);
  -webkit-text-size-adjust: 100%;
}

body.device-android {
  --device-top-pad: .35rem;
  --device-bottom-pad: .25rem;
}

body.device-touch {
  touch-action: manipulation;
}

body.device-standalone {
  overscroll-behavior-y: none;
}

body.device-touch input,
body.device-touch select,
body.device-touch textarea {
  font-size: 16px;
}

body.device-touch button,
body.device-touch .chip,
body.device-touch .tab-item {
  -webkit-tap-highlight-color: transparent;
}

body.device-mobile.device-tablet main {
  width: min(58rem, 100%);
}

body[data-gui-theme="herd"] {
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--teal) 26%, transparent), transparent 22rem),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 72%, var(--bg)), var(--bg));
}

body[data-gui-theme="pillion-neon"],
body[data-gui-theme="wyt"] {
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 24rem),
    radial-gradient(circle at 90% 18%, color-mix(in srgb, var(--coral) 12%, transparent), transparent 22rem),
    var(--bg);
}

body[data-gui-theme="herd"] .auth-screen {
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--green) 18%, transparent), transparent 23rem),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 70%, transparent), color-mix(in srgb, var(--bg) 96%, transparent)),
    var(--bg);
}

body[data-gui-theme="pillion-neon"] .auth-screen,
body[data-gui-theme="wyt"] .auth-screen {
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--teal) 18%, transparent), transparent 22rem),
    var(--bg);
}

html.overlay-scroll-locked,
body.overlay-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

body.overlay-scroll-locked {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .58;
}

.auth-screen {
  min-height: calc(var(--app-vh) * 100);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(24rem, .95fr);
  background: var(--bg);
}

.auth-media {
  position: relative;
  min-height: calc(var(--app-vh) * 100);
  overflow: hidden;
}

.auth-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.98) contrast(1.02);
}

.auth-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 19, 22, .2), rgba(16, 19, 22, .92));
}

body[data-gui-theme="herd"] .auth-media {
  padding: clamp(.75rem, 2vw, 1.35rem);
  background: #f3efe6;
}

body[data-gui-theme="herd"] .auth-media img {
  border-radius: 2rem;
  box-shadow: 0 24px 70px rgba(47, 62, 47, .18);
}

body[data-gui-theme="herd"] .auth-media::after {
  background:
    linear-gradient(90deg, transparent 44%, color-mix(in srgb, var(--bg) 16%, transparent) 66%, color-mix(in srgb, var(--bg) 78%, transparent));
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(var(--app-vh) * 100);
  padding: calc(clamp(1rem, 5vw, 4rem) + var(--device-top-pad)) clamp(1rem, 5vw, 4rem) calc(clamp(1rem, 5vw, 4rem) + var(--device-bottom-pad));
}

.auth-brand {
  margin-bottom: 2.5rem;
}

body[data-gui-theme="herd"] .auth-brand {
  margin-bottom: 1.45rem;
}

.auth-panel h1 {
  max-width: 29rem;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.02;
}

.auth-copy {
  max-width: 29rem;
  color: var(--muted);
  line-height: 1.55;
}

.auth-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  width: min(100%, 32rem);
  margin: 1.1rem 0 .2rem;
}

.auth-info-grid article {
  min-width: 0;
  padding: .8rem;
  border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--line));
  border-radius: 1.15rem;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.auth-info-grid strong,
.auth-info-grid span {
  display: block;
}

.auth-info-grid strong {
  margin-bottom: .28rem;
  color: var(--text);
  font-size: .86rem;
}

.auth-info-grid span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 750;
}

.auth-form {
  display: grid;
  gap: .85rem;
  width: min(100%, 28rem);
  margin-top: 1.25rem;
}

.auth-form.is-hidden {
  display: none;
}

.auth-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  width: min(100%, 28rem);
  margin-top: 1.25rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.auth-toggle button {
  min-height: 2.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-toggle button.active {
  background: var(--panel-2);
  color: var(--text);
}

.auth-form label span {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: .9rem;
  outline: none;
}

.auth-form input[type="file"],
.composer input[type="file"] {
  padding: .7rem;
}

.signup-top10 {
  display: grid;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-soft-bg);
}

.signup-top10 h2 {
  margin: 0;
  font-size: 1.1rem;
}

.top10-signup-grid {
  display: grid;
  gap: .65rem;
}

.auth-message {
  min-height: 1.4rem;
  width: min(100%, 28rem);
  margin: .8rem 0 0;
  color: var(--coral);
  font-size: .9rem;
}

.text-button {
  width: fit-content;
  margin-top: 1rem;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

.auth-screen.is-hidden {
  display: none;
}

.site-move-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  min-height: calc(var(--app-vh) * 100);
  padding: calc(1.25rem + var(--device-top-pad)) 1.25rem calc(1.25rem + var(--device-bottom-pad));
  background:
    radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--teal) 24%, transparent), transparent 20rem),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 75%, var(--bg)), var(--bg));
}

.site-move-screen.is-hidden {
  display: none;
}

.site-move-card {
  width: min(30rem, 100%);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.site-move-card h1 {
  margin: .2rem 0 .75rem;
  font-size: clamp(2.25rem, 11vw, 4.25rem);
  line-height: .94;
}

.site-move-card p {
  color: var(--muted);
}

.site-move-link {
  margin-top: 1.4rem;
  text-decoration: none;
}

.site-move-note {
  margin: 1rem 0 0;
  font-size: .92rem;
}

.app.is-locked {
  display: none;
}

.app {
  min-height: calc(var(--app-vh) * 100);
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  overflow: visible;
}

.rail {
  position: sticky;
  top: 0;
  height: calc(var(--app-vh) * 100);
  padding: calc(1.25rem + var(--device-top-pad)) 1.25rem calc(1.25rem + var(--device-bottom-pad));
  border-right: 1px solid var(--line);
  background: var(--rail-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
  font-weight: 800;
  font-size: 1.25rem;
}

.mark,
.avatar {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 900;
  overflow: hidden;
}

.avatar.image {
  background: var(--panel-2);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rail-item,
.tab-item {
  border: 0;
  background: transparent;
}

.rail-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem .75rem;
  border-radius: 8px;
  color: var(--muted);
}

.rail-item.active,
.rail-item:hover {
  background: var(--panel-2);
  color: var(--text);
}

.post-trigger {
  margin: .75rem 0;
  background: var(--teal);
  color: #07110f;
  font-weight: 800;
}

main {
  width: min(74rem, 100%);
  margin: 0 auto;
  padding: calc(2rem + var(--device-top-pad)) 2rem calc(6rem + var(--device-bottom-pad));
  min-height: calc(var(--app-vh) * 100);
  overflow: visible;
}

.section-heading,
.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 1rem;
}

.topbar > div {
  min-width: 0;
  text-align: center;
}

.topbar .eyebrow {
  margin-bottom: .25rem;
}

.topbar-brand-logo {
  --logo-a: var(--teal);
  --logo-b: var(--coral);
  --logo-c: var(--gold);
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: .18rem;
  min-height: 1.25rem;
  margin: 0 auto .28rem;
  color: var(--teal);
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .16em;
}

.topbar-brand-logo .logo-text {
  display: inline-flex;
  align-items: center;
  gap: .02rem;
}

.topbar-brand-logo .logo-word span {
  display: inline-block;
}

.topbar-brand-logo .logo-word span:nth-child(1) { color: var(--logo-a); }
.topbar-brand-logo .logo-word span:nth-child(2) { color: var(--logo-b); }
.topbar-brand-logo .logo-word span:nth-child(3) { color: var(--logo-c); }
.topbar-brand-logo .logo-word span:nth-child(4) { color: var(--logo-a); }
.topbar-brand-logo .logo-word span:nth-child(5) { color: var(--text); }
.topbar-brand-logo .logo-word span:nth-child(6) { color: var(--muted); }

.topbar-brand-logo .logo-face {
  display: inline-grid;
  place-items: center;
  width: 1.08rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--logo-a);
  color: #07110f;
  font-size: .52rem;
  letter-spacing: -.12em;
  text-indent: -.08em;
}

body[data-gui-theme="herd"] .topbar-brand-logo {
  --logo-a: var(--teal);
  --logo-b: var(--green);
  --logo-c: var(--gold);
  color: var(--teal);
  font-size: .88rem;
  letter-spacing: .02em;
  text-transform: lowercase;
}

body[data-gui-theme="herd"] .topbar-brand-logo .logo-face {
  position: relative;
  width: 1.18rem;
  border-radius: 42% 38% 45% 40%;
  background: var(--teal);
  color: transparent;
  box-shadow:
    -.18rem .08rem 0 -.06rem var(--teal),
    .18rem .08rem 0 -.06rem var(--teal);
}

body[data-gui-theme="herd"] .topbar-brand-logo .logo-face::before,
body[data-gui-theme="herd"] .topbar-brand-logo .logo-face::after {
  content: "";
  position: absolute;
  top: 48%;
  width: .13rem;
  height: .2rem;
  border-radius: 999px;
  background: var(--bg);
  transform: translateY(-50%);
}

body[data-gui-theme="herd"] .topbar-brand-logo .logo-face::before {
  left: .34rem;
}

body[data-gui-theme="herd"] .topbar-brand-logo .logo-face::after {
  right: .34rem;
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo,
body[data-gui-theme="wyt"] .topbar-brand-logo {
  font-size: .86rem;
  letter-spacing: .03em;
  text-transform: lowercase;
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo {
  --logo-a: var(--pillion-blue);
  --logo-b: var(--pillion-indigo);
  --logo-c: var(--pillion-purple);
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  padding: .16rem .42rem .16rem .18rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 72%, transparent);
  text-transform: uppercase;
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-word {
  color: var(--text);
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-word span {
  color: var(--text);
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-word span:nth-child(1) {
  color: #ffffff;
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-face {
  position: relative;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: .36rem;
  overflow: hidden;
  background: #05070b;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  text-indent: -.08rem;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #ffffff 14%, transparent),
    0 .35rem 1.2rem rgba(0, 0, 0, .25);
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-face::before,
body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-face::after {
  content: "";
  position: absolute;
  left: .56rem;
  height: .16rem;
  border-radius: 999px;
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-face::before {
  top: .62rem;
  width: .48rem;
  background: var(--pillion-purple);
  box-shadow: 0 .32rem 0 .02rem var(--pillion-indigo);
}

body[data-gui-theme="pillion-neon"] .topbar-brand-logo .logo-face::after {
  top: 1.14rem;
  width: .72rem;
  background: var(--pillion-blue);
}

body[data-gui-theme="wyt"] .topbar-brand-logo {
  --logo-a: #46d1c9;
  --logo-b: #ff6b6b;
  --logo-c: #f2b844;
}

body[data-gui-theme="wyt"] .topbar-brand-logo .logo-word span:nth-child(1),
body[data-gui-theme="wyt"] .topbar-brand-logo .logo-word span:nth-child(4) {
  color: var(--logo-a);
}

.topbar h1,
.section-heading h2,
.profile-header h2,
.composer h2 {
  margin: 0;
  line-height: 1.03;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.eyebrow {
  margin: 0 0 .4rem;
  color: var(--teal);
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.feed-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 .3rem;
  padding: 1rem 0 .7rem;
}

.feed-more-button {
  display: block;
  width: min(100%, 34rem);
  margin: 1rem auto 0;
  min-height: 3rem;
  border: 1px solid color-mix(in srgb, var(--teal) 38%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 82%, var(--teal));
  color: var(--text);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.home-shortcuts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 .3rem;
  padding: .45rem 0 .7rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.home-shortcuts::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: .16rem;
  left: .18rem;
  height: 2.7rem;
  border-radius: 20px 20px 0 0;
  background: color-mix(in srgb, var(--panel) 82%, var(--teal));
  pointer-events: none;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: .65rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.ranking-card,
.person-card,
.item-card,
.guide-card,
.stats,
.shelf,
.profile-settings,
.points-panel,
.badge-card,
.thread-panel,
.message-panel,
.search-box,
.discover-card,
.composer,
.real-map,
.map-empty-note {
  border-radius: 18px;
}

.empty-state.compact {
  padding: 1rem;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.5;
}

.empty-mark {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
}

.chip,
.ghost-button,
.primary-button {
  min-height: 2.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: .55rem .85rem;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
}

.home-shortcuts .chip,
.feed-controls .chip,
.activity-tabs .chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2.55rem;
  border-color: color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 16px 16px 0 0;
  background: var(--tab-1);
  color: #f6fffc;
  box-shadow: 0 .25rem .85rem rgba(0, 0, 0, .18), inset 0 -1px 0 rgba(0, 0, 0, .16);
  align-items: center;
}

.feed-controls .chip,
.activity-tabs .chip {
  justify-content: center;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-controls .chip:nth-child(n + 4),
.activity-tabs .chip:nth-child(n + 4) {
  z-index: 3;
  min-height: 2.55rem;
  margin-top: -1.22rem;
  padding-top: .55rem;
  padding-bottom: .55rem;
  filter: saturate(1.08);
  box-shadow: 0 -.25rem .9rem rgba(0, 0, 0, .18), 0 .55rem 1.2rem rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.feed-controls .chip:nth-child(-n + 3),
.activity-tabs .chip:nth-child(-n + 3) {
  z-index: 1;
  box-shadow: 0 .2rem .65rem rgba(0, 0, 0, .12), inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.home-shortcuts .chip {
  position: relative;
  z-index: 1;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: .55rem .35rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-shortcuts .chip:nth-child(n + 5) {
  z-index: 6;
  min-height: 2.55rem;
  margin-top: -.72rem;
  padding-top: .55rem;
  padding-bottom: .55rem;
  filter: saturate(1.08);
  box-shadow: 0 -.25rem .9rem rgba(0, 0, 0, .18), 0 .55rem 1.2rem rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.home-shortcuts .chip:nth-child(-n + 4) {
  z-index: 1;
  box-shadow: 0 .12rem .45rem rgba(0, 0, 0, .08), inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.home-shortcuts .chip:nth-child(2),
.feed-controls .chip:nth-child(2),
.activity-tabs .chip:nth-child(2) {
  background: var(--tab-2);
}

.home-shortcuts .chip:nth-child(3),
.feed-controls .chip:nth-child(3),
.activity-tabs .chip:nth-child(3) {
  background: var(--tab-3);
}

.home-shortcuts .chip:nth-child(4),
.feed-controls .chip:nth-child(4),
.activity-tabs .chip:nth-child(4) {
  background: var(--tab-4);
}

.home-shortcuts .chip:nth-child(5),
.feed-controls .chip:nth-child(5),
.activity-tabs .chip:nth-child(5) {
  background: var(--tab-6);
}

.home-shortcuts .chip:nth-child(6),
.feed-controls .chip:nth-child(6),
.activity-tabs .chip:nth-child(6) {
  background: var(--tab-2);
}

.home-shortcuts .chip:nth-child(7),
.feed-controls .chip:nth-child(7),
.activity-tabs .chip:nth-child(7) {
  background: var(--tab-5);
}

.home-shortcuts .chip:nth-child(8),
.feed-controls .chip:nth-child(8),
.activity-tabs .chip:nth-child(8) {
  background: var(--tab-7);
}

.home-shortcuts .chip:nth-child(6) {
  background: var(--tab-5);
}

.home-shortcuts .chip:nth-child(7) {
  background: var(--tab-7);
}

.home-shortcuts .chip:nth-child(8) {
  background: var(--tab-6);
}

.home-shortcuts .chip.active,
.feed-controls .chip.active,
.activity-tabs .chip.active {
  transform: translateY(.08rem);
  border-color: color-mix(in srgb, var(--teal) 78%, white);
  background: var(--tab-active);
  color: var(--tab-active-text);
}

.home-shortcuts .chip.active {
  z-index: 2;
  box-shadow: 0 -.18rem .8rem rgba(47, 208, 180, .1), inset 0 -1px 0 color-mix(in srgb, var(--teal) 65%, transparent);
}

.chip.active,
.primary-button {
  border-color: transparent;
  background: var(--teal);
  color: #07110f;
  font-weight: 900;
}

.home-shortcuts .chip.active,
.feed-controls .chip.active,
.activity-tabs .chip.active,
.map-location-strip .chip.active,
.home-tabs .chip.active {
  z-index: 2;
  border-color: color-mix(in srgb, var(--teal) 78%, white);
  background: var(--tab-active);
  color: var(--tab-active-text);
}

.home-shortcuts .chip:nth-child(n + 5).active,
.feed-controls .chip:nth-child(n + 4).active,
.activity-tabs .chip:nth-child(n + 4).active,
.map-location-strip .chip:nth-child(n + 4).active,
.home-tabs .chip:nth-child(n + 4).active {
  z-index: 7;
  box-shadow: 0 -.28rem 1rem rgba(0, 0, 0, .2), 0 .65rem 1.35rem rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .2);
}

body[data-nav-layout="ergonomic"] .feed-controls,
body[data-nav-layout="ergonomic"] .activity-tabs,
body[data-nav-layout="ergonomic"] .map-location-strip,
body[data-nav-layout="ergonomic"] .home-tabs {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding: .55rem 0 .75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  scrollbar-width: none;
}

body[data-nav-layout="ergonomic"] .feed-controls::-webkit-scrollbar,
body[data-nav-layout="ergonomic"] .activity-tabs::-webkit-scrollbar,
body[data-nav-layout="ergonomic"] .map-location-strip::-webkit-scrollbar,
body[data-nav-layout="ergonomic"] .home-tabs::-webkit-scrollbar {
  display: none;
}

body[data-nav-layout="ergonomic"] .home-shortcuts {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding: .45rem 0 .75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  scrollbar-width: none;
}

body[data-nav-layout="ergonomic"] .home-shortcuts::-webkit-scrollbar {
  display: none;
}

body[data-nav-layout="ergonomic"] .home-shortcuts::before {
  content: none;
}

body[data-nav-layout="ergonomic"] .home-shortcuts .chip,
body[data-nav-layout="ergonomic"] .feed-controls .chip,
body[data-nav-layout="ergonomic"] .activity-tabs .chip,
body[data-nav-layout="ergonomic"] .map-location-strip .chip,
body[data-nav-layout="ergonomic"] .home-tabs .chip,
body[data-nav-layout="ergonomic"] .home-shortcuts .chip:nth-child(n),
body[data-nav-layout="ergonomic"] .feed-controls .chip:nth-child(n),
body[data-nav-layout="ergonomic"] .activity-tabs .chip:nth-child(n),
body[data-nav-layout="ergonomic"] .map-location-strip .chip:nth-child(n),
body[data-nav-layout="ergonomic"] .home-tabs .chip:nth-child(n) {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  min-height: 2.25rem;
  margin-top: 0;
  padding: .48rem .78rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
  filter: none;
  z-index: 1;
}

body[data-nav-layout="ergonomic"] .home-shortcuts .chip.active,
body[data-nav-layout="ergonomic"] .feed-controls .chip.active,
body[data-nav-layout="ergonomic"] .activity-tabs .chip.active,
body[data-nav-layout="ergonomic"] .map-location-strip .chip.active,
body[data-nav-layout="ergonomic"] .home-tabs .chip.active {
  border-color: transparent;
  background: var(--teal);
  color: #07110f;
  transform: none;
}

body[data-nav-layout="ergonomic"] .profile-action-grid {
  gap: .55rem;
}

body[data-nav-layout="ergonomic"] .profile-action-button {
  min-height: 4.25rem;
  border-radius: 18px;
}

.pull-refresh {
  position: fixed;
  top: .7rem;
  left: 50%;
  z-index: 80;
  display: inline-grid;
  place-items: center;
  min-height: 2.35rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .28);
  color: var(--text);
  font-size: .78rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3.5rem);
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease;
}

.pull-refresh.is-visible {
  opacity: 1;
}

.pull-refresh.is-ready,
.pull-refresh.is-refreshing {
  border-color: rgba(47, 208, 180, .55);
  color: var(--teal);
}

.ranking-card {
  display: block;
  overflow: hidden;
  padding: 0;
  margin: 0 auto .7rem;
  max-width: 42rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.polished-review-card {
  box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
}

.rank-media-frame {
  position: relative;
  overflow: hidden;
  background: var(--media-bg);
}

.rank-media-frame .photo-strip,
.rank-media-frame .poster {
  margin: 0;
  border-radius: 0;
}

.rank-media-frame .poster {
  min-height: 27rem;
}

.rank-score-badge {
  position: absolute;
  right: .85rem;
  bottom: .85rem;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-width: 4.65rem;
  min-height: 4.65rem;
  padding: .55rem;
  border: 2px solid color-mix(in srgb, var(--bg) 72%, transparent);
  border-radius: 999px;
  background: var(--teal);
  color: #07110f;
  box-shadow: 0 .8rem 1.8rem rgba(0, 0, 0, .32);
  text-align: center;
  line-height: 1;
}

.rank-score-badge::after {
  content: "";
  position: absolute;
  right: .35rem;
  top: .35rem;
  z-index: -1;
  width: .88rem;
  height: .88rem;
  border-radius: 50%;
  background: currentColor;
  opacity: .18;
}

.rank-score-badge.grade {
  background: var(--gold);
  color: #1b1200;
}

.rank-score-badge.stars {
  min-width: 5.75rem;
  background: var(--panel);
  color: var(--green);
}

body[data-gui-theme="classic"] .rank-score-badge,
body[data-gui-theme="classic"] .rank-score-badge.grade,
body[data-gui-theme="classic"] .rank-score-badge.stars,
body[data-gui-theme="classic"] .score,
body[data-gui-theme="classic"] .score.grade,
body[data-gui-theme="classic"] .score.numeric,
body[data-gui-theme="classic"] .score.stars,
body[data-gui-theme="classic"] .tile-score {
  background: var(--coral);
  color: #fff5fb;
}

.rank-score-badge strong {
  max-width: 5rem;
  overflow: hidden;
  font-size: 1.18rem;
  font-weight: 950;
  text-overflow: ellipsis;
}

.rank-score-badge small {
  margin-top: .18rem;
  color: currentColor;
  font-size: .58rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .82;
}

.ranking-card.spotlight {
  border-color: rgba(47, 208, 180, .45);
}

.rtr-card {
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
}

.rtr-headline {
  display: grid;
  gap: .35rem;
}

.rtr-headline span {
  width: fit-content;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: var(--teal);
  color: #07110f;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
}

.rtr-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: .9rem 0;
}

.rtr-results div,
.rtr-empty {
  display: grid;
  gap: .2rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-soft-bg);
}

.rtr-results strong,
.rtr-empty strong {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
}

.rtr-results span,
.rtr-empty span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.rtr-responses {
  border-top-color: color-mix(in srgb, var(--teal) 36%, var(--line));
}

.rtr-poll-card {
  display: grid;
  gap: .7rem;
  padding: .85rem;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 12%, transparent), transparent 52%),
    var(--card-soft-bg);
}

.rtr-poll-card h3 {
  margin: 0;
}

.rtr-poll-card .section-heading > span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.rtr-poll-options {
  display: grid;
  gap: .45rem;
}

.rtr-poll-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .12rem .65rem;
  align-items: center;
  min-height: 3.1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  padding: .65rem .75rem;
  text-align: left;
}

.rtr-poll-option span,
.rtr-poll-option strong,
.rtr-poll-option small {
  position: relative;
  z-index: 1;
}

.rtr-poll-option strong {
  font-weight: 950;
}

.rtr-poll-option small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.rtr-poll-option i {
  position: absolute;
  inset: 0 auto 0 0;
  background: color-mix(in srgb, var(--teal) 22%, transparent);
  pointer-events: none;
}

.rtr-poll-option.selected {
  border-color: color-mix(in srgb, var(--teal) 62%, var(--line));
}

.rtr-poll-editor {
  display: grid;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid color-mix(in srgb, var(--gold) 36%, var(--line));
  border-radius: 20px;
  background: color-mix(in srgb, var(--gold) 9%, var(--card-soft-bg));
}

.top10-card {
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
}

.top10-hero {
  display: grid;
  gap: .4rem;
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 34%, transparent), color-mix(in srgb, var(--teal) 22%, transparent));
}

.top10-hero span {
  width: fit-content;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top10-list {
  display: grid;
  gap: .5rem;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.top10-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-soft-bg);
}

.top10-list li > span {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #16120a;
  font-weight: 950;
}

.top10-list small,
.tangent-card small,
.tangent-results > span {
  color: var(--muted);
}

.top10-list strong {
  display: block;
  color: var(--text);
}

.tangent-results {
  display: grid;
  gap: .55rem;
  margin-top: .9rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-soft-bg);
}

.tangent-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .55rem;
  border-radius: 14px;
  background: var(--panel);
}

.poster {
  min-height: 26rem;
  border-radius: 18px;
  margin: .8rem -.75rem .85rem;
  background-size: cover;
  background-position: center;
}

.rank-photo {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 72vh;
  border-radius: 0;
  object-fit: cover;
  display: block;
  scroll-snap-align: start;
}

.rank-photo-link {
  flex: 0 0 100%;
  display: block;
  scroll-snap-align: start;
}

.rank-photo-link .rank-photo {
  height: 100%;
}

.photo-strip {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  margin: .8rem -.75rem .85rem;
  border-radius: 18px;
  background: var(--media-bg);
  scrollbar-width: none;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.photo-count {
  width: fit-content;
  margin: -.45rem 0 .8rem auto;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: rgba(14, 17, 19, .78);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

.text-only-poster {
  display: grid;
  align-content: end;
  min-height: 18rem;
  margin: .8rem -.75rem .85rem;
  padding: 1.15rem;
  border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--teal) 24%, transparent), transparent 14rem),
    linear-gradient(145deg, color-mix(in srgb, var(--panel-2) 82%, transparent), var(--card-bg));
}

.rank-media-frame .text-only-poster {
  min-height: 23rem;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.text-only-poster span,
.text-only-poster small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.text-only-poster strong {
  max-width: 18rem;
  margin: .35rem 0 .15rem;
  color: var(--text);
  font-size: clamp(2rem, 10vw, 4rem);
  line-height: .95;
}

.poster.restaurant {
  background-image: linear-gradient(145deg, rgba(255, 111, 89, .2), rgba(16, 19, 22, .15)), url("assets/pillion-collage.png");
}

.poster.headphones {
  background-image: linear-gradient(145deg, rgba(47, 208, 180, .24), rgba(16, 19, 22, .2)), url("assets/pillion-collage.png");
  background-position: 68% 35%;
}

.poster.film {
  background-image: linear-gradient(145deg, rgba(244, 184, 96, .24), rgba(16, 19, 22, .2)), url("assets/pillion-collage.png");
  background-position: 20% 65%;
}

.ranking-body {
  min-width: 0;
  padding: .9rem;
}

.polished-review-card .ranking-body {
  display: grid;
  gap: .55rem;
  padding: .95rem .95rem 1rem;
}

.meta-row,
.score-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.refined-meta {
  font-size: .86rem;
}

.refined-meta .name-button {
  color: var(--text);
  font-weight: 950;
}

.rank-title-row {
  display: grid;
  gap: .2rem;
}

.meta-row {
  justify-content: space-between;
  color: var(--muted);
  font-size: .86rem;
}

.meta-row strong {
  color: var(--text);
}

.edited-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  margin-left: .35rem;
  padding: .08rem .42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
}

.name-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  text-align: left;
}

.name-button:hover {
  color: var(--teal);
}

.handle-button {
  display: block;
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.handle-button:hover {
  color: var(--teal);
}

.name-button.large {
  display: block;
  font-size: 1rem;
}

.ranking-card h3 {
  margin: .6rem 0 .2rem;
  font-size: 1.35rem;
}

.category,
.scale,
.review,
.person-card span,
.discover-card span,
.profile-header p,
.stats span {
  color: var(--muted);
}

.category {
  margin: 0 0 .75rem;
}

.post-location {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin: -.35rem 0 .8rem;
  color: var(--muted);
  font-size: .86rem;
}

.post-location span,
.post-location a {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: .22rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-soft-bg);
  color: var(--muted);
  text-decoration: none;
}

.post-location a {
  color: var(--teal);
  font-weight: 800;
}

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  min-height: 3rem;
  border-radius: 8px;
  font-size: 1.65rem;
  font-weight: 950;
}

.score.grade {
  background: var(--gold);
  color: #1b1200;
}

.score.numeric {
  background: var(--teal);
  color: #07110f;
}

.score.stars {
  min-width: 7rem;
  background: var(--panel-2);
  color: var(--green);
  font-size: 1.2rem;
}

.review {
  max-width: 52rem;
  line-height: 1.52;
}

.notice-panel {
  max-width: 42rem;
  margin: 0 auto 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(47, 208, 180, .38);
  border-radius: 8px;
  background: rgba(47, 208, 180, .08);
}

.notice-panel p {
  margin: .35rem 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.notice-panel strong {
  color: var(--text);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.search-box {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-box input,
.composer input,
.composer select,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: .85rem;
  outline: none;
}

.search-box input {
  border: 0;
  padding: 0;
  background: transparent;
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.discover-card,
.person-card,
.stats,
.shelf {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.discover-card {
  min-height: 9rem;
  padding: 1rem;
  text-align: left;
}

.discover-card strong {
  display: block;
  margin: .9rem 0 .35rem;
  font-size: 1.2rem;
}

.pill {
  display: inline-flex;
  border: 1px solid rgba(47, 208, 180, .4);
  border-radius: 999px;
  padding: .25rem .55rem;
  color: var(--teal);
}

.people-list {
  display: grid;
  gap: .75rem;
}

.search-results {
  margin-top: 1rem;
}

.search-tools {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.search-home {
  display: grid;
  gap: .75rem;
}

.home-search-heading {
  justify-content: center;
  text-align: center;
}

.search-section {
  display: grid;
  gap: .55rem;
  margin-bottom: .85rem;
}

.search-section h3 {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.item-card,
.item-detail {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.item-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.item-card h3,
.item-detail h2 {
  margin: 0;
}

.item-score {
  display: grid;
  place-items: center;
  min-width: 4.8rem;
  padding: .55rem;
  border-radius: 8px;
  background: var(--teal);
  color: #07110f;
}

.item-score.large {
  min-width: 5.6rem;
}

.item-score strong {
  font-size: 1.45rem;
  line-height: 1;
}

.item-score span {
  font-size: .72rem;
  font-weight: 850;
}

.quick-facts {
  grid-column: 1 / -1;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.quick-facts span {
  display: inline-flex;
  padding: .32rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-soft-bg);
  color: var(--muted);
  font-size: .82rem;
}

.item-review-list {
  display: grid;
  gap: .75rem;
}

.map-board {
  margin-top: 1rem;
}

.real-map {
  min-height: 28rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.leaflet-container {
  font: inherit;
  background: var(--panel);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--panel);
  color: var(--text);
}

.map-empty-note {
  display: grid;
  gap: .2rem;
  margin-top: .75rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-soft-bg);
}

.map-empty-note span {
  color: var(--muted);
  line-height: 1.4;
}

.map-popup-button {
  margin-top: .45rem;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #07110f;
  padding: .35rem .6rem;
  font-weight: 850;
  cursor: pointer;
}

.map-mini-feed {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
}

.map-mini-feed .section-heading {
  margin: 0;
}

.map-mini-feed .section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.map-location-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 .3rem;
  padding: .25rem 0 .7rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.map-location-strip .chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 2.55rem;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 16px 16px 0 0;
  background: var(--tab-1);
  color: #f6fffc;
  text-overflow: ellipsis;
}

.map-location-strip .chip:nth-child(2) { background: var(--tab-2); }
.map-location-strip .chip:nth-child(3) { background: var(--tab-3); }
.map-location-strip .chip:nth-child(4) { background: var(--tab-4); }
.map-location-strip .chip:nth-child(5) { background: var(--tab-6); }
.map-location-strip .chip:nth-child(6) { background: var(--tab-2); }
.map-location-strip .chip:nth-child(7) { background: var(--tab-5); }
.map-location-strip .chip.active {
  border-color: color-mix(in srgb, var(--teal) 78%, white);
  background: var(--tab-active);
  color: var(--tab-active-text);
}

.map-location-strip .chip:nth-child(n + 4) {
  z-index: 3;
  min-height: 2.55rem;
  margin-top: -1.22rem;
  padding-top: .55rem;
  padding-bottom: .55rem;
  filter: saturate(1.08);
  box-shadow: 0 -.25rem .9rem rgba(0, 0, 0, .18), 0 .55rem 1.2rem rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.map-location-strip .chip:nth-child(-n + 3) {
  z-index: 1;
  box-shadow: 0 .2rem .65rem rgba(0, 0, 0, .12), inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.map-grid {
  position: relative;
  min-height: 24rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(47, 208, 180, .16), transparent 20rem),
    var(--panel);
  background-size: 4rem 4rem, 4rem 4rem, auto, auto;
}

.map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.25rem;
  aspect-ratio: 1;
  border: 2px solid var(--panel);
  border-radius: 50% 50% 50% 0;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.map-pin span {
  transform: rotate(45deg);
}

.map-list {
  margin-top: 1rem;
}

.person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .85rem;
}

.person-card strong,
.person-card span {
  display: block;
}

.avatar.coral {
  background: var(--coral);
  color: #1c0703;
}

.avatar.gold {
  background: var(--gold);
  color: #1b1200;
}

.avatar.large {
  width: 5rem;
  font-size: 2rem;
}

.profile-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  min-height: 7.3rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.profile-header > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .45rem;
  min-width: 0;
}

.profile-header p {
  margin: 0;
}

.profile-mini-stats {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}

.profile-mini-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: .28rem;
  padding: .36rem .5rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 760;
}

.profile-mini-stats strong {
  color: var(--text);
  font-size: .9rem;
  line-height: 1;
}

.profile-edit-trigger {
  margin: 1rem 0 0;
}

.profile-theme-trigger {
  margin: 1rem 0 0 .5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin: 1rem 0;
  overflow: hidden;
}

body[data-gui-theme="herd"] .mark {
  position: relative;
  border-radius: 38% 42% 46% 40%;
  background: var(--teal);
  color: transparent;
  font-size: 0;
  box-shadow:
    .48rem .08rem 0 -.16rem var(--teal),
    -.48rem .08rem 0 -.16rem var(--teal),
    inset 0 0 0 1px color-mix(in srgb, var(--panel) 32%, transparent);
}

body[data-gui-theme="herd"] .mark::before,
body[data-gui-theme="herd"] .mark::after {
  content: "";
  position: absolute;
  top: 48%;
  width: .22rem;
  height: .34rem;
  border-radius: 999px;
  background: var(--bg);
  transform: translateY(-50%);
}

body[data-gui-theme="herd"] .mark::before {
  left: .72rem;
}

body[data-gui-theme="herd"] .mark::after {
  right: .72rem;
}

body[data-gui-theme="herd"] .brand span {
  color: var(--text);
  font-size: 1.42rem;
  font-weight: 950;
  letter-spacing: .01em;
}

body[data-gui-theme="pillion-neon"] .mark,
body[data-gui-theme="wyt"] .mark {
  background: var(--teal);
  color: #07110f;
  font-size: 1.05rem;
  letter-spacing: -.22rem;
  text-indent: -.12rem;
}

body[data-gui-theme="pillion-neon"] .mark {
  position: relative;
  border-radius: 26%;
  background: #05070b;
  color: #ffffff;
  font-size: 1.35rem;
  letter-spacing: 0;
  text-indent: 0;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #ffffff 12%, transparent),
    0 .8rem 1.8rem rgba(0, 0, 0, .32);
}

body[data-gui-theme="pillion-neon"] .mark::before,
body[data-gui-theme="pillion-neon"] .mark::after {
  content: "";
  position: absolute;
  left: 1.04rem;
  height: .18rem;
  border-radius: 999px;
}

body[data-gui-theme="pillion-neon"] .mark::before {
  top: 1.08rem;
  width: .58rem;
  background: var(--pillion-purple);
  box-shadow: 0 .38rem 0 .04rem var(--pillion-indigo);
}

body[data-gui-theme="pillion-neon"] .mark::after {
  top: 1.84rem;
  width: .88rem;
  background: var(--pillion-blue);
}

body[data-gui-theme="pillion-neon"] .brand span,
body[data-gui-theme="wyt"] .brand span {
  font-size: 1.36rem;
  font-weight: 950;
  letter-spacing: .01em;
}

body[data-gui-theme="pillion-neon"] .brand span {
  background: linear-gradient(90deg, #ffffff, var(--pillion-purple) 42%, var(--pillion-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-gui-theme="wyt"] .brand span {
  background: linear-gradient(90deg, #46d1c9, #ff6b6b 45%, #f2b844 73%, #46d1c9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-gui-theme="herd"] .ranking-card,
body[data-gui-theme="herd"] .profile-card,
body[data-gui-theme="herd"] .home-map-panel,
body[data-gui-theme="herd"] .admin-panel {
  border-color: color-mix(in srgb, var(--teal) 34%, var(--line));
  border-radius: 28px;
  box-shadow:
    0 18px 44px color-mix(in srgb, var(--teal) 16%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--gold) 22%, transparent);
}

body[data-gui-theme="herd"] .primary-button,
body[data-gui-theme="herd"] .profile-action-button,
body[data-gui-theme="herd"] .chip.active {
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--teal) 72%, var(--line));
  background: linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--gold) 36%, var(--teal)));
  color: var(--bg);
  box-shadow: 0 .7rem 1.6rem color-mix(in srgb, var(--teal) 22%, transparent);
}

body[data-gui-theme="herd"] .appreciate-action {
  border-color: color-mix(in srgb, var(--teal) 58%, var(--panel));
  border-radius: 999px 999px 999px 12px;
  background:
    radial-gradient(circle at 18% 30%, color-mix(in srgb, var(--panel) 44%, transparent), transparent 1.1rem),
    linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--gold) 42%, var(--teal)));
  color: var(--bg);
}

body[data-gui-theme="herd"] .appreciate-action:disabled {
  border-color: color-mix(in srgb, var(--teal) 52%, var(--panel));
  background: color-mix(in srgb, var(--teal) 52%, var(--panel));
  color: var(--text);
  opacity: .9;
}

body[data-gui-theme="herd"] .points-panel strong {
  color: var(--teal);
}

body[data-gui-theme="herd"] .rank-score-badge,
body[data-gui-theme="herd"] .score,
body[data-gui-theme="herd"] .tile-score {
  background:
    radial-gradient(circle at 28% 20%, color-mix(in srgb, var(--panel) 48%, transparent), transparent 1.5rem),
    var(--teal);
  color: var(--bg);
  border: 2px solid var(--teal);
  box-shadow: 0 .6rem 1.4rem color-mix(in srgb, var(--teal) 28%, transparent);
}

body[data-gui-theme="pillion-neon"] .ranking-card,
body[data-gui-theme="wyt"] .ranking-card,
body[data-gui-theme="pillion-neon"] .profile-card,
body[data-gui-theme="wyt"] .profile-card {
  border-color: color-mix(in srgb, var(--teal) 22%, var(--line));
  box-shadow:
    0 22px 64px rgba(0, 0, 0, .52),
    inset 0 1px 0 rgba(255, 255, 255, .035);
}

body[data-gui-theme="pillion-neon"] .ranking-card,
body[data-gui-theme="pillion-neon"] .profile-card,
body[data-gui-theme="pillion-neon"] .home-map-panel,
body[data-gui-theme="pillion-neon"] .admin-panel,
body[data-gui-theme="pillion-neon"] .profile-settings {
  border-color: color-mix(in srgb, var(--pillion-blue) 22%, var(--line));
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--pillion-purple) 16%, transparent), transparent 16rem),
    var(--card-bg);
  box-shadow:
    0 28px 78px rgba(0, 0, 0, .5),
    inset 0 1px 0 color-mix(in srgb, #ffffff 7%, transparent);
}

body[data-gui-theme="pillion-neon"] .primary-button,
body[data-gui-theme="wyt"] .primary-button {
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--teal));
  color: #06110f;
}

body[data-gui-theme="pillion-neon"] .primary-button,
body[data-gui-theme="pillion-neon"] .post-trigger,
body[data-gui-theme="pillion-neon"] .tab-item.raised,
body[data-gui-theme="pillion-neon"] .profile-action-button,
body[data-gui-theme="pillion-neon"] .chip.active {
  background: linear-gradient(90deg, var(--pillion-purple), var(--pillion-indigo), var(--pillion-blue));
  color: #ffffff;
  box-shadow: 0 .7rem 1.8rem color-mix(in srgb, var(--pillion-blue) 24%, transparent);
}

body[data-gui-theme="pillion-neon"] .ghost-button,
body[data-gui-theme="pillion-neon"] select,
body[data-gui-theme="pillion-neon"] input,
body[data-gui-theme="pillion-neon"] textarea {
  border-color: color-mix(in srgb, var(--pillion-blue) 16%, var(--line));
}

body[data-gui-theme="pillion-neon"] .eyebrow,
body[data-gui-theme="pillion-neon"] .category,
body[data-gui-theme="pillion-neon"] .text-button {
  color: var(--pillion-blue);
}

body[data-gui-theme="pillion-neon"] .rank-score-badge,
body[data-gui-theme="pillion-neon"] .score,
body[data-gui-theme="pillion-neon"] .tile-score,
body[data-gui-theme="wyt"] .rank-score-badge,
body[data-gui-theme="wyt"] .score,
body[data-gui-theme="wyt"] .tile-score {
  background: var(--coral);
  color: #fffaf0;
}

body[data-gui-theme="pillion-neon"] .rank-score-badge,
body[data-gui-theme="pillion-neon"] .score,
body[data-gui-theme="pillion-neon"] .tile-score {
  border-color: color-mix(in srgb, #ffffff 22%, transparent);
  background: linear-gradient(135deg, var(--pillion-purple), var(--pillion-indigo), var(--pillion-blue));
  color: #ffffff;
}

body[data-gui-theme="pillion-neon"] .rank-score-badge {
  border-radius: 30px;
}

body[data-gui-theme="pillion-neon"] .photo-strip,
body[data-gui-theme="pillion-neon"] .rank-media-frame {
  background: #05070b;
}

body[data-gui-theme="wyt"] .rank-score-badge,
body[data-gui-theme="wyt"] .score,
body[data-gui-theme="wyt"] .tile-score {
  background: #0b1118;
  border: 1px solid #46d1c9;
  color: #f1eee8;
}

.rank-score-badge.quality-great,
.score.quality-great,
.tile-score.quality-great,
.message-shared-post strong.quality-great {
  background: linear-gradient(135deg, #34d399, #f2b844);
  border-color: color-mix(in srgb, #34d399 72%, #f2b844);
  color: #07110f;
}

.rank-score-badge.quality-good,
.score.quality-good,
.tile-score.quality-good,
.message-shared-post strong.quality-good {
  background: #2ec4b6;
  border-color: #2ec4b6;
  color: #06110f;
}

.rank-score-badge.quality-mixed,
.score.quality-mixed,
.tile-score.quality-mixed,
.message-shared-post strong.quality-mixed {
  background: #f2b134;
  border-color: #f2b134;
  color: #1b1200;
}

.rank-score-badge.quality-low,
.score.quality-low,
.tile-score.quality-low,
.message-shared-post strong.quality-low {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: #1a0808;
}

.rank-score-badge.quality-great {
  border-radius: 34% 50% 34% 50%;
  box-shadow:
    0 .8rem 1.8rem rgba(0, 0, 0, .32),
    0 0 0 .22rem color-mix(in srgb, #34d399 34%, transparent);
}

.rank-score-badge.quality-good {
  border-radius: 46% 54% 42% 58%;
}

.rank-score-badge.quality-mixed {
  border-radius: 28px 999px 999px 28px;
}

.rank-score-badge.quality-low {
  border-radius: 20px 999px 20px 999px;
  box-shadow:
    0 .8rem 1.8rem rgba(0, 0, 0, .32),
    inset 0 0 0 2px rgba(255, 255, 255, .22);
}

.rank-score-badge.quality-great::after {
  width: 1.05rem;
  height: 1.05rem;
  opacity: .28;
}

.rank-score-badge.quality-mixed::after,
.rank-score-badge.quality-low::after {
  right: auto;
  left: .42rem;
  border-radius: 999px;
}

.stats div {
  padding: 1rem;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  font-size: 1.6rem;
}

.shelf {
  padding: 1rem;
}

.shelf h3 {
  margin: 0 0 .85rem;
}

.shelf span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 .45rem .45rem 0;
  padding: .45rem .65rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
}

.subject-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 .45rem .45rem 0;
  padding: .45rem .65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-weight: 850;
}

.subject-chip.active {
  border-color: color-mix(in srgb, var(--teal) 58%, transparent);
  background: color-mix(in srgb, var(--teal) 18%, var(--panel-2));
  color: var(--text);
}

.shelf small {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--card-soft-bg);
  color: var(--text);
  font-size: .72rem;
  font-weight: 850;
}

.profile-post-search {
  display: grid;
  gap: .4rem;
  margin-top: .55rem;
}

.profile-post-search span {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

.profile-post-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text);
  padding: .72rem .9rem;
  outline: none;
}

.profile-settings {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.photo-cropper {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-soft-bg);
}

.crop-preview {
  width: min(14rem, 70vw);
  aspect-ratio: 1;
  justify-self: center;
  border: 3px solid var(--teal);
  border-radius: 50%;
  background-color: var(--panel-2);
  background-repeat: no-repeat;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .24);
}

.photo-cropper input[type="range"] {
  width: 100%;
}

.account-settings-page {
  position: relative;
  padding-top: .2rem;
}

.account-settings-page .profile-settings {
  margin-top: .75rem;
}

.account-back-button {
  margin-bottom: .35rem;
}

.points-panel,
.referral-panel {
  display: flex;
  gap: .85rem;
  align-items: center;
  justify-content: space-between;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-soft-bg);
}

.points-panel strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.points-panel span,
.points-panel p,
.badge-card p,
.badge-card small {
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.settings-grid label,
.referral-panel label {
  display: grid;
  gap: .35rem;
}

.settings-grid select,
.referral-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text);
  padding: .75rem .9rem;
}

.referral-panel label {
  flex: 1;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.cosmetic-grid,
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.badge-card,
.cosmetic-card {
  display: grid;
  gap: .55rem;
  padding: .8rem;
  border: 1px solid var(--line);
  background: var(--card-soft-bg);
}

.badge-card.active,
.cosmetic-card.active {
  border-color: rgba(47, 208, 180, .62);
  box-shadow: 0 0 0 3px rgba(47, 208, 180, .14);
}

.badge-store h4 {
  margin: 1rem 0 .55rem;
}

.home-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 .3rem;
  overflow: visible;
  padding: .1rem 0 .7rem;
}

.home-tabs .chip {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  min-height: 2.55rem;
  align-items: center;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 16px 16px 0 0;
  background: var(--tab-1);
  color: #f6fffc;
  text-overflow: ellipsis;
}

.home-tabs .chip:nth-child(2) { background: var(--tab-2); }
.home-tabs .chip:nth-child(3) { background: var(--tab-3); }
.home-tabs .chip:nth-child(4) { background: var(--tab-4); }
.home-tabs .chip:nth-child(5) { background: var(--tab-6); }
.home-tabs .chip:nth-child(6) { background: var(--tab-2); }
.home-tabs .chip:nth-child(7) { background: var(--tab-5); }
.home-tabs .chip:nth-child(n + 4) {
  z-index: 3;
  min-height: 2.55rem;
  margin-top: -1.22rem;
  padding-top: .55rem;
  padding-bottom: .55rem;
  box-shadow: 0 -.25rem .9rem rgba(0, 0, 0, .18), 0 .55rem 1.2rem rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.home-tabs .chip:nth-child(-n + 3) {
  z-index: 1;
  box-shadow: 0 .2rem .65rem rgba(0, 0, 0, .12), inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.home-tabs .chip.active {
  z-index: 4;
  border-color: color-mix(in srgb, var(--teal) 78%, white);
  background: var(--tab-active);
  color: var(--tab-active-text);
}

.home-tab-panel {
  display: grid;
  gap: 1rem;
}

.activity-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 .3rem;
  padding: .15rem 0 .7rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.top-three-section {
  display: grid;
  gap: .6rem;
}

.top-three-section .section-heading {
  margin-bottom: 0;
}

.top-three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: .45rem;
}

.top-three-card {
  position: relative;
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.top-three-card .profile-tile {
  min-height: 7rem;
  border-radius: 18px;
}

.top-three-card .tile-overlay {
  padding: .55rem;
}

.top-three-card .tile-overlay strong {
  font-size: .86rem;
}

.top-three-card .tile-overlay small,
.top-three-card > small {
  font-size: .68rem;
}

.top-three-card > small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-three-rank {
  position: absolute;
  top: .35rem;
  left: .35rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.85rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #16120a;
  font-size: .9rem;
  font-weight: 950;
  box-shadow: 0 .45rem 1rem rgba(0, 0, 0, .28);
}

.top-three-user-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .35rem;
  min-height: 7rem;
  padding: .85rem .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-soft-bg);
  text-align: center;
}

.top-three-user-card .avatar {
  width: 2.75rem;
  height: 2.75rem;
}

.top-three-user-card strong,
.top-three-user-card small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-three-user-card small {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
}

.share-sheet {
  width: min(32rem, calc(100vw - 1.5rem));
  max-height: min(42rem, calc((var(--app-vh) * 100) - 2rem - var(--device-top-pad) - var(--device-bottom-pad)));
  margin: auto auto 1rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  color: var(--text);
}

.share-sheet::backdrop {
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(8px);
}

.share-sheet-head {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) 2.35rem;
  align-items: center;
  gap: .5rem;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--line);
}

.share-sheet-head h2 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
}

.share-preview {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  margin: .85rem .9rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-soft-bg);
}

.share-preview img,
.share-preview .tile-fallback {
  width: 3.25rem;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
}

.share-preview div {
  min-width: 0;
}

.share-preview strong,
.share-preview small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-preview small {
  color: var(--muted);
}

.share-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  margin: 0 .9rem .8rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--muted);
}

.share-search input,
.share-note-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.share-recipient-list {
  display: grid;
  align-content: start;
  gap: .2rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0 .7rem .75rem;
}

.share-recipient {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar name check"
    "avatar handle check";
  gap: .05rem .7rem;
  align-items: center;
  width: 100%;
  padding: .55rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.share-recipient:hover,
.share-recipient.selected {
  border-color: rgba(47, 208, 180, .42);
  background: var(--card-soft-bg);
}

.share-recipient .avatar {
  grid-area: avatar;
}

.share-recipient span,
.share-recipient small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-recipient span {
  grid-area: name;
  font-weight: 850;
}

.share-recipient small {
  grid-area: handle;
  color: var(--muted);
}

.share-recipient i {
  grid-area: check;
  display: grid;
  place-items: center;
  width: 1.45rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #07110f;
  font-style: normal;
  font-weight: 950;
}

.share-recipient.selected i {
  border-color: transparent;
  background: var(--teal);
}

.share-note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  padding: .75rem .9rem calc(.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
}

.share-note-form input {
  min-height: 2.35rem;
  padding: 0 .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
}

.account-menu {
  max-width: 42rem;
}

.account-menu-content {
  display: grid;
  gap: 1rem;
}

.account-menu-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.prompt-menu-list {
  display: grid;
  gap: .65rem;
  padding-top: .5rem;
}

.prompt-card {
  display: grid;
  gap: .25rem;
  width: 100%;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-soft-bg);
  color: var(--text);
  text-align: left;
}

.prompt-card span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.prompt-card:hover {
  border-color: rgba(47, 208, 180, .48);
  background: var(--panel-2);
}

.profile-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: .85rem 0 1rem;
}

.profile-action-button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .35rem;
  min-height: 4.15rem;
  padding: .7rem .35rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--text);
}

.profile-action-button:hover {
  border-color: rgba(47, 208, 180, .48);
  background: var(--card-soft-bg);
}

.profile-action-button strong {
  font-size: .82rem;
}

.profile-action-button .profile-badge.inline {
  margin: 0;
}

.profile-badge {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 46% 54% 48% 52%;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  color: #07110f;
  font-size: .82rem;
  font-weight: 950;
  box-shadow: inset 0 -.22rem 0 rgba(0, 0, 0, .14), 0 .35rem .9rem rgba(0, 0, 0, .18);
}

.profile-badge span {
  position: relative;
  width: 1.1rem;
  height: .55rem;
}

.profile-badge span::before,
.profile-badge span::after {
  content: "";
  position: absolute;
  top: 0;
  width: .26rem;
  height: .34rem;
  border-radius: 50%;
  background: #07110f;
}

.profile-badge span::before {
  left: .18rem;
}

.profile-badge span::after {
  right: .18rem;
}

.profile-badge.sprite { background: linear-gradient(135deg, #7dd3fc, #a7f3d0); }
.profile-badge.tastebud { background: linear-gradient(135deg, #fb7185, #fbbf24); border-radius: 54% 46% 58% 42%; }
.profile-badge.pinpal { background: linear-gradient(135deg, #22d3ee, #818cf8); border-radius: 50% 50% 50% 16%; transform: rotate(-8deg); }
.profile-badge.keeper { background: linear-gradient(135deg, #fde68a, #f59e0b); border-radius: 35%; }
.profile-badge.signal { background: linear-gradient(135deg, #86efac, #2dd4bf); }
.profile-badge.diver { background: linear-gradient(135deg, #60a5fa, #172554); color: white; }
.profile-badge.curator { background: linear-gradient(135deg, #f0abfc, #c084fc); }
.profile-badge.rider { background: linear-gradient(135deg, var(--banner-cream, #fef3c7), var(--banner-teal, #2fd0b4)); border: 3px solid var(--gold); }
}

.profile-badge.inline {
  width: 1.8rem;
  vertical-align: middle;
}

.profile-banner {
  position: absolute;
  inset: 0 0 auto;
  height: 5.4rem;
  border-radius: 22px 22px 0 0;
  opacity: .92;
  pointer-events: none;
}

.banner-soft-glow {
  background:
    radial-gradient(circle at 18% 24%, color-mix(in srgb, var(--banner-teal, #37c8b3) 78%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--banner-coral, #f0645b) 42%, transparent), color-mix(in srgb, var(--banner-magenta, #c85892) 32%, transparent));
}

.banner-sunrise {
  background: linear-gradient(135deg, var(--banner-coral, #f0645b), var(--banner-gold, #e9b158) 48%, var(--banner-teal, #37c8b3));
}

.banner-night-drive {
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--banner-teal, #37c8b3) 54%, transparent), transparent 28%),
    linear-gradient(135deg, #081012, #142327 56%, color-mix(in srgb, var(--banner-magenta, #c85892) 58%, #081012));
}

.banner-gallery-wall {
  background: linear-gradient(90deg,
    var(--banner-gold, #e9b158) 0 20%,
    var(--banner-coral, #f0645b) 20% 40%,
    var(--banner-teal, #37c8b3) 40% 60%,
    var(--banner-magenta, #c85892) 60% 80%,
    var(--banner-cream, #e9e4da) 80%);
}

.avatar-frame {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  padding: .18rem;
  border-radius: 50%;
}

.border-mint-ring { background: linear-gradient(135deg, var(--banner-teal, var(--teal)), color-mix(in srgb, var(--banner-teal, var(--teal)) 18%, transparent)); }
.border-gold-pop { background: linear-gradient(135deg, var(--banner-gold, var(--gold)), var(--banner-cream, #fff7c2)); }
.border-berry-bubble { background: linear-gradient(135deg, var(--banner-magenta, #d85ea8), var(--banner-coral, #ff7f7f)); box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--banner-magenta, #d85ea8) 24%, transparent); }
.border-classic-frame { background: linear-gradient(135deg, var(--banner-teal, var(--teal)), var(--banner-gold, var(--gold)), var(--banner-coral, var(--coral)), var(--banner-magenta, #c85892)); padding: .28rem; }

.banner-preview,
.border-preview {
  display: block;
  width: 100%;
  min-height: 3.1rem;
  border-radius: 16px;
}

.border-preview {
  width: 3.2rem;
  aspect-ratio: 1;
  border-radius: 50%;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.flow-section {
  display: grid;
  gap: .65rem;
}

.profile-tile {
  position: relative;
  min-height: 8.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  padding: 0;
  text-align: left;
}

.profile-tile img,
.tile-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 8.6rem;
  object-fit: cover;
  font-size: 2rem;
  font-weight: 950;
}

.tile-overlay {
  position: absolute;
  inset: auto .55rem .55rem .55rem;
  display: grid;
  gap: .12rem;
  padding: .45rem .55rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, .58);
  color: white;
}

.tile-overlay strong,
.tile-overlay small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-score {
  position: absolute;
  top: .45rem;
  right: .45rem;
  padding: .35rem .48rem;
  border-radius: 999px;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
}

.rerank-tile {
  border-color: rgba(244, 184, 96, .58);
}

.original-context {
  position: absolute;
  left: .45rem;
  top: .45rem;
  max-width: calc(100% - 4rem);
  overflow: hidden;
  padding: .28rem .5rem;
  border-radius: 999px;
  background: rgba(244, 184, 96, .92);
  color: #1b1200;
  font-size: .72rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-grid-detail {
  display: grid;
  gap: .8rem;
}

.highlighted-rerank {
  padding: .7rem;
  border: 1px solid rgba(47, 208, 180, .42);
  border-radius: 18px;
  background: rgba(47, 208, 180, .08);
}

.shared-tags {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.saved-category {
  margin-bottom: 1rem;
}

.saved-category h3 {
  margin: 0 0 .7rem;
}

.card-actions {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  align-items: stretch;
  gap: .12rem;
  margin: .35rem -.95rem -1rem;
  padding: .35rem .6rem 0;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 58%, transparent), transparent),
    color-mix(in srgb, var(--card-soft-bg) 76%, transparent);
}

.post-report-row {
  display: flex;
  justify-content: flex-start;
  margin: .35rem 0 -.1rem;
}

.report-flag-button {
  display: grid;
  place-items: center;
  width: 1.8rem;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--gold) 72%, #000);
  border-radius: 999px;
  color: #2a1b00;
  background: var(--gold);
  box-shadow: 0 .45rem 1rem color-mix(in srgb, var(--gold) 24%, transparent);
  font-size: .85rem;
  font-weight: 950;
  cursor: pointer;
}

.report-target-preview,
.report-preview-card {
  display: grid;
  gap: .25rem;
}

.report-preview-card {
  padding: .85rem;
  border: 1px solid color-mix(in srgb, var(--gold) 36%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--gold) 9%, var(--card-soft-bg));
}

.report-preview-card span,
.report-preview-card small {
  color: var(--muted);
}

.card-actions::-webkit-scrollbar {
  display: none;
}

.card-actions .ghost-button.small-text {
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 2.55rem;
  overflow: hidden;
  padding: .55rem .42rem .65rem;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: color-mix(in srgb, var(--teal) 22%, var(--panel));
  color: var(--text);
  font-size: clamp(.66rem, 2.7vw, .78rem);
  font-weight: 950;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions .ghost-button.small-text:nth-of-type(2) {
  background: color-mix(in srgb, var(--gold) 24%, var(--panel));
}

.card-actions .ghost-button.small-text:nth-of-type(3) {
  background: color-mix(in srgb, #7dd3fc 22%, var(--panel));
}

.card-actions .ghost-button.small-text:nth-of-type(4) {
  background: color-mix(in srgb, #f0abfc 20%, var(--panel));
}

.card-actions .ghost-button.small-text:nth-of-type(5) {
  background: color-mix(in srgb, #86efac 20%, var(--panel));
}

.card-actions .ghost-button.small-text.danger {
  background: color-mix(in srgb, #ff7b7b 24%, var(--panel));
  color: color-mix(in srgb, #ffb3b3 86%, var(--text));
}

.card-actions .ghost-button.small-text:disabled {
  opacity: .7;
}

.people-list .ghost-button.small {
  width: auto;
  min-width: 4.5rem;
  padding: 0 .7rem;
}

.saved-note {
  display: inline-grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  min-height: 2.55rem;
  overflow: hidden;
  padding: .55rem .42rem .65rem;
  border-radius: 14px 14px 0 0;
  background: color-mix(in srgb, #a7f3d0 22%, var(--panel));
  color: var(--text);
  font-size: clamp(.64rem, 2.6vw, .76rem);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-panel {
  display: grid;
  gap: .35rem;
  margin-top: .85rem;
  padding: .75rem;
  border: 1px solid rgba(47, 208, 180, .34);
  border-radius: 8px;
  background: rgba(47, 208, 180, .08);
}

.affiliate-link {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.affiliate-panel span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.guide-shelf {
  display: grid;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.guide-card {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.guide-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.guide-card-head span,
.guide-card p,
.guide-empty {
  color: var(--muted);
}

.guide-card-head span,
.guide-card-head strong,
.guide-empty {
  font-size: .78rem;
  font-weight: 850;
}

.guide-card-head h3,
.guide-card p {
  margin: 0;
}

.guide-card-head h3 {
  margin-top: .15rem;
  font-size: 1rem;
}

.guide-card-head strong {
  padding: .2rem .5rem;
  border: 1px solid rgba(47, 208, 180, .34);
  border-radius: 999px;
  color: var(--teal);
  white-space: nowrap;
}

.guide-card p {
  line-height: 1.42;
  font-size: .9rem;
}

.guide-matches {
  display: grid;
  gap: .45rem;
}

.guide-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  min-height: 2.4rem;
  padding: .45rem .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-soft-bg);
  color: var(--text);
  text-align: left;
}

.guide-match span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-match strong {
  color: var(--teal);
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(17rem, .38fr) minmax(0, 1fr);
  min-height: calc((var(--app-vh) * 100) - 9rem - var(--device-top-pad));
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.thread-panel,
.message-panel {
  min-width: 0;
  background: var(--panel);
}

.thread-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: .85rem;
  padding: .85rem;
  border-right: 1px solid var(--line);
}

.dm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
}

.dm-head h2 {
  margin: .1rem 0 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.message-search {
  display: grid;
  gap: .5rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

.dm-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--muted);
}

.dm-search input,
.message-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.message-user-results {
  display: grid;
  gap: .45rem;
}

.message-person-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  width: 100%;
  padding: .55rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.message-person-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.message-person-result:hover {
  border-color: rgba(47, 208, 180, .38);
  background: var(--card-soft-bg);
}

.message-person-result.selected {
  border-color: rgba(47, 208, 180, .5);
  background: color-mix(in srgb, var(--card-soft-bg) 76%, rgba(47, 208, 180, .2));
}

.message-add-person {
  flex: 0 0 auto;
}

.message-person-result span,
.dm-row-copy {
  min-width: 0;
}

.message-person-result .avatar,
.thread-card .avatar {
  display: inline-grid;
  min-width: 0;
  overflow: hidden;
  color: #07110f;
}

.message-person-result strong,
.message-person-result small {
  display: block;
}

.message-person-result small,
.message-search-empty {
  color: var(--muted);
  font-size: .82rem;
}

.message-search-empty {
  padding: .45rem .2rem;
}

.selected-recipients {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  min-height: 1.9rem;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .55rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: .85rem;
  font-weight: 850;
}

.recipient-chip button {
  display: grid;
  place-items: center;
  width: 1.2rem;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--card-soft-bg);
  color: var(--muted);
}

.message-start-button {
  width: 100%;
  min-height: 2.8rem;
}

.thread-list {
  display: grid;
  align-content: start;
  gap: .25rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: .15rem;
}

.thread-swipe {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--coral);
  touch-action: pan-y;
}

.thread-delete-action {
  position: absolute;
  inset: 0 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 5.9rem;
  border: 0;
  background: var(--coral);
  color: #fff;
  font-weight: 900;
  letter-spacing: .01em;
}

.thread-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .65rem .6rem;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.thread-swipe-card {
  z-index: 1;
  background: var(--panel);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  will-change: transform;
}

.thread-swipe.is-open .thread-swipe-card {
  transform: translateX(-5.9rem);
}

.thread-swipe.is-dragging .thread-swipe-card {
  transition: none;
}

.thread-card.active,
.thread-card:hover {
  border-color: rgba(47, 208, 180, .48);
  background: var(--card-soft-bg);
}

.thread-card.unread {
  border-color: rgba(255, 111, 89, .5);
  background: color-mix(in srgb, var(--card-soft-bg) 72%, rgba(255, 111, 89, .18));
}

.thread-card.unread strong {
  color: var(--text);
}

.thread-card.appreciation-thread {
  border-color: rgba(244, 184, 96, .38);
  background: rgba(244, 184, 96, .08);
}

.thread-card.appreciation-thread.unread {
  border-color: rgba(244, 184, 96, .65);
  background: rgba(244, 184, 96, .14);
}

.thread-card.system-notice-thread {
  border-color: color-mix(in srgb, var(--gold) 32%, transparent);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.thread-card.system-notice-thread.unread {
  border-color: color-mix(in srgb, var(--gold) 64%, transparent);
  background: color-mix(in srgb, var(--gold) 15%, var(--card-soft-bg));
}

.system-notice-icon {
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #16120a;
  font-size: .9rem;
  font-weight: 950;
}

.system-notice-detail .notice-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}

.system-notice-feed {
  align-content: start;
  gap: .75rem;
}

.system-notice-card-head {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  text-align: left;
}

.system-notice-card-head > div {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.system-notice-card-head small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.dm-row-copy {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.dm-row-copy,
.dm-row-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-card small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-dot,
.notification-dot {
  display: inline-grid;
  place-items: center;
  min-width: .55rem;
  min-height: .55rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
}

.thread-card .unread-dot {
  position: absolute;
  left: 2.7rem;
  top: .72rem;
  border: 2px solid var(--panel);
}

.notification-dot {
  position: absolute;
  right: .52rem;
  top: .52rem;
  min-width: 1.12rem;
  height: 1.12rem;
  padding: 0 .24rem;
  border: 2px solid var(--panel);
  color: #fff;
  font-size: .62rem;
  font-weight: 950;
  line-height: 1;
}

.rail-item .notification-dot {
  right: .55rem;
  top: .5rem;
}

.tab-item .notification-dot {
  right: 28%;
  top: .38rem;
}

.inbox-trigger,
.tab-item {
  position: relative;
}

.message-panel {
  display: grid;
  grid-template-rows: minmax(22rem, 1fr) auto;
  overflow: hidden;
  background: var(--bg);
}

.message-thread {
  min-height: 22rem;
  overflow-y: auto;
  padding: 1rem;
}

.message-thread-head {
  position: sticky;
  top: -1rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: -1rem -1rem 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.message-thread-head h3 {
  margin: 0;
}

.message-thread-head span,
.message-empty {
  color: var(--muted);
}

.message-thread-head.appreciation-head {
  border-color: rgba(244, 184, 96, .45);
}

.message-list {
  display: grid;
  gap: .65rem;
}

.message-bubble {
  display: grid;
  gap: .25rem;
  max-width: min(28rem, 88%);
  justify-self: start;
  padding: .78rem .9rem;
  border-radius: 20px 20px 20px 7px;
  background: var(--card-soft-bg);
}

.message-bubble.own {
  justify-self: end;
  border-radius: 20px 20px 7px 20px;
  background: rgba(47, 208, 180, .13);
}

.message-bubble span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 850;
}

.message-bubble p {
  margin: 0;
  line-height: 1.4;
}

.message-shared-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  margin-top: .3rem;
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.message-shared-post span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-shared-post strong {
  min-width: 2.35rem;
  padding: .22rem .42rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--teal);
  text-align: center;
}

.message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  margin: .75rem;
  padding: .5rem .55rem .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
}

.message-form.is-disabled {
  opacity: .55;
  pointer-events: none;
}

.message-send-button {
  border-color: transparent;
  background: var(--teal);
  color: #07110f;
}

.appreciation-chat-card {
  display: grid;
  justify-items: center;
  gap: .9rem;
  max-width: 28rem;
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid rgba(244, 184, 96, .42);
  border-radius: 8px;
  background: rgba(244, 184, 96, .08);
  text-align: center;
}

.system-notice-feed .appreciation-chat-card {
  justify-items: stretch;
  max-width: none;
  margin: 0;
  text-align: left;
}

.appreciation-chat-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.appreciation-chat-card strong {
  color: var(--text);
}

.dm-avatar-stack {
  position: relative;
  display: inline-block;
  width: 2.7rem;
  height: 2.7rem;
}

.dm-avatar-stack .avatar {
  position: absolute;
  width: 1.95rem;
  height: 1.95rem;
  border: 2px solid var(--panel);
}

.dm-avatar-stack .avatar:first-child {
  left: 0;
  top: .15rem;
}

.dm-avatar-stack .avatar:last-child {
  right: 0;
  bottom: .05rem;
}

.dm-back {
  display: none;
}

.appreciation-orb {
  display: grid;
  place-items: center;
  width: 3.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1200;
}

.small-text {
  width: auto;
  min-width: 5.8rem;
  padding: 0 .7rem;
}

.ghost-button.danger {
  border-color: rgba(255, 111, 89, .45);
  color: var(--coral);
}

.profile-rankings {
  margin-top: 1rem;
}

.admin-panel {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(47, 208, 180, .42);
  border-radius: 8px;
  background: rgba(47, 208, 180, .08);
}

.admin-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}

.admin-grid div {
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-grid strong,
.admin-grid span {
  display: block;
}

.admin-grid strong {
  font-size: 1.35rem;
}

.admin-grid span {
  color: var(--muted);
  font-size: .84rem;
}

.admin-user-management {
  display: grid;
  gap: .65rem;
}

.admin-report-inbox {
  display: grid;
  gap: .65rem;
}

.admin-feedback-inbox,
.admin-activity-panel {
  display: grid;
  gap: .65rem;
}

.admin-report-list {
  display: grid;
  gap: .5rem;
}

.admin-report-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  width: 100%;
  padding: .7rem;
  border: 1px solid color-mix(in srgb, var(--gold) 36%, var(--line));
  border-radius: 18px;
  color: var(--text);
  background: color-mix(in srgb, var(--gold) 8%, var(--panel));
  text-align: left;
  cursor: pointer;
}

.admin-report-row span {
  min-width: 0;
}

.admin-report-row strong,
.admin-report-row small,
.admin-report-row em {
  display: block;
}

.admin-report-row small,
.admin-report-row em {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-report-row em {
  font-size: .8rem;
  font-style: normal;
}

.report-row-flag {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #2a1b00;
  font-weight: 950;
}

.admin-feedback-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.feedback-type {
  align-self: start;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 18%, var(--panel));
  color: var(--teal);
  font-size: .72rem;
  font-weight: 900;
}

.feedback-type.bug {
  background: color-mix(in srgb, var(--coral) 18%, var(--panel));
  color: var(--coral);
}

.admin-feedback-row p {
  margin: .25rem 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.admin-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.admin-activity-grid section {
  display: grid;
  gap: .45rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.admin-mini-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  border: 0;
  border-radius: 14px;
  padding: .35rem;
  color: var(--text);
  background: var(--card-soft-bg);
  text-align: left;
}

.admin-mini-row span {
  min-width: 0;
}

.admin-mini-row small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-score {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1200;
  font-size: .78rem;
  font-weight: 950;
}

.onboarding-checklist {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem .75rem;
}

.onboarding-checklist span {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
}

.onboarding-checklist p {
  margin: 0;
  align-self: center;
  color: var(--text);
  font-weight: 800;
}

.tester-onboarding {
  max-width: min(34rem, calc(100vw - 1.5rem));
}

.tour-progress {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: .7rem;
  margin: .2rem 0 1.1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
  overflow: hidden;
}

.tour-progress span {
  position: relative;
  z-index: 1;
  padding-left: .75rem;
  color: var(--text);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tour-progress b {
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  border-radius: inherit;
  background: var(--accent-gradient);
  transition: width .22s ease;
}

.tour-slides {
  display: grid;
}

.tour-slide {
  display: none;
  min-height: 18rem;
  align-content: center;
  justify-items: start;
  gap: .85rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--teal) 18%, transparent), transparent 12rem),
    color-mix(in srgb, var(--panel-strong) 76%, transparent);
}

.tour-slide.active {
  display: grid;
}

.tour-glyph {
  display: grid;
  place-items: center;
  min-width: 3.4rem;
  height: 3.4rem;
  padding: 0 .65rem;
  border-radius: 1.1rem;
  color: var(--button-text);
  background: var(--accent-gradient);
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--teal) 22%, transparent);
}

.tour-slide h3 {
  margin: .3rem 0 0;
  font-size: clamp(1.7rem, 8vw, 2.45rem);
  line-height: .98;
}

.tour-slide p {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.42;
}

.install-guide-dialog .composer-scroll {
  padding-top: .5rem;
}

.install-guide-steps {
  display: grid;
  gap: .9rem;
}

.tour-slide .install-guide-steps {
  width: 100%;
  margin-top: .35rem;
}

.install-guide-steps.compact {
  gap: .55rem;
}

.install-guide-steps.compact article {
  padding: .72rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface) 64%, transparent);
}

.install-guide-steps.compact span {
  width: 1.75rem;
  height: 1.75rem;
  font-size: .8rem;
}

.install-guide-steps.compact strong {
  font-size: .9rem;
}

.install-guide-steps.compact p {
  font-size: .82rem;
}

.install-guide-steps article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
  align-items: start;
  padding: .95rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
}

.install-guide-steps span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--button-text);
  background: var(--accent-gradient);
  font-weight: 900;
}

.install-guide-steps strong {
  display: block;
  margin-bottom: .22rem;
}

.install-guide-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.admin-user-list {
  display: grid;
  gap: .5rem;
}

.admin-user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(12rem, auto);
  gap: .65rem;
  align-items: center;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.admin-user-row.banned {
  border-color: rgba(255, 111, 89, .48);
  background: rgba(255, 111, 89, .08);
}

.admin-user-row div {
  min-width: 0;
}

.admin-user-row small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-actions {
  display: flex;
  gap: .4rem;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-user-actions label {
  display: grid;
  gap: .2rem;
  min-width: 5.8rem;
}

.admin-user-actions label span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-user-actions input {
  width: 6.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text);
  padding: .55rem .65rem;
}

.section-heading.compact {
  margin-bottom: .8rem;
}

.attached-rankings {
  display: grid;
  gap: .5rem;
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.attached-rankings h4 {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.attached-ranking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem .7rem;
  align-items: center;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-soft-bg);
}

.attached-card .photo-strip,
.attached-card .poster {
  display: none;
}

.owner-appreciations {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .8rem;
  padding: .65rem;
  border-radius: 8px;
  background: rgba(47, 208, 180, .08);
  color: var(--muted);
  font-size: .86rem;
}

.owner-appreciations strong {
  color: var(--teal);
}

.list-card .ranking-body {
  padding-bottom: .8rem;
}

.ranked-list {
  display: grid;
  gap: .55rem;
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
}

.ranked-list li {
  display: grid;
  grid-template-columns: 2rem 3.8rem minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-soft-bg);
}

.ranked-list img,
.list-fallback {
  width: 3.8rem;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel-2);
}

.list-position {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
}

.ranked-list strong,
.ranked-list p {
  display: block;
  margin: 0;
}

.ranked-list p {
  margin-top: .18rem;
  color: var(--muted);
  line-height: 1.35;
  font-size: .9rem;
}

.list-expander summary {
  margin-top: .65rem;
  color: var(--teal);
  font-weight: 850;
  cursor: pointer;
}

.ranking-items-editor {
  display: grid;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-soft-bg);
}

.ranking-items-editor.is-hidden,
.is-hidden {
  display: none !important;
}

.ranking-item-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ranking-item-position {
  grid-row: span 4;
  display: grid;
  place-items: center;
  align-self: start;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1200;
  font-weight: 950;
}

.ranking-item-editor textarea {
  min-height: 4.8rem;
}

.attached-ranking p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.attached-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .1rem;
}

.score.mini {
  min-width: 2.75rem;
  min-height: 2rem;
  border-radius: 6px;
  font-size: .9rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
}

.icon-button.small,
.ghost-button.small {
  width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
}

.icon {
  position: relative;
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
}

.icon::before,
.icon::after {
  box-sizing: border-box;
}

.icon.home::before {
  content: "";
  position: absolute;
  left: .26rem;
  top: .52rem;
  width: .74rem;
  height: .56rem;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 .12rem .12rem;
}

.icon.home::after {
  content: "";
  position: absolute;
  left: .26rem;
  top: .18rem;
  width: .73rem;
  height: .73rem;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.icon.search::before {
  content: "";
  position: absolute;
  left: .18rem;
  top: .16rem;
  width: .72rem;
  height: .72rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon.search::after {
  content: "";
  position: absolute;
  width: .48rem;
  height: 2px;
  left: .72rem;
  top: .78rem;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.icon.map::before {
  content: "";
  position: absolute;
  inset: .12rem .22rem .12rem;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.icon.map::after {
  content: "";
  position: absolute;
  left: .5rem;
  top: .38rem;
  width: .24rem;
  height: .24rem;
  border-radius: 50%;
  background: currentColor;
}

.icon.message::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .2rem;
  width: .95rem;
  height: .72rem;
  border: 2px solid currentColor;
  border-radius: .18rem;
}

.icon.message::after {
  content: "";
  position: absolute;
  left: .37rem;
  top: .78rem;
  width: .28rem;
  height: .28rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: var(--panel);
  transform: rotate(-45deg);
  transform-origin: center;
}

.icon.back::before {
  content: "";
  position: absolute;
  left: .34rem;
  top: .31rem;
  width: .55rem;
  height: .55rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon.back::after {
  content: "";
  position: absolute;
  left: .34rem;
  right: .2rem;
  top: .61rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.icon.send::before {
  content: "";
  position: absolute;
  inset: .18rem .12rem .18rem .18rem;
  border-top: .48rem solid transparent;
  border-bottom: .48rem solid transparent;
  border-left: .88rem solid currentColor;
}

.icon.send::after {
  content: "";
  position: absolute;
  left: .3rem;
  top: .57rem;
  width: .6rem;
  height: 2px;
  background: var(--teal);
  transform: rotate(-20deg);
}

.icon.menu::before,
.icon.menu::after {
  content: "";
  position: absolute;
  left: .16rem;
  right: .16rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 .36rem 0 currentColor;
}

.icon.menu::before {
  top: .27rem;
}

.icon.menu::after {
  top: .98rem;
  box-shadow: none;
}

.icon.plus::before,
.icon.plus::after,
.icon.close::before,
.icon.close::after {
  content: "";
  position: absolute;
  left: .2rem;
  right: .2rem;
  top: .59rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.icon.plus::after {
  transform: rotate(90deg);
}

.icon.close::before {
  transform: rotate(45deg);
}

.icon.close::after {
  transform: rotate(-45deg);
}

.icon.circle::before {
  content: "";
  position: absolute;
  inset: .16rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon.circle::after {
  content: "";
  position: absolute;
  right: .02rem;
  bottom: .04rem;
  width: .48rem;
  height: .48rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--panel);
}

.icon.user::before {
  content: "";
  position: absolute;
  left: .39rem;
  top: .13rem;
  width: .48rem;
  height: .48rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon.user::after {
  content: "";
  position: absolute;
  left: .22rem;
  bottom: .13rem;
  width: .82rem;
  height: .46rem;
  border: 2px solid currentColor;
  border-radius: 999px 999px 0 0;
  border-bottom: 0;
}

.icon.bookmark::before {
  content: "";
  position: absolute;
  inset: .12rem .28rem .08rem;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: .12rem .12rem 0 0;
}

.icon.bookmark::after {
  content: "";
  position: absolute;
  left: .36rem;
  right: .36rem;
  bottom: .08rem;
  height: .58rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.icon.check::before {
  content: "";
  position: absolute;
  left: .25rem;
  top: .45rem;
  width: .7rem;
  height: .35rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.tabbar {
  display: none;
}

.composer {
  width: min(44rem, calc(100vw - 1.25rem));
  max-height: min(calc(var(--app-vh) * 90), 56rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 0;
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, .34);
  overflow: hidden;
}

.composer::backdrop {
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(12px);
}

.composer form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(calc(var(--app-vh) * 90), 56rem);
  overflow: hidden;
}

.composer-head {
  z-index: 2;
  padding: 1.15rem 1.2rem 1rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--teal) 18%, transparent), transparent 16rem),
    color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(18px);
}

.composer-scroll {
  display: grid;
  gap: .85rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem;
}

.composer-head h2 {
  font-size: clamp(1.7rem, 5vw, 2.35rem);
}

.composer-subtitle {
  max-width: 28rem;
  margin: .35rem 0 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: .92rem;
}

.composer label span,
.composer legend {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.composer-field {
  display: grid;
  gap: .35rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card-soft-bg) 82%, transparent);
}

.composer-field small {
  color: var(--muted);
  line-height: 1.35;
  font-size: .78rem;
}

.checkbox-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .35rem .6rem;
}

.checkbox-field input {
  grid-row: 1 / span 2;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--teal);
}

.checkbox-field span,
.checkbox-field small {
  margin: 0;
}

.hero-field input {
  min-height: 3.7rem;
  font-size: 1.3rem;
  font-weight: 850;
}

.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: .75rem;
}

.optional-composer-section {
  display: grid;
  gap: .75rem;
  padding: .72rem;
  border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--line));
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 9%, transparent), transparent 60%),
    color-mix(in srgb, var(--card-soft-bg) 88%, transparent);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  touch-action: pan-y;
}

.optional-composer-section.is-swipe-peeking {
  transform: translateX(-.8rem) scale(.985);
}

.optional-composer-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  border: 0;
  border-radius: 999px;
  padding: .58rem .72rem;
  color: var(--text);
  background: color-mix(in srgb, var(--input-bg) 88%, var(--teal));
  text-align: left;
  cursor: pointer;
}

.optional-composer-toggle strong,
.optional-composer-toggle small {
  display: block;
}

.optional-composer-toggle strong {
  font-size: .9rem;
  font-weight: 900;
}

.optional-composer-toggle small {
  margin-top: .08rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.optional-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1;
}

.optional-composer-section:not(.is-collapsed) .optional-icon {
  background: var(--coral);
}

.optional-composer-section:not(.is-collapsed) .optional-icon::before {
  content: "";
  width: .8rem;
  height: .16rem;
  border-radius: 999px;
  background: currentColor;
}

.optional-composer-section:not(.is-collapsed) .optional-icon {
  font-size: 0;
}

.optional-composer-content {
  display: grid;
  gap: .75rem;
  min-width: 0;
}

.optional-composer-section.is-collapsed {
  justify-self: start;
  width: min(100%, 18rem);
  padding: .28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-soft-bg) 80%, transparent);
}

.optional-composer-section.is-collapsed .optional-composer-content {
  display: none;
}

.optional-composer-section.is-collapsed .optional-composer-toggle {
  padding: .45rem .68rem .45rem .48rem;
}

.upload-field {
  border: 1px dashed color-mix(in srgb, var(--teal) 48%, var(--line));
  border-radius: 20px;
  background: rgba(47, 208, 180, .07);
}

.upload-field input[type="file"] {
  min-height: 3rem;
  border-style: dashed;
  background: color-mix(in srgb, var(--panel) 86%, var(--teal));
}

.camera-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.post-camera-panel {
  display: grid;
  gap: .7rem;
  padding: .75rem;
  border: 1px solid color-mix(in srgb, var(--teal) 34%, var(--line));
  border-radius: 22px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.post-camera-panel video {
  width: 100%;
  max-height: 22rem;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #050809;
  object-fit: cover;
}

.captured-photo-strip {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding-bottom: .15rem;
}

.captured-photo-tile {
  position: relative;
  flex: 0 0 5.2rem;
  width: 5.2rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.captured-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captured-photo-tile button {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  font-weight: 950;
  cursor: pointer;
}

.captured-photo-tile button[data-remove-captured-photo] {
  top: .28rem;
  right: .28rem;
  width: 1.55rem;
  aspect-ratio: 1;
  border-radius: 50%;
}

.captured-photo-tile button[data-edit-captured-photo] {
  right: .28rem;
  bottom: .28rem;
  left: .28rem;
  min-height: 1.35rem;
  border-radius: 999px;
  font-size: .66rem;
}

.image-editor {
  width: min(38rem, calc(100vw - 1rem));
}

.image-editor-body {
  display: grid;
  gap: .9rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.image-editor-preview {
  display: grid;
  place-items: center;
  min-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #050809;
}

.image-editor-preview img {
  max-width: 100%;
  max-height: 54vh;
  object-fit: contain;
  transition: filter .18s ease, transform .18s ease;
}

.image-editor-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.image-editor-controls .camera-actions {
  grid-column: 1 / -1;
}

.location-editor {
  display: grid;
  gap: .8rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-soft-bg);
}

.rating-panel {
  display: grid;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid color-mix(in srgb, var(--teal) 38%, var(--line));
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 12%, transparent), transparent 52%),
    var(--card-soft-bg);
}

.rating-panel h3 {
  margin: .12rem 0 0;
}

.rating-panel .composer-field {
  padding: 0;
  border: 0;
  background: transparent;
}

.rating-select-field select {
  min-height: 3.4rem;
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
  font-size: 1.12rem;
  font-weight: 900;
}

.location-editor h3 {
  margin: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  font-weight: 800;
}

.check-row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--teal);
}

.exact-location-fields {
  display: grid;
  gap: .65rem;
}

.exact-location-fields.is-disabled {
  display: none;
}

.drop-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .6rem;
  align-items: center;
}

.location-status {
  min-height: 1.2rem;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.composer textarea {
  min-height: 7rem;
  resize: vertical;
}

.composer fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}

.scale-grid label {
  display: block;
}

.scale-grid input {
  position: absolute;
  opacity: 0;
}

.scale-grid label span {
  display: grid;
  place-items: center;
  min-height: 2.8rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--input-bg);
  font-weight: 850;
}

.scale-grid input:checked + span {
  border-color: var(--teal);
  background: rgba(47, 208, 180, .14);
  color: var(--teal);
}

.compact-scale-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: .9rem 1.1rem calc(1rem + var(--device-bottom-pad));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(18px);
}

.composer-actions .primary-button,
.composer-actions .ghost-button {
  min-width: 8rem;
}

.top10-gate {
  width: min(36rem, calc(100vw - 1rem));
  max-height: min(calc(var(--app-vh) * 92), 44rem);
}

.top10-gate form {
  max-height: min(calc(var(--app-vh) * 92), 44rem);
}

.top10-gate .composer-head {
  padding-bottom: .75rem;
}

.top10-gate .composer-head h2 {
  font-size: clamp(1.45rem, 7vw, 2rem);
}

.top10-gate-scroll {
  gap: .75rem;
  padding: .85rem;
}

.top10-gate .composer-subtitle {
  margin: 0;
}

.top10-gate .top10-signup-grid {
  gap: .5rem;
}

.top10-gate .top10-signup-grid label {
  display: grid;
  gap: .28rem;
}

.top10-gate .top10-signup-grid span {
  margin: 0;
  font-size: .78rem;
}

.top10-gate .top10-signup-grid input {
  min-height: 2.65rem;
  padding: .65rem .75rem;
}

.top10-gate .composer-actions {
  position: sticky;
  bottom: 0;
  padding: .75rem .85rem calc(.85rem + env(safe-area-inset-bottom));
}

.top10-gate .composer-actions .primary-button {
  width: 100%;
}

.logout-button {
  justify-content: center;
  width: 100%;
  margin-top: .25rem;
  border-color: color-mix(in srgb, #ff7b7b 46%, var(--line));
  color: #ff9a9a;
}

@media (max-width: 820px) {
  .image-editor-controls {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    display: block;
    min-height: calc(var(--app-vh) * 100);
  }

  .auth-media {
    min-height: 15rem;
    height: calc(var(--app-vh) * 32);
  }

  .auth-media::after {
    background: linear-gradient(180deg, rgba(16, 19, 22, .05), var(--bg));
  }

  .auth-panel {
    min-height: auto;
    padding: calc(1rem + var(--device-top-pad)) 1rem calc(2rem + var(--device-bottom-pad));
  }

  .auth-brand {
    margin-bottom: 1.5rem;
  }

  .auth-panel h1 {
    font-size: 2.65rem;
  }

  .auth-info-grid {
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .app {
    display: block;
    min-height: auto;
    overflow: visible;
  }

  .rail {
    display: none;
  }

  main {
    padding: calc(1rem + var(--device-top-pad)) 1rem calc(6.25rem + var(--device-bottom-pad));
    min-height: auto;
    overflow: visible;
  }

  .topbar {
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    align-items: center;
    text-align: center;
  }

  .topbar h1 {
    font-size: 2.45rem;
  }

  .ranking-card {
    max-width: 100%;
  }

  .poster {
    min-height: 22rem;
  }

  .rank-photo {
    max-height: calc(var(--app-vh) * 70);
  }

  .composer {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(var(--app-vh) * 92);
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .composer form {
    max-height: calc(var(--app-vh) * 92);
  }

  .composer-scroll {
    padding-bottom: 1.1rem;
  }

  .ranking-card h3 {
    font-size: 1.12rem;
  }

  .review {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .grid-list {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .message-layout {
    position: relative;
    display: block;
    min-height: calc((var(--app-vh) * 100) - 8rem - var(--device-top-pad));
    border-radius: 20px;
  }

  .thread-panel {
    height: calc((var(--app-vh) * 100) - 8rem - var(--device-top-pad));
    border-right: 0;
  }

  .message-panel {
    position: absolute;
    inset: 0;
    grid-template-rows: minmax(20rem, 1fr) auto;
    transform: translateX(100%);
    transition: transform .22s ease;
  }

  .message-layout.chat-open .message-panel {
    transform: translateX(0);
  }

  .message-layout.chat-open .thread-panel {
    visibility: hidden;
  }

  .dm-back {
    display: inline-grid;
  }

  .settings-grid,
  .badge-grid,
  .cosmetic-grid {
    grid-template-columns: 1fr;
  }

  .points-panel,
  .referral-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-activity-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .admin-user-actions label,
  .admin-user-actions input {
    flex: 1;
    width: 100%;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: .55rem max(.75rem, env(safe-area-inset-left)) calc(.55rem + var(--device-bottom-pad)) max(.75rem, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: var(--tab-bg);
    backdrop-filter: blur(18px);
  }

  .tab-item {
    display: grid;
    place-items: center;
    min-height: 2.6rem;
    color: var(--muted);
  }

  .tab-item.active {
    color: var(--teal);
  }

  .tab-item.raised {
    justify-self: center;
    width: 3rem;
    border-radius: 50%;
    background: var(--teal);
    color: #07110f;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .topbar h1 {
    font-size: 1.65rem;
  }

  main {
    padding-top: calc(.7rem + var(--device-top-pad));
  }

  .composer {
    max-height: calc(var(--app-vh) * 96);
  }

  .composer form {
    max-height: calc(var(--app-vh) * 96);
  }

  .composer-head {
    padding-block: .7rem;
  }
}

@media (max-width: 520px) {
  .topbar h1 {
    font-size: 2rem;
  }

  .ranking-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .poster {
    min-height: 20rem;
  }

  .rank-photo {
    max-height: calc(var(--app-vh) * 68);
  }

  .meta-row {
    display: block;
  }

  .score {
    min-width: 3.2rem;
    min-height: 2.5rem;
    font-size: 1.25rem;
  }

  .score.stars {
    min-width: 5.8rem;
    font-size: 1rem;
  }

  .scale-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .composer-grid {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 .22rem;
    padding-bottom: .56rem;
  }

  .home-shortcuts .chip,
  .feed-controls .chip,
  .activity-tabs .chip,
  .map-location-strip .chip {
    min-height: 2.25rem;
    padding-right: .22rem;
    padding-left: .22rem;
    font-size: .76rem;
  }

  .home-shortcuts .chip:nth-child(n + 4),
  .feed-controls .chip:nth-child(n + 4),
  .activity-tabs .chip:nth-child(n + 4),
  .map-location-strip .chip:nth-child(n + 4) {
    min-height: 2.25rem;
    margin-top: -.66rem;
    padding-top: .45rem;
    padding-bottom: .45rem;
  }

  .home-shortcuts .chip:nth-child(n + 4) {
    z-index: 6;
  }

  .home-shortcuts .chip:nth-child(-n + 3) {
    z-index: 1;
  }

  .home-shortcuts .chip:nth-child(n + 4).active {
    z-index: 7;
  }

  body[data-nav-layout="ergonomic"] .home-shortcuts {
    display: flex;
    grid-template-columns: none;
    gap: .42rem;
    padding-bottom: .72rem;
  }

  body[data-nav-layout="ergonomic"] .home-shortcuts .chip,
  body[data-nav-layout="ergonomic"] .feed-controls .chip,
  body[data-nav-layout="ergonomic"] .activity-tabs .chip,
  body[data-nav-layout="ergonomic"] .map-location-strip .chip,
  body[data-nav-layout="ergonomic"] .home-shortcuts .chip:nth-child(n + 4),
  body[data-nav-layout="ergonomic"] .feed-controls .chip:nth-child(n + 4),
  body[data-nav-layout="ergonomic"] .activity-tabs .chip:nth-child(n + 4),
  body[data-nav-layout="ergonomic"] .map-location-strip .chip:nth-child(n + 4) {
    min-height: 2.25rem;
    margin-top: 0;
    padding: .45rem .72rem;
    font-size: .76rem;
  }

  .top-three-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .28rem;
  }

  .top-three-card .profile-tile,
  .top-three-card .profile-tile img,
  .top-three-card .tile-fallback {
    min-height: 5.2rem;
  }

  .top-three-user-card {
    min-height: 5.6rem;
    padding-right: .35rem;
    padding-left: .35rem;
  }

  .top-three-card .tile-score {
    top: .25rem;
    right: .25rem;
    min-width: 1.75rem;
    min-height: 1.75rem;
    font-size: .75rem;
  }

  .top-three-rank {
    width: 1.45rem;
    font-size: .72rem;
  }

  .profile-tile,
  .profile-tile img,
  .tile-fallback {
    min-height: 6.5rem;
  }

  .tile-overlay {
    inset: auto .35rem .35rem .35rem;
    padding: .35rem .4rem;
  }

  .composer-actions {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
  }

  .composer-actions .primary-button,
  .composer-actions .ghost-button {
    width: 100%;
    min-width: 0;
  }

  .drop-row {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-columns: 1fr;
  }

  .item-score {
    place-self: start;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats div:last-child {
    border-bottom: 0;
  }
}
