/* rMQR Scanner Styles - Smartphone Optimized Native Camera UI */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent-cyan: #00f2fe;
    --accent-blue: #38bdf8;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #090d16;
    --panel-bg: rgba(18, 24, 42, 0.85);
    --panel-border: rgba(255, 255, 255, 0.12);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-blur: 16px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    background: linear-gradient(135deg, #090d16 0%, #13192f 50%, #0b1122 100%);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* スマホ用共通ヘッダーのスリム化 */
header {
    padding: 0.75rem 1rem !important;
    text-align: center;
    border-bottom: 1px solid var(--panel-border);
    backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.25rem !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

header p {
    font-size: 0.78rem !important;
    color: var(--text-muted);
    margin-top: 0.15rem !important;
}

/* メインレイアウト */
.app-main {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0.6rem 0.6rem calc(1rem + var(--safe-bottom)) 0.6rem;
    width: 100%;
}

/* スキャナーカード */
.scanner-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 1.25rem;
    padding: 0.85rem;
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* スリムトップバー */
.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 0.2rem;
}

.scanner-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.title-logo {
    font-size: 1.1rem;
}

.title-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.badge-4mm {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.status-normal {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.25);
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-help-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-help-icon:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

/* ===================================================
   カメラビューポート（スマホ全画面ファースト）
   =================================================== */
.camera-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 360px;
    max-height: 56vh;
    background: #000;
    border-radius: 1.1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    touch-action: none;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    transition: transform 0.12s ease-out;
}

#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 複数コード検出時のクイック選択チップバー（横スクロール） */
.multi-code-chips-bar {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.35rem 0.45rem;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(56, 189, 248, 0.25);
    z-index: 80;
    scrollbar-width: none;
    -ms-overflow-style: none;
    animation: fadeInSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.multi-code-chips-bar::-webkit-scrollbar {
    display: none;
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.multi-code-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.multi-code-chip:active {
    transform: scale(0.95);
    background: rgba(56, 189, 248, 0.25);
}

.multi-code-chip.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(14, 165, 233, 0.45));
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.multi-code-chip.copied {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
    color: #34d399;
}

/* リアルタイム・ズームHUDバブル */
.zoom-hud {
    position: absolute;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(15, 23, 42, 0.9);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.3);
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 800;
    pointer-events: none;
    z-index: 90;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.zoom-hud.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* 大型ズームスライダーカード（最大15x対応） */
.zoom-slider-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.95rem;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.zoom-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zoom-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.zoom-header-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.zoom-val-badge {
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    min-width: 48px;
    text-align: center;
}

.zoom-step-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.zoom-step-btn:active {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0.9);
}

/* スライダートラック */
.zoom-slider-track-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.zoom-min-label, .zoom-max-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 22px;
}

.zoom-max-label {
    text-align: right;
    color: #38bdf8;
}

.custom-zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(90deg, #6366f1 0%, #38bdf8 100%);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.custom-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #6366f1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 8px #38bdf8;
    cursor: pointer;
    transition: transform 0.1s;
}

.custom-zoom-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.custom-zoom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #6366f1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 8px #38bdf8;
    cursor: pointer;
}

/* プリセットボタン列 */
.zoom-preset-row {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.zoom-preset-row::-webkit-scrollbar {
    display: none;
}

.zoom-pill-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.28rem 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    transition: all 0.15s;
}

.zoom-pill-btn:active {
    transform: scale(0.92);
}

.zoom-pill-btn.active {
    background: var(--primary);
    color: white;
    border-color: #818cf8;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    font-weight: 800;
}

/* フローティングコピー通知トースト */
.floating-copy-toast {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.95);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================================
   クイックアクションタイル（親指リーチ・5列ボタングリッド）
   =================================================== */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
}

.action-tile-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.85rem;
    padding: 0.55rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-tile-btn .tile-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.action-tile-btn .tile-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.action-tile-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.12);
}

/* アクティブ状態（ライトON、マクロON等） */
.action-tile-btn.active {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.action-tile-btn.active .tile-label {
    color: #34d399;
}

/* 撮影スキャンハイライトボタン */
.action-tile-btn.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.25));
    border-color: rgba(56, 189, 248, 0.4);
}

.action-tile-btn.highlight .tile-label {
    color: #38bdf8;
}

/* ===================================================
   明るさ・テカリ抑制（クイックトグルピルバー）
   =================================================== */
.exposure-quick-bar {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.85rem;
    padding: 0.45rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bar-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.exposure-pill-group {
    display: flex;
    gap: 0.3rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.exposure-pill-group::-webkit-scrollbar {
    display: none;
}

.exp-pill-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    transition: all 0.15s;
}

.exp-pill-btn:active {
    transform: scale(0.94);
}

.exp-pill-btn.active {
    background: #0ea5e9;
    color: white;
    border-color: #38bdf8;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

/* ===================================================
   詳細設定（折りたたみアコーディオン）
   =================================================== */
.advanced-details {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.85rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.25s ease;
}

.advanced-details[open] {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

.advanced-summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advanced-summary::-webkit-details-marker {
    display: none;
}

.advanced-body {
    margin-top: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.adv-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.adv-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.zoom-slider-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.zoom-slider-row input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.adv-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    outline: none;
}

/* ===================================================
   読み取り履歴セクション
   =================================================== */
.history-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.85rem;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-clear-sm {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.btn-clear-sm:active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.empty-history {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.75rem 0;
}

.history-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.55rem;
    padding: 0.5rem 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.history-item:active {
    background: rgba(255, 255, 255, 0.09);
    transform: scale(0.99);
}

.history-main {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow: hidden;
    flex: 1;
}

.history-format-tag {
    background: rgba(99, 102, 241, 0.25);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.4);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    white-space: nowrap;
}

.history-text {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.history-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.btn-hist-copy {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-hist-link {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    text-decoration: none;
}

.footer-nav {
    text-align: center;
    padding-top: 0.2rem;
}

.btn-back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: all 0.2s;
}

.btn-back-link:active {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

/* ===================================================
   モーダル（結果モーダル ＆ ヘルプモーダル）
   =================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(18, 24, 42, 0.98);
    border: 1px solid var(--panel-border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.result-textarea {
    width: 100%;
    height: 90px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.65rem;
    color: var(--text-main);
    padding: 0.65rem;
    font-family: monospace;
    font-size: 0.9rem;
    resize: none;
    outline: none;
}

.result-meta-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-buttons {
    display: flex;
    gap: 0.5rem;
}

.modal-buttons .btn {
    flex: 1;
    padding: 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 0.65rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-decoration: none;
    color: white;
    background: var(--primary);
}

.modal-buttons .btn-success {
    background: var(--success);
}

.modal-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.help-content {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 60vh;
    overflow-y: auto;
}

.help-tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-tips-list li {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary);
}

/* フッター */
footer {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===================================================
   メディアクエリ（PC / タブレット対応）
   =================================================== */
@media (min-width: 641px) {
    .app-main {
        padding: 1.25rem;
    }

    .scanner-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .camera-viewport {
        aspect-ratio: 4 / 3;
        max-height: 480px;
    }

    .action-tile-btn {
        padding: 0.75rem 0.5rem;
    }

    .action-tile-btn .tile-icon {
        font-size: 1.4rem;
    }

    .action-tile-btn .tile-label {
        font-size: 0.75rem;
    }
}
