/* My Happy Calendar: calm calendar games. One question at a time, big touch targets, no timers. */
.hc-wrap { max-width: 1000px; margin: 0 auto; padding: 0 12px; }
.hc-hero { padding: 28px 0 14px; }
@media (max-width: 560px) { .hc-hero { padding: 14px 0 8px; } .hc-hero .badge { margin-bottom: 10px; } .hc-hero h1 { font-size: 26px !important; margin-bottom: 4px !important; } .hc-hero p.lead { font-size: 15px; line-height: 1.4; } }
.hc {
  position: relative; overflow: hidden;
  height: clamp(640px, calc(100svh - 72px), 900px);
  border-radius: 28px; background: #F4FBFF; color: #1C1C1E;
  box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 18px 40px rgba(0,0,0,.08);
  scroll-margin-top: 64px;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.hc button { font: inherit; color: inherit; cursor: pointer; }
.hc :focus-visible { outline: 4px solid #007AFF; outline-offset: 3px; }
.hc .hc-screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 0; margin: 0; }
.hc-screen[hidden], .hc-over[hidden], .hc [hidden] { display: none !important; }

/* round icon buttons */
.hc-ib {
  width: 56px; height: 56px; flex: none; border: 0; border-radius: 18px; background: #fff;
  font-size: 24px; line-height: 1; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.hc-ib[aria-pressed="true"].hc-calm { background: #E8F1FF; box-shadow: inset 0 0 0 3px #007AFF; }
.hc-lang, .hc-seg { display: flex; flex: none; background: #fff; border-radius: 18px; padding: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.hc-lang button, .hc-seg button { border: 0; background: transparent; border-radius: 13px; min-width: 60px; height: 46px; padding: 0 10px; font-weight: 800; font-size: 16px; }
.hc-lang button[aria-pressed="true"], .hc-seg button[aria-pressed="true"] { background: #0062D6; color: #fff; }
.hc-hold { position: relative; overflow: hidden; }
.hc-hold .fill { position: absolute; left: 0; bottom: 0; height: 0; width: 100%; background: rgba(0,122,255,.25); transition: height 0s; }
.hc-hold.holding .fill { height: 100%; transition: height 1.5s linear; }

/* home */
.hc-home { background: linear-gradient(180deg, #E9FAFF 0%, #FFF8EC 100%); overflow-y: auto; }
.hc-hhead { display: flex; align-items: center; gap: 8px; padding: 12px; flex-wrap: wrap; }
.hc-title { flex: 1; min-width: 170px; font-size: clamp(22px, 4.6vw, 32px); font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.hc-note { margin: 0 14px 6px; font-size: 15px; color: #8A5A00; background: #FFF3CF; border-radius: 12px; padding: 8px 12px; }
.hc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 6px 14px 18px; }
@media (min-width: 700px) { .hc-tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 8px 20px 20px; } }
.hc-tile {
  position: relative; border: 0; background: #fff; border-radius: 22px; padding: 16px 10px 14px; min-height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.07); transition: transform .15s;
}
.hc-tile:active { transform: scale(.97); }
.hc-tile .ic { font-size: 46px; line-height: 1; }
.hc-tile b { font-size: 16px; line-height: 1.25; }
.hc-tile .num { position: absolute; top: 10px; left: 12px; width: 28px; height: 28px; border-radius: 50%; background: #EAF2FF; color: #0051D5; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.hc-tile .star { position: absolute; top: 8px; right: 10px; font-size: 22px; }
.hc-tile .go { position: absolute; top: -8px; right: -4px; background: #FF9500; color: #fff; border-radius: 999px; padding: 5px 10px; font-size: 18px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.hc-tile.locked { background: #F2F4F7; box-shadow: none; }
.hc-tile.locked b, .hc-tile.locked .ic { opacity: .55; }
.hc-tile.nudge { animation: hcNudge .45s ease-in-out 2; }
@keyframes hcNudge { 50% { transform: scale(1.06); } }

/* play */
.hc-play { background: #F4FBFF; overflow-y: auto; }
.hc-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; flex: none; }
.hc-dots { flex: 1; display: flex; justify-content: center; gap: 9px; min-width: 0; }
.hc-dots i { width: 16px; height: 16px; border-radius: 50%; background: #D9E6EE; transition: background .3s, transform .3s; }
.hc-dots i.on { background: #FFC93C; transform: scale(1.12); }
.hc-dots i.now { box-shadow: 0 0 0 4px rgba(255,201,60,.4); }
.hc-askrow { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; flex: none; }
.hc-mascot { width: 58px; height: 58px; flex: none; }
.hc-ask {
  flex: 1; padding: 10px 16px; min-height: 62px; border-radius: 22px 22px 22px 6px; background: #fff;
  display: flex; align-items: center; font-size: clamp(19px, 4.4vw, 28px); font-weight: 800; line-height: 1.25; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.hc-ask .w { background: #FFE58A; color: #5C3A00; border-radius: 10px; padding: 1px 9px; white-space: nowrap; }
/* The board and the answer cards sit together in the middle, so the answers are never pushed off screen. */
.hc-board { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 14px 12px 12px; margin-top: auto; }
.hc-tray { flex: none; padding: 0 12px 14px; margin-bottom: auto; }
.hc-board:empty { padding: 0; }
.hc-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* shared states: never red, never a cross */
.hc .glow { box-shadow: 0 0 0 5px #FFC93C, 0 0 0 10px rgba(255,201,60,.28) !important; animation: hcGlow 1.3s ease-in-out infinite; position: relative; z-index: 2; }
@keyframes hcGlow { 50% { box-shadow: 0 0 0 5px #FFC93C, 0 0 0 16px rgba(255,201,60,.12); } }
.hc .ok { box-shadow: 0 0 0 5px #34C759 !important; animation: hcPop .45s ease-out; }
@keyframes hcPop { 40% { transform: scale(1.08); } }
.hc .nope { animation: hcSway .5s ease-in-out; }
@keyframes hcSway { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hc-hand { position: absolute; z-index: 20; font-size: 30px; line-height: 1; pointer-events: none; animation: hcBob 1s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
@keyframes hcBob { 50% { transform: translateY(8px); } }
.hc-go { position: sticky; bottom: 14px; align-self: center; margin: 0 0 14px; z-index: 15; width: 96px; height: 96px; flex: none; border: 0; border-radius: 30px; background: #34C759; font-size: 42px; box-shadow: 0 6px 0 #248A3D; }
.hc-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #248A3D; }
.hc-go.pulse { animation: hcPulse 1.3s ease-in-out infinite; }
@keyframes hcPulse { 50% { transform: scale(1.08); } }

/* day cards: picture + short name + full name; colour is only a top band */
.hc-day {
  width: clamp(76px, 21vw, 132px); min-height: 104px; border: 0; border-top: 8px solid var(--dc); border-radius: 18px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.hc-day .ic { font-size: 32px; line-height: 1.1; }
.hc-day .ab { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.hc-day .nm { font-size: 13px; font-weight: 600; color: #3A3A3C; }

/* numbers */
.hc-nums { display: grid; gap: 8px; width: min(100%, 460px); }
.hc-nums.c5 { grid-template-columns: repeat(5, 1fr); }
.hc-nums.c7 { grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hc-num { border: 0; border-radius: 14px; background: #fff; min-height: 50px; font-size: 22px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.hc-nums.c5 .hc-num { min-height: 64px; font-size: 28px; }
.hc-num.big { width: 84px; min-height: 84px; font-size: 36px; border-radius: 20px; }
.hc-num.q, .hc-num.carry { background: #FFF6DD; box-shadow: inset 0 0 0 3px #FF9500; color: #8A4B00; }
.hc-strip { display: flex; align-items: center; gap: 12px; }
.hc .arr { font-size: 26px; font-weight: 800; color: #8E95A3; }

/* the day train */
.hc-train { display: flex; align-items: flex-end; gap: 4px; width: min(100%, 720px); padding-bottom: 8px; border-bottom: 5px solid #C9D6DF; }
.hc-train.enter { animation: hcTrain .9s ease-out; }
@keyframes hcTrain { from { transform: translateX(60%); opacity: 0; } }
.hc-train .eng { font-size: clamp(30px, 8vw, 54px); line-height: 1; transform: scaleX(-1); flex: none; }
.hc-car { flex: 1; min-width: 0; min-height: 66px; border: 0; border-bottom: 7px solid var(--dc); border-radius: 12px 12px 6px 6px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 0; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.hc-car .ic { font-size: clamp(16px, 4.6vw, 28px); line-height: 1.1; }
.hc-car .ab { font-size: clamp(11px, 3.1vw, 18px); font-weight: 800; }
.hc-car.q { background: #FFF6DD; box-shadow: inset 0 0 0 3px #FF9500; }
.hc-car.q .ab { font-size: 24px; color: #8A4B00; }
.hc-car.lit { background: #FFF1B8; }

/* yesterday | today | tomorrow */
.hc-ytt { display: flex; align-items: stretch; gap: 6px; width: min(100%, 640px); }
.hc-ytt .arr { align-self: center; flex: none; }
.hc-slot { flex: 1; min-width: 0; min-height: 132px; border: 0; border-radius: 20px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 4px; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.hc-slot.y { background: #EEF0F7; }
.hc-slot.t { background: #FFF7D6; box-shadow: 0 3px 10px rgba(0,0,0,.08), inset 0 0 0 3px #FFC93C; }
.hc-slot.m { background: #EAF6FF; }
.hc-slot .sc { font-size: 34px; line-height: 1; }
.hc-slot .sn { font-size: clamp(13px, 3.4vw, 17px); font-weight: 800; text-align: center; }
.hc-slot .dn { font-size: clamp(12px, 3.2vw, 16px); font-weight: 700; color: #3A3A3C; text-align: center; }
.hc-slot .dn.q { font-size: 28px; color: #8A4B00; }

/* a real month */
.hc-cal { width: min(100%, 520px); }
.hc-cal .hd { text-align: center; font-size: clamp(18px, 4.4vw, 24px); font-weight: 800; margin-bottom: 8px; border-radius: 12px; padding: 2px 0; }
.hc-cal .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hc-cal .wd { border: 0; background: transparent; border-bottom: 4px solid var(--dc); border-radius: 8px 8px 0 0; text-align: center; font-size: clamp(11px, 3vw, 14px); font-weight: 800; padding: 6px 0 4px; min-height: 34px; }
.hc-cal button.wd { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); min-height: 44px; }
.hc-cal .wd.col { background: #FFF1B8; }
.hc-cal .c { position: relative; border: 0; border-radius: 12px; background: #fff; min-height: clamp(42px, 10.5vw, 54px); font-size: clamp(16px, 4.2vw, 21px); font-weight: 800; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 0; }
.hc-cal .c.out { background: transparent; box-shadow: none; color: #AEB4BF; font-weight: 600; }
.hc-cal .c.col { background: #FFF8DC; }
.hc-cal .c.lit { background: #FFE58A; }
.hc-cal .c.today { box-shadow: inset 0 0 0 3px #007AFF; }
.hc-cal .c.today::after { content: ""; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: #007AFF; }
.hc-cal .c.q { background: #FFF6DD; box-shadow: inset 0 0 0 3px #FF9500; color: #8A4B00; }
.hc-cal .c.gap { background: #F2F4F7; box-shadow: inset 0 0 0 2px #C7CCD6; }
.hc-cal .c.slot { background: #EEF5FF; box-shadow: inset 0 0 0 3px #5B8DEF; }
.hc-cal .mk { position: absolute; top: 1px; left: 2px; font-size: 11px; line-height: 1.3; font-weight: 800; color: #0051D5; background: #EAF2FF; border-radius: 6px; padding: 0 3px; }
.hc-cal .ev { position: absolute; top: 0; right: 1px; font-size: 12px; }
.hc-cal .tr { position: absolute; bottom: -2px; right: -2px; font-size: 18px; }
.hc-panel { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 12px; background: #fff; border-radius: 20px; border-left: 10px solid var(--dc, #C7CCD6); padding: 8px 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.hc-panel:empty { visibility: hidden; }
.hc-panel .pi { font-size: 34px; } .hc-panel .pd { font-size: 44px; font-weight: 800; line-height: 1; }
.hc-panel .pt { font-size: 16px; line-height: 1.3; } .hc-panel .pe { font-size: 14px; color: #3A3A3C; }

/* overlays */
.hc-over { position: absolute; inset: 0; z-index: 30; background: rgba(244,251,255,.97); display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 16px; padding: 20px; overflow-y: auto; text-align: center; }
.hc-over h2 { font-size: clamp(26px, 5vw, 36px); font-weight: 800; }
.hc-bigrow { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hc-bigbtn { width: 100px; height: 100px; border: 0; border-radius: 30px; background: #fff; font-size: 44px; box-shadow: 0 6px 0 #D4E3EE; }
.hc-bigbtn.primary { background: #34C759; box-shadow: 0 6px 0 #248A3D; }
.hc-bigbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #D4E3EE; }
.hc-donestar { font-size: 84px; line-height: 1; }

/* grown-ups screen */
.hc-parent { text-align: left; justify-content: flex-start; user-select: text; -webkit-user-select: text; }
.hc-parent .inner { width: 100%; max-width: 680px; display: flex; flex-direction: column; gap: 16px; }
.hc-parent h2 { text-align: center; }
.hc-parent h3 { font-size: 19px; margin-bottom: 6px; }
.hc-parent section { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.hc-parent table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hc-parent th, .hc-parent td { padding: 7px 4px; border-bottom: 1px solid #EEF2F5; text-align: left; vertical-align: middle; }
.hc-parent th { color: #5A5A5F; font-weight: 600; }
.hc-parent .pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.hc-parent .p-none { background: #F2F2F7; color: #5A5A5F; }
.hc-parent .p-prac { background: #EAF2FF; color: #0051D5; }
.hc-parent .p-need { background: #FFF3CF; color: #7A4E00; }
.hc-parent .p-got { background: #DDF6E4; color: #1F7A3A; }
.hc-parent label { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 16px; }
.hc-parent input[type="checkbox"] { width: 24px; height: 24px; }
.hc-parent .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hc-parent .btn2 { border: 0; border-radius: 14px; padding: 10px 16px; font-weight: 700; background: #F2F2F7; min-height: 44px; }
.hc-parent .btn2.blue { background: #0062D6; color: #fff; }
.hc-parent .btn2.red { background: #FFE5E5; color: #B42318; }
.hc-parent ul { padding-left: 20px; font-size: 15px; line-height: 1.5; }
.hc-parent #hcEvents { list-style: none; padding: 0; }
.hc-parent #hcEvents li { display: flex; align-items: center; gap: 8px; padding: 4px 0; flex-wrap: wrap; }
.hc-parent #hcEvents li .btn2 { margin-left: auto; min-height: 36px; padding: 4px 12px; }
.hc-parent form input[type="date"], .hc-parent form input[type="text"], .hc-parent form select { font: inherit; font-size: 16px; min-height: 44px; border: 1.5px solid #C7CCD6; border-radius: 12px; padding: 6px 10px; background: #fff; color: #1C1C1E; }
.hc-parent form input[type="text"] { flex: 1; min-width: 120px; }
.hc-parent small { color: #5A5A5F; }
.hc-parent #hcSuggest { background: #F4FBFF; border-radius: 14px; padding: 10px 12px; }
.hc-parent #hcSuggest .btn2 { float: right; margin: 0 0 4px 10px; }

/* calm mode and reduced motion: keep everything still */
.hc.calm *, .hc.calm *::before, .hc.calm *::after { animation: none !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) {
  .hc *, .hc *::before, .hc *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media (max-width: 420px) {
  .hc { border-radius: 22px; }
  .hc-ib { width: 50px; height: 50px; font-size: 22px; }
  .hc-lang button { min-width: 52px; height: 44px; font-size: 15px; }
  .hc-mascot { width: 48px; height: 48px; }
  .hc-day { min-height: 96px; }
  .hc-num.big { width: 76px; min-height: 76px; font-size: 32px; }
  .hc-cal .grid { gap: 4px; }
}
