/* Portal home - matches profile hero language */

body.portal-section-home .portal-main-content {
    padding-top: 0;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    overflow-x: hidden;
}

.ph {
    width: 100%;
    max-width: 680px;
    margin: 0 auto 24px;
    display: grid;
    gap: 16px;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Raid hero ── */
.ph-raid {
    border-radius: 20px;
    border: 1px solid var(--social-border, #2f3336);
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(29, 155, 240, 0.12), transparent 55%),
        linear-gradient(165deg, #1a1d22 0%, #101216 100%);
    overflow: hidden;
}

.ph-ticker {
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.28);
}

.ph-ticker-track {
    display: inline-flex;
    width: max-content;
    padding: 10px 0;
    animation: phTicker 38s linear infinite;
}

.ph-ticker-seg {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    white-space: nowrap;
}

.ph-ticker-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
}

.ph-ticker-k {
    font-weight: 700;
    color: rgba(29, 155, 240, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
}

.ph-ticker-v {
    font-weight: 600;
    color: #cfe7ff;
}

.ph-ticker-dot {
    color: #2f3336;
    user-select: none;
}

@keyframes phTicker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.ph-raid-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0;
    min-width: 0;
}

.ph-raid-poster {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: #0a0c10;
    cursor: pointer;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 0;
}

.ph-raid-poster img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    object-position: center top;
}

.ph-raid-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 20px 20px 18px;
    min-width: 0;
}

.ph-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(29, 155, 240, 0.85);
}

.ph-raid-title {
    margin: 0;
    font-size: clamp(1.35rem, 4.5vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text, #e7e9ea);
    line-height: 1.1;
}

.ph-raid-desc {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted, #71767b);
}

.ph-raid-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ph-raid-clock {
    flex-shrink: 0;
    text-align: right;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ph-raid-clock-k {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #536471;
    margin-bottom: 4px;
}

.ph-raid-clock-v,
#pre-countdown {
    display: block;
    font-size: clamp(1.1rem, 4vw, 1.35rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--text, #e7e9ea);
    white-space: nowrap;
}

#pre-countdown.is-due,
.ph-raid-clock-v.is-due {
    color: #00ba7c;
}

.ph-raid-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.ph-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ph-btn--primary,
.pre-join {
    color: #fff;
    background: var(--social-blue, #1d9bf0);
}

.ph-btn--primary:hover,
.pre-join:hover:not(:disabled) {
    background: var(--social-blue-hover, #1a8cd8);
}

.pre-join.is-joined,
.ph-btn--primary.is-joined {
    background: transparent;
    color: #00ba7c;
    border: 1px solid rgba(0, 186, 124, 0.4);
}

.ph-btn--ghost,
.pre-manage {
    background: transparent;
    color: #71767b;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 600;
}

.ph-btn--ghost:hover,
.pre-manage:hover {
    color: var(--text, #e7e9ea);
}

.ph-raid-meta,
.pre-meta {
    flex: 1;
    min-width: 120px;
    font-size: 13px;
    color: #71767b;
}

.ph-raid-meta strong,
.pre-meta strong {
    color: var(--text, #e7e9ea);
    font-weight: 800;
}

.ph-raid-status,
.pre-status {
    display: none;
    font-size: 12px;
    color: #71767b;
}

.ph-raid-status:not(:empty),
.pre-status:not(:empty) {
    display: block;
}

.ph-raid-status.is-ok,
.pre-status.is-ok { color: #00ba7c; }
.ph-raid-status.is-error,
.pre-status.is-error { color: #f4212e; }

/* ── Section shells ── */
.ph-giveaways,
.ph-feed {
    border-radius: 18px;
    border: 1px solid var(--social-border, #2f3336);
    background: var(--card-bg, #16181c);
    overflow: hidden;
}

.ph-section-head {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--social-border, #2f3336);
}

.ph-section-head--feed {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background:
        radial-gradient(ellipse 70% 120% at 0% 0%, rgba(29, 155, 240, 0.08), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.ph-section-head--feed .ph-section-title::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 7px;
    border-radius: 50%;
    background: #00ba7c;
    vertical-align: middle;
    transform: translateY(-1px);
}

.ph-section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text, #e7e9ea);
}

.ph-section-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted, #71767b);
}

/* ── Giveaways ── */
.ph-giveaway-app,
#portal-giveaway-app {
    padding: 0;
}

.pga-admin-bar {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px 0;
}

.pga-start {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--social-blue, #1d9bf0);
    cursor: pointer;
}

.pga-cards {
    display: grid;
    gap: 10px;
    padding: 12px 16px 16px;
}

.pga-card {
    border-radius: 14px;
    border: 1px solid var(--social-border, #2f3336);
    background: linear-gradient(180deg, #1a1d22 0%, #12151a 100%);
    overflow: hidden;
}

.pga-card.is-active {
    border-color: rgba(29, 155, 240, 0.45);
    box-shadow: inset 0 1px 0 rgba(29, 155, 240, 0.12);
}

.pga-card-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.pga-card-badge {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(29, 155, 240, 0.1);
    border: 1px solid rgba(29, 155, 240, 0.2);
    color: #7cc4f8;
    flex-shrink: 0;
}

.pga-card-badge svg {
    width: 22px;
    height: 22px;
}

.pga-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text, #e7e9ea);
}

.pga-card-prize {
    margin: 3px 0 0;
    font-size: 12px;
    color: #9aa3ab;
}

.pga-card-winner {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #00ba7c;
}

.pga-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #00ba7c;
    background: rgba(0, 186, 124, 0.1);
    border: 1px solid rgba(0, 186, 124, 0.25);
}

.pga-status-pill.is-draft {
    color: #9aa3ab;
    background: rgba(113, 118, 123, 0.12);
    border-color: rgba(113, 118, 123, 0.28);
}

.pga-status-pill-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.pga-card-clock {
    text-align: right;
    min-width: 76px;
}

.pga-card-timer-v {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text, #e7e9ea);
}

.pga-card-timer-k {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #536471;
}

.pga-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pga-enter {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--social-blue, #1d9bf0);
    cursor: pointer;
}

.pga-card-meta {
    flex: 1;
    font-size: 12px;
    color: #71767b;
}

.pga-chip {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #9aa3ab;
    background: rgba(47, 51, 54, 0.6);
    margin-right: 4px;
    margin-top: 6px;
}

.pga-chip.is-reward { color: #7dffc8; background: rgba(0, 186, 124, 0.1); }
.pga-chip.is-req { color: #9cc9f0; background: rgba(29, 155, 240, 0.1); }

.pga-empty {
    margin: 0;
    padding: 20px 16px;
    text-align: center;
    font-size: 13px;
    color: #71767b;
}

.pga-status {
    display: none;
    margin: 0 16px 12px;
    padding: 10px 12px;
    font-size: 12px;
    border-radius: 10px;
    border: 1px solid var(--social-border, #2f3336);
}

.pga-status:not(:empty) { display: block; }
.pga-status.is-ok { color: #00ba7c; border-color: rgba(0, 186, 124, 0.3); }
.pga-status.is-err { color: #f4212e; border-color: rgba(244, 33, 46, 0.3); }

.pga-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pga-modal.open { display: flex; }

.pga-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.pga-modal-card {
    position: relative;
    width: min(460px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    border: 1px solid var(--social-border, #2f3336);
    border-radius: 16px;
    background: var(--card-bg, #16181c);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.pga-modal-card.is-wide { width: min(560px, 100%); }

.pga-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--social-border, #2f3336);
}

.pga-modal-head h2 { margin: 0; font-size: 16px; }

.pga-modal-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text, #e7e9ea);
    font-size: 22px;
    cursor: pointer;
}

.pga-modal-body { padding: 14px 16px 16px; }

.pga-field {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #71767b;
}

.pga-field input,
.pga-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--social-border, #2f3336);
    border-radius: 10px;
    background: #111;
    color: var(--text, #e7e9ea);
    padding: 10px 12px;
    font: inherit;
}

.pga-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pga-primary,
.pga-ghost {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.pga-primary { background: var(--social-blue, #1d9bf0); color: #fff; }
.pga-ghost { background: transparent; color: #71767b; border: 1px solid var(--social-border, #2f3336); }

.pga-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pga-entry-list,
.pga-winner-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 240px;
    overflow: auto;
    border: 1px solid var(--social-border, #2f3336);
    border-radius: 12px;
    background: #0c0e11;
}

.pga-entry-item,
.pga-winner-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.pga-entry-item:last-child,
.pga-winner-item:last-child { border-bottom: 0; }

/* ── Live feed (chat log) ── */
.ph-feed-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.ph-feed-tab,
.plf-filter {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6e767d;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}

.ph-feed-tab:hover,
.plf-filter:hover {
    color: #e7e9ea;
    background: rgba(255, 255, 255, 0.04);
}

.ph-feed-tab.is-active,
.plf-filter.is-active {
    color: #e7e9ea;
    background: rgba(255, 255, 255, 0.07);
}

.ph-feed-panel {
    background: #0b0d10;
    min-height: 220px;
}

.plf-lines,
.plf-list {
    max-height: min(52vh, 500px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #2f3336 transparent;
}

.plf-lines::-webkit-scrollbar,
.plf-list::-webkit-scrollbar {
    width: 6px;
}

.plf-lines::-webkit-scrollbar-thumb,
.plf-list::-webkit-scrollbar-thumb {
    background: #2f3336;
    border-radius: 999px;
}

.plf-line,
.plf-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 14px;
    padding: 10px 16px 10px 14px;
    font-size: 14px;
    line-height: 1.45;
    color: #aeb8c2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 2px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.plf-line:hover {
    background: rgba(255, 255, 255, 0.02);
}

.plf-line[hidden] {
    display: none !important;
}

.plf-line:last-child {
    border-bottom: 0;
}

.plf-line--kill { border-left-color: rgba(244, 33, 46, 0.55); }
.plf-line--zorp { border-left-color: rgba(29, 155, 240, 0.55); }
.plf-line--player { border-left-color: rgba(0, 186, 124, 0.55); }
.plf-line--claim { border-left-color: rgba(232, 168, 56, 0.55); }
.plf-line--daily { border-left-color: rgba(52, 211, 153, 0.55); }
.plf-line--card { border-left-color: rgba(251, 191, 36, 0.55); }
.plf-line--tp { border-left-color: rgba(139, 156, 246, 0.55); }
.plf-line--note { border-left-color: rgba(192, 132, 252, 0.55); }
.plf-line--xp { border-left-color: rgba(167, 139, 250, 0.55); }

.plf-badge,
.plf-prefix,
.plf-tag {
    display: none;
}

.plf-text,
.plf-body {
    min-width: 0;
}

.plf-time {
    justify-self: end;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #566069;
    white-space: nowrap;
}

.plf-ign { font-weight: 700; color: #e8edf2; }
.plf-ign[style*="color"] { /* role colour inline */ font-weight: 800; }
.plf-ign--victim:not([style*="color"]) { color: #f4212e; }
.plf-ign--victim { color: #f4212e; }
.plf-sep { margin: 0 5px; color: #536471; font-weight: 700; }
.plf-online { color: #00ba7c; font-weight: 700; }
.plf-offline { color: #71767b; font-weight: 700; }
.plf-protected { color: #1d9bf0; font-weight: 700; }
.plf-blocked { color: #f4212e; font-weight: 700; }
.plf-qty { color: #e8a838; font-weight: 700; }
.plf-item, .plf-tp { color: #9aa3ab; }
.plf-note { color: #d6bcfa; }
.plf-daily { color: #34d399; font-weight: 700; }
.plf-daily-reward { color: #6ee7b7; font-weight: 700; }
.plf-daily-card { color: #fbbf24; font-weight: 700; }
.plf-card-name { font-weight: 700; color: #4da3ff; }
/* Match collectible card rarity colors */
.plf-card-rarity--yellow { color: #f5d76e; }
.plf-card-rarity--blue { color: #4da3ff; }
.plf-card-rarity--green { color: #3dd68c; }
.plf-card-rarity--orange { color: #ff8a3d; }
.plf-card-rarity--purple { color: #b56bff; }
.plf-daily-drew { color: #a3a3a3; }
.plf-level { color: #a78bfa; font-weight: 700; }
.plf-challenge { color: #38bdf8; font-weight: 700; }

.plf-empty,
.plf-status {
    padding: 28px 18px;
    text-align: center;
    font-size: 13px;
    color: #536471;
}

.plf-empty[hidden],
.plf-status[hidden] {
    display: none !important;
}

.plf-status.is-err { color: #f4212e; }
.plf-status.is-idle { color: #536471; }

/* Raid modal styles (portal-raid-event.js) */
.pre-poster-modal,
.pre-admin-modal {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.78);
}

.pre-poster-modal.is-open,
.pre-admin-modal.is-open { display: flex; }

.pre-poster-panel {
    position: relative;
    width: min(920px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--social-border, #2f3336);
    background: #000;
}

.pre-poster-panel img { display: block; width: 100%; height: auto; }

.pre-poster-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.pre-admin-panel {
    width: min(560px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--social-border, #2f3336);
    background: var(--card-bg, #16181c);
    padding: 16px;
    color: var(--text, #e7e9ea);
}

.pre-admin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pre-admin-head h3 { margin: 0; font-size: 18px; }

.pre-admin-sub {
    margin: 6px 0 0;
    font-size: 12px;
    color: #71767b;
}

.pre-admin-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text, #e7e9ea);
    font-size: 22px;
    cursor: pointer;
}

.pre-admin-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    font-size: 12px;
    color: #71767b;
}

.pre-admin-list {
    margin-top: 12px;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--social-border, #2f3336);
    border-radius: 10px;
    background: #0c0e11;
    padding: 8px;
}

.pre-admin-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.pre-admin-row:last-child { border-bottom: 0; }

.pre-admin-winner {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 8px;
    align-items: end;
    margin-top: 12px;
}

.pre-admin-winner label {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #71767b;
}

.pre-admin-winner input,
.pre-admin-winner select {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid var(--social-border, #2f3336);
    background: #111;
    color: #fff;
    padding: 8px 10px;
}

.pre-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pre-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.pre-btn-danger { background: #f4212e; color: #fff; }
.pre-btn-winner { background: #ffd400; color: #0f1419; }
.pre-btn-remind { background: var(--social-blue, #1d9bf0); color: #fff; }

.pre-admin-status {
    margin-top: 12px;
    min-height: 18px;
    font-size: 12px;
    color: #71767b;
}

@media (max-width: 640px) {
    body.portal-section-home .portal-main-content {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
    }

    .ph {
        gap: 12px;
        margin-bottom: 16px;
    }

    .ph-giveaways,
    .ph-feed,
    .ph-raid {
        border-radius: 14px;
        max-width: 100%;
    }

    .ph-section-head {
        padding: 12px 12px 10px;
    }

    .ph-section-title {
        font-size: 14px;
    }

    .ph-section-sub {
        font-size: 11px;
        line-height: 1.35;
    }

    .ph-raid-body {
        grid-template-columns: 1fr;
    }

    .ph-raid-poster {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        max-height: none;
        min-height: 160px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #0a0a0a;
    }

    .ph-raid-poster img {
        min-height: 0;
        max-height: min(52vw, 280px);
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center;
        display: block;
    }

    .ph-raid-main {
        padding: 14px 12px 12px;
        gap: 12px;
    }

    .ph-raid-top {
        flex-direction: column;
        gap: 10px;
    }

    .ph-raid-clock {
        width: 100%;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        text-align: left;
        padding: 8px 10px;
    }

    .ph-raid-clock-v,
    #pre-countdown {
        font-size: 1rem;
        white-space: normal;
        word-break: break-word;
    }

    .ph-raid-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ph-raid-actions .ph-btn--primary,
    .ph-raid-actions .pre-join {
        width: 100%;
        text-align: center;
    }

    .ph-raid-meta,
    .pre-meta {
        min-width: 0;
        width: 100%;
    }

    .ph-ticker-item {
        font-size: 11px;
    }

    .ph-ticker-seg {
        gap: 10px;
        padding: 0 14px;
    }

    .ph-section-head--feed {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 12px 8px;
    }

    .ph-section-head--feed > div:first-child {
        min-width: 0;
    }

    .ph-feed-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 2px;
        margin: 0;
        padding: 2px 0 4px;
        width: 100%;
        max-width: 100%;
        mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
    }

    .ph-feed-tabs::-webkit-scrollbar {
        display: none;
    }

    .ph-feed-tab,
    .plf-filter {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 6px 9px;
        font-size: 11px;
        border-radius: 999px;
        white-space: nowrap;
    }

    .ph-feed-panel {
        min-height: 160px;
    }

    .plf-lines,
    .plf-list {
        max-height: min(42vh, 340px);
    }

    .plf-line,
    .plf-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 9px 12px 9px 11px;
        font-size: 12px;
        line-height: 1.38;
    }

    .plf-text,
    .plf-body {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .plf-time {
        align-self: flex-end;
        font-size: 10px;
        padding-top: 0;
        min-width: 0;
        text-align: right;
    }

    .plf-empty,
    .plf-status {
        padding: 20px 12px;
        font-size: 12px;
    }

    .pga-cards {
        padding: 10px 12px 12px;
        gap: 8px;
    }

    .pga-card-main {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }

    .pga-card-badge { display: none; }

    .pga-card-clock {
        width: 100%;
        text-align: left;
    }

    .pga-card-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0 12px 12px;
    }

    .pga-enter {
        width: 100%;
        text-align: center;
    }

    .pga-card-meta {
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 380px) {
    .ph-feed-tab,
    .plf-filter {
        padding: 5px 7px;
        font-size: 10px;
    }

    .ph-raid-title {
        font-size: 1.2rem;
    }

    .ph-eyebrow {
        font-size: 10px;
        letter-spacing: 0.08em;
    }
}

/* Server identity banner above live feed */
.ph-server-banner {
  margin: 0 0 14px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(47, 51, 54, 0.9);
  background: #000;
  line-height: 0;
}
.ph-server-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 720px) {
  .ph-server-banner {
    margin: 0 0 12px;
    border-radius: 14px;
  }
}


/* Portal live feed - load older history */
.plf-load-older {
  text-align: center;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(159, 210, 255, 0.72);
  opacity: 0.9;
}

/* bugfix 20260726 raid mobile */
@media (max-width: 720px) {
    .ph-raid-poster {
        max-height: none; min-height: 160px; overflow: hidden;
        display: flex; align-items: center; justify-content: center; background: #0a0a0a;
    }
    .ph-raid-poster img {
        min-height: 0; max-height: min(52vw, 280px); width: 100%; height: auto;
        object-fit: contain; object-position: center; display: block;
    }
    .ph-raid-clock { width: 100% !important; box-sizing: border-box; overflow: visible !important; }
    .ph-raid-clock-v, #pre-countdown {
        white-space: nowrap !important; overflow: visible !important;
        font-size: clamp(1rem, 4.5vw, 1.25rem) !important; max-width: 100%;
    }
}


/* ========== Weekly Playtime event layout 20260727-weekly4 ========== */
.ph-raid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.ph-raid-body--weekly,
.ph-raid-body--clean,
.ph-raid-body.ph-raid-body--weekly {
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ph-raid-body--clean .ph-raid-poster,
.ph-raid-body--clean #pre-thumb {
    display: none !important;
}

.ph-raid-body--clean .ph-raid-main,
.ph-raid-body--clean .ph-raid-main--full {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 18px 18px 16px !important;
    gap: 14px !important;
}

.ph-raid-body--clean .ph-raid-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ph-raid-body--clean .ph-raid-top > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.ph-raid-body--clean .ph-raid-title {
    margin: 0 0 6px !important;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem) !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
}

.ph-raid-body--clean .ph-raid-desc {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: var(--text-muted, #8b98a5) !important;
    max-width: 42ch !important;
}

.ph-raid-body--clean .ph-raid-clock {
    flex: 0 0 auto !important;
    min-width: 118px !important;
    max-width: 160px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    background: rgba(0,0,0,0.35) !important;
    text-align: right !important;
    box-sizing: border-box !important;
}

.ph-raid-body--clean .ph-raid-clock-k {
    display: block !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--text-muted, #8b98a5) !important;
    margin-bottom: 4px !important;
}

.ph-raid-body--clean .ph-raid-clock-v,
.ph-raid-body--clean #pre-countdown {
    display: block !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    color: #e7e9ea !important;
}

.ph-raid-body--clean #pre-countdown.is-frozen,
.ph-raid-body--clean #pre-countdown.is-due {
    color: #f5c542 !important;
}

.ph-activity-lb {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 14px !important;
    background: rgba(0,0,0,0.32) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ph-activity-lb-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    box-sizing: border-box !important;
}

.ph-activity-lb-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--text-muted, #8b98a5) !important;
}

.ph-activity-lb-prize {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #f5c542 !important;
    white-space: nowrap !important;
}

.ph-activity-lb-list {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
}

.ph-activity-lb-list .lb-row,
.ph-activity-row.lb-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 11px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    box-sizing: border-box !important;
}

.ph-activity-lb-list .lb-row:last-child {
    border-bottom: 0 !important;
}

.ph-activity-lb-list .r-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
}

.ph-activity-lb-list .r-rank {
    flex: 0 0 34px !important;
    width: 34px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--text-muted, #8b98a5) !important;
    font-variant-numeric: tabular-nums !important;
}

.ph-activity-lb-list .r-name {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text, #e7e9ea) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ph-activity-lb-list .r-right {
    flex: 0 0 auto !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #1d9bf0 !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
}

.ph-activity-lb-list .lb-rank-1 .r-rank,
.ph-activity-lb-list .lb-rank-1 .r-xp {
    color: #f5c542 !important;
}

.ph-activity-row.is-winner {
    background: rgba(245, 197, 66, 0.08) !important;
}

.ph-winner-tag {
    display: inline-block !important;
    margin-left: 6px !important;
    padding: 2px 7px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #0a0c10 !important;
    background: linear-gradient(135deg, #f5c542, #e8a317) !important;
    vertical-align: middle !important;
}

.ph-activity-me {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    background: rgba(29,155,240,0.08) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ph-activity-me[hidden] { display: none !important; }

.ph-raid-body--clean .ph-raid-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

.ph-raid-body--clean .ph-raid-meta,
.ph-raid-body--clean #pre-entry-count,
.ph-raid-body--clean #pre-entry-label {
    display: none !important;
}

.ph-raid-body--clean .ph-raid-status {
    min-height: 0 !important;
    margin: 0 !important;
}

.pre-admin-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.pre-admin-time {
    margin-left: auto !important;
    color: var(--text-muted, #8b98a5) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

@media (max-width: 700px) {
    .ph-raid-body--clean .ph-raid-main,
    .ph-raid-body--clean .ph-raid-main--full {
        padding: 14px 12px 12px !important;
        gap: 12px !important;
    }

    .ph-raid-body--clean .ph-raid-top {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .ph-raid-body--clean .ph-raid-clock {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        text-align: left !important;
        padding: 10px 12px !important;
    }

    .ph-raid-body--clean .ph-raid-clock-k {
        margin-bottom: 0 !important;
    }

    .ph-raid-body--clean .ph-raid-clock-v,
    .ph-raid-body--clean #pre-countdown {
        font-size: 1.05rem !important;
        text-align: right !important;
    }

    .ph-raid-body--clean .ph-raid-desc {
        max-width: none !important;
        font-size: 12.5px !important;
    }

    .ph-activity-lb-list .lb-row,
    .ph-activity-row.lb-row {
        padding: 10px 10px !important;
        gap: 8px !important;
    }

    .ph-activity-lb-list .r-rank {
        flex: 0 0 30px !important;
        width: 30px !important;
        font-size: 11px !important;
    }

    .ph-activity-lb-list .r-name {
        font-size: 13px !important;
    }

    .ph-activity-lb-list .r-right {
        font-size: 12px !important;
    }

    .ph-winner-tag {
        margin-left: 4px !important;
        padding: 1px 6px !important;
        font-size: 9px !important;
    }

    .ph-raid-body--clean .ph-raid-actions {
        justify-content: stretch !important;
    }

    .ph-raid-body--clean .ph-raid-actions .ph-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (min-width: 701px) {
    .ph-raid-body--clean .ph-raid-main,
    .ph-raid-body--clean .ph-raid-main--full {
        padding: 20px 20px 18px !important;
    }

    .ph-activity-lb-list .r-name {
        font-size: 15px !important;
    }

    .ph-activity-lb-list .r-right {
        font-size: 14px !important;
    }
}
/* ========== /Weekly Playtime event layout ========== */


/* 20260810-feedui1 removed — see portal-feed.css */

/* 20260811-modbal1 white outline ONLY on dark name colours (not bright customs) */
.identity-name-text.is-dark-name,
.dm-msg-author-name.is-dark-name,
.post-author-name.is-dark-name,
.reel-author-name.is-dark-name,
.identity-name-text[style*="#000000"],
.identity-name-text[style*="color:#000"],
.identity-name-text[style*="color: #000"],
.identity-name-text[style*="#010101"],
.identity-name-text[style*="#0A0A0A"],
.identity-name-text[style*="#0a0a0a"],
.identity-name-text[style*="#111111"],
.dm-msg-author-name[style*="#000000"],
.post-author-name[style*="#000000"],
.reel-author-name[style*="#000000"],
.plf-ign.is-dark-name,
.plf-ign[style*="#000000"],
.plf-ign[style*="color:#000"],
.plf-ign[style*="#010101"],
.plf-ign[style*="#0A0A0A"],
.plf-ign[style*="#111111"] {
  filter: none !important;
  -webkit-text-stroke: 0 !important;
  paint-order: normal !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35) !important;
}
/* Bright custom names: NO white outline */
.plf-ign.is-custom-name:not(.is-dark-name),
.identity-name-text.is-custom-name:not(.is-dark-name),
.dm-msg-author-name.is-custom-name:not(.is-dark-name),
.post-author-name.is-custom-name:not(.is-dark-name) {
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
