.wc-launch { display:block; margin:0 0 12px auto; padding:7px 13px; border:1px solid #aaa8; border-radius:18px; background:transparent; color:inherit; font:inherit; font-size:13px; font-weight:600; min-height:36px; }
.wc-editor { padding:14px; border:1px solid #aaa6; border-radius:16px; margin:12px 0; background:#fff; color:#171717; }
.wc-editor p { font-size:12px; line-height:1.5; opacity:.75; margin:8px 0 14px; }
.wc-heading, .wc-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.wc-editor button, .wc-timer button { font:inherit; font-size:12px; border:1px solid #aaa6; background:transparent; color:inherit; border-radius:8px; padding:8px; min-height:36px; }
.wc-editor button:disabled { opacity:.4; }
.wc-editor button:focus-visible, .wc-launch:focus-visible, .wc-timer :focus-visible { outline:2px solid #477fff; outline-offset:2px; }
.wc-row { display:flex; align-items:center; gap:8px; padding:10px 0; border-top:1px solid #aaa3; flex-wrap:wrap; }
.wc-row>span { flex:1; min-width:130px; font-size:14px; overflow-wrap:anywhere; }
.wc-row small { display:block; font-size:11px; opacity:.7; }
.wc-controls { display:flex; gap:4px; margin-left:auto; }
.wc-drag { touch-action:none; cursor:grab; font-size:24px!important; }
.wc-dragging { opacity:.5; }
.wc-footer { margin-top:14px; }
.wc-footer [data-save], .wc-timer button.wc-timer-primary { background:#191919; color:#fff; }
.wc-status { display:block; margin-top:8px; }

/* Modal top layer prevents the workout/header from covering the phone sheet. */
dialog.wc-picker { box-sizing:border-box; position:fixed; inset:auto 0 0; margin:auto auto 0; width:100%; max-width:540px; height:84dvh; max-height:720px; border:0; border-radius:22px 22px 0 0; padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px)); background:#fff; color:#171717; box-shadow:0 -12px 50px #0003; overflow:hidden; }
dialog.wc-picker[open] { display:flex; flex-direction:column; gap:10px; }
dialog.wc-picker::backdrop { background:#0008; }
.wc-picker .wc-heading, .wc-picker-search, .wc-own { flex:none; }
.wc-picker input, .wc-picker select { box-sizing:border-box; font:inherit; font-size:16px; max-width:100%; width:100%; padding:10px; margin:0; border:1px solid #aaa8; border-radius:8px; background:#fff; color:#171717; }
.wc-picker-search { display:grid; gap:8px; }
.wc-results { min-height:0; flex:1; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.wc-results button { display:flex; width:100%; text-align:left; align-items:center; gap:10px; margin:3px 0; min-height:52px; }
.wc-results img { width:44px; height:44px; object-fit:contain; border-radius:8px; flex:none; }
.wc-results span { overflow-wrap:anywhere; }
.wc-own { border-top:1px solid #ddd; padding-top:10px; display:grid; gap:8px; }
.wc-own label { font-size:13px; display:grid; gap:6px; }
.wc-own button { background:#191919; color:#fff; }
.wc-own small:empty { display:none; }

/* One sticky row; secondary settings open beside the duration chip. */
.wc-timer { position:sticky; top:calc(64px + env(safe-area-inset-top,0px)); z-index:12; display:flex; gap:6px; align-items:center; flex-wrap:wrap; border:1px solid #ddd; border-radius:14px; padding:7px 9px; margin-bottom:12px; font-size:12px; background:#fff; color:#171717; box-shadow:0 3px 12px #0001; }
.wc-timer output { font-size:20px; font-weight:600; font-variant-numeric:tabular-nums; min-width:48px; }
.wc-timer-primary { margin-left:auto; min-width:62px; }
.wc-duration-settings { position:relative; }
.wc-duration-settings summary { cursor:pointer; list-style:none; border:1px solid #ddd; border-radius:16px; padding:8px; min-width:40px; text-align:center; box-sizing:border-box; }
.wc-duration-settings summary::-webkit-details-marker { display:none; }
.wc-duration-panel { position:absolute; left:-60px; top:calc(100% + 8px); width:190px; padding:12px; border:1px solid #ddd; border-radius:12px; background:#fff; box-shadow:0 8px 24px #0002; z-index:1; }
.wc-duration-panel label { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.wc-timer input { font:inherit; font-size:16px; width:66px; padding:6px; border:1px solid #aaa6; border-radius:6px; background:#fff; color:#171717; }
.wc-timer small { width:100%; font-size:11px; }
.wc-timer small:empty { display:none; }
@media (max-height:520px) { .wc-picker-search { grid-template-columns:1fr 1fr; } .wc-own { grid-template-columns:1fr auto; align-items:end; } }
.wc-editing > :not(.wc-editor):not(.wc-draft-alert){display:none!important}

dialog.wc-scope { height:auto; overflow-y:auto; }
.wc-scope > button { min-height:48px; text-align:left; font-size:15px; }
.wc-pending small { display:block; margin-top:6px; font-size:12px; overflow-wrap:anywhere; }

/* Shared web/WKWebView surfaces: explicit colors and in-flow controls. */
.wc-notice:empty, .wc-draft-alert:empty { display:none; }
.wc-notice, .wc-draft-alert { padding:12px; border:1px solid #a34b27; border-radius:10px; background:#fff3e8; color:#652d16; font:500 14px/1.5 system-ui,sans-serif; }
.wc-editor .exercise-thumb { width:44px; height:44px; flex:none; object-fit:contain; }
.wc-editor .wc-heading strong { font-size:18px; }
.wc-editor button, .wc-launch { min-height:44px; }
.wc-controls { flex-wrap:wrap; }
.wc-timer { position:relative; top:auto; z-index:2; margin:10px 0; scroll-margin:80px; }
.wc-rest-shortcut { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; border:1px solid #ccc; border-radius:50%; color:#252529; background:#f6f6f8; margin-left:auto; }
html.native-onyx .exercise-log-head:has(.wc-rest-shortcut), .exercise-log-head:has(.wc-rest-shortcut) { grid-template-columns:48px minmax(0,1fr) 44px; }
.wc-duration-panel { position:relative; left:auto; top:auto; width:auto; max-width:240px; box-sizing:border-box; }
.wc-timer:has(details[open]) .wc-duration-settings { flex:1 1 100%; order:5; }
.wc-search-hint { color:#555; font-size:12px; }
.wc-editor, .wc-picker { animation:none; }

/* Owner editor only, shared native/web with contrast retained when disabled. */
.wc-editor [data-remove] { background:#b42318; color:#fff; border-color:#b42318; }
.wc-editor [data-replace] { background:#171717; color:#fff; border-color:#171717; }
.wc-editor [data-remove]:disabled, .wc-editor [data-replace]:disabled { opacity:1; background:#626262; border-color:#626262; color:#fff; cursor:not-allowed; }
.wc-editor .wc-add { display:block; width:100%; margin-top:16px; border:2px solid #171717; background:#f4f4f4; color:#171717; font-size:15px; font-weight:700; }

.workout-add-set { margin-top: 8px; padding: 8px 12px; font-size: 13px; }
.workout-extra-hint { margin-left: 8px; font-size: 11px; }
.set-row .workout-remove-set { grid-column: 1 / -1; justify-self: end; padding: 4px 8px; font-size: 12px; }

/* Keep session controls consistent with the workout cards on native and web. */
.workout-add-set { appearance:none; min-height:44px; border:1px solid #d4d4d8; border-radius:9px; background:#f7f7f8; color:#171717; font-weight:600; cursor:pointer; }
.workout-add-set:disabled { opacity:.5; cursor:not-allowed; }
.workout-extra-hint { display:block; margin:6px 0 0; color:#666; }
.set-row .workout-remove-set { appearance:none; min-height:36px; border:0; border-radius:7px; background:transparent; color:#b42318; font-weight:600; cursor:pointer; }
.workout-add-set:focus-visible, .workout-remove-set:focus-visible { outline:2px solid #171717; outline-offset:2px; }

.wc-substitute { display:block; margin:8px 0 12px auto; min-height:44px; padding:8px 14px; border:1px solid #aaa6; border-radius:18px; background:transparent; color:inherit; font:inherit; font-size:13px; font-weight:600; }
.wc-substitute:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
