/* Time zone converter and call planner. Mobile first; tokens only, plus the planner's own day colors (light and dark). */
.tool .tz { --tz-free: #DDBFFF; --tz-sleep: #2E1650; --tz-busy: repeating-linear-gradient(135deg, rgb(var(--ink) / .08) 0 4px, rgb(var(--ink) / .16) 4px 8px); --tz-line: rgb(var(--ink) / .1); --tz-muted: rgb(var(--ink) / .66);
  display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (prefers-color-scheme: dark) { .tool .tz { --tz-free: #6A3E9E; --tz-sleep: #1A0C2E; --tz-muted: rgb(var(--ink) / .72); } }

/* Top: quick convert + live / date / 12-24h */
.tool .tz-top { display: flex; flex-direction: column; gap: 8px; }
.tool .tz-quick { position: relative; }
.tool .tz-quick input[type="search"] { padding-right: 56px; font-weight: 700; }
.tool .tz-quick input::placeholder { color: rgb(var(--ink) / .5); }
.tool .tz-quick-go { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgb(var(--ink)); color: var(--surface); transition: transform .16s var(--ease-out); }
.tool .tz-quick-go:active { transform: scale(.96); }
.tool .tz-quick-go .tool-icon { width: 20px; height: 20px; }
.tool .tz-quick-msg:empty { display: none; }
.tool .tz-quick-msg { font-size: 14px; line-height: 20px; color: #B42318; font-weight: 750; margin-top: -8px; }
@media (prefers-color-scheme: dark) { .tool .tz-quick-msg { color: #FF9C8F; } }
.tool .tz-head { display: flex; gap: 8px; align-items: center; }
.tool .tz-now, .tool .tz-fmt, .tool .tz-date input {
  min-height: 40px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--tz-line);
  font: inherit; font-size: 14px; font-weight: 800; color: rgb(var(--ink) / .85);
}
.tool .tz-now { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap; transition: transform .16s var(--ease-out); }
.tool .tz-now:active, .tool .tz-fmt:active, .tool .tz-chip:active, .tool .tz-add:active, .tool .tz-mini:active, .tool .tz-hours:active { transform: scale(.96); }
.tool .tz-date { flex: 1 1 auto; min-width: 0; }
.tool .tz-date input { width: 100%; min-height: 40px; padding: 6px 14px; font-size: 16px; }
.tool .tz-fmt { flex: 0 0 auto; padding: 0 12px; font-variant-numeric: tabular-nums; }
.tool .tz-dot { width: 8px; height: 8px; border-radius: 50%; background: #1FB36B; box-shadow: 0 0 0 3px rgb(31 179 107 / .2); flex: 0 0 auto; }
.tool .tz-dot.is-off { background: rgb(var(--ink) / .3); box-shadow: none; }
@media (min-width: 600px) { .tool .tz-top { flex-direction: row; } .tool .tz-quick { flex: 1 1 auto; } .tool .tz-head { flex: 0 0 auto; } .tool .tz-date { flex: 0 0 168px; } }

/* The answer */
.tool .tz-answer { padding: 18px 20px 14px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.tool .tz-answer-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--tz-muted); }
.tool .tz-answer-main b { font-size: 26px; line-height: 34px; font-weight: 950; letter-spacing: -.02em; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .tz-answer-main b.tz-accent { color: var(--link); }
.tool .tz-is { color: rgb(var(--ink) / .5); }
.tool .tz-answer-sub { margin-top: 6px; font-size: 15px; line-height: 22px; color: var(--tz-muted); }
.tool .tz-discord { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tz-line); }
.tool .tz-discord-label { font-size: 13px; font-weight: 800; color: var(--tz-muted); margin-right: 2px; }
.tool .tz-mini { min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 13px; font-weight: 800; color: rgb(var(--ink) / .8); background: rgb(var(--accent) / .08); transition: transform .16s var(--ease-out), background-color .15s ease; white-space: nowrap; }
@media (hover: hover) { .tool .tz-mini:hover { background: rgb(var(--accent) / .16); } }
.tool .tz-mini-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Place rows */
.tool .tz-rows { display: flex; flex-direction: column; gap: 8px; }
.tool .tz-row { padding: 10px 10px 14px 16px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--tz-line); display: flex; flex-direction: column; gap: 8px; }
.tool .tz-row.is-home { box-shadow: inset 0 0 0 2px rgb(var(--accent) / .45); }
.tool .tz-row-top { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.tool input.tz-name {
  flex: 1 1 auto; min-width: 0; min-height: 32px; padding: 2px 0; box-shadow: none; background: transparent; border-radius: 0;
  font-size: 13px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--tz-muted);
}
.tool input.tz-name:focus-visible { box-shadow: 0 2px 0 0 rgb(var(--accent)); }
.tool input.tz-name::placeholder { color: var(--tz-muted); opacity: 1; }
.tool .tz-status { flex: 0 0 auto; padding: 2px 10px; border-radius: 12px; font-size: 12px; line-height: 20px; font-weight: 850; }
.tool .tz-status.is-free { background: rgb(31 179 107 / .14); color: #0F7A45; }
.tool .tz-status.is-busy { background: rgb(var(--ink) / .08); color: rgb(var(--ink) / .75); }
.tool .tz-status.is-sleep { background: var(--tz-sleep); color: #EBDDFF; }
@media (prefers-color-scheme: dark) { .tool .tz-status.is-free { color: #5FE3A1; } }
.tool .tz-hours { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; border-radius: 18px; font-size: 13px; font-weight: 850; color: var(--link); background: rgb(var(--accent) / .1); transition: transform .16s var(--ease-out), background-color .15s ease; }
.tool .tz-hours[aria-expanded="true"] { background: rgb(var(--ink)); color: var(--surface); }
.tool .tz-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; color: var(--tz-muted); transition: background-color .15s ease, color .15s ease; margin-right: -4px; }
.tool .tz-icon .tool-icon { width: 18px; height: 18px; }
@media (hover: hover) { .tool .tz-icon:hover { background: rgb(var(--ink) / .06); color: rgb(var(--ink)); } }
.tool .tz-moon { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset -4px -2px 0 0 currentColor; transform: rotate(-20deg); }
.tool .tz-row-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-right: 6px; }
.tool .tz-when { display: flex; flex-direction: column; align-items: flex-end; }
.tool .tz-time-box { position: relative; display: block; min-width: 112px; text-align: right; }
.tool .tz-time-text { display: inline-flex; align-items: center; gap: 6px; font-size: 28px; line-height: 40px; font-weight: 950; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: rgb(var(--ink)); white-space: nowrap; pointer-events: none; }
.tool .tz-edit-cue { width: 6px; height: 6px; border-right: 2px solid var(--tz-muted); border-bottom: 2px solid var(--tz-muted); transform: rotate(45deg) translateY(-3px); }
.tool .tz-time-box input.tz-time { position: absolute; inset: 0; width: 100%; max-width: none; min-height: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 22px; }
.tool .tz-time-box:focus-within .tz-time-text { visibility: hidden; }
.tool .tz-time-box input.tz-time:focus { opacity: 1; background: var(--surface); }
.tool .tz-day { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--tz-muted); white-space: nowrap; }
.tool .tz-day b { color: rgb(var(--ink) / .85); font-weight: 850; }
.tool .tz-day em { font-style: normal; color: var(--link); font-weight: 850; }
.tool .tz-where input { min-height: 44px; font-weight: 750; }
.tool .tz-region { display: block; margin: 4px 0 0 16px; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--tz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool .tz-region b { font-weight: 850; color: rgb(var(--ink) / .8); }

/* Hours editor */
.tool .tz-edit { display: flex; flex-direction: column; gap: 12px; padding: 12px; margin-right: 6px; border-radius: 18px; background: rgb(var(--accent) / .06); animation: tz-open .22s cubic-bezier(.23, 1, .32, 1); }
@keyframes tz-open { from { opacity: 0; transform: translateY(-4px); } }
.tool .tz-edit-block { display: flex; flex-direction: column; gap: 6px; }
.tool .tz-edit .tool-chips { gap: 4px; }
.tool .tz-edit .tool-chips button { min-height: 36px; padding: 0 10px; font-size: 13px; }
.tool .tz-sched { display: flex; flex-direction: column; gap: 8px; }
.tool .tz-sched-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 750; color: rgb(var(--ink) / .8); }
.tool .tz-sched-row > span:first-child { min-width: 52px; }
.tool .tz-sched input[type="time"] { width: 124px; min-height: 40px; padding: 4px 10px; font-size: 16px; }
.tool .tz-toggle { min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 13px; font-weight: 800; background: var(--surface); color: rgb(var(--ink) / .75); box-shadow: inset 0 0 0 1px var(--tz-line); }
.tool .tz-toggle[aria-pressed="true"] { background: rgb(var(--ink)); color: var(--surface); box-shadow: none; }

.tool .tz-under { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool .tz-add { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 20px; font-size: 14px; font-weight: 800; color: var(--link); background: rgb(var(--accent) / .1); transition: transform .16s var(--ease-out); }
.tool .tz-add .tool-icon { width: 18px; height: 18px; }
.tool .tz-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool .tz-recent .tool-label { font-size: 12px; margin-right: 2px; }
.tool .tz-chip { min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 13px; font-weight: 750; background: var(--surface); color: rgb(var(--ink) / .8); box-shadow: inset 0 0 0 1px var(--tz-line); transition: transform .16s var(--ease-out); }

/* Day bars */
.tool .tz-rails-card { padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.tool .tz-rails-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.tool .tz-rails-head .tool-chips button { min-height: 36px; padding: 0 12px; font-size: 13px; }
.tool .tz-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; line-height: 16px; font-weight: 750; color: var(--tz-muted); }
.tool .tz-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: -8px; vertical-align: -2px; }
.tool .tz-key.is-free, .tool .tz-cell.is-free { background: var(--tz-free); }
.tool .tz-key.is-busy, .tool .tz-cell.is-busy { background: var(--tz-busy); }
.tool .tz-key.is-sleep, .tool .tz-cell.is-sleep { background: var(--tz-sleep); }
.tool .tz-key.is-both, .tool .tz-cell.is-both { background: var(--ramp); }
.tool .tz-rails { position: relative; display: flex; flex-direction: column; gap: 8px; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; border-radius: 8px; outline: 0; }
.tool .tz-rails:focus-visible { box-shadow: 0 0 0 3px rgb(var(--accent) / .45); }
.tool .tz-rail-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; align-items: start; }
.tool .tz-rail-name { padding-top: 7px; font-size: 12px; line-height: 16px; font-weight: 850; color: var(--tz-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .tz-rail-row.is-both .tz-rail-name { padding-top: 0; }
.tool .tz-rail { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 40px; }
.tool .tz-rail .tz-cell.is-l3::after { content: attr(data-h); position: absolute; left: 0; bottom: 3px; z-index: 1; font-size: 10px; line-height: 12px; font-weight: 900; color: rgb(var(--ink) / .8); white-space: nowrap; pointer-events: none; }
.tool .tz-rail .tz-cell.is-sleep.is-l3::after { color: #EBDDFF; }
.tool .tz-rail-both .tz-cell::after { content: none !important; }
.tool .tz-cell { position: relative; border-radius: 4px; }
.tool .tz-cell.is-midnight { box-shadow: -2px 0 0 0 var(--link); }
.tool .tz-axis { position: relative; height: 16px; margin-top: 3px; }
.tool .tz-axis span { position: absolute; left: calc(var(--x) * 100%); font-size: 11px; line-height: 16px; font-weight: 800; color: var(--tz-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool .tz-axis span.is-day { color: var(--link); transform: translateX(-50%); }
.tool .tz-rail-both { height: 14px; }
.tool .tz-rail-both .tz-cell { background: rgb(var(--ink) / .06); }
.tool .tz-rail-both .tz-cell.is-both { background: var(--ramp); }
.tool .tz-marker { position: absolute; top: -4px; bottom: -2px; left: calc(56px + (100% - 56px) * var(--x, 0)); width: 3px; margin-left: -1px; border-radius: 2px; background: rgb(var(--ink)); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; transition: left .12s ease-out; }
.tool .tz-marker::before { content: ''; position: absolute; top: -5px; left: -4px; width: 11px; height: 11px; border-radius: 50%; background: rgb(var(--ink)); box-shadow: 0 0 0 2px var(--surface); }
@media (min-width: 600px) {
  .tool .tz-rail-row { grid-template-columns: 96px minmax(0, 1fr); }
  .tool .tz-marker { left: calc(104px + (100% - 104px) * var(--x, 0)); }
  .tool .tz-rail { height: 40px; }
  .tool .tz-rail .tz-cell::after { content: attr(data-h); position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 10px; line-height: 12px; font-weight: 850; color: rgb(var(--ink) / .72); letter-spacing: -.02em; }
  .tool .tz-rail .tz-cell.is-sleep::after { color: rgb(235 221 255 / .88); }
  .tool .tz-rail .tz-cell.is-half::after { font-size: 8px; letter-spacing: -.02em; }
  .tool .tz-rail-both .tz-cell::after { content: none; }
}

/* Plan */
.tool .tz-plan { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.tool .tz-plan-kicker { font-size: 15px; line-height: 22px; font-weight: 800; color: var(--tz-muted); }
.tool .tz-plan-big { display: flex; flex-direction: column; gap: 0; margin-top: 2px; font-size: 16px; line-height: 24px; font-weight: 750; color: var(--tz-muted); }
.tool .tz-plan-big b { font-size: 28px; line-height: 36px; font-weight: 950; letter-spacing: -.02em; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .tz-plan-sub { margin-top: 6px; font-size: 15px; line-height: 22px; color: var(--tz-muted); }
.tool .tz-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool .tz-stats .tool-stat { background: rgb(var(--accent) / .07); padding: 12px 8px; }
.tool .tz-stats .tool-stat b { font-size: 22px; line-height: 28px; }
.tool .tz-stats .tool-stat span { display: block; font-size: 12px; line-height: 16px; color: var(--tz-muted); }
.tool .tz-opts-wrap { display: flex; flex-direction: column; gap: 10px; }
.tool .tz-opts-head, .tool .tz-call-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.tool .tz-opts-head .tool-chips button, .tool .tz-call-head .tool-chips button { min-height: 36px; padding: 0 12px; font-size: 13px; }
.tool .tz-opts { display: grid; gap: 8px; }
.tool .tz-opt {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; text-align: left;
  padding: 12px 14px; border-radius: 18px; background: rgb(var(--accent) / .06); box-shadow: inset 0 0 0 1px transparent;
  transition: transform .16s var(--ease-out), box-shadow .15s ease, background-color .15s ease;
}
.tool .tz-opt:active { transform: scale(.98); }
.tool .tz-opt[aria-pressed="true"] { background: rgb(var(--accent) / .12); box-shadow: inset 0 0 0 2px rgb(var(--accent) / .6); }
.tool .tz-opt-times { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--tz-muted); }
.tool .tz-opt-times b { font-size: 18px; line-height: 24px; font-weight: 900; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .tz-opt-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.tool .tz-opt-pick { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 850; color: var(--link); text-align: right; max-width: 96px; }
.tool .tz-opt-pick .tool-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.tool .tz-flag { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: 12px; line-height: 18px; font-weight: 850; white-space: nowrap; }
.tool .tz-flag.is-sleep { background: var(--tz-sleep); color: #EBDDFF; }
.tool .tz-flag.is-busy { background: rgb(var(--ink) / .09); color: rgb(var(--ink) / .78); }
.tool .tz-flag.is-ok { background: rgb(31 179 107 / .14); color: #0F7A45; }
@media (prefers-color-scheme: dark) { .tool .tz-flag.is-ok { color: #5FE3A1; } }
.tool .tz-turns { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--tz-line); }
.tool .tz-turns p { font-size: 15px; line-height: 22px; color: rgb(var(--ink) / .8); }
.tool .tz-turns .tz-opt-pick { max-width: none; }
.tool .tz-call { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--tz-line); padding-top: 16px; }
.tool .tz-call > .tool-chips { gap: 4px; }
.tool .tz-call > .tool-chips button { min-height: 36px; padding: 0 10px; font-size: 13px; }
.tool .tz-link { min-height: 40px; padding: 0 2px; font-size: 14px; font-weight: 850; color: var(--link); text-decoration: underline; text-decoration-color: rgb(var(--accent) / .35); text-decoration-thickness: 2px; text-underline-offset: 3px; align-self: flex-start; }
.tool .tz-week-wrap { overflow-x: auto; margin: 0 -4px; }
.tool .tz-week { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; line-height: 20px; }
.tool .tz-week th { text-align: left; font-size: 12px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; color: var(--tz-muted); padding: 0 8px; white-space: nowrap; }
.tool .tz-week tbody th { font-size: 14px; letter-spacing: 0; text-transform: none; color: rgb(var(--ink) / .85); background: rgb(var(--accent) / .05); border-radius: 12px 0 0 12px; padding: 8px; vertical-align: middle; }
.tool .tz-week td { padding: 8px; background: rgb(var(--accent) / .05); vertical-align: middle; }
.tool .tz-week tr td:last-child { border-radius: 0 12px 12px 0; }
.tool .tz-week td b { display: block; font-weight: 850; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tool .tz-week td input[type="time"] { width: 118px; min-height: 36px; padding: 2px 8px; font-size: 16px; font-weight: 850; }
.tool .tz-week .tz-flag { margin-top: 4px; }
.tool .tz-balance { display: flex; flex-direction: column; gap: 8px; }
.tool .tz-balance-ok { display: flex; align-items: center; gap: 6px; color: #0F7A45; font-weight: 800; }
@media (prefers-color-scheme: dark) { .tool .tz-balance-ok { color: #5FE3A1; } }
.tool .tz-balance-ok .tool-icon { width: 18px; height: 18px; }
.tool .tz-bal-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 52px; gap: 10px; align-items: center; font-size: 13px; }
.tool .tz-bal-name { font-weight: 800; color: rgb(var(--ink) / .8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .tz-bal-track { height: 12px; border-radius: 6px; background: rgb(var(--ink) / .07); overflow: hidden; }
.tool .tz-bal-fill { display: block; height: 100%; border-radius: 6px; background: var(--tz-sleep); transition: width .4s var(--ease-out); }
@media (prefers-color-scheme: dark) { .tool .tz-bal-fill { background: var(--tz-free); } }
.tool .tz-bal-row b { font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.tool .tz-note { font-size: 14px; line-height: 20px; color: var(--tz-muted); }
.tool .tz-actions .btn { flex: 1 1 auto; white-space: nowrap; }
.tool .tz-live { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: rgb(31 179 107 / .12); font-weight: 800; color: rgb(var(--ink) / .85); }
.tool .tz-dst { display: flex; flex-direction: column; gap: 8px; }
.tool .tz-dst-list li { display: block; font-size: 14px; line-height: 20px; }
.tool .tz-dst-list li b { color: rgb(var(--ink)); }
.tool .tz-from-link { padding: 10px 14px; border-radius: 16px; background: rgb(var(--accent) / .12); color: rgb(var(--ink) / .85); }
.tool .tz-nowcta:empty { display: none; }

@media (max-width: 599px) {
  .tool .tz-answer { padding: 16px 16px 12px; }
  .tool .tz-answer-main b { font-size: 22px; line-height: 30px; }
  .tool .tz-plan { padding: 16px; }
  .tool .tz-plan-big b { font-size: 24px; line-height: 32px; }
  .tool .tz-time-text { font-size: 24px; }
  .tool .tz-time-box { min-width: 100px; }
  .tool .tz-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tool .tz-actions .btn-primary { grid-column: 1 / -1; }
  .tool .tz-actions .btn { padding-left: 8px; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .tool .tz-edit { animation: none; } .tool .tz-marker, .tool .tz-bal-fill { transition: none; } }
.tool .tz-shift { font-style: normal; font-size: 12px; font-weight: 800; color: var(--link); }
.tool .tz-tp { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 96px; min-height: 40px; padding: 0 12px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .14); font-size: 16px; font-weight: 850; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tool .tz-tp input[type="time"] { position: absolute; inset: 0; width: 100%; min-height: 0; padding: 0 8px; opacity: 0; cursor: pointer; box-shadow: none; }
.tool .tz-tp:focus-within { box-shadow: inset 0 0 0 2px rgb(var(--accent)); }
.tool .tz-tp:focus-within .tz-tp-text { visibility: hidden; }
.tool .tz-tp input[type="time"]:focus { opacity: 1; }
.tool .tz-week .tz-tp { min-height: 36px; }

/* Round 3: assumed hours, quieter selected chips in secondary groups, Discord hint, wide layout on big screens */
.tool .tz-assumed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; padding: 10px 14px; border-radius: 16px; background: rgb(var(--accent) / .08); font-size: 14px; line-height: 20px; color: rgb(var(--ink) / .8); }
.tool .tz-assumed .tz-link { min-height: 32px; font-size: 14px; }
.tool .tz-nw { white-space: nowrap; }
.tool .tz-discord-hint { flex: 1 0 100%; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--tz-muted); }
.tool .tz-call .tool-chips button[aria-pressed="true"], .tool .tz-edit .tool-chips button[aria-pressed="true"], .tool .tz-opts-head .tool-chips button[aria-pressed="true"] {
  background: rgb(var(--accent) / .16); color: var(--link); box-shadow: inset 0 0 0 1.5px rgb(var(--accent) / .55);
}
@media (min-width: 1120px) {
  .tool[data-tool="time-zone-converter"] { width: 1060px; margin-left: calc((100% - 1060px) / 2); }
  .tool .tz-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tool .tz-plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
  .tool .tz-plan > .tz-plan-head, .tool .tz-plan > .tz-assumed, .tool .tz-plan > .tz-stats { grid-column: 1 / -1; }
  .tool .tz-plan > .tz-call { border-top: 0; padding-top: 0; }
}

/* Round 4: Discord in a disclosure, equal city inputs, names above the bars on phones, contrast */
.tool .tz { --tz-muted: rgb(var(--ink) / .72); }
.tool details.tz-discord { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--tz-line); }
.tool details.tz-discord summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 850; color: rgb(var(--ink) / .8); background: rgb(var(--accent) / .08); }
.tool details.tz-discord summary::-webkit-details-marker { display: none; }
.tool details.tz-discord summary::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease-out); }
.tool details.tz-discord[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.tool details.tz-discord .tz-mini-row { margin-top: 8px; }
.tool .tz-discord-hint { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--tz-muted); }
.tool .tz-discord-hint code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: rgb(var(--ink) / .07); }
.tool .tz-when { min-width: 128px; }
.tool .tz-rows { align-items: start; }
@media (max-width: 599px) {
  .tool .tz-rail-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tool .tz-rail-name { padding-top: 0; }
  .tool .tz-marker { left: calc(100% * var(--x, 0)); top: 14px; }
  .tool .tz-rail { height: 44px; gap: 1px; }
  .tool .tz-cell { border-radius: 3px; }
}
@media (max-width: 599px) {
  .tool .tz-row-main { grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; }
  .tool .tz-when { min-width: 0; }
  .tool .tz-day { white-space: normal; text-align: right; }
  .tool .tz-time-box { min-width: 0; }
}

/* Round 5: hour axis outside the cells, inline hour presets, compact phone table, date label */
.tool .tz-axis span.is-h { color: var(--tz-muted); transform: translateX(-50%); }
.tool .tz-axis span.is-h.is-first { transform: none; }
.tool .tz-axis { height: 18px; }
.tool .tz-rail .tz-cell.is-l3::after { content: none; }
@media (min-width: 600px) { .tool .tz-rail .tz-cell::after { content: attr(data-h); } }
.tool .tz-assumed-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgb(var(--accent) / .08); }
.tool .tz-assumed-box .tz-assumed { padding: 0; background: none; }
.tool .tz-assumed-quick { display: flex; flex-direction: column; gap: 6px; }
.tool .tz-assumed-who { align-self: center; font-size: 13px; font-weight: 850; color: rgb(var(--ink) / .8); margin-right: 2px; }
.tool .tz-assumed-quick .tz-mini { background: var(--surface); box-shadow: inset 0 0 0 1px var(--tz-line); }
.tool .tz-date { position: relative; }
.tool .tz-date-lab { position: absolute; left: 14px; top: -7px; padding: 0 4px; font-size: 10px; line-height: 12px; font-weight: 850; color: var(--tz-muted); background: var(--surface); border-radius: 4px; pointer-events: none; white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) {
  .tool .tz-week { font-size: 13px; }
  .tool .tz-week th, .tool .tz-week td, .tool .tz-week tbody th { padding: 6px; }
  .tool .tz-week .tz-tp { min-width: 84px; padding: 0 8px; font-size: 14px; }
  .tool .tz-call > .tool-chips { gap: 3px; }
  .tool .tz-call > .tool-chips button { padding: 0 8px; min-width: 0; }
}
.tool .tz-call > .tool-chips, .tool .tz-edit-block > .tool-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tool .tz-call > .tool-chips button, .tool .tz-edit-block > .tool-chips button { padding: 0; min-width: 0; text-align: center; }
.tool .tz-quick-msg.is-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 2px rgb(var(--accent) / .45); color: rgb(var(--ink)); font-size: 18px; line-height: 26px; }
.tool .tz-quick-msg.is-ok b { font-weight: 900; }
.tool .tz-dst { margin-top: 8px; }
@media (min-width: 900px) {
  .tool .tz-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: start; padding: 16px 20px; }
  .tool .tz-answer > p { grid-column: 1; }
  .tool .tz-answer details.tz-discord { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; padding-top: 0; border-top: 0; max-width: 320px; }
}

/* Round 6: date shown inside its field, one label per hour, labels kept clear of the scrubber, day switcher, desktop order */
.tool .tz-date { display: block; position: relative; min-height: 40px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--tz-line); cursor: pointer; }
.tool .tz-date-text { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%; min-height: 40px; padding: 0 14px; font-size: 15px; font-weight: 850; color: rgb(var(--ink) / .85); white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.tool .tz-date input { position: absolute; inset: 0; width: 100%; min-height: 0; padding: 0 14px; opacity: 0; cursor: pointer; box-shadow: none; }
.tool .tz-date:focus-within { box-shadow: inset 0 0 0 2px rgb(var(--accent)); }
@media (min-width: 600px) { .tool .tz-date { flex: 0 0 178px; } }
.tool .tz-day b { white-space: nowrap; }
.tool .tz-day em { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 18px; background: rgb(var(--accent) / .14); white-space: nowrap; }
.tool .tz-legend { gap: 4px 12px; }
.tool .tz-leg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tool .tz-daysw .tool-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tool .tz-daysw .tool-chips button { min-height: 44px; min-width: 0; padding: 0; font-size: 13px; text-align: center; }
.tool .tz-daysw .tool-chips button[aria-pressed="true"] { background: rgb(var(--accent) / .16); color: var(--link); box-shadow: inset 0 0 0 1.5px rgb(var(--accent) / .55); }
/* The scrubber line passes behind the hour and name labels, never through them. */
.tool .tz-marker { z-index: 1; }
.tool .tz-axis span { z-index: 2; padding: 0 3px; border-radius: 4px; background: var(--surface); }
.tool .tz-rail-name { position: relative; z-index: 2; justify-self: start; max-width: 100%; padding-right: 6px; background: var(--surface); border-radius: 4px; }
/* Desktop: every hour labelled inside its cell (no gaps), so the axis only marks the day. */
@media (min-width: 600px) {
  .tool .tz-rail .tz-cell.is-l3::after, .tool .tz-rail .tz-cell::after { content: attr(data-h); position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 10px; line-height: 12px; font-weight: 850; letter-spacing: -.02em; color: rgb(var(--ink) / .78); z-index: 0; }
  .tool .tz-rail .tz-cell.is-sleep::after, .tool .tz-rail .tz-cell.is-sleep.is-l3::after { color: rgb(235 221 255 / .9); }
  .tool .tz-rail .tz-cell.is-half::after { font-size: 8px; }
  .tool .tz-rail-both .tz-cell::after { content: none !important; }
  .tool .tz-axis span.is-h:not(.is-dayh) { display: none; }
  .tool .tz-rail-name { justify-self: stretch; }
}
@media (prefers-color-scheme: dark) { .tool .tz-status.is-busy { background: rgb(var(--ink) / .16); color: rgb(var(--ink) / .95); } }
/* Desktop: the day bars come right after the answer, so they show on the first screen; place editors follow. */
@media (min-width: 900px) {
  .tool .tz > .tz-rails-card { order: 1; }
  .tool .tz > .tz-rows { order: 2; }
  .tool .tz > .tz-under { order: 3; }
  .tool .tz > .tz-plan, .tool .tz > .tz-actions, .tool .tz > .tz-nowcta, .tool .tz > .tz-dst { order: 4; }
  .tool .tz-rails-head { flex-wrap: nowrap; }
  .tool .tz-daysw .tool-chips { max-width: 520px; }
}
/* Desktop plan: the three numbers sit beside the best time, the hour presets get the full width. */
@media (min-width: 1120px) {
  .tool .tz-plan > .tz-plan-head { grid-column: 1; grid-row: 1; }
  .tool .tz-plan > .tz-stats { grid-column: 2; grid-row: 1; align-self: center; }
  .tool .tz-plan > .tz-assumed-box { grid-column: 1 / -1; grid-row: 2; }
  .tool .tz-assumed-quick { flex-direction: row; flex-wrap: wrap; gap: 6px 28px; }
}
.tool .tz-leg .tz-key { margin-right: 0; }
/* Hour labels sit above the scrubber line. */
.tool .tz-rail .tz-cell::after { z-index: 2 !important; }
@media (min-width: 600px) {
  .tool .tz-rail .tz-cell:not(.is-sleep)::after { text-shadow: 0 0 3px var(--surface), 0 0 2px var(--surface); }
  .tool .tz-axis span.is-h { display: none; }
}
.tool .tz-rail-day { margin-left: 6px; font-weight: 750; color: var(--tz-muted); }
@media (min-width: 600px) { .tool .tz-rail-day { display: block; margin-left: 0; } }

/* Round 7: day colors with 3:1 between free, work and asleep (light and dark), dark labels on free cells,
   hours editor with plain labels and checkboxes and "from to" on one line, one preset select per person,
   actions in the best time card, a note under an empty shared row, offsets per place, denser 3+ place view. */
.tool .tz { --tz-free: #9E6CDF; --tz-sleep: #2E1650; --tz-busy-base: #F3EEF7;
  --tz-busy: repeating-linear-gradient(135deg, var(--tz-busy-base) 0 4px, rgb(var(--ink) / .12) 4px 6px, var(--tz-busy-base) 6px 8px); }
@media (prefers-color-scheme: dark) {
  .tool .tz { --tz-free: #CFAEF7; --tz-sleep: #120820; --tz-busy-base: #66548A;
    --tz-busy: repeating-linear-gradient(135deg, #66548A 0 4px, #73619A 4px 6px, #66548A 6px 8px); }
}
.tool .tz-rail .tz-cell.is-free::after, .tool .tz-rail .tz-cell.is-free.is-l3::after { color: #260840 !important; text-shadow: none !important; }
@media (prefers-color-scheme: dark) {
  .tool .tz-rail .tz-cell.is-free::after, .tool .tz-rail .tz-cell.is-free.is-l3::after { color: #1A0C2E !important; }
  .tool .tz-rail .tz-cell.is-busy::after { text-shadow: none !important; color: rgb(var(--ink)) !important; }
}
@media (min-width: 600px) { .tool .tz-rail .tz-cell.is-busy::after { text-shadow: 0 0 3px var(--tz-busy-base), 0 0 2px var(--tz-busy-base); } }
.tool .tz-rail-both .tz-cell.is-least { background: rgb(var(--accent) / .18); box-shadow: inset 0 0 0 2px var(--link); }
.tool .tz-rails-note:empty { display: none; }
.tool .tz-none { margin-top: -4px; padding: 10px 14px; border-radius: 14px; background: rgb(var(--accent) / .08); font-size: 14px; line-height: 20px; color: rgb(var(--ink) / .85); }
.tool .tz-none b { font-weight: 900; color: rgb(var(--ink)); }
.tool .tz-off { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 10px; font-size: 13px; line-height: 22px; font-weight: 850; vertical-align: 3px; background: rgb(var(--accent) / .12); color: rgb(var(--ink) / .8); white-space: nowrap; }
/* Hours editor */
.tool .tz-sched { gap: 12px; }
.tool .tz-sched-block { display: flex; flex-direction: column; gap: 6px; }
.tool .tz-sched-lab, .tool .tz-check { font-size: 14px; line-height: 20px; font-weight: 850; color: rgb(var(--ink) / .85); }
.tool .tz-check { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; align-self: flex-start; }
.tool .tz-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--link); cursor: pointer; }
.tool .tz-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; max-width: 320px; font-size: 14px; font-weight: 750; color: rgb(var(--ink) / .72); }
.tool .tz-range .tz-tp { min-width: 0; width: 100%; }
.tool .tz-fill { display: flex; flex-direction: column; gap: 6px; }
.tool select.tz-preset { min-height: 40px; padding: 6px 36px 6px 12px; border-radius: 14px; font-size: 15px; font-weight: 800; max-width: 320px; }
.tool .tz-assumed-quick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tool .tz-preset-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 8px; }
.tool .tz-preset-row .tz-assumed-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .tz-preset-row select.tz-preset { max-width: none; }
@media (min-width: 1120px) {
  .tool .tz-assumed-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
}
/* Actions sit inside the best time card */
.tool .tz-plan-head .tz-actions { margin-top: 14px; }
.tool .tz-plan-head .tz-actions:empty { display: none; }
/* 3 or more places: the options and the weekly table get the full width, bars a bit denser. */
@media (min-width: 1120px) {
  .tool.is-many .tz-plan > .tz-opts-wrap, .tool.is-many .tz-plan > .tz-call, .tool.is-many .tz-plan > .tz-balance { grid-column: 1 / -1; }
  .tool.is-many .tz-plan .tz-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tool.is-many .tz-plan > .tz-call { border-top: 1px solid var(--tz-line); padding-top: 16px; }
}
@media (min-width: 600px) {
  .tool.is-many .tz-rails { gap: 6px; }
  .tool.is-many .tz-rail { height: 34px; }
}
.tool .tz { --tz-busy: repeating-linear-gradient(135deg, var(--tz-busy-base) 0 4px, rgb(var(--ink) / .2) 4px 6px, var(--tz-busy-base) 6px 8px); }
@media (prefers-color-scheme: dark) { .tool .tz { --tz-busy: repeating-linear-gradient(135deg, #66548A 0 4px, #7A68A2 4px 6px, #66548A 6px 8px); } }
.tool .tz-plan-head .tz-actions .btn-secondary, .tool .tz-plan-head .tz-actions .btn:not(.btn-primary) { box-shadow: inset 0 0 0 1.5px rgb(var(--ink) / .16); }
@media (min-width: 600px) {
  .tool .tz-plan-head .tz-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .tool .tz-plan-head .tz-actions .btn { flex: 0 0 auto; min-height: 48px; padding: 0 20px; font-size: 16px; }
}
@media (min-width: 600px) {
  .tool .tz-plan-head .tz-actions { gap: 8px 6px; align-items: center; }
  .tool .tz-plan-head .tz-actions .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
  .tool .tz-plan-head .tz-actions .btn:nth-child(3) { background: none; box-shadow: none; padding: 0 10px; color: var(--link); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
}
@media (min-width: 1120px) { .tool .tz-plan { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); } .tool .tz-plan-head .tz-actions { flex-wrap: nowrap; } }
/* The scrubber line breaks around hour labels: each label carries a halo in its own cell color. */
.tool .tz-rail .tz-cell.is-free::after, .tool .tz-rail .tz-cell.is-free.is-l3::after { text-shadow: 0 0 2px var(--tz-free), 0 0 3px var(--tz-free), 0 0 4px var(--tz-free) !important; }
.tool .tz-rail .tz-cell.is-sleep::after { text-shadow: 0 0 2px var(--tz-sleep), 0 0 3px var(--tz-sleep), 0 0 4px var(--tz-sleep) !important; }
.tool .tz-rail .tz-cell.is-busy::after { text-shadow: 0 0 2px var(--tz-busy-base), 0 0 3px var(--tz-busy-base), 0 0 4px var(--tz-busy-base) !important; }
@media (min-width: 600px) {
  .tool .tz-rail .tz-cell::after { left: 1px !important; right: 1px !important; border-radius: 3px; }
  .tool .tz-rail .tz-cell.is-free::after { background: var(--tz-free); }
  .tool .tz-rail .tz-cell.is-sleep::after { background: var(--tz-sleep); }
  .tool .tz-rail .tz-cell.is-busy::after { background: var(--tz-busy-base); }
}

/* Reflow at 320 px (WCAG 1.4.10): rows wrap instead of pushing past the screen edge. Wider screens are unchanged. */
@media (max-width: 374px) {
  .tool .tz-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tool .tz-actions .btn { white-space: normal; line-height: 20px; text-align: center; }
}
