/* 本文フォント: OS標準を使い、外部CDN(Google Fonts等)依存をゼロにする */
html, body {
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN",
        "Yu Gothic", "Meiryo", "Noto Sans JP",
        system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.pwa-update-notice {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 48rem;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    background: #111827;
    color: #fff;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 0.5rem;
    box-shadow: 0 18px 40px rgb(0 0 0 / 0.28);
}

.pwa-update-notice button {
    flex-shrink: 0;
    border: 0;
    border-radius: 0.4rem;
    padding: 0.45rem 0.8rem;
    color: #0f172a;
    background: #5eead4;
    font-weight: 700;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 隠しコマンド発動時の「1UP」風トースト */
@keyframes konami-pop {
    0%   { transform: translate(-50%, 24px) scale(0.5); opacity: 0; }
    18%  { transform: translate(-50%, -10px) scale(1.15); opacity: 1; }
    32%  { transform: translate(-50%, 0) scale(1); opacity: 1; }
    78%  { transform: translate(-50%, 0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -34px) scale(1); opacity: 0; }
}

.konami-toast {
    position: fixed;
    left: 50%;
    top: 16%;
    z-index: 1000;
    background: #1f2937;
    color: #34d399;
    font-family: monospace;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    padding: 0.6rem 1.3rem;
    border: 3px solid #34d399;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    animation: konami-pop 1.8s ease-out forwards;
    pointer-events: none;
    white-space: nowrap;
}

@media print {
    @page {
        size: A4 portrait;
    }
    .no-print {
        display: none !important;
    }
    body {
        font-size: 10pt;
        background: #fff !important;
        color: #000 !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    main {
        display: block !important;
    }
    .sticky {
        position: static !important;
    }
    .bg-white.shadow-lg {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid;
    }
    .gap-10 { gap: 1rem !important; }
    .space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
    .p-8 { padding: 1rem !important; }
    .mb-10, .mb-8, .mb-6 { margin-bottom: 1rem !important; }
    h1, h2, .text-2xl, .text-xl, legend { font-size: 14pt !important; }
    #total-cost { font-size: 24pt !important; }
    .print\:block { display: block !important; }
}

@media (max-width: 639px) {
    .pwa-update-notice {
        align-items: stretch;
        flex-direction: column;
    }
}
