/* Constants */

:root {
    --icon-size: 24px;
    --primary-color: #00ffea;
    --peer-width: 120px;
    color-scheme: light dark;
}

/* Layout */

html {
    height: 100%;
}

html,
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
    /* background-color: #ff9d00;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' version='1.1' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:svgjs='http://svgjs.com/svgjs' width='1440' height='560' preserveAspectRatio='none' viewBox='0 0 1440 560'%3e%3cg mask='url(%26quot%3b%23SvgjsMask1008%26quot%3b)' fill='none'%3e%3crect width='1440' height='560' x='0' y='0' fill='%230e2a47'%3e%3c/rect%3e%3cuse xlink:href='%23SvgjsSymbol1015' x='0' y='0'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsSymbol1015' x='720' y='0'%3e%3c/use%3e%3c/g%3e%3cdefs%3e%3cmask id='SvgjsMask1008'%3e%3crect width='1440' height='560' fill='white'%3e%3c/rect%3e%3c/mask%3e%3cpath d='M-1 0 a1 1 0 1 0 2 0 a1 1 0 1 0 -2 0z' id='SvgjsPath1009'%3e%3c/path%3e%3cpath d='M-3 0 a3 3 0 1 0 6 0 a3 3 0 1 0 -6 0z' id='SvgjsPath1014'%3e%3c/path%3e%3cpath d='M-5 0 a5 5 0 1 0 10 0 a5 5 0 1 0 -10 0z' id='SvgjsPath1012'%3e%3c/path%3e%3cpath d='M2 -2 L-2 2z' id='SvgjsPath1011'%3e%3c/path%3e%3cpath d='M6 -6 L-6 6z' id='SvgjsPath1010'%3e%3c/path%3e%3cpath d='M30 -30 L-30 30z' id='SvgjsPath1013'%3e%3c/path%3e%3c/defs%3e%3csymbol id='SvgjsSymbol1015'%3e%3cuse xlink:href='%23SvgjsPath1009' x='30' y='30' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='30' y='90' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='30' y='150' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='30' y='210' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='30' y='270' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='30' y='330' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='30' y='390' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='30' y='450' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='30' y='510' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='30' y='570' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1013' x='90' y='30' stroke='rgba(24%2c 211%2c 213%2c 1)' stroke-width='3'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='90' y='90' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='90' y='150' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='90' y='210' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='90' y='270' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='90' y='330' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='90' y='390' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='90' y='450' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='90' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='90' y='570' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='150' y='30' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='150' y='90' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='150' y='150' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='150' y='210' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='150' y='270' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='150' y='330' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='150' y='390' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='150' y='450' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='150' y='510' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='150' y='570' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='210' y='30' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='210' y='90' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='210' y='150' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1013' x='210' y='210' stroke='rgba(136%2c 143%2c 224%2c 1)' stroke-width='3'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='210' y='270' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='210' y='330' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='210' y='390' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='210' y='450' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='210' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='210' y='570' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='30' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='270' y='90' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='270' y='150' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='210' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='270' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='330' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='390' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='270' y='450' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='270' y='570' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='330' y='30' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='330' y='90' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='330' y='150' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1013' x='330' y='210' stroke='%231c538e' stroke-width='3'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='330' y='270' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='330' y='330' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='330' y='390' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='330' y='450' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='330' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='330' y='570' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='390' y='30' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='390' y='90' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='390' y='150' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='390' y='210' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='390' y='270' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='390' y='330' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='390' y='390' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='390' y='450' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='390' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='390' y='570' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='450' y='30' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='450' y='90' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='450' y='150' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='450' y='210' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='450' y='270' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='450' y='330' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='450' y='390' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='450' y='450' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='450' y='510' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='450' y='570' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='510' y='30' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1013' x='510' y='90' stroke='rgba(24%2c 211%2c 213%2c 1)' stroke-width='3'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='510' y='150' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='510' y='210' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='510' y='270' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='510' y='330' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='510' y='390' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='510' y='450' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='510' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1013' x='510' y='570' stroke='rgba(24%2c 211%2c 213%2c 1)' stroke-width='3'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='570' y='30' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='570' y='90' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='570' y='150' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='570' y='210' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='570' y='270' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='570' y='330' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='570' y='390' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='570' y='450' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='570' y='510' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='570' y='570' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='630' y='30' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='630' y='90' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='630' y='150' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='630' y='210' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='630' y='270' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='630' y='330' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='630' y='390' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='630' y='450' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='630' y='510' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='630' y='570' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='690' y='30' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='690' y='90' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1013' x='690' y='150' stroke='%231c538e' stroke-width='3'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1011' x='690' y='210' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1010' x='690' y='270' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1014' x='690' y='330' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='690' y='390' stroke='rgba(24%2c 211%2c 213%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='690' y='450' stroke='%231c538e'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1009' x='690' y='510' stroke='rgba(136%2c 143%2c 224%2c 1)'%3e%3c/use%3e%3cuse xlink:href='%23SvgjsPath1012' x='690' y='570' stroke='%231c538e'%3e%3c/use%3e%3c/symbol%3e%3c/svg%3e");
    background-attachment: fixed; */
    background: transparent;
    background-size: cover;
}

body {
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    overflow-y: hidden;
}

.row-reverse {
    display: flex;
    flex-direction: row-reverse;
}

.row {
    display: flex;
    flex-direction: row;
}

.column {
    display: flex;
    flex-direction: column;
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grow {
    flex-grow: 1;
}

.full {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}


/* Typography */

body {
    font-family: -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    font-size: 34px;
    font-weight: 400;
    letter-spacing: -.01em;
    line-height: 40px;
    margin: 8px 0 0;

}

h2 {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -.012em;
    line-height: 32px;
    margin-top: 50px;
}

h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 16px 0;
}

.font-subheading {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    overflow: hidden;
    word-wrap: break-word;
}

.font-body1,
body {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.font-body2 {
    font-size: 12px;
    line-height: 18px;
}

a {
    text-decoration: none;
    color: currentColor;
    cursor: pointer;
}



/* Icons */

.icon {
    width: var(--icon-size);
    height: var(--icon-size);
    fill: currentColor;
}



/* Shadows */

[shadow="1"] {
    box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12),
        0 3px 3px -2px rgba(0, 0, 0, 0.4);
}

[shadow="2"] {
    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
        0 1px 10px 0 rgba(0, 0, 0, 0.12),
        0 2px 4px -1px rgba(0, 0, 0, 0.4);
}




/* Animations */

@keyframes fade-in {
    0% {
        opacity: 0;
    }
}

/* Main Header */

body>header a {
    margin-left: 8px;
}

/* Peers List */

x-peers {
    width: 100%;
    overflow: hidden;
    flex-flow: row wrap;
    z-index: 2;
}

/* Empty Peers List */

x-no-peers {
    padding: 8px;
    text-align: center;
    /* prevent flickering on load */
    animation: fade-in 300ms;
    animation-delay: 500ms;
    animation-fill-mode: backwards;
}

x-no-peers h2,
x-no-peers a {
    color: var(--primary-color);
}

x-peers:not(:empty)+x-no-peers {
    display: none;
}



/* Peer */

x-peer {
    -webkit-user-select: none;
    user-select: none;
}

x-peer label {
    width: var(--peer-width);
    padding: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    position: relative;
}

x-peer .name {
    width: var(--peer-width);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

input[type="file"] {
    visibility: hidden;
    position: absolute;
}

x-peer x-icon {
    --icon-size: 40px;
    width: var(--icon-size);
    padding: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    margin-bottom: 8px;
    transition: transform 150ms;
    will-change: transform;
}

x-peer:not([transfer]):hover x-icon,
x-peer:not([transfer]):focus x-icon {
    transform: scale(1.05);
}

x-peer[transfer] x-icon {
    box-shadow: none;
    opacity: 0.8;
    transform: scale(1);
}

.status,
.device-name {
    height: 18px;
    opacity: 0.7;
}

x-peer[transfer] .status:before {
    content: 'Transferring...';
}

x-peer:not([transfer]) .status,
x-peer[transfer] .device-name {
    display: none;
}

x-peer x-icon {
    animation: pop 600ms ease-out 1;
}

@keyframes pop {
    0% {
        transform: scale(0.7);
    }

    40% {
        transform: scale(1.2);
    }
}

x-peer[drop] x-icon {
    transform: scale(1.1);
}



/* Footer */

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    align-items: center;
    padding: 0 0 16px 0;
    text-align: center;
}

footer .example {
    --icon-size: 80px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

footer .font-body2 {
    color: var(--primary-color);
}

@media (min-height: 800px) {
    footer {
        margin-bottom: 16px;
    }
}


/* Dialog */

x-dialog x-background {
    background: rgba(0, 0, 0, 0.61);
    z-index: 10;
    transition: opacity 300ms;
    will-change: opacity;
    padding: 16px;
}

x-dialog x-paper {
    z-index: 3;
    background: white;
    border-radius: 8px;
    padding: 16px 24px;
    width: 100%;
    border: #00ffea solid 1px;
    max-width: 400px;
    box-sizing: border-box;
    transition: transform 300ms;
    will-change: transform;
}

x-dialog:not([show]) {
    pointer-events: none;
}

x-dialog:not([show]) x-paper {
    transform: scale(0.1);
}

x-dialog:not([show]) x-background {
    opacity: 0;
}

x-dialog .row-reverse>.button {
    margin-top: 16px;
    margin-left: 8px;
}

x-dialog a {
    color: var(--primary-color);
}

/* Receive Dialog */
#receiveDialog .row {
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Receive Text Dialog */

#receiveTextDialog #text {
    width: 100%;
    word-break: break-all;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-user-select: all;
    -moz-user-select: all;
    user-select: all;
    white-space: pre-wrap;
}

#receiveTextDialog #text a {
    cursor: pointer;
}

#receiveTextDialog #text a:hover {
    text-decoration: underline;
}

#receiveTextDialog h3 {
    /* Select the received text when double-clicking the dialog */
    user-select: none;
    pointer-events: none;
}

/* Button */

.button {
    padding: 0 16px;
    box-sizing: border-box;
    min-height: 36px;
    min-width: 100px;
    font-size: 14px;
    line-height: 24px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    background: inherit;
    color: var(--primary-color);
}

.button,
.icon-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    touch-action: manipulation;
    border: none;
    outline: none;
}

.button:before,
.icon-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 300ms;
}

.button:hover:before,
.icon-button:hover:before {
    opacity: 0.1;
}

.button:before {
    border-radius: 8px;
}

.button:focus:before,
.icon-button:focus:before {
    opacity: 0.2;
}



button::-moz-focus-inner {
    border: 0;
}


/* Icon Button */

.icon-button {
    width: 40px;
    height: 40px;
}

.icon-button:before {
    border-radius: 50%;
}



/* Text Input */

.textarea {
    box-sizing: border-box;
    border: none;
    outline: none;
    padding: 16px 24px;
    border-radius: 16px;
    margin: 8px 0;
    font-size: 14px;
    font-family: inherit;
    background: #f1f3f4;
    display: block;
    overflow: auto;
    resize: none;
    min-height: 40px;
    line-height: 16px;
    max-height: 300px;
}


/* Info Animation */

#about {
    color: white;
    z-index: 11;
    overflow: hidden;
    pointer-events: none;
    text-align: center;
}

#about .fade-in {
    transition: opacity 300ms;
    will-change: opacity;
    transition-delay: 300ms;
    z-index: 11;
    pointer-events: all;
}

#about:not(:target) .fade-in {
    opacity: 0;
    pointer-events: none;
    transition-delay: 0;
}

#about .logo {
    --icon-size: 96px;
}

#about x-background {
    position: absolute;
    top: calc(32px - 200px);
    right: calc(32px - 200px);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(-45deg, #08ca63, #e73c7e, #21b1e6, #8318ed);
    transform: scale(0);
    z-index: -1;
}

/* Hack such that initial scale(0) isn't animated */
#about x-background {
    will-change: transform;
    transition: transform 800ms cubic-bezier(0.77, 0, 0.175, 1);
}

#about:target x-background {
    transform: scale(10);
}

#about .row a {
    margin: 8px 8px -16px;
}

/* HOW */

#how {
    color: white;
    z-index: 11;
    overflow: hidden;
    pointer-events: none;
    text-align: center;
}

#how .fade-in {
    transition: opacity 300ms;
    will-change: opacity;
    transition-delay: 300ms;
    z-index: 11;
    pointer-events: all;
}

#how:not(:target) .fade-in {
    opacity: 0;
    pointer-events: none;
    transition-delay: 0;
}

#how .logo {
    --icon-size: 96px;
}

#how x-background {
    position: absolute;
    top: calc(32px - 200px);
    right: calc(32px - 200px);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background-color: #e5e5f7;
    opacity: 0.8;
    background-image: radial-gradient(#000000 0.5px, #000000 0.5px);
    background-size: 10px 10px;
    /* background: linear-gradient(-45deg, #08ca63, #e73c7e, #21b1e6, #8318ed); */
    transform: scale(0);
    z-index: -1;
}

/* Hack such that initial scale(0) isn't animated */
#how x-background {
    will-change: transform;
    transition: transform 800ms cubic-bezier(0.77, 0, 0.175, 1);
}

#how:target x-background {
    transform: scale(10);
}

#how .row a {
    margin: 8px 8px -16px;
}


/* Loading Indicator */

.progress {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 0px;
    clip: rect(0px, 80px, 80px, 40px);
    --progress: rotate(0deg);
    transition: transform 200ms;
}

.circle {
    width: 72px;
    height: 72px;
    border: 4px solid var(--primary-color);
    border-radius: 40px;
    position: absolute;
    clip: rect(0px, 40px, 80px, 0px);
    will-change: transform;
    transform: var(--progress);
}

.over50 {
    clip: rect(auto, auto, auto, auto);
}

.over50 .circle.right {
    transform: rotate(180deg);
}


/* Generic placeholder */
[placeholder]:empty:before {
    content: attr(placeholder);
}

/* Toast */

.toast-container {
    padding: 0 8px 24px;
    overflow: hidden;
    pointer-events: none;
}

x-toast {
    position: absolute;
    min-height: 48px;
    bottom: 24px;
    width: 100%;
    max-width: 344px;
    background-color: #323232;
    color: rgba(255, 255, 255, 0.95);
    align-items: center;
    box-sizing: border-box;
    padding: 8px 24px;
    z-index: 20;
    transition: opacity 200ms, transform 300ms ease-out;
    cursor: default;
    line-height: 24px;
    border-radius: 8px;
    pointer-events: all;
}

x-toast:not([show]):not(:hover) {
    opacity: 0;
    transform: translateY(100px);
}


/* Instructions */

x-instructions {
    position: absolute;
    top: 120px;
    opacity: 0.5;
    transition: opacity 300ms;
    z-index: -1;
    text-align: center;
}

x-instructions:before {
    content: attr(mobile);
}

x-peers:empty~x-instructions {
    opacity: 0;
}


/* Responsive Styles */

@media (min-height: 800px) {
    footer {
        margin-bottom: 16px;
    }
}

@media screen and (min-height: 800px),
screen and (min-width: 1100px) {
    x-instructions:before {
        content: attr(desktop);
    }
}

@media (max-height: 420px) {
    x-instructions {
        top: 24px;
    }

    footer .logo {
        --icon-size: 40px;
    }
}

/* 
    iOS specific styles
*/
@supports (-webkit-overflow-scrolling: touch) {


    html {
        position: fixed;
    }

    x-instructions:before {
        content: attr(mobile);
    }
}

/*
    Color Themes
*/

/* Default colors */
body {
    --text-color: #333;
    --bg-color: #fff;
    --bg-color-secondary: #f1f3f4;
}

/* Dark theme colors */
body.dark-theme {
    --text-color: #eee;
    --bg-color: #121212;
    --bg-color-secondary: #333;
}

/* Colored Elements */
body {
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.5s ease;
}

x-dialog x-paper {
    background-color: transparent;
}

.textarea {
    color: var(--text-color);
    background-color: var(--bg-color-secondary);
}

/* Image Preview */
#img-preview {
    max-width: 100%;
    max-height: 60vh;
    display: block;
    margin: auto;
}

/* QR code */
#qrcode {
    width: 240px;
    height: 240px;
    margin: 10px auto;
    padding: 5px;
    background-color: white;
}

/* Styles for users who prefer dark mode at the OS level */
@media (prefers-color-scheme: dark) {

    /* defaults to dark theme */
    body {
        --text-color: #eee;
        --bg-color: #121212;
        --bg-color-secondary: #333;
    }

    /* Override dark mode with light mode styles if the user decides to swap */
    body.light-theme {
        --text-color: #333;
        --bg-color: #fafafa;
        --bg-color-secondary: #f1f3f4;
    }
}


/* 
    Edge specific styles
*/
@supports (-ms-ime-align: auto) {

    html,
    body {
        overflow: hidden;
    }
}

#warning {
    position: fixed;
    top: 50px;
    left: 0px;
    right: 0px;
    margin: 0px auto;
    padding: 6px;
    background-color: orange;
    color: royalblue;
    font-size: 14px;
    display: none;
}


.example {

    margin-top: 307px;
}

/* =========================
   UI OVERHAUL PATCH (END)
   ========================= */

:root {
    --accent: #00ffea;
    --bg0: #070A12;
    --bg1: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.14);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.62);

    --radius-lg: 20px;
    --shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
    --blur: blur(14px);

    --pad: 16px;
    --maxw: 1100px;
}

html {
    height: 100%;
    background: radial-gradient(1200px 800px at 20% 10%, rgba(0, 255, 234, 0.10), transparent 60%),
        radial-gradient(1000px 700px at 90% 30%, rgba(136, 143, 224, 0.12), transparent 55%),
        linear-gradient(180deg, #060813, #04060c);
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    background: transparent !important;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Remove layout hacks from older CSS */
.example {
    margin-top: 0 !important;
}

/* content spacing so header/footer don't overlap */
x-peers,
x-no-peers {
    width: min(var(--maxw), calc(100% - 2*var(--pad)));
    margin: 96px auto 160px;
}

/* Top bar */
body>header {
    position: fixed !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(980px, calc(100% - 48px)) !important;
    height: 52px;
    margin: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 8px !important;
    z-index: 30;
}

/* Icon buttons */
.icon-button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.icon-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Peers grid */
x-peers {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* Peer card */
x-peer label {
    width: 100% !important;
    padding: 16px !important;
    border-radius: var(--radius-lg) !important;
    background: var(--bg1) !important;
    border: 1px solid var(--stroke) !important;
    box-shadow: var(--shadow-sm) !important;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

x-peer label:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 234, 0.22);
    background: rgba(255, 255, 255, 0.075);
}

x-peer x-icon {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px;
    border-radius: 50% !important;
    margin: 0 !important;
    background: linear-gradient(180deg, #dff9f8 0%, #c9f4ef 100%) !important;
    color: #2d6f6d !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

x-peer .name {
    width: 100% !important;
    text-align: left !important;
    font-size: 15px !important;
    font-weight: 650 !important;
}

x-peer .device-name {
    width: 100% !important;
    text-align: left !important;
    color: var(--muted) !important;
}

/* Bottom dock */
footer#dock {
    position: fixed !important;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--maxw), calc(100% - 2*var(--pad)));
    border-radius: var(--radius-lg);
    background: var(--bg1);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    padding: 14px 16px !important;
    z-index: 50;
    text-align: left !important;
}

/* Display name input */
#display-name {
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(24, 32, 51, 0.05);
    min-width: 150px;
    color: #1b2236;
    outline: none;
}

#edit-pen {
    cursor: pointer;
    opacity: 0.7;
    margin-left: 8px;
}

/* Dialog surfaces */
x-dialog x-background {
    background: rgba(0, 0, 0, 0.62) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

x-dialog x-paper {
    background: rgba(10, 12, 20, 0.86) !important;
    color: var(--text) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow) !important;
}

/* ===== Fix: peers should not stretch full width when only 1-2 peers ===== */

x-peers {
    /* Make cards stay compact */
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px)) !important;

    /* Center the whole grid */
    justify-content: center !important;

    /* Center each item */
    justify-items: center !important;
}

/* Keep peer cards compact */
x-peer label {
    max-width: 280px !important;
    min-height: 140px !important;
}

/* ===== Fix: footer dock should be a compact row layout ===== */

footer#dock {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;

    padding: 12px 14px !important;
    gap: 14px !important;
}

/* Put the text nicely */
footer#dock>div {
    text-align: left !important;
}

/* Make the description smaller and not push height */
footer#dock .font-body2 {
    margin-top: 2px !important;
    max-width: 520px;
    color: rgba(0, 255, 234, 0.75) !important;
}

/* Join button look better */
#openJoin.button {
    min-width: 112px !important;
    height: 42px !important;
    border-radius: 13px !important;
    background: rgba(180, 240, 227, 0.72) !important;
    border: none !important;
    color: #32b79c !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}

#openJoin.button:hover {
    background: rgba(0, 255, 234, 0.18) !important;
}

/* =========================
   Peer connect animations
   ========================= */

@keyframes peerIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes peerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 234, 0.35);
    }

    70% {
        box-shadow: 0 0 0 18px rgba(0, 255, 234, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 234, 0);
    }
}

@keyframes peerConnectedGlow {
    0% {
        transform: translateY(0);
        border-color: rgba(255, 255, 255, 0.14);
    }

    50% {
        transform: translateY(-2px);
        border-color: rgba(0, 255, 234, 0.35);
    }

    100% {
        transform: translateY(0);
        border-color: rgba(0, 255, 234, 0.22);
    }
}

/* When a peer element is inserted */
x-peer.is-new label {
    animation: peerIn 220ms ease-out both;
}

/* A nice ring pulse on the icon */
x-peer.is-new x-icon {
    position: relative;
}

x-peer.is-new x-icon::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 18px;
    border: 1px solid rgba(0, 255, 234, 0.28);
    animation: peerPulse 800ms ease-out 1;
}

/* When a peer is connected */
x-peer.is-connected label {
    animation: peerConnectedGlow 650ms ease-out 1;
}

/* Optional: animate removal */
x-peer.is-leaving {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 180ms ease, transform 180ms ease;
}

/* =========================
   PORTAL WARP CONNECT FX
   ========================= */

@keyframes portalOpen {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.35);
        filter: blur(2px);
    }

    25% {
        opacity: 1;
        filter: blur(0);
    }

    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.6);
    }
}

@keyframes portalRings {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 0.9;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.0) rotate(220deg);
    }
}

@keyframes cardLockIn {
    0% {
        transform: translateY(6px) scale(0.98);
    }

    45% {
        transform: translateY(-2px) scale(1.01);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Make label a positioning context */
x-peer label {
    position: relative;
    overflow: hidden;
}

/* Portal layer (we'll add this element in HTML) */
x-peer .portal-fx {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%) scale(0.6);
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
}

/* The portal glow disk */
x-peer .portal-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%,
            rgba(0, 255, 234, 0.45),
            rgba(136, 143, 224, 0.28) 45%,
            rgba(0, 0, 0, 0) 70%);
    mix-blend-mode: screen;
    box-shadow: 0 0 45px rgba(0, 255, 234, 0.18);
}

/* The rotating rings */
x-peer .portal-fx::after {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 999px;
    background:
        conic-gradient(from 90deg,
            rgba(0, 255, 234, 0.0),
            rgba(0, 255, 234, 0.65),
            rgba(136, 143, 224, 0.0),
            rgba(136, 143, 224, 0.55),
            rgba(0, 255, 234, 0.0));
    mask: radial-gradient(circle, transparent 52%, black 58%, black 72%, transparent 78%);
    -webkit-mask: radial-gradient(circle, transparent 52%, black 58%, black 72%, transparent 78%);
    mix-blend-mode: screen;
    opacity: 0.95;
}

/* When triggered */
x-peer.portal-on .portal-fx {
    opacity: 1;
    animation: portalOpen 900ms ease-out 1;
}

x-peer.portal-on .portal-fx::after {
    animation: portalRings 900ms ease-out 1;
}

/* Make card feel like it locks in */
x-peer.portal-on label {
    animation: cardLockIn 520ms cubic-bezier(0.2, 0.9, 0.2, 1) 1;
    border-color: rgba(0, 255, 234, 0.22) !important;
}

/* =========================
   Spline background layer
   ========================= */
#spline-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    /* behind everything */
    pointer-events: none;
    /* important: don't block clicks */
    overflow: hidden;
}

#spline-bg spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.05);
    /* slight zoom feels better */
    opacity: 0.95;
}

/* Optional: add a dark overlay so UI text remains readable */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 30% 20%, rgba(0, 255, 234, 0.08), rgba(0, 0, 0, 0.55) 60%);
    pointer-events: none;
}

/* =========================
   Discovery mockup layout
   ========================= */

body {
    background: #f4f4f7 !important;
    color: #182033 !important;
    overflow-y: auto !important;
}

body::before,
#spline-bg {
    display: none !important;
}

/* Top bar */
body>header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: min(920px, calc(100% - 32px)) !important;
    margin: 18px auto 0 !important;
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(24, 32, 51, 0.08) !important;
    box-shadow: 0 10px 30px rgba(27, 39, 78, 0.08) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: flex-start !important;
}

/* Main discovery panel */
#discovery-shell {
    width: 100%;
    height: 100vh;
    margin: 0;
    background: transparent;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 110px 24px 120px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Radar area */
#radar-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Rings */
.radar-ring {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    border-radius: 50%;

    border: 2px solid rgba(108, 91, 255, 0.18);

    pointer-events: none;
}

.ring-1 {
    width: 240px;
    height: 240px;
}

.ring-2 {
    width: 540px;
    height: 540px;
}

.ring-3 {
    width: 920px;
    height: 920px;
}

.ring-4 {
    width: 1500px;
    height: 1500px;
}

/* Center hub */
#radar-center {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(108, 91, 255, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

#radar-center-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(180deg, #7b6bff 0%, #5f4dff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 24px rgba(108, 91, 255, 0.22);
}

.radar-logo {
    width: 28px;
    height: 28px;
}

/* Peer orbit layer */
#peer-orbit {
    position: absolute !important;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    z-index: 5;
}

/* Individual peer becomes floating card */
x-peer {
    position: absolute;
    animation: peerFloatIn 350ms ease-out;
}

@keyframes peerFloatIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

x-peer label {
    width: 205px !important;
    min-height: 76px !important;
    border-radius: 18px !important;
    padding: 12px 14px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(24, 32, 51, 0.05) !important;
    box-shadow: 0 12px 24px rgba(27, 39, 78, 0.10) !important;

    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Icon avatar bubble */
x-peer x-icon {
    grid-row: 1 / span 2;
    grid-column: 1;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px;
    border-radius: 50% !important;
    margin: 0 !important;
    background: linear-gradient(180deg, #dff9f8 0%, #c9f4ef 100%) !important;
    color: #226b69 !important;
    border: none !important;
    box-shadow: inset 0 0 0 1px rgba(24, 32, 51, 0.04);
}

x-peer .name {
    width: auto !important;
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1c2436 !important;
    line-height: 1.15;
    margin: 0 !important;
}

x-peer .device-name {
    display: none !important;
}

x-peer .status {
    display: block !important;
    height: auto !important;
    opacity: 1 !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 4px;
}

x-peer .peer-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Status colors */
x-peer[data-state="available"] .status {
    color: #30b68b;
}

x-peer[data-state="connected"] .status {
    color: #7d8aa6;
}

x-peer[data-state="pending"] .status {
    color: #e39d2d;
}

x-peer[data-state="transferring"] .status {
    color: #6c5bff;
}

/* Copy area */
#discovery-copy {
    position: absolute;
    left: 50%;
    top: calc(42% + 220px);
    transform: translateX(-50%);
    text-align: center;
    z-index: 4;
}

#discovery-copy h1 {
    margin: 0 0 10px !important;
    font-size: 30px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    color: #1b2236 !important;
}

#discovery-copy p {
    margin: 0;
    font-size: 15px;
    color: #8b95a7;
}

/* Hide old footer dock style and make it minimal */
/* ===== Fully transparent footer ===== */

footer#dock {
    position: fixed !important;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(760px, calc(100% - 64px)) !important;

    margin: 0 !important;
    padding: 10px 14px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;

    z-index: 20 !important;
}

#discovery-copy {
    margin-bottom: 80px;
}

footer#dock>div {
    text-align: left !important;
    flex: 1;
}

footer#dock .font-body2 {
    color: rgba(50, 183, 156, 0.78) !important;
    font-size: 14px;
    line-height: 1.35;
    margin: 0 !important;
    max-width: 330px;
}

/* Hide verbose instructions above */
x-instructions {
    display: none !important;
}

x-no-peers {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    #discovery-shell {
        min-height: 680px;
        padding: 24px 14px 30px;
    }

    #radar-stage {
        height: 420px;
    }

    .ring-1 {
        width: 110px;
        height: 110px;
    }

    .ring-2 {
        width: 210px;
        height: 210px;
    }

    .ring-3 {
        width: 300px;
        height: 300px;
    }

    .ring-4 {
        width: 390px;
        height: 390px;
    }

    x-peer label {
        width: 180px !important;
        min-height: 68px !important;
        padding: 12px 14px !important;
    }

    x-peer x-icon {
        width: 44px !important;
        height: 44px !important;
    }
}

.progress {
    display: none !important;
}

html,
body {
    height: 100%;
    overflow: hidden !important;
}

body {
    background: #f5f5f8 !important;
    color: #182033 !important;
}

/* ===== Final override for top header icon buttons ===== */
body>header .icon-button {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.35) !important;
    border: 1px solid rgba(24, 32, 51, 0.05) !important;
    box-shadow: none !important;
    transition: transform 150ms ease, background 150ms ease !important;
}

body>header .icon-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.55) !important;
}

body>header .icon-button::before {
    display: none !important;
}

/* ===== Final override for header container ===== */
body>header {
    position: fixed !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(980px, calc(100% - 48px)) !important;
    height: 52px !important;
    margin: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 8px !important;
    z-index: 30 !important;
}

/* ===== Final override: clean peer cards on discovery screen ===== */
#peer-orbit x-peer label {
    width: 190px !important;
    min-height: 64px !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;

    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(24, 32, 51, 0.045) !important;
    box-shadow: 0 8px 18px rgba(27, 39, 78, 0.08) !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#peer-orbit x-peer x-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 50% !important;
    margin: 0 !important;

    background: linear-gradient(180deg, #d9f4f1 0%, #c8ece8 100%) !important;
    color: #2e6f6b !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#peer-orbit x-peer x-icon .icon {
    width: 22px !important;
    height: 22px !important;
}

#peer-orbit x-peer .peer-meta {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

#peer-orbit x-peer .name {
    width: auto !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1f2638 !important;
    line-height: 1.15 !important;
    margin: 0 !important;
}

#peer-orbit x-peer .status {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-top: 3px !important;
}

#peer-orbit x-peer[data-state="available"] .status {
    color: #30b68b !important;
    background: rgba(48, 182, 139, 0.10) !important;
}

#peer-orbit x-peer[data-state="connected"] .status {
    color: #6f7d96 !important;
    background: rgba(111, 125, 150, 0.10) !important;
}

#peer-orbit x-peer[data-state="pending"] .status {
    color: #d5942f !important;
    background: rgba(213, 148, 47, 0.10) !important;
}

#peer-orbit x-peer[data-state="transferring"] .status {
    color: #6c5bff !important;
    background: rgba(108, 91, 255, 0.10) !important;
}

#peer-orbit x-peer label:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(27, 39, 78, 0.10) !important;
}

/* ===== Final header position override ===== */
body>header {
    position: fixed !important;
    top: 18px !important;
    right: 26px !important;
    left: auto !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    z-index: 50 !important;
}

body>header .icon-button {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.42) !important;
    border: 1px solid rgba(24, 32, 51, 0.05) !important;
    box-shadow: none !important;
}

body>header .icon-button::before {
    display: none !important;
}

/* ===== Final peer card redesign ===== */
#peer-orbit x-peer label {
    width: 168px !important;
    min-height: 50px !important;
    padding: 8px 10px !important;
    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.60) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 8px 18px rgba(27, 39, 78, 0.06) !important;
    backdrop-filter: blur(10px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(140%) !important;

    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* icon bubble becomes much lighter */
#peer-orbit x-peer x-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    margin: 0 !important;

    background: rgba(184, 235, 228, 0.78) !important;
    color: #2f6f69 !important;
    border: none !important;
    box-shadow: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#peer-orbit x-peer x-icon .icon {
    width: 17px !important;
    height: 17px !important;
}

/* tighter text block */
#peer-orbit x-peer .peer-meta {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
}

#peer-orbit x-peer .name {
    width: auto !important;
    text-align: left !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1f2638 !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* more subtle status */
#peer-orbit x-peer .status {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    margin-top: 3px !important;
    box-shadow: none !important;
}

#peer-orbit x-peer[data-state="available"] .status {
    color: #4db98f !important;
}

#peer-orbit x-peer[data-state="connected"] .status {
    color: #7b86a0 !important;
}

#peer-orbit x-peer[data-state="pending"] .status {
    color: #d6993d !important;
}

#peer-orbit x-peer[data-state="transferring"] .status {
    color: #6c5bff !important;
}

/* premium hover */
#peer-orbit x-peer label:hover {
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 0 10px 24px rgba(27, 39, 78, 0.08) !important;
}

/* subtle ambient float */
@keyframes peerSoftFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-3px);
    }
}

#peer-orbit x-peer {
    animation: peerSoftFloat 3.8s ease-in-out infinite;
}

#peer-orbit x-peer:nth-child(2n) {
    animation-delay: 1.2s;
}

#peer-orbit x-peer:nth-child(3n) {
    animation-delay: 2.1s;
}

/* ===== Animated radar rings ===== */

@keyframes radarPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.985);
        opacity: 0.45;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.015);
        opacity: 0.9;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.985);
        opacity: 0.45;
    }
}

.radar-ring {
    animation: radarPulse 4.8s ease-in-out infinite;
    transform-origin: center;
}

.ring-1 {
    animation-delay: 0s;
}

.ring-2 {
    animation-delay: 0.4s;
}

.ring-3 {
    animation-delay: 0.8s;
}

.ring-4 {
    animation-delay: 1.2s;
}

@keyframes hubGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 91, 255, 0.10);
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        box-shadow: 0 0 0 18px rgba(108, 91, 255, 0.03);
        transform: translate(-50%, -50%) scale(1.035);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 91, 255, 0.10);
        transform: translate(-50%, -50%) scale(1);
    }
}

#radar-center {
    animation: hubGlow 3.2s ease-in-out infinite;
}

@keyframes radarSweepRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#radar-sweep {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 1300px;
    height: 1300px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    opacity: 0.35;
    animation: radarSweepRotate 8s linear infinite;
}

#radar-sweep::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            rgba(108, 91, 255, 0) 0deg,
            rgba(108, 91, 255, 0) 320deg,
            rgba(108, 91, 255, 0.11) 345deg,
            rgba(108, 91, 255, 0.02) 360deg);
}

/* ===================================== */
/* SHAREINGO RADAR RINGS IMPROVEMENT */
/* ===================================== */

/* make rings more visible on white UI */
.radar-ring {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    border-radius: 50%;

    border: 2px solid rgba(108, 91, 255, 0.18);
    box-shadow: 0 0 20px rgba(108, 91, 255, 0.05);

    pointer-events: none;
}

/* depth effect between rings */
.ring-1 {
    opacity: 0.95;
}

.ring-2 {
    opacity: 0.75;
}

.ring-3 {
    opacity: 0.55;
}

.ring-4 {
    opacity: 0.35;
}

/* smoother pulse animation */
@keyframes radarPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.985);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.01);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.985);
        opacity: 0.7;
    }
}

/* apply animation */
.radar-ring {
    animation: radarPulse 4.8s ease-in-out infinite;
}

.ring-1 {
    animation-delay: 0s;
}

.ring-2 {
    animation-delay: 0.4s;
}

.ring-3 {
    animation-delay: 0.8s;
}

.ring-4 {
    animation-delay: 1.2s;
}

#display-name {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(24, 32, 51, 0.06) !important;
}

#openJoin.button {
    background: rgba(180, 240, 227, 0.85) !important;
}

#peer-orbit x-peer label {
    width: 168px !important;
    min-height: 50px !important;
}

#peer-orbit x-peer {
    position: absolute;
    z-index: 5;
}

/* ===================================== */
/* SHAREINGO RESPONSIVE MOBILE FIXES     */
/* ===================================== */

@media (max-width: 768px) {

    html,
    body {
        overflow: hidden !important;
    }

    /* Top-right icons */
    body>header {
        top: 14px !important;
        right: 14px !important;
        gap: 8px !important;
    }

    body>header .icon-button {
        width: 34px !important;
        height: 34px !important;
    }

    /* Discovery text moves up and scales down */
    #discovery-copy {
        position: absolute !important;
        left: 50% !important;
        top: calc(42% + 180px) !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 32px) !important;
        text-align: center !important;
        z-index: 10 !important;
        margin-bottom: 0 !important;
    }

    #discovery-copy h1 {
        font-size: 28px !important;
        line-height: 1.12 !important;
        margin: 0 0 10px !important;
    }

    #discovery-copy p {
        font-size: 13px !important;
        line-height: 1.35 !important;
        max-width: 280px;
        margin: 0 auto !important;
    }

    /* Full-page radar still, but scale rings for mobile */
    .radar-ring {
        top: 38% !important;
    }

    #radar-center {
        top: 38% !important;
        width: 82px !important;
        height: 82px !important;
    }

    #radar-center-inner {
        width: 52px !important;
        height: 52px !important;
    }

    .ring-1 {
        width: 170px !important;
        height: 170px !important;
    }

    .ring-2 {
        width: 320px !important;
        height: 320px !important;
    }

    .ring-3 {
        width: 560px !important;
        height: 560px !important;
    }

    .ring-4 {
        width: 820px !important;
        height: 820px !important;
    }

    /* Peer chip smaller on mobile */
    #peer-orbit x-peer label {
        width: 150px !important;
        min-height: 46px !important;
        padding: 7px 9px !important;
        gap: 7px !important;
    }

    #peer-orbit x-peer x-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    #peer-orbit x-peer x-icon .icon {
        width: 15px !important;
        height: 15px !important;
    }

    #peer-orbit x-peer .name {
        font-size: 11.5px !important;
    }

    #peer-orbit x-peer .status {
        font-size: 10px !important;
        margin-top: 2px !important;
    }

    /* Footer becomes stacked vertically */
    footer#dock {
        width: calc(100% - 24px) !important;
        left: 50% !important;
        bottom: 12px !important;
        transform: translateX(-50%) !important;

        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        align-items: stretch !important;

        padding: 8px 10px !important;
    }

    footer#dock>div {
        width: 100% !important;
        text-align: left !important;
    }

    footer#dock .font-body2 {
        max-width: 100% !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    #display-name {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    #openJoin.button {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
    }
}

@media (max-width: 480px) {
    #discovery-copy {
        top: calc(38% + 150px) !important;
    }

    #discovery-copy h1 {
        font-size: 24px !important;
    }

    #discovery-copy p {
        font-size: 12px !important;
        max-width: 240px !important;
    }

    .ring-1 {
        width: 150px !important;
        height: 150px !important;
    }

    .ring-2 {
        width: 280px !important;
        height: 280px !important;
    }

    .ring-3 {
        width: 470px !important;
        height: 470px !important;
    }

    .ring-4 {
        width: 680px !important;
        height: 680px !important;
    }

    #peer-orbit x-peer label {
        width: 138px !important;
        min-height: 42px !important;
        padding: 6px 8px !important;
    }

    #peer-orbit x-peer .name {
        font-size: 11px !important;
    }

    #peer-orbit x-peer .status {
        font-size: 9.5px !important;
    }
}

/* ===================================== */
/* CLEAN MOBILE LAYOUT OVERRIDE          */
/* ===================================== */

@media (max-width: 768px) {

    html,
    body {
        overflow: hidden !important;
    }

    /* Keep radar full page */
    #discovery-shell {
        height: 100vh !important;
        min-height: 100vh !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    #radar-stage {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Move radar upward on mobile */
    .radar-ring {
        top: 30% !important;
    }

    #radar-center {
        top: 30% !important;
        width: 74px !important;
        height: 74px !important;
    }

    #radar-center-inner {
        width: 46px !important;
        height: 46px !important;
    }

    /* Better mobile ring sizing */
    .ring-1 {
        width: 150px !important;
        height: 150px !important;
    }

    .ring-2 {
        width: 300px !important;
        height: 300px !important;
    }

    .ring-3 {
        width: 520px !important;
        height: 520px !important;
    }

    .ring-4 {
        width: 760px !important;
        height: 760px !important;
    }

    /* Peer chip smaller and cleaner */
    #peer-orbit x-peer label {
        width: 150px !important;
        min-height: 44px !important;
        padding: 7px 10px !important;
        gap: 8px !important;
        border-radius: 999px !important;
    }

    #peer-orbit x-peer x-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    #peer-orbit x-peer x-icon .icon {
        width: 14px !important;
        height: 14px !important;
    }

    #peer-orbit x-peer .name {
        font-size: 11.5px !important;
    }

    #peer-orbit x-peer .status {
        font-size: 10px !important;
        margin-top: 1px !important;
    }

    /* Put heading in a clean fixed zone */
    #discovery-copy {
        position: absolute !important;
        left: 50% !important;
        top: 58% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 32px) !important;
        text-align: center !important;
        margin: 0 !important;
        z-index: 12 !important;
    }

    #discovery-copy h1 {
        margin: 0 0 8px !important;
        font-size: 24px !important;
        line-height: 1.12 !important;
    }

    #discovery-copy p {
        margin: 0 auto !important;
        max-width: 250px !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    /* Footer becomes a clean bottom sheet without visual box */
    footer#dock {
        position: absolute !important;
        left: 16px !important;
        right: 16px !important;
        bottom: 18px !important;
        transform: none !important;
        width: auto !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;

        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        z-index: 20 !important;
    }

    footer#dock>div {
        width: 100% !important;
        text-align: left !important;
    }

    footer#dock .font-body2 {
        font-size: 11px !important;
        line-height: 1.35 !important;
        color: rgba(50, 183, 156, 0.9) !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    #display-name {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        height: 42px !important;
        padding: 10px 12px !important;
        border-radius: 14px !important;
    }

    #openJoin.button {
        width: 100% !important;
        min-width: 0 !important;
        height: 54px !important;
        border-radius: 18px !important;
        font-size: 15px !important;
        letter-spacing: 0.08em !important;
    }
}

@media (max-width: 480px) {
    .radar-ring {
        top: 28% !important;
    }

    #radar-center {
        top: 28% !important;
    }

    #discovery-copy {
        top: 56% !important;
    }

    #discovery-copy h1 {
        font-size: 22px !important;
    }

    #discovery-copy p {
        font-size: 11.5px !important;
        max-width: 220px !important;
    }

    .ring-1 {
        width: 130px !important;
        height: 130px !important;
    }

    .ring-2 {
        width: 250px !important;
        height: 250px !important;
    }

    .ring-3 {
        width: 430px !important;
        height: 430px !important;
    }

    .ring-4 {
        width: 620px !important;
        height: 620px !important;
    }

    #peer-orbit x-peer label {
        width: 138px !important;
        min-height: 42px !important;
        padding: 6px 8px !important;
    }

    body>header {
        top: 12px !important;
        right: 12px !important;
        gap: 8px !important;
    }

    body>header .icon-button {
        width: 34px !important;
        height: 34px !important;
    }
}

/* =============================== */
/* MOBILE UI CLEANUP               */
/* =============================== */

@media (max-width: 768px) {

    /* Center the name section */
    footer#dock>div:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    /* Fix name input size */
    #display-name {
        width: 220px;
        max-width: 80%;
        height: 38px;
        padding: 8px 12px;
        border-radius: 12px;
        margin: 0 auto;
        display: block;
        text-align: left;
    }

    /* Make helper text clean */
    footer#dock .font-body2 {
        font-size: 12px;
        line-height: 1.3;
        text-align: center;
        max-width: 240px;
        margin: 0 auto;
    }

    /* Make JOIN button same width as input */
    #openJoin.button {
        width: 220px;
        height: 48px;
        border-radius: 16px;
        margin: 0 auto;
        display: block;
    }

    /* Optional: softer label text */
    footer#dock label {
        font-size: 11px;
        opacity: 0.7;
    }

}

/* ============================= */
/* MOBILE INLINE NAME EDIT MODE  */
/* ============================= */

@media (max-width: 768px) {

    #display-name {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        padding: 0 !important;
        margin: 0 auto !important;

        display: inline-block !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;

        font-size: 16px !important;
        font-weight: 600 !important;
        text-align: center !important;

        outline: none !important;
    }

    footer#dock>div:first-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
    }

    footer#dock label {
        font-size: 12px !important;
        opacity: 0.7 !important;
    }

}

/* ===================================== */
/* SPECTACULAR TRANSFER FX               */
/* ===================================== */

#peer-orbit x-peer label {
    position: relative;
    overflow: hidden;
}

#peer-orbit x-peer .transfer-fx {
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms ease;
    z-index: 0;
}

#peer-orbit x-peer[transfer] .transfer-fx {
    opacity: 1;
}

/* subtle grid */
#peer-orbit x-peer .transfer-grid {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image:
        linear-gradient(rgba(108, 91, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 91, 255, 0.06) 1px, transparent 1px);
    background-size: 14px 14px;
    opacity: 0.45;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* changing faint numbers in background */
#peer-orbit x-peer .transfer-numbers {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    font-size: 9px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(108, 91, 255, 0.18);
    white-space: pre-wrap;
    padding: 6px 10px;
    overflow: hidden;
    text-align: left;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    filter: blur(0.15px);
}

/* main transfer % */
#peer-orbit x-peer .transfer-percent {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 42px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(108, 91, 255, 0.14);
    color: #6c5bff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;

    box-shadow: 0 0 0 1px rgba(108, 91, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* hide normal status when transfer running */
#peer-orbit x-peer[transfer] .status {
    opacity: 0 !important;
}

/* little pulse during transfer */
@keyframes transferAura {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(108, 91, 255, 0.00),
            0 8px 18px rgba(27, 39, 78, 0.08);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(108, 91, 255, 0.04),
            0 10px 24px rgba(27, 39, 78, 0.10);
    }
}

#peer-orbit x-peer[transfer] label {
    animation: transferAura 1.6s ease-in-out infinite;
    border-color: rgba(108, 91, 255, 0.16) !important;
}

/* mobile tweaks */
@media (max-width: 768px) {
    #peer-orbit x-peer .transfer-numbers {
        font-size: 8px;
        padding: 5px 8px;
    }

    #peer-orbit x-peer .transfer-percent {
        min-width: 36px;
        height: 22px;
        font-size: 10px;
        right: 8px;
    }
}

/* ===================================== */
/* CRAZY TRANSFER FX UPGRADE             */
/* ===================================== */

#peer-orbit x-peer label {
    position: relative;
    overflow: hidden;
}

/* stronger shimmer overlay */
#peer-orbit x-peer .transfer-fx::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -40%;
    width: 55%;
    height: 140%;
    transform: rotate(18deg);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.14) 50%,
            rgba(255, 255, 255, 0) 100%);
    opacity: 0;
}

#peer-orbit x-peer[transfer] .transfer-fx::after {
    animation: transferShimmer 1.4s linear infinite;
    opacity: 1;
}

@keyframes transferShimmer {
    0% {
        left: -45%;
    }

    100% {
        left: 120%;
    }
}

/* percent pill gets more presence */
#peer-orbit x-peer .transfer-percent {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) scale(1);
    transform-origin: center;
    min-width: 42px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(180deg, rgba(118, 100, 255, 0.16), rgba(108, 91, 255, 0.10));
    color: #5e4cff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;

    box-shadow:
        0 0 0 1px rgba(108, 91, 255, 0.08),
        0 0 18px rgba(108, 91, 255, 0.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    z-index: 4;
}

/* pop on every update */
#peer-orbit x-peer .transfer-percent.bump {
    animation: transferBump 220ms ease-out 1;
}

@keyframes transferBump {
    0% {
        transform: translateY(-50%) scale(0.92);
    }

    45% {
        transform: translateY(-50%) scale(1.16);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

/* numeric particles */
#peer-orbit x-peer .transfer-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

#peer-orbit x-peer .num-particle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    color: rgba(108, 91, 255, 0.55);
    white-space: nowrap;
    pointer-events: none;
    animation: numBurst 700ms ease-out forwards;
    text-shadow: 0 0 10px rgba(108, 91, 255, 0.15);
}

@keyframes numBurst {
    0% {
        opacity: 0;
        transform: translateY(-50%) translate(0, 0) scale(0.85);
        filter: blur(1px);
    }

    15% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-50%) translate(var(--dx), var(--dy)) scale(1.1);
        filter: blur(0.5px);
    }
}

/* transfer card aura stronger */
@keyframes transferAuraCrazy {

    0%,
    100% {
        box-shadow:
            0 0 0 0 rgba(108, 91, 255, 0.00),
            0 8px 18px rgba(27, 39, 78, 0.08);
    }

    50% {
        box-shadow:
            0 0 0 8px rgba(108, 91, 255, 0.035),
            0 12px 28px rgba(27, 39, 78, 0.12);
    }
}

#peer-orbit x-peer[transfer] label {
    animation: transferAuraCrazy 1.2s ease-in-out infinite;
    border-color: rgba(108, 91, 255, 0.18) !important;
}

/* optional status fade while transferring */
#peer-orbit x-peer[transfer] .peer-meta {
    opacity: 0.88;
}

@media (max-width: 768px) {
    #peer-orbit x-peer .transfer-percent {
        min-width: 38px;
        height: 22px;
        font-size: 10px;
        right: 8px;
    }

    #peer-orbit x-peer .num-particle {
        font-size: 9px;
    }
}

/* ===================================== */
/* FULL SCREEN TRANSFER DATA BACKGROUND  */
/* ===================================== */

#transfer-bg-fx {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 250ms ease;
    overflow: hidden;
}

body.transfer-active #transfer-bg-fx {
    opacity: 1;
}

/* subtle whole-screen tech grid */
#transfer-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108, 91, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 91, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.22;
    mask-image: radial-gradient(circle at center, black 25%, rgba(0, 0, 0, 0.55) 55%, transparent 88%);
    -webkit-mask-image: radial-gradient(circle at center, black 25%, rgba(0, 0, 0, 0.55) 55%, transparent 88%);
}

/* animated number field across the screen */
#transfer-bg-numbers {
    position: absolute;
    inset: 0;
    padding: 22px 28px;
    box-sizing: border-box;
    white-space: pre-wrap;
    overflow: hidden;

    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    line-height: 1.9;
    letter-spacing: 0.22em;
    font-weight: 700;

    color: rgba(108, 91, 255, 0.12);
    text-shadow: 0 0 18px rgba(108, 91, 255, 0.04);

    opacity: 0.75;
    filter: blur(0.2px);
    user-select: none;
}

/* soft vertical drift so it feels alive */
@keyframes transferBgFloat {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0px);
    }
}

body.transfer-active #transfer-bg-numbers {
    animation: transferBgFloat 4s ease-in-out infinite;
}

@media (max-width: 768px) {
    #transfer-bg-numbers {
        font-size: 12px;
        line-height: 1.8;
        letter-spacing: 0.16em;
        padding: 16px 16px;
        color: rgba(108, 91, 255, 0.10);
    }

    #transfer-bg-grid {
        background-size: 28px 28px;
    }
}

/* ===================================== */
/* FULL-SCREEN TRANSFER BACKGROUND FIX   */
/* ===================================== */

#transfer-bg-fx {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: 3 !important;
}

#transfer-bg-grid,
#transfer-bg-numbers {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* remove any edge fading/masking */
#transfer-bg-grid {
    mask-image: none !important;
    -webkit-mask-image: none !important;
    opacity: 0.18 !important;
}

/* let numbers cover the entire screen */
#transfer-bg-numbers {
    padding: 0 !important;
    white-space: pre !important;
    overflow: hidden !important;
    opacity: 0.78 !important;
}

/* ===================================== */
/* MOBILE DIALOG OVERLAY FIX             */
/* ===================================== */

@media (max-width: 768px) {

    /* Make dialogs always sit above everything */
    x-dialog {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999 !important;
    }

    x-dialog x-background {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999 !important;
        padding: 16px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(8, 10, 18, 0.72) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }

    x-dialog x-paper {
        position: relative !important;
        z-index: 10000 !important;
        width: 100% !important;
        max-width: 360px !important;
        max-height: calc(100vh - 32px) !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
        border-radius: 22px !important;
        padding: 18px 16px !important;
    }

    /* QR should fit mobile nicely */
    #qrcode {
        width: min(240px, 70vw) !important;
        height: min(240px, 70vw) !important;
        margin: 0 auto 14px !important;
        padding: 6px !important;
        box-sizing: border-box !important;
        background: white !important;
    }

    /* Better mobile text sizing in dialog */
    #joinRoomDialog h3 {
        font-size: 16px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        margin: 0 0 12px !important;
    }

    #roomInput {
        width: 100% !important;
        min-height: 46px !important;
        box-sizing: border-box !important;
    }

    /* Mobile dialog buttons */
    #joinRoomDialog .row-reverse {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-top: 14px !important;
    }

    #joinRoomDialog .row-reverse .button {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        height: 44px !important;
        border-radius: 14px !important;
    }

    /* IMPORTANT: hide footer while any dialog is open */
    body:has(x-dialog[show]) footer#dock {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Also dim discovery text a bit while dialog is open */
    body:has(x-dialog[show]) #discovery-copy,
    body:has(x-dialog[show]) #peer-orbit,
    body:has(x-dialog[show]) #radar-stage {
        filter: blur(2px) !important;
    }
}