/* 机选票面录屏页：热敏纸观感，无官方防伪元素 */

.ticket-pick-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
    color: #222;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html:has(.ticket-pick-page),
.ticket-pick-page {
    overflow-x: clip;
    max-width: 100%;
}

.ticket-pick-page .site-header,
.ticket-pick-page .site-footer,
.ticket-pick-page .ticket-pick-main {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.ticket-pick-page .header-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
}

.ticket-pick-page .header-mobile-toggle {
    margin: 0;
}

.ticket-pick-page .ticket-pick-main {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 12px calc(120px + env(safe-area-inset-bottom, 0px));
}

.ticket-pick-page .tp-hero,
.ticket-pick-page .tp-game-tabs,
.ticket-pick-page .ticket-card,
.ticket-pick-page .tp-controls {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tp-hero {
    text-align: center;
    margin: 0 0 16px;
    padding: 14px 16px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.07) 100%);
    border: 1px solid rgba(255, 232, 170, 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.tp-hero-kicker {
    margin: 0 0 6px;
    color: #ffe08a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
}

.ticket-pick-page .tp-page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.ticket-pick-page .tp-page-title::before,
.ticket-pick-page .tp-page-title::after {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffe08a, transparent);
}

.ticket-pick-page .tp-page-sub {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    margin: 8px 0 0;
    line-height: 1.55;
    letter-spacing: 0.02em;
}

.ticket-pick-page .tp-page-views {
    margin: 10px 0 0;
    color: rgba(255, 232, 170, 0.9);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.tp-game-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 14px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 4px;
}

.tp-game-tabs button {
    flex: 1;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
}

.tp-game-tabs button.is-on {
    background: #fff;
    color: #c62828;
}

.ticket-card {
    position: relative;
    background: #fff;
    color: #111;
    border-radius: 2px;
    padding: 18px 12px 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.ticket-card::before {
    content: "未出票";
    position: absolute;
    right: 10px;
    top: 52%;
    transform: rotate(-22deg);
    font-size: 2.4rem;
    font-weight: 800;
    color: rgba(211, 47, 47, 0.08);
    pointer-events: none;
    letter-spacing: 0.2em;
    z-index: 0;
}

.ticket-card > * {
    position: relative;
    z-index: 1;
}

.ticket-brand {
    text-align: center;
    color: #c62828;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    margin-bottom: 12px;
}

.ticket-brand h1 {
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    margin: 0;
}

.ticket-brand p {
    margin: 2px 0 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.86rem;
    margin-bottom: 14px;
    white-space: nowrap;
}

.ticket-bets {
    min-height: 7.2em;
    font-size: clamp(18px, 5.4vw, 24px);
    font-weight: 700;
    line-height: 1.9;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.ticket-bets .tp-center {
    text-align: center;
    font-weight: 700;
    margin-bottom: 4px;
}

.ticket-bets .tp-line {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    white-space: pre-wrap;
}

.ticket-bets .tp-label {
    flex: 0 0 auto;
}

.ticket-bets .tp-nums {
    flex: 1 1 auto;
}

.ticket-bets .tp-single {
    white-space: nowrap;
    max-width: 100%;
}

.ticket-bets.is-kl8-long {
    font-size: clamp(14px, 3.8vw, 18px);
    letter-spacing: 0;
}

.ticket-foot {
    font-size: 0.82rem;
    line-height: 1.65;
}

.ticket-foot .tp-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: nowrap;
}

.ticket-foot .tp-amount {
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
}

.ticket-foot .tp-amount em {
    font-style: normal;
    font-size: 1.45rem;
    margin: 0 2px;
}

.ticket-foot .tp-bets-n {
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 4px;
    opacity: 0.75;
}

.tp-pool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin-top: 2px;
    font-size: 0.86rem;
}

.tp-pool-item em {
    font-style: normal;
    margin-left: 4px;
    font-weight: 700;
}

.ticket-addr {
    margin: 6px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #333;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.ticket-hint {
    margin-top: 8px;
    color: #c62828;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 0.8rem;
}

.tp-controls {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.tp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tp-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: #555;
    min-width: 72px;
    flex: 1 1 72px;
}

.tp-row label[hidden] {
    display: none !important;
}

.tp-row select,
.tp-row input[type="number"] {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 16px;
    background: #fff;
}

.tp-mul {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tp-mul-label {
    font-size: 0.75rem;
    color: #555;
}

.tp-mul-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-mul-step button {
    width: 44px;
    height: 44px;
    border: 1px solid #e0e0e0;
    background: #f7f7f7;
    border-radius: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tp-mul-step button:active {
    background: #eee;
}

.tp-mul-step #tpMultiple {
    flex: 1;
    height: 44px;
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
}

.tp-mul-presets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.tp-mul-presets button {
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #f7f7f7;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tp-mul-presets button.is-on {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
    font-weight: 700;
}

.tp-modes {
    display: flex;
    gap: 6px;
}

.tp-modes button {
    flex: 1;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #f7f7f7;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.tp-modes button.is-on {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}

.tp-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -12px -12px;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 18%);
}

.tp-roll-hint,
.tp-amount-note {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #666;
}

.tp-amount-note {
    color: #c62828;
}

.tp-actions button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
}

.tp-btn-roll {
    background: #c62828;
    color: #fff;
    cursor: pointer;
}

.tp-btn-roll.is-rolling {
    background: #ef6c00;
}

.tp-btn-roll.is-paused {
    background: #2e7d32;
}

body.ticket-pick-rec .site-header,
body.ticket-pick-rec .site-footer,
body.ticket-pick-page .side-float-rail,
body.ticket-pick-rec .side-float-rail,
body.ticket-pick-rec .skip-nav,
body.ticket-pick-rec .tp-hero,
body.ticket-pick-rec .tp-game-tabs,
body.ticket-pick-rec .tp-controls {
    display: none !important;
}

body.ticket-pick-rec .ticket-pick-main {
    padding: 8px 12px 16px;
}
