.eswgt-wrap{--bg:#0d1117;--card-bg:#0b0f15;--panel:#161b22;--panel2:#1f2630;--text:#f4f7fb;--muted:#99a4b3;--border:#fff;--accent:#58a6ff;--good:#46d39a;--warn:#ffbf5b;--finish:#ff3b3b;--primary-text:#06111f;--update-bg:#e6edf3;--update-text:#10151d;--message-text:#dcebff;max-width:760px;margin:24px auto;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text)}
.eswgt-wrap *{box-sizing:border-box}.eswgt-card{background:var(--card-bg);border:1px solid var(--border);border-radius:24px;padding:24px;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.eswgt-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.eswgt-header h2{margin:2px 0 0!important;color:var(--text)!important;font-size:clamp(26px,5vw,38px)!important;line-height:1.1}.eswgt-eyebrow{font-size:11px;font-weight:800;letter-spacing:.18em;color:var(--accent)}
.eswgt-icon-btn{width:42px;height:42px;min-width:42px;min-height:42px;flex:0 0 42px;border-radius:50%;border:2px solid var(--border);background:var(--bg);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent);transition:.18s ease}.eswgt-icon-btn svg{width:22px;height:22px;display:block}.eswgt-icon-btn:hover{transform:translateY(-1px);filter:brightness(1.06)}.eswgt-field-group{margin:16px 0}.eswgt-field-group>label,.eswgt-update-box>label{display:block;font-size:13px;font-weight:700;color:var(--text);margin-bottom:8px}
.eswgt-duration-row,.eswgt-update-row{display:flex;gap:12px}.eswgt-mini-field,.eswgt-value-field{flex:1;position:relative}.eswgt-mini-field input,.eswgt-value-field input{width:100%;height:54px;border:1px solid var(--border);border-radius:14px;background:var(--panel);color:var(--text);font-size:20px;font-weight:700;padding:10px 14px;outline:none}.eswgt-mini-field input:focus,.eswgt-value-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.eswgt-mini-field span{display:block;margin:6px 0 0 4px;font-size:12px;color:var(--muted)}.eswgt-target-note{font-size:12px;color:var(--muted);margin-top:9px;line-height:1.55}.eswgt-optional{font-weight:500;color:var(--muted)}
.eswgt-primary,.eswgt-secondary,.eswgt-pause,.eswgt-finish{border:0;border-radius:14px;font-weight:800;cursor:pointer;transition:.18s ease}.eswgt-primary{width:100%;min-height:56px;margin-top:8px;background:var(--accent);color:var(--primary-text);font-size:16px}.eswgt-primary:hover,.eswgt-secondary:hover{transform:translateY(-1px);filter:brightness(1.06)}.eswgt-saved-note,.eswgt-helper{font-size:12px;color:var(--muted);margin-top:9px;line-height:1.5}
.eswgt-message{text-align:center;background:var(--panel);border:1px solid var(--border);padding:11px 14px;border-radius:14px;color:var(--message-text);font-weight:700;margin-bottom:18px}.eswgt-timer-panel{text-align:center;padding:18px 10px}.eswgt-caption{font-size:11px;letter-spacing:.16em;font-weight:800;color:var(--muted)}.eswgt-countdown{font-size:clamp(46px,11vw,76px);font-weight:900;letter-spacing:-.045em;line-height:1;margin:9px 0 16px;font-variant-numeric:tabular-nums;color:var(--accent)}.eswgt-time-meta{display:flex;justify-content:center;gap:24px;flex-wrap:wrap;color:var(--muted);font-size:13px}.eswgt-time-meta strong{color:var(--text)}
.eswgt-progress-track{height:10px;background:var(--panel2);border-radius:99px;overflow:hidden;margin:10px 0 20px}.eswgt-progress-fill{height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--good));border-radius:inherit;transition:width .35s ease}.eswgt-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.eswgt-stat{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:13px}.eswgt-stat span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.eswgt-stat strong{display:block;font-size:18px}.eswgt-highlight{background:var(--panel);border-color:var(--border)}
.eswgt-update-box{margin-top:18px;background:var(--card-bg);border:1px solid var(--border);border-radius:18px;padding:16px}.eswgt-secondary{min-width:115px;background:var(--update-bg);color:var(--update-text);padding:0 18px}.eswgt-pace-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}.eswgt-pace-grid>div{padding:12px 8px;text-align:center;border:1px solid var(--border);border-radius:14px;background:var(--card-bg)}.eswgt-pace-grid span{display:block;color:var(--muted);font-size:11px}.eswgt-pace-grid strong{display:block;margin-top:4px;font-size:14px;color:var(--text)}
.eswgt-actions{display:flex;gap:10px;margin-top:10px}.eswgt-pause,.eswgt-finish{flex:1;min-height:46px;background:transparent;color:var(--text);border:2px solid;font-weight:800}.eswgt-pause{border-color:var(--accent)}.eswgt-finish{border-color:var(--finish)}.eswgt-pause:hover{background:color-mix(in srgb,var(--accent) 12%,transparent)}.eswgt-finish:hover{background:color-mix(in srgb,var(--finish) 12%,transparent)}.eswgt-paused .eswgt-countdown{opacity:.55}.eswgt-complete .eswgt-message{background:var(--panel);border-color:var(--good);color:var(--text)}
@media(max-width:640px){.eswgt-header h2{font-size:22px!important;line-height:1.12}.eswgt-header{gap:10px}.eswgt-card{padding:18px;border-radius:20px}.eswgt-stats,.eswgt-pace-grid{grid-template-columns:1fr 1fr}.eswgt-duration-row{gap:8px}.eswgt-update-row{flex-direction:column}.eswgt-secondary{min-height:48px}.eswgt-countdown{font-size:15vw}.eswgt-time-meta{gap:12px}.eswgt-actions{flex-direction:column}}

/* v1.3.0: clean numeric inputs + duration/stop-time choice */
.eswgt-wrap input[type="number"]{-moz-appearance:textfield;appearance:textfield}
.eswgt-wrap input[type="number"]::-webkit-outer-spin-button,.eswgt-wrap input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.eswgt-time-mode{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px;padding:4px;background:var(--panel2);border:1px solid var(--border);border-radius:14px}
.eswgt-mode-btn{min-height:42px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);font-weight:800;cursor:pointer;padding:8px 12px}
.eswgt-mode-btn.is-active{background:var(--panel);border-color:var(--accent);color:var(--text);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 22%,transparent)}
.eswgt-stop-option .eswgt-value-field input[type="time"]{width:100%;height:54px;border:1px solid var(--border);border-radius:14px;background:var(--panel);color:var(--text);font-size:20px;font-weight:700;padding:10px 14px;outline:none;color-scheme:dark}
.eswgt-stop-option .eswgt-value-field input[type="time"]:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.eswgt-timezone-note strong{color:var(--text);font-weight:700}
@media(max-width:420px){.eswgt-time-mode{grid-template-columns:1fr}.eswgt-mode-btn{min-height:40px}}

/* v1.3.1: cleaner end-time controls + visitor light/dark toggle */
.eswgt-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.eswgt-theme-toggle{color:var(--accent)}
.eswgt-theme-icon{width:21px!important;height:21px!important}
.eswgt-theme-icon-moon{display:none!important}
.eswgt-wrap.eswgt-light .eswgt-theme-icon-sun{display:none!important}
.eswgt-wrap.eswgt-light .eswgt-theme-icon-moon{display:block!important}

.eswgt-time-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px;padding:0;background:transparent;border:0;border-radius:0}
.eswgt-mode-btn{min-height:44px;border:1px solid var(--border);border-radius:12px;background:transparent;color:var(--text);font-weight:800;cursor:pointer;padding:9px 12px;transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease}
.eswgt-mode-btn:hover{transform:translateY(-1px);border-color:var(--accent)}
.eswgt-mode-btn.is-active{background:var(--accent);border-color:var(--accent);color:var(--primary-text);box-shadow:none}

.eswgt-stop-option .eswgt-value-field{max-width:280px;margin:0 auto}
.eswgt-stop-option .eswgt-value-field input[type="time"]{display:block;width:100%;height:50px;text-align:center;border-radius:12px;font-size:18px;padding:8px 12px}

.eswgt-wrap.eswgt-light{--bg:#f3f6fa!important;--card-bg:#ffffff!important;--panel:#f5f7fa!important;--panel2:#e9eef5!important;--text:#172033!important;--muted:#667085!important;--border:#98a2b3!important;--message-text:#172033!important;--primary-text:#ffffff!important;--update-bg:#172033!important;--update-text:#ffffff!important;color-scheme:light}
.eswgt-wrap.eswgt-light .eswgt-card{box-shadow:0 18px 50px rgba(17,24,39,.12)}
.eswgt-wrap.eswgt-light .eswgt-stop-option .eswgt-value-field input[type="time"]{color-scheme:light}
.eswgt-wrap.eswgt-light .eswgt-mode-btn.is-active{color:#ffffff}

@media(max-width:640px){
  .eswgt-header-actions{gap:6px}
  .eswgt-header .eswgt-icon-btn{width:40px;height:40px;min-width:40px;min-height:40px;flex-basis:40px}
}
@media(max-width:420px){
  .eswgt-time-mode{grid-template-columns:1fr 1fr;gap:8px}
  .eswgt-mode-btn{min-height:42px;padding:8px 7px;font-size:13px}
  .eswgt-stop-option .eswgt-value-field{max-width:230px}
  .eswgt-stop-option .eswgt-value-field input[type="time"]{height:48px;font-size:17px}
}


/* v1.3.2: full-widget light theme. !important is intentional here because site-owner
   color preferences are emitted as inline CSS variables on the widget wrapper. */
.eswgt-wrap.eswgt-light .eswgt-card,
.eswgt-wrap.eswgt-light .eswgt-message,
.eswgt-wrap.eswgt-light .eswgt-stat,
.eswgt-wrap.eswgt-light .eswgt-update-box,
.eswgt-wrap.eswgt-light .eswgt-pace-grid>div{color:var(--text)}
.eswgt-wrap.eswgt-light .eswgt-pause,
.eswgt-wrap.eswgt-light .eswgt-finish{color:var(--text)}
.eswgt-wrap.eswgt-light input::placeholder{color:var(--muted);opacity:.85}


/* v1.3.3: keep the stop-time control geometrically centered on all screen sizes. */
.eswgt-stop-option .eswgt-value-field{
  display:block;
  flex:none;
  width:min(280px,100%);
  max-width:280px;
  margin-left:auto!important;
  margin-right:auto!important;
}
@media(max-width:420px){
  .eswgt-stop-option .eswgt-value-field{width:min(230px,100%);max-width:230px}
}
