.daily-checkin { position: fixed; z-index: 21000; inset: 0; display: grid; place-items: center; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); color: #15201d; background: rgba(4, 10, 8, .82); backdrop-filter: blur(12px); }
.daily-checkin.hidden { display: none; }
.daily-checkin form { width: min(980px, 100%); max-height: calc(100dvh - 28px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #abc4bc; border-radius: 8px; background: #f5f8f6; box-shadow: 0 28px 90px rgba(0,0,0,.42); }
.daily-checkin header, .daily-checkin footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid #d1ddd9; }
.daily-checkin footer { border-top: 1px solid #d1ddd9; border-bottom: 0; }
.daily-checkin header span, .daily-checkin main section > span { color: #18765f; font-size: 10px; font-weight: 950; }
.daily-checkin h2, .daily-checkin h3, .daily-checkin p { margin: 0; }
.daily-checkin h2 { margin-top: 3px; font-size: clamp(24px, 4vw, 38px); }
.daily-checkin header button { width: 42px; height: 42px; border: 1px solid #c7d3cf; border-radius: 50%; background: #fff; font-size: 24px; }
.daily-checkin main { min-height: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: auto; background: #d1ddd9; }
.daily-checkin main section { min-width: 0; display: grid; align-content: start; gap: 10px; padding: clamp(18px, 3vw, 30px); background: #fff; }
.daily-checkin main p { color: #5e6b67; font-size: 13px; line-height: 1.45; }
.checkin-stepper { display: grid; grid-template-columns: 46px 70px 46px; align-items: center; gap: 8px; }
.checkin-stepper button { width: 46px; height: 46px; border: 0; border-radius: 5px; color: #fff; background: #17231f; font-size: 22px; }
.checkin-stepper strong { font-size: 42px; text-align: center; }
.checkin-stepper small { grid-column: 2; color: #64716d; text-align: center; }
.daily-checkin input[type="number"], .daily-checkin input[type="time"] { min-height: 40px; padding: 0 9px; border: 1px solid #b9c9c3; border-radius: 4px; background: #fff; font: inherit; }
.checkin-water > em { color: #18765f; font-style: normal; font-weight: 800; }
.checkin-energy > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.checkin-energy b { font-size: 28px; }
.checkin-energy input { width: 100%; accent-color: #18765f; }
.checkin-energy output { font-size: 20px; font-weight: 900; }
.checkin-choice { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 10px; cursor: pointer; }
.checkin-choice input { position: absolute; opacity: 0; }
.checkin-choice i { width: 40px; height: 24px; border-radius: 999px; background: #c8d1ce; box-shadow: inset 0 0 0 2px #b7c3bf; }
.checkin-choice i::after { content: ''; display: block; width: 18px; height: 18px; margin: 3px; border-radius: 50%; background: #fff; transition: transform .2s; }
.checkin-choice input:checked + i { background: #2ea77f; }
.checkin-choice input:checked + i::after { transform: translateX(16px); }
.checkin-coffee #checkinCoffeeOptions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkin-coffee #checkinCoffeeOptions.hidden { display: none; }
.checkin-coffee #checkinCoffeeOptions label { display: grid; gap: 5px; font-size: 12px; font-weight: 800; }
.checkin-coffee #checkinCoffeeOptions p { grid-column: 1 / -1; }
.daily-checkin footer label { display: flex; align-items: center; gap: 8px; color: #52615c; font-size: 13px; }
.daily-checkin footer button, .quick-alarm-save { min-height: 48px; padding: 0 20px; border: 0; border-radius: 5px; color: #fff; background: #17231f; font-weight: 900; }
.quick-alarm-dialog { width: min(430px, calc(100% - 28px)); padding: 0; border: 1px solid #aebdb8; border-radius: 8px; color: #15201d; background: #fff; }
.quick-alarm-dialog::backdrop { background: rgba(3,8,7,.72); backdrop-filter: blur(8px); }
.quick-alarm-dialog form { display: grid; gap: 18px; padding: 22px; }
.quick-alarm-dialog header { display: flex; align-items: center; justify-content: space-between; color: #18765f; font-size: 11px; font-weight: 950; }
.quick-alarm-dialog header button { width: 38px; height: 38px; border: 1px solid #cad5d1; border-radius: 50%; background: #fff; font-size: 22px; }
.quick-alarm-dialog h2, .quick-alarm-dialog p { margin: 0; }
.quick-alarm-dialog label { display: grid; gap: 7px; font-weight: 850; }
.quick-alarm-dialog input[type="time"] { min-height: 64px; padding: 0 14px; border: 1px solid #b8c8c2; border-radius: 5px; font-size: 28px; }
.quick-alarm-toggle { grid-template-columns: auto 1fr !important; align-items: center; }
.quick-alarm-toggle input { width: 24px; height: 24px; accent-color: #1f9b73; }
.habit-welcome { position: fixed; z-index: 20500; inset: 0; display: grid; grid-template-columns: minmax(280px, .92fr) minmax(360px, 1.08fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: max(32px, env(safe-area-inset-top)) clamp(28px, 7vw, 120px) max(32px, env(safe-area-inset-bottom)); color: #eef5f2; background: rgba(6, 12, 10, .96); }
.habit-welcome.hidden { display: none; }
.habit-welcome-art { width: min(42vw, 520px); aspect-ratio: 1; justify-self: end; background-image: url('assets/habit-reminders-v25.png'); background-repeat: no-repeat; background-size: 200% 200%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.38)); }
.habit-welcome-art[data-kind="water"] { background-position: 0 0; }
.habit-welcome-art[data-kind="coffee-open"] { background-position: 100% 0; }
.habit-welcome-art[data-kind="coffee-closed"] { background-image: url('assets/coffee-window-closed-v25.png'); background-position: center; background-size: contain; }
.habit-welcome-art[data-kind="fruit"] { background-position: 0 100%; }
.habit-welcome-art[data-kind="energy"] { background-position: 100% 100%; }
.habit-welcome main { max-width: 650px; display: grid; align-content: center; gap: 14px; }
.habit-welcome main > span { color: #72d3ba; font-size: clamp(12px, 1.25vw, 17px); font-weight: 950; }
.habit-welcome h2 { margin: 0; font-size: clamp(40px, 6vw, 82px); line-height: .96; }
.habit-welcome p { max-width: 44ch; margin: 0; color: #c5d2ce; font-size: clamp(17px, 2vw, 25px); line-height: 1.45; }
.habit-coffee-count { width: min(360px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 12px; color: #dce8e4; font-size: 14px; font-weight: 850; text-align: left; }
.habit-coffee-count.hidden { display: none; }
.habit-coffee-count input { width: 92px; min-height: 52px; padding: 0 10px; border: 1px solid #6b8d82; border-radius: 5px; color: #fff; background: #0c1b16; font: inherit; font-size: 22px; font-weight: 900; text-align: center; }
.habit-save-feedback { min-height: 22px; color: #8ee8ce; font-size: 13px; font-weight: 900; }
.habit-welcome-progress { display: flex; gap: 7px; margin-top: 8px; }
.habit-welcome-progress i { width: 34px; height: 5px; background: rgba(255,255,255,.18); }
.habit-welcome-progress i.done { background: #4d756a; }
.habit-welcome-progress i.active { background: #72d3ba; }
.habit-welcome footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.habit-welcome footer button { min-height: 52px; padding: 0 20px; border: 1px solid #567268; border-radius: 5px; color: #fff; background: transparent; font: inherit; font-weight: 900; }
.habit-welcome #habitWelcomeAction { border-color: #72d3ba; color: #09241c; background: #72d3ba; }
.habit-welcome.habit-save-confirmed #habitWelcomeAction { border-color: #2bd18f; color: #fff; background: #16895f; box-shadow: 0 0 0 5px rgba(43,209,143,.2); }
.habit-welcome.habit-save-confirmed .habit-welcome-art { filter: drop-shadow(0 30px 40px rgba(0,0,0,.38)) saturate(1.18); transform: scale(1.025); transition: transform .2s ease, filter .2s ease; }
.coffee-header-status { position: fixed; z-index: 190; top: max(10px, env(safe-area-inset-top)); right: max(76px, calc(env(safe-area-inset-right) + 76px)); width: 54px; height: 54px; display: grid; place-items: center; border: 0; border-radius: 16px; background: transparent; line-height: 1; filter: drop-shadow(0 6px 12px rgba(20,37,31,.16)); }
.coffee-header-status.hidden { display: none; }
.coffee-header-status img { width: 100%; height: 100%; display: block; }
@media (max-width: 680px) {
  .daily-checkin main { grid-template-columns: 1fr; }
  .daily-checkin header, .daily-checkin footer { padding: 14px 16px; }
  .daily-checkin footer { align-items: stretch; flex-direction: column; }
  .habit-welcome { grid-template-columns: 1fr; grid-template-rows: minmax(130px, 28dvh) minmax(0, 1fr); gap: 6px; padding: max(14px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)); text-align: center; overflow: hidden; }
  .habit-welcome-art { width: min(50vw, 210px); height: 100%; aspect-ratio: 1; justify-self: center; }
  .habit-welcome main { min-height: 0; justify-items: center; align-content: center; gap: 7px; }
  .habit-welcome h2 { font-size: clamp(28px, 9vw, 42px); }
  .habit-welcome p { font-size: 14px; line-height: 1.3; }
  .habit-coffee-count { grid-template-columns: minmax(0, 1fr) 80px; font-size: 13px; }
  .habit-coffee-count input { width: 80px; min-height: 46px; }
  .habit-save-feedback { min-height: 18px; font-size: 12px; }
  .habit-welcome-progress { margin-top: 2px; }
  .habit-welcome footer { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); justify-content: center; margin-top: 2px; }
  .habit-welcome footer button { min-height: 46px; padding: 0 10px; }
  .coffee-header-status { top: max(8px, env(safe-area-inset-top)); right: max(62px, calc(env(safe-area-inset-right) + 62px)); width: 48px; height: 48px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .habit-welcome { grid-template-columns: minmax(210px, .8fr) minmax(330px, 1.2fr); grid-template-rows: 1fr; gap: 18px; padding: max(12px, env(safe-area-inset-top)) 54px max(12px, env(safe-area-inset-bottom)); text-align: left; overflow: hidden; }
  .habit-welcome-art { width: min(44vh, 310px); justify-self: center; }
  .habit-welcome main { justify-items: start; gap: 8px; }
  .habit-welcome h2 { font-size: clamp(28px, 7vh, 48px); }
  .habit-welcome p { font-size: 14px; }
  .habit-welcome footer button { min-height: 44px; }
}
