:root {
  --ink: #20334e;
  --muted: #75859b;
  --line: #dce4ee;
  --bg: #f3f6fa;
  --entry-active: #e578a6;
  --entry-active-soft: #fff8fb;
  --button-fill: linear-gradient(145deg, #fff, #edf2f9);
  --button-shadow: inset 0 1px 0 #fff, 0 2px 4px #1c355609;
  --selected-fill: linear-gradient(135deg, #42668c, #203d62);
}
html, body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
}
body {
  background: radial-gradient(ellipse at 50% 0, #e7eef8 0, transparent 560px), var(--bg);
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
}
.shell { width: min(100% - 48px, 680px); padding: 18px 0 22px; }
.brand { gap: 12px; margin-bottom: 10px; }
.brand > div { display: flex; align-items: center; }
.brandline { gap: 10px; align-items: baseline; flex-wrap: wrap; row-gap: 4px; }
.brand h1 { font-size: 27px; font-weight: 750; letter-spacing: -.04em; }
.brandline .brandsub { color: #475e7d; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.brandactions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mocktag { padding: 4px 8px; font-size: 9px; background: #ffffff70; border-color: #d6e0ec; }
.sheetlink {
  display: grid; place-items: center; width: 40px; min-height: 40px;
  padding: 9px; border: 1px solid #d7e1ee; border-radius: 12px;
  background: var(--button-fill); color: #526e90; box-shadow: var(--button-shadow);
}
.sheetlink svg { width: 19px; height: 19px; }
.sheetlink:hover { border-color: #aebfd5; }
.tabs {
  gap: 4px; padding: 4px; margin-bottom: 10px;
  border: 1px solid #dce4ee; border-radius: 14px; background: #e9eef6;
}
.tabs button {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 10px;
  font-size: 12px; font-weight: 650; color: #7b8ca2;
}
.tabs button.active {
  background: #fff; color: #284363;
  box-shadow: 0 2px 6px #203b5c0d, inset 0 1px 0 #fff;
}
.entrycontext { display: grid; grid-template-columns: 1fr; gap: 7px; margin-bottom: 10px; }
.compactdate {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 6px 14px 6px 16px;
  border: 1px solid #dce4ee; border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8fafd);
  box-shadow: 0 4px 14px #233f5f05;
  transition: border-color .15s, box-shadow .15s;
}
.compactdate:hover { border-color: #b7c8dd; }
.compactdate:focus-within {
  border-color: #88a7cb;
  box-shadow: 0 0 0 3px #92b6df33, 0 4px 14px #233f5f05;
}
.datecontrol { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; cursor: pointer; }
.datelabel { font-size: 11px; font-weight: 600; color: #7a8ba3; flex-shrink: 0; cursor: pointer; }
.compactdate input {
  width: auto; min-width: 0; max-width: 190px; min-height: 38px; padding: 2px 4px;
  font-size: 18px; font-weight: 700; color: var(--ink);
  border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  cursor: pointer;
}
.compactdate input:hover { border-color: transparent; }
.compactdate input:focus-visible { outline: none; }
.compactdate input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .78; }
.brandline .scope, .scope {
  font-size: 10px; font-weight: 650; padding: 4px 8px; border-radius: 999px;
  background: #f7ead6; color: #9e733b; align-self: center; flex-shrink: 0;
}
.brandline .scope.live, .scope.live { background: #e3edf8; color: #41698e; }
.brandline .scope.out, .scope.out { background: #fdf0ee; color: #9b3d30; }
.stafftrigger {
  display: flex; align-items: center; width: 100%; gap: 12px;
  min-height: 62px; padding: 10px 16px; border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8fafd);
  border: 1px solid #dce4ee; box-shadow: 0 4px 14px #233f5f05;
}
.staffavatar {
  display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 12px; background: linear-gradient(145deg, #eef3fa, #e0e9f5); color: #6883a4;
}
.staffavatar svg { width: 17px; height: 20px; }
.staffidentity { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.stafflabel { color: #7a8ba3; font-size: 11px; font-weight: 500; flex-shrink: 0; }
#staffName { font-size: 21px; font-weight: 700; letter-spacing: .01em; }
.staffchange { margin-left: auto; font-size: 10px; color: #7a8ca5; flex-shrink: 0; }
.wizard {
  padding: 13px 14px; border: 1px solid #dce4ee; border-radius: 22px;
  background: linear-gradient(150deg, #fff 50%, #f9fbfe);
  box-shadow: 0 10px 30px #223d5e05;
}
.wizardhead { padding: 0 4px 10px; gap: 12px; }
.wizardhead > span:first-child {
  padding: 4px 9px; border-radius: 7px; font-size: 10px;
  color: #71849f; background: #f0f4fa;
}
.completiondots { display: flex; gap: 5px; }
.completiondots i { width: 6px; height: 6px; border-radius: 50%; background: #e1e8f1; }
.completiondots i.done { background: #6585a9; }
.wizard .stepcontent { padding: 0; min-height: 0; animation: none; }
.fieldpair { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 1px; }
.fieldblock {
  padding: 10px 9px; border: 1px solid transparent; border-radius: 15px;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.fieldheading { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.fieldheading h2 { margin: 0; font-size: 13px; font-weight: 650; color: #526d8c; white-space: nowrap; }
.fieldnote { color: #d92d4b; font-size: 10.5px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.fieldnumber {
  display: grid; place-items: center; width: 19px; height: 19px;
  border: 1px solid #d5dfec; border-radius: 50%;
  font: 600 10px "Avenir Next", sans-serif; color: #7c8fa8; background: #f5f8fc;
}
.fieldcheck { margin-left: auto; font-size: 11px; color: #6985a5; opacity: 0; }
.done .fieldcheck { opacity: 1; }
.visualplans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.visualplan {
  min-height: 104px; padding: 7px 4px; gap: 4px; border-radius: 14px;
  box-shadow: var(--button-shadow); transition: border-color .16s, box-shadow .16s;
}
.visualplan:hover { transform: none; }
.visualplan strong { position: relative; z-index: 1; font-size: 13px; font-weight: 650; }
.visualplan:not(.selected) {
  background: linear-gradient(145deg, #fff, #f0f4fa); border-color: #dbe4ef; color: #617b98;
}
.visualplan .planart {
  width: 70px; height: 77px; margin: -9px 0 -10px; flex-shrink: 0;
  transform: scale(.74); transform-origin: center; opacity: .48; filter: saturate(.5);
  transition: opacity .18s, filter .18s;
}
.visualplan.selected .planart { opacity: 1; filter: none; }
.visualplan.selected {
  box-shadow: inset 0 1px 0 #ffffff70, 0 3px 10px #233e5d0e;
}
.visualplan.light.selected {
  background: linear-gradient(140deg, #fff7e9, #f8e2c6); border-color: #ddb783; color: #976326;
}
.visualplan.basic.selected {
  background: linear-gradient(140deg, #f0f8ff, #d5e9f8); border-color: #91b7d4; color: #2e6996;
}
.visualplan.premium.selected {
  background: linear-gradient(145deg, #334d73, #182a47); border-color: #b9a064; color: #f0d88f;
}
.pickmark { top: 7px; right: 7px; width: 18px; height: 18px; font-size: 10px; }
.peoplegrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.peoplegrid button {
  min-height: 47px; min-width: 0; padding: 4px; border-radius: 11px; align-items: center;
  border-color: #dce5f0; background: var(--button-fill); box-shadow: var(--button-shadow);
}
.peoplegrid strong { font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.peoplegrid .otherpeople { flex-direction: column; gap: 1px; }
.peoplegrid .otherpeople .otherlabel { font-size: 13px; font-weight: 700; color: #56708f; }
.peoplegrid .otherpeople span { font-size: 9px; line-height: 1.1; opacity: .88; }
.peoplegrid button.selected, .timechoice.selected,
.sourceoptions button[aria-pressed="true"], .sourcechoice.on .sourceoptions button[aria-pressed="true"] {
  background: var(--selected-fill); color: #fff; border-color: #355879;
  box-shadow: inset 0 1px 0 #ffffff22, 0 3px 9px #243f6214;
}
.peoplegrid .otherpeople.selected .otherlabel { color: #fff; }
.timechoices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; }
.timechoice {
  min-height: 66px; min-width: 0; flex-direction: column; gap: 4px;
  border-radius: 12px; border-color: #dce5ef; background: var(--button-fill);
  box-shadow: var(--button-shadow);
}
.timechoice strong {
  font: 600 27px "Avenir Next", sans-serif; color: #355675; line-height: 1.1;
}
.timechoice:last-child strong { font-family: inherit; font-size: 17px; }
.timechoice span { font-size: 10px; color: #7a8fa8; }
.timechoice.selected strong { color: #fff; }
.timechoice.selected span { color: #d8e5f5; }
.wizard .sourcechoice, .wizard .sourcechoice.on {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  width: 100%; min-height: 0; margin: 0 0 3px; padding: 11px 12px;
  border: 1px solid #dfe6ef; border-radius: 14px; background: #fff;
  font-size: 14px; color: var(--ink); cursor: default;
}
.sourcequestion { margin: 0; line-height: 1.6; font-size: 14px; font-weight: 650; }
.sourceoptions { display: grid; grid-template-columns: 1fr; gap: 7px; width: 100%; }
.sourceoptions button {
  display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 9px;
  min-height: 46px; padding: 8px 12px; text-align: left;
  border: 1px solid #dbe4ef; border-radius: 11px;
  background: var(--button-fill); color: #5a7695; box-shadow: var(--button-shadow);
}
.sourceoptions button strong { font-size: 15px; font-weight: 650; }
.sourceoptions button span { font-size: 12px; line-height: 1.5; font-weight: 500; }
.sourcechoice:not(.done) .sourceoptions button[aria-pressed="true"] {
  background: linear-gradient(135deg, #edf2f9, #e1e9f4);
  color: #536f91; border-color: #ccd9e9; box-shadow: inset 0 1px 0 #fff;
}
.wizard .sourcechoice:focus-within { outline: none; }
.fieldblock.locked, .wizard .sourcechoice.locked {
  opacity: 1; background: #f7f9fc; border-color: transparent; box-shadow: none;
}
.locked .fieldheading h2, .wizard .sourcechoice.locked .sourcequestion { color: #8b99ab; }
.locked .fieldnote { color: #d59ba6; }
.locked .fieldnumber { color: #9ba8b9; border-color: #e0e6ef; background: #f6f8fb; }
.locked button:disabled, .locked input:disabled {
  opacity: 1; cursor: default; color: #8b99ad; border-color: #e1e7ef;
  background: linear-gradient(145deg, #fbfcfe, #f0f3f8); box-shadow: inset 0 1px 0 #fff;
}
.locked .visualplan .planart { opacity: .38; }
.locked .visualplan strong, .locked .timechoice strong, .locked .timechoice span { color: #8b99ad; }
.wizard .sourcechoice.locked .sourceoptions button[aria-pressed="true"],
.locked .peoplegrid button.selected,
.locked .timechoice.selected,
.locked .visualplan.selected {
  background: #eaf0f7; border-color: #dce5ef; color: #8393a8; box-shadow: inset 0 1px 0 #fff;
}
.locked .timechoice.selected strong,
.locked .timechoice.selected span,
.locked .visualplan.selected strong,
.locked .peoplegrid .otherpeople.selected span,
.locked .peoplegrid .otherpeople .otherlabel { color: #8393a8; }
.stafftrigger.next, .fieldblock.next, .wizard .sourcechoice.next {
  border-color: var(--entry-active); background: var(--entry-active-soft);
  box-shadow: 0 0 0 1px var(--entry-active), 0 4px 14px #dd7fa00a;
}
.wizard .sourcechoice.next { background: #fff; }
.fieldblock.next .fieldnumber { color: #fff; background: #c35887; border-color: #c35887; }
.add {
  min-height: 40px; margin-top: 9px; border-radius: 12px;
  border: 1px dashed #bbcadd; background: #ffffff90; color: #617e9e; font-size: 12px;
}
.add:disabled { opacity: 1; border-color: #dce4ee; color: #9aabbe; background: #f6f8fb; }
.savebar {
  position: static; margin-top: 10px; padding: 10px 13px;
  border-radius: 16px; background: #ffffffed; border-color: #dbe4ef;
  box-shadow: 0 5px 20px #203b5b0b;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.savebar.ready {
  border-color: var(--entry-active); background: var(--entry-active-soft);
  box-shadow: 0 0 0 1px var(--entry-active), 0 6px 18px #dd7fa01a;
}
.savehint {
  display: inline-block; margin-left: 8px; padding: 2px 7px;
  border-radius: 999px; font-style: normal; font-size: 10px; font-weight: 700;
  color: #a93b6b; background: #fce6ef; vertical-align: middle;
}
.savebar p { font-size: 11px; color: #6b809b; }
.savebar b { font-size: 25px; font-weight: 650; color: #294766; font-variant-numeric: tabular-nums; }
.savebar span { margin: 0 7px; color: #b2c0d0; }
.primary {
  background: var(--selected-fill); border-color: #355879; color: #fff;
  box-shadow: inset 0 1px 0 #ffffff24, 0 4px 12px #203e6115;
}
.primary:disabled {
  opacity: 1; color: #8d9db2; background: linear-gradient(135deg, #e7edf5, #dce5f0);
  border-color: #d9e2ee; box-shadow: inset 0 1px 0 #ffffff70;
}
.savebar .primary { min-width: 200px; min-height: 48px; border-radius: 12px; font-size: 14px; }
.savebar.ready .primary:not(:disabled) {
  background: linear-gradient(135deg, #2d5580, #1b385c);
  border-color: #24476e;
  box-shadow: 0 0 0 3px #e578a62e, 0 5px 14px #203e6126;
  animation: savepulse 1.8s ease-in-out infinite;
}
@keyframes savepulse {
  0%, 100% { box-shadow: 0 0 0 2px #e578a624, 0 5px 14px #203e6122; }
  50% { box-shadow: 0 0 0 5px #e578a642, 0 6px 18px #203e6130; }
}
.localnote { font-size: 9px; color: #95a2b4; margin-top: 11px; line-height: 1.6; }
footer { padding: 14px 3px 0; font-size: 9px; color: #99a8ba; }
.basket { margin-top: 9px; gap: 7px; }
.basket:empty { display: none; }
.basketrow { border-color: #dce5ef; border-radius: 12px; box-shadow: 0 2px 6px #203f6105; }
.basketedit { min-height: 50px; padding: 10px 12px; gap: 8px; font-size: 12px; }
.basketstaff { font-size: 10px; }
.basketremove { min-height: 36px; }
.staffdialog { border-color: #dce5ef; border-radius: 23px; }
.staffoption { background: var(--button-fill); box-shadow: var(--button-shadow); border-color: #dce5ef; }
.staffoption:hover { background: #e7eff8; border-color: #b5c8de; }
.savedmodal {
  width: min(calc(100vw - 44px), 360px); padding: 32px 25px 25px; text-align: center;
  border: 1px solid #dbe4ee; border-radius: 24px;
  background: linear-gradient(150deg, #fff, #f5f8fc); box-shadow: 0 24px 80px #12243e38;
}
.savedmodal::backdrop { background: #18294380; backdrop-filter: blur(3px); }
.savedicon {
  display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 20px;
  border-radius: 50%; background: linear-gradient(135deg, #eaf6ee, #d6eedf); color: #24663c;
}
.savedicon svg { width: 37px; height: 37px; }
.savespinner {
  display: none; width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid #cbd9eb; border-top-color: #365e86;
  animation: savedspin .8s linear infinite;
}
#savedDialog[data-state="saving"] .savedicon {
  background: linear-gradient(135deg, #edf3fb, #dce8f7); color: #365e86;
}
#savedDialog[data-state="saving"] .checkicon { display: none; }
#savedDialog[data-state="saving"] .savespinner { display: block; }
@keyframes savedspin { to { transform: rotate(360deg); } }
.savedmodal h2 { margin: 0; font-size: 25px; letter-spacing: .03em; }
.savedmodal p { margin: 14px 0 26px; font-size: 22px; font-weight: 600; color: #536a87; line-height: 1.5; }
.savedmodal .primary { width: 100%; min-width: 0; min-height: 52px; border-radius: 12px; font-size: 15px; }
.savedactions { display: grid; gap: 10px; }
.savedmodal .secondary {
  width: 100%; min-width: 0; min-height: 46px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: #355675;
  border-color: #ccd9e8; background: var(--button-fill); box-shadow: var(--button-shadow);
}
.savedmodal .secondary:hover { border-color: #9bb3cf; background: #edf3fa; }
.card, .historyrow { border-color: #dce5ef; box-shadow: 0 5px 18px #203e5d04; }
.historyrow > div { min-width: 0; }
.recordedat { display: block; margin-bottom: 9px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: #627c9b; }
.historyrow .details { line-height: 1.6; overflow-wrap: anywhere; }
.metric { border-color: #dce5ef; background: linear-gradient(145deg, #fff, #f4f8fd); }
.metric strong { color: #315576; }
.metric.emphasis { background: linear-gradient(135deg, #fffaf0, #f9efdb); border-color: #e7d4a9; }
.metric.emphasis strong { color: #a37b31; }
@media(max-width: 540px) {
  .shell { width: calc(100% - 28px); padding-top: 11px; }
  .brand { margin-bottom: 8px; gap: 8px; }
  .brandline { gap: 7px; }
  .brand h1 { font-size: 22px; }
  .brandline .brandsub { font-size: 14px; }
  .brandline .scope { font-size: 9px; padding: 3px 7px; }
  .brandactions { gap: 6px; }
  .sheetlink { width: 36px; min-height: 36px; padding: 8px; }
  .sheetlink svg { width: 17px; height: 17px; }
  .mocktag { padding: 4px 6px; font-size: 8px; }
  .tabs { margin-bottom: 7px; padding: 3px; border-radius: 12px; }
  .tabs button { min-height: 30px; }
  .entrycontext { gap: 5px; margin-bottom: 8px; }
  .compactdate { min-height: 48px; padding: 5px 12px; border-radius: 14px; gap: 8px; }
  .datecontrol { gap: 8px; }
  .compactdate input { max-width: 170px; min-height: 36px; padding: 0 2px; font-size: 16px; }
  .stafftrigger { min-height: 56px; gap: 9px; padding: 9px 12px; border-radius: 14px; }
  .staffavatar { width: 31px; height: 31px; border-radius: 10px; }
  .staffavatar svg { width: 15px; height: 18px; }
  .staffidentity { flex-direction: column; align-items: flex-start; gap: 1px; }
  .stafflabel { font-size: 9px; }
  #staffName { font-size: 19px; line-height: 1.3; }
  .staffchange { font-size: 10px; }
  .wizard { padding: 10px 9px; border-radius: 19px; }
  .wizardhead { padding-bottom: 8px; }
  .wizardhead > span:first-child { padding: 3px 8px; font-size: 9px; }
  .fieldblock { padding: 9px 7px; border-radius: 13px; }
  .fieldheading { margin-bottom: 7px; gap: 5px; }
  .fieldheading h2 { font-size: 12px; }
  .fieldnote { font-size: 9.5px; }
  .fieldnumber { width: 18px; height: 18px; font-size: 9px; }
  .visualplans { gap: 7px; }
  .visualplan { min-height: 92px; border-radius: 12px; padding: 6px 4px; gap: 4px; }
  .visualplan strong { font-size: 11px; }
  .visualplan .planart { width: 70px; height: 77px; margin: -13px 0 -14px; transform: scale(.64); }
  .peoplegrid { gap: 6px; }
  .peoplegrid button { min-height: 43px; border-radius: 10px; }
  .peoplegrid strong { font-size: 23px; }
  .peoplegrid .otherpeople .otherlabel { font-size: 11.5px; }
  .timechoices { gap: 7px; }
  .timechoice { min-height: 59px; gap: 4px; border-radius: 11px; }
  .timechoice strong { font-size: 23px; }
  .wizard .sourcechoice, .wizard .sourcechoice.on { padding: 10px 10px; gap: 8px; margin-bottom: 2px; }
  .sourcequestion { font-size: 12px; }
  .sourceoptions { gap: 6px; }
  .sourceoptions button { grid-template-columns: 43px 1fr; gap: 5px; min-height: 44px; padding: 7px 9px; border-radius: 10px; }
  .sourceoptions button strong { font-size: 14px; }
  .sourceoptions button span { font-size: 10.5px; }
  .savebar { padding: 9px 12px; margin-top: 8px; border-radius: 14px; }
  .savebar .primary { min-width: 163px; min-height: 46px; font-size: 13px; }
  .savebar b { font-size: 23px; }
  .savebar span { margin: 0 4px; }
  .savehint { display: block; margin: 3px 0 0; width: fit-content; font-size: 9px; }
  .add { margin-top: 8px; min-height: 38px; }
  .basketedit { gap: 7px; font-size: 11px; padding: 10px; }
  .basketstaff { font-size: 9px; }
}
@media(min-width: 600px) {
  .shell { padding: 10px 0 12px; }
  .brand { margin-bottom: 7px; }
  .brand h1 { font-size: 24px; }
  .sheetlink { width: 36px; min-height: 36px; padding: 8px; }
  .tabs { margin-bottom: 7px; padding: 3px; }
  .tabs button { min-height: 30px; }
  .entrycontext {
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.24fr);
    gap: 8px; margin-bottom: 7px; align-items: stretch;
  }
  .compactdate { min-height: 48px; padding: 4px 12px; border-radius: 14px; gap: 6px; }
  .datecontrol { gap: 8px; }
  .compactdate input { max-width: 185px; min-height: 36px; font-size: 16px; }
  .stafftrigger { min-height: 48px; padding: 6px 12px; border-radius: 14px; gap: 10px; }
  .staffavatar { width: 32px; height: 32px; border-radius: 10px; }
  .staffidentity { gap: 8px; flex: 1; }
  #staffName { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wizard { padding: 9px 11px; border-radius: 18px; }
  .wizardhead { padding: 0 3px 6px; }
  .wizard .sourcechoice, .wizard .sourcechoice.on {
    padding: 8px 10px; gap: 6px; margin-bottom: 4px; border-radius: 12px;
  }
  .sourcequestion { font-size: 13px; line-height: 1.4; }
  .sourceoptions { grid-template-columns: 1fr 1fr; gap: 7px; }
  .sourceoptions button {
    grid-template-columns: 46px 1fr; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 10px;
  }
  .sourceoptions button strong { font-size: 14px; white-space: nowrap; }
  .sourceoptions button span { font-size: 11px; line-height: 1.3; }
  .fieldblock { padding: 7px 8px; border-radius: 13px; }
  .fieldheading { margin-bottom: 6px; }
  .visualplans { gap: 8px; }
  .visualplan {
    min-height: 64px; flex-direction: row; justify-content: center;
    padding: 6px 10px; gap: 9px; border-radius: 12px;
  }
  .visualplan .planart {
    width: 70px; height: 77px; margin: -15px -15px;
    transform: scale(.58); transform-origin: center;
  }
  .visualplan strong { font-size: 14px; white-space: nowrap; }
  .fieldpair { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 8px; margin-top: 4px; align-items: stretch; }
  .peoplegrid { gap: 6px; grid-template-rows: repeat(3, minmax(40px, 1fr)); }
  .peoplegrid button { min-height: 40px; }
  .peoplegrid strong { font-size: 21px; }
  .peoplegrid .otherpeople .otherlabel { font-size: 12.5px; }
  .timechoices { grid-template-columns: 1fr; gap: 6px; }
  .timechoice {
    min-height: 39px; flex-direction: row; align-items: center; justify-content: center;
    gap: 4px; border-radius: 10px; padding: 4px 8px;
  }
  .timechoice strong { font-size: 20px; line-height: 1.1; }
  .timechoice span { font-size: 11px; padding-top: 2px; }
  .add { min-height: 36px; margin-top: 6px; }
  .savebar { margin-top: 6px; padding: 8px 12px; border-radius: 14px; }
  .savebar .primary { min-height: 44px; min-width: 185px; }
  .localnote { margin-top: 6px; }
  footer { padding: 6px 3px 0; }
}
@media(min-width: 600px) and (min-height: 920px) {
  .shell {
    min-height: 100vh;
    min-height: min(100dvh, 1020px);
    display: flex; flex-direction: column;
    padding: 16px 0 16px;
  }
  .brand { flex-shrink: 0; margin-bottom: 10px; }
  .brand h1 { font-size: 26px; }
  .sheetlink { width: 38px; min-height: 38px; padding: 8px; }
  .tabs { flex-shrink: 0; margin-bottom: 10px; padding: 3px; }
  .tabs button { min-height: 34px; font-size: 13px; }
  #entry:not([hidden]) { flex: 1; display: flex; flex-direction: column; }
  .entrycontext { flex-shrink: 0; gap: 10px; margin-bottom: 10px; }
  .compactdate, .stafftrigger { min-height: 54px; border-radius: 15px; }
  .staffavatar { width: 34px; height: 34px; border-radius: 11px; }
  #staffName { font-size: 19px; }
  #entryform { flex: 1; display: flex; flex-direction: column; }
  #wizard {
    flex: 1; display: flex; flex-direction: column;
    padding: 14px 15px; border-radius: 20px;
  }
  .wizardhead { flex-shrink: 0; padding: 0 4px 10px; }
  .wizard .sourcechoice, .wizard .sourcechoice.on {
    flex-shrink: 0; padding: 11px 13px; gap: 8px; margin-bottom: 8px; border-radius: 14px;
  }
  .sourcequestion { font-size: 14px; }
  .sourceoptions { gap: 9px; }
  .sourceoptions button { min-height: 48px; padding: 7px 12px; border-radius: 11px; }
  .sourceoptions button strong { font-size: 15px; }
  .sourceoptions button span { font-size: 12px; }
  #stepContent { flex: 1; display: flex; flex-direction: column; gap: 8px; }
  .fieldblock { padding: 10px 11px; border-radius: 14px; }
  [data-field="plan"] { flex: 1; display: flex; flex-direction: column; }
  .fieldheading { flex-shrink: 0; margin-bottom: 8px; }
  .fieldheading h2 { font-size: 13.5px; }
  .visualplans { flex: 1; }
  .visualplan { min-height: 76px; height: 100%; padding: 8px 12px; gap: 10px; border-radius: 13px; }
  .visualplan .planart { transform: scale(.66); margin: -13px -12px; }
  .visualplan strong { font-size: 15px; }
  .fieldpair { flex: 1.45; gap: 10px; margin-top: 0; align-items: stretch; }
  [data-field="people"], [data-field="duration"] { display: flex; flex-direction: column; }
  .peoplegrid { flex: 1; gap: 7px; grid-template-rows: repeat(3, minmax(46px, 1fr)); }
  .peoplegrid button { min-height: 46px; height: 100%; align-items: center; border-radius: 11px; }
  .peoplegrid strong { font-size: 24px; }
  .peoplegrid .otherpeople .otherlabel { font-size: 14px; }
  .timechoices { flex: 1; grid-template-columns: 1fr; grid-template-rows: repeat(3, minmax(46px, 1fr)); gap: 7px; }
  .timechoice { min-height: 46px; height: 100%; border-radius: 11px; padding: 6px 10px; }
  .timechoice strong { font-size: 22px; }
  .timechoice span { font-size: 12px; }
  .basket { flex-shrink: 0; }
  .add { flex-shrink: 0; min-height: 40px; margin-top: 10px; font-size: 13px; }
  .savebar { flex-shrink: 0; margin-top: 10px; padding: 11px 15px; border-radius: 15px; }
  .savebar .primary { min-height: 48px; min-width: 195px; font-size: 15px; }
  .localnote { flex-shrink: 0; margin-top: 9px; }
  footer { margin-top: auto; padding: 9px 3px 0; }
}
@media(prefers-reduced-motion: reduce) {
  .fieldblock, .visualplan, .visualplan .planart { transition: none; }
  .savespinner, .savebar.ready .primary:not(:disabled) { animation: none; }
}
.syncpill {
  min-height: 28px; padding: 4px 10px; font-size: 10px; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.syncpill.is-connected { background: #eaf5ee; border-color: #b7dec4; color: #24663c; }
.syncpill.is-syncing { background: #eef3fb; border-color: #bfd1ea; color: #365a82; }
.syncpill.is-error { background: #fdf0ee; border-color: #e6b8b0; color: #9b3d30; }
.refreshbtn {
  min-height: 34px; padding: 0 12px; font-size: 11px; font-weight: 600;
  border-radius: 10px; border: 1px solid #d7e1ee; background: var(--button-fill); color: #4e698a;
}
.historycontrols { display: flex; align-items: center; gap: 10px; }
.gasdialog .gasstatus { margin: 0 0 14px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.gasdialog input[type="url"] { width: 100%; font-size: 13px; }
.gasdialog .dialogactions .primary { min-width: 0; min-height: 46px; font-size: 14px; }
.peopledialog {
  width: min(calc(100vw - 36px), 340px); padding: 20px 18px 18px;
  border: 1px solid #dbe4ef; border-radius: 26px;
  background: linear-gradient(155deg, #fff 45%, #f3f7fe);
  box-shadow: 0 24px 70px #16294533;
}
.peopledialog::backdrop { background: #1829436e; backdrop-filter: blur(3px); }
.peopledialog .dialoghead { margin-bottom: 14px; }
.calcbrand { display: flex; align-items: center; gap: 9px; }
.calcbadge {
  display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 8px;
  border-radius: 10px; background: #e8f0fb; color: #365c85;
  font-size: 12px; font-weight: 750;
}
.calcbrand h2 { font-size: 17px; }
.calcdisplay {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 7px;
  padding: 11px 16px; margin-bottom: 14px;
  border: 1px solid #d8e2ef; border-radius: 16px; background: #f1f6fc;
  box-shadow: inset 0 2px 5px #1e35540a;
}
.calcvalue {
  font-size: 35px; font-weight: 750; font-variant-numeric: tabular-nums;
  line-height: 1.15; color: var(--ink);
}
.calcvalue[data-empty="true"] { color: #9eb0c6; font-size: 27px; font-weight: 650; }
.calcunit { font-size: 13px; font-weight: 650; color: #6e819b; }
.calckeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.calckey {
  min-height: 54px; border-radius: 15px; border: 1px solid #d9e3ef;
  background: var(--button-fill); box-shadow: inset 0 1px 0 #fff, 0 3px 6px #1c35560c;
  font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: transform .08s, background .12s, border-color .12s;
}
.calckey:active { transform: scale(.94); }
.calckey:hover { border-color: #b4c7de; }
.calckey.is-clear {
  background: linear-gradient(145deg, #fff6f8, #fce8ee); border-color: #efcbd7;
  color: #a8496f; font-size: 18px;
}
.calckey.is-back {
  background: linear-gradient(145deg, #f7faff, #e6eef8); border-color: #cddbeb;
  color: #476385; font-size: 19px;
}
.calcactions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; }
.calcreset {
  min-height: 48px; border-radius: 13px; border: 1px solid #d9e2ee;
  background: #f8fafd; color: #5f7591; font-size: 13px; font-weight: 600;
}
.calcactions .primary { min-width: 0; min-height: 48px; border-radius: 13px; font-size: 15px; }
