/* One full-viewport WebGL scene carries the landscape; DOM stays semantic and sparse. */
.toolbox-pomodoro-page {
  background: #ecece5;
  color: #233b35;
}
.toolbox-pomodoro-page .toolbox-navbar {
  color: #263f38;
  border-bottom-color: rgba(43, 66, 57, .08);
  background: rgba(238, 238, 229, .38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: pomodoro-ui-arrive .8s ease 2.85s both;
}
.toolbox-pomodoro-page .toolbox-navbar.is-scrolled,
.toolbox-pomodoro-page .toolbox-navbar.is-open {
  border-bottom-color: rgba(43, 66, 57, .13);
  background: rgba(239, 239, 231, .84);
}
.toolbox-pomodoro-page .toolbox-brand small,
.toolbox-pomodoro-page .toolbox-desktop-nav a { color: #526b61; }
.toolbox-pomodoro-page .toolbox-desktop-nav a:hover,
.toolbox-pomodoro-page .toolbox-desktop-nav a.active {
  color: #223e34;
  background: rgba(42, 80, 65, .08);
}
.toolbox-pomodoro-page .toolbox-brand-mark { background: #2e5146; }
.toolbox-pomodoro-page .toolbox-menu-button { background: rgba(47, 77, 63, .1); }
.toolbox-pomodoro-page .toolbox-menu-button span { border-color: #29453a; }

.pomodoro-main {
  --scene-progress: 0;
  position: relative;
  display: flex;
  min-height: 740px;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 72% 28%, #f6f0dc, transparent 46%), #e5eae2;
  color: #243e36;
}
.pomodoro-world,
.pomodoro-fallback,
.pomodoro-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pomodoro-world { z-index: -3; display: block; }
.pomodoro-fallback {
  z-index: -2;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s ease;
  background: linear-gradient(#e9eee7, #f4f0e5);
}
[data-renderer="fallback"] .pomodoro-fallback {
  opacity: 1;
  visibility: visible;
}
.pomodoro-fallback .landscape-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
}
.pomodoro-grain {
  z-index: -1;
  opacity: .2;
  background-image: radial-gradient(rgba(61, 77, 63, .16) .35px, transparent .55px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}
.pomodoro-interface {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: inherit;
  padding: calc(var(--tb-nav-height) + 20px) clamp(20px, 4vw, 70px) 28px;
  animation: pomodoro-ui-arrive 1s ease 2.5s both;
}
.pomodoro-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #4d655b;
}
.pomodoro-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 630;
  letter-spacing: .08em;
  transition: color .3s ease, transform .3s ease;
}
.pomodoro-back:hover { color: #a16451; transform: translateX(-3px); }
.pomodoro-back span { font-size: 20px; font-weight: 400; }
.pomodoro-edition {
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 12px;
  letter-spacing: .2em;
}
.pomodoro-edition i { padding: 0 7px; font-style: normal; color: #a28e78; }
.pomodoro-experience {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 450px;
}
.pomodoro-experience::before {
  position: absolute;
  inset: 18% 23% 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(245, 246, 237, .68), rgba(245, 246, 237, .33) 39%, transparent 71%);
  filter: blur(23px);
  pointer-events: none;
  content: "";
}
.pomodoro-center {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: min(550px, 100%);
  margin-top: -1.5vh;
  text-align: center;
}
.pomodoro-center h1 {
  margin: 0 0 22px;
  color: #516e61;
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: .45em;
  text-indent: .45em;
}
.pomodoro-phase {
  margin: 0;
  color: #587268;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .28em;
  text-indent: .28em;
}
.pomodoro-time {
  display: block;
  margin: 0 0 4px;
  color: #1e3931;
  font-family: "Songti SC", STSong, SimSun, Georgia, serif;
  font-size: clamp(82px, 9.8vw, 148px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
  letter-spacing: -.075em;
  text-shadow: 0 2px 27px rgba(248, 248, 236, .66);
}
.pomodoro-scene-caption {
  margin: 0 0 25px;
  color: #65786b;
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 12px;
  letter-spacing: .16em;
}
.pomodoro-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
}
.pomodoro-actions button {
  min-height: 46px;
  padding: 7px 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #355648;
  font-size: 14px;
  font-weight: 630;
  letter-spacing: .1em;
  transition: color .28s ease, border-color .28s ease, transform .28s ease;
}
.pomodoro-actions button:hover {
  border-bottom-color: currentColor;
  color: #9d674f;
  transform: translateY(-2px);
}
.pomodoro-actions button:active { transform: scale(.96); }
.pomodoro-actions .pomodoro-toggle { min-width: 94px; }
.pomodoro-toggle span { margin-left: 9px; font-size: 17px; font-weight: 400; }
.pomodoro-actions .pomodoro-reset { color: #6c8175; }
.pomodoro-status {
  min-height: 19px;
  margin: 12px 0 0;
  color: #71857a;
  font-size: 11px;
  letter-spacing: .04em;
}
.pomodoro-completion {
  position: absolute;
  top: calc(100% + 4px);
  display: none;
  align-items: center;
  gap: 12px;
  color: #91664d;
  font-family: KaiTi, STKaiti, "Songti SC", serif;
  font-size: 17px;
  letter-spacing: .14em;
}
.pomodoro-completion-seal {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #a86355;
  color: #a86355;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  transform: rotate(-8deg);
}
[data-scene="complete"] .pomodoro-completion {
  display: flex;
  animation: pomodoro-complete-arrive 1.2s ease both;
}
.pomodoro-inscription {
  position: absolute;
  top: 13%;
  right: 4%;
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  color: rgba(42, 68, 57, .5);
  font-family: KaiTi, STKaiti, "Songti SC", serif;
  font-size: clamp(14px, 1.2vw, 19px);
  letter-spacing: .22em;
  line-height: 1.4;
  writing-mode: vertical-rl;
}
.pomodoro-inscription small {
  margin-right: 9px;
  color: rgba(69, 86, 72, .6);
  font-size: 9px;
  letter-spacing: .1em;
}
.pomodoro-bottomline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 15px;
  min-height: 57px;
  color: #f0f0e6;
  text-shadow: 0 1px 8px rgba(25, 48, 40, .7);
}
.pomodoro-mode-group { display: flex; align-items: center; gap: 8px; }
.pomodoro-mode-group button {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 44px;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: #d9e2d6;
  background: transparent;
  font-size: 13px;
  letter-spacing: .09em;
  transition: color .3s ease, border-color .3s ease;
}
.pomodoro-mode-group button[aria-pressed="true"] { border-bottom-color: #e6ecde; color: #fffdf0; }
.pomodoro-mode-group button:hover { color: #fff8de; }
.pomodoro-mode-group small { font-size: 10px; letter-spacing: .04em; }
.pomodoro-mode-divider { color: #b2c4b6; font-size: 12px; }
.pomodoro-completed {
  justify-self: center;
  margin: 0 0 11px;
  color: #d2dfd3;
  font-size: 11px;
  white-space: nowrap;
}
.pomodoro-completed strong { color: #fffbe8; font-size: 14px; font-weight: 650; }
.pomodoro-settings { position: relative; justify-self: end; margin-bottom: 4px; font-size: 11px; }
.pomodoro-settings summary {
  min-height: 44px;
  padding: 12px 0 8px 12px;
  cursor: pointer;
  color: #e2e9dd;
  list-style: none;
  white-space: nowrap;
}
.pomodoro-settings summary::-webkit-details-marker { display: none; }
.pomodoro-settings summary span { margin-left: 5px; display: inline-block; transition: transform .25s ease; }
.pomodoro-settings[open] summary span { transform: rotate(180deg); }
.pomodoro-settings form {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: calc(100% + 12px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(328px, calc(100vw - 36px));
  padding: 17px;
  border: 1px solid rgba(60, 90, 72, .2);
  background: rgba(246, 246, 235, .95);
  box-shadow: 0 16px 48px rgba(42, 65, 49, .13);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  text-shadow: none;
}
.pomodoro-settings label { display: grid; gap: 5px; color: #526e5d; }
.pomodoro-settings label span { display: flex; align-items: center; gap: 5px; }
.pomodoro-settings input {
  width: 58px;
  min-height: 37px;
  padding: 5px 7px;
  border: 1px solid #9eb3a3;
  border-radius: 2px;
  outline-color: #50735f;
  color: #244838;
  background: rgba(255, 255, 250, .82);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.pomodoro-settings form button {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 1px solid #829b88;
  color: #254b37;
  background: rgba(255, 255, 250, .72);
  font-size: 12px;
}
.pomodoro-settings form button:hover { background: rgba(226, 236, 221, .83); }
.pomodoro-settings form small { grid-column: 1 / -1; color: #718575; font-size: 10px; }

.toolbox-pomodoro-page .toolbox-footer {
  padding-top: 25px;
  padding-bottom: 25px;
  border-top-color: rgba(38, 65, 52, .15);
  color: #687c70;
}
.toolbox-pomodoro-page .toolbox-footer-brand { color: #294a3a; }

@keyframes pomodoro-ui-arrive {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pomodoro-complete-arrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .pomodoro-main { min-height: 680px; min-height: 100svh; }
  .pomodoro-interface { padding: calc(var(--tb-nav-height) + 12px) 20px 20px; }
  .pomodoro-edition { font-size: 10px; }
  .pomodoro-inscription { top: 14%; right: 1%; font-size: 13px; }
  .pomodoro-center h1 { margin-bottom: 17px; font-size: 15px; }
  .pomodoro-time { font-size: clamp(70px, 15vw, 104px); }
  .pomodoro-bottomline { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .pomodoro-mode-group { grid-column: 1 / -1; justify-self: center; }
  .pomodoro-completed { justify-self: start; margin: 0 0 9px; }
  .pomodoro-settings { grid-column: 2; grid-row: 2; margin-bottom: 0; }
}
@media (max-width: 430px) {
  .pomodoro-interface { padding: calc(var(--tb-nav-height) + 8px) 15px 13px; }
  .pomodoro-topline { align-items: start; }
  .pomodoro-edition { max-width: 110px; padding-top: 9px; text-align: right; line-height: 1.4; }
  .pomodoro-experience { min-height: 420px; }
  .pomodoro-experience::before { inset: 22% 0 18%; }
  .pomodoro-inscription { top: 7%; right: 0; font-size: 11px; opacity: .65; }
  .pomodoro-inscription small { font-size: 7px; }
  .pomodoro-center { margin-top: 9vh; }
  .pomodoro-center h1 { margin-bottom: 14px; font-size: 13px; }
  .pomodoro-phase { font-size: 10px; }
  .pomodoro-time { font-size: clamp(68px, 19vw, 88px); }
  .pomodoro-scene-caption { margin-bottom: 14px; font-size: 10px; }
  .pomodoro-actions { gap: 23px; }
  .pomodoro-status { max-width: 270px; font-size: 10px; }
  .pomodoro-completion { top: calc(100% + 1px); font-size: 14px; }
  .pomodoro-mode-group button { min-height: 40px; font-size: 12px; }
  .pomodoro-completed, .pomodoro-settings { font-size: 10px; }
  .pomodoro-settings summary { padding-left: 4px; }
  .pomodoro-settings form { right: -2px; }
}
@media (max-height: 650px) and (min-width: 761px) {
  .pomodoro-experience { min-height: 340px; }
  .pomodoro-center h1 { margin-bottom: 12px; }
  .pomodoro-scene-caption { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .toolbox-pomodoro-page .toolbox-navbar,
  .pomodoro-interface, [data-scene="complete"] .pomodoro-completion { animation: none; }
  .pomodoro-actions button, .pomodoro-mode-group button, .pomodoro-back,
  .pomodoro-settings summary span, .pomodoro-fallback { transition: none; }
}
