:root {
  --bg: #0b1020;
  --card: #0f1724;
  --accent: #4ea8de;
  --muted: #9aa4b2;
  --wave-fill-transition: 0.9s;
}
* {
  box-sizing: border-box;
}
html {
  background-color: #0b1020;
}
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 auto auto auto;
  grid-template-areas: 'header' 'visual' 'how' 'features' 'faq' '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;
  text-align: center;
}
#how-it-works {
  grid-area: how;
}
#features {
  grid-area: features;
}
#faq {
  grid-area: faq;
}
footer {
  grid-area: footer;
}
.seo-details {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(78, 168, 222, 0.12);
  background: rgba(15, 23, 36, 0.92);
}
.seo-details h2 {
  margin: 0;
  font-size: 18px;
  color: #dbeeff;
}
.seo-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  color: #dbeeff;
  text-align: left;
}
.seo-toggle::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-left: 10px;
  border-right: 2px solid #7ab8e0;
  border-bottom: 2px solid #7ab8e0;
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
}
.seo-open .seo-toggle::after {
  transform: rotate(45deg);
}
.seo-toggle:hover {
  color: #fff;
}
.seo-toggle:focus-visible {
  outline: 2px solid rgba(78, 168, 222, 0.45);
  outline-offset: -2px;
  border-radius: 8px;
}
.seo-details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 14px;
}
.seo-open .seo-details-content {
  max-height: 500px;
  padding: 0 14px 12px;
}
.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;
}
.seo-details-content h3:first-child {
  margin-top: 0;
}
.seo-details a {
  color: inherit;
  text-decoration: underline;
}
.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: flex-end;
  gap: 0;
}
.auth-panel.auth-panel-signed-out .google-signin-mount {
  justify-content: flex-end;
}
.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;
}
.google-signin-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(78, 168, 222, 0.35);
  background: rgba(78, 168, 222, 0.12);
  color: #e6eef6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.google-signin-fallback:hover {
  background: rgba(78, 168, 222, 0.22);
  border-color: rgba(78, 168, 222, 0.5);
}
.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;
}
.auth-menu-info {
  display: block;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.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;
}
.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;
}
.pomo-stats-dock {
  width: 100%;
  margin: 0;
}
.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;
  position: relative;
}
#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;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#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 {
  visibility: hidden;
  pointer-events: none;
}
.task-hidden {
  visibility: hidden;
  pointer-events: none;
}
.timer-edit-hidden {
  visibility: hidden;
  pointer-events: none;
}
.buttons-hidden {
  visibility: hidden;
  pointer-events: none;
}
#buttons-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;
}
#buttons-visibility-toggle:hover {
  border-color: rgba(78, 168, 222, 0.45);
  color: #e6eef6;
  background: rgba(78, 168, 222, 0.08);
}
.task-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 5;
}
#ui-visibility-toggle {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(78, 168, 222, 0.18);
  background: rgba(15, 23, 36, 0.75);
  backdrop-filter: blur(8px);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  z-index: 50;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    opacity 0.3s;
}
#ui-visibility-toggle:hover {
  border-color: rgba(78, 168, 222, 0.45);
  color: #e6eef6;
  background: rgba(78, 168, 222, 0.35);
}
#ui-visibility-toggle:focus-visible {
  outline: 2px solid rgba(78, 168, 222, 0.4);
  outline-offset: 1px;
}
#ui-visibility-toggle.ui-all-hidden {
  opacity: 0.5;
  overflow: hidden;
}
#ui-visibility-toggle.ui-all-hidden::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
}
#ui-visibility-toggle.ui-all-hidden:hover {
  opacity: 1;
}
#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 {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
#timer-inline-edit .timer-edit-field {
  width: 2.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 .timer-edit-field::-webkit-outer-spin-button,
#timer-inline-edit .timer-edit-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#timer-inline-edit .timer-edit-sep {
  font-size: 28px;
  font-weight: 600;
  color: #e6f0fb;
}
.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 0.22s ease,
    opacity 0.2s ease,
    transform 0.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;
}
.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.18);
  background: rgba(15, 23, 36, 0.72);
  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 (Material-inspired dark theme) ── */
.gt-panel {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(18, 26, 39, 0.92);
}
.gt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  gap: 12px;
}
.gt-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.gt-logo {
  flex-shrink: 0;
  border-radius: 4px;
}
.gt-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.gt-title {
  font-size: 14px;
  font-weight: 600;
  color: #e8edf4;
  letter-spacing: 0.01em;
}
.gt-subtitle {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-subtitle.is-error {
  color: #ff9d9d;
}
.gt-header-right {
  flex-shrink: 0;
}
.gt-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: #4285f4;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
}
.gt-sync-btn:hover {
  background: #5a95f5;
  box-shadow: 0 1px 6px rgba(66, 133, 244, 0.35);
}
.gt-sync-btn:active {
  background: #3b78dc;
}
.gt-sync-btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  cursor: default;
  box-shadow: none;
}
.gt-sync-icon {
  flex-shrink: 0;
}
.gt-sync-btn.is-syncing .gt-sync-icon {
  animation: gt-spin 1s linear infinite;
}
@keyframes gt-spin {
  to {
    transform: rotate(360deg);
  }
}
.gt-sync-label {
}
.gt-status-banner {
  margin: 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #bcc7d4;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.gt-status-banner:empty {
  display: none;
}

/* Connections list */
.gt-connections {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 12px 14px;
}
.gt-connections:empty {
  padding: 0;
}

/* Connection card for each Rainodoro list */
.gt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition:
    background 0.15s,
    border-color 0.15s;
  margin-bottom: 2px;
}
.gt-card:hover {
  background: rgba(255, 255, 255, 0.04);
}
.gt-card.is-linked {
  border-color: rgba(52, 168, 83, 0.25);
}
.gt-card.is-auto-linked {
  border-color: rgba(66, 133, 244, 0.2);
}

/* Status dot */
.gt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gt-dot.linked {
  background: #34a853;
}
.gt-dot.auto-linked {
  background: #4285f4;
}
.gt-dot.unlinked {
  background: rgba(255, 255, 255, 0.12);
}

/* Card body */
.gt-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gt-card-name {
  font-size: 13px;
  font-weight: 500;
  color: #e3eaf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-card-detail {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.gt-card-detail .gt-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.gt-badge.auto {
  background: rgba(66, 133, 244, 0.15);
  color: #8ab4f8;
}
.gt-badge.manual {
  background: rgba(52, 168, 83, 0.12);
  color: #81c995;
}

/* Link / unlink action button */
.gt-card-action {
  flex-shrink: 0;
}
.gt-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #8ab4f8;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.gt-link-btn:hover {
  background: rgba(138, 180, 248, 0.08);
  border-color: rgba(138, 180, 248, 0.2);
}
.gt-link-btn.is-linked {
  color: #81c995;
  border-color: rgba(129, 201, 149, 0.15);
}
.gt-link-btn.is-linked:hover {
  background: rgba(129, 201, 149, 0.08);
  border-color: rgba(129, 201, 149, 0.25);
}

/* Override select (shown when user wants to pick a different Google list) */
.gt-override-select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 36, 0.7);
  color: #e3eaf3;
  font-size: 12px;
  appearance: none;
  margin-top: 4px;
}
.gt-override-select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}
.gt-override-select option {
  background: #121a27;
  color: #e3eaf3;
}

/* Empty states */
.gt-empty {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  padding: 20px 16px;
  text-align: center;
}

/* Locked / paywall */
.google-tasks-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
}
.google-tasks-locked[hidden] {
  display: none;
}
.google-tasks-locked-icon {
  font-size: 28px;
  opacity: 0.5;
}
.google-tasks-locked-text {
  font-size: 13px;
  color: var(--muted);
}

/* Pro badge */
.rainodoro-pro-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent);
  opacity: 0.85;
}
.pro-badge-icon {
  font-size: 12px;
}

/* ── Legacy review classes (kept for completion review panel) ── */
.google-tasks-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px;
}
.google-tasks-preview-summary {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 36, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.google-tasks-preview-title {
  font-size: 13px;
  font-weight: 600;
  color: #e6eef6;
}
.google-tasks-preview-meta {
  font-size: 11px;
  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: 8px;
  background: rgba(15, 23, 36, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.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: 8px;
  background: rgba(15, 23, 36, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.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);
}

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

#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.multi-selected {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.25);
}
.bulk-delete-bar {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  padding: 6px 0;
}
.bulk-delete-btn {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}
.bulk-delete-btn:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: #e74c3c;
}
.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,
#taskListForm .count-btn,
#shortBreakForm .count-btn {
  padding: 5px 8px;
  border: 1px solid rgba(78, 168, 222, 0.18);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  min-width: 30px;
}
#taskForm input,
#taskListForm 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;
}
.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: var(--custom-water-color, #1f3046);
}
.water-line {
  fill: var(--custom-waterline-color, #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);
}
.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;
}
.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);
}

/* ── Customization Toolbar ── */
.customize-toolbar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 36, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(78, 168, 222, 0.18);
  border-radius: 24px;
  padding: 6px 10px;
  z-index: 50;
  transition: opacity 0.3s;
}
.customize-toolbar.toolbar-faded {
  opacity: 0.2;
}
.customize-toolbar:hover {
  opacity: 1 !important;
}
.customize-toolbar.toolbar-collapsed .toolbar-btn-wrap,
.customize-toolbar.toolbar-collapsed #toggleRainBtn {
  display: none;
}
.customize-toolbar.toolbar-collapsed {
  padding: 6px;
  border-radius: 50%;
}
.toolbar-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #e6eef6;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    opacity 0.2s;
  position: relative;
}
.toolbar-btn:hover {
  background: rgba(78, 168, 222, 0.15);
}
.toolbar-btn.active {
  background: rgba(78, 168, 222, 0.25);
}
.toolbar-btn.off {
  opacity: 0.4;
}
.toolbar-btn-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toolbar-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid rgba(78, 168, 222, 0.22);
  border-radius: 12px;
  padding: 12px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 51;
}
.toolbar-popover.hidden {
  display: none;
}
.popover-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.popover-label input[type='range'] {
  width: 100%;
}
.volume-readout {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
}
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.color-row label {
  font-size: 13px;
  color: var(--muted);
}
.color-row input[type='color'] {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 0;
}
.toolbar-reset-btn {
  width: 100%;
  padding: 6px;
  border: 1px solid rgba(78, 168, 222, 0.22);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  margin-top: 4px;
}
.toolbar-reset-btn:hover {
  background: rgba(78, 168, 222, 0.1);
  color: #e6eef6;
}

@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;
  }
}

/* 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,
    var(--custom-rain-color, rgba(255, 255, 255, 0.85)),
    var(--custom-rain-color-faded, 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;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .modes {
    width: 100%;
    flex: 1 1 auto;
  }
  .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;
  }
  .visual {
    gap: 14px;
    margin-top: 0;
  }
  .task-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .gt-header {
    flex-wrap: wrap;
  }
  .gt-card {
    flex-wrap: wrap;
  }
  .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: 400px) {
  .visual > .sidepanel {
    order: 0;
  }
  #ui-visibility-toggle {
    position: static;
    margin-top: 4px;
    order: 1;
  }
  .customize-toolbar {
    position: static;
    margin-top: 4px;
    order: 2;
  }
}

@media (max-width: 1100px), (orientation: portrait) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto auto auto;
    grid-template-areas:
      'header'
      'visual'
      'how'
      'features'
      'faq'
      'footer';
    align-items: stretch;
  }
  .header-buttons {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    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);
}

#immersive-host .customize-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 100002;
}
.immersive-controls {
  position: fixed;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 100001;
}
.immersive-controls button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: rgba(23, 50, 75, 0.7);
  backdrop-filter: blur(8px);
  color: #e6f0fb;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s;
}
.immersive-controls button:hover {
  background: rgba(78, 168, 222, 0.35);
}
#immersive-host .task-hidden,
#immersive-host .timer-hidden,
#immersive-host .buttons-hidden {
  display: none;
}
#immersive-host .ui-controls-hidden {
  display: none;
}

@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 > #how-it-works {
    order: 4;
  }
  .app > #features {
    order: 5;
  }
  .app > #faq {
    order: 6;
  }
  .app > footer {
    order: 8;
  }
}

/* ── Inline modal dialogs (replaces native prompt/confirm) ── */
.inline-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}
.inline-modal-overlay.hidden {
  display: none;
}
.inline-modal {
  background: #0f1d2e;
  border: 1px solid rgba(78, 168, 222, 0.3);
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.inline-modal-title {
  color: #e6eef6;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.inline-modal-body {
  color: #b0c4d8;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.inline-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.inline-modal-field span {
  color: #8fa8c0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inline-modal-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 10px;
  color: #e6eef6;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.inline-modal-input:focus {
  border-color: rgba(78, 168, 222, 0.6);
}
.inline-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.inline-modal-btn {
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.inline-modal-cancel {
  background: transparent;
  color: #8fa8c0;
}
