:root{
  --bg:#0b1020;
  --card:#0f1724;
  --accent:#4ea8de;
  --muted:#9aa4b2;
  --wave-fill-transition:0.9s;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,Arial;background:linear-gradient(180deg,#071021 0%,#0b1320 100%);color:#e6eef6;display:flex;min-height:100vh;align-items:flex-start;justify-content:center;padding:clamp(8px,1.8vw,20px);overflow-x:hidden;overflow-y:auto}
.app{width:100%;max-width:1200px;padding:clamp(14px,2.2vw,28px);background:rgba(255,255,255,0.02);border-radius:12px;box-shadow:0 10px 30px rgba(2,6,23,0.6);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr auto;grid-template-areas:"header" "visual" "footer";gap:clamp(12px,2vw,24px);align-items:start;min-height:calc(100vh - clamp(16px,3.6vw,40px));position:relative;z-index:10}
.hidden{display:none !important}
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.5);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:100;
}
.modal-card{
  background:white;
  border-radius:12px;
  padding:24px;
  max-width:480px;
  width:90%;
  position:relative;
}
.modal-close{
  position:absolute;
  top:12px;
  right:12px;
}
.drawer{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:var(--card);
  color:#e6eef6;
  border-top:1px solid rgba(78,168,222,0.22);
  border-radius:16px 16px 0 0;
  max-height:calc(100dvh - 12px);
  overflow-y:auto;
  transform:translateY(100%);
  transition:transform 0.3s ease;
  z-index:100;
}
.drawer.open{
  transform:translateY(0);
}
.stats-drawer{
  position:fixed;
  top:0;
  right:0;
  height:100dvh;
  width:min(92vw,460px);
  background:var(--card);
  color:#e6eef6;
  border-left:1px solid rgba(78,168,222,0.22);
  transform:translateX(100%);
  transition:transform 0.3s ease;
  z-index:120;
  overflow-y:auto;
  padding:14px;
}
.stats-drawer.open{
  transform:translateX(0);
}
.stats-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.drawer .sidebar{
  width:100%;
  border-left:none;
  padding:16px 16px 24px;
  gap:14px;
}
.drawer .controls{
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.drawer .controls .drawer-toggle-text{
  width:100%;
  text-align:center;
  align-self:center;
}
.drawer .controls .modes{
  width:100%;
  flex:1 1 auto;
}
.drawer details > summary{
  color:var(--muted);
  cursor:pointer;
  padding:6px 0;
}
.header-buttons button,
#reset-btn,
#play-pause-btn,
#fast-forward-btn,
#skip-break-btn,
#mute-btn,
.modal-close{
  min-width:44px;
  min-height:44px;
}
header{grid-area:header;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;position:relative;width:100%}
h1{margin:0;font-size:28px;line-height:1.1;flex:1 1 260px;min-width:0;overflow-wrap:anywhere}
.seo-nav{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.seo-nav a{color:#cfe6ff;text-decoration:none;font-size:12px;padding:5px 9px;border:1px solid rgba(78,168,222,0.2);border-radius:999px;background:rgba(78,168,222,0.06)}
.seo-nav a:hover{border-color:rgba(78,168,222,0.45);background:rgba(78,168,222,0.12)}
.seo-nav a:focus-visible{outline:2px solid rgba(78,168,222,0.45);outline-offset:1px}
.seo-intro,
.seo-details{
  width:100%;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid rgba(78,168,222,0.12);
  background:rgba(15,23,36,0.42);
}
.seo-intro h2,
.seo-details h2{margin:0 0 8px 0;font-size:18px;color:#dbeeff}
.seo-intro p,
.seo-details p,
.seo-details li{margin:0;color:#c7d4e2;line-height:1.6;font-size:14px}
.seo-details ul{margin:0;padding-left:18px;display:grid;gap:6px}
.seo-details h3{margin:12px 0 4px 0;font-size:14px;color:#e6eef6}
.header-buttons{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;margin-left:auto;max-width:100%}
.header-buttons button{
  background:transparent;
  border:1px solid rgba(255,255,255,0.12);
  color:var(--muted);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-size:12px;
  transition:border-color 0.2s ease,color 0.2s ease,background 0.2s ease;
}
.header-buttons button:hover{
  border-color:rgba(78,168,222,0.45);
  color:#e6eef6;
  background:rgba(78,168,222,0.08);
}
.header-buttons button:focus-visible{
  outline:2px solid rgba(78,168,222,0.4);
  outline-offset:1px;
}
.auth-panel{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-height:40px;
}
.auth-panel.auth-panel-signed-out{
  justify-content:center;
  gap:0;
}
.auth-panel.auth-panel-signed-out .google-signin-mount{
  justify-content:center;
}
.auth-panel.auth-panel-signed-in{
  justify-content:flex-end;
  gap:8px;
}
.google-sync-menu-trigger{
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.drawer .google-sync-menu-trigger{
  width:100%;
  justify-content:center;
  min-height:42px;
  margin-top:8px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:10px;
  background:rgba(15,23,36,0.5);
  color:#e6eef6;
  font-size:12px;
  font-weight:600;
}
.drawer .google-sync-menu-trigger.is-badge{
  border-color:rgba(34,197,94,0.55);
  background:rgba(34,197,94,0.18);
  color:#eafff2;
}
.google-sync-menu-trigger:disabled{
  opacity:0.55;
  cursor:not-allowed;
}
.google-sync-status{
  color:#9aa4b2;
  font-size:12px;
  line-height:1;
}
.google-sync-status.is-connected{
  color:#22c55e;
}
.google-sync-status.is-error{
  color:#ef4444;
}
.google-sync-status.is-signed-out{
  color:#f59e0b;
}
.google-signin-mount{
  min-height:40px;
  display:inline-flex;
  align-items:center;
}
.auth-identity{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:50%;
  border:1px solid rgba(78,168,222,0.45);
  background:rgba(78,168,222,0.16);
  padding:0;
  cursor:pointer;
}
.auth-identity:hover{
  background:rgba(78,168,222,0.24);
}
.auth-identity:focus-visible{
  outline:2px solid rgba(78,168,222,0.7);
  outline-offset:2px;
}
.auth-avatar{
  width:28px;
  height:28px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(78,168,222,0.24);
  border:1px solid rgba(78,168,222,0.45);
  color:#e6eef6;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  background-size:cover;
  background-position:center;
  flex:0 0 auto;
}
.auth-avatar.has-image{
  border-color:rgba(255,255,255,0.35);
}
.auth-menu-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:132px;
  padding:6px;
  border-radius:10px;
  border:1px solid rgba(78,168,222,0.34);
  background:rgba(12,22,34,0.98);
  box-shadow:0 10px 24px rgba(0,0,0,0.35);
  z-index:120;
}
.auth-menu-item{
  width:100%;
  text-align:left;
  border:none;
  border-radius:8px;
  padding:8px 10px;
  color:#e6eef6;
  background:transparent;
  cursor:pointer;
  font-size:13px;
}
.auth-menu-item:hover{
  background:rgba(78,168,222,0.16);
}
.auth-menu-item:focus-visible{
  outline:2px solid rgba(78,168,222,0.7);
  outline-offset:1px;
}
.auth-menu-item:disabled{
  opacity:0.45;
  cursor:not-allowed;
}
.header-btn{background:transparent;border:1px solid rgba(255,255,255,0.1);color:#e6eef6;padding:8px 12px;border-radius:8px;cursor:pointer;font-size:12px}
.timer-toggle-btn{margin-top:8px;padding:6px 8px;border-radius:6px;border:none;background:#17324b;color:#e6f0fb;cursor:pointer;width:100%;font-size:12px}
.timer-main-btn{margin-top:8px;padding:8px 10px;border-radius:8px;border:none;background:#17324b;color:#e6f0fb;cursor:pointer;width:100%;font-size:14px}
.timer-main-btn:disabled{background:#0a1020;color:#4a5a6a;cursor:not-allowed;opacity:0.5}
.info-section{margin-top:16px;padding:12px;background:rgba(78,168,222,0.05);border:1px solid rgba(78,168,222,0.1);border-radius:8px;max-width:600px;margin-left:auto;margin-right:auto}
.info-content{color:#e6eef6;font-size:13px;line-height:1.6}
.info-content h2{margin:0 0 10px 0;font-size:16px;color:var(--accent)}
.info-content p{margin:0 0 8px 0}
.info-content p:last-child{margin-bottom:0}
.tagline{margin:0;color:var(--muted)}
.controls{grid-area:controls;display:flex;gap:20px;align-items:center;justify-content:center;margin-top:0;width:100%}
.modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,420px);flex:0 1 420px}
.mode{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted);padding:8px 12px;border-radius:8px;cursor:pointer;min-width:0;height:36px;display:flex;align-items:center;justify-content:center;font-weight:500;line-height:1;box-sizing:border-box}
.mode.active{background:rgba(255,255,255,0.03);color:#e6eef6;border:1px solid rgba(255,255,255,0.16);font-weight:600}
.timer{flex:1;text-align:center}
#time{font-size:48px;font-weight:600}
.buttons{display:flex;gap:8px;justify-content:center;margin-top:8px}
.buttons button{padding:8px 12px;border-radius:8px;border:none;background:#17324b;color:#e6f0fb;cursor:pointer}
.settings{display:inline-flex;flex-direction:row;gap:8px;color:var(--muted);align-items:center;flex-wrap:nowrap;white-space:nowrap}
.settings label{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;margin:0}
.settings input[type="range"]{width:120px}
.mute-btn{padding:6px 12px;border-radius:20px;border:none;background:#17324b;color:#e6f0fb;cursor:pointer;font-size:12px;transition:background 0.2s;margin-top:0;align-self:center}
.mute-btn:hover{background:#1f3d52}
.audio-controls-panel{width:100%;display:flex;justify-content:flex-end;margin-top:12px}
.pomo-stats-dock{width:100%;margin:0}
.modal#settings-modal{
  align-items:center;
  justify-content:center;
  padding:12px;
  overflow-y:auto;
  overscroll-behavior:contain;
}
#settings-modal > *{
  width:min(100%,640px);
}
#settings-modal .info-section{
  margin:0;
  max-width:none;
  max-height:min(72dvh,720px);
  overflow:auto;
}
#settings-modal .audio-controls-panel{
  margin-top:10px;
  justify-content:flex-end;
}
#settings-modal .settings{
  max-width:100%;
}
#settings-modal .settings label{
  min-width:0;
}
#settings-modal .settings input[type="range"]{
  width:min(220px,60vw);
}
.visual{grid-area:visual;margin-top:0;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;width:100%;min-height:clamp(420px,calc(100dvh - 180px),760px);flex:1}
#active-task-display{margin:0;color:#e6eef6;font-size:15px;font-weight:600;opacity:1;border:none;background:none;cursor:pointer;pointer-events:auto;-webkit-user-select:none;user-select:none;letter-spacing:0.2px}
.drawer-toggle-text{margin:0 0 4px 0;color:#e6eef6;font-size:15px;font-weight:600;opacity:1;border:none;background:none;cursor:pointer;pointer-events:auto;-webkit-user-select:none;user-select:none;letter-spacing:0.2px;padding:0}
.drawer-toggle-text:hover{opacity:0.95;color:#e6eef6}
.json-summary::after{content:' ▼';font-size:0.8em;opacity:0.7}
details[open] .json-summary::after{content:' ▲'}
.is-collapsed{display:none}
.inline-form{display:flex;gap:6px;margin-bottom:10px}
.drawer-group{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.drawer-section-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 12px;
  border-radius:10px;
  border:1px solid rgba(78,168,222,0.14);
  background:rgba(15,23,36,0.42);
  color:#dce9f5;
  cursor:pointer;
  font-size:12px;
  font-weight:600;
  letter-spacing:0.4px;
  text-transform:uppercase;
}
.drawer-section-toggle::after{content:'▼';font-size:10px;opacity:0.7;transition:transform 0.2s ease}
.drawer-section-toggle.is-open::after{transform:rotate(180deg)}
.drawer-section-toggle:hover{border-color:rgba(78,168,222,0.28);background:rgba(15,23,36,0.58);color:#e6eef6}
.drawer-section-toggle:focus-visible{outline:2px solid rgba(78,168,222,0.4);outline-offset:1px}
.drawer-section-panel{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(78,168,222,0.12);
  background:rgba(78,168,222,0.04);
}
.drawer-action-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.drawer-action-row + .drawer-action-row{margin-top:8px}
.drawer-action-row .count-btn,
.drawer-action-btn{flex:1 1 140px;min-height:36px;justify-content:center}
.drawer-action-row .drawer-action-btn{grid-column:1 / -1}
.drawer-utility-actions{margin-bottom:10px}
#advancedTasksPanel #open-settings,
#advancedTasksPanel #open-stats{
  min-height:44px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:8px;
  font-size:14px;
}
#advancedTasksPanel #open-settings:hover,
#advancedTasksPanel #open-stats:hover{
  border-color:rgba(78,168,222,0.45);
  color:#e6eef6;
  background:rgba(78,168,222,0.08);
}
#advancedTasksPanel #open-settings:focus-visible,
#advancedTasksPanel #open-stats:focus-visible{
  outline:2px solid rgba(78,168,222,0.4);
  outline-offset:1px;
}
.stats-panel{margin-top:8px}
.stats-subnav{display:flex;gap:8px;margin-top:8px}
.panel-block{margin-top:8px}
.session-summary-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.session-summary-actions .timer-toggle-btn{margin-top:0;width:auto;flex:1 1 140px}
.stats-sync-status{margin-top:8px;font-size:12px;color:var(--muted)}
.sync-badge{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600}
.sync-badge.synced{background:rgba(78,168,222,0.14);color:#cfe6ff}
.sync-badge.pending{background:rgba(255,184,108,0.18);color:#ffe1b3}
.sync-badge.local{background:rgba(255,255,255,0.08);color:#d6dde8}
.sync-badge.error{background:rgba(255,107,107,0.2);color:#ffd1d1}
.activity-table-wrap{margin-top:8px;overflow-x:auto;max-height:calc(100dvh - 290px);overflow-y:auto}
.activity-table{width:100%;border-collapse:collapse;font-size:12px}
.activity-table th, .activity-table td{text-align:left;padding:6px 8px;border-bottom:1px solid rgba(255,255,255,0.08);vertical-align:top}
.activity-table th{color:#e6eef6;font-weight:600;white-space:nowrap}
.activity-table td{color:var(--muted)}
.panel-heading-row{display:flex;justify-content:space-between;align-items:center}
.panel-heading-text{font-weight:600}
.panel-list{margin-top:8px;max-height:calc(100dvh - 330px);overflow-y:auto}
.panel-summary{margin-top:6px}
.time-breakdown{font-size:12px;color:var(--muted);margin-top:6px}
.session-summary-content{color:#e6eef6;font-size:13px;line-height:1.8}
.sidepanel{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;width:auto}
 .timer-compact{background:transparent;padding:0;border-radius:8px;min-width:140px;text-align:center;width:auto;margin:0 auto}
.timer-row{display:flex;align-items:center;justify-content:center;gap:8px}
.timer-compact #time{font-size:28px;font-weight:600}
.timer-compact #fullscreenToggle{margin-top:8px}
.timer-hidden{opacity:0;transition:opacity 0.3s ease}
.task-hidden{opacity:1;pointer-events:auto;transition:opacity 0.3s ease}
.timer-edit-hidden{visibility:hidden;pointer-events:none}
.task-display-row{display:flex;align-items:center;justify-content:center;gap:8px}
#task-visibility-toggle{
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.12);
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  transition:border-color 0.2s ease,color 0.2s ease,background 0.2s ease;
}
#task-visibility-toggle:hover{
  border-color:rgba(78,168,222,0.45);
  color:#e6eef6;
  background:rgba(78,168,222,0.08);
}
#task-visibility-toggle:focus-visible{outline:2px solid rgba(78,168,222,0.4);outline-offset:1px}
.timer-visibility-toggle,
#timer-visibility-toggle,
#timer-edit-btn{
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.12);
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  transition:border-color 0.2s ease,color 0.2s ease,background 0.2s ease;
}
#timer-visibility-toggle:hover,
#timer-edit-btn:hover{
  border-color:rgba(78,168,222,0.45);
  color:#e6eef6;
  background:rgba(78,168,222,0.08);
}
#timer-visibility-toggle:focus-visible,
#timer-edit-btn:focus-visible{outline:2px solid rgba(78,168,222,0.4);outline-offset:1px}
#timer-inline-edit{width:3.5ch;font-size:28px;font-weight:600;color:#e6f0fb;background:#17324b;border:1px solid rgba(78,168,222,0.45);border-radius:8px;padding:0 4px;text-align:center;outline:none;font-family:inherit;-moz-appearance:textfield;appearance:textfield}
#timer-inline-edit::-webkit-outer-spin-button,
#timer-inline-edit::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.timer-compact .buttons{display:flex;flex-direction:row;gap:8px;justify-content:center;margin-top:8px;align-items:center}
.timer-compact .buttons button{padding:8px 12px;border-radius:8px;border:none;background:#17324b;color:#e6f0fb;cursor:pointer;width:auto}
#reset-btn,#skip-break-btn{display:none}
.timer-compact .buttons button:disabled{background:#0a1020;color:#4a5a6a;cursor:not-allowed;opacity:0.5}
.timer-compact{min-width:120px}
.break-plus-ten-row{max-height:0;opacity:0;overflow:hidden;transform:translateY(-4px);transition:max-height .22s ease,opacity .2s ease,transform .22s ease;margin-top:0}
.break-plus-ten-row.visible{max-height:56px;opacity:1;transform:translateY(0);margin-top:6px}
.break-plus-ten-row .timer-toggle-btn{margin-top:0}
.settings label{display:flex;align-items:center;gap:8px}
.settings input[type="range"]{width:120px}
.pour-btn{display:inline-block}

.sidebar{grid-area:sidebar;position:relative;width:100%;margin:0;padding:0 0 0 24px;border-left:1px solid rgba(78,168,222,0.1);background:transparent;display:flex;flex-direction:column;gap:16px;max-height:none;overflow:visible}
.section{margin-bottom:12px;flex-shrink:0}
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.section-header h3{margin:0;font-size:14px;text-transform:uppercase;letter-spacing:0.5px;color:#e6eef6}
.section-controls{display:flex;align-items:center;gap:6px}
.section-kicker{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:0.6px;margin-bottom:6px}
.count-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:0.5px;margin-right:2px}
.task-list-row{display:flex;align-items:center;gap:6px;margin-bottom:12px}
.task-list-row select{flex:1;min-width:0;padding:6px;border-radius:6px;border:1px solid rgba(78,168,222,0.35);background:#0f1724;color:#e6eef6;appearance:none}
.task-list-row select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px rgba(78,168,222,0.2)}
.task-list-row select option{background:#0f1724;color:#e6eef6}
.task-list-row .count-btn{padding:5px 8px}
.google-tasks-panel{margin:0;padding:10px;border-radius:8px;border:1px solid rgba(78,168,222,0.14);background:rgba(78,168,222,0.05);display:flex;flex-direction:column;gap:8px}
.google-tasks-header-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.google-tasks-heading-wrap{min-width:0;flex:1}
.google-tasks-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.google-tasks-actions .count-btn{white-space:nowrap}
.google-tasks-status{font-size:12px;line-height:1.55;color:#dce9f5;padding:8px 10px;border-radius:6px;border:1px solid rgba(78,168,222,0.2);background:rgba(15,23,36,0.55);max-width:100%;white-space:normal;overflow-wrap:anywhere}
.google-tasks-status.is-error{color:#ff9d9d}
.google-tasks-help{margin:0;font-size:11px;line-height:1.45;color:var(--muted)}
.google-tasks-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.google-tasks-toggle{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#dce9f5}
.google-tasks-toggle input{margin:0}
.google-tasks-meta{display:flex;flex-wrap:wrap;gap:6px}
.google-tasks-meta.is-empty{display:none}
.google-tasks-chip{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;border:1px solid rgba(255,255,255,0.08);font-size:10px;line-height:1.2}
.google-tasks-chip.ok{background:rgba(42,98,61,0.18);border-color:rgba(166,255,197,0.28);color:#ddffe8}
.google-tasks-chip.pending{background:rgba(108,86,31,0.22);border-color:rgba(255,221,125,0.25);color:#ffeeba}
.google-tasks-chip.error{background:rgba(112,44,44,0.22);border-color:rgba(255,157,157,0.25);color:#ffd1d1}
.google-tasks-chip.muted{background:rgba(32,43,61,0.55);border-color:rgba(115,162,223,0.16);color:#d0ddeb}
.google-tasks-mappings{display:flex;flex-direction:column;gap:8px}
.google-tasks-empty{font-size:11px;line-height:1.45;color:var(--muted);padding:8px;border-radius:6px;background:rgba(15,23,36,0.48);border:1px dashed rgba(78,168,222,0.18)}
.google-tasks-preview{display:flex;flex-direction:column;gap:8px;padding-top:2px}
.google-tasks-preview-summary{padding:8px;border-radius:6px;background:rgba(15,23,36,0.58);border:1px solid rgba(78,168,222,0.14)}
.google-tasks-preview-title{font-size:12px;font-weight:600;color:#e6eef6}
.google-tasks-preview-meta{font-size:10px;color:var(--muted);margin-top:2px}
.google-tasks-preview-stats{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;font-size:11px;color:#dce9f5}
.google-tasks-preview-list{padding:8px;border-radius:6px;background:rgba(15,23,36,0.48);border:1px solid rgba(78,168,222,0.12)}
.google-tasks-preview-list-title{font-size:12px;font-weight:600;color:#e6eef6}
.google-tasks-preview-list-stats{font-size:11px;color:var(--muted);margin-top:4px}
.google-tasks-preview-items{margin:8px 0 0 0;padding-left:16px;display:flex;flex-direction:column;gap:5px}
.google-tasks-preview-items li{font-size:11px;line-height:1.4;color:#dce9f5}
.google-tasks-preview-items li span{display:inline-block;min-width:82px;color:var(--muted)}
.google-tasks-preview-items li strong{font-weight:600;color:#e6eef6;margin-right:4px}
.google-tasks-preview-more{margin-top:6px;font-size:10px;color:var(--muted)}
.google-tasks-review-actions{display:flex;flex-wrap:wrap;gap:6px}
.google-tasks-review-list{display:flex;flex-direction:column;gap:6px}
.google-tasks-review-item{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:flex-start;padding:8px;border-radius:6px;background:rgba(15,23,36,0.48);border:1px solid rgba(78,168,222,0.12)}
.google-tasks-review-item input{margin-top:2px}
.google-tasks-review-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.google-tasks-review-text strong{font-size:12px;color:#e6eef6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.google-tasks-review-text em{font-style:normal;font-size:10px;color:#d0ddeb}
.google-tasks-review-text small{font-size:10px;color:var(--muted)}
.google-task-map-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,1fr);gap:8px;align-items:center}
.google-task-map-label-wrap{display:flex;flex-direction:column;gap:2px;min-width:0}
.google-task-map-label{font-size:12px;color:#e6eef6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.google-task-map-status{font-size:10px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.google-task-map-status.is-linked{color:#bfe7cc}
.google-task-map-status.is-unlinked{color:var(--muted)}
.google-task-map-select{width:100%;min-width:0;padding:6px;border-radius:6px;border:1px solid rgba(78,168,222,0.35);background:#0f1724;color:#e6eef6;appearance:none}
.google-task-map-select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px rgba(78,168,222,0.2)}
.google-task-map-select option{background:#0f1724;color:#e6eef6}

@media (max-width: 640px){
  .drawer-action-row{grid-template-columns:1fr}
}

#syncGoogleTasksBtn,
#authSyncGoogleTasksBtn{
  min-width:46px;
  text-align:center;
}
.count-btn{background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--muted);padding:4px 8px;border-radius:6px;cursor:pointer;font-size:12px}
.count-btn[hidden]{display:none !important}
.count-display{font-size:12px;color:var(--muted);min-width:20px;text-align:center}
.task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:12px;max-height:none;overflow-y:visible;padding:0}
.task-card{padding:12px;border-radius:8px;border:2px solid rgba(78,168,222,0.2);background:rgba(78,168,222,0.05);cursor:pointer;transition:all 0.2s;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;min-height:90px;max-height:120px;height:auto;-webkit-user-select:none;user-select:none;position:relative;overflow:hidden}
.task-card:hover{border-color:rgba(78,168,222,0.4);background:rgba(78,168,222,0.1)}
.task-card.selected{border-color:var(--accent);background:rgba(78,168,222,0.2);box-shadow:0 0 10px rgba(78,168,222,0.3)}
.task-card-title{font-size:15px;font-weight:600;color:#e6eef6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;margin-bottom:4px;overflow-wrap:anywhere;word-break:break-word}
.task-card.selected{max-height:none}
.task-card.selected .task-card-title{white-space:normal;overflow:visible;text-overflow:clip}
.task-card.task-item-card .task-card-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-card.task-item-card.selected .task-card-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-card-stat{font-size:10px;color:var(--muted)}
.task-card-pomos{font-size:10px;color:#cfe6ff;margin-top:2px}
.input-warning{font-size:11px;color:#ff8b8b;margin-top:-4px;margin-bottom:8px}
.card-corner-btn{position:absolute;padding:2px 5px;border-radius:4px;border:1px solid rgba(255,255,255,0.18);background:#17324b;color:#e6f0fb;cursor:pointer;font-size:9px;line-height:1;z-index:2}
.corner-edit{top:6px;left:6px}
.corner-delete{top:6px;right:6px}
.corner-google{bottom:6px;left:6px;background:rgba(40,84,56,0.92);border-color:rgba(143,227,173,0.45);color:#effff4}
.corner-google.is-complete{background:rgba(44,108,64,0.98);border-color:rgba(166,255,197,0.6)}
.corner-move{bottom:6px;right:6px}
.task-google-badge{position:absolute;bottom:6px;left:6px;min-width:22px;padding:2px 6px;border-radius:999px;border:1px solid rgba(255,255,255,0.18);font-size:9px;line-height:1.1;font-weight:700;z-index:1}
.task-google-badge.is-linked{background:rgba(34,52,78,0.92);border-color:rgba(115,162,223,0.4);color:#d7eaff}
.task-google-badge.is-complete{background:rgba(42,98,61,0.95);border-color:rgba(166,255,197,0.55);color:#effff4}
body.immersive-active .card-corner-btn{display:none !important}
 .target-controls{display:inline-flex;align-items:center;gap:8px}
 .target-controls button{background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--muted);padding:4px 8px;border-radius:6px;cursor:pointer}
 .target-controls span{font-size:12px;color:var(--muted)}
.breaks{margin-top:8px}
.break-section{margin-bottom:10px}
.break-list{list-style:none;padding:0;margin:0 0 12px 0;max-height:300px;overflow-y:auto}
 .break-list li{display:flex;align-items:center;justify-content:space-between;padding:8px;border-radius:6px;border:1px solid rgba(78,168,222,0.06);background:transparent;margin-bottom:6px}
 .break-list li.draggable-item{cursor:grab}
 .break-list li.draggable-item:active{cursor:grabbing}
 .break-list li.dragging{opacity:0.5;border-color:rgba(78,168,222,0.4);background:rgba(78,168,222,0.06)}
.reset-pour-btn{padding:2px 4px;border-radius:3px;border:none;background:var(--accent);color:#041024;cursor:pointer;font-size:10px}
.section form{display:flex;gap:6px;margin-bottom:10px}
.section input{flex:1;padding:6px;border-radius:6px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:inherit}
.section button[type="submit"]{padding:6px 8px;border-radius:6px;border:none;background:var(--accent);color:#041024;cursor:pointer}
#taskForm .count-btn,
#shortBreakForm .count-btn{padding:5px 8px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:var(--muted);border-radius:6px;cursor:pointer;min-width:30px}
#taskForm input,
#shortBreakForm input{background:rgba(15,23,36,0.72);border:1px solid rgba(78,168,222,0.18)}
.sidebar > .active-task{margin-bottom:12px;padding:10px;border-radius:6px;border:1px solid rgba(78,168,222,0.06);background:transparent;color:#e6eef6;font-size:24px;font-weight:600;max-width:100%;overflow-wrap:anywhere;word-break:break-word;line-height:1.25}
.sidepanel .active-task{margin-top:12px;color:#e6eef6;font-size:24px;font-weight:600;max-width:100%;overflow-wrap:anywhere;word-break:break-word;line-height:1.25;text-align:center}
.sidepanel .status{text-align:center;margin-left:0}
.pour-stats{margin-top:12px;display:flex;gap:16px;font-size:12px;color:var(--muted)}
.stat{display:flex;gap:6px}
.bucket-wrap{position:relative;width:240px;height:320px;margin:0}
.bucket{position:absolute;left:0;right:0;bottom:0;margin:auto;width:180px;height:240px;border:6px solid #cfe8ff22;border-bottom-width:32px;border-radius:8px 8px 28px 28px;overflow:hidden;background:linear-gradient(180deg,#0b1b2a, #07121a);position:relative}
.water{position:absolute;left:0;right:0;top:0;bottom:0;height:100%;clip-path:inset(calc((1 - var(--water-fill, 0)) * 100%) 0 0 0);transition:clip-path var(--wave-fill-transition) linear;overflow:hidden;will-change:clip-path}
.water-svg{width:100%;height:100%;display:block;shape-rendering:geometricPrecision}
.water-base{fill:#1f3046}
.water-line{fill:#4ea8de;opacity:0.45}
.water::after{content:'';position:absolute;top:0;left:0;right:0;height:100%;background:radial-gradient(circle at 20% 30%,rgba(255,255,255,0.1) 0%,transparent 50%),radial-gradient(circle at 80% 70%,rgba(0,0,0,0.05) 0%,transparent 50%);pointer-events:none}
.rain-overlay{position:absolute;inset:0;pointer-events:none}
.ripple{position:absolute;border:2px solid rgba(255,255,255,0.8);border-radius:50%;pointer-events:none;box-shadow:0 0 10px rgba(255,255,255,0.6), inset 0 0 6px rgba(255,255,255,0.4)}
.bubble{position:absolute;background:radial-gradient(circle at 35% 35%,rgba(255,255,255,1),rgba(150,200,255,0.3));border-radius:50%;pointer-events:none;border:1.5px solid rgba(255,255,255,0.6);box-shadow:0 0 8px rgba(255,255,255,0.5), inset -1px -1px 3px rgba(0,0,0,0.2)}
.status{color:var(--muted);margin-left:8px;font-size:12px;opacity:0.5;border:none;background:none;cursor:default}
footer{grid-area:footer;margin-top:18px;color:var(--muted);font-size:12px;display:flex;flex-direction:column;align-items:center;gap:10px}
.seo-footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.seo-footer-links a{color:#b7c7d9;text-decoration:none}
.seo-footer-links a:hover{text-decoration:underline}
.build-version{display:inline-block;opacity:0.8;letter-spacing:0.3px}
.toast-alert{position:fixed;left:50%;bottom:18px;transform:translateX(-50%) translateY(10px);padding:10px 12px;border-radius:8px;background:rgba(15,23,36,0.96);border:1px solid rgba(78,168,222,0.25);color:#e6eef6;font-size:12px;opacity:0;pointer-events:none;transition:opacity 0.2s ease, transform 0.2s ease;z-index:9999;max-width:min(92vw,420px);text-align:center}
.toast-alert.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media print {
  body, .app, header { background:white; color:black; }
  .stats-drawer { display:none !important; }
}



/* water animations */
@keyframes ripple{0%{transform:scale(0);opacity:1}100%{transform:scale(1);opacity:0}}
@keyframes bubble-rise{0%{transform:translateY(0px) translateX(0px);opacity:0.7}100%{transform:translateY(calc(-1 * var(--bubble-rise-distance, 35px))) translateX(3px);opacity:0}}

/* small raindrops animation for overlay */
@keyframes drop{0%{transform:translateY(-10px);opacity:0}50%{opacity:1}100%{transform:translateY(var(--drop-travel, 220px));opacity:0}}
.raindrop{position:absolute;width:2px;height:14px;background:linear-gradient(180deg,rgba(255,255,255,0.85),rgba(255,255,255,0.2));border-radius:2px;display:none}

/* responsive */
@media(max-width:768px){
  .modal{align-items:flex-end}
  .modal-card{
    width:100%;
    max-width:100%;
    border-radius:16px 16px 0 0;
  }
  body{overflow-y:auto}
  .app{display:flex;flex-direction:column;padding:16px;gap:12px;align-items:stretch;min-height:calc(100vh - 32px)}
  header{width:100%}
  .header-buttons{justify-content:center}
  .seo-nav{justify-content:center}
  .controls{flex-direction:column;align-items:stretch;gap:12px}
  .modes{width:100%;flex:1 1 auto}
  .settings{display:inline-flex;flex-direction:row;flex-wrap:nowrap;align-items:center}
  .visual{flex-direction:column;align-items:center;gap:16px;margin-top:0;justify-content:center}
  .sidebar{width:100%;max-height:none;padding:20px 0;border-top:1px solid rgba(78,168,222,0.1);border-left:none;padding-left:0;margin:0}
  .bucket-wrap{width:170px;height:220px}
  .bucket{width:140px;height:185px}
  .pomo-stats-dock{width:min(100%,320px)}
}

@media(max-width:520px){
  .app{padding:12px;gap:12px}
  .controls{gap:8px;align-items:stretch}
  .controls .modes{align-self:center}
  .audio-controls-panel{justify-content:flex-end}
  .visual{gap:14px;margin-top:0}
  .task-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
  .google-tasks-header-row,
  .google-task-map-row{grid-template-columns:1fr;display:grid}
  .bucket-wrap{width:160px;height:220px}
  .bucket{width:130px;height:190px}
  .timer-compact #time{font-size:28px}
  .sidebar{padding:16px 0}
  .pomo-stats-dock{width:calc(100% - 24px)}
}

@media (max-width:768px), (orientation:portrait){
  .modal#settings-modal{
    align-items:flex-start;
    justify-content:flex-start;
    padding:8px;
  }
  #settings-modal > *{
    width:100%;
    max-width:100%;
  }
  #settings-modal .info-section{
    max-height:none;
  }
  #settings-modal .audio-controls-panel{
    justify-content:stretch;
  }
  #settings-modal .settings{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    white-space:normal;
  }
  #settings-modal .settings label{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    white-space:normal;
  }
  #settings-modal .settings input[type="range"]{
    width:100%;
  }
  #settings-modal .modal-close{
    position:sticky;
    top:0;
    margin-left:auto;
    z-index:2;
    background:rgba(15,23,36,0.92);
    border-radius:8px;
  }
}

@media (max-width:1100px), (orientation:portrait){
  .app{
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr auto;
    grid-template-areas:
      "header"
      "visual"
      "footer";
    align-items:stretch;
  }
  .header-buttons{
    flex-direction:column;
    flex-wrap:nowrap;
    align-items:flex-end;
    justify-content:flex-start;
  }
  .seo-nav{justify-content:flex-start}
  .controls{justify-content:center}
  .visual{flex-direction:column;align-items:center;justify-content:center;gap:16px;margin-top:0}
  .sidebar{
    padding:16px 0 0 0;
    border-left:none;
    border-top:1px solid rgba(78,168,222,0.1);
  }
}

/* Fullscreen Immersive Mode Styles */
#immersive-host {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0b1020;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#immersive-host.immersive-hidden {
  display: none;
  z-index: -1;
}

#immersive-canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#immersive-water{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:2;
  clip-path:inset(calc((1 - var(--water-fill, 0)) * 100%) 0 0 0);
  transition:clip-path var(--wave-fill-transition) linear;
  will-change:clip-path;
}
#immersive-water .water-svg{
  width:100%;
  height:100%;
  display:block;
}

#immersive-timer-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: bold;
  color: #e6eef6;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(78, 168, 222, 0.5);
  pointer-events: none;
  z-index: 100001;
  letter-spacing: 2px;
}

#immersive-task-overlay {
  position: fixed;
  top: calc(50% - 48px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 600;
  color: #e6eef6;
  font-family: inherit;
  text-shadow: 0 0 8px rgba(78, 168, 222, 0.4);
  pointer-events: none;
  z-index: 100001;
  letter-spacing: 0.3px;
  white-space: normal;
  max-width: 92vw;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  text-align: center;
}

#immersive-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e6eef6;
  font-size: 24px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 100002;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#immersive-host:hover #immersive-exit-btn {
  opacity: 1;
}

#immersive-exit-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media(max-width:768px) {
  #immersive-timer-overlay {
    font-size: 28px;
    letter-spacing: 1px;
  }
}

@media(max-width:768px){
  .app{display:flex;flex-direction:column}
  .app > header{order:1}
  .app > .visual{order:2}
  .app > .seo-nav{order:3}
  .app > .seo-intro{order:4}
  .app > #how-it-works{order:5}
  .app > #features{order:6}
  .app > #faq{order:7}
  .app > footer{order:8}
}
