:root {
    --bg: #fff;
    --text: #1a1a1a;
    --subtle: #8c8c8c;
    --wx: #07c160
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased
}

img {
    max-width: 100%;
    display: block
}

#app {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
}

.page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.safe-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: #f7fbf8;
    border-bottom: 1px solid #eef8f1;
    color: var(--wx);
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0
}

.safe-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(7, 193, 96, 0.1);
    color: var(--wx);
    flex-shrink: 0
}

.main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-title {
    width: 100%;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.45;
    text-align: center;
    font-weight: 600;
    color: var(--text);
    padding: 0 2%;
}

.note {
    width: 100%;
    margin: 8px 0 0;
    line-height: 1.7;
    font-size: 14px;
    text-align: center;
    white-space: pre-line;
    word-break: break-word;
    color: var(--subtle);
}

.media-wrap {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px
}

.qrcode-link,
.media-link {
    display: block;
    width: 96%;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent
}

.qrcode-box,
.media-box {
    width: 96%
}

.qrcode-link img,
.qrcode-box img,
.media-link img,
.media-box img {
    width: 100%;
    max-height: 80vh;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto
}

.lc-jump-link {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent
}

.lc-jump-img {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent
}

.warn-box {
    width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 24px 16px;
}

.warn-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fef3c7;
    color: #d97706;
    font-size: 36px;
    line-height: 72px
}

.warn-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.7
}

.lc-retry-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 28px;
    border: 0;
    border-radius: 8px;
    background: var(--wx);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent
}

#loading {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--subtle)
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(7, 193, 96, 0.2);
    border-top-color: var(--wx);
    border-radius: 50%;
    animation: spin 0.8s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

body.iframe-mode,
body.iframe-mode #app {
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden
}

body.iframe-mode #app {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh
}

.lc-full-iframe {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff
}

/* iframe 节点由 HTML 静态提供，默认隐藏；由 dispatch.js 控制显示状态。 */
#lc-content-iframe {
    display: none;
}

#lc-content-iframe.is-visible {
    display: block;
}
