* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #121212;
    color: #a1a1aa;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0 20px;
}

body.auth {
    justify-content: center;
}

::selection {
    background: #3f3f46;
    color: #f4f4f5;
}

@property --border-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

header {
    width: 100%;
    padding: 50px 0;
    display: flex;
    justify-content: center;
}

body.auth header {
    position: absolute;
    top: 50px;
    padding: 0;
}

.nav-links {
    display: flex;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    text-transform: lowercase;
    display: inline-block;
    transition: color 0.2s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
    color: #e5e7eb;
    text-shadow: 0 0 8px rgba(229, 231, 235, 0.55),
                 0 0 20px rgba(229, 231, 235, 0.25);
    animation: nav-wobble 1.2s ease-in-out infinite;
}

.nav-links a:focus-visible {
    outline: 1px solid #52525b;
    outline-offset: 4px;
    border-radius: 2px;
}

.nav-links a.active {
    color: #e5e7eb;
    text-shadow: 0 0 10px rgba(229, 231, 235, 0.15);
}

.nav-links span {
    color: #333;
}

@keyframes nav-wobble {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(3deg); }
    75%  { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}

.admin-corner {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    padding: 7px 13px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: #a1a1aa;
    text-decoration: none;
    background: rgba(24, 24, 27, 0.9);
    border: 1px solid #27272a;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.3s ease;
}

.admin-corner:hover {
    color: #fafafa;
    border-color: #52525b;
    box-shadow: 0 0 18px rgba(229, 231, 235, 0.08);
}

.admin-corner.active {
    color: #f0a8a8;
    border-color: #5c3a3a;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #e5e7eb;
    letter-spacing: 0.5px;
}

.form-container .logo {
    font-size: 18px;
    text-align: center;
    margin-bottom: 30px;
}

.form-container {
    position: relative;
    background: #18181b;
    padding: 40px;
    border: 1px solid #27272a;
    border-radius: 6px;
    width: 350px;
    max-width: 420px;
    animation: card-in 0.5s ease-out both;
    --border-angle: 0deg;
}

.form-container::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg,
                transparent,
                rgba(229, 231, 235, 0.28),
                transparent);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.form-container::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 0%,
        transparent 60%,
        rgba(255, 255, 255, 0.06) 68%,
        rgba(255, 255, 255, 0.35) 80%,
        #ffffff 90%,
        rgba(255, 255, 255, 0.25) 94%,
        transparent 97%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.75))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
    animation: snake-travel 5s linear infinite;
    pointer-events: none;
}

@keyframes snake-travel {
    to { --border-angle: 360deg; }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
    color: #a1a1aa;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.form-group:focus-within label {
    color: #e5e7eb;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: #09090b;
    border: 1px solid #27272a;
    color: #e5e7eb;
    caret-color: #e5e7eb;
    border-radius: 4px;
    outline: none;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.55;
}

.form-group select {
    cursor: pointer;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #52525b;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #3f3f46;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #52525b;
    box-shadow: 0 0 0 1px #52525b,
                0 0 18px rgba(229, 231, 235, 0.05);
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover {
    -webkit-text-fill-color: #e5e7eb;
    -webkit-box-shadow: 0 0 0 1000px #09090b inset;
    box-shadow: 0 0 0 1000px #09090b inset;
    transition: background-color 9999s ease-out 0s;
}

.form-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #09090b inset, 0 0 0 1px #52525b;
    box-shadow: 0 0 0 1000px #09090b inset, 0 0 0 1px #52525b;
}

button[type="submit"] {
    width: 100%;
    padding: 11px;
    background: #27272a;
    color: #e5e7eb;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    transition: background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                text-shadow 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.15s ease;
}

button[type="submit"]:hover {
    background: #3f3f46;
    border-color: #52525b;
    color: #fafafa;
    text-shadow: 0 0 12px rgba(229, 231, 235, 0.35);
    box-shadow: 0 0 0 1px rgba(229, 231, 235, 0.06),
                0 0 18px rgba(229, 231, 235, 0.10),
                0 0 44px rgba(229, 231, 235, 0.05);
}

button[type="submit"]:focus-visible {
    border-color: #71717a;
    box-shadow: 0 0 0 1px #71717a,
                0 0 18px rgba(229, 231, 235, 0.10);
}

button[type="submit"]:active {
    transform: translateY(1px);
    background: #27272a;
    box-shadow: 0 0 12px rgba(229, 231, 235, 0.06);
}

body:not(.auth) { justify-content: flex-start; }

.hidden { display: none !important; }

.layout {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
    padding-bottom: 60px;
}

.layout-wide   { max-width: 1240px; }
.layout-single { max-width: 820px; grid-template-columns: minmax(0, 1fr); }

.col-main, .col-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

@media (max-width: 900px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
}

.panel {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 6px;
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #27272a;
    background: #1c1c20;
}

.panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.panel-note {
    margin-left: auto;
    font-size: 11px;
    color: #52525b;
}

.panel-form { padding: 18px; }
.form-inset { border-top: 1px solid #27272a; }

.empty {
    padding: 22px 18px;
    font-size: 12px;
    color: #52525b;
}

.row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #202024;
    text-decoration: none;
    transition: background 0.18s ease;
}

.row:last-child { border-bottom: none; }
a.row:hover { background: #1d1d21; }
.row-static { cursor: default; }

.row-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.row-title {
    font-size: 13px;
    color: #e5e7eb;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.row-title a { color: #e5e7eb; text-decoration: none; }
.row-title a:hover { text-shadow: 0 0 8px rgba(229, 231, 235, 0.4); }

.row-sub, .row-meta {
    font-size: 11px;
    color: #52525b;
}

.row-meta {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.mini-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 18px;
    border-bottom: 1px solid #202024;
    text-decoration: none;
    transition: background 0.18s ease;
}

.mini-row:last-child { border-bottom: none; }
a.mini-row:hover { background: #1d1d21; }

.mini-title { font-size: 12px; color: #d4d4d8; }
.mini-sub   { font-size: 11px; color: #52525b; }

.kv {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 18px;
    border-bottom: 1px solid #202024;
    font-size: 12px;
}

.kv:last-of-type { border-bottom: none; }
.kv > span:first-child { color: #71717a; }
.kv > span:last-child  { color: #d4d4d8; text-align: right; }
.kv a { color: #d4d4d8; }

.val-ok  { color: #a3e635 !important; }
.val-off { color: #52525b !important; }

.tag {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #3f3f46;
    border-radius: 3px;
    font-size: 10px;
    color: #a1a1aa;
    text-transform: lowercase;
    line-height: 1.5;
    white-space: nowrap;
}

.tag-admin    { border-color: #6b3f3f; color: #f0a8a8; }
.tag-plan     { border-color: #4a5a2f; color: #a3e635; }
.tag-pending  { border-color: #5a4f2f; color: #e8c97a; }
.tag-approved { border-color: #4a5a2f; color: #a3e635; }
.tag-rejected { border-color: #5c2b2b; color: #f0a8a8; }

.crumbs {
    font-size: 12px;
    color: #52525b;
    padding: 2px 2px 0;
}

.crumbs a       { color: #a1a1aa; text-decoration: none; }
.crumbs a:hover { color: #e5e7eb; }
.crumbs span    { color: #333; margin: 0 4px; }

.msg {
    padding: 11px 14px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #27272a;
    background: #18181b;
    margin-bottom: 18px;
}

.form-container .msg { margin-bottom: 20px; }

.msg-error { border-color: #5c2b2b; color: #f0a8a8; background: #1d1516; }
.msg-ok    { border-color: #3d4d28; color: #c7e89a; background: #161a13; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #a1a1aa;
    margin-bottom: 14px;
    cursor: pointer;
}

.check input { accent-color: #71717a; }

.btn-mini {
    padding: 6px 11px;
    background: #27272a;
    color: #d4d4d8;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-mini:hover   { background: #3f3f46; color: #fafafa; border-color: #52525b; }
.btn-danger:hover { border-color: #6b3f3f; color: #f0a8a8; background: #2a1e1e; }

.btn-link {
    display: block;
    padding: 12px 18px;
    border-top: 1px solid #27272a;
    font-size: 12px;
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.btn-link:hover { color: #e5e7eb; background: #1d1d21; }

.link-danger, .link-plain {
    background: none;
    border: none;
    font-size: 11px;
    cursor: pointer;
    padding: 0 4px 0 0;
    transition: color 0.2s ease;
}

.link-danger { color: #7f5a5a; }
.link-danger:hover { color: #f0a8a8; }
.link-plain  { color: #71717a; }
.link-plain:hover { color: #e5e7eb; }

.inline { display: inline-block; padding: 0; }

.mod-bar {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid #27272a;
    background: #1a1a1e;
}

.post {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    border-bottom: 1px solid #202024;
}

.post:last-child { border-bottom: none; }

.post-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px;
    border-right: 1px solid #202024;
    background: #1a1a1e;
}

.post-user {
    font-size: 13px;
    color: #e5e7eb;
    font-weight: 500;
    text-decoration: none;
}

.post-user:hover { text-shadow: 0 0 8px rgba(229, 231, 235, 0.4); }

.post-uid, .post-since { font-size: 11px; color: #52525b; }

.post-body { padding: 18px; min-width: 0; }

.post-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 11px;
    color: #52525b;
    margin-bottom: 10px;
}

.post-content {
    font-size: 13px;
    line-height: 1.7;
    color: #d4d4d8;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 620px) {
    .post { grid-template-columns: minmax(0, 1fr); }
    .post-side {
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid #202024;
        padding: 12px 18px;
    }
}

.dot-live {
    margin-left: auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a3e635;
    box-shadow: 0 0 8px rgba(163, 230, 53, 0.6);
    animation: pulse-live 2.4s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

.shout-list {
    height: 320px;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    scrollbar-width: thin;
    scrollbar-color: #3f3f46 transparent;
}

.shout-list::-webkit-scrollbar { width: 6px; }
.shout-list::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }

.shout {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.shout-time { color: #3f3f46; font-size: 10px; }

.shout-user {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 500;
}

.shout-user:hover { text-shadow: 0 0 8px rgba(229, 231, 235, 0.4); }

.shout-text {
    color: #a1a1aa;
    flex: 1 1 100%;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.shout-del {
    background: none;
    border: none;
    color: #3f3f46;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    padding: 0 2px;
}

.shout-del:hover { color: #f0a8a8; }

.shout-empty {
    color: #3f3f46;
    font-size: 12px;
    margin: auto;
    text-align: center;
}

.shout-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #27272a;
}

.shout-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 36px;
    max-height: 96px;
    padding: 9px 11px;
    background: #09090b;
    border: 1px solid #27272a;
    color: #e5e7eb;
    caret-color: #e5e7eb;
    border-radius: 4px;
    outline: none;
    font-size: 12px;
    line-height: 1.4;
    resize: none;
    overflow-y: auto;
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.shout-input::placeholder { color: #52525b; }
.shout-input:hover { border-color: #3f3f46; }

.shout-input:focus {
    border-color: #52525b;
    box-shadow: 0 0 0 1px #52525b;
}

.shout-form .btn-mini { height: 36px; flex: 0 0 auto; }

.shout-error {
    padding: 0 14px 12px;
    font-size: 11px;
    color: #f0a8a8;
}

.shout-error:empty { padding: 0; }

.status-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.status-bar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
}

.status-on::before  { background: #a3e635; box-shadow: 0 0 16px rgba(163, 230, 53, 0.5); }
.status-off::before { background: #3f3f46; }

.status-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border-right: 1px solid #202024;
}

.status-cell:last-child { border-right: none; }

.status-label {
    font-size: 10px;
    color: #52525b;
    letter-spacing: 0.4px;
}

.status-value {
    font-size: 19px;
    font-weight: 600;
    color: #e5e7eb;
}

.status-value.small { font-size: 12px; font-weight: 400; color: #a1a1aa; }

@media (max-width: 620px) {
    .status-bar { grid-template-columns: repeat(2, 1fr); }
}

.switch {
    margin-left: auto;
    display: flex;
    border: 1px solid #27272a;
    border-radius: 4px;
    overflow: hidden;
}

.switch-btn {
    padding: 6px 14px;
    background: #121212;
    border: none;
    color: #52525b;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.switch-btn:hover { color: #a1a1aa; }

.switch-btn.active {
    background: #27272a;
    color: #e5e7eb;
}

.type-note {
    padding: 14px 18px;
    font-size: 12px;
    color: #71717a;
    border-bottom: 1px solid #202024;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: #202024;
}

@media (max-width: 680px) {
    .plan-grid { grid-template-columns: 1fr; }
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: #18181b;
    transition: background 0.2s ease;
}

.plan-card:hover { background: #1c1c20; }

.plan-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.plan-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
}

.plan-price {
    font-size: 28px;
    font-weight: 600;
    color: #fafafa;
    line-height: 1.2;
    text-shadow: 0 0 22px rgba(229, 231, 235, 0.16);
}

.plan-duration {
    font-size: 11px;
    color: #52525b;
}

.plan-blurb {
    font-size: 12px;
    line-height: 1.6;
    color: #a1a1aa;
    margin: 6px 0 10px;
    min-height: 38px;
}

.plan-buy {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.plan-buy input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 9px 11px;
    background: #09090b;
    border: 1px solid #27272a;
    color: #e5e7eb;
    border-radius: 4px;
    outline: none;
    font-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.plan-buy input[type="text"]::placeholder { color: #3f3f46; }

.plan-buy input[type="text"]:focus {
    border-color: #52525b;
    box-shadow: 0 0 0 1px #52525b;
}

.btn-buy {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 9px 18px;
    background: #27272a;
    color: #e5e7eb;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
}

.btn-buy:hover {
    background: #3f3f46;
    border-color: #52525b;
    color: #fafafa;
    box-shadow: 0 0 18px rgba(229, 231, 235, 0.10);
}

.pay-note {
    padding: 14px 18px;
    border-top: 1px solid #202024;
    font-size: 11px;
    color: #52525b;
    line-height: 1.6;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 18px;
    border-right: 1px solid #202024;
    border-bottom: 1px solid #202024;
}

.stat-num   { font-size: 20px; font-weight: 600; color: #e5e7eb; }
.stat-label { font-size: 11px; color: #52525b; }

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.table-wrap { overflow-x: auto; }

table.grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

table.grid th {
    text-align: left;
    padding: 11px 14px;
    color: #71717a;
    font-weight: 500;
    font-size: 11px;
    border-bottom: 1px solid #27272a;
    white-space: nowrap;
}

table.grid td {
    padding: 11px 14px;
    border-bottom: 1px solid #202024;
    color: #a1a1aa;
    white-space: nowrap;
}

table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover td { background: #1c1c20; }
table.grid a { color: #d4d4d8; text-decoration: none; }
table.grid a:hover { color: #fafafa; }

.code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 18px;
    border-bottom: 1px solid #202024;
}

.code-row:last-child { border-bottom: none; }

.code {
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #e5e7eb;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 3px;
    padding: 4px 8px;
    user-select: all;
}

.code-used { color: #52525b; text-decoration: line-through; }

.site-footer {
    padding: 30px 0 40px;
    font-size: 11px;
    color: #303034;
}

.invite-card {
    padding: 16px 18px;
    border-bottom: 1px solid #202024;
    position: relative;
}

.invite-card:last-child { border-bottom: none; }

.invite-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
}

.invite-free::before    { background: #4a5a2f; }
.invite-used::before    { background: #2f3a4a; }
.invite-expired::before { background: #5c2b2b; }

.invite-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.invite-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 18px;
    font-size: 11px;
    color: #a1a1aa;
}

.invite-meta a { color: #d4d4d8; }

.invite-key {
    display: inline-block;
    min-width: 58px;
    color: #52525b;
}

@media (max-width: 560px) {
    .invite-meta { grid-template-columns: 1fr; }
}

.drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 9, 11, 0.78);
    backdrop-filter: blur(4px);
    animation: drop-fade 0.25s ease-out both;
}

@keyframes drop-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.drop-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 34px 30px 26px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    overflow: hidden;
    animation: drop-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes drop-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.drop-glow {
    position: absolute;
    top: -1px;
    left: 30px;
    right: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.drop-kicker {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #71717a;
    margin-bottom: 10px;
}

.drop-title {
    font-size: 19px;
    font-weight: 600;
    color: #fafafa;
    line-height: 1.3;
    text-shadow: 0 0 24px rgba(229, 231, 235, 0.2);
}

.drop-text {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: #a1a1aa;
}

.drop-codes {
    margin: 20px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 210px;
    overflow-y: auto;
}

.drop-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 4px;
}

.drop-code-row .code {
    border: none;
    background: none;
    padding: 0;
    flex: 1;
}

.drop-expiry {
    font-size: 10px;
    color: #52525b;
    white-space: nowrap;
}

.drop-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.drop-actions .btn-mini {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

@media (prefers-reduced-motion: reduce) {
    .drop-overlay { animation: none; }
    .drop-modal   { animation: none; }
    .nav-links a:hover           { animation: none; }
    .form-container              { animation: none; }
    .form-container::after       { animation: none; }
    button[type="submit"]:active { transform: none; }
    .dot-live                    { animation: none; }
}

/* Rank lettering and drifting smoke extending beyond the frame. */
:is(.tag-og, .tag-subscriber), .tag-admin {
    --rank-rgb: 157, 68, 235; --rank-light: #edceff; --rank-mid: #b77be7;
    --rank-dark: #331444; --rank-bg: #130b1c;
    position: relative; isolation: isolate; overflow: visible;
    vertical-align: middle; margin-left: 4px;
    border: 1px solid rgba(var(--rank-rgb), .7); background: var(--rank-bg);
    font-weight: 800; letter-spacing: 1px;
    box-shadow: inset 0 0 7px rgba(var(--rank-rgb), .18), 0 0 6px rgba(var(--rank-rgb), .25);
    animation: rank-frame 3.7s ease-in-out infinite alternate;
}
.tag-og { text-transform: uppercase; }
.tag-admin {
    --rank-rgb: 228, 46, 69; --rank-light: #ffd9dd; --rank-mid: #f07b88;
    --rank-dark: #4b111c; --rank-bg: #1d0a0e;
    animation-delay: -1.4s;
}
:is(.tag-og, .tag-subscriber)::before, .tag-admin::before,
:is(.tag-og, .tag-subscriber)::after, .tag-admin::after {
    content: ""; position: absolute; pointer-events: none; z-index: -1;
    border-radius: 45% 55% 38% 62%;
    background:
        radial-gradient(ellipse at 20% 65%, rgba(var(--rank-rgb), .8), transparent 48%),
        radial-gradient(ellipse at 75% 45%, rgba(var(--rank-rgb), .6), transparent 48%),
        radial-gradient(ellipse at 48% 80%, var(--rank-dark), transparent 60%);
    filter: blur(3px); opacity: .6;
}
:is(.tag-og, .tag-subscriber)::before, .tag-admin::before {
    inset: -5px -6px -2px;
    animation: rank-smoke-rise 4.6s ease-in-out infinite;
}
:is(.tag-og, .tag-subscriber)::after, .tag-admin::after {
    inset: -3px -4px -4px;
    filter: blur(4px);
    animation: rank-smoke-wisp 5.8s ease-in-out -2.6s infinite;
}
:is(.tag-og, .tag-subscriber) > span, .tag-admin > span {
    position: relative; z-index: 1; color: var(--rank-light);
    background: linear-gradient(110deg, var(--rank-mid) 10%, var(--rank-light) 35%, var(--rank-dark) 48%, var(--rank-mid) 62%, var(--rank-light) 75%, var(--rank-mid) 90%);
    background-size: 250% 100%; background-clip: text; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(var(--rank-rgb), .7));
    animation: rank-lettering 4s ease-in-out infinite alternate;
}
@keyframes rank-frame {
    from { border-color: rgba(var(--rank-rgb), .45); box-shadow: inset 0 0 5px rgba(var(--rank-rgb), .15), 0 0 5px rgba(var(--rank-rgb), .2); }
    to { border-color: rgba(var(--rank-rgb), .9); box-shadow: inset 0 0 8px rgba(var(--rank-rgb), .25), 0 0 9px rgba(var(--rank-rgb), .45); }
}
@keyframes rank-smoke-rise {
    0%, 100% { transform: translate(-2px, 1px) scale(.92, .8) skewX(-9deg); opacity: .35; }
    45% { transform: translate(2px, -5px) scale(1.1, 1.3) skewX(12deg); opacity: .65; }
    75% { transform: translate(-1px, -8px) scale(.95, 1.5) skewX(-5deg); opacity: .12; }
}
@keyframes rank-smoke-wisp {
    0%, 100% { transform: translate(3px, 0) scale(1, .8) skewX(10deg); opacity: .2; }
    50% { transform: translate(-4px, -6px) scale(1.15, 1.4) skewX(-15deg); opacity: .5; }
}
@keyframes rank-lettering { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) {
    :is(.tag-og, .tag-subscriber), .tag-admin, :is(.tag-og, .tag-subscriber)::before, :is(.tag-og, .tag-subscriber)::after, .tag-admin::before, .tag-admin::after,
    :is(.tag-og, .tag-subscriber) > span, .tag-admin > span { animation: none; }
}

.profile-comment-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; color: #d4d4d8; }
#comments textarea { width: 100%; resize: vertical; min-height: 80px; }

.tag-subscriber {
    --rank-rgb: 66, 190, 113; --rank-light: #d0ffe0; --rank-mid: #75d79a;
    --rank-dark: #123c25; --rank-bg: #0b1b12;
    text-transform: lowercase; animation-delay: -.8s;
}
#comments .panel-form { border-bottom: 1px solid #27272a; background: #151517; }
#comments .form-group { margin-bottom: 12px; }
.profile-comment {
    display: grid; grid-template-columns: 1fr auto; gap: 8px 16px;
    padding: 18px 20px; background: #18181b; border-bottom: 1px solid #27272a;
}
.profile-comment:last-child { border-bottom: 0; }
.comment-author { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
#comments .post-user, #comments .post-user:visited { color: #d4d4d8; font-size: 13px; font-weight: 600; text-decoration: none; }
#comments .post-user:hover { color: #f4f4f5; text-decoration: none; }
.comment-date { color: #71717a; font-size: 11px; align-self: center; }
.profile-comment-body { grid-column: 1 / -1; margin: 4px 0 2px; font-size: 13px; line-height: 1.75; }
.profile-comment > form { grid-column: 1 / -1; justify-self: end; }
@media(max-width:560px) { .profile-comment { grid-template-columns: 1fr; } .comment-date { grid-column: 1; } }

/* Navigation logout is a CSRF-protected form, styled like the adjacent links. */
.nav-links { align-items: center; }
.nav-links .nav-logout-form { display: flex; align-items: center; margin: 0; padding: 0; }
.nav-links .nav-logout,
.nav-links .nav-logout:hover,
.nav-links .nav-logout:active {
    appearance: none; display: inline-block; width: auto; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none;
    font: inherit; line-height: inherit; color: #555; cursor: pointer;
    transform: none; text-transform: lowercase;
    transition: color .2s ease, text-shadow .3s ease;
}
.nav-links .nav-logout:hover {
    color: #e5e7eb;
    text-shadow: 0 0 8px rgba(229,231,235,.55), 0 0 20px rgba(229,231,235,.25);
    animation: nav-wobble 1.2s ease-in-out infinite;
}
.nav-links .nav-logout:focus-visible { outline: 1px solid #52525b; outline-offset: 4px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-links .nav-logout:hover { animation: none; } }
