@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@500;700;900&display=swap');

:root {
    --md-sys-color-primary: #006495;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #cbebff;
    --md-sys-color-on-primary-container: #001e30;
    --md-sys-color-background: #f8fdff;
    --md-sys-color-surface-container: #e6f2ff;
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    overflow: hidden;
    font-family: 'Noto Sans JP', sans-serif; 
    background-color: var(--md-sys-color-background); 
    -webkit-tap-highlight-color: transparent;
}

#app-wrapper {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    position: relative;
}

.m3-input {
    width: 100%;
    padding: 18px 20px;
    border-radius: 24px;
    background-color: var(--md-sys-color-surface-container);
    border: 2px solid transparent;
    font-size: 18px;
    font-weight: 700;
    color: #001e30;
    outline: none;
    transition: all 0.2s var(--ease-out-expo);
}

.m3-input:focus {
    background-color: #fff;
    border-color: var(--md-sys-color-primary);
}

.btn-press {
    transition: transform 0.1s var(--ease-out-expo), opacity 0.2s;
}

.btn-press:active { 
    transform: scale(0.94); 
    opacity: 0.9; 
}

.shake { 
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; 
}

@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60% { transform: translateX(6px); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.tab-hidden { display: none; }

.chip { padding: 6px 14px; border-radius: 14px; font-size: 13px; font-weight: 900; }
.chip-absent { background: #ffdad6; color: #410002; }
.chip-late { background: #ffeb99; color: #251a00; }

#fab {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: var(--md-sys-color-primary);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 100, 149, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.modal-visible { opacity: 1; pointer-events: auto; visibility: visible; }

#modal-content { transition: transform 0.4s var(--ease-spring); }
.modal-hidden #modal-content { transform: translateY(100%); }
.modal-visible #modal-content { transform: translateY(0); }

.ai-sparkle {
    background: linear-gradient(90deg, #006495, #6b538c, #006495);
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}