.tier-view-page {
    min-height: 100vh;
    padding: 18px clamp(12px, 1.5vw, 28px) 42px;
    background: var(--sc-page-bg);
    color: #172033;
}

.tier-view-toolbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.tier-view-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.tier-view-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: var(--sc-font-black);
}

.tier-view-home {
    position: absolute;
    left: 0;
    min-width: 76px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    background: rgba(255,255,255,.76);
    color: #334155;
    font-weight: var(--sc-font-heavy);
    text-decoration: none;
}

.tier-view-search {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 260px 90px;
    gap: 12px;
    margin: 0 auto 28px;
}

.tier-view-search input, .tier-view-search select, .tier-view-search button {
    min-width: 0;
    height: 54px;
    border: 1px solid #0f3d57;
    border-radius: 4px;
    padding: 0 18px;
    font-size: 18px;
}

.tier-view-search input, .tier-view-search select {
    background: rgba(255,255,255,.9);
    color: #1e293b;
}

.tier-view-search button {
    background: #176886;
    color: #fff;
    font-weight: var(--sc-font-heavy);
    cursor: pointer;
}

.tier-board-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(24px, 5vw, 80px);
}

.tier-column {
    min-width: 0;
}

.tier-column h2 {
    width: min(190px, 45%);
    margin: 0 auto 18px;
    border: 1px solid #0f3d57;
    border-radius: 3px;
    padding: 12px 18px;
    background: #176886;
    color: #fff;
    text-align: center;
    font-size: 24px;
    font-weight: var(--sc-font-heavy);
}

.tier-groups {
    display: grid;
    column-gap: 28px;
    row-gap: 10px;
}

.tier-group {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 76px;
    border: 1px solid #0f3d57;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,.64);
}

.tier-group-label {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #0f3d57;
    background: rgba(255,255,255,.82);
    font-size: 18px;
    font-weight: var(--sc-font-black);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.tier-member-list {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 6px;
}

.tier-member {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: #176886;
    color: #fff;
}

.tier-member strong, .tier-member span {
    min-width: 0;
    overflow: hidden;
    padding: 9px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tier-member strong {
    border-right: 1px solid rgba(255,255,255,.72);
}

.tier-member-empty {
    padding: 18px;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 900px) {
.tier-view-search {
    grid-template-columns: 1fr 1fr;
}

    .tier-view-search input {
    grid-column: 1 / -1;
}

    .tier-board-grid {
    grid-template-columns: 1fr;
}

}

@media (max-width: 560px) {
.tier-view-page {
    padding: 16px 10px 36px;
}

    .tier-view-header {
    justify-content: flex-end;
}

    .tier-view-header h1 {
    font-size: 25px;
}

    .tier-view-search {
    grid-template-columns: 1fr;
}

    .tier-view-search input {
    grid-column: auto;
}

    .tier-group {
    grid-template-columns: 58px minmax(0, 1fr);
}

}

/* SuddenCommunity liquid-glass theme */
.tier-view-page {
    background:
        radial-gradient(circle at 8% 5%, rgba(96, 165, 250, .3), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(196, 181, 253, .3), transparent 32%),
        linear-gradient(145deg, #edf5ff 0%, #f7f4ff 50%, #eefaff 100%);
}

.tier-view-header {
    width: 100%;
    min-height: 76px;
    margin: 0 auto 18px;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 22px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 16px 42px rgba(37, 99, 235, .1);
    backdrop-filter: blur(24px);
}

.tier-view-header h1 {
    color: #14213d;
    letter-spacing: -.035em;
}

.tier-view-home {
    left: 18px;
    border-color: rgba(191, 219, 254, .82);
    border-radius: 13px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}

.tier-view-search {
    width: min(900px, 100%);
    border: 1px solid rgba(255, 255, 255, .94);
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(239, 246, 255, .58));
    box-shadow: 0 14px 34px rgba(37, 99, 235, .1);
    backdrop-filter: blur(20px);
}

.tier-view-search input,
.tier-view-search select,
.tier-view-search button {
    border-color: rgba(147, 197, 253, .72);
    border-radius: 11px;
}

.tier-view-search input:focus,
.tier-view-search select:focus {
    border-color: #2563eb;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.tier-view-search button {
    border: 0;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 10px 24px rgba(99, 102, 241, .24);
}

.tier-board-grid {
    width: 100%;
    margin: 0 auto;
    gap: 18px;
}

.tier-column {
    border: 1px solid rgba(255, 255, 255, .94);
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .76), rgba(239, 246, 255, .54));
    box-shadow: 0 16px 42px rgba(37, 99, 235, .1);
    backdrop-filter: blur(20px);
}

.tier-column h2 {
    width: 100%;
    margin-bottom: 14px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .94), rgba(124, 58, 237, .88));
    box-shadow: 0 10px 25px rgba(79, 70, 229, .2);
    font-size: 22px;
}

.tier-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

.tier-group {
    grid-template-columns: 102px minmax(0, 1fr);
    min-height: 72px;
    border-color: rgba(191, 219, 254, .88);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(239, 246, 255, .58));
    box-shadow: inset 0 1px 0 #fff, 0 7px 18px rgba(37, 99, 235, .06);
}

.tier-group-label {
    border-right-color: rgba(191, 219, 254, .88);
    background: linear-gradient(145deg, rgba(219, 234, 254, .9), rgba(237, 233, 254, .72));
    color: #234b92;
    writing-mode: horizontal-tb;
    transform: none;
}

.tier-member-list {
    gap: 0;
    padding: 7px;
}

.tier-member {
    border: 1px solid rgba(191, 219, 254, .72);
    border-radius: 0;
    background: rgba(255, 255, 255, .82);
    color: #253858;
}

.tier-member strong {
    border-right-color: rgba(191, 219, 254, .72);
    color: #172554;
}

.tier-member + .tier-member {
    margin-top: -1px;
}

.tier-member:hover {
    border-color: rgba(96, 165, 250, .9);
    background: rgba(239, 246, 255, .96);
    box-shadow: none;
}

.tier-member-empty {
    color: #94a3b8;
}

@media (max-width: 560px) {
.tier-view-header {
    padding: 12px 14px;
}

    .tier-view-home {
    left: 12px;
    min-width: 58px;
}

    .tier-column {
    padding: 12px;
}

    .tier-group {
    grid-template-columns: 74px minmax(0, 1fr);
}

    .tier-member strong, .tier-member span {
    padding: 9px 8px;
}

}

/* Dense spreadsheet layout for large member lists */
.tier-view-search {
    width: min(1120px, 100%);
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr) 210px 90px;
    gap: 10px;
}

.tier-search-divider {
    align-self: center;
    color: #475569;
    font-size: 24px;
    font-weight: var(--sc-font-black);
}

.tier-member-list {
    gap: 0;
    padding: 0;
}

.tier-member strong,
.tier-member span {
    min-height: 32px;
    padding: 5px 9px;
}

.tier-member-head {
    background: #e8f1ff;
    color: #334e78;
    font-size: 12px;
    font-weight: var(--sc-font-heavy);
}

.tier-member-head strong,
.tier-member-head span {
    color: #334e78;
    text-align: center;
}

@media (max-width: 900px) {
.tier-view-search {
    grid-template-columns: 1fr 1fr;
}

    .tier-view-search input {
    grid-column: auto;
}

    .tier-search-divider {
    display: none;
}

}

@media (max-width: 560px) {
.tier-view-search {
    grid-template-columns: 1fr;
}

}

@media (max-width: 1200px) {
.tier-board-grid {
    grid-template-columns: 1fr;
}

}

@media (max-width: 820px) {
.tier-groups {
    grid-template-columns: 1fr;
}

}

/* Independent position view and tier tracks */
.tier-view-search {
    width: auto;
    grid-template-columns: 210px 150px auto 150px 84px;
    margin: 0;
}

.tier-position-tabs {
    width: 250px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
}

.tier-position-tabs button {
    min-height: 48px;
    border: 1px solid rgba(147, 197, 253, .78);
    border-radius: 13px;
    background: rgba(255, 255, 255, .74);
    color: #475569;
    font-size: 17px;
    font-weight: var(--sc-font-heavy);
    cursor: pointer;
}

.tier-position-tabs button.active {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .2);
}

.tier-board-grid {
    grid-template-columns: minmax(0, 1fr);
}

.tier-column-single {
    width: 100%;
}

.tier-tracks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

.tier-sequential-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.tier-columns-list {
    display: grid;
    grid-template-columns: repeat(10, minmax(170px, 1fr));
    align-items: start;
    overflow-x: auto;
    border: 1px solid rgba(191, 219, 254, .9);
    border-radius: 12px;
    background: rgba(255, 255, 255, .64);
}

.tier-columns-list .tier-list-card {
    height: 100%;
    border: 0;
    border-right: 1px solid #cfe1fb;
    border-radius: 0;
}

.tier-columns-list .tier-list-card:last-child {
    border-right: 0;
}

.tier-columns-list .tier-list-card h3 {
    text-align: center;
}

.tier-columns-list .tier-name-list {
    display: block;
}

.tier-name-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tier-name-row span {
    box-sizing: border-box;
    height: 34px;
    min-width: 0;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
    padding: 5px 6px;
    color: #253858;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tier-name-row span:last-child {
    border-right: 0;
}

.tier-name-head span {
    background: #e8f1ff;
    color: #334e78;
    font-size: 11px;
    font-weight: var(--sc-font-black);
}

.tier-columns-list .tier-name-empty {
    min-height: 34px;
    justify-content: center;
    text-align: center;
}

.tier-track {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tier-list-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(191, 219, 254, .9);
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
}

.tier-list-card h3 {
    margin: 0;
    border-bottom: 1px solid rgba(191, 219, 254, .9);
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(219, 234, 254, .9), rgba(237, 233, 254, .75));
    color: #234b92;
    font-size: 15px;
    font-weight: var(--sc-font-black);
}

.tier-name-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.tier-name-cell,
.tier-name-empty {
    min-width: 0;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-right: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
    overflow: hidden;
    color: #253858;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tier-name-empty {
    justify-content: center;
    color: #94a3b8;
}

@media (max-width: 900px) {
.tier-view-search {
    grid-template-columns: 1fr 1fr;
}

    .tier-search-divider {
    display: none;
}

}

@media (max-width: 1200px) {
.tier-view-toolbar {
    align-items: stretch;
    flex-direction: column;
}

    .tier-position-tabs {
    align-self: flex-end;
}

}

@media (max-width: 640px) {
.tier-view-search,
    .tier-tracks {
    grid-template-columns: 1fr;
}

}

.tier-view-page {
    background: var(--sc-page-bg);
}

.tier-view-search {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.tier-view-menu {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 14px;
}

.tier-view-menu a,
.tier-view-menu button {
    min-width: 98px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 13px;
    background: rgba(255, 255, 255, .72);
    color: #334155;
    font-size: 14px;
    font-weight: var(--sc-font-heavy);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(37, 99, 235, .07);
}

.tier-view-menu button {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}

.tier-view-apply-form .tier-view-apply-barracks {
    grid-column: 1 / -1;
}

.tier-user-not-found {
    width: min(420px, 100%);
    text-align: center;
}

.tier-user-not-found > p {
    margin: 8px 0 18px;
}

.tier-view-content {
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 22px;
    padding: 20px;
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 18px 48px rgba(37, 99, 235, .1);
    backdrop-filter: blur(20px);
}

/* Compact board-style header and fluid no-scroll layout */
.tier-view-header {
    min-height: 128px;
    justify-content: flex-start;
    overflow: hidden;
    padding: 22px 28px;
    text-align: left;
}

.tier-view-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #2563eb, #7c3aed);
}

.tier-view-heading h1 {
    margin: 0 0 6px;
    font-size: clamp(32px, 3vw, 44px);
}

.tier-view-heading p {
    margin: 0;
    color: #52627d;
    font-size: 15px;
    font-weight: 750;
}

.tier-view-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 460px) minmax(120px, 1fr);
    grid-template-rows: auto;
    align-items: center;
    gap: 14px;
    overflow: visible;
}

.tier-view-search {
    width: 100%;
    display: grid;
    gap: 6px;
}

.tier-general-search {
    grid-template-columns: minmax(180px, 1fr) 68px;
    width: min(320px, 100%);
    justify-self: start;
}

.tier-view-tools-right {
    display: contents;
}

.tier-position-tabs {
    width: auto;
    display: flex;
    gap: 5px;
    margin: 0;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.tier-compare-search {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr) 68px;
    width: min(460px, 100%);
    justify-self: center;
}

.tier-view-search input,
.tier-view-search select,
.tier-view-search button,
.tier-position-tabs button {
    height: 42px;
    min-height: 42px;
    padding: 0 10px;
    font-size: 14px;
}

.tier-position-tabs button {
    min-width: 58px;
}

.tier-search-divider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    font-size: 26px;
    font-weight: var(--sc-font-black);
    line-height: 1;
}

.tier-search-divider.hidden {
    visibility: hidden;
}

.tier-columns-list {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    overflow-x: visible;
}

.tier-columns-list .tier-list-card h3 {
    padding: 8px 3px;
    font-size: clamp(10px, 1vw, 14px);
}

.tier-name-row span {
    min-height: 30px;
    padding: 4px 2px;
    font-size: clamp(8px, .72vw, 12px);
}

.tier-name-head span {
    font-size: clamp(7px, .62vw, 10px);
}

@media (max-width: 820px) {
.tier-view-page {
    padding-inline: 6px;
}

    .tier-view-header {
    min-height: 106px;
    padding: 16px 18px;
}

    .tier-view-menu a {
    min-width: 76px;
    min-height: 38px;
    font-size: 12px;
}

    .tier-view-content {
    border-radius: 15px;
    padding: 8px;
}

    .tier-view-heading p {
    font-size: 12px;
}

    .tier-view-toolbar {
    grid-template-columns: minmax(140px, .7fr) minmax(0, 1.3fr);
    gap: 6px;
}

    .tier-compare-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
}

    .tier-position-tabs {
    grid-column: 2;
}

    .tier-position-tabs button {
    min-width: 42px;
    padding: 0 5px;
}

    .tier-view-search input,
    .tier-view-search select,
    .tier-view-search button,
    .tier-position-tabs button {
    height: 36px;
    min-height: 36px;
    font-size: 11px;
}

    .tier-general-search {
    grid-template-columns: 62px minmax(70px, 1fr) 48px;
}

    .tier-compare-search {
    grid-template-columns: minmax(52px, 1fr) auto minmax(52px, 1fr) 48px;
}

    .tier-column {
    padding: 6px;
}

    .tier-column h2 {
    padding: 8px;
    font-size: 16px;
}

    /* Keep five readable tiers per row: 3.5 tier starts the second row. */
    .tier-columns-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

    .tier-columns-list .tier-list-card:nth-child(5) {
    border-right: 0;
}

    .tier-columns-list .tier-list-card:nth-child(-n + 5) {
    border-bottom: 1px solid #cfe1fb;
}

    .tier-columns-list .tier-list-card h3 {
    padding: 9px 2px;
    font-size: 12px;
}

    .tier-name-row span,
    .tier-name-head span,
    .tier-columns-list .tier-name-empty {
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    padding: 5px 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

}

@media (min-width: 769px) and (max-width: 1000px) {
.tier-columns-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

    .tier-columns-list .tier-list-card:nth-child(5) {
    border-right: 0;
}

    .tier-columns-list .tier-list-card:nth-child(-n + 5) {
    border-bottom: 1px solid #cfe1fb;
}

    .tier-columns-list .tier-list-card h3 {
    padding: 9px 3px;
    font-size: 13px;
}

    .tier-name-row span,
    .tier-name-head span,
    .tier-columns-list .tier-name-empty {
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    padding: 5px 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

}

/* Combined tier rows */
.tier-view-menu { justify-content: flex-start; }
.tier-view-toolbar {
    display: grid;
    grid-template-columns: minmax(360px, 440px) minmax(550px, 1fr);
    align-items: center;
    gap: 10px;
}
.tier-view-toolbar .tier-general-search {
    grid-template-columns: minmax(260px, 1fr) 56px;
    width: min(420px, 100%);
    margin: 0;
}

.tier-view-toolbar .tier-general-search button {
    width: 56px;
    padding-inline: 6px;
}

.tier-step-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
}

.tier-view-toolbar .tier-compare-search {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    margin: 0;
    justify-self: end;
}

.tier-step-filter button {
    min-width: 64px;
    width: auto;
    height: 38px;
    border: 1px solid rgba(147, 197, 253, .9);
    border-radius: 10px;
    background: rgba(255, 255, 255, .8);
    color: #405273;
    padding: 0 3px;
    font-size: clamp(9px, .72vw, 12px);
    font-weight: var(--sc-font-heavy);
    cursor: pointer;
}

.tier-step-filter button.active {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .2);
}

.tier-split-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
}

.tier-position-board {
    min-width: 0;
}

.tier-position-title {
    margin: 0 0 12px;
    border-radius: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: var(--sc-font-black);
}

.tier-position-sections {
    display: grid;
    gap: 12px;
}

.tier-combined-section {
    overflow: hidden;
    border: 1px solid rgba(191, 219, 254, .92);
    border-radius: 14px;
    background: rgba(255, 255, 255, .74);
}

.tier-combined-section h3 {
    margin: 0;
    border-bottom: 1px solid rgba(191, 219, 254, .92);
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(219, 234, 254, .94), rgba(237, 233, 254, .82));
    color: #234b92;
    font-size: 18px;
    font-weight: var(--sc-font-black);
}

.tier-combined-table-wrap { overflow-x: hidden; }

.tier-combined-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.tier-combined-table th,
.tier-combined-table td {
    width: 33.333%;
    border-right: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
    padding: 10px clamp(3px, .65vw, 12px);
    color: #253858;
    text-align: center;
    font-size: clamp(10px, .78vw, 14px);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.tier-combined-table th:last-child,
.tier-combined-table td:last-child { border-right: 0; }
.tier-combined-table tbody tr:last-child td { border-bottom: 0; }

.tier-combined-table th {
    background: #e8f1ff;
    color: #334e78;
    font-size: clamp(9px, .72vw, 13px);
    font-weight: var(--sc-font-black);
}

.tier-combined-table td { font-weight: 750; }
.tier-combined-table tr.highlighted td { background: #fef3c7; }

.tier-cell-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.tier-combined-table .tier-combined-empty {
    width: auto;
    padding: 16px;
    color: #94a3b8;
}

@media (max-width: 820px) {
    .tier-step-filter {
        width: 100%;
        overflow: visible;
        gap: 2px;
    }
    .tier-step-filter button {
        height: 34px;
        padding: 0 1px;
        font-size: 9px;
    }
    .tier-split-board {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .tier-position-sections { gap: 10px; }
    .tier-combined-section h3 {
        padding: 10px 12px;
        font-size: 16px;
    }
    .tier-combined-table th,
    .tier-combined-table td {
        padding: 7px 2px;
        font-size: 9px;
    }
    .tier-position-title {
        margin-bottom: 7px;
        padding: 9px 4px;
        font-size: 16px;
    }
    .tier-cell-value {
        gap: 2px;
    }
}

@media (max-width: 1200px) {
    .tier-view-toolbar {
        grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    }

    .tier-step-filter {
        display: grid;
        grid-template-columns: repeat(9, minmax(0, 1fr));
        justify-content: flex-end;
    }

    .tier-step-filter button {
        min-width: 0;
        width: 100%;
    }

    .tier-view-toolbar .tier-compare-search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: min(460px, 100%);
    }
}

@media (max-width: 820px) {
    .tier-view-toolbar {
        grid-template-columns: 1fr;
    }

    .tier-step-filter,
    .tier-view-toolbar .tier-compare-search {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        justify-self: stretch;
    }

    .tier-view-toolbar .tier-general-search {
        grid-template-columns: minmax(0, 1fr) 52px;
        width: 100%;
    }

    .tier-view-toolbar .tier-general-search button {
        width: 52px;
    }
}

.tier-view-menu {
    justify-content: flex-start;
}

.tier-view-menu .board-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 96px;
    min-height: 42px;
    height: 42px;
    border: 0;
    border-radius: 9px;
    background: #ffffff;
    color: #172033;
    box-shadow: none;
    font-size: 13px;
    font-weight: 700;
    padding: 0 14px;
    text-decoration: none;
    white-space: nowrap;
}

.tier-view-menu .tier-view-register-button {
    min-width: 104px;
    min-height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .2);
}

@media (max-width: 820px) {
    .tier-view-menu .board-home-button {
        min-width: 82px;
        height: 42px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 14px;
    }
}

/* In-page board switcher below the nickname search */
.tier-view-search-group {
    display: grid;
    gap: 8px;
    width: min(420px, 100%);
}

.tier-view-toolbar .tier-view-search-group .tier-general-search {
    width: 100%;
}

.tier-board-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
}

.tier-board-tabs button {
    min-height: 40px;
    border: 1px solid rgba(147, 197, 253, .9);
    border-radius: 10px;
    background: rgba(255, 255, 255, .86);
    color: #405273;
    font-size: 14px;
    font-weight: var(--sc-font-black);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.tier-board-tabs button:hover {
    border-color: #6366f1;
    color: #4338ca;
}

.tier-board-tabs button.active {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .2);
}

.tier-board-tabs button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .28);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .tier-view-search-group {
        width: 100%;
    }

    .tier-board-tabs button {
        min-height: 38px;
        font-size: 13px;
    }
}
.tier-combined-table tbody tr:not(:has(.tier-combined-empty)) {
    cursor: pointer;
}

.tier-user-info-modal {
    width: min(460px, calc(100vw - 32px));
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    color: #17233d;
}

.tier-user-info-modal h2 { margin: 0 0 18px; font-weight: 900; }
.tier-user-info-modal dl { margin: 0; }
.tier-user-info-modal dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 49px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.tier-user-info-modal dt { color: #64748b; font-weight: 800; }
.tier-user-info-modal dd { margin: 0; color: #17233d; font-weight: 800; overflow-wrap: anywhere; }
.tier-user-info-modal a { color: #2563eb; }
.tier-user-info-modal .tier-soop-station-link { display: inline; font-weight: 900; line-height: inherit; text-underline-offset: 3px; }
.tier-user-info-modal > .tier-user-info-close { width: 100%; margin-top: 20px; border: 0; border-radius: 11px; padding: 11px; background: #2563eb; color: #fff; font-weight: 850; cursor: pointer; }
.tier-user-info-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 20px; }
.tier-user-info-actions button { min-width: 0; border: 0; border-radius: 11px; padding: 11px 8px; background: #2563eb; color: #fff; font-weight: 850; cursor: pointer; }
.tier-user-info-actions button:nth-child(2) { background: #6d4df5; }
.tier-user-info-actions button.cancel { background: #e8eef7; color: #52627a; }
.tier-user-info-actions button:disabled { cursor: wait; opacity: .65; }

.tier-change-success-backdrop { z-index: 1220; }
.tier-change-success-modal { width: min(390px, calc(100vw - 32px)); padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .3); text-align: center; color: #17233d; }
.tier-change-success-modal h2 { margin: 0 0 12px; font-size: 24px; font-weight: 900; }
.tier-change-success-modal p { margin: 0; color: #52627a; font-size: 17px; font-weight: 800; }
.tier-change-success-modal button { width: 100%; margin-top: 22px; border: 0; border-radius: 11px; padding: 11px; background: #2563eb; color: #fff; font-weight: 850; cursor: pointer; }

.tier-registration-notice-modal {
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.96);
    border-radius: 24px;
    padding: 30px;
    background: #fff;
    color: #17233d;
    box-shadow: 0 28px 80px rgba(15,23,42,.32);
}
.tier-registration-notice-eyebrow { margin: 0 0 7px; color: #7c3aed; font-size: 12px; font-weight: 950; letter-spacing: .1em; }
.tier-registration-notice-modal h2 { margin: 0 0 20px; font-size: clamp(22px,4vw,28px); font-weight: 950; }
.tier-registration-notice-copy { display: grid; gap: 13px; border-radius: 16px; padding: 20px; background: #f8fafc; color: #52627a; line-height: 1.7; }
.tier-registration-notice-copy p { margin: 0; }
.tier-registration-notice-copy .warning,
.tier-registration-notice-copy strong { color: #dc2626; font-weight: 950; }
.tier-registration-notice-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.tier-registration-notice-actions button { min-height: 50px; border: 0; border-radius: 13px; font: inherit; font-weight: 900; cursor: pointer; }
.tier-registration-notice-actions .cancel { background: #e2e8f0; color: #475569; }
.tier-registration-notice-actions .register { background: linear-gradient(135deg,#2563eb,#6d4df5); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.22); }

.tier-registration-success-modal { width: min(390px, calc(100vw - 32px)); border-radius: 24px; padding: 30px; background: #fff; color: #17233d; box-shadow: 0 28px 80px rgba(15,23,42,.3); text-align: center; }
.tier-registration-success-icon { width: 54px; height: 54px; display: inline-grid; place-items: center; margin-bottom: 16px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 27px; font-weight: 950; }
.tier-registration-success-modal h2 { margin: 0 0 9px; font-size: 24px; font-weight: 950; }
.tier-registration-success-modal p { margin: 0; color: #64748b; }
.tier-registration-success-modal button { width: 100%; min-height: 48px; margin-top: 22px; border: 0; border-radius: 12px; background: #2563eb; color: #fff; font-weight: 900; cursor: pointer; }

@media (max-width: 600px) {
    .tier-user-info-modal { padding: 24px 28px 28px; }
    .tier-user-info-modal dl > div { grid-template-columns: 110px minmax(0, 1fr); }
    .tier-registration-notice-modal { padding: 24px 20px; }
    .tier-registration-notice-copy { padding: 17px; font-size: 14px; }
}
