/* ============================================================
   mobile.css  —  移动端细节覆盖
   （只在 html.layout-mobile 下生效）
   ============================================================ */

html.layout-mobile body {
    padding: 8px;
    padding-bottom: 0;
}

html.layout-mobile .container {
    border-radius: var(--radius-md);
    margin-bottom: 72px;
}

html.layout-mobile header {
    border-bottom-width: 3px;
}

html.layout-mobile .header-actions {
    order: -1;
    width: 100%;
    justify-content: flex-end;
}

html.layout-mobile .header-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

/* 移动端按钮变大，好点 */
html.layout-mobile .btn {
    min-height: 44px;
    font-size: 0.95rem;
    padding: 12px 16px;
}

html.layout-mobile .btn-small {
    min-height: 36px;
    padding: 8px 12px;
}

/* 移动端弹窗全屏 */
html.layout-mobile .dialog-content {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    margin: 0;
}

html.layout-mobile .dialog-header {
    padding: 15px 20px;
    border-radius: 0;
}

html.layout-mobile .dialog-header h3 {
    font-size: 1.2rem;
}

html.layout-mobile .close-btn {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
}

/* 移动端通用的触摸反馈 */
html.layout-mobile .btn:active,
html.layout-mobile .crop-item:active,
html.layout-mobile .inventory-item:active,
html.layout-mobile .merchant-item:active {
    transform: scale(0.97);
    transition: transform 0.1s;
}

/* 移动端滚动优化 */
html.layout-mobile .scrollable,
html.layout-mobile .log-content,
html.layout-mobile .merchant-items {
    -webkit-overflow-scrolling: touch;
}

/* 移动端 crop-item 紧凑 */
html.layout-mobile .crop-item {
    padding: 10px;
}

html.layout-mobile .crop-name {
    font-size: 0.9rem;
}

html.layout-mobile .crop-growth {
    font-size: 0.75rem;
}

html.layout-mobile .crop-price {
    font-size: 1rem;
}

/* 移动端 stat 卡片 */
html.layout-mobile .game-stats {
    gap: 6px;
    width: 100%;
    justify-content: center;
}

html.layout-mobile .stat {
    min-width: 70px;
    padding: 6px 8px;
    flex: 1;
    max-width: 100px;
}

html.layout-mobile .stat-label {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

html.layout-mobile .stat-value {
    font-size: 1.1rem;
}

/* 移动端时间控制 */
html.layout-mobile .time-control {
    width: 100%;
    margin-top: 8px;
}

html.layout-mobile .next-day-timer {
    font-size: 0.85rem;
    gap: 8px;
}

html.layout-mobile .timer-bar {
    min-width: 100px;
}

html.layout-mobile #timer-text {
    min-width: 70px;
    font-size: 0.85rem;
}

/* 移动端农田区 */
html.layout-mobile .farm-section {
    padding: 12px;
}

html.layout-mobile .farm-section h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

html.layout-mobile .farm-controls .btn {
    width: 100%;
}

/* ============================================================
   横屏手机 / iPad 横屏 版细节
   ============================================================ */
html.layout-wide-short body {
    padding: 12px;
}

html.layout-wide-short .stat {
    min-width: 80px;
    padding: 8px 12px;
}

html.layout-wide-short .stat-value {
    font-size: 1.4rem;
}

html.layout-wide-short .log-content {
    height: 200px;
}

/* ============================================================
   平板竖屏 版细节
   ============================================================ */
html.layout-tall-narrow .side-panel > * {
    min-width: 0;
}

html.layout-tall-narrow .shop-section,
html.layout-tall-narrow .inventory-section,
html.layout-tall-narrow .action-section {
    padding: 15px;
}

html.layout-tall-narrow .shop-section h2,
html.layout-tall-narrow .inventory-section h2,
html.layout-tall-narrow .action-section h2 {
    font-size: 1.1rem;
}