:root{
  color-scheme: light;
  --bg:#f7f8ff;
  --bg-2:#fff9fc;
  --surface:#ffffff;
  --surface-soft:#fbfbff;
  --surface-tint:#f4f6ff;
  --text:#263653;
  --text-soft:#52627f;
  --muted:#7f8da9;
  --line:#e9eaf7;
  --accent:#7a7df6;
  --accent-2:#b47af6;
  --accent-3:#ff8cb6;
  --sky:#7fb6ff;
  --mint:#70cbb0;
  --peach:#ffb27d;
  --lemon:#f4c86a;
  --lav:#a38dff;
  --success:#35c76d;
  --danger:#ff6f7a;
  --shadow-soft:0 8px 22px rgba(121,112,181,.08);
  --shadow-card:0 10px 26px rgba(121,112,181,.10);
  --safe-bottom:env(safe-area-inset-bottom, 0px);
  --tab-height:72px;
}

*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
html,body{min-height:100%}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display",Inter,system-ui,sans-serif;
  background:linear-gradient(180deg,var(--bg) 0%,var(--bg-2) 48%,#f4fbff 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  touch-action:manipulation;
}
button,input,select{font:inherit}
button{cursor:pointer;color:inherit}
body.sheet-open{overflow:hidden}

.app-shell{
  max-width:430px;
  margin:0 auto;
  min-height:100vh;
  padding:14px 14px calc(var(--tab-height) + 26px + var(--safe-bottom));
  position:relative;
}

.pull-indicator{
  position:fixed;
  left:50%;
  top:calc(6px + env(safe-area-inset-top,0px));
  transform:translate(-50%,-56px);
  z-index:25;
  display:flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.95);
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
  color:var(--text-soft);
  font-size:.66rem;
  transition:.18s ease;
  opacity:0;
}
.pull-indicator.show{transform:translate(-50%,0);opacity:1}
.pull-indicator.refreshing .ios-spinner{animation:spin .75s linear infinite}
.ios-spinner{width:14px;height:14px;border:2px solid #dbe1f1;border-top-color:#75839d;border-radius:50%}
@keyframes spin{to{transform:rotate(360deg)}}

.playful-sky{
  position:absolute;
  inset:4px 12px auto 12px;
  height:88px;
  pointer-events:none;
  overflow:hidden;
}
.cloud{
  position:absolute;
  display:block;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(255,255,255,.72);
  box-shadow:0 6px 16px rgba(151,160,212,.10);
  border-radius:999px;
  filter:blur(.2px);
}
.cloud:before,.cloud:after{content:"";position:absolute;background:inherit;border:inherit;border-radius:inherit}
.cloud-a{width:42px;height:18px;right:48px;top:42px}
.cloud-a:before{width:18px;height:18px;left:4px;top:-8px}
.cloud-a:after{width:20px;height:20px;left:18px;top:-10px}
.cloud-b{width:54px;height:22px;left:-6px;top:48px;opacity:.85}
.cloud-b:before{width:20px;height:20px;left:6px;top:-9px}
.cloud-b:after{width:24px;height:24px;left:22px;top:-12px}
.sky-sun,.sky-unicorn{position:absolute;font-size:28px;line-height:1}
.sky-sun{right:2px;top:18px}
.sky-unicorn{right:20px;bottom:6px;font-size:22px;opacity:.58}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:10px;
  padding:0 2px;
  position:relative;
  z-index:1;
}
.profile-cluster{display:flex;align-items:center;gap:10px}
.kid-avatar{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#ffe6f1 0%,#fff7d8 100%);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:var(--shadow-soft);
  font-size:24px;
}
.eyebrow{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:30px;padding:0 12px;border-radius:999px;
  background:linear-gradient(145deg,#eef5ff 0%,#f5efff 100%);
  border:1px solid #e4e8fb;
  color:#7a83aa;
  font-size:.68rem;font-weight:700;letter-spacing:.05em;
  box-shadow:0 4px 12px rgba(121,112,181,.06);
}
h1{font-size:1.65rem;line-height:1.04;letter-spacing:-.035em;margin:0;font-weight:760;color:var(--text)}
.tiny-heart{font-size:.55em;color:#ff86b3;vertical-align:top}
.top-info{font-size:.74rem;color:var(--muted);font-weight:560;padding-top:2px}

.week-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:10px;position:relative;z-index:1}
.day-pill{
  border:1px solid var(--line);
  min-height:44px;
  border-radius:14px;
  background:rgba(255,255,255,.82);
  color:var(--text-soft);
  padding:6px 4px;
  display:flex;flex-direction:column;gap:1px;align-items:center;justify-content:center;
  font-weight:650;
  box-shadow:0 4px 12px rgba(121,112,181,.05);
  transition:.18s ease;
}
.day-pill span{font-size:.61rem;letter-spacing:.05em}
.day-pill strong{font-size:.92rem;line-height:1.05;font-weight:750}
.day-pill.active{
  background:linear-gradient(145deg,#80b3ff 0%,#8e9cff 55%,#d794ff 100%);
  color:#fff;
  border-color:transparent;
  box-shadow:0 10px 24px rgba(146,132,243,.24);
}

.next-card{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  background:linear-gradient(145deg,#fffdfa 0%,#fff 42%,#fbf7ff 100%);
  border:1px solid #ebe6fb;
  box-shadow:var(--shadow-card);
  border-radius:18px;
  padding:9px 10px;
  margin-bottom:12px;
  position:relative;
  z-index:1;
}
.next-icon,.subject-icon,.after-icon,.week-item-icon,.context-icon{display:grid;place-items:center;color:var(--icon-accent,var(--accent))}
.next-icon{
  width:36px;height:36px;border-radius:12px;
  background:linear-gradient(180deg,#f0ecff,#eef6ff);
  color:#8975ec;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 5px 12px rgba(121,112,181,.08);
}
.next-icon svg,.subject-icon svg,.after-icon svg,.week-item-icon svg,.context-icon svg{width:18px;height:18px}
.next-copy{min-width:0;display:flex;flex-direction:column}
.next-kicker{font-size:.58rem;font-weight:760;letter-spacing:.08em;color:#8c8faf;margin-bottom:1px}
.next-copy strong{font-size:.85rem;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:760;color:var(--text)}
.next-copy span{font-size:.68rem;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tiny-label,
.reminder-pill,
.activity-countdown,
.overview-reminder em{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:30px;min-width:64px;
  border-radius:999px;
  border:1px solid #e2ddfb;
  padding:6px 11px;
  background:linear-gradient(145deg,#f3efff 0%,#eef6ff 100%);
  color:#7059d3;
  font-size:.65rem;font-weight:760;line-height:1;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95);
}

.view{display:none;animation:fadeIn .16s ease}
.view.active{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin:4px 2px 9px}
.section-head h2{margin:0;font-size:1.06rem;letter-spacing:-.02em;line-height:1.08;font-weight:780;color:var(--text)}
.section-head span{font-size:.68rem;color:var(--muted);font-weight:650}

.mini-section-title{
  display:flex;align-items:center;gap:7px;
  margin:8px 3px 7px;color:var(--text);
}
.mini-section-title strong{font-size:.76rem;font-weight:760}
.mini-section-title .inline-add{
  margin-left:auto;border:0;background:transparent;color:#8b68f6;
  min-height:38px;padding:6px 4px;font-size:.66rem;font-weight:760
}
.mini-section-icon{width:22px;height:22px;display:grid;place-items:center;border-radius:8px;font-size:.68rem}
.mini-section-icon.school{background:#eaf3ff;color:#4a91ea}
.mini-section-icon.after{background:#fff2e6;color:#ea9158}
.mini-section-icon.reminder{background:#fff7db;color:#d79a21}
.reminder-title{margin-top:14px}

.school-list,.after-school-list,.activity-list,.reminder-overview{display:flex;flex-direction:column;gap:7px}
.school-row-card,.after-school-card,.activity-list-card,.day-card,.empty-card,.context-card,.reminder-card,.settings-section,.overview-reminder{
  background:rgba(255,255,255,.94);
  border:1px solid #ece8f7;
  box-shadow:var(--shadow-soft);
  color:var(--text);
}

.school-row-card,
.after-school-card{
  display:grid;
  grid-template-columns:50px 34px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  border-radius:16px;
  padding:7px 9px;
  min-height:48px;
  transition:.16s ease;
}
.school-row-card:active,.after-school-card:active,.activity-list-card:active,.week-item:active,.overview-reminder:active{transform:scale(.99)}
.school-row-card{background:linear-gradient(90deg,#fff,#fcfdff)}
.school-row-card:nth-child(4n+1){background:linear-gradient(90deg,#fff,#f7fbff)}
.school-row-card:nth-child(4n+2){background:linear-gradient(90deg,#fff,#f7fff9)}
.school-row-card:nth-child(4n+3){background:linear-gradient(90deg,#fff,#fff9f2)}
.school-row-card:nth-child(4n+4){background:linear-gradient(90deg,#fff,#fbf7ff)}
.after-school-card[data-tone="pink"],.activity-list-card[data-tone="pink"]{background:linear-gradient(90deg,#fff,#fff6fb)}
.after-school-card[data-tone="mint"],.activity-list-card[data-tone="mint"]{background:linear-gradient(90deg,#fff,#f5fff9)}
.after-school-card[data-tone="blue"],.activity-list-card[data-tone="blue"]{background:linear-gradient(90deg,#fff,#f5f9ff)}
.after-school-card[data-tone="lilac"],.activity-list-card[data-tone="lilac"]{background:linear-gradient(90deg,#fff,#faf6ff)}

.school-time,.activity-time{font-size:.61rem;color:var(--text-soft);line-height:1.2}
.school-time strong,.activity-time strong{display:block;font-size:.68rem;color:var(--text);font-weight:760}
.subject-icon,.after-icon,.context-icon{
  width:32px;height:32px;border-radius:10px;
  background:linear-gradient(180deg,var(--icon-soft),#fff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 4px 10px rgba(131,116,190,.08);
}
.three-d{position:relative;overflow:hidden}
.three-d:before{content:"";position:absolute;inset:0;background:linear-gradient(145deg,rgba(255,255,255,.52),transparent 50%);pointer-events:none}
.school-subject h3,.after-copy h3{margin:0;font-size:.79rem;line-height:1.1;font-weight:730;color:var(--text)}
.school-subject .soft-copy,.after-copy p{margin:2px 0 0;font-size:.62rem;color:var(--text-soft);line-height:1.25}
.school-reminder-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.mini-tag,.item-bubble,.badge-soft{
  display:inline-flex;align-items:center;gap:3px;
  border-radius:999px;padding:3px 7px;
  font-size:.56rem;font-weight:700;
  background:#fff4cf;color:#8f7218;border:1px solid #f0e2a0;
}
.item-bubble.ghost{background:#f2efff;color:#7460ca;border-color:#e2daf9}
.badge-soft{background:#edf3ff;color:#5d78c7;border-color:#dce7ff}
.row-arrow{font-size:1rem;color:#94a0ba;padding:0 2px}

.after-school-label{display:flex;align-items:center;gap:7px;font-size:.69rem;font-weight:760;color:var(--text-soft);margin:11px 3px 7px}
.after-school-label:after{content:"";height:1px;background:#e7e7f5;flex:1}

.day-card{border-radius:18px;padding:9px;margin-bottom:8px;background:rgba(255,255,255,.92)}
.selected-day-card{background:linear-gradient(135deg,#fff8fc,#f8f6ff);border-color:#efdffd}
.day-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}
.day-head>div{display:flex;align-items:baseline;gap:7px}
.day-head strong{font-size:.76rem;font-weight:780;color:var(--text)}
.day-head .day-date{font-size:.6rem;color:var(--muted);font-weight:650}
.day-head>span{font-size:.61rem;color:#a57abb;font-weight:700}
.slider-shell{position:relative}
.week-slider{display:flex;gap:7px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:1px 36px 1px 1px;-webkit-overflow-scrolling:touch}
.week-slider::-webkit-scrollbar{display:none}
.slider-nav{
  position:absolute;top:50%;transform:translateY(-50%);z-index:2;
  border:0;width:44px;height:44px;background:transparent;color:#8f98b2;
  font-size:1.1rem;display:grid;place-items:center;
}
.slider-nav:before{content:"";position:absolute;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.96);border:1px solid var(--line);box-shadow:var(--shadow-soft);z-index:-1}
.slider-nav.prev{left:-10px}.slider-nav.next{right:-10px}
.week-item{
  border:1px solid #ece8f7;
  min-width:92px;max-width:98px;min-height:92px;
  padding:7px;border-radius:14px;
  background:linear-gradient(180deg,var(--item-soft),#fff);
  text-align:left;scroll-snap-align:start;color:var(--text);
  position:relative;box-shadow:0 4px 10px rgba(121,112,181,.05);
}
.week-item strong{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font-size:.67rem;line-height:1.18;color:var(--text);font-weight:730;min-height:24px
}
.week-item small{display:block;margin-top:4px;font-size:.58rem;color:var(--text-soft)}
.week-item-icon{
  width:26px;height:26px;border-radius:8px;
  background:linear-gradient(180deg,#fff,var(--item-soft));
  margin-bottom:6px;color:var(--item-accent);
  box-shadow:0 3px 8px rgba(131,116,190,.06)
}
.week-item-icon svg{width:15px;height:15px}

.activity-list-card{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  gap:8px;align-items:center;
  border-radius:16px;padding:8px 9px;min-height:50px;
}
.empty-card{padding:12px;border-radius:16px;text-align:center;color:var(--text-soft);font-size:.67rem}
.empty-card.small{padding:10px;border-radius:14px;font-size:.62rem}

.family-banner{
  margin:10px 0 4px;border-radius:18px;min-height:78px;padding:11px 12px;
  display:flex;justify-content:space-between;align-items:center;overflow:hidden;
  background:linear-gradient(145deg,#dff8e7 0%,#fff0c5 48%,#ffe4ef 100%);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:var(--shadow-soft)
}
.banner-copy{display:flex;flex-direction:column;gap:2px}
.banner-copy strong{font-size:.78rem;color:#344364;font-weight:780}
.banner-copy span{font-size:.62rem;color:#657694}
.banner-scene{display:flex;align-items:flex-end;gap:2px;font-size:23px}
.banner-scene span:nth-child(2){align-self:flex-start;font-size:20px}

.overview-reminder{
  width:100%;
  border-radius:15px;
  display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:8px;align-items:center;
  text-align:left;padding:7px 9px;
}
.overview-rem-icon{width:30px;height:30px;border-radius:10px;background:#fff;display:grid;place-items:center;color:var(--rem-accent);box-shadow:0 3px 8px rgba(131,116,190,.06)}
.overview-rem-icon svg{width:17px;height:17px}
.overview-rem-copy{min-width:0;display:flex;flex-direction:column}
.overview-rem-copy strong{font-size:.71rem;font-weight:760;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.overview-rem-copy span{font-size:.58rem;color:var(--text-soft);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.bottom-tabbar{
  position:fixed;left:50%;bottom:calc(8px + var(--safe-bottom));transform:translateX(-50%);z-index:20;
  width:min(410px,calc(100% - 16px));height:var(--tab-height);
  display:grid;grid-template-columns:1fr 1fr 58px 1fr 1fr;align-items:center;
  padding:7px 8px;border-radius:22px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(235,232,248,.95);
  box-shadow:0 14px 32px rgba(123,108,178,.14);
  backdrop-filter:blur(22px) saturate(170%);
  -webkit-backdrop-filter:blur(22px) saturate(170%);
}
.tab-item,.add-tab{
  border:0;background:transparent;min-width:44px;min-height:48px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;color:var(--muted)
}
.tab-item svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tab-item span{font-size:.56rem;font-weight:700}
.tab-item.active{color:#7a81f7}
.add-tab{
  width:52px;height:52px;min-height:52px;justify-self:center;border-radius:18px;
  background:linear-gradient(145deg,#8cb6ff 0%,#9a95ff 55%,#f28fcb 100%);
  color:#fff;box-shadow:0 12px 24px rgba(140,131,242,.24)
}
.add-tab span{font-size:1.75rem;line-height:1;font-weight:300;margin-top:-2px}

.sheet-backdrop{position:fixed;inset:0;background:rgba(34,28,66,.18);backdrop-filter:blur(4px);z-index:30}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:31;
  background:linear-gradient(180deg,#fffafe 0%,#f5fbff 100%);
  border-radius:24px 24px 0 0;
  box-shadow:0 -18px 42px rgba(123,108,178,.16);
  padding:7px 13px calc(20px + var(--safe-bottom));
  transform:translateY(104%);
  transition:.24s cubic-bezier(.22,.9,.28,1);
  max-width:430px;margin:0 auto;max-height:88vh;overflow:auto;overscroll-behavior:contain;
  color:var(--text);
}
.sheet.open{transform:translateY(0)}
.sheet.tall{max-height:92vh}
.sheet-handle{width:36px;height:4px;border-radius:999px;background:#ddd7f8;margin:2px auto 8px}
.sheet-header{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:4px;margin-bottom:7px}
.sheet-header h2{margin:0;text-align:center;font-size:1rem;font-weight:780;letter-spacing:-.02em;color:var(--text)}
.sheet-spacer{width:44px;height:44px}
.back-button{
  border:0;width:44px;height:44px;border-radius:14px;background:rgba(255,255,255,.76);
  border:1px solid #ece8f7;
  font-size:1.75rem;line-height:1;color:#805ff0;display:grid;place-items:center;
}

.form-stack{display:flex;flex-direction:column;gap:9px}
.form-stack.compact{margin-top:9px}
label span{display:block;font-size:.66rem;font-weight:720;color:var(--text-soft);margin:0 0 4px}
input,select{
  width:100%;border:1px solid #e6e8f5;background:#fff;border-radius:14px;
  padding:12px 13px;color:var(--text);outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92);
  font-size:.84rem
}
input::placeholder{color:#a0abc2}
input:focus,select:focus{border-color:#cfc8f8;box-shadow:0 0 0 4px rgba(140,131,242,.10)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.form-actions,.button-row{display:flex;gap:8px;flex-wrap:wrap}
.primary-button,.secondary-button,.danger-button{
  border:0;border-radius:14px;padding:12px 14px;font-weight:760;font-size:.78rem;min-height:44px
}
.primary-button{background:linear-gradient(145deg,#8d70f8,#a55bf0 58%,#ff82b8);color:#fff;box-shadow:0 10px 20px rgba(151,88,236,.22)}
.secondary-button{background:#fff;color:var(--text);border:1px solid #e8e6f5;box-shadow:0 4px 12px rgba(121,112,181,.05)}
.danger-button{background:#fff1f4;color:#d65a72;border:1px solid #ffd3dc}
.full{width:100%}

.settings-section{border-radius:16px;padding:11px;margin-top:8px;background:linear-gradient(180deg,#fff,#fbf9ff)}
.settings-section h3,.toggle-row strong,.push-status-row strong{margin:0 0 7px;font-size:.78rem;font-weight:780;color:#34415f}
.muted{font-size:.63rem;color:var(--text-soft);line-height:1.45;margin:7px 0 0}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:3px;background:#f5f4fb;padding:3px;border-radius:12px;border:1px solid var(--line)}
.segmented button{border:0;min-height:44px;background:transparent;border-radius:10px;padding:8px 7px;font-weight:700;color:var(--muted);font-size:.72rem}
.segmented button.active{background:#fff;color:var(--text);box-shadow:0 4px 10px rgba(121,112,181,.07)}
.push-panel{display:flex;flex-direction:column;gap:9px}
.push-status-row{display:flex;justify-content:space-between;align-items:flex-start;gap:9px}
.push-status-row p{margin:3px 0 0;font-size:.62rem;color:var(--text-soft);line-height:1.35}
.toggle-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:1px}
.toggle-row p{font-size:.61rem;color:var(--text-soft);margin:2px 0 0;line-height:1.3}
.switch{width:46px;height:44px;min-width:46px;border:0;border-radius:999px;background:transparent;padding:0;position:relative}
.switch:before{content:"";position:absolute;left:0;right:0;top:8px;height:28px;border-radius:999px;background:#e6e5ee;box-shadow:inset 0 1px 2px rgba(0,0,0,.05)}
.switch span{position:absolute;left:3px;top:11px;width:22px;height:22px;border-radius:50%;background:white;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:.2s}
.switch.on:before{background:linear-gradient(145deg,#65d889,#33c97a)}
.switch.on span{transform:translateX(18px)}
.status-box{background:#f7f4ff;color:var(--text-soft);border:1px solid #e9e3f7;border-radius:12px;padding:9px 10px;font-size:.62rem;line-height:1.45}

.school-editor{display:flex;flex-direction:column;gap:8px}
.school-day{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:9px}
.school-day h3{margin:0 0 7px;font-size:.74rem;font-weight:760;color:var(--text)}
.school-row{display:grid;grid-template-columns:56px 1fr;gap:7px;align-items:center;margin-bottom:5px}
.context-card{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px;align-items:center;border-radius:14px;padding:9px}
.context-card strong{display:block;font-size:.76rem;font-weight:760;color:var(--text)}
.context-card p{margin:2px 0 0;font-size:.62rem;color:var(--text-soft)}
.push-hint{margin-top:8px;background:linear-gradient(135deg,#f2efff,#edf8ff);color:#625893;border:1px solid #e6e1ff;padding:9px 10px;border-radius:12px;font-size:.63rem;line-height:1.45}
.reminder-stack{display:flex;flex-direction:column;gap:7px;margin-top:8px}
.reminder-card{display:flex;justify-content:space-between;gap:8px;align-items:center;border-radius:14px;padding:9px}
.reminder-card strong{display:block;font-size:.72rem;font-weight:760;color:var(--text)}
.reminder-card p{margin:2px 0 0;font-size:.62rem;color:var(--text-soft)}
.chip-delete{border:0;min-width:44px;min-height:44px;border-radius:11px;padding:7px 9px;background:#fff1f4;color:#cf5f76;font-size:.62rem;font-weight:760;border:1px solid #ffd5dd}

.toast{
  position:fixed;left:50%;bottom:calc(var(--tab-height) + 20px + var(--safe-bottom));transform:translate(-50%,14px);
  opacity:0;pointer-events:none;z-index:70;background:rgba(41,51,79,.95);color:#fff;
  border-radius:14px;padding:9px 12px;font-size:.66rem;font-weight:700;transition:.22s;
  white-space:nowrap;max-width:calc(100% - 30px);overflow:hidden;text-overflow:ellipsis
}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (max-width:360px){
  .app-shell{padding-left:12px;padding-right:12px}
  .school-row-card,.after-school-card{grid-template-columns:48px 32px minmax(0,1fr) auto;gap:7px}
  .subject-icon,.after-icon,.context-icon{width:30px;height:30px}
  .slider-nav{display:none}
  .week-slider{padding-right:1px}
  .bottom-tabbar{width:calc(100% - 12px)}
  .add-tab{width:50px;height:50px;min-height:50px}
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}
}

/* =========================================================
   V13 — WEEK VIEW REFERENCE MATCH
   Visual-only overrides. Existing data/routing/functions stay intact.
   ========================================================= */
:root{
  --ref-ink:#10194a;
  --ref-secondary:#667493;
  --ref-line:#edf0fb;
  --ref-shadow:0 8px 30px rgba(64,72,140,.07);
  --ref-shadow-small:0 5px 16px rgba(64,72,140,.065);
}
html,body{overflow-x:hidden}
body{
  background:
    radial-gradient(circle at 82% 4%,rgba(202,230,255,.52) 0 5.5rem,transparent 5.6rem),
    radial-gradient(circle at 16% 21%,rgba(221,229,255,.36) 0 7rem,transparent 7.1rem),
    linear-gradient(180deg,#f7faff 0%,#fbfaff 52%,#f8fbff 100%);
  color:var(--ref-ink);
}
.app-shell{
  max-width:430px;
  padding-left:clamp(14px,4vw,18px);
  padding-right:clamp(14px,4vw,18px);
  padding-top:18px;
  padding-bottom:calc(92px + var(--safe-bottom));
}

/* Header */
.playful-sky{height:92px;inset:0 12px auto 12px;opacity:.92}
.cloud{background:rgba(255,255,255,.62);border-color:rgba(255,255,255,.8);box-shadow:none}
.sky-sun{right:72px;top:9px;font-size:36px;filter:drop-shadow(0 6px 12px rgba(244,194,83,.13))}
.sky-unicorn{display:none}
.topbar{min-height:62px;align-items:center;margin-bottom:10px;padding:0 3px;position:relative;z-index:2}
.profile-cluster{gap:11px}
.kid-avatar{
  width:52px;height:52px;border-radius:50%;
  background:linear-gradient(145deg,#fff2df,#fff9ec);
  border:2px solid rgba(255,255,255,.95);
  box-shadow:0 6px 20px rgba(86,102,154,.08);
  font-size:28px;
}
h1{font-family:Inter,-apple-system,BlinkMacSystemFont,"SF Pro Display",system-ui,sans-serif;font-size:1.9rem;font-weight:780;letter-spacing:-.045em;color:var(--ref-ink)}
.tiny-heart{color:#ff74a8;font-size:.52em;margin-left:4px}
.top-info{font-size:.79rem;font-weight:600;color:#7080a1;margin-top:2px}
.eyebrow{
  gap:8px;min-height:46px;padding:0 14px;border-radius:999px;
  background:rgba(255,255,255,.88);border:1px solid rgba(236,237,249,.95);
  color:#394a7f;font-size:.82rem;font-weight:760;letter-spacing:0;
  box-shadow:0 7px 20px rgba(64,72,140,.065);
  text-transform:none;
}
.month-calendar-icon{width:20px;height:20px;color:#5266ad;flex:none}

/* Week date selector */
.week-strip{gap:7px;margin-bottom:10px;position:relative;z-index:2}
.day-pill{
  min-height:48px;padding:6px 3px;border-radius:16px;
  background:rgba(255,255,255,.9);border:1px solid rgba(234,237,248,.95);
  color:#5f6e8f;box-shadow:0 5px 16px rgba(64,72,140,.05);
}
.day-pill span{font-size:.64rem;font-weight:760;letter-spacing:.035em}
.day-pill strong{font-size:1.02rem;font-weight:780;color:inherit;margin-top:1px}
.day-pill.active{
  background:linear-gradient(135deg,#79b3ff 0%,#7f96ff 48%,#b97df5 100%);
  color:#fff;border-color:transparent;
  box-shadow:0 8px 20px rgba(113,126,240,.2),0 0 18px rgba(180,125,245,.1);
}

/* Next card */
.next-card{
  min-height:70px;grid-template-columns:46px minmax(0,1fr) auto;gap:11px;
  padding:10px 12px;margin-bottom:15px;border-radius:24px;
  background:rgba(255,255,255,.92);border:1px solid rgba(238,237,250,.96);
  box-shadow:var(--ref-shadow);
}
.next-icon{
  width:46px;height:46px;border-radius:15px;
  background:linear-gradient(145deg,#f2edff,#f8f5ff);
  color:#7c60ee;box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.next-icon svg{width:24px;height:24px}
.next-kicker{font-size:.62rem;font-weight:780;letter-spacing:.055em;color:#8790ad;margin-bottom:2px}
.next-copy strong{font-size:.94rem;font-weight:780;color:var(--ref-ink);letter-spacing:-.012em}
.next-copy span{font-size:.76rem;color:#6e7b99;margin-top:2px}
.tiny-label{
  min-width:82px;min-height:40px;gap:6px;padding:8px 12px;border-radius:999px;
  background:linear-gradient(145deg,#f1edff,#f3f0ff);border:1px solid #e3dcff;
  color:#6d55ed;font-size:.76rem;font-weight:760;box-shadow:none;
}
.reminder-clock-icon{width:19px;height:19px;flex:none}

/* Week title */
#weekView .week-title-row{margin:2px 3px 10px;align-items:center}
#weekView .week-title-row h2{font-size:1.34rem;font-weight:790;letter-spacing:-.035em;color:var(--ref-ink)}
#weekView .week-title-row span{font-size:.76rem;font-weight:650;color:#71809e;text-transform:none}

/* One white card per day */
#weekView .day-card{
  padding:11px 12px 12px;margin:0 0 11px;border-radius:24px;
  background:#fff;border:0;box-shadow:var(--ref-shadow);
  overflow:visible;
}
#weekView .selected-day-card{background:#fff;border:0}
#weekView .day-head{height:22px;margin-bottom:8px;align-items:center}
#weekView .day-head-left{display:flex;align-items:baseline;gap:8px;min-width:0}
#weekView .day-head strong{font-size:.8rem;font-weight:800;color:var(--ref-ink);letter-spacing:-.015em}
#weekView .day-head .day-date{font-size:.68rem;font-weight:650;color:#73809c}
#weekView .after-school-count{font-size:.68rem;font-weight:760;color:#b05bd3}

/* 4 visible lesson cards + one right arrow, matching the reference */
#weekView .slider-shell{position:relative;padding-right:42px}
#weekView .week-slider{
  display:flex;gap:7px;width:auto;margin:0;padding:0;
  overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
#weekView .week-slider::-webkit-scrollbar{display:none}
#weekView .slider-nav.prev{display:none}
#weekView .slider-nav.next{
  right:-2px;top:50%;width:40px;height:40px;transform:translateY(-50%);
  color:#63729a;font-size:1.45rem;
}
#weekView .slider-nav.next:before{
  width:40px;height:40px;border-radius:50%;
  background:#fff;border:0;box-shadow:0 5px 18px rgba(64,72,140,.08);
}
#weekView .week-item{
  flex:0 0 calc((100% - 21px)/4);
  min-width:0;max-width:none;height:82px;min-height:82px;
  padding:7px 7px 6px;border-radius:18px;
  border:0;background:var(--item-soft);
  box-shadow:inset 0 0 0 1px rgba(112,126,175,.045);
  scroll-snap-align:start;text-align:left;color:var(--ref-ink);
  display:flex;flex-direction:column;align-items:flex-start;
  overflow:hidden;
}
#weekView .week-item-icon{
  width:32px;height:32px;border-radius:12px;margin:0 0 4px;
  background:rgba(255,255,255,.66);color:var(--item-accent);
  box-shadow:0 4px 13px rgba(64,72,140,.05),inset 0 1px 0 rgba(255,255,255,.9);
  flex:none;
}
#weekView .week-item-icon svg{width:19px;height:19px;stroke-width:1.9}
#weekView .week-item strong{
  min-height:0;display:block;width:100%;margin:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--ref-ink);font-size:.69rem;font-weight:790;line-height:1.1;
}
#weekView .week-item small{
  display:block;margin-top:2px;color:#697895;font-size:.62rem;font-weight:580;line-height:1;
}
#weekView .week-item .item-bubble{
  position:absolute;left:6px;right:6px;bottom:5px;
  min-height:17px;padding:2px 4px;margin:0;border-radius:999px;
  display:flex;justify-content:center;align-items:center;
  background:#fff3bd;color:#735b16;border:1px solid #f5df7f;
  font-size:.52rem;font-weight:780;line-height:1;white-space:nowrap;
  box-shadow:none;
}
#weekView .week-item .item-bubble.ghost{
  background:rgba(255,255,255,.72);color:#765dd0;border-color:rgba(126,100,218,.16);
}

/* Pastel subject colors are deliberately quiet and flat */
#weekView .lesson-item[style*="#e9f3ff"],#weekView .lesson-item[style*="#eef1ff"]{background:#eef6ff}
#weekView .lesson-item[style*="#e7faf3"]{background:#edfaf5}
#weekView .lesson-item[style*="#e8faf5"]{background:#eefaf1}
#weekView .lesson-item[style*="#fff0e3"]{background:#fff3e9}
#weekView .lesson-item[style*="#fff0f8"],#weekView .lesson-item[style*="#fcecf8"]{background:#fff0f8}
#weekView .lesson-item[style*="#eef0ff"]{background:#f1efff}

/* Bottom week card */
#weekView .family-banner{
  min-height:66px;margin:4px 0 3px;padding:9px 12px;border-radius:24px;
  display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:center;
  background:linear-gradient(105deg,#e9f8dd 0%,#fff2bc 48%,#ffe0eb 100%);
  border:1px solid rgba(255,255,255,.96);box-shadow:var(--ref-shadow);
}
#weekView .banner-trophy{
  width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  background:rgba(255,255,255,.72);color:#f2af2e;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 4px 12px rgba(64,72,140,.05);
}
#weekView .banner-trophy svg{width:25px;height:25px}
#weekView .banner-copy{gap:2px;min-width:0}
#weekView .banner-copy strong{font-size:.87rem;font-weight:800;color:var(--ref-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#weekView .banner-copy span{font-size:.67rem;color:#657593}
#weekView .banner-scene{font-size:22px;gap:1px;white-space:nowrap}

/* Floating bottom navigation */
.bottom-tabbar{
  width:min(402px,calc(100% - 18px));height:68px;bottom:calc(7px + var(--safe-bottom));
  grid-template-columns:1fr 1fr 62px 1fr 1fr;padding:7px 9px;
  border-radius:28px;background:rgba(255,255,255,.94);border:1px solid rgba(236,238,248,.95);
  box-shadow:0 10px 32px rgba(64,72,140,.10);
  backdrop-filter:blur(22px) saturate(160%);-webkit-backdrop-filter:blur(22px) saturate(160%);
}
.tab-item{position:relative;color:#6e7b98;gap:2px}
.tab-item svg{width:21px;height:21px;stroke-width:1.8}
.tab-item span{font-size:.6rem;font-weight:700}
.tab-item.active{color:#6855ef}
.tab-item.active:after{
  content:"";position:absolute;left:50%;bottom:-5px;transform:translateX(-50%);
  width:34px;height:3px;border-radius:999px;background:#ff5f9c;
}
.add-tab{
  width:56px;height:56px;min-height:56px;border-radius:20px;
  background:linear-gradient(135deg,#79b5ff 0%,#7f8fff 46%,#ca78ef 100%);
  box-shadow:0 10px 24px rgba(102,101,240,.22);
}
.add-tab span{font-size:1.8rem}

/* Keep all existing views/sheets readable after the header/nav restyle */
.school-row-card,.after-school-card,.activity-list-card,.settings-section,.context-card,.reminder-card,.empty-card,.overview-reminder{color:var(--ref-ink)}
.sheet{color:var(--ref-ink)}

@media (max-width:400px){
  .app-shell{padding-left:13px;padding-right:13px}
  .kid-avatar{width:48px;height:48px;font-size:26px}
  h1{font-size:1.75rem}
  .eyebrow{min-height:43px;padding:0 12px;font-size:.77rem}
  .month-calendar-icon{width:18px;height:18px}
  .next-card{grid-template-columns:43px minmax(0,1fr) auto;padding-left:10px;padding-right:10px}
  .next-icon{width:43px;height:43px}
  .tiny-label{min-width:75px;padding-left:9px;padding-right:9px}
  #weekView .day-card{padding-left:10px;padding-right:10px}
  #weekView .slider-shell{padding-right:39px}
  #weekView .week-slider{gap:6px}
  #weekView .week-item{flex-basis:calc((100% - 18px)/4);height:80px;min-height:80px;padding-left:6px;padding-right:6px;border-radius:17px}
  #weekView .week-item-icon{width:30px;height:30px;border-radius:11px}
  #weekView .week-item-icon svg{width:18px;height:18px}
  #weekView .week-item strong{font-size:.66rem}
  #weekView .week-item small{font-size:.59rem}
  #weekView .slider-nav.next{width:38px;height:38px}
  #weekView .slider-nav.next:before{width:38px;height:38px}
  .bottom-tabbar{width:calc(100% - 12px)}
}

@media (max-width:360px){
  .app-shell{padding-left:10px;padding-right:10px}
  .playful-sky{display:none}
  .kid-avatar{width:45px;height:45px}
  .eyebrow{padding:0 10px;gap:5px}
  #weekView .day-card{padding-left:9px;padding-right:9px}
  #weekView .slider-shell{padding-right:36px}
  #weekView .week-slider{gap:5px}
  #weekView .week-item{flex-basis:calc((100% - 15px)/4);padding:6px 5px}
  #weekView .week-item strong{font-size:.63rem}
  #weekView .week-item .item-bubble{left:4px;right:4px;font-size:.48rem}
}

/* V13.1 — spacing calibration against the supplied reference screenshot */
.topbar{margin-bottom:0}
.week-strip{margin-bottom:7px}
.next-card{min-height:64px;padding-top:8px;padding-bottom:8px;margin-bottom:10px}
#weekView .week-title-row{margin-top:0;margin-bottom:9px}
#weekView .day-card{padding-top:8px;padding-bottom:9px;margin-bottom:9px}
#weekView .day-head{height:20px;margin-bottom:6px}
#weekView .week-item{height:76px;min-height:76px;padding-top:6px;padding-bottom:5px}
#weekView .week-item-icon{width:34px;height:34px;margin-bottom:3px}
#weekView .week-item-icon svg{width:20px;height:20px}
#weekView .week-item strong{font-size:.72rem}
#weekView .week-item small{font-size:.61rem;margin-top:2px}
#weekView .week-item .item-bubble{left:4px;right:4px;bottom:4px;font-size:.49rem;min-height:16px;padding:2px 2px;letter-spacing:-.01em}
.bottom-tabbar{height:60px;grid-template-columns:1fr 1fr 58px 1fr 1fr;padding-top:5px;padding-bottom:5px}
.tab-item{min-height:46px}
.add-tab{width:52px;height:52px;min-height:52px;border-radius:19px}

/* Preserve both slider directions without cluttering the initial reference layout. */
#weekView .slider-nav.prev{
  display:grid;left:-4px;right:auto;width:44px;height:44px;
  opacity:0;pointer-events:none;transition:opacity .16s ease;
}
#weekView .slider-nav.prev.visible{opacity:1;pointer-events:auto}
#weekView .slider-nav.prev:before{width:40px;height:40px;border-radius:50%;background:#fff;border:0;box-shadow:0 5px 18px rgba(64,72,140,.08)}
#weekView .slider-nav.next{width:44px;height:44px;transition:opacity .16s ease}
#weekView .slider-nav.next.hidden-at-end{opacity:0;pointer-events:none}

/* =========================================================
   V14 — spacing refinement based on styles_mockup_fixed(1).css
   Selective only: keeps the 4-card reference layout intact.
   ========================================================= */

/* The uploaded polish uses a fixed 14px mobile gutter. This tracks the
   reference screenshot better than the previous growing clamp at 390–430px. */
.app-shell{
  padding-left:14px;
  padding-right:14px;
  padding-top:17px;
  padding-bottom:calc(94px + var(--safe-bottom));
}

/* Restore a little breathing room between identity, dates and next card. */
.topbar{margin-bottom:6px}
.week-strip{gap:7px;margin-bottom:10px}
.day-pill{min-height:50px;padding-top:6px;padding-bottom:6px}

/* Previous pass was slightly over-compressed vs the reference. */
.next-card{
  min-height:68px;
  padding:9px 12px;
  margin-bottom:13px;
}
#weekView .week-title-row{margin-top:1px;margin-bottom:10px}

/* Day blocks: slightly more internal air, but still dense enough to keep
   most of the week visible on a phone. */
#weekView .day-card{
  padding:10px 11px 11px;
  margin-bottom:10px;
}
#weekView .day-head{height:22px;margin-bottom:7px}

/* IMPORTANT: keep calculated widths so exactly four cards fit.
   Only increase vertical rhythm; do NOT adopt the uploaded fixed 92px width. */
#weekView .slider-shell{padding-right:42px}
#weekView .week-slider{gap:7px}
#weekView .week-item{
  flex:0 0 calc((100% - 21px)/4);
  min-width:0;
  max-width:none;
  height:84px;
  min-height:84px;
  padding:7px 7px 6px;
}
#weekView .week-item-icon{
  width:34px;
  height:34px;
  margin-bottom:4px;
}
#weekView .week-item-icon svg{width:20px;height:20px}
#weekView .week-item strong{font-size:.70rem;line-height:1.1}
#weekView .week-item small{font-size:.61rem;margin-top:2px}
#weekView .week-item .item-bubble{
  left:5px;
  right:5px;
  bottom:5px;
  min-height:16px;
  padding:2px 3px;
  font-size:.50rem;
}

/* More balanced end-card and nav spacing from the polish file, but not its
   taller 74px nav which would steal too much vertical space. */
#weekView .family-banner{
  min-height:70px;
  margin:7px 0 4px;
  padding:10px 12px;
}
.bottom-tabbar{
  height:64px;
  bottom:calc(7px + var(--safe-bottom));
  padding-top:6px;
  padding-bottom:6px;
}
.tab-item{min-height:48px}
.add-tab{width:54px;height:54px;min-height:54px}

@media (max-width:400px){
  .app-shell{padding-left:13px;padding-right:13px}
  #weekView .day-card{padding-left:10px;padding-right:10px}
  #weekView .week-slider{gap:6px}
  #weekView .week-item{
    flex-basis:calc((100% - 18px)/4);
    height:82px;
    min-height:82px;
    padding-left:6px;
    padding-right:6px;
  }
  #weekView .week-item strong{font-size:.67rem}
  #weekView .week-item small{font-size:.59rem}
  .bottom-tabbar{width:calc(100% - 12px)}
}

@media (max-width:360px){
  .app-shell{padding-left:10px;padding-right:10px}
  #weekView .day-card{padding-left:9px;padding-right:9px}
  #weekView .week-slider{gap:5px}
  #weekView .week-item{
    flex-basis:calc((100% - 15px)/4);
    height:80px;
    min-height:80px;
    padding-left:5px;
    padding-right:5px;
  }
  #weekView .week-item strong{font-size:.64rem}
  #weekView .week-item .item-bubble{left:4px;right:4px;font-size:.48rem}
}

/* =========================================================
   V15 — mesečni pregled (samo dejavnosti + starševski opomniki)
   ========================================================= */
.month-trigger{
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
  gap:8px;
  color:#59658d;
  background:rgba(255,255,255,.92);
  border:1px solid #e5e7f5;
}
.month-trigger .month-calendar-icon{width:18px;height:18px;color:#6472c7}
.month-trigger:active{transform:scale(.98)}

.month-mode .week-strip,
.month-mode .next-card{display:none}
.month-mode .topbar{margin-bottom:14px}
.month-mode .playful-sky{opacity:.72}

.month-head{
  display:grid;
  grid-template-columns:44px 1fr 44px;
  gap:10px;
  align-items:center;
  margin:2px 0 12px;
}
.month-head>div{text-align:center;min-width:0}
.month-head h2{
  margin:0;
  color:#152048;
  font-size:1.22rem;
  line-height:1.1;
  font-weight:820;
  letter-spacing:-.025em;
}
.month-head h2 span{color:#7f8eac;font-weight:700}
.month-head p{margin:4px 0 0;color:#8a96af;font-size:.64rem;font-weight:650}
.month-nav{
  width:44px;height:44px;
  border:0;
  border-radius:15px;
  background:#fff;
  color:#6f78a6;
  box-shadow:0 6px 16px rgba(74,83,143,.07);
  font-size:1.45rem;
  display:grid;place-items:center;
}
.month-nav:active{transform:scale(.97)}

.month-calendar-card{
  background:rgba(255,255,255,.96);
  border:1px solid #e9e8f4;
  border-radius:24px;
  box-shadow:0 10px 30px rgba(76,83,144,.075);
  padding:12px 10px 10px;
}
.month-weekdays{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:4px;
  padding:0 2px 7px;
}
.month-weekdays span{
  text-align:center;
  font-size:.53rem;
  line-height:1;
  font-weight:800;
  color:#9aa5bc;
  letter-spacing:.035em;
}
.month-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px;
}
.month-day{
  position:relative;
  aspect-ratio:1/1.08;
  min-width:0;
  border:0;
  border-radius:13px;
  background:#fbfcff;
  color:#435172;
  padding:5px 3px 4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  box-shadow:inset 0 0 0 1px #f0f1f8;
  transition:.16s ease;
}
.month-day.empty{background:transparent;box-shadow:none;pointer-events:none}
.month-day-number{font-size:.69rem;font-weight:760;line-height:1}
.month-day.today .month-day-number{
  width:22px;height:22px;
  display:grid;place-items:center;
  margin-top:-2px;
  border-radius:50%;
  color:#6e63dc;
  background:#f0edff;
}
.month-day.selected{
  background:linear-gradient(145deg,#f1f6ff 0%,#f7f0ff 100%);
  box-shadow:inset 0 0 0 1.5px #b8b4fb,0 5px 12px rgba(115,105,190,.09);
}
.month-day.selected .month-day-number{color:#5147bf}
.month-markers{
  min-height:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
}
.event-dot{width:6px;height:6px;border-radius:50%;display:block}
.event-dot.activity{background:linear-gradient(145deg,#8b9fff,#bc7cf3)}
.event-dot.reminder{background:#f1c655}
.month-markers em{font-style:normal;font-size:.46rem;color:#8c91a8;font-weight:800}

.month-agenda-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:14px 3px 8px;
}
.month-agenda-head>div{display:flex;flex-direction:column;min-width:0}
.month-agenda-head strong{font-size:.84rem;color:#1b2850;font-weight:800}
.month-agenda-head>div span{margin-top:2px;font-size:.62rem;color:#8995ae;text-transform:capitalize}
.month-agenda-head>span{
  font-size:.58rem;
  font-weight:800;
  color:#8a67c7;
  background:#f4efff;
  border-radius:999px;
  padding:5px 8px;
}
.month-agenda-list{display:flex;flex-direction:column;gap:7px}
.month-agenda-item{
  width:100%;
  border:1px solid #eae8f5;
  border-radius:17px;
  background:linear-gradient(90deg,#fff,var(--month-soft,#fbf9ff));
  box-shadow:0 7px 18px rgba(77,85,145,.055);
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:9px 10px;
  text-align:left;
  color:#1b2850;
}
.month-agenda-item.reminder{--month-soft:#fffaf0}
.month-agenda-icon{
  width:36px;height:36px;
  border-radius:12px;
  display:grid;place-items:center;
  background:#fff;
  color:var(--month-accent,#806df0);
  box-shadow:0 4px 10px rgba(76,84,143,.06);
}
.month-agenda-icon svg{width:19px;height:19px}
.month-agenda-icon.reminder-icon{color:#d89d28;background:#fff8df}
.month-agenda-copy{min-width:0;display:flex;flex-direction:column}
.month-agenda-copy strong{
  font-size:.74rem;
  font-weight:800;
  color:#1b2850;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.month-agenda-copy span{
  margin-top:2px;
  font-size:.6rem;
  color:#6e7c99;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.month-agenda-item em{
  font-style:normal;
  font-size:.56rem;
  color:#725ed2;
  background:#f2eeff;
  border:1px solid #e3dcfb;
  border-radius:999px;
  padding:5px 7px;
  white-space:nowrap;
  font-weight:760;
}
.month-empty-state{
  min-height:128px;
  border-radius:20px;
  border:1px dashed #e2e2f1;
  background:linear-gradient(145deg,#fff,#fbf9ff);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px 24px;
}
.month-empty-icon{
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:13px;
  background:linear-gradient(145deg,#eef5ff,#f7efff);
  color:#8a74e8;
  font-size:1.2rem;
  margin-bottom:8px;
}
.month-empty-state strong{font-size:.74rem;color:#263653;font-weight:800}
.month-empty-state span{margin-top:4px;font-size:.61rem;color:#8794ad;line-height:1.4;max-width:240px}

@media(max-width:390px){
  .month-calendar-card{padding-left:8px;padding-right:8px}
  .month-grid{gap:4px}
  .month-day{border-radius:12px;padding-left:2px;padding-right:2px}
  .month-day-number{font-size:.66rem}
  .event-dot{width:5px;height:5px}
}

/* =========================================================
   V16 — month navigation + reference-accurate month layout
   ========================================================= */
.header-actions{
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
  z-index:3;
}
.header-settings{
  width:42px;
  height:42px;
  min-width:42px;
  border:1px solid #e5e8f5;
  border-radius:15px;
  background:rgba(255,255,255,.94);
  color:#68759b;
  display:grid;
  place-items:center;
  box-shadow:0 7px 18px rgba(74,83,143,.07);
}
.header-settings svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.header-settings:active{transform:scale(.97)}

.month-trigger{
  min-height:42px;
  padding:0 14px;
  border-radius:18px;
  gap:8px;
  font-size:.72rem;
  color:#4d5985;
  background:rgba(255,255,255,.94);
  box-shadow:0 7px 18px rgba(74,83,143,.07);
}
.month-trigger .month-calendar-icon{width:21px;height:21px;color:#4f5ba2}

.month-mode .week-strip,
.month-mode .next-card{display:none}
.month-mode .topbar{margin-bottom:12px}
.month-mode .playful-sky{opacity:.82}

.calendar-view-switcher{
  width:100%;
  min-height:56px;
  margin:2px 0 14px;
  padding:5px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:4px;
  border-radius:22px;
  background:rgba(255,255,255,.88);
  border:1px solid #e7eaf5;
  box-shadow:0 10px 28px rgba(76,83,144,.08);
}
.calendar-view-switcher button{
  min-height:46px;
  border:0;
  border-radius:18px;
  background:transparent;
  color:#677492;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  font-size:.78rem;
  font-weight:700;
}
.calendar-view-switcher button svg{
  width:21px;
  height:21px;
  color:#7565ea;
}
.calendar-view-switcher button strong{font-weight:760}
.calendar-view-switcher .sun-icon{
  font-size:1.55rem;
  line-height:1;
  color:#64749e;
  font-weight:400;
}
.calendar-view-switcher button.active{
  color:#fff;
  background:linear-gradient(115deg,#72aaff 0%,#8f8cff 58%,#d277e9 100%);
  box-shadow:0 9px 20px rgba(126,123,239,.22);
}
.calendar-view-switcher button.active svg,
.calendar-view-switcher button.active .sun-icon{color:#fff}

.month-panel{
  background:rgba(255,255,255,.94);
  border:1px solid #e8eaf4;
  border-radius:26px;
  box-shadow:0 12px 32px rgba(76,83,144,.075);
  padding:15px 11px 12px;
  margin-bottom:13px;
  overflow:hidden;
}
.month-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 2px 14px;
}
.month-title-block{min-width:0}
.month-head .month-title-block{text-align:left}
.month-head h2{
  margin:0;
  color:#10194a;
  font-size:1.22rem;
  line-height:1.08;
  font-weight:830;
  letter-spacing:-.035em;
}
.month-head h2 span{
  color:#7483a8;
  font-weight:700;
}
.month-nav-group{
  display:flex;
  gap:8px;
}
.month-nav{
  width:42px;
  height:42px;
  border:1px solid #e8eaf5;
  border-radius:50%;
  background:#fff;
  color:#647198;
  box-shadow:0 6px 16px rgba(74,83,143,.07);
  font-size:1.42rem;
  display:grid;
  place-items:center;
  padding:0;
}

.month-weekdays{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:4px;
  padding:0 1px 8px;
}
.month-weekdays span{
  text-align:center;
  color:#68759b;
  font-size:.58rem;
  font-weight:820;
  letter-spacing:.02em;
}
.month-weekdays span.weekend{color:#d74683}

.month-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:4px;
}
.month-day{
  position:relative;
  min-width:0;
  height:90px;
  border:1px solid #e8eaf4;
  border-radius:13px;
  background:#fff;
  color:#111d4d;
  padding:6px 4px 5px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  text-align:left;
  box-shadow:0 3px 10px rgba(76,83,144,.025);
  overflow:hidden;
}
.month-day.weekend{background:linear-gradient(180deg,#fff,#fff7fb)}
.month-day.outside{
  color:#a9b1c7;
  background:linear-gradient(180deg,#fbfcff,#fafbff);
}
.month-day-number{
  display:block;
  min-height:16px;
  font-size:.68rem;
  font-weight:790;
  line-height:1;
  margin-bottom:5px;
}
.month-day.weekend:not(.outside) .month-day-number{color:#e13f7a}
.month-day.today .month-day-number{
  width:auto;height:auto;
  display:block;
  margin:0 0 5px;
  border-radius:0;
  color:#6d5ce7;
  background:transparent;
}
.month-day.selected{
  background:linear-gradient(180deg,#fff,#f7f3ff);
  border-color:#9c79f6;
  box-shadow:inset 0 0 0 1px rgba(156,121,246,.18),0 6px 14px rgba(126,110,220,.08);
}
.month-day.selected .month-day-number{color:#6351dc}

.month-event-chip{
  width:100%;
  min-height:45px;
  margin-top:auto;
  border-radius:10px;
  padding:5px 3px 4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  background:var(--event-soft,#f2efff);
  color:var(--event-accent,#6f5ae0);
  overflow:hidden;
}
.month-event-chip i{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  font-style:normal;
}
.month-event-chip i svg{width:16px;height:16px;stroke-width:1.9}
.month-event-chip b{
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
  font-size:.49rem;
  line-height:1.05;
  font-weight:800;
}
.month-event-chip small{
  font-size:.46rem;
  line-height:1;
  color:#53658d;
  font-weight:650;
}
.month-event-chip.reminder{
  background:#fff0f6;
  color:#e94e8e;
}
.month-event-chip.reminder .month-calendar-icon{width:15px;height:15px;color:#e94e8e}
.month-more{
  position:absolute;
  right:3px;
  bottom:3px;
  min-width:15px;
  height:15px;
  padding:0 3px;
  border-radius:999px;
  background:#fff;
  color:#7e6acb;
  border:1px solid #e4def8;
  font-size:.43rem;
  font-weight:800;
  display:grid;
  place-items:center;
}

.month-today-card{
  background:rgba(255,255,255,.94);
  border:1px solid #e8eaf4;
  border-radius:24px;
  box-shadow:0 10px 28px rgba(76,83,144,.07);
  padding:13px 12px;
  margin-bottom:5px;
}
.month-today-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.month-today-head>strong{
  font-size:.92rem;
  color:#10194a;
  font-weight:820;
  letter-spacing:-.02em;
}
.month-today-head button{
  border:0;
  background:transparent;
  color:#7c5df0;
  font-size:.65rem;
  font-weight:780;
  min-height:38px;
  padding:0;
}
.month-today-head button span{font-size:1rem;vertical-align:-1px}
.month-today-list{display:flex;flex-direction:column;gap:8px}
.month-today-item,
.month-today-empty{
  width:100%;
  min-height:76px;
  border:0;
  border-radius:18px;
  background:linear-gradient(90deg,#fff,#fbf9ff);
  box-shadow:inset 0 0 0 1px #eceaf7;
  display:grid;
  grid-template-columns:56px 40px minmax(0,1fr) 34px;
  gap:8px;
  align-items:center;
  padding:8px;
  text-align:left;
  color:#10194a;
}
.month-today-empty{
  grid-template-columns:56px minmax(0,1fr);
}
.month-date-badge{
  height:60px;
  border-radius:14px;
  background:linear-gradient(180deg,#f0ecff,#f5f2ff);
  color:#795be5;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.month-date-badge span{font-size:.54rem;font-weight:800}
.month-date-badge strong{font-size:1.28rem;font-weight:830;margin:2px 0}
.month-date-badge em{font-size:.5rem;font-style:normal;font-weight:700}
.month-today-icon{
  width:40px;height:40px;
  border-radius:12px;
  display:grid;
  place-items:center;
  color:var(--event-accent,#7758e8);
  background:var(--event-soft,#efe9ff);
}
.month-today-icon svg{width:20px;height:20px}
.month-today-icon.reminder-icon{color:#e14f8a;background:#fff0f6}
.month-today-copy{min-width:0;display:flex;flex-direction:column}
.month-today-copy strong{
  font-size:.78rem;
  color:#10194a;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.month-today-copy span{
  margin-top:3px;
  font-size:.65rem;
  color:#6f7e9c;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.month-today-arrow{
  width:32px;height:32px;
  border-radius:50%;
  background:#fff;
  color:#7b88a5;
  display:grid;
  place-items:center;
  box-shadow:0 5px 12px rgba(74,83,143,.07);
  font-size:1rem;
}
.month-empty-copy{min-width:0;display:flex;flex-direction:column}
.month-empty-copy strong{font-size:.76rem;color:#263653;font-weight:800}
.month-empty-copy span{margin-top:3px;font-size:.61rem;color:#8794ad;line-height:1.35}

.bottom-tabbar .tab-item[data-view="month"] svg{stroke-width:1.75}

@media(max-width:390px){
  .header-actions{gap:6px}
  .month-trigger{padding:0 11px;min-height:40px;font-size:.68rem}
  .header-settings{width:40px;height:40px;min-width:40px}
  .calendar-view-switcher{min-height:54px;margin-bottom:12px}
  .calendar-view-switcher button{min-height:44px;gap:7px;font-size:.74rem}
  .month-panel{padding:13px 8px 10px;border-radius:22px}
  .month-head{margin-bottom:12px}
  .month-head h2{font-size:1.1rem}
  .month-nav{width:38px;height:38px}
  .month-grid{gap:3px}
  .month-day{height:82px;border-radius:11px;padding:5px 3px 4px}
  .month-day-number{font-size:.64rem;margin-bottom:4px}
  .month-event-chip{min-height:41px;border-radius:9px;padding:4px 2px 3px}
  .month-event-chip i{width:16px;height:16px}
  .month-event-chip i svg{width:14px;height:14px}
  .month-event-chip b{font-size:.45rem}
  .month-event-chip small{font-size:.43rem}
  .month-today-card{border-radius:21px;padding:11px 10px}
}

@media(max-width:360px){
  .kid-avatar{width:44px;height:44px}
  .profile-cluster{gap:8px}
  h1{font-size:1.5rem}
  .header-actions{gap:4px}
  .month-trigger{padding:0 9px;font-size:.64rem}
  .month-trigger .month-calendar-icon{width:18px;height:18px}
  .header-settings{width:38px;height:38px;min-width:38px;border-radius:13px}
  .month-day{height:76px}
  .month-event-chip{min-height:37px}
  .month-weekdays span{font-size:.53rem}
  .month-today-item,.month-today-empty{grid-template-columns:50px 36px minmax(0,1fr) 30px;padding:7px;gap:7px}
  .month-today-empty{grid-template-columns:50px minmax(0,1fr)}
  .month-date-badge{height:56px}
  .month-today-icon{width:36px;height:36px}
}


/* =========================================================
   V17 — MONTH VIEW REFERENCE MATCH
   Reference is the source of truth for monthly layout.
   ========================================================= */
.app-shell.month-mode{padding-left:16px;padding-right:16px;padding-bottom:calc(var(--tab-height) + 32px + var(--safe-bottom))}
.month-mode .topbar{margin-bottom:18px;padding:2px 2px 0}
.month-mode .playful-sky{height:105px;opacity:.82}
.month-mode .kid-avatar{width:54px;height:54px;border-radius:50%;font-size:29px;background:linear-gradient(145deg,#fff3dd,#fff7eb);border:2px solid rgba(255,255,255,.98);box-shadow:0 8px 24px rgba(82,91,152,.09)}
.month-mode .profile-cluster{gap:12px}
.month-mode h1{font-size:1.95rem;line-height:1;font-weight:820;letter-spacing:-.045em;color:#10194a}
.month-mode .top-info{font-size:.82rem;color:#66718f;font-weight:650;margin-top:5px}
.month-mode .tiny-heart{color:#ff6f9d;font-size:.58em}
.month-mode .header-actions{gap:0}
.month-mode .month-trigger{
  min-height:48px;
  padding:0 17px;
  border-radius:999px;
  gap:10px;
  font-size:.82rem;
  font-weight:800;
  color:#455284;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(232,234,247,.96);
  box-shadow:0 8px 26px rgba(70,80,140,.075);
}
.month-mode .month-trigger .month-calendar-icon{width:22px;height:22px;color:#4050a2;stroke-width:1.9}

.month-mode .calendar-view-switcher{
  min-height:64px;
  margin:0 0 18px;
  padding:6px;
  grid-template-columns:repeat(3,1fr);
  gap:0;
  border-radius:28px;
  background:rgba(255,255,255,.91);
  border:1px solid rgba(234,236,248,.98);
  box-shadow:0 10px 30px rgba(70,80,140,.08);
  overflow:hidden;
}
.month-mode .calendar-view-switcher button{
  position:relative;
  min-height:52px;
  border-radius:22px;
  gap:10px;
  color:#59688f;
  font-size:.88rem;
  font-weight:760;
}
.month-mode .calendar-view-switcher button:not(:last-child):not(.active)::after{
  content:"";
  position:absolute;
  right:0;
  top:10px;
  bottom:10px;
  width:1px;
  background:#e8eaf4;
}
.month-mode .calendar-view-switcher button svg{width:23px;height:23px;color:#6f68ea;stroke-width:1.75}
.month-mode .calendar-view-switcher .sun-svg{width:24px;height:24px;color:#67779c}
.month-mode .calendar-view-switcher button strong{font-weight:760}
.month-mode .calendar-view-switcher button.active{
  color:#fff;
  background:linear-gradient(115deg,#72aaff 0%,#8e8cff 56%,#d277e9 100%);
  box-shadow:0 10px 25px rgba(126,123,239,.22);
}
.month-mode .calendar-view-switcher button.active::after{display:none}
.month-mode .calendar-view-switcher button.active svg{color:#fff}

.month-mode .month-panel{
  background:rgba(255,255,255,.95);
  border:1px solid rgba(234,236,247,.98);
  border-radius:28px;
  box-shadow:0 10px 30px rgba(70,80,140,.08);
  padding:20px 12px 14px;
  margin-bottom:18px;
  overflow:hidden;
}
.month-mode .month-head{margin:0 4px 18px;align-items:center}
.month-mode .month-head h2{
  font-size:1.42rem;
  line-height:1;
  color:#10194a;
  font-weight:830;
  letter-spacing:-.04em;
}
.month-mode .month-head h2 span{color:#6f7da1;font-weight:700}
.month-mode .month-nav-group{gap:10px}
.month-mode .month-nav{
  width:46px;height:46px;
  border-radius:50%;
  border:1px solid #e8eaf5;
  background:#fff;
  color:#536187;
  box-shadow:0 8px 22px rgba(70,80,140,.075);
  padding:0;
}
.month-mode .month-nav span{display:block;font-size:1.75rem;line-height:.75;margin-top:-3px;font-weight:350}

.month-mode .month-weekdays{
  gap:4px;
  padding:0 1px 9px;
}
.month-mode .month-weekdays span{
  font-size:.66rem;
  font-weight:800;
  color:#657293;
  letter-spacing:0;
}
.month-mode .month-weekdays span.weekend{color:#d83f7a}

.month-mode .month-grid{
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:4px;
}
.month-mode .month-day{
  min-width:0;
  height:86px;
  border:1px solid #e8eaf4;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#fdfdff);
  color:#10194a;
  padding:7px 4px 5px;
  box-shadow:none;
  overflow:hidden;
}
.month-mode .month-day.weekend{background:linear-gradient(180deg,#fff,#fff7fb)}
.month-mode .month-day.outside{background:linear-gradient(180deg,#fbfcff,#fafbff);color:#a7b0c7}
.month-mode .month-day.outside.weekend{background:linear-gradient(180deg,#fffafd,#fff6fb)}
.month-mode .month-day-number{
  min-height:16px;
  margin:0 0 5px;
  font-size:.72rem;
  line-height:1;
  font-weight:790;
  color:inherit;
}
.month-mode .month-day.weekend:not(.outside) .month-day-number{color:#df3e77}
.month-mode .month-day.today .month-day-number{width:auto;height:auto;margin:0 0 5px;background:transparent;color:#6856df;border-radius:0}
.month-mode .month-day.selected{
  background:linear-gradient(180deg,#fff,#f7f2ff);
  border-color:#9869ee;
  box-shadow:inset 0 0 0 1px rgba(152,105,238,.12),0 5px 15px rgba(112,92,206,.07);
}
.month-mode .month-day.selected .month-day-number{color:#6d51e3}
.month-mode .month-event-chip{
  width:100%;
  min-height:48px;
  margin-top:auto;
  padding:5px 3px 4px;
  border-radius:11px;
  gap:2px;
  background:var(--event-soft,#f1edff);
  color:var(--event-accent,#6f5ae0);
  align-items:center;
  justify-content:center;
}
.month-mode .month-event-chip i{width:18px;height:18px}
.month-mode .month-event-chip i svg{width:17px;height:17px;stroke-width:1.85}
.month-mode .month-event-chip b{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  width:100%;
  max-height:2.1em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:normal;
  text-align:center;
  font-size:.49rem;
  line-height:1.05;
  font-weight:800;
}
.month-mode .month-event-chip small{font-size:.48rem;line-height:1;color:#53658d;font-weight:650}
.month-mode .month-event-chip.reminder{background:#fff0f6;color:#e94e8e}
.month-mode .month-event-chip.reminder .note-mini-icon{width:17px;height:17px;color:#e94e8e}
.month-mode .month-more{right:3px;bottom:3px;min-width:15px;height:15px;border-color:#e4def8;background:#fff;color:#7e6acb}

.month-mode .month-today-card{
  background:rgba(255,255,255,.95);
  border:1px solid rgba(234,236,247,.98);
  border-radius:26px;
  box-shadow:0 10px 30px rgba(70,80,140,.08);
  padding:14px 13px 13px;
  margin:0 0 4px;
}
.month-mode .month-today-head{margin-bottom:10px}
.month-mode .month-today-head>strong{font-size:1rem;color:#10194a;font-weight:820;letter-spacing:-.025em}
.month-mode .month-today-head button{color:#7b5df0;font-size:.69rem;font-weight:800;min-height:40px}
.month-mode .month-today-item,
.month-mode .month-today-empty{
  min-height:82px;
  border-radius:20px;
  background:linear-gradient(90deg,#fff,#faf8ff);
  box-shadow:inset 0 0 0 1px #eceaf7;
  grid-template-columns:58px 42px minmax(0,1fr) 36px;
  gap:9px;
  padding:9px;
}
.month-mode .month-today-empty{grid-template-columns:58px minmax(0,1fr)}
.month-mode .month-date-badge{
  height:64px;
  border-radius:16px;
  background:linear-gradient(180deg,#efebff,#f5f2ff);
  color:#7359e7;
}
.month-mode .month-date-badge span{font-size:.58rem;font-weight:800}
.month-mode .month-date-badge strong{font-size:1.38rem;font-weight:830;margin:2px 0}
.month-mode .month-date-badge em{font-size:.52rem;font-weight:750}
.month-mode .month-today-icon{width:42px;height:42px;border-radius:13px}
.month-mode .month-today-icon svg{width:21px;height:21px;stroke-width:1.85}
.month-mode .month-today-icon.reminder-icon{color:#e24e8b;background:#fff0f6}
.month-mode .month-today-copy strong{font-size:.82rem;color:#10194a;font-weight:800}
.month-mode .month-today-copy span{font-size:.68rem;color:#66718f;margin-top:4px}
.month-mode .month-today-arrow{width:34px;height:34px;border-radius:50%;background:#fff;color:#7784a4;box-shadow:0 6px 16px rgba(70,80,140,.07)}
.month-mode .month-empty-copy strong{font-size:.8rem;color:#10194a;font-weight:800}
.month-mode .month-empty-copy span{font-size:.64rem;color:#7c89a5}

/* Month mode keeps the weekly planning tab active, exactly like the reference. */
.month-mode + .bottom-tabbar .tab-item[data-view="week"]{color:#6f74f6}

@media(max-width:410px){
  .app-shell.month-mode{padding-left:14px;padding-right:14px}
  .month-mode .topbar{margin-bottom:16px}
  .month-mode .kid-avatar{width:50px;height:50px;font-size:27px}
  .month-mode h1{font-size:1.78rem}
  .month-mode .top-info{font-size:.77rem}
  .month-mode .month-trigger{min-height:44px;padding:0 13px;font-size:.76rem}
  .month-mode .calendar-view-switcher{min-height:60px;margin-bottom:16px;padding:5px;border-radius:25px}
  .month-mode .calendar-view-switcher button{min-height:50px;border-radius:20px;font-size:.82rem;gap:8px}
  .month-mode .month-panel{padding:17px 9px 12px;border-radius:25px;margin-bottom:16px}
  .month-mode .month-head{margin-bottom:16px}
  .month-mode .month-head h2{font-size:1.27rem}
  .month-mode .month-nav{width:42px;height:42px}
  .month-mode .month-weekdays span{font-size:.6rem}
  .month-mode .month-grid{gap:3px}
  .month-mode .month-day{height:80px;border-radius:12px;padding:6px 3px 4px}
  .month-mode .month-day-number{font-size:.67rem;margin-bottom:4px}
  .month-mode .month-event-chip{min-height:44px;border-radius:10px;padding:4px 2px 3px}
  .month-mode .month-event-chip i{width:16px;height:16px}
  .month-mode .month-event-chip i svg{width:15px;height:15px}
  .month-mode .month-event-chip b{font-size:.45rem}
  .month-mode .month-event-chip small{font-size:.44rem}
  .month-mode .month-today-card{border-radius:23px;padding:12px 11px}
}

@media(max-width:360px){
  .app-shell.month-mode{padding-left:11px;padding-right:11px}
  .month-mode .kid-avatar{width:47px;height:47px;font-size:25px}
  .month-mode h1{font-size:1.64rem}
  .month-mode .month-trigger{padding:0 10px;font-size:.7rem}
  .month-mode .month-trigger .month-calendar-icon{width:19px;height:19px}
  .month-mode .calendar-view-switcher button{font-size:.76rem;gap:6px}
  .month-mode .calendar-view-switcher button svg{width:20px;height:20px}
  .month-mode .month-panel{padding-left:7px;padding-right:7px}
  .month-mode .month-day{height:74px}
  .month-mode .month-event-chip{min-height:40px}
  .month-mode .month-weekdays span{font-size:.55rem}
  .month-mode .month-today-item,.month-mode .month-today-empty{grid-template-columns:52px 36px minmax(0,1fr) 30px;gap:7px;padding:7px}
  .month-mode .month-today-empty{grid-template-columns:52px minmax(0,1fr)}
  .month-mode .month-date-badge{height:58px}
  .month-mode .month-today-icon{width:36px;height:36px}
}


/* =========================================================
   V18 — INTERACTION SAFETY
   Keep key navigation above decorative layers and make iOS taps deterministic.
   ========================================================= */
#monthLabel,
.bottom-tabbar,
.bottom-tabbar button,
.calendar-view-switcher,
.calendar-view-switcher button,
.month-nav,
.month-day,
.month-today-item,
.month-today-head button{
  pointer-events:auto !important;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
#monthLabel{position:relative;z-index:8}
.header-actions{position:relative;z-index:8}
.bottom-tabbar{z-index:50}
.bottom-tabbar button{position:relative;z-index:1}
.playful-sky,.playful-sky *{pointer-events:none !important}


/* v19 navigation hardening */
.month-trigger,.bottom-tabbar a.tab-item{
  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  user-select:none;
}
.month-trigger,.bottom-tabbar .tab-item,.bottom-tabbar .add-tab,.bottom-tabbar #bottomSettings{
  pointer-events:auto !important;
  cursor:pointer;
}
.bottom-tabbar a.tab-item{color:var(--muted);}
.bottom-tabbar a.tab-item.active{color:#6f74f6;}

/* =========================================================
   V20 — MONTH VIEW 1:1 REFERENCE PASS
   Month-only visual overrides. Daily/weekly logic untouched.
   ========================================================= */
.app-shell.month-mode{
  max-width:430px;
  padding:16px 16px calc(var(--tab-height) + 26px + var(--safe-bottom));
  background:
    radial-gradient(circle at 84% 2%,rgba(214,226,255,.52),transparent 23%),
    linear-gradient(180deg,#f6f9ff 0%,#fbf9ff 56%,#f4f9ff 100%);
}
.month-mode .playful-sky{
  inset:0 10px auto 10px;
  height:96px;
  opacity:.95;
  overflow:visible;
}
.month-mode .cloud-a{right:40px;top:28px;width:52px;height:20px;opacity:.75}
.month-mode .cloud-b{left:152px;top:48px;width:60px;height:21px;opacity:.62}
.month-mode .sky-sun{
  right:86px;
  top:4px;
  font-size:42px;
  filter:drop-shadow(0 8px 12px rgba(239,194,77,.16));
}
.month-mode .sky-unicorn{display:none}

.month-mode .topbar{
  min-height:62px;
  margin:0 0 14px;
  padding:0 2px;
  align-items:center;
}
.month-mode .profile-cluster{gap:11px}
.month-mode .kid-avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  font-size:26px;
  background:linear-gradient(145deg,#fff4df,#fff8ee);
  border:2px solid rgba(255,255,255,.98);
  box-shadow:0 8px 24px rgba(74,84,140,.09);
}
.month-mode h1{
  font-size:1.58rem;
  line-height:1;
  font-weight:830;
  letter-spacing:-.045em;
  color:#10194a;
}
.month-mode .tiny-heart{font-size:.58em;color:#ff6f9d;margin-left:2px}
.month-mode .top-info{
  margin-top:5px;
  padding:0;
  font-size:.76rem;
  line-height:1;
  font-weight:660;
  color:#66718f;
}
.month-mode .header-actions{display:flex;align-items:center;gap:8px}
.month-mode .month-trigger{
  min-width:112px;
  min-height:38px;
  padding:0 14px 0 16px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(232,234,246,.98);
  box-shadow:0 10px 28px rgba(70,80,140,.08);
  color:#33406f;
  font-size:.77rem;
  font-weight:800;
  letter-spacing:0;
}
.month-mode .month-trigger .month-calendar-icon{
  width:21px;
  height:21px;
  color:#39499d;
  stroke-width:1.9;
  flex:0 0 auto;
}

.month-mode .calendar-view-switcher{
  width:100%;
  min-height:50px;
  margin:0 0 14px;
  padding:4px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:0;
  border-radius:24px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(235,236,247,.96);
  box-shadow:0 10px 30px rgba(70,80,140,.08);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  overflow:hidden;
}
.month-mode .calendar-view-switcher button{
  position:relative;
  min-height:42px;
  padding:0 10px;
  border:0;
  border-radius:19px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  background:transparent;
  color:#59688f;
  font-size:.82rem;
  font-weight:740;
}
.month-mode .calendar-view-switcher button:not(:last-child):not(.active)::after{
  content:"";
  position:absolute;
  right:0;
  top:9px;
  bottom:9px;
  width:1px;
  background:#e7e9f3;
}
.month-mode .calendar-view-switcher button svg{
  width:21px;
  height:21px;
  color:#6f68ea;
  stroke-width:1.7;
}
.month-mode .calendar-view-switcher .sun-svg{color:#65759b}
.month-mode .calendar-view-switcher button strong{font-weight:760}
.month-mode .calendar-view-switcher button.active{
  color:#fff;
  background:linear-gradient(115deg,#73aaff 0%,#8c8cff 55%,#d378e8 100%);
  box-shadow:0 8px 22px rgba(126,123,239,.22);
}
.month-mode .calendar-view-switcher button.active::after{display:none}
.month-mode .calendar-view-switcher button.active svg{color:#fff}

.month-mode .month-panel{
  margin:0 0 14px;
  padding:16px 10px 11px;
  border-radius:27px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(235,236,247,.98);
  box-shadow:0 10px 30px rgba(70,80,140,.08);
  overflow:hidden;
}
.month-mode .month-head{
  margin:0 4px 14px;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.month-mode .month-head h2{
  margin:0;
  font-size:1.34rem;
  line-height:1;
  color:#10194a;
  font-weight:840;
  letter-spacing:-.04em;
}
.month-mode .month-head h2 span{
  color:#6f7da1;
  font-weight:690;
}
.month-mode .month-nav-group{display:flex;gap:10px}
.month-mode .month-nav{
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid #e8eaf5;
  background:#fff;
  color:#536187;
  box-shadow:0 7px 20px rgba(70,80,140,.07);
  padding:0;
}
.month-mode .month-nav span{
  display:block;
  font-size:1.55rem;
  line-height:.8;
  margin-top:-2px;
  font-weight:340;
}

.month-mode .month-weekdays{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:3px;
  padding:0 1px 7px;
}
.month-mode .month-weekdays span{
  text-align:center;
  font-size:.62rem;
  line-height:1;
  font-weight:800;
  color:#657293;
}
.month-mode .month-weekdays span.weekend{color:#d83f7a}

.month-mode .month-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:3px;
}
.month-mode .month-day{
  position:relative;
  min-width:0;
  height:64px;
  padding:5px 3px 4px;
  border:1px solid #e8eaf4;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#fdfdff);
  color:#10194a;
  box-shadow:none;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  text-align:left;
}
.month-mode .month-day.weekend{background:linear-gradient(180deg,#fff,#fff8fb)}
.month-mode .month-day.outside{background:linear-gradient(180deg,#fbfcff,#fafbff);color:#aab3c9}
.month-mode .month-day.outside.weekend{background:linear-gradient(180deg,#fffafd,#fff7fb)}
.month-mode .month-day-number{
  min-height:12px;
  margin:0 0 2px 1px;
  font-size:.63rem;
  line-height:1;
  font-weight:790;
  color:inherit;
}
.month-mode .month-day.weekend:not(.outside) .month-day-number{color:#df3e77}
.month-mode .month-day.today .month-day-number{
  width:auto;height:auto;margin:0 0 2px 1px;
  background:transparent;color:#6856df;border-radius:0
}
.month-mode .month-day.selected{
  background:linear-gradient(180deg,#fff,#f7f2ff);
  border-color:#9565ee;
  box-shadow:inset 0 0 0 1px rgba(149,101,238,.1),0 5px 15px rgba(112,92,206,.06);
}
.month-mode .month-day.selected .month-day-number{color:#6d51e3}
.month-mode .month-event-chip{
  width:100%;
  min-height:40px;
  margin-top:auto;
  padding:3px 2px 3px;
  border-radius:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  background:var(--event-soft,#f1edff);
  color:var(--event-accent,#6f5ae0);
  overflow:hidden;
}
.month-mode .month-event-chip i{
  width:15px;
  height:15px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
}
.month-mode .month-event-chip i svg{
  width:14px;
  height:14px;
  stroke-width:1.9;
}
.month-mode .month-event-chip b{
  display:block;
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
  font-size:.50rem;
  line-height:1.05;
  font-weight:800;
}
.month-mode .month-event-chip small{
  font-size:.48rem;
  line-height:1;
  color:#53658d;
  font-weight:650;
}
.month-mode .month-event-chip.reminder{
  background:#fff0f6;
  color:#e94e8e;
  justify-content:center;
}
.month-mode .month-event-chip.reminder .note-mini-icon{width:15px;height:15px;color:#e94e8e}
.month-mode .month-more{
  position:absolute;
  right:2px;
  bottom:2px;
  min-width:14px;
  height:14px;
  padding:0 3px;
  border-radius:999px;
  display:grid;
  place-items:center;
  border:1px solid #e4def8;
  background:#fff;
  color:#7e6acb;
  font-size:.43rem;
  font-weight:800;
}

.month-mode .month-today-card{
  margin:0 0 4px;
  padding:12px 11px 11px;
  border-radius:24px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(235,236,247,.98);
  box-shadow:0 10px 30px rgba(70,80,140,.08);
}
.month-mode .month-today-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}
.month-mode .month-today-head>strong{
  font-size:.95rem;
  color:#10194a;
  font-weight:830;
  letter-spacing:-.025em;
}
.month-mode .month-today-head button{
  min-height:36px;
  border:0;
  background:transparent;
  color:#7b5df0;
  font-size:.67rem;
  font-weight:800;
  padding:0 2px;
}
.month-mode .month-today-list{display:block}
.month-mode .month-today-item,
.month-mode .month-today-empty{
  width:100%;
  min-height:70px;
  display:grid;
  grid-template-columns:52px 40px minmax(0,1fr) 34px;
  gap:8px;
  align-items:center;
  padding:7px;
  border:0;
  border-radius:18px;
  background:linear-gradient(90deg,#fff,#faf8ff);
  box-shadow:inset 0 0 0 1px #eceaf7;
  text-align:left;
}
.month-mode .month-today-empty{grid-template-columns:52px minmax(0,1fr)}
.month-mode .month-date-badge{
  height:56px;
  border-radius:14px;
  background:linear-gradient(180deg,#efebff,#f5f2ff);
  color:#7359e7;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.month-mode .month-date-badge span{font-size:.54rem;font-weight:800;line-height:1}
.month-mode .month-date-badge strong{font-size:1.24rem;font-weight:840;line-height:1;margin:2px 0}
.month-mode .month-date-badge em{font-size:.49rem;font-style:normal;font-weight:750;line-height:1}
.month-mode .month-today-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  background:var(--event-soft,#f0ecff);
  color:var(--event-accent,#7a5ee9);
  display:grid;
  place-items:center;
}
.month-mode .month-today-icon svg{width:20px;height:20px;stroke-width:1.9}
.month-mode .month-today-icon.reminder-icon{color:#e24e8b;background:#fff0f6}
.month-mode .month-today-copy{min-width:0;display:flex;flex-direction:column}
.month-mode .month-today-copy strong{
  font-size:.78rem;
  color:#10194a;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.month-mode .month-today-copy span{
  margin-top:3px;
  font-size:.65rem;
  color:#66718f;
}
.month-mode .month-today-arrow{
  width:32px;
  height:32px;
  border-radius:50%;
  background:#fff;
  color:#7784a4;
  box-shadow:0 6px 16px rgba(70,80,140,.07);
  display:grid;
  place-items:center;
  justify-self:end;
}
.month-mode .month-empty-copy strong{font-size:.77rem;color:#10194a;font-weight:800}
.month-mode .month-empty-copy span{font-size:.62rem;color:#7c89a5;margin-top:2px}

/* Exact reference-style bottom navigation in month mode */
.month-mode + .bottom-tabbar{
  width:min(396px,calc(100% - 32px));
  height:70px;
  bottom:calc(8px + var(--safe-bottom));
  padding:7px 8px;
  grid-template-columns:1fr 1fr 58px 1fr 1fr;
  border-radius:27px;
  background:rgba(255,255,255,.93);
  border:1px solid rgba(232,234,245,.98);
  box-shadow:0 16px 36px rgba(73,81,138,.13);
}
.month-mode + .bottom-tabbar .tab-item,
.month-mode + .bottom-tabbar .add-tab{min-height:48px}
.month-mode + .bottom-tabbar .tab-item svg{width:19px;height:19px}
.month-mode + .bottom-tabbar .tab-item span{font-size:.56rem;font-weight:760}
.month-mode + .bottom-tabbar .tab-item[data-view="week"]{color:#6f74f6;position:relative}
.month-mode + .bottom-tabbar .tab-item[data-view="week"]::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  transform:translateX(-50%);
  width:30px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(90deg,#ff5d8d,#ff3163);
}
.month-mode + .bottom-tabbar .add-tab{
  width:54px;
  height:54px;
  min-height:54px;
  border-radius:19px;
  background:linear-gradient(145deg,#7fb4ff 0%,#8d8bff 52%,#dc75e8 100%);
  box-shadow:0 12px 24px rgba(125,121,239,.26);
}

@media(max-width:410px){
  .app-shell.month-mode{padding-left:14px;padding-right:14px}
  .month-mode .topbar{margin-bottom:12px}
  .month-mode .kid-avatar{width:44px;height:44px;font-size:25px}
  .month-mode h1{font-size:1.5rem}
  .month-mode .month-trigger{min-width:106px;min-height:36px;padding:0 12px;font-size:.73rem}
  .month-mode .calendar-view-switcher{min-height:48px;margin-bottom:13px;padding:4px}
  .month-mode .calendar-view-switcher button{min-height:40px;font-size:.78rem;gap:7px}
  .month-mode .calendar-view-switcher button svg{width:19px;height:19px}
  .month-mode .month-panel{padding:15px 8px 10px;border-radius:25px;margin-bottom:13px}
  .month-mode .month-head{margin-bottom:13px}
  .month-mode .month-head h2{font-size:1.22rem}
  .month-mode .month-nav{width:38px;height:38px}
  .month-mode .month-weekdays span{font-size:.58rem}
  .month-mode .month-grid{gap:3px}
  .month-mode .month-day{height:61px;border-radius:11px;padding:5px 2px 3px}
  .month-mode .month-event-chip{min-height:37px;border-radius:9px;padding:3px 2px}
  .month-mode .month-event-chip i{width:14px;height:14px}
  .month-mode .month-event-chip i svg{width:13px;height:13px}
  .month-mode .month-event-chip b{font-size:.47rem}
  .month-mode .month-event-chip small{font-size:.45rem}
  .month-mode .month-today-card{border-radius:22px;padding:11px 10px}
  .month-mode + .bottom-tabbar{width:calc(100% - 28px)}
}

@media(max-width:360px){
  .app-shell.month-mode{padding-left:11px;padding-right:11px}
  .month-mode .month-trigger{min-width:98px;padding:0 9px;font-size:.68rem}
  .month-mode .month-trigger .month-calendar-icon{width:18px;height:18px}
  .month-mode .calendar-view-switcher button{font-size:.72rem;gap:6px}
  .month-mode .month-panel{padding-left:6px;padding-right:6px}
  .month-mode .month-day{height:57px}
  .month-mode .month-event-chip{min-height:34px}
  .month-mode .month-event-chip b{font-size:.44rem}
  .month-mode .month-event-chip small{font-size:.42rem}
  .month-mode .month-today-item,.month-mode .month-today-empty{grid-template-columns:48px 34px minmax(0,1fr) 30px;gap:6px;padding:6px}
  .month-mode .month-today-empty{grid-template-columns:48px minmax(0,1fr)}
  .month-mode .month-date-badge{height:52px}
  .month-mode .month-today-icon{width:34px;height:34px}
  .month-mode + .bottom-tabbar{width:calc(100% - 20px)}
}

/* V20 exact event composition — icon + label on first row, time below */
.month-mode .month-event-chip.activity{
  display:grid;
  grid-template-columns:15px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:3px;
  row-gap:1px;
  align-content:center;
  justify-content:stretch;
  text-align:left;
}
.month-mode .month-event-chip.activity i{
  grid-column:1;
  grid-row:1;
  align-self:center;
  justify-self:center;
}
.month-mode .month-event-chip.activity b{
  grid-column:2;
  grid-row:1;
  text-align:left;
  align-self:center;
}
.month-mode .month-event-chip.activity small{
  grid-column:1 / -1;
  grid-row:2;
  text-align:center;
  justify-self:center;
}
.month-mode .month-event-chip.reminder{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  text-align:center;
}

/* Selected-day preview mirrors the reference: date tile + one inner event card. */
.month-mode .month-today-item{
  grid-template-columns:52px minmax(0,1fr);
  gap:8px;
  padding:7px;
  background:#fff;
}
.month-mode .month-today-event{
  min-width:0;
  min-height:56px;
  border-radius:16px;
  padding:7px 8px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 32px;
  gap:8px;
  align-items:center;
  background:linear-gradient(90deg,var(--event-soft,#f2efff),#fbf9ff);
  box-shadow:inset 0 0 0 1px rgba(232,229,247,.95);
}
.month-mode .month-today-item.reminder .month-today-event{
  background:linear-gradient(90deg,#fff1f6,#fbf9ff);
}
.month-mode .month-today-icon{
  width:38px;
  height:38px;
  border-radius:12px;
}
.month-mode .month-today-arrow{
  width:31px;
  height:31px;
}

@media(max-width:360px){
  .month-mode .month-today-item{grid-template-columns:48px minmax(0,1fr);gap:6px;padding:6px}
  .month-mode .month-today-event{grid-template-columns:34px minmax(0,1fr) 29px;gap:6px;padding:6px}
}
.month-mode .month-more{display:none}


/* =========================================================
   V21 — MONTH VIEW 1:1 REFERENCE PASS
   Based on supplied Gemini blueprint + approved reference image.
   Only month-mode visual layout is overridden here.
   ========================================================= */

/* Exact mobile canvas */
.app-shell.month-mode{
  max-width:390px;
  padding:22px 16px calc(104px + var(--safe-bottom));
  font-family:"Nunito",-apple-system,BlinkMacSystemFont,"SF Pro Rounded","SF Pro Text",system-ui,sans-serif;
  background:transparent;
}
.app-shell.month-mode main{display:block}
.month-mode .week-strip,
.month-mode .next-card{display:none !important}

/* Header */
.month-mode .playful-sky{
  inset:0 4px auto 4px;
  height:126px;
  overflow:visible;
  opacity:1;
}
.month-mode .cloud-a{
  width:72px;height:26px;right:2px;top:8px;
  background:rgba(220,240,255,.74);border-color:rgba(255,255,255,.72);
}
.month-mode .cloud-a:before{width:27px;height:27px;top:-13px;left:8px}
.month-mode .cloud-a:after{width:34px;height:34px;top:-19px;left:29px}
.month-mode .cloud-b{
  width:68px;height:24px;left:144px;top:61px;
  background:rgba(214,238,255,.62);border-color:rgba(255,255,255,.62);
}
.month-mode .cloud-b:before{width:24px;height:24px;top:-11px;left:8px}
.month-mode .cloud-b:after{width:31px;height:31px;top:-16px;left:28px}
.month-mode .sky-sun{
  right:96px;top:7px;font-size:58px;line-height:1;
  filter:drop-shadow(0 8px 14px rgba(244,191,73,.20));
}
.month-mode .sky-unicorn{display:none}

.month-mode .topbar{
  position:relative;z-index:2;
  align-items:center;
  min-height:68px;
  margin:0 0 18px;
  padding:0 2px;
}
.month-mode .profile-cluster{gap:11px}
.month-mode .kid-avatar{
  width:58px;height:58px;border-radius:50%;
  font-size:31px;
  border:3px solid rgba(255,255,255,.98);
  background:linear-gradient(145deg,#fff2cf 0%,#fff7e6 100%);
  box-shadow:0 7px 18px rgba(93,103,160,.11);
}
.month-mode h1{
  font-size:1.84rem;line-height:.98;
  font-weight:900;letter-spacing:-.045em;color:#10194a;
}
.month-mode .tiny-heart{font-size:.58em;color:#ff6f9d;margin-left:2px}
.month-mode .top-info{
  margin-top:5px;padding:0;
  font-size:.83rem;line-height:1;
  font-weight:800;color:#6f7c9b;
}
.month-mode .header-actions{display:flex;align-items:center}
.month-mode .month-trigger{
  min-height:44px;
  display:flex;align-items:center;gap:10px;
  padding:0 15px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.98);
  color:#31406f;
  box-shadow:0 8px 22px rgba(78,87,148,.08);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  font-size:.82rem;font-weight:900;letter-spacing:0;
  text-transform:none;
}
.month-mode .month-trigger .month-calendar-icon{
  width:22px;height:22px;color:#4050a2;stroke-width:2.15;
}

/* Dan / Teden / Mesec segmented control */
.month-mode .calendar-view-switcher{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:0;
  min-height:68px;
  padding:5px;
  margin:0 0 16px;
  border-radius:30px;
  background:rgba(255,255,255,.80);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:0 10px 28px rgba(76,83,144,.09);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.month-mode .calendar-view-switcher button{
  position:relative;
  min-width:0;min-height:56px;
  border:0;border-radius:24px;
  background:transparent;
  display:flex;align-items:center;justify-content:center;gap:10px;
  color:#5f6c94;
  font-size:.91rem;font-weight:900;
  padding:0 8px;
  box-shadow:none;
}
.month-mode .calendar-view-switcher button:not(:last-child):not(.active)::after{
  content:"";position:absolute;right:-1px;top:13px;bottom:13px;width:1px;background:#e8e9f4;
}
.month-mode .calendar-view-switcher button svg{
  width:25px;height:25px;color:#6a64e8;stroke-width:1.85;flex:0 0 auto;
}
.month-mode .calendar-view-switcher .sun-svg{color:#607097}
.month-mode .calendar-view-switcher button.active{
  background:linear-gradient(110deg,#72b5ff 0%,#888dfd 52%,#d36de8 100%);
  color:#fff;
  box-shadow:0 8px 20px rgba(119,116,239,.26),inset 0 1px 0 rgba(255,255,255,.32);
}
.month-mode .calendar-view-switcher button.active svg{color:#fff}
.month-mode .calendar-view-switcher button.active::after{display:none}
.month-mode .calendar-view-switcher button strong{font-weight:900}

/* Main calendar card */
.month-mode .month-panel{
  margin:0 0 16px;
  padding:18px 12px 12px;
  border-radius:28px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:0 12px 34px rgba(70,80,140,.08);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.month-mode .month-head{
  margin:0 3px 18px;
  display:flex;justify-content:space-between;align-items:center;
}
.month-mode .month-head h2{
  margin:0;
  font-size:1.52rem;line-height:1;
  font-weight:900;letter-spacing:-.035em;color:#10194a;
}
.month-mode .month-head h2 span{
  color:#68769d;font-weight:800;
}
.month-mode .month-nav-group{display:flex;gap:9px}
.month-mode .month-nav{
  width:44px;height:44px;min-width:44px;min-height:44px;
  border:1px solid #f0f1f7;border-radius:50%;
  background:rgba(255,255,255,.97);
  color:#617096;
  display:grid;place-items:center;
  box-shadow:0 7px 18px rgba(70,80,140,.07);
  padding:0;
}
.month-mode .month-nav span{font-size:1.8rem;line-height:.8;font-weight:350;margin-top:-3px}

/* Weekdays */
.month-mode .month-weekdays{
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  margin:0 0 7px;
  padding:0 2px;
  text-align:center;
}
.month-mode .month-weekdays span{
  font-size:.62rem;line-height:1;
  font-weight:900;letter-spacing:.035em;color:#667395;
}
.month-mode .month-weekdays span.weekend{color:#e63c7a}

/* Calendar grid — exact compact 7-column geometry */
.month-mode .month-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:3px;
}
.month-mode .month-day{
  position:relative;
  min-width:0;
  height:67px;
  padding:5px 3px 4px;
  border-radius:13px;
  border:1px solid #edf0f7;
  background:#fff;
  color:#10194a;
  display:flex;flex-direction:column;align-items:stretch;
  overflow:hidden;
  box-shadow:0 2px 5px rgba(90,100,154,.018);
}
.month-mode .month-day.weekend{background:linear-gradient(180deg,#fff,#fff9fc)}
.month-mode .month-day.outside{background:#fbfcff;color:#b6bfd1}
.month-mode .month-day.outside.weekend{background:#fffafd}
.month-mode .month-day-number{
  display:block;
  margin:0 0 2px;
  padding:0 1px;
  text-align:left;
  font-size:.67rem;line-height:1;
  font-weight:900;color:#10194a;
}
.month-mode .month-day.outside .month-day-number{color:#b3bdd1}
.month-mode .month-day.weekend:not(.outside) .month-day-number{color:#eb3b77}
.month-mode .month-day.today .month-day-number{color:#10194a;background:none;width:auto;height:auto}
.month-mode .month-day.selected{
  background:linear-gradient(180deg,#faf7ff,#fff);
  border:1.5px solid #916cf1;
  box-shadow:inset 0 0 0 1px rgba(145,108,241,.08),0 4px 12px rgba(122,94,219,.07);
}
.month-mode .month-day.selected .month-day-number{color:#6d51e3}

/* Event chip inside each date */
.month-mode .month-event-chip{
  width:100%;
  margin-top:auto;
  min-height:39px;
  border:0;border-radius:9px;
  background:var(--event-soft);
  color:var(--event-accent);
  display:grid;
  grid-template-columns:14px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:3px;row-gap:1px;
  align-items:center;
  padding:4px 3px 3px;
  overflow:hidden;
}
.month-mode .month-event-chip i{
  grid-column:1;grid-row:1;
  width:14px;height:14px;display:grid;place-items:center;
  color:var(--event-accent);font-style:normal;
}
.month-mode .month-event-chip i svg{width:14px;height:14px;stroke-width:2.05}
.month-mode .month-event-chip b{
  grid-column:2;grid-row:1;
  min-width:0;
  font-size:.49rem;line-height:1.05;
  font-weight:900;color:var(--event-accent);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  text-align:left;
}
.month-mode .month-event-chip small{
  grid-column:1 / -1;grid-row:2;
  display:block;
  font-size:.48rem;line-height:1;
  font-weight:800;color:#59698e;
  text-align:center;
}
.month-mode .month-event-chip.reminder{
  background:#fff1f6;
  color:#ed4e8e;
  grid-template-columns:1fr;
  grid-template-rows:18px auto;
  place-items:center;
}
.month-mode .month-event-chip.reminder i{grid-column:1;grid-row:1;width:17px;height:17px;color:#ed4e8e}
.month-mode .month-event-chip.reminder i svg{width:16px;height:16px}
.month-mode .month-event-chip.reminder b{
  grid-column:1;grid-row:2;
  width:100%;text-align:center;
  color:#667395;font-size:.47rem;line-height:1.05;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.month-mode .month-more{display:none !important}

/* Today / selected-day card */
.month-mode .month-today-card{
  margin:0;
  padding:13px 12px 12px;
  border-radius:28px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:0 12px 32px rgba(70,80,140,.075);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.month-mode .month-today-head{
  display:flex;justify-content:space-between;align-items:center;
  margin:0 2px 10px;
}
.month-mode .month-today-head>strong{
  font-size:1rem;line-height:1;
  font-weight:900;letter-spacing:-.025em;color:#10194a;
}
.month-mode .month-today-head button{
  min-height:38px;border:0;background:transparent;
  color:#7b5df0;font-size:.68rem;font-weight:900;padding:0 2px;
}
.month-mode .month-today-list{display:block}
.month-mode .month-today-item,
.month-mode .month-today-empty{
  width:100%;
  border:1px solid #eee9fb;
  border-radius:21px;
  background:#faf8ff;
  padding:8px;
  color:#10194a;
  box-shadow:none;
}
.month-mode .month-today-item{
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  gap:10px;
  align-items:center;
  text-align:left;
}
.month-mode .month-today-empty{
  display:grid;grid-template-columns:54px minmax(0,1fr);gap:10px;align-items:center;text-align:left;
}
.month-mode .month-date-badge{
  width:54px;height:62px;
  border-radius:16px;
  background:#ece6ff;
  color:#6e51e7;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  line-height:1;
}
.month-mode .month-date-badge span{font-size:.56rem;font-weight:900;text-transform:uppercase}
.month-mode .month-date-badge strong{font-size:1.42rem;font-weight:900;margin:3px 0 2px;line-height:.9}
.month-mode .month-date-badge em{font-style:normal;font-size:.55rem;font-weight:900;opacity:.82}
.month-mode .month-today-event{
  min-width:0;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 34px;
  gap:9px;align-items:center;
  min-height:62px;
  padding:6px 7px;
  border-radius:17px;
  background:#f8f6ff;
}
.month-mode .month-today-icon{
  width:42px;height:42px;border-radius:13px;
  background:var(--event-soft);
  color:var(--event-accent);
  display:grid;place-items:center;
}
.month-mode .month-today-icon svg{width:21px;height:21px;stroke-width:2}
.month-mode .month-today-icon.reminder-icon{background:#fff0f6;color:#e94e8e}
.month-mode .month-today-copy{min-width:0;display:flex;flex-direction:column}
.month-mode .month-today-copy strong{
  font-size:.83rem;line-height:1.1;font-weight:900;color:#10194a;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.month-mode .month-today-copy span{font-size:.68rem;color:#66718f;font-weight:700;margin-top:4px}
.month-mode .month-today-arrow{
  width:34px;height:34px;border-radius:50%;
  background:#fff;color:#6f7c9d;
  display:grid;place-items:center;
  box-shadow:0 5px 14px rgba(70,80,140,.065);
  font-size:1.1rem;
}
.month-mode .month-empty-copy strong{font-size:.8rem;font-weight:900;color:#10194a}
.month-mode .month-empty-copy span{display:block;margin-top:4px;font-size:.63rem;color:#7a87a2}

/* Bottom tab bar exact reference proportions */
.app-shell.month-mode + .bottom-tabbar{
  width:min(390px,calc(100% - 20px));
  height:76px;
  bottom:calc(9px + var(--safe-bottom));
  padding:8px 10px;
  grid-template-columns:1fr 1fr 62px 1fr 1fr;
  border-radius:28px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:0 18px 42px rgba(70,80,140,.14);
}
.app-shell.month-mode + .bottom-tabbar .tab-item,
.app-shell.month-mode + .bottom-tabbar .add-tab{
  min-height:52px;
}
.app-shell.month-mode + .bottom-tabbar .tab-item{
  color:#7180a3;
  gap:3px;
}
.app-shell.month-mode + .bottom-tabbar .tab-item svg{width:21px;height:21px;stroke-width:1.8}
.app-shell.month-mode + .bottom-tabbar .tab-item span{font-size:.58rem;font-weight:900}
.app-shell.month-mode + .bottom-tabbar .tab-item.active{color:#755cf1}
.app-shell.month-mode + .bottom-tabbar .tab-item.active:after{
  content:"";
  position:absolute;bottom:-7px;left:50%;transform:translateX(-50%);
  width:32px;height:4px;border-radius:999px;
  background:#ff4774;
}
.app-shell.month-mode + .bottom-tabbar .add-tab{
  width:60px;height:60px;min-height:60px;
  border-radius:21px;
  transform:translateY(-10px);
  background:linear-gradient(145deg,#73b2ff 0%,#8c8cfe 52%,#df70e8 100%);
  box-shadow:0 12px 26px rgba(124,119,240,.28);
  border:3px solid rgba(255,255,255,.96);
}
.app-shell.month-mode + .bottom-tabbar .add-tab span{font-size:1.95rem;font-weight:300;line-height:1}

/* 360px safeguard while preserving the same geometry */
@media (max-width:380px){
  .app-shell.month-mode{padding-left:12px;padding-right:12px}
  .month-mode .kid-avatar{width:54px;height:54px;font-size:29px}
  .month-mode h1{font-size:1.72rem}
  .month-mode .month-trigger{padding:0 12px;font-size:.76rem}
  .month-mode .calendar-view-switcher button{gap:7px;font-size:.82rem}
  .month-mode .calendar-view-switcher button svg{width:22px;height:22px}
  .month-mode .month-panel{padding-left:9px;padding-right:9px}
  .month-mode .month-day{height:64px;padding-left:2px;padding-right:2px}
  .month-mode .month-event-chip{padding-left:2px;padding-right:2px}
  .month-mode .month-event-chip b{font-size:.45rem}
  .month-mode .month-event-chip small{font-size:.44rem}
  .app-shell.month-mode + .bottom-tabbar{width:calc(100% - 14px)}
}
