/* ヘッダー内部パーツ */
.header-title-area {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.header-title-area h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.7rem; font-weight: 900;
    color: #00bcd4;
    text-shadow: 0 0 10px rgba(0,188,212,0.3);
    margin: 0; letter-spacing: 0.1em;
}
.header-title-area .subtitle {
    color: #546e7a; font-size: 1.3rem;
    letter-spacing: 0.2em; margin-top: 6px; font-weight: bold;
}
.header-controls {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    align-items: stretch;
    position: relative;
}

/* 認証ガード（ゲスト用オーバーレイ） */
.auth-guarded-area.is-guest .guarded-content {
    filter: grayscale(1);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}
.auth-guarded-area .guest-overlay {
    display: none;
    position: absolute;
    inset: -5px;
    background: rgba(224, 247, 250, 0.4);
    backdrop-filter: blur(2px);
    z-index: 100;
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.auth-guarded-area.is-guest .guest-overlay {
    display: flex;
}
.guest-login-btn {
    background: #00bcd4;
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,188,212,0.4);
    transition: all 0.2s;
}
.guest-login-btn:hover {
    background: #00838f;
    transform: scale(1.05);
}

.header-controls .mypage-btns-row {
    display: flex;
    gap: 5px;
    width: 100%;
}
.header-controls .portal-mypage-btn {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    padding: 6px 2px;
    white-space: nowrap;
}

/* レジューム枠 */
.resume-slot {
    min-height: 50px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 188, 212, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #90a4ae;
    padding: 6px 10px;
    position: relative;
    backdrop-filter: blur(5px);
}

.resume-slot.has-data {
    border-color: rgba(0, 188, 212, 0.4);
    background: rgba(255, 255, 255, 0.9);
}

.resume-slot .resume-grid {
    display: flex;
    width: 100%;
    gap: 8px;
}

.resume-item-slot {
    flex: 1;
    height: 54px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #78909c;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    line-height: 1.2;
    padding: 4px;
    box-sizing: border-box;
    text-align: center;
}

.resume-item-slot.has-data {
    background: rgba(255, 255, 255, 0.95);
    color: #00838f;
    border: 1.5px solid #00bcd4;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.1);
    cursor: pointer;
}

.resume-item-slot.has-data .slot-label {
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #00838f;
}

.resume-item-slot.has-data .slot-detail {
    font-size: 0.6rem;
    color: #546e7a;
    margin-top: 2px;
}

.resume-item-slot.has-data .slot-date {
    font-size: 0.55rem;
    color: #90a4ae;
    margin-top: 1px;
}

.resume-item-slot.has-data:hover {
    transform: translateY(-2px);
    background: #e0f7fa;
    border-color: #0097a7;
    box-shadow: 0 6px 18px rgba(0, 188, 212, 0.2);
}

/* レジュームのスロットをデイリー(青系)と常設(緑系)で色分けする */
.resume-item-slot.has-data.is-daily {
    color: #0277bd;
    border-color: #03a9f4;
    box-shadow: 0 4px 12px rgba(3, 169, 244, 0.15);
}
.resume-item-slot.has-data.is-daily .slot-label {
    color: #0277bd;
}
.resume-item-slot.has-data.is-daily:hover {
    background: #e1f5fe;
    border-color: #0288d1;
    box-shadow: 0 6px 18px rgba(3, 169, 244, 0.25);
}

.resume-item-slot.has-data.is-stage {
    color: #2e7d32;
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}
.resume-item-slot.has-data.is-stage .slot-label {
    color: #2e7d32;
}
.resume-item-slot.has-data.is-stage:hover {
    background: #e8f5e9;
    border-color: #388e3c;
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.25);
}



#resume-loading-state {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.progress-bar-bg {
    width: 60px; height: 3px;
    background: rgba(0,188,212,0.15);
    border-radius: 2px; overflow: hidden; position: relative;
}
.progress-bar-fill {
    position: absolute; width: 40%; height: 100%;
    background: #00bcd4; border-radius: 2px;
    animation: resume-progress-ani 2s infinite ease-in-out;
}
@keyframes resume-progress-ani {
    0% { left: -40%; } 100% { left: 100%; }
}

/* タイマー・お知らせ */
.daily-timer-area {
    width: 30%;
    display: flex; align-items: center; gap: 8px;
    font-weight: bold; font-size: 0.85rem; color: #00838f;
}
.reset-timer {
    font-family: 'Orbitron', sans-serif;
    color: #00bcd4; font-size: 0.85rem;
}
.info-icon {
    cursor: pointer;
    background: #00bcd4; color: white;
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #00bcd4;
    transition: all 0.2s; flex-shrink: 0;
    user-select: none;
    position: relative !important; top: 0 !important; right: 0 !important;
}
.info-icon:hover { background: #00838f; transform: scale(1.1); }


/* お知らせモーダル */
#news-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    z-index: 2100;
    overflow: hidden;
    display: none;
    flex-direction: column;
}
#news-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2050;
}

.news-modal-header {
    padding: 20px;
    background: #f8fafd;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #00838f;
    font-family: 'Orbitron', 'Noto Sans JP', sans-serif;
}
.news-close-x {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #b0bec5;
    cursor: pointer;
    transition: color 0.2s;
}
.news-close-x:hover { color: #37474f; }

.news-list-container {
    padding: 10px 0;
    overflow-y: auto;
    flex: 1;
}
.news-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #f8fafd; }

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.news-tag {
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.news-tag.info { background: #e0f2f1; color: #00796b; }
.news-tag.update { background: #e8f5e9; color: #2e7d32; }
.news-tag.maintenance { background: #fff3e0; color: #e65100; }

.news-date {
    font-size: 0.7rem;
    color: #94a3b8;
}
.news-title {
    font-weight: bold;
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 4px;
}
.news-content {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}
.notification-area {
    width: 70%;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.notification-area:hover {
    background: rgba(0, 188, 212, 0.05);
}
.notification-label {
    font-size: 0.85rem;
    font-weight: 900;
    color: #00838f;
    white-space: nowrap;
    opacity: 0.8;
}
.notification-banner {
    display: none;
    flex-grow: 1; /* バナーが残りの幅を占める */
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem; font-weight: 500;
    line-height: 1.4;
    position: relative;
    animation: banner-slide-in 0.5s ease-out;
}
.notification-banner.type-info {
    background: none;
    border: none;
    color: #00838f;
    padding-left: 0; /* 枠がないので左余白を詰め */
}
.notification-banner.type-maintenance {
    background: rgba(255,152,0,0.1);
    border: 1px solid rgba(255,152,0,0.3); color: #e65100;
}
.notification-banner.type-update {
    background: rgba(76,175,80,0.1);
    border: 1px solid rgba(76,175,80,0.3); color: #2e7d32;
}
.notification-banner.type-offline {
    background: rgba(244,67,54,0.08);
    border: 1px solid rgba(244,67,54,0.3); color: #c62828;
}
@keyframes banner-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ルールモーダル */
#rule-modal {
    display: none; position: fixed;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: white; border-radius: 12px; padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 2000; width: 85%; max-width: 400px;
    font-size: 0.9rem; line-height: 1.6;
}
#modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 1999;
}
