:root {
    --theme-color: #ABCD03;
    --theme-dark: #8b9a02;
    --theme-heading: #2D5A27; 
    --theme-subtext: #777; 
    --footer-bg: #dae5da;
    --bg-color: #f8f9fa;
    --text-main: #222;
    --text-sub: #555;
    --text-accent: #6d8202;
    --emoji-font: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
}
body { font-family: sans-serif; margin: 0; padding: 0; background-color: var(--bg-color); color: var(--text-main); display: flex; flex-direction: column; min-height: 100vh; font-size: 18px; }
nav { background: transparent; display: flex; justify-content: flex-end; align-items: center; padding: 15px 20px; position: sticky; top: 0; z-index: 1000; }
.menu-btn { background-color: var(--theme-color); border: none; width: 44px; height: 44px; cursor: pointer; border-radius: 6px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; transition: background-color 0.2s, transform 0.1s; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.line { width: 24px; height: 3px; background-color: #fff; border-radius: 2px; display: block; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; flex-direction: column; position: absolute; top: 70px; right: 20px; background: #fff; border: 1px solid #ddd; border-radius: 12px; padding: 8px 0; box-shadow: 0 6px 16px rgba(0,0,0,0.15); min-width: 200px; overflow: hidden; }
.nav-links.active { display: flex; }
.nav-links a { text-decoration: none; color: var(--text-main); padding: 14px 20px; display: block; font-weight: bold; font-size: 1rem; }
.nav-links a:hover { background-color: #f0f4d8; color: var(--theme-heading); }

.container { max-width: 1100px; margin: 0 auto; padding: 10px 20px 40px 20px; flex: 1; width: 100%; box-sizing: border-box; }
header { text-align: center; margin-bottom: 25px; }
h1 { font-size: 1.8rem; margin: 0 0 12px 0; font-weight: 900; }
h1 a { text-decoration: none; color: var(--theme-heading); }
.description { font-size: 1.1rem; color: var(--theme-subtext); margin-bottom: 12px; font-weight: bold; }

.alert { padding: 15px; border-radius: 10px; margin-bottom: 20px; font-weight: bold; text-align: center; }
.alert.success { background: #e2f0d9; color: #385723; border: 1px solid #c5e0b4; }
.alert.warning { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.section-box { background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 25px; }
h2 { font-size: 1.4rem; color: var(--theme-heading); margin-top: 0; margin-bottom: 15px; border-bottom: 2px solid var(--theme-color); padding-bottom: 5px; }

.list-header-box { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--theme-color); padding-bottom: 5px; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.list-header-box h2 { border: none; margin: 0; padding: 0; }
.cake-toggle-box { display: flex; background: #eee; padding: 3px; border-radius: 8px; font-family: var(--emoji-font); }
.toggle-btn { background: transparent; border: none; padding: 6px 12px; font-size: 0.85rem; border-radius: 6px; cursor: pointer; font-weight: bold; color: #555; transition: all 0.2s; font-family: var(--emoji-font); }
.toggle-btn.active { background: #fff; color: var(--theme-heading); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.calendar-btn { background: var(--theme-color); color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: bold; text-decoration: none; font-size: 0.9rem; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.weekday { font-weight: bold; color: var(--text-sub); padding: 5px 0; font-size: 0.9rem; }

.day { min-height: 85px; background: #fdfdfd; border: 1px solid #eee; border-radius: 6px; padding: 6px; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; font-size: 0.95rem; box-sizing: border-box; position: relative; }
.day.empty { background: transparent; border: none; }
.day.today { background: #f0f4d8; border-color: var(--theme-color); }
.day-number { font-weight: bold; align-self: flex-start; margin-bottom: 4px; }

.cake-list { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 0; margin: 0; list-style: none; box-sizing: border-box; font-family: var(--emoji-font), sans-serif; }

.cake-item { 
    font-size: 0.8rem; 
    background: rgba(171, 205, 3, 0.18); 
    padding: 2px 5px; 
    border-radius: 4px; 
    color: var(--text-accent); 
    text-align: left; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    max-width: 100%; 
    box-sizing: border-box; 
    display: flex; 
    align-items: center; 
    font-weight: bold; 
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.2;
    
    /* 修正箇所：数字のベースラインを統一する設定 */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    /* 数字の沈み込みを抑制するための補正 */
    vertical-align: middle;
}

/* ----------------------------------------------------------------------
   新・大画面ポップアップ（オーバーレイモーダル）用スタイル
   ---------------------------------------------------------------------- */
.large-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* 背景をうっすら暗く */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}
.large-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.large-popup-content {
    background: #fff;
    padding: 24px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 85%;
    transform: scale(0.8);
    transition: transform 0.15s ease-out;
    border-top: 8px solid var(--theme-color);
}
.large-popup-overlay.show .large-popup-content {
    transform: scale(1);
}
.large-popup-icon {
    font-size: 3.2rem;
    margin-bottom: 10px;
    display: block;
    font-family: var(--emoji-font);
}
.large-popup-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1a1a1a;
    word-break: break-all;
    font-family: var(--emoji-font), sans-serif;
}

.birthday-list { list-style: none; padding: 0; margin: 0; }
.birthday-item { background: #fff; padding: 15px; margin-bottom: 10px; border-radius: 10px; border-left: 6px solid var(--theme-color); box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }

.listener-name { font-weight: 800; font-size: 1.2rem; color: #1a1a1a; font-family: var(--emoji-font), sans-serif; }
.cake-icon { display: none; margin-right: 8px; }
.cake-icon.show { display: inline-block; }
.tag { background: #f0f4d8; padding: 3px 10px; border-radius: 6px; font-size: 0.85rem; color: var(--text-accent); font-weight: bold; }

.input-group { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 10px; }
input[type="text"], select, textarea { width: 100%; padding: 16px; border: 1px solid #ddd; border-radius: 10px; font-size: 18px; box-sizing: border-box; font-family: var(--emoji-font), sans-serif; }

.emoji-selector { display: flex; gap: 8px; align-items: center; background: #f9f9f9; padding: 12px; border-radius: 10px; border: 1px solid #ddd; flex-wrap: wrap; font-family: var(--emoji-font); }
.emoji-label { font-size: 0.9rem; font-weight: bold; color: var(--text-sub); width: 100%; margin-bottom: 4px; font-family: sans-serif; }
.emoji-option { display: flex; align-items: center; gap: 4px; background: #fff; padding: 8px 14px; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; font-size: 1.1rem; font-family: var(--emoji-font); }
.emoji-option input { margin: 0; cursor: pointer; }

button[type="submit"] { width: 100%; padding: 16px; background: var(--theme-color); color: #fff; border: none; border-radius: 10px; font-size: 20px; font-weight: bold; cursor: pointer; }

.request-toggle { text-align: center; margin-top: 20px; }
.request-link { color: #666; text-decoration: underline; font-size: 0.9rem; cursor: pointer; background: none; border: none; padding: 5px; }
.request-panel { display: none; margin-top: 15px; border-top: 1px dashed #ccc; padding-top: 20px; }

footer { text-align: center; padding: 15px 10px; font-size: 0.75rem; color: #666; background: var(--footer-bg); line-height: 1.4; margin-top: auto; }
.copyright { font-weight: bold; margin-bottom: 2px; }
.trademark { font-size: 0.7rem; color: #777; }

@media screen and (max-width: 768px) {
    .container { padding: 10px 10px 30px 10px; }
    .section-box { padding: 14px; margin-bottom: 20px; }
    .calendar-grid { gap: 4px; }
    .day { min-height: 55px; padding: 3px; font-size: 0.8rem; border-radius: 4px; }
    .day-number { margin-bottom: 2px; }
    .cake-list { gap: 2px; }
    .cake-item { font-size: 0.68rem; padding: 1px 3px; letter-spacing: -0.02em; }
    .weekday { font-size: 0.8rem; padding: 3px 0; }
    .large-popup-content { padding: 20px 30px; }
    .large-popup-icon { font-size: 2.6rem; }
    .large-popup-name { font-size: 1.3rem; }
}