.screen-root {
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: #ffffff;
    color: #2c2c2b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    box-sizing: border-box;
}

body {
    margin: 0;
}

html.screen-mode-a,
body.screen-mode-a {
    width: 570px;
    height: 560px;
    overflow: hidden;
}

body.screen-mode-a {
    background: #ffffff;
}

body.screen-mode-a .screen-root {
    width: 570px;
    height: 560px;
    background: #ffffff;
}

html.screen-mode-b,
body.screen-mode-b {
    width: 720px;
    height: 400px;
    overflow: hidden;
}

body.screen-mode-b {
    background: #d6d8cd;
}

body.screen-mode-b .screen-root {
    width: 720px;
    height: 400px;
    background: #d6d8cd;
}

.screen-layout-a {
    width: 570px;
    height: 560px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    letter-spacing: 1.5px;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.screen-layout-a-header {
    display: flex;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    column-gap: 8px;
    height: 77.88px;
    box-sizing: border-box;
    background: #009fe3;
    color: #ffffff;
    font-weight: 700;
    font-size: 42.84px;
    flex-shrink: 0;
    padding: 0 0 0 36px;
    gap: 32px;
}

.screen-layout-a-logo {
    width: 60px;
    height: 60px;
    display: block;
    object-fit: contain;
}

.screen-layout-a-header-title {
    text-align: center;
    line-height: 1.05;
    font-size: 42.84px;
    white-space: nowrap;
}

.screen-layout-a-header-spacer {
    width: 60px;
    height: 60px;
    display: none;
}

.screen-layout-a-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    color: #141414;
    padding: 0 24px 24px;
    min-height: 0;
    box-sizing: border-box;
}

.screen-layout-a-bus-icon {
    margin-top: 20px;
    flex-shrink: 0;
    line-height: 0;
    text-align: center;
}

.screen-layout-a-bus-icon img {
    height: 114px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* 原型 .bus-info-section-tag：Arrival/Departure Time */
.screen-layout-a-time-label {
    margin-top: 0;
    padding: 6px 0 10px;
    font-size: 26px;
    font-weight: 800;
    color: #009fe3;
    text-align: center;
    background: #ffffff;
    flex-shrink: 0;
}

/* 原型 .eta-caption：Service / Next Bus / Subsequent Bus */
.screen-layout-a-col-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin-top: 16px;
    box-sizing: border-box;
    font-size: 22px;
    font-weight: 500;
    color: #141414;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.screen-layout-a-col-service {
    width: 33%;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
}

.screen-layout-a-col-times {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 67%;
}

.screen-layout-a-col-next,
.screen-layout-a-col-sub {
    width: 50%;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
}

.screen-layout-a-route-list {
    padding: 0;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 26px;
}

.screen-layout-a-route-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    margin-top: 26px;
    gap: 20px;
}

.screen-layout-a-route-name-wrap {
    width: 33%;
    min-width: 0;
}

.screen-layout-a-route-name {
    letter-spacing: 0;
    margin: 0;
    color: #141414;
    text-align: left;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: keep-all;
}

.screen-layout-a-route-name-paren {
    display: block;
    font-size: 16px;
}

/* 与表头列宽一致，保证标题与数值垂直居中对齐 */
.screen-layout-a-route-times {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    width: 67%;
}

.screen-layout-a-route-row-merged .screen-layout-a-route-times {
    justify-content: center;
}

.screen-layout-a-route-eta {
    flex-grow: 1;
    color: #141414;
    line-height: 1.3;
    margin: 0;
    text-align: center;
    box-sizing: border-box;
    width: 50%;
}

.screen-layout-a-route-merge {
    min-width: 240px;
    width: 100%;
    color: #141414;
    text-align: center;
    line-height: 1.3;
}

.screen-layout-a-route-eta-state-departing,
.screen-layout-a-route-eta-state-arrived {
    color: #141414;
}

.screen-layout-a-route-eta-state-done {
    color: #141414;
}

.screen-layout-b-wrap {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: #876945;
}

.screen-layout-b {
    width: 720px;
    height: 400px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #D9CBBC;
    border-radius: 32px;
    overflow: hidden;
}

.screen-layout-b-card-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 24px 0;
    flex-shrink: 0;
}

.screen-layout-b-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #352e17;
    color: #ffffff;
    border-radius: 32px;
    padding: 4px 0px 4px 32px;
    font-size: 36px;
    font-weight: 800;
    position: relative;
    width: 60%;
    justify-content: center;
}

.screen-layout-b-icon-yellow {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #feb51f;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
}

.screen-layout-b-icon-yellow-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.screen-layout-b-card-title {
    white-space: nowrap;
    text-align: center;
}

.screen-layout-b-up-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    font-weight: 800;
    color: #352e17;
    line-height: 1;
}

.screen-layout-b-time-label {
    padding: 10px 28px;
    font-size: 22px;
    font-weight: 700;
    color: #352e17;
    text-align: center;
    flex-shrink: 0;
}

.screen-layout-b-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 28px 0;
    font-size: 25px;
    font-weight: 700;
    color: #6b6247;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.screen-layout-b-col-service {
    width: 33%;
    min-width: 0;
    white-space: nowrap;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #352e17;
}

.screen-layout-b-col-times {
    display: flex;
    gap: 10px;
    color: #352e17;
    width: 66%;
    text-align: center;
}

.screen-layout-b-col-next,
.screen-layout-b-col-sub {
    width: var(--screen-layout-b-pill-width, 120px);
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screen-layout-b-route-list {
    padding: 10px 28px 18px;
    gap: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    min-height: 0;
    width: 100%;
    min-width: 0;
}

.screen-layout-b-route-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.screen-layout-b-route-name {
    flex: 1 1 33%;
    min-width: 0;
    font-size: 28px;
    font-weight: 800;
    color: #352e17;
    line-height: 1.2;
    margin: 0;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.screen-layout-b-route-times {
    display: flex;
    width: 66%;
    gap: 10px;
    align-items: center;
    min-width: var(--screen-layout-b-pill-width, 120px);
}

.screen-layout-b-route-row-merged .screen-layout-b-pill {
    /*justify-content: center;*/
    /*min-width: calc(var(--screen-layout-b-pill-width, 120px) * 2 + 10px);*/
    width: 100%;
}

.screen-layout-b-route-name-paren {
    display: block;
    font-size: 20px;
}

.screen-layout-b-pill {
    background: #352e17;
    color: #ffffff;
    font-weight: 600;
    border-radius: 999px;
    padding: 0px 20px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    width: 50%;
}

.screen-layout-b-pill-text {
    font-size: 26px;
    font-weight: 600;
    color: inherit;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.screen-layout-b-pill-measure {
    padding: 4px 20px;
    font-size: 17px;
    font-weight: 600;
}

.screen-layout-b-pill-state-departing,
.screen-layout-b-pill-state-arrived {
    background: #352e17;
    border-color: #352e17;
    color: #ffffff;
}

.screen-layout-b-pill-state-done {
    background: #8b8676;
    border-color: #8b8676;
    color: #ffffff;
}

/* Subsequent Bus：对齐原型 .pill-next — 时间点透明底+描边；空槽/停运仍用 state-done 灰底 */
.screen-layout-b-pill[data-role="subsequent"]:not(.screen-layout-b-pill-state-done):not(.screen-layout-b-pill-state-departing):not(.screen-layout-b-pill-state-arrived) {
    background: transparent;
    color: #352e17;
    border-color: #352e17;
}

/* 兜底：保留 Layout 外壳，内容区居中提示 */
.screen-fallback-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    padding: 24px 32px;
}

.screen-fallback-empty-b {
    padding: 22px 28px;
}

.screen-fallback-message {
    margin: 0;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.screen-fallback-message-a {
    font-size: 28px;
    color: #141414;
    letter-spacing: 0;
}

.screen-fallback-message-b {
    font-size: 22px;
    color: #352e17;
}
html {
    background: #876945;
}
html.screen-mode-c,
body.screen-mode-c {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.screen-mode-c {
    background: #000000;
}

/* 设计稿 2835×2835：按视口较短边等比铺满，居中；真机方屏上仍为整屏 */
body.screen-mode-c .screen-root {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.screen-layout-c {
    width: min(100vw, 100vh);
    height: min(100vw, 100vh);
    max-width: 2835px;
    max-height: 2835px;
    position: relative;
    overflow: hidden;
}

.screen-layout-c-stage {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000000;
    container-type: inline-size;
}

.screen-layout-c-map {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screen-layout-c-stage.screen-layout-c-map-failed .screen-layout-c-map {
    opacity: 0;
}

.screen-layout-c-map-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4%;
    color: #4b3801;
    background: #f8931f;
    font-size: 4.2cqw;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.screen-layout-c-overlay {
    position: absolute;
    left: 50.8%;
    top: 29.8%;
    width: 42.2%;
    height: 7.4%;
    background: #f8931f;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 2% 0 0;
    box-sizing: border-box;
}

/* map=C（Shuttle）底图文案区位置单独下移 */
.screen-layout-c[data-map="C"] .screen-layout-c-overlay {
    top: 37%;
}

.screen-layout-c-overlay-text {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-weight: 700;
    color: #4b3801;
    font-size: 4.2cqw;
    white-space: nowrap;
    line-height: 1;
    text-align: left;
}

