/* aTimeLogger for Mac replica. Colors sampled from the running app (light) and its App Store shots (dark). */
body.is-desktop {
  --side-bg: #3f4851; --side-sel: #4a535f; --side-fg: #e4e5e6; --side-icon: #c2ccd5; --tb-bg: #fbfafb; --tb-border: #e9e9e9;
  --content-bg: #f5f5f5; --panel-bg: #ffffff; --panel-border: #e4e4e4; --band-bg: #f1f1f1; --band-bg2: #f0f0f0; --text: #2b2b2b;
  --text2: #8a8a8a; --sep: #ededed; --seg-border: #cacaca; --seg-bg: #f7f7f7; --seg-on: #cfcfcf; --btn-bg: #ffffff; --btn-border: #d2d2d2;
  --accent: #3a7bd5; --sel-bg: #ececec; --pop-bg: #f6f6f6; --win-bg: #ececec; --count-bg: #ececec; --chip-bg: #e3e3e3; --chip-fg: #555;
  font-size: 13px; color: var(--text); background: var(--content-bg); user-select: none; -webkit-user-select: none; cursor: default;
}
body.is-desktop[data-theme="dark"] {
  --side-bg: #2b2c2f; --side-sel: #3b3c40; --side-fg: #e2e2e4; --side-icon: #b7bcc4; --tb-bg: #2e2e30; --tb-border: #1f1f1f;
  --content-bg: #1f1f21; --panel-bg: #2a2a2c; --panel-border: #343436; --band-bg: #333335; --band-bg2: #2f2f31; --text: #e6e6e6;
  --text2: #9a9a9e; --sep: #3a3a3c; --seg-border: #4b4b4e; --seg-bg: #3a3a3c; --seg-on: #5c5c60; --btn-bg: #3c3c3e; --btn-border: #4a4a4c;
  --sel-bg: #3a3a3d; --pop-bg: #2f2f31; --win-bg: #323234; --count-bg: #3c3c3e; --chip-bg: #46464a; --chip-fg: #ddd;
  --chart-empty: #3a3a3c; --chart-grid: #47474a; --chart-text: #9a9a9e; --chart-axis: #77777a; --dn-title: #ddd; --dn-value: #f2f2f2; --chart-light-edge: #555;
}
body.is-desktop input, body.is-desktop select, body.is-desktop textarea { user-select: text; -webkit-user-select: text; }
.is-desktop svg.g { width: 16px; height: 16px; flex: none; }
.d-app { display: flex; height: 100vh; overflow: hidden; }
.d-flex { flex: 1; }
.muted { color: var(--text2); }

/* sidebar */
.d-side { width: 120px; flex: none; background: var(--side-bg); display: flex; flex-direction: column; color: var(--side-fg); }
.d-traffic { height: 29px; flex: none; -webkit-app-region: drag; }
.d-nav { display: flex; flex-direction: column; }
.d-nav-item { display: flex; align-items: center; gap: 12px; height: 40px; padding-left: 17px; font-size: 14px; color: var(--side-fg); width: 100%; text-align: left; }
.d-nav-item svg.g { width: 16px; height: 16px; color: var(--side-icon); }
.d-nav-item.on { background: var(--side-sel); color: #fff; }
.d-side-bottom { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding: 0 9px 13px; }
.d-side-bottom button { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--side-icon); }
.d-side-bottom svg.g { width: 18px; height: 18px; }
body.offline .d-side-bottom .sync { color: #ff9f0a; }

/* toolbar */
.d-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.d-toolbar { height: 40px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 9px; background: var(--tb-bg); border-bottom: 1px solid var(--tb-border); -webkit-app-region: drag; }
.d-toolbar > * { -webkit-app-region: no-drag; }
.d-seg { display: inline-flex; border: 1px solid var(--seg-border); border-radius: 5px; overflow: hidden; background: var(--seg-bg); flex: none; }
.d-seg button { height: 20px; padding: 0 9px; font-size: 12px; color: var(--text); border-right: 1px solid var(--seg-border); white-space: nowrap; display: flex; align-items: center; justify-content: center; }
.d-seg button:last-child { border-right: 0; }
.d-seg button.on { background: var(--seg-on); }
.d-seg.icons { background: #ecedf0; border-color: #d9dadd; }
.d-seg.icons button { width: 45px; height: 22px; color: #a5a9b0; background: transparent; }
.d-seg.icons button.on { color: #3d7ee8; }
.d-seg.icons svg.g { width: 15px; height: 15px; }
.d-seg.date { background: #ecedf0; border-color: #d9dadd; }
.d-seg.date button { height: 23px; width: 35px; color: #555; background: transparent; }
.d-seg.date button.label { width: 143px; font-size: 13px; color: var(--text); }
.d-seg.date svg.g { width: 14px; height: 14px; stroke-width: 2; }
.d-seg.wide button { min-width: 92px; height: 22px; font-size: 13px; }
body.is-desktop[data-theme="dark"] .d-seg.icons, body.is-desktop[data-theme="dark"] .d-seg.date { background: #3a3a3c; border-color: #4b4b4e; }
body.is-desktop[data-theme="dark"] .d-seg.date button { color: #ddd; }
.d-btn { height: 22px; padding: 0 12px; border: 1px solid var(--btn-border); border-radius: 5px; background: var(--btn-bg); font-size: 12.5px; color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; flex: none; }
.d-btn:active { filter: brightness(.94); }
.d-btn.tb { width: 102px; }
.d-btn.tb.filter { justify-content: center; }
.d-btn.tb.filter span { max-width: 62px; overflow: hidden; text-overflow: ellipsis; }
.d-btn.tb.plus { width: 30px; padding: 0; font-size: 15px; }
.d-btn.small { height: 20px; padding: 0 8px; font-size: 12px; }
.d-btn.plus { width: 26px; padding: 0; font-size: 15px; }
.d-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.d-btn.primary.danger { background: #e5534b; border-color: #e5534b; }
.d-btn.wide { width: 82px; height: 30px; font-size: 13px; border-radius: 6px; }
.d-search { display: flex; align-items: center; gap: 4px; width: 142px; height: 25px; border: 1px solid var(--btn-border); border-radius: 6px; background: var(--btn-bg); padding: 0 6px; flex: none; }
.d-search.wide { width: auto; margin: 8px; }
.d-search svg.g { width: 13px; height: 13px; color: var(--text2); }
.d-search input { border: 0; outline: none; background: transparent; flex: 1; font-size: 13px; width: 100%; min-width: 0; color: var(--text); }
.d-input { height: 24px; border: 1px solid var(--btn-border); border-radius: 4px; background: var(--btn-bg); padding: 0 6px; font-size: 13px; outline: none; color: var(--text); }
.d-input.bare { border: 0; background: transparent; padding: 0; width: 100%; font-size: 13.5px; }
.d-input.num { width: 48px; text-align: right; }
.d-input.csv { width: 183px; display: block; margin: 4px 0 0 214px; }
.d-select { height: 22px; font-size: 13px; min-width: 139px; color: var(--text); }
.d-filterbar { height: 34px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 36px; background: var(--tb-bg); border-bottom: 1px solid var(--tb-border); }
.d-filterbar .d-input.name { width: 64px; }
.d-filterbar .d-btn { min-width: 76px; }

/* content */
.d-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.d-top { flex: 1 1 auto; display: flex; min-height: 0; }
.d-panel { display: flex; flex-direction: column; min-height: 0; }
.d-panel.total { width: 395px; flex: none; padding: 0 9px 10px 10px; }
.d-panel.history { flex: 1; min-width: 0; padding: 0 0 10px 10px; }
.d-split { width: 1px; background: #e3e3e3; margin: 0; flex: none; }
body.is-desktop[data-theme="dark"] .d-split { background: #3a3a3c; }
.d-panel-head { height: 38px; flex: none; display: flex; align-items: center; gap: 10px; padding-right: 10px; }
.d-panel-head h2 { font-size: 18px; font-weight: 400; }
.d-panel.total .d-panel-head { justify-content: space-between; padding-right: 0; }
.d-panel-body { flex: 1; min-height: 0; border: 1px solid var(--panel-border); display: flex; flex-direction: column; overflow: hidden; }
.d-pie { display: flex; justify-content: center; padding-top: 28px; }
.d-pie svg.donut .dn-title { font-size: 13px; }
.d-pie svg.donut .dn-value { font-size: 16px; }
.d-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 7px; font-size: 10px; padding: 18px 16px 6px; color: var(--text); }
.d-legend span { white-space: nowrap; }
.d-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 3px; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); vertical-align: -1px; }
.d-tlist { flex: 1; overflow-y: auto; background: var(--panel-bg); }
.d-trow { display: flex; align-items: center; gap: 6px; height: 32px; padding-right: 14px; font-size: 14px; }
.d-trow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-trow b { font-weight: 400; font-size: 16px; font-variant-numeric: tabular-nums; }
.d-trow.depth0 span { font-weight: 500; }
.d-hlist { flex: 1; overflow-y: auto; background: var(--panel-bg); border: 1px solid var(--panel-border); border-right: 0; }
.d-dayhead { height: 20px; display: flex; align-items: center; padding-left: 21px; background: var(--band-bg); font-size: 12px; font-weight: 600; color: var(--text); position: sticky; top: 0; z-index: 1; }
.d-hrow { display: flex; align-items: center; min-height: 30px; padding: 3px 18px 3px 17px; gap: 10px; }
.d-hrow:hover { background: rgba(0,0,0,.025); }
.d-hrow-main { flex: 1; min-width: 0; }
.d-hrow-name { display: flex; align-items: center; gap: 3px; font-size: 16px; white-space: nowrap; overflow: hidden; }
.d-hrow-name > span { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 2em; }
.d-hrow-name > .d-tags { flex: 0 100 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.d-hrow-comment { font-size: 11px; color: var(--text2); padding-left: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.d-hrow-time { font-size: 12.5px; width: 150px; flex: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-hrow-dur { font-size: 16px; width: 58px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.d-hrow.running .d-hrow-dur { color: var(--accent); }
.d-tags i { font-style: normal; font-size: 10px; background: var(--chip-bg); border-radius: 8px; padding: 0 7px; margin-left: 7px; color: var(--chip-fg); line-height: 15px; }
.d-panel.daily { height: 181px; flex: none; padding: 0 10px 10px; border-top: 1px solid #e3e3e3; }
.page-reports.chart-only .d-panel.daily { height: auto; flex: 1; border-top: 0; }
.page-reports.top-only .d-top { flex: 1; }
.d-chart-host { flex: 1; min-height: 0; border: 1px solid var(--panel-border); background: var(--content-bg); padding: 6px 4px 2px; }
.d-chart-host svg { display: block; }

/* master / detail */
.page-goals, .page-types, .page-tags, .page-fields { flex-direction: row; padding: 10px 0 10px 10px; gap: 10px; }
.d-master { width: 380px; flex: none; background: var(--panel-bg); border: 1px solid var(--panel-border); overflow-y: auto; }
.d-detail { flex: 1; min-width: 0; overflow-y: auto; border-left: 1px solid #e3e3e3; padding: 0 10px 10px; }
body.is-desktop[data-theme="dark"] .d-detail { border-left-color: #3a3a3c; }
.d-detail > .d-empty { height: calc(100% - 10px); }
.d-subhead { padding: 6px 20px; background: var(--band-bg); color: var(--text2); font-size: 12px; font-weight: 600; }
.d-grow { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px; border-bottom: 1px solid var(--sep); }
.d-grow.sel, .d-orow.sel, .d-tagrow.sel { background: var(--sel-bg); }
.d-grow-main { flex: 1; min-width: 0; }
.d-grow-main b { display: block; font-size: 15px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-grow-main small { font-size: 13px; color: var(--text2); }
.d-grow-prog { width: 130px; flex: none; }
.d-grow-prog .vals { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.d-grow-prog sup, .d-dhead sup { font-size: .62em; vertical-align: .7em; }
.d-grow-prog .track { height: 3px; background: #efefef; margin-top: 3px; border-radius: 2px; overflow: hidden; }
body.is-desktop[data-theme="dark"] .d-grow-prog .track { background: #3c3c3e; }
.d-grow-prog .track i { display: block; height: 100%; }
.d-orow { display: flex; align-items: center; gap: 8px; height: 30px; border-bottom: 1px solid var(--sep); padding-right: 18px; }
.d-orow .name { flex: 1; min-width: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-count { background: var(--count-bg); color: #9a9a9a; font-size: 11px; border-radius: 9px; padding: 0 7px; min-width: 22px; text-align: center; line-height: 17px; }
.d-tri { width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; color: #6b6b6b; flex: none; }
.d-tri svg.g { width: 11px; height: 11px; stroke-width: 2.2; transition: transform .12s; }
.d-tri.open svg.g { transform: rotate(90deg); }
.d-tagrow { min-height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--sep); font-size: 15px; }
.d-tagrow b { font-weight: 400; flex: 1; }
.d-tagrow small { color: var(--text2); }
.d-dhead { display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 10px 6px 16px; background: var(--panel-bg); margin-top: 10px; }
.d-dhead h1 { font-size: 20px; font-weight: 400; }
.d-dhead small { font-size: 13px; color: var(--text2); }
.d-dhead-title { display: flex; align-items: center; gap: 8px; }
.d-dsub { padding: 6px 16px 14px 18px; font-size: 13px; background: var(--panel-bg); }
.d-band { padding: 11px 10px 7px; font-size: 16px; background: var(--band-bg2); }
.d-dstats { display: flex; gap: 12px; padding: 8px 10px; font-size: 13px; background: var(--band-bg2); white-space: nowrap; }
.d-dchart { background: var(--band-bg2); padding: 4px 6px 8px; min-height: 160px; }
.d-dlist { background: var(--panel-bg); }
.d-dlist .d-dayhead { padding-left: 20px; }
.d-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text2); height: 100%; text-align: center; padding: 20px; }
.d-empty b { font-size: 22px; font-weight: 400; color: #9b9b9b; }
.d-master .d-empty b { color: var(--text); font-size: 17px; }
.d-empty p { font-size: 15px; margin-top: 6px; }
.d-empty.small { height: auto; padding: 24px; font-size: 14px; }

/* layers */
.d-layer { position: fixed; inset: 0; z-index: 100; }
.d-dim { position: absolute; inset: 0; }
.d-layer.sheet > .d-dim, .d-layer.window > .d-dim { background: rgba(0,0,0,.26); }
.d-box { position: absolute; color: var(--text); }
.d-layer.popover > .d-box { background: var(--pop-bg); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2), 0 0 0 .5px rgba(0,0,0,.2); }
.d-box[data-arrow]::before { content: ""; position: absolute; width: 0; height: 0; border: 8px solid transparent; }
.d-box[data-arrow="up"]::before { top: -15px; left: calc(var(--arrow-x) - 8px); border-bottom-color: var(--pop-bg); }
.d-box[data-arrow="right"]::before { right: -15px; top: calc(var(--arrow-y) - 8px); border-left-color: var(--pop-bg); }
.d-box[data-arrow="left"]::before { left: -15px; top: calc(var(--arrow-y) - 8px); border-right-color: var(--pop-bg); }
.d-layer.sheet > .d-box { left: 50%; top: 120px; transform: translateX(-50%); background: var(--panel-bg); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.3), 0 0 0 .5px rgba(0,0,0,.2); }
.d-layer.window > .d-box { left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--win-bg); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.35), 0 0 0 .5px rgba(0,0,0,.25); }
.d-menu { position: absolute; min-width: 170px; background: rgba(246,246,246,.98); border-radius: 6px; padding: 4px 0; box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.2); }
body.is-desktop[data-theme="dark"] .d-menu { background: rgba(48,48,50,.98); }
.d-menu button { display: block; width: calc(100% - 10px); margin: 0 5px; text-align: left; padding: 3px 10px; font-size: 13.5px; color: var(--text); border-radius: 4px; }
.d-menu button:hover:not([disabled]) { background: var(--accent); color: #fff; }
.d-menu button[disabled] { opacity: .4; }
.d-menu .sep { height: 1px; background: rgba(0,0,0,.1); margin: 4px 0; }
.d-alert { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 16px 14px; }
.d-alert img { width: 56px; height: 56px; }
.d-alert b { font-size: 13px; text-align: center; }
.d-alert-btns { display: flex; gap: 8px; width: 100%; }
.d-alert-btns .d-btn { flex: 1; height: 26px; }

/* edit activity sheet */
.activity > .d-box { overflow: hidden; }
.d-sheet-top { display: flex; justify-content: center; padding: 8px 0; background: var(--band-bg2); border-bottom: 1px solid var(--sep); }
.d-sheet-fields { padding: 6px 12px 4px; }
.d-typebtn { display: flex; align-items: center; gap: 6px; height: 36px; font-size: 13px; color: var(--text); }
.d-typebtn b { font-weight: 500; font-size: 12.5px; }
.d-commentfield, .d-tagfield { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 30px; font-size: 13px; color: #a0a0a0; }
.d-commentfield svg.g, .d-tagfield > svg.g { width: 14px; height: 14px; color: #8d8d8d; }
.d-commentfield input, .d-tagfield input { flex: 1; min-width: 100px; border: 0; outline: none; background: transparent; font-size: 13px; color: var(--text); }
.d-token { background: var(--chip-bg); border-radius: 10px; padding: 1px 8px; font-size: 12px; color: var(--chip-fg); display: inline-flex; align-items: center; }
.d-token button { margin-left: 3px; color: inherit; font-size: 13px; }
.d-startfield { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 13px; }
.d-startfield span { width: 80px; color: var(--text2); }
.d-startfield input { border: 0; background: transparent; font-size: 13px; color: var(--text); outline: none; }
.d-ivhead { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 10px; background: var(--band-bg2); border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep); margin-top: 6px; }
.d-ivhead h2 { font-size: 20px; font-weight: 400; }
.d-ivs { min-height: 176px; max-height: 280px; overflow-y: auto; }
.d-iv { display: flex; align-items: center; gap: 18px; padding: 6px 8px 6px 8px; border-bottom: 1px solid var(--sep); }
.d-iv-end { display: flex; flex-direction: column; }
.d-iv-end input { border: 0; background: transparent; color: var(--text); outline: none; font-family: inherit; }
.d-iv-end input[type="date"] { font-size: 9.5px; font-weight: 600; }
.d-iv-end input[type="time"] { font-size: 13px; }
.d-iv b { font-size: 18px; font-weight: 400; font-variant-numeric: tabular-nums; }
.d-trash { color: #888; width: 22px; display: flex; justify-content: center; }
.d-trash svg.g { width: 13px; height: 13px; }
.d-sheet-foot { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 10px; background: var(--band-bg2); border-top: 1px solid var(--sep); }

/* popover forms */
.d-form { padding: 14px 16px 12px; }
.d-form h3 { font-size: 20px; font-weight: 400; margin-bottom: 14px; }
.d-form > label { display: block; font-size: 13.5px; margin: 10px 0 5px; }
.d-form.grid { display: grid; grid-template-columns: 112px 1fr; row-gap: 12px; align-items: center; }
.d-form.grid h3, .d-form.grid .d-form-btns { grid-column: 1 / -1; }
.d-form.grid > label { margin: 0; }
.d-form-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.d-form-btns .d-btn { min-width: 84px; height: 24px; }
.d-radios { display: flex; flex-direction: column; gap: 6px; }
.d-radios label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.d-goalval { display: flex; align-items: center; gap: 6px; margin: 12px 0 2px; font-size: 13px; }
.d-link { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text2); text-align: left; }
.d-link svg.g { width: 13px; height: 13px; }
.d-fieldtype { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.d-fieldtype span { flex: 1; }
.d-swatch { width: 28px; height: 28px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.d-iconbtn { width: 32px; height: 32px; display: flex; align-items: center; }
.d-iconsets { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 10px 4px; }
.d-iconsets button { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.07); }
.d-iconsets button.on { background: var(--accent); color: #fff; }
.d-icongrid { display: grid; grid-template-columns: repeat(8, 1fr); max-height: 300px; overflow-y: auto; padding: 4px 8px 10px; }
.d-icongrid button { height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.d-icongrid button:hover { background: rgba(0,0,0,.07); }
.d-colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 12px; }
.d-colors button { aspect-ratio: 1; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.d-colors button.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.d-colorpick { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 12px; font-size: 12px; }
.d-pick { max-height: 360px; overflow-y: auto; }
.picker .d-orow { height: 27px; padding-right: 10px; gap: 6px; }
.picker .d-orow .name { font-size: 14.5px; }
.d-pick .d-orow .name { font-size: 14px; }
.d-checkmark { color: var(--accent); font-weight: 700; }
.d-pick-foot { display: flex; padding: 6px 8px; border-top: 1px solid var(--sep); }
.d-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.d-pop-head b { font-size: 13px; font-weight: 600; }
.d-pop-list { min-height: 200px; max-height: 320px; overflow-y: auto; padding: 4px 0; }
.d-pop-list button { display: block; width: 100%; text-align: left; padding: 7px 12px; font-size: 13px; color: var(--text); }
.d-pop-list button.on { font-weight: 600; }
.d-pop-list button:hover { background: rgba(0,0,0,.05); }
.d-range-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; font-size: 13px; }
.d-range-head .d-select { min-width: 150px; }
.d-cals { display: flex; gap: 10px; padding: 8px 12px; }
.d-cal { flex: 1; background: var(--panel-bg); border-radius: 4px; padding: 4px 4px 6px; box-shadow: 0 0 0 .5px rgba(0,0,0,.15); }
.d-cal-head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 2px; font-size: 12px; }
.d-cal-head span button { font-size: 8px; color: #666; padding: 0 2px; }
.d-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.d-cal-grid i { font-style: normal; font-size: 9px; color: #777; font-weight: 600; padding: 2px 0; }
.d-cal-grid button { font-size: 10.5px; height: 19px; border-radius: 3px; color: var(--text); }
.d-cal-grid button.out { color: #bbb; }
.d-cal-grid button.sel { background: #d4d4d4; color: #111; }
.d-cal-grid button.today { color: var(--accent); font-weight: 700; }
.d-range-foot { display: flex; padding: 6px 12px 12px; }
.d-sync-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(0,0,0,.08); }
.d-sync-row.col { flex-direction: column; align-items: flex-start; gap: 4px; }
.d-sync-row small { display: block; color: var(--text2); font-size: 11.5px; margin-top: 2px; }
.d-sync-row code { font-size: 12px; user-select: text; -webkit-user-select: text; background: rgba(0,0,0,.06); padding: 2px 6px; border-radius: 4px; }
.d-code { font-size: 15px; letter-spacing: 2px; color: var(--text); }

/* settings window */
.settings > .d-box { overflow: hidden; }
.d-win-title { height: 28px; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #b5b5b5; font-size: 13px; position: relative; }
.d-win-close { position: absolute; left: 8px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840; }
.d-win-tabs { display: flex; justify-content: center; padding: 2px 0 12px; }
.d-win-body { padding: 10px 37px 26px; min-height: 380px; }
.d-set-row { display: flex; align-items: center; justify-content: space-between; min-height: 32px; font-size: 13.5px; }
.d-set-row.gap { margin-top: 10px; }
.d-set-desc { display: block; font-size: 11.5px; margin: -4px 0 12px; max-width: 380px; line-height: 1.3; }
.d-set-check { margin-bottom: 16px; position: relative; }
.d-set-check label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.d-set-check small { display: block; font-size: 11.5px; margin-top: 3px; line-height: 1.35; }
.d-set-check.hot .d-hotkey { position: absolute; right: 0; top: -4px; width: 122px; height: 27px; border: 1px solid var(--btn-border); border-radius: 6px; background: var(--btn-bg); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.d-stepper { display: flex; align-items: center; gap: 2px; }
.d-stepper input { width: 30px; height: 22px; text-align: center; border: 1px solid var(--btn-border); border-radius: 3px; font-size: 13px; background: var(--btn-bg); color: var(--text); -moz-appearance: textfield; }
.d-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.d-stepper > span { display: flex; flex-direction: column; }
.d-stepper > span button { font-size: 7px; height: 11px; width: 15px; color: #666; }
.d-win-body .d-set-row .d-btn { min-width: 125px; justify-content: center; color: var(--text2); background: rgba(0,0,0,.04); }

/* menu bar popover (mode=menu) */
body.mode-menu, body.mode-command { background: transparent; overflow: hidden; }
.d-menuview { width: 320px; padding: 10px 0 6px; position: relative; color: var(--text); }
.d-mrun { position: relative; }
.d-mrow { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 16px; }
.d-mrow-icon { width: 32px; display: flex; justify-content: center; }
.d-mrow-main { flex: 1; min-width: 0; line-height: 1.15; }
.d-mrow-main small { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-mrow-main b { font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }
.d-mrow-btns { display: flex; gap: 0; padding-top: 12px; }
.d-mrow-btns button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); display: flex; align-items: center; justify-content: center; margin-left: -6px; background: transparent; }
.d-mrow-btns svg.g { width: 14px; height: 14px; }
.d-mrow-btns .pause { color: #3a8ae6; }
.d-mrow-btns .play { color: #3dbb5a; }
.d-mrow-btns .stop { color: #e8483b; }
.d-medit { position: absolute; right: 14px; top: -6px; font-size: 12px; display: flex; align-items: center; gap: 3px; color: var(--text2); }
.d-medit svg.g { width: 10px; height: 10px; }
.d-mback { display: flex; align-items: center; gap: 2px; padding: 4px 8px; font-size: 12px; color: var(--accent); }
.d-mgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 0; padding: 14px 8px 6px; }
.d-mtile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px 0; min-width: 0; }
.d-mtile:hover { background: rgba(0,0,0,.05); border-radius: 6px; }
.d-mtile .ic { position: relative; height: 32px; display: flex; align-items: center; }
.d-mtile .ic i { position: absolute; right: -14px; top: -8px; min-width: 18px; height: 18px; border-radius: 9px; border: 1px solid rgba(0,0,0,.25); background: rgba(255,255,255,.7); color: #666; font-size: 11px; font-style: normal; display: flex; align-items: center; justify-content: center; }
body.is-desktop[data-theme="dark"] .d-mtile .ic i { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.3); color: #ccc; }
.d-mtile .nm { font-size: 12px; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-mfoot { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 14px 4px; }
.d-mfoot button { color: #77777b; }
.d-mfoot svg.g { width: 18px; height: 18px; }
.d-pomo { display: grid; grid-template-columns: 80px 1fr; gap: 4px 10px; padding: 4px 10px 10px; border-bottom: 1px solid var(--sep); margin-bottom: 4px; }
.d-pomo svg { width: 80px; height: 80px; }
.d-pomo .track { fill: none; stroke: rgba(128,128,128,.35); stroke-width: 3; }
.d-pomo .bar { fill: none; stroke: #e8e8e8; stroke-width: 3; }
body.is-desktop:not([data-theme="dark"]) .d-pomo .bar { stroke: #555; }
.d-pomo-main { display: flex; flex-direction: column; justify-content: center; }
.d-pomo-main small { font-size: 11px; display: flex; align-items: center; gap: 3px; }
.d-pomo-main b { font-size: 30px; font-weight: 400; font-variant-numeric: tabular-nums; }
.d-pomo-main span { font-size: 13px; font-variant-numeric: tabular-nums; }
.d-pomo-btns { grid-column: 1 / -1; display: flex; gap: 6px; }
.d-pomo-btns .d-btn { flex: 1; }

/* hot key panel (mode=command) */
.d-command { width: 404px; padding: 12px; color: var(--text); }
.d-cmd-field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 8px; background: var(--panel-bg); box-shadow: 0 0 0 .5px rgba(0,0,0,.2); }
.d-cmd-field svg.g { width: 18px; height: 18px; color: var(--text2); }
.d-cmd-field input { flex: 1; border: 0; outline: none; background: transparent; font-size: 19px; color: var(--text); }
.d-cmd-list { margin-top: 8px; max-height: 240px; overflow-y: auto; }
.d-cmd-row { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 6px; font-size: 14px; }
.d-cmd-row small { margin-left: auto; color: var(--text2); font-size: 11px; }
.d-cmd-row.on { background: var(--accent); color: #fff; }
.d-cmd-row.on small { color: rgba(255,255,255,.8); }
.d-cmd-tags { display: flex; gap: 4px; padding: 8px 4px 0; }
