/* R22 compact Pomodoro dock: preserve the original bottom row and advert coordinates. */
body[data-pomodoro-app] .room-bottom { min-width:0; }
body[data-pomodoro-app] .atmosphere-controls,
body[data-pomodoro-app] .focus-controls { min-width:0; }
body[data-pomodoro-app] .scene-button .scene-copy,
body[data-pomodoro-app] .audio-dock-copy,
body[data-pomodoro-app] .progress-button>span,
body[data-pomodoro-app] .focus-toggle>span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
body[data-pomodoro-app] .scene-button .scene-copy { display:block;flex:1 1 auto; }
body[data-pomodoro-app] .scene-button strong { display:block;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3; }
body[data-pomodoro-app] .scene-button>svg { flex:0 0 12px;width:12px;height:12px;margin-left:0; }
body[data-pomodoro-app] .scene-thumb { flex-shrink:0; }
body[data-pomodoro-app] .dock-button[data-action=sound] { position:relative; }
body[data-pomodoro-app] .dock-button[data-action=sound] svg { flex-shrink:0;width:17px;height:17px; }
body[data-pomodoro-app] .dock-button[data-action=sound] .audio-dock-copy { display:block;flex:1 1 auto; }
body[data-pomodoro-app] .dock-button[data-action=sound] .audio-dock-copy>span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
body[data-pomodoro-app] .dock-button[data-action=sound] .sound-on-icon { display:none; }
body[data-pomodoro-app][data-media-playing=true] .dock-button[data-action=sound] .sound-on-icon { display:block; }
body[data-pomodoro-app][data-media-playing=true] .dock-button[data-action=sound] .sound-off-icon { display:none; }
/* No status dot: the speaker itself conveys sound on/off. */
body[data-pomodoro-app][data-media-playing=true] .dock-button[data-action=sound]::after { content:none; }
body[data-pomodoro-app] .focus-controls { display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:5px; }
body[data-pomodoro-app] .focus-controls .dock-button { display:flex;align-items:center;justify-content:center;max-width:100%;min-width:0;gap:7px;min-height:37px;padding:7px 11px;border-radius:14px;white-space:nowrap;line-height:1.25; }
body[data-pomodoro-app] .focus-controls .dock-button svg { flex:0 0 17px;width:17px;height:17px; }
body[data-pomodoro-app] .focus-controls .dock-button>span { display:block;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
body[data-pomodoro-app] .focus-controls .focus-toggle[aria-pressed=true] { border-color:rgba(244,236,216,.64);background:rgba(244,236,216,.18); }
@media(min-width:761px) {
  body[data-pomodoro-app] .room-bottom { align-items:center;gap:0; }
  body[data-pomodoro-app] .atmosphere-controls { display:flex;flex:0 1 auto;width:max-content;max-width:var(--pomo-side-cap,300px);gap:8px;align-items:center; }
  body[data-pomodoro-app] .focus-controls { flex:0 1 auto;width:max-content;max-width:var(--pomo-side-cap,300px); }
  body[data-pomodoro-app] .scene-button { display:flex;flex:1 1 auto;max-width:100%;min-width:0;min-height:44px;gap:7px;padding:4px 8px 4px 5px;border-radius:12px; }
  body[data-pomodoro-app] .scene-thumb { width:42px;height:34px; }
  body[data-pomodoro-app] .dock-button[data-action=sound] { display:flex;flex:0 1 auto;max-width:100%;min-width:40px;min-height:43px;gap:7px;padding:9px 10px;overflow:hidden; }
  body[data-pomodoro-app] .audio-dock-copy>span,
  body[data-pomodoro-app] .scene-button strong { font-size:11px; }
}
@media(max-width:760px) {
  body[data-pomodoro-app] .room-bottom { align-items:center;gap:8px; }
  body[data-pomodoro-app] .focus-controls { flex:0 0 108px;width:108px;max-width:108px;gap:4px; }
  body[data-pomodoro-app] .focus-controls .dock-button { min-height:35px;padding:6px 7px;gap:5px;font-size:10px; }
  body[data-pomodoro-app] .focus-controls .dock-button svg { flex-basis:15px;width:15px;height:15px; }
  body[data-pomodoro-app] .atmosphere-controls { flex:0 1 auto;width:max-content;max-width:min(290px,calc(100% - 116px));gap:6px; }
  body[data-pomodoro-app] .scene-button { display:flex;flex:1 1 auto;min-width:0;max-width:100%;min-height:39px;padding:3px 5px;gap:5px; }
  body[data-pomodoro-app] .scene-button strong { font-size:10px; }
  body[data-pomodoro-app] .scene-thumb { width:34px;height:30px; }
  body[data-pomodoro-app] .scene-button>svg { flex-basis:10px;width:10px; }
  body[data-pomodoro-app] .dock-button[data-action=sound] { display:flex;flex:0 0 39px;width:39px;min-width:39px;min-height:39px;justify-content:center;padding:8px; }
  body[data-pomodoro-app] .dock-button[data-action=sound] .audio-dock-copy { display:none; }
  body[data-pomodoro-app] .focus-controls .dock-button>span { display:block; }
}
@media(max-width:360px) {
  body[data-pomodoro-app] .focus-controls { flex-basis:96px;width:96px;max-width:96px; }
  body[data-pomodoro-app] .atmosphere-controls { max-width:calc(100% - 104px); }
  body[data-pomodoro-app] .scene-thumb { width:31px;height:29px; }
  body[data-pomodoro-app] .scene-button { gap:4px; }
}


/* R22 dock refinement: premium stacked controls at the LEFT.
   Width follows real content length (equalized across both buttons) instead of filling spare space,
   while still respecting the advert boundary. */
body[data-pomodoro-app] .atmosphere-controls {
  --dock-equal-width:auto;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:8px;
  min-width:0;
  width:auto;
  max-width:min(var(--pomo-side-cap,268px),100%);
}
body[data-pomodoro-app] .atmosphere-controls .scene-button,
body[data-pomodoro-app] .atmosphere-controls .dock-button[data-action=sound] {
  width:var(--dock-equal-width,auto);
  max-width:100%;
  min-width:0;
  flex:0 0 auto;
  min-height:46px;
  height:46px;
  padding:5px 12px 5px 7px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  overflow:hidden;
  border-radius:15px;
  text-align:left;
  white-space:nowrap;
  border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(180deg,rgba(29,48,51,.68),rgba(18,33,35,.56));
  box-shadow:0 9px 24px rgba(4,12,14,.16), inset 0 1px 0 rgba(255,255,255,.11);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
body[data-pomodoro-app] .atmosphere-controls .scene-button:hover,
body[data-pomodoro-app] .atmosphere-controls .dock-button[data-action=sound]:hover {
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.28);
  background:linear-gradient(180deg,rgba(37,59,61,.75),rgba(23,40,42,.64));
  box-shadow:0 12px 28px rgba(4,12,14,.21), inset 0 1px 0 rgba(255,255,255,.16);
}
body[data-pomodoro-app] .atmosphere-controls .scene-button:focus-visible,
body[data-pomodoro-app] .atmosphere-controls .dock-button[data-action=sound]:focus-visible {
  outline:3px solid rgba(245,229,189,.92);
  outline-offset:3px;
}
body[data-pomodoro-app] .atmosphere-controls .scene-thumb {
  width:40px;
  height:32px;
  flex:0 0 40px;
  border-radius:9px;
  box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 6px 16px rgba(0,0,0,.16);
}
body[data-pomodoro-app] .atmosphere-controls .scene-copy,
body[data-pomodoro-app] .atmosphere-controls .audio-dock-copy {
  flex:0 1 auto;
  min-width:0;
  max-width:none;
}
body[data-pomodoro-app] .atmosphere-controls .scene-button strong,
body[data-pomodoro-app] .atmosphere-controls .audio-dock-copy>span {
  display:block;
  margin:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.3;
  font-size:12px;
  font-weight:600;
  letter-spacing:.01em;
}
body[data-pomodoro-app] .atmosphere-controls .dock-button[data-action=sound] .audio-dock-copy { display:block; }
body[data-pomodoro-app] .atmosphere-controls .scene-button>svg {
  margin-left:0;
  opacity:.82;
}
body[data-pomodoro-app] .atmosphere-controls .dock-button[data-action=sound] svg {
  width:18px;
  height:18px;
  flex:0 0 18px;
  opacity:.95;
}

/* One restrained, readable Focus control on both sides of the mode switch. */
body[data-pomodoro-app] .focus-controls { align-items:stretch; gap:7px; }
body[data-pomodoro-app] .focus-controls .focus-toggle {
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  gap:9px; min-width:0; max-width:100%; min-height:43px; height:43px;
  padding:0 15px; border-radius:999px;
  border:1px solid rgba(255,255,255,.34);
  color:#faf7ed; background:rgba(18,36,37,.46);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  box-shadow:0 6px 22px rgba(2,12,13,.20),inset 0 1px 0 rgba(255,255,255,.13);
  font:600 11.5px/1.15 'Segoe UI',Arial,sans-serif;
  letter-spacing:.12px; white-space:nowrap;
  transition:border-color .2s,box-shadow .2s,transform .2s;
}
body[data-pomodoro-app] .focus-controls .focus-toggle svg { flex:0 0 17px; width:17px; height:17px; opacity:.92; }
body[data-pomodoro-app] .focus-controls .focus-toggle>span {
  display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  min-width:0; flex:0 1 auto;
}
body[data-pomodoro-app] .focus-controls .focus-toggle:hover {
  transform:translateY(-1px); background:rgba(36,63,61,.67);
  border-color:rgba(255,255,255,.55);box-shadow:0 8px 23px rgba(2,12,13,.26),inset 0 1px 0 rgba(255,255,255,.19);
}
body[data-pomodoro-app] .focus-controls .focus-toggle:focus-visible { outline:3px solid #f5e5bd; outline-offset:3px; }
body[data-pomodoro-app] .focus-controls .focus-toggle[aria-pressed=true] {
  background:rgba(241,236,221,.89); border-color:rgba(255,255,255,.80);
  color:#233d39; box-shadow:0 5px 20px rgba(2,12,13,.22),inset 0 1px 0 rgba(255,255,255,.55);
}
body[data-pomodoro-app] .focus-controls .focus-toggle[aria-pressed=true]:hover { background:#fff7e7; }

/* Focus mode is deliberately sparse: timer, centered ad, exit-focus button only.
   `display:none` also removes hidden controls from keyboard navigation. */
body[data-pomodoro-app].is-zen .atmosphere-controls,
body[data-pomodoro-app].is-zen .focus-controls .progress-button,
body[data-pomodoro-app].is-zen .room-footnote { display:none!important; }
body[data-pomodoro-app].is-zen .room-bottom { justify-content:flex-end; }
body[data-pomodoro-app].is-zen .focus-controls { margin-left:auto; }

@media(min-width:761px) {
  body[data-pomodoro-app] .atmosphere-controls {
    max-width:min(var(--pomo-side-cap,268px),268px);
    flex:0 1 auto;
  }
  body[data-pomodoro-app] .focus-controls {
    width:min(179px,var(--pomo-side-cap,179px));
    max-width:var(--pomo-side-cap,179px); flex:0 1 auto;
  }
  body[data-pomodoro-app] .room-bottom { align-items:center; }
}
@media(max-width:760px) {
  body[data-pomodoro-app] .atmosphere-controls {
    flex:0 1 auto;
    max-width:calc(100% - 118px);
    gap:7px;
  }
  body[data-pomodoro-app] .atmosphere-controls .scene-button,
  body[data-pomodoro-app] .atmosphere-controls .dock-button[data-action=sound] {
    min-height:42px;
    height:42px;
    padding:4px 9px 4px 6px;
    gap:7px;
  }
  body[data-pomodoro-app] .atmosphere-controls .scene-thumb { flex-basis:33px; width:33px; height:29px; }
  body[data-pomodoro-app] .atmosphere-controls .audio-dock-copy { display:block!important; }
  body[data-pomodoro-app] .atmosphere-controls .scene-button strong,
  body[data-pomodoro-app] .atmosphere-controls .audio-dock-copy>span { font-size:10.5px; }
  body[data-pomodoro-app] .focus-controls { flex:0 0 110px; width:110px; max-width:110px; }
  body[data-pomodoro-app] .focus-controls .focus-toggle { height:40px; min-height:40px; padding:0 9px; gap:5px; font-size:10px; }
  body[data-pomodoro-app] .room-bottom { align-items:center; }
}
@media(max-width:360px) {
  body[data-pomodoro-app] .atmosphere-controls { max-width:calc(100% - 103px); }
  body[data-pomodoro-app] .focus-controls { flex-basis:95px; width:95px; max-width:95px; }
  body[data-pomodoro-app] .focus-controls .focus-toggle { padding-inline:7px; }
  body[data-pomodoro-app] .atmosphere-controls .scene-thumb { flex-basis:28px; width:28px; }
}

/* Focus always retains its short localized name; the icon and appearance
   indicate active state, while aria-label/title name the next action. */
body[data-pomodoro-app] .focus-toggle .focus-icon-on { display:none; }
body[data-pomodoro-app] .focus-toggle[aria-pressed=true] .focus-icon-off { display:none; }
body[data-pomodoro-app] .focus-toggle[aria-pressed=true] .focus-icon-on { display:initial; }
