@font-face { font-family: 'GenSenRounded'; src: url('./500.otf') format('opentype'); font-weight: 500; }
@font-face { font-family: 'GenSenRounded'; src: url('./700.otf') format('opentype'); font-weight: 700; }
@font-face { font-family: 'GenSenRounded'; src: url('./900.otf') format('opentype'); font-weight: 900; }

:root {
    --bg-color: #F4F7F6; --primary-text: #333333;
    --mint-green: #48CDB0; --mint-dark: #36A58D;
    --sunny-yellow: #FFD166; --soft-gray: #E0E5E2; --card-bg: #FFFFFF;
}

body { font-family: 'GenSenRounded', sans-serif; background-color: var(--bg-color); color: var(--primary-text); margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }

.app-container { max-width: 600px; margin: 0 auto; padding: 20px; padding-bottom: 40px; }
.text-center { text-align: center; }
.main-logo { width: 70px; height: 70px; border-radius: 18px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); margin-bottom: 10px; }
h1 { font-weight: 900; font-size: 26px; margin: 0 0 5px 0; color: #222;}
.subtitle { font-weight: 500; color: #777; font-size: 14px; margin-bottom: 24px;}

.card-3d { background: var(--card-bg); border-radius: 24px; padding: 20px; margin-bottom: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.05), inset 0 -4px 0 rgba(0,0,0,0.02); }
h2, h3 { font-weight: 700; margin-top: 0; color: #333; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px;}

input[type="text"], textarea { 
    width: 100%; height: 48px; box-sizing: border-box; padding: 0 12px; 
    border-radius: 12px; border: 2px solid #EEE; font-family: 'GenSenRounded', sans-serif; 
    font-size: 16px; background: #FAFAFA; transition: 0.2s; flex: 1; min-width: 0;
}
input[type="text"]:focus { border-color: var(--mint-green); outline: none; background: #FFF; }
.flex-row { display: flex; gap: 10px; align-items: center; }

.duration-control {
    display: flex; align-items: center; justify-content: space-between;
    background: #FAFAFA; border: 2px solid #EEE; border-radius: 12px;
    height: 48px; flex: 1; padding: 0 5px; box-sizing: border-box;
}
.duration-btn {
    background: transparent; border: none; font-size: 14px; cursor: pointer;
    color: #777; width: 36px; height: 36px; display: flex;
    justify-content: center; align-items: center; border-radius: 8px; transition: 0.2s;
}
.duration-btn:active { background: #EEE; transform: scale(0.9); }
.duration-control span { font-weight: 700; font-size: 16px; color: #333; }

.primary-btn, .secondary-btn, .icon-btn, .avatar-select-btn { box-sizing: border-box; }

.primary-btn { height: 52px; padding: 0 15px; background: var(--mint-green); color: #FFF; border: 2px solid transparent; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--mint-dark); transition: 0.1s; font-family: 'GenSenRounded', sans-serif; display: flex; justify-content: center; align-items: center; white-space: nowrap;}
.primary-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--mint-dark); }

.secondary-btn { height: 52px; padding: 0 15px; background: #F0F0F0; color: #555; border: 2px solid transparent; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 #DDD; transition: 0.1s; font-family: 'GenSenRounded', sans-serif; display: flex; justify-content: center; align-items: center; white-space: nowrap;}
.secondary-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #DDD; }

.btn-peach { background: #FF8BA0 !important; color: #FFF !important; box-shadow: 0 4px 0 #E06C81 !important; border-color: transparent !important;}
.btn-peach:active { box-shadow: 0 2px 0 #E06C81 !important; }

.btn-danger { background: #FF6B6B !important; color: #FFF !important; box-shadow: 0 4px 0 #D9534F !important; border-color: transparent !important;}
.btn-danger:active { box-shadow: 0 2px 0 #D9534F !important; }

.btn-yellow { background: var(--sunny-yellow) !important; color: #856404 !important; box-shadow: 0 4px 0 #D4A745 !important; border-color: transparent !important;}
.btn-yellow:active { box-shadow: 0 2px 0 #D4A745 !important; }

.btn-narrow { flex: 1; } .btn-wide { flex: 2.2; white-space: nowrap; }

.icon-btn, .avatar-select-btn { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; border: 2px solid #EEE; background: #FFF; transition: 0.2s;}
.icon-btn { border-radius: 12px; font-size: 24px; font-weight: bold; color: #777; background: #FAFAFA; box-shadow: 0 4px 0 #DDD; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #DDD; }
.avatar-select-btn { border: 3px solid #EEE; cursor: pointer; object-fit: cover;}
.avatar-select-btn:active { transform: scale(0.9); }
.emoji-btn { font-size: 24px; }

.upload-btn { background: #F0F0F0; border: 2px solid transparent; border-radius: 8px; padding: 6px 12px; font-size: 13px; color: #555; font-weight: 700; cursor: pointer; transition: 0.2s; box-shadow: 0 2px 0 #DDD; font-family: 'GenSenRounded', sans-serif;}
.upload-btn:active { transform: translateY(2px); box-shadow: 0 0 0 transparent; }
.btn-success { background: var(--mint-green) !important; color: #FFF !important; box-shadow: 0 2px 0 var(--mint-dark) !important; }

.pill-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill { background: #E8F5F2; color: var(--mint-dark); padding: 6px 14px; border-radius: 20px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--mint-green); transition: 0.2s;}
.pill .delete { color: #999; font-size: 16px; margin-left: 4px; }
.pill .delete:hover { color: #FF6B6B; }
.pill.date-pill { border-color: #DDD; background: #FFF; color: #666; }
.pill.date-pill.selected { border-color: var(--mint-green); background: var(--mint-green); color: #FFF; }

.calendar-card { background: #FFF; border: 2px solid #EEE; border-radius: 16px; padding: 15px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 16px; margin-bottom: 10px; }
.cal-nav { background: none; border: none; font-size: 18px; color: var(--mint-green); cursor: pointer; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: 700; font-size: 12px; color: #999; margin-bottom: 5px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day { padding: 10px 0; text-align: center; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; transition: 0.1s; background: #FAFAFA; border: 1px solid #F0F0F0; }
.cal-day.disabled { color: #CCC; background: #FFF; border: none; cursor: not-allowed; }
.cal-day.selected { background: var(--mint-green); color: #FFF; border-color: var(--mint-dark); box-shadow: 0 2px 0 var(--mint-dark); transform: translateY(-2px); }

.member-header-row { display: flex; align-items: center; white-space: nowrap; }
.member-title { margin: 0; white-space: nowrap; font-size: 18px; }
.scroll-hint-container { text-align: right; margin-top: 10px; margin-bottom: 15px;}
.scroll-hint { font-size: 12px; color: #999; white-space: nowrap; }

.member-cards-scroll { display: flex; overflow-x: auto; gap: 12px; padding-top: 8px; padding-bottom: 12px; scroll-behavior: smooth; }
.member-cards-scroll::-webkit-scrollbar { height: 6px; }
.member-cards-scroll::-webkit-scrollbar-thumb { background: #DDD; border-radius: 10px; }
.member-card { min-width: 80px; background: #FAFAFA; border: 2px solid #EEE; border-radius: 16px; padding: 12px 8px; text-align: center; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; align-items: center; }
.member-card:hover, .member-card.active { border-color: var(--mint-green); background: #F2FBF9; transform: translateY(-4px); box-shadow: 0 4px 10px rgba(72,205,176,0.2);}
.member-card.done { border-color: #DDD; background: #FFF; opacity: 0.7;}
.member-card img { width: 42px; height: 42px; border-radius: 50%; margin-bottom: 5px; border: 2px solid #FFF;}
.member-card span { display: block; font-size: 13px; font-weight: 700; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;}

.badge { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 12px; font-weight: 700; margin: 0 2px; }
.badge-pending { background: #FFE8A1; color: #856404; margin-top: 4px; font-size: 10px; }
.badge-done { background: #E0E5E2; color: #666; margin-top: 4px; font-size: 10px; }
.badge-yes { background: var(--mint-green); color: white; border: 1px solid var(--mint-dark);}
.badge-unsure { background: var(--sunny-yellow); color: #856404; border: 1px solid #D4A745;}
.badge-no { background: #FFF; color: #999; border: 1px solid #DDD; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(4px); transition: 0.3s;}
.blur-overlay { background: rgba(0,0,0,0.3); backdrop-filter: blur(10px); }
.modal-content { width: 90%; max-width: 380px; margin-bottom: 0; animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.glow-effect { box-shadow: 0 0 40px rgba(72,205,176,0.3); }
@keyframes popIn { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.modal-buttons { display: flex; gap: 10px; width: 100%; align-items: center; justify-content: center;}
.modal-buttons > button { flex: 1; margin: 0; } 

.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-height: 280px; overflow-y: auto; overflow-x: hidden; padding: 12px 6px; margin-top: 10px; -webkit-overflow-scrolling: touch;}
.emoji-grid::-webkit-scrollbar { width: 6px; }
.emoji-grid::-webkit-scrollbar-thumb { background: #DDD; border-radius: 10px; }
.emoji-option { font-size: 28px; text-align: center; cursor: pointer; padding: 8px 0; border-radius: 12px; transition: 0.2s; background: #FAFAFA; border: 2px solid transparent; -webkit-tap-highlight-color: transparent;}
.emoji-option.selected { background: #FFF; border-color: var(--mint-green); transform: scale(1.1); box-shadow: 0 4px 10px rgba(0,0,0,0.05);}
@media (hover: hover) { .emoji-option:hover { background: #FFF; border-color: var(--mint-green); transform: scale(1.1); } }

.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 15px; }
.avatar-option { width: 100%; aspect-ratio: 1; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: 0.2s; background: #FAFAFA; }
.avatar-option.selected { border-color: var(--mint-green); background: #FFF; box-shadow: 0 4px 10px rgba(72,205,176,0.3); transform: scale(1.1); }

.bg-selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; box-sizing: border-box;}
.bg-option { width: 100%; aspect-ratio: 4/5; border-radius: 8px; border: 3px solid transparent; cursor: pointer; background-size: cover; background-position: center; transition: 0.2s; box-sizing: border-box;}
.bg-option.selected { border-color: var(--mint-green); transform: scale(1.05); box-shadow: 0 4px 10px rgba(72,205,176,0.3);}

.table-scroll-container { overflow-x: auto; overflow-y: hidden; border-radius: 16px; background: #FAFAFA; border: 2px solid #EEE;}
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { padding: 12px 8px; text-align: center; white-space: nowrap; border-bottom: 2px solid #EEE; border-right: 2px solid #EEE; transition: background 0.3s;}
th { background: #FFF; font-weight: 700; z-index: 2;}
.sticky-corner { position: sticky; left: 0; top: 0; background: #FFF; z-index: 3; border-right: 2px solid #DDD; }
.sticky-col { position: sticky; left: 0; background: #FFF; z-index: 1; font-weight: 700; border-right: 2px solid #DDD; line-height: 1.2;}
.col-active { background: #E8F5F2 !important; border-left: 2px solid var(--mint-green); border-right: 2px solid var(--mint-green); }
.col-done { background: #F5F5F5 !important; }
.col-disabled { opacity: 0.5; pointer-events: none; }

.member-header { display: flex; flex-direction: column; align-items: center; font-size: 14px;}
.member-avatar { width: 45px; height: 45px; margin-bottom: 5px; }

.vote-btn { width: 42px; height: 42px; border-radius: 12px; border: none; font-size: 16px; cursor: pointer; font-weight: 900; transition: transform 0.1s; box-shadow: 0 4px 0 #DDD;}
.vote-btn:active { transform: translateY(4px); box-shadow: 0 0 0 transparent !important; }
.status-yes { background: var(--mint-green); color: white; box-shadow: 0 4px 0 var(--mint-dark); }
.status-unsure { background: var(--sunny-yellow); color: #856404; box-shadow: 0 4px 0 #D4A745; }
.status-no { background: var(--soft-gray); color: transparent; }

.top-date-item { background: #FFF; border: 2px solid var(--mint-green); border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 0 var(--mint-dark); }
.top-date-avatars { display: flex; }
.top-date-avatars img { width: 32px; height: 32px; border-radius: 50%; margin-left: -12px; border: 2px solid #FFF; background: #FFF;}

.cards-locked { pointer-events: none; opacity: 0.8; }
footer { text-align: center; font-size: 12px; color: #999; padding: 20px 0 30px 0; font-weight: 500; }

.icon-mask {
    display: inline-block; width: 22px; height: 22px;
    background-color: #999; cursor: pointer; vertical-align: middle; transition: 0.2s;
}
.icon-mask:active { transform: scale(0.9); }
.icon-letter-footer { mask: url('button_letter.png') no-repeat center / contain; -webkit-mask: url('button_letter.png') no-repeat center / contain; }
.icon-letter-title { background-color: var(--mint-dark); mask: url('button_letter.png') no-repeat center / contain; -webkit-mask: url('button_letter.png') no-repeat center / contain; margin-left: 8px;}
.icon-ig { background-color: #FFF; mask: url('button_ig.png') no-repeat center / contain; -webkit-mask: url('button_ig.png') no-repeat center / contain; margin-right: 6px;}

#creator-letter-content::-webkit-scrollbar { width: 4px; }
#creator-letter-content::-webkit-scrollbar-thumb { background: #DDD; border-radius: 10px; }

.announcement-box { background: #F2FBF9; border-left: 4px solid var(--mint-green); border-radius: 12px; padding: 15px; margin-top: 15px; text-align: left; }

.universe-banner { 
    margin-top: 30px; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: 0.2s; 
    border: none; 
    background: linear-gradient(135deg, #FFF5F7 0%, #FFEDF0 100%);
    box-shadow: 0 6px 0 #F5D0D6, 0 8px 20px rgba(224, 108, 129, 0.1);
}
.universe-banner:active { transform: translateY(3px); box-shadow: 0 3px 0 #F5D0D6; }

.banner-content { display: flex; align-items: center; gap: 15px; }
.app-icon { width: 50px; height: 50px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.banner-text { display: flex; flex-direction: column; text-align: left;}
.banner-title { font-weight: 700; font-size: 15px; color: #E06C81; margin: 0 0 3px 0; }
.banner-subtitle { font-weight: 500; font-size: 13px; color: #888; margin: 0; }
.banner-arrow { font-size: 24px; color: #E06C81; font-weight: 300; margin-left: 10px;}
