#game-safe-area.mobile-viewport,
.mobile-viewport {
    width: 100%;
    height: 100dvh !important;
    position: relative;
    background: #e0f7fa; /* Match towerfill var(--bg-primary) */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.anchor-ad {
    height: 50px;
    background: #ffffff;
    border-bottom: 1px solid #eee;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; color: #999;
    flex-shrink: 0;
    z-index: 2000;
}

.selection-header {
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 10px;
    border-bottom: 1px solid rgba(0, 188, 212, 0.2); /* Match towerfill */
    flex-shrink: 0;
    z-index: 1500;
}

.selection-header .header-left { width: 30px; }
.selection-header .header-back { font-size: 1rem; color: #00838f; font-weight: 900; cursor: pointer; user-select: none; -webkit-user-select: none; }
.selection-header .header-title { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; font-weight: 900; letter-spacing: 1px; color: #00838f; flex: 1; text-align: center; }
.selection-header .header-right { display: flex; align-items: center; gap: 4px; }

/* --- Ticket Group --- */
.ticket-group {
    display: flex; align-items: stretch;
    background: #fff; border: 1.5px solid #00bcd4; /* var(--green-neon) */
    border-radius: 14px; overflow: hidden; height: 26px;
}
.ticket-display {
    display: flex; align-items: center; padding: 0 8px;
    font-size: 0.65rem; color: #00838f; /* var(--green-dark) */
    font-weight: 900;
}
.ticket-val { color: #00bcd4; font-family: 'Orbitron', sans-serif; margin-left: 2px; }
.ticket-add-btn {
    background: #00bcd4; color: #fff; border: none;
    padding: 0 8px; font-weight: 900; font-size: 0.7rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* --- Mode Tabs --- */
.mode-tabs-row {
    padding: 10px 16px 0; flex-shrink: 0;
}
.mode-tabs {
    display: flex; width: 100%;
    background: rgba(0, 131, 143, 0.05); border-radius: 10px;
    padding: 3px; border: 1px solid rgba(0, 188, 212, 0.1);
}
.mode-tab {
    flex: 1; padding: 8px; text-align: center; border-radius: 7px;
    font-weight: 900; font-size: 0.75rem; cursor: pointer; transition: all 0.3s;
    color: #00838f; opacity: 0.6;
}
.mode-tab.active { background: #fff; color: #00838f; opacity: 1; }

/* --- Content Area --- */
.puzzle-content {
    flex: 1; position: relative; width: 100%; display: flex; flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #b2ebf2 0%, #e0f7fa 100%);
    padding: 20px 16px;
    gap: 12px;
}

.difficulty-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 20px;
    display: flex; align-items: center; justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.difficulty-card.active {
    background: #ffffff;
    border-color: #00bcd4; /* blue/cyan active border */
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.2);
}

.diff-card-info {
    display: flex; flex-direction: column; gap: 4px;
}
.diff-card-name {
    font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 900;
}
.diff-card-desc {
    font-size: 0.7rem; font-weight: 700; color: #78909c;
}

.diff-check-mark {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: transparent;
    transition: all 0.3s;
}
.difficulty-card.active .diff-check-mark {
    background: #00bcd4; border-color: #00bcd4; color: #fff;
}

.diff-card-easy .diff-card-name { color: #4caf50; }
.diff-card-normal .diff-card-name { color: #ff9800; }
.diff-card-hard .diff-card-name { color: #f44336; }

/* --- Info Panel --- */
.info-panel {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: #ffffff;
    border-top: 1px solid rgba(0, 188, 212, 0.1);
    border-top-left-radius: 20px; border-top-right-radius: 20px;
    padding: 12px 16px 24px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; gap: 16px;
    z-index: 100;
}

.btn-play-action {
    width: 100%;
    background: #00bcd4; /* Daily is Cyan/Blue */
    border: none; border-radius: 14px;
    font-weight: 900; color: #fff; font-size: 1rem; padding: 16px;
    font-family: 'Orbitron', sans-serif; 
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.3);
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.btn-play-action.mode-permanent {
    background: #4caf50; /* Permanent is Green */
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

#title-screen {
    padding-top: 50px !important;
}
