/* ================================================================
   网站停靠页 · HUD 工业风单屏
   白底 / 黑字 / 信号红 #e91c00，中文创粗黑 + 数字 DIN 1451
   ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-style: normal;
    outline: none;
}

:root {
    /* 无背景图时的整屏底色；有背景图时作为透明区垫色 */
    --canvas-color: #ffffff;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--canvas-color);
    -webkit-text-size-adjust: 100%;
}

@font-face {
    font-family: 'DIN 1451 LT W06 Mittelschrift';
    font-style: normal;
    font-weight: 100;
    src: url(https://uhmao.com/static/font/Mittelschrift.otf)
}

@font-face {
    font-family: '字魂59号-创粗黑';
    font-style: normal;
    font-weight: 100;
    src: url(https://uhmao.com/static/font/%E5%AD%97%E9%AD%8259%E5%8F%B7-%E5%88%9B%E7%B2%97%E9%BB%91.ttf)
}

div#app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.app-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--canvas-color);
}

/* ===== 背景图预留层（config.bg 为空时不显示）===== */
.app-stage-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    /* cover：等比铺满、居中裁切，不拉伸变形 */
    display: none;
}

.app-stage.has-bg .app-stage-bg {
    display: block;
}

/* ===== 文字块 ===== */
/* 结构与空间站海报完全一致：32px 基准、横向排布、间距全用 px 写死，
   所以任何屏宽下比例都不会变。JS 测量整块自然尺寸后按视口做一次等比
   scale —— 只缩不放结构，不做折行、不做断点改写。 */
.app-stage-role {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    width: max-content;
    font-size: 32px;
    color: #18191c;
    user-select: none;
    -webkit-user-select: none;
}

/* 一根贯通的红竖条：左缘在「预计恢复」左缘，自该行顶边连到英文块底边 */
.app-stage-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #e91c00;
}

.app-stage-top {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

/* 左列：宽度由 JS 按标题 / 引导词的自然宽度写入。
   两行都以右缘锚定在列右沿，文案变长时向左生长，绝不压到右侧时间。 */
.app-stage-head {
    position: relative;
    width: 224px;
    flex: 0 0 auto;
}

.app-stage-head-row {
    position: relative;
    height: 1.2em;
}

.app-stage-title,
.app-stage-lead {
    position: absolute;
    top: 0;
    right: 0;
    white-space: nowrap;
    font-family: '字魂59号-创粗黑', sans-serif;
}

.app-stage-lead {
    padding-left: 10px;
}

/* ===== 时间区（间距 / 字号 / 颜色与空间站海报完全同一套）===== */
.app-stage-time {
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
}

.tg {
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
}

/* 数字：DIN / 200% / 信号红 */
.app-stage-time .tg .num {
    font-family: "DIN 1451 LT W06 Mittelschrift", sans-serif;
    font-size: 200%;
    line-height: 100%;
    color: #e91c00;
}

/* 中文单位：与数字底部对齐 */
.app-stage-time .tg .unit {
    font-family: '字魂59号-创粗黑', sans-serif;
    white-space: nowrap;
}

/* 单段「35 分钟」→ 沿用海报 short 格式的间距 */
.app-stage-time.single .tg .num {
    margin: 0 8px;
}

/* 多段「1天 2时 30分」→ 沿用海报 long 格式的间距（数字贴自己的单位，组间 7px 呼吸） */
.app-stage-time.multi .tg .num {
    margin: 0 1px;
}

.app-stage-time.multi .tg:first-child .num {
    margin-left: 4px;
}

.app-stage-time.multi .tg + .tg .num {
    margin-left: 7px;
}

/* ===== 英文块：左缩进 = 红竖条左缘 + 竖条宽 + 8（JS 写入）===== */
/* width:max-content 让它按最长的那行英文撑开，这样整块的「自然宽」把英文行
   也算进去，等比缩放时不会出现英文行单独冲出右边、视觉重心偏左的问题。 */
.app-stage-bottom {
    margin-left: 173px;
    align-self: flex-start;
    width: max-content;
    max-width: none;
    font-family: "DIN 1451 LT W06 Mittelschrift", '字魂59号-创粗黑', sans-serif;
    font-size: 50%;
    text-transform: uppercase;
    color: #18191c;
}

/* 英文标题一行到底（换行位置由文案决定），超长时向右延伸，不按宽度折行 */
.app-stage-bottom-top {
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.25;
}

.app-stage-bottom-bottom {
    margin-top: 0.35em;
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    white-space: nowrap;
}

.app-stage-en-lead {
    flex: 0 0 auto;
}

/* 英文时间与海报同一套：数字不放大、不染红，只沿用本行字体；
   组内「1 DAY」贴紧，组间留 0.55em，层次与中文那行一致 */
.app-stage-en-time {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}

.app-stage-en-time .tg {
    display: flex;
    align-items: baseline;
}

.app-stage-en-time .tg .num {
    font-family: "DIN 1451 LT W06 Mittelschrift", sans-serif;
    font-size: 100%;
    line-height: 100%;
    color: inherit;
    margin: 0 1px;
}

.app-stage-en-time .tg .unit {
    font-family: "DIN 1451 LT W06 Mittelschrift", sans-serif;
    line-height: 100%;
    margin-left: 0.2em;
}

.app-stage-en-time .tg + .tg .num {
    margin-left: 0.55em;
}

/* ===== 页脚：站点名 + ICP 备案号 ===== */
/* 固定贴视口底部，不参与中间文字块的等比缩放 —— 它是合规信息，
   无论在什么屏宽下都保持可读的固定小字号。 */
.app-stage-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35em;
    padding: 0 16px calc(13px + env(safe-area-inset-bottom, 0px));
    font-family: '字魂59号-创粗黑', "DIN 1451 LT W06 Mittelschrift", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #80858c;
    text-align: center;
    pointer-events: none;
}

.app-stage-footer-dot {
    color: #c2c6cc;
}

.app-stage-footer-icp {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
    pointer-events: auto;
}

.app-stage-footer-icp:hover,
.app-stage-footer-icp:focus-visible {
    color: #e91c00;
    border-bottom-color: currentColor;
}

/* 有背景图时转白字加投影，避免压在深色图上糊成一团 */
.app-stage.has-bg .app-stage-footer {
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.app-stage.has-bg .app-stage-footer-dot {
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 400px) {
    .app-stage-footer {
        font-size: 11px;
        gap: 0.4em;
    }
}
