.vbt-timer {
  --vbt-primary: #000000;
  --vbt-surface: #ffffff;
  --vbt-surface-soft: rgba(255, 255, 255, 0.86);
  --vbt-panel: #ffffff;
  --vbt-soft: rgba(0, 0, 0, 0.04);
  --vbt-soft-strong: rgba(0, 0, 0, 0.07);
  --vbt-border: rgba(0, 0, 0, 0.09);
  --vbt-border-strong: rgba(0, 0, 0, 0.24);
  --vbt-text: #111111;
  --vbt-text-soft: rgba(0, 0, 0, 0.62);
  --vbt-accent: #191970;
  --vbt-accent-2: #4B0082;
  --vbt-neutral-core: #2f2f34;
  --vbt-neutral-ring: rgba(47, 47, 52, 0.16);
  --vbt-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  color: var(--vbt-text);
  font-family: inherit;
}

html.vbt-modal-open,
body.vbt-modal-open {
  overflow: hidden !important;
}

.vbt-timer [hidden] {
  display: none !important;
}

.vbt-panel {
  position: relative;
  width: min(100%, 780px);
  border: 1px solid var(--vbt-border);
  border-radius: 24px;
  background: var(--vbt-panel);
  box-shadow: var(--vbt-shadow);
}

.vbt-panel-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.vbt-header {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.vbt-header > div {
  width: 100%;
}

.vbt-title,
.vbt-modal-title {
  margin: 0;
  color: var(--vbt-text);
  line-height: 1.12;
}

.vbt-title {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
}

.vbt-modal-title {
  margin: 0;
  padding-right: 3rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.vbt-label {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--vbt-text);
  font-size: 1.12rem;
  line-height: 1.25;
}

.vbt-status-label,
.vbt-phase-label,
.vbt-help,
.vbt-pattern-card-copy span {
  color: var(--vbt-text-soft);
}

.vbt-status-label {
  display: block;
  margin: 0;
  font-size: 0.92rem;
}

.vbt-field {
  display: flex;
  flex-direction: column;
}

.vbt-pattern-select,
.vbt-custom-input,
.vbt-cycles-input,
.vbt-delay-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.vbt-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr) minmax(110px, 1fr);
  gap: 0.9rem;
}

.vbt-status-card,
.vbt-cycle-detail-field,
.vbt-custom-settings,
.vbt-cycles-field,
.vbt-delay-field,
.vbt-sound-row {
  border: 1px solid var(--vbt-border);
  border-radius: 20px;
  background: var(--vbt-surface-soft);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.035);
}

.vbt-status-card,
.vbt-cycle-detail-field,
.vbt-custom-settings,
.vbt-cycles-field,
.vbt-delay-field,
.vbt-sound-row {
  padding: 1rem;
}

.vbt-status-card {
  position: relative;
}

.vbt-status-card-header {
  display: block;
  margin-bottom: 0.45rem;
  padding-right: 2.45rem;
}

.vbt-status-card strong {
  display: block;
  min-width: 0;
  color: var(--vbt-text);
  overflow-wrap: normal;
  word-break: normal;
}

.vbt-settings-menu-button {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--vbt-border);
  border-radius: 999px;
  background: var(--vbt-surface);
  color: var(--vbt-primary);
  cursor: pointer;
}

.vbt-settings-menu-button span {
  width: 0.28rem;
  height: 0.28rem;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.vbt-status-card .vbt-settings-menu-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}

.vbt-main-settings-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.vbt-settings-menu-button:hover,
.vbt-settings-menu-button:focus-visible {
  border-color: var(--vbt-border-strong);
  outline: none;
}

.vbt-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.vbt-orbit {
  position: absolute;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  opacity: 0.8;
}

.vbt-breath-core {
  width: clamp(180px, 32vw, 260px);
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  --vbt-core-color: var(--vbt-neutral-core);
  --vbt-core-ring: var(--vbt-neutral-ring);
  display: grid;
  place-items: center;
  background: var(--vbt-core-color) !important;
  box-shadow: 0 0 0 12px var(--vbt-core-ring), 0 18px 50px rgba(0, 0, 0, 0.18);
  color: #fff;
  opacity: 0.96;
  transform: scale(0.78);
  transition: transform var(--vbt-phase-duration, 1s) linear, box-shadow 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.vbt-breath-core[data-phase-key="inhale"],
.vbt-breath-core[data-phase-key="inhale-left"],
.vbt-breath-core[data-phase-key="inhale-right"] {
  --vbt-core-color: var(--vbt-accent);
  --vbt-core-ring: color-mix(in srgb, var(--vbt-accent) 28%, transparent);
  transform: scale(1.08);
  opacity: 1;
  box-shadow: 0 0 0 24px var(--vbt-core-ring), 0 18px 50px rgba(0, 0, 0, 0.24);
}

.vbt-breath-core[data-phase-key="exhale"],
.vbt-breath-core[data-phase-key="exhale-left"],
.vbt-breath-core[data-phase-key="exhale-right"] {
  --vbt-core-color: var(--vbt-accent-2);
  --vbt-core-ring: color-mix(in srgb, var(--vbt-accent-2) 28%, transparent);
  transform: scale(0.78);
  opacity: 0.9;
  box-shadow: 0 0 0 8px var(--vbt-core-ring), 0 18px 50px rgba(0, 0, 0, 0.2);
}

.vbt-breath-core[data-phase-key="ready"],
.vbt-breath-core[data-phase-key="countdown"],
.vbt-breath-core[data-phase-key="hold"],
.vbt-breath-core[data-phase-key="hold-after-exhale"],
.vbt-breath-core[data-phase-key="completed"] {
  --vbt-core-color: var(--vbt-neutral-core);
  --vbt-core-ring: var(--vbt-neutral-ring);
  background: var(--vbt-core-color) !important;
  color: #fff !important;
}

.vbt-breath-core[data-phase-key="hold"] {
  transform: scale(1.08) !important;
}

.vbt-breath-core[data-phase-key="ready"],
.vbt-breath-core[data-phase-key="countdown"],
.vbt-breath-core[data-phase-key="hold-after-exhale"],
.vbt-breath-core[data-phase-key="completed"] {
  transform: scale(0.78) !important;
}

.vbt-breath-inner {
  padding: 1rem;
  color: #fff !important;
  text-align: center;
}

.vbt-breath-core .vbt-phase-label,
.vbt-breath-core .vbt-phase-countdown {
  color: #fff !important;
}

.vbt-phase-label {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.vbt-phase-countdown {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
}

.vbt-timer-actions {
  display: flex;
  justify-content: center;
  margin: -0.25rem 0 0.25rem;
}

.vbt-icon-button,
.vbt-stepper-button,
.vbt-button,
.vbt-pattern-card,
.vbt-sound-option {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.vbt-icon-button:hover,
.vbt-stepper-button:hover,
.vbt-button:hover,
.vbt-pattern-card:hover,
.vbt-sound-option:hover {
  transform: translateY(-1px);
}

.vbt-icon-button.vbt-start-toggle {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--vbt-primary);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.vbt-icon-play {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid currentColor;
}

.vbt-pause-bars {
  display: none;
  gap: 0.25rem;
}

.vbt-pause-bars span {
  width: 5px;
  height: 18px;
  display: inline-block;
  border-radius: 999px;
  background: currentColor;
}

.vbt-start-toggle[data-state="pause"] .vbt-icon-play {
  display: none;
}

.vbt-start-toggle[data-state="pause"] .vbt-pause-bars {
  display: inline-flex;
}

.vbt-cycle-detail-field .vbt-phase-chips {
  margin-top: 0.15rem;
}

.vbt-phase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vbt-phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--vbt-border);
  border-radius: 999px;
  background: var(--vbt-soft);
  color: var(--vbt-text);
  font-size: 0.84rem;
}

.vbt-phase-chip strong,
.vbt-phase-chip span {
  line-height: 1;
}

.vbt-svg-icon,
.vbt-mini-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.vbt-svg-icon {
  width: 1.15em;
  height: 1.15em;
}

.vbt-svg-icon svg,
.vbt-mini-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vbt-svg-icon svg {
  stroke-width: 1.8;
}

.vbt-mini-icon {
  width: 20px;
  height: 20px;
}

.vbt-mini-icon svg {
  stroke-width: 1.9;
}

.vbt-mini-icon-hold svg {
  stroke-width: 2.8;
}

.vbt-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.52);
}

.vbt-modal-panel {
  position: relative;
  width: auto;
  max-width: 50%;
  min-width: min(100%, 20rem);
  max-height: min(86vh, 52rem);
  overflow: auto;
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: 22px;
  background: #fff;
  color: var(--vbt-text);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.vbt-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--vbt-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--vbt-primary);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.vbt-modal-stack {
  display: grid;
  gap: 1rem;
}

.vbt-pattern-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.vbt-pattern-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-height: 92px;
  padding: 0.95rem;
  border: 1px solid var(--vbt-border);
  border-radius: 18px;
  background: var(--vbt-surface-soft);
  color: var(--vbt-text);
  text-align: left;
}

.vbt-pattern-card:focus-visible,
.vbt-sound-option:focus-visible,
.vbt-stepper-button:focus-visible,
.vbt-reset-button:focus-visible,
.vbt-modal-close:focus-visible {
  outline: 2px solid var(--vbt-primary);
  outline-offset: 2px;
}

.vbt-pattern-card[aria-checked="true"],
.vbt-sound-option[aria-pressed="true"] {
  border-color: var(--vbt-primary) !important;
  box-shadow: 0 0 0 1px var(--vbt-primary) !important;
  background: #fff !important;
}

.vbt-pattern-card-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--vbt-soft);
  color: var(--vbt-primary);
}

.vbt-pattern-card-icon .vbt-svg-icon,
.vbt-sound-group-label .vbt-svg-icon,
.vbt-sound-option .vbt-svg-icon {
  width: 18px;
  height: 18px;
}

.vbt-pattern-card-copy {
  display: grid;
  gap: 0.3rem;
}

.vbt-pattern-card-copy strong {
  color: var(--vbt-text);
  font-size: 0.98rem;
  line-height: 1.2;
}

.vbt-pattern-card-copy span {
  font-size: 0.86rem;
  line-height: 1.35;
}

.vbt-custom-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.vbt-custom-field {
  min-width: 0;
}

.vbt-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.vbt-custom-stepper,
.vbt-cycles-field .vbt-stepper,
.vbt-delay-field .vbt-stepper {
  width: 100%;
  justify-content: flex-start;
}

.vbt-stepper-value {
  min-width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  padding: 0 0.9rem;
  border: 1px solid var(--vbt-border);
  border-radius: 16px;
  background: var(--vbt-soft);
  color: var(--vbt-text);
  font-weight: 700;
}

.vbt-custom-value {
  min-width: 54px;
}

.vbt-stepper-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--vbt-border);
  border-radius: 999px;
  background: #fff;
  color: var(--vbt-text);
  font-size: 1.2rem;
  line-height: 1;
}

.vbt-sound-row {
  display: grid;
  gap: 0.9rem;
}

.vbt-sound-groups {
  display: grid;
  gap: 0.8rem;
  width: 100%;
}

.vbt-sound-group {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.vbt-sound-group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--vbt-text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.vbt-sound-group-label .vbt-svg-icon {
  color: var(--vbt-text) !important;
}

.vbt-sound-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.vbt-sound-option {
  min-inline-size: 5.5rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--vbt-border);
  border-radius: 999px;
  background: #fff;
  color: var(--vbt-text-soft);
  font-size: 0.88rem;
}

.vbt-sound-option-icon {
  min-width: 42px;
  padding-inline: 0.65rem;
}

.vbt-sound-option[aria-pressed="true"] {
  color: var(--vbt-primary);
}

.vbt-volume-control {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 52px;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
}

.vbt-volume-input {
  width: 100%;
  accent-color: var(--vbt-primary);
}

.vbt-volume-value {
  color: var(--vbt-text);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: right;
}

.vbt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.vbt-settings-actions {
  justify-content: flex-start;
}

.vbt-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--vbt-border);
  border-radius: 16px;
  background: #fff;
  color: var(--vbt-text);
}

.vbt-reset-button {
  min-inline-size: 5.5rem;
  border-radius: 999px !important;
  background: var(--vbt-primary) !important;
  border-color: var(--vbt-primary) !important;
  color: #fff !important;
}

.vbt-reset-button .vbt-svg-icon,
.vbt-reset-button span {
  color: #fff !important;
}

@supports not (background: color-mix(in srgb, #000 50%, transparent)) {
  .vbt-breath-core[data-phase-key="inhale"],
  .vbt-breath-core[data-phase-key="inhale-left"],
  .vbt-breath-core[data-phase-key="inhale-right"] {
    background: var(--vbt-accent) !important;
  }

  .vbt-breath-core[data-phase-key="exhale"],
  .vbt-breath-core[data-phase-key="exhale-left"],
  .vbt-breath-core[data-phase-key="exhale-right"] {
    background: var(--vbt-accent-2) !important;
  }
}

@media (max-width: 860px) {
  .vbt-pattern-cards,
  .vbt-custom-grid,
  .vbt-status-grid {
    grid-template-columns: 1fr;
  }

  .vbt-panel-main,
  .vbt-modal-panel {
    padding: 1rem;
  }

  .vbt-modal-panel {
    width: min(100%, 46rem);
    max-width: none;
    min-width: 0;
  }

  .vbt-visual {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  .vbt-sound-group {
    grid-template-columns: 1fr;
  }

  .vbt-sound-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vbt-sound-option {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .vbt-sound-options {
    grid-template-columns: 1fr;
  }
}

/* v1.8.1 final modal and status refinements */
.vbt-title {
  font-size: clamp(1.7rem, 3vw, 2rem);
}

.vbt-status-card {
  position: relative;
}

.vbt-status-card-header {
  display: block;
  margin-bottom: 0.45rem;
  padding-right: 2.45rem;
}

.vbt-status-card .vbt-settings-menu-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}

.vbt-modal-panel {
  width: auto;
  max-width: 50%;
  min-width: min(100%, 20rem);
}

.vbt-modal-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.vbt-cycles-field,
.vbt-delay-field {
  align-items: center;
  text-align: center;
}

.vbt-cycles-field .vbt-stepper,
.vbt-delay-field .vbt-stepper {
  justify-content: center;
}

.vbt-cycle-detail-field .vbt-status-label {
  margin-bottom: 0.45rem;
}

@media (max-width: 860px) {
  .vbt-modal-panel {
    width: min(100%, 46rem);
    max-width: none;
    min-width: 0;
  }
}
