/* Shared top shell for all Wangzhongwang lottery entries. */
:root {
    --wzw-ink: #101416;
    --wzw-carbon: #1a1e20;
    --wzw-red: #8d1018;
    --wzw-red-bright: #c92b34;
    --wzw-gold: #c8a05a;
    --wzw-paper: #f6f3ec;
    --wzw-line: #d9d1c2;
}

* { box-sizing: border-box; }

html,
body {
    width: 100%;
    height: 326px;
    margin: 0;
    overflow: hidden;
    background: #101416;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0 auto;
    color: var(--wzw-ink);
    background: var(--wzw-paper);
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(201, 43, 52, .18);
}

.wzw-masthead {
    position: relative;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 8px 13px;
    overflow: hidden;
    color: #fffdf5;
    background:
        linear-gradient(90deg, rgba(201, 43, 52, .16), transparent 46%),
        var(--wzw-carbon);
    border-bottom: 3px solid var(--wzw-gold);
}

.wzw-masthead:after {
    position: absolute;
    top: 0;
    right: -38px;
    width: 150px;
    height: 100%;
    content: "";
    transform: skewX(-24deg);
    background: linear-gradient(135deg, transparent 19%, rgba(201, 43, 52, .42) 20%, rgba(201, 43, 52, .42) 47%, transparent 48%);
    pointer-events: none;
}

.wzw-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.wzw-brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    padding: 4px;
    border: 1px solid rgba(200, 160, 90, .82);
    border-radius: 8px;
    background: #121719;
    object-fit: contain;
}

.wzw-brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1;
}

.wzw-brand-name {
    color: #fffdf5;
    font-size: 29px;
    font-weight: 900;
    letter-spacing: 3px;
    white-space: nowrap;
}

.wzw-brand-caption {
    margin-top: 6px;
    color: #dbc18c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}

.wzw-edition {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-width: 74px;
    padding: 7px 8px 6px;
    border: 1px solid rgba(200, 160, 90, .72);
    border-radius: 6px;
    background: rgba(0, 0, 0, .17);
    color: #f7e0a9;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

.wzw-edition b {
    display: block;
    margin-top: 2px;
    color: #fffdf5;
    font-size: 15px;
    letter-spacing: 1px;
}

.wzw-nav {
    flex: 0 0 88px;
    padding: 9px 10px 8px;
    background: var(--wzw-paper);
    border-bottom: 1px solid var(--wzw-line);
}

.wzw-channel-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.wzw-channel-row a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 35px;
    border: 1px solid #beb6a8;
    border-radius: 5px;
    background: #fffdf7;
    color: #303638;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.wzw-channel-row a.active {
    border-color: var(--wzw-red);
    background: var(--wzw-red);
    color: #fffdf5;
    box-shadow: inset 0 -3px 0 rgba(70, 0, 5, .26);
}

.wzw-tool-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-top: 7px;
}

.wzw-tool-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 27px;
    border-left: 2px solid var(--wzw-gold);
    background: #ebe6dc;
    color: #45413a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.wzw-tool-row a:active,
.wzw-channel-row a:active { transform: translateY(1px); }

.wzw-draw-wrap {
    flex: 1;
    min-height: 0;
    padding: 8px 10px 9px;
    background: #e8e4dc;
}

.wzw-draw-card {
    width: 100%;
    height: 156px;
    overflow: hidden;
    border: 1px solid #b8afa2;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 13px rgba(24, 27, 28, .14);
}

.wzw-draw-card iframe {
    display: block;
    width: 100%;
    height: 162px;
    border: 0;
}

@media (max-width: 380px) {
    html,
    body { height: 318px; }
    .wzw-masthead { flex-basis: 67px; padding: 7px 9px; }
    .wzw-brand { gap: 7px; }
    .wzw-brand-mark { width: 49px; height: 49px; }
    .wzw-brand-name { font-size: 25px; }
    .wzw-brand-caption { margin-top: 5px; font-size: 10px; }
    .wzw-edition { min-width: 67px; padding: 6px; font-size: 11px; }
    .wzw-edition b { font-size: 13px; }
    .wzw-nav { flex-basis: 84px; padding: 8px 7px 7px; }
    .wzw-channel-row { gap: 4px; }
    .wzw-channel-row a { height: 33px; font-size: 14px; }
    .wzw-tool-row { gap: 4px; margin-top: 6px; }
    .wzw-tool-row a { height: 25px; font-size: 11px; }
    .wzw-draw-wrap { padding: 7px; }
    .wzw-draw-card { height: 153px; }
}
