:root {
  color-scheme: light;
  --ink:#322820;
  --brand:#693a16;
  --paper:#f7f4ee;
  --card:#fffdfa;
  --rule:#ded6c9;
  --orange:#bd7b43;
  --muted:#71665c;
  --display:'STIX Two Text','Noto Serif CJK SC','Songti SC','SimSun',serif;
  font-family: 'DM Sans', 'Microsoft YaHei UI', 'PingFang SC', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.studio-title { padding: 22px 0 24px; }
#manage fieldset { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px,100%),1fr)); gap: 12px; border: 1px solid var(--rule); padding: 14px; margin: 10px 0; }
#manage legend { font-weight: 650; padding: 0 6px; }
#manage form { margin: 16px 0; }
#manage textarea, #manage select { max-width: 100%; font: inherit; padding: 8px; }
#manage pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#presenter { width: 110px; height: auto; border-radius: 12px; margin: 10px 0; }
#switch-store { max-width: min(230px,35vw); font: inherit; }
@media(max-width: 760px) {
  body:not(.signed-out) .masthead:has(#switch-store) { height:auto; min-height:64px; flex-wrap:wrap; padding-block:8px; }
}
.studio-title h1 { color: var(--brand); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.2; }
.studio-title p { margin-top: 8px; color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 20px; align-items: start; }
.studio-grid .panel { min-width: 0; margin: 0; }
.studio-grid .stack { margin-top: 18px; }
.studio-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.studio-grid select { font: inherit; padding: 8px; border: 1px solid var(--rule); background: white; }
.studio-grid input, .studio-grid select, .studio-grid textarea { width: 100%; min-width: 0; }
.studio-grid textarea { resize: vertical; padding: 8px; font: inherit; border: 1px solid var(--rule); }
.studio-grid [hidden] { display: none; }
#studio [hidden] { display:none; }
.campaign-assets { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr)); gap:16px; }
.campaign-assets article { min-width:0; padding:12px; border:1px solid var(--rule); }
.campaign-assets article img { width:100%; height:180px; object-fit:contain; background:#f6f2e9; }
.campaign-assets pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; }
.asset-preview img { display:block; max-width:min(82vw,860px); max-height:75vh; object-fit:contain; }
.poster-choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.poster-choices legend { margin-bottom: .5rem; }
.poster-choices > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 8px; }
.poster-choices label { position: relative; display: grid; grid-template-rows: 88px auto; gap: 4px; padding: 4px; border: 2px solid transparent; cursor: pointer; }
.poster-choices label:has(:checked) { border-color: var(--brand); }
.poster-choices label:focus-within { outline: 2px solid currentColor; }
.poster-choices input[type=radio] { position: absolute; top: 5px; left: 5px; width: 16px; height: 16px; min-height: 0; margin: 0; }
.poster-choices img { width: 100%; height: 88px; object-fit: contain; background-color: #f5f0e8; }
.poster-choices span { font-size: .8rem; line-height: 1.4; }
.studio-grid [data-status]:empty { display: none; }
.studio-preview [data-output] { margin-top: 16px; }
.studio-preview canvas { display: block; width: min(100%, 440px); height: auto; margin: 0 auto 20px; }
.studio-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 12px 0 20px; }
@media (max-width: 760px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  nav.tabs { flex-wrap: wrap; }
  nav.tabs button { white-space: nowrap; }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  padding: 9px 14px;
  border-radius: 3px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #eae6d9;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #ba4c19;
  outline-offset: 3px;
}
button.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
button.primary:hover {
  background: #0b2079;
}
h1,
h2,
p,
h3,
figure {
  margin: 0;
}
h2 {
  font-size: 1.35rem;
  letter-spacing: -0.045em;
}
a {
  color: var(--brand);
  font-weight: 650;
}
small,
.muted {
  font-size: 0.88rem;
  color: var(--muted);
}
.masthead {
  background: var(--ink);
  color: var(--paper);
  padding: 0 max(4vw, 20px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand,
.actions,
#account,
.datebar,
.panel-head,
.footer,
.tabs,
.commandbar,
.reconcile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-size: 1.17rem;
  letter-spacing: 0.05em;
}
.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  border-radius: 2px;
}
.brand-context {
  border-left: 1px solid #656670;
  padding-left: 15px;
  font-size: 0.82rem;
  color: #e2dfd6;
  letter-spacing: 0.08em;
}
#account {
  font-size: 0.84rem;
}
#account button {
  border-color: #a6a8b2;
  color: #fff;
  padding: 4px 10px;
}
#account button:hover {
  background: #383c4c;
}
main {
  width: min(1480px, 92vw);
  margin: 0 auto;
  padding-bottom: 36px;
}
.commandbar {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 15px 0;
  gap: 8px;
}
.tabs {
  gap: 0;
}
.tabs button {
  border: 0;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  padding: 8px 18px;
  font-size: 0.95rem;
}
.tabs .selected {
  color: var(--brand);
  border-color: var(--brand);
}
.datebar {
  gap: 8px;
  font-size: 0.84rem;
}
.datebar label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.datebar input,
.datebar button {
  padding: 5px 9px;
}
.spread-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 30%;
  background: var(--brand);
  color: #fff7df;
  border-bottom: 5px solid var(--orange);
}
.hero-title {
  padding: 22px clamp(20px, 3vw, 48px);
  align-self: center;
}
.hero-store {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: #e3e9ff;
}
.hero-title h1 {
  font-size: clamp(2.25rem, 4.7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1.05;
  margin: 7px 0 15px;
}
.hero-title h1 i {
  color: var(--orange);
  font-family: Georgia, serif;
  margin-left: 4px;
}
.hero-photo {
  background:
    linear-gradient(90deg, var(--brand), transparent 28%),
    url('/croissant.webp') center 57% / cover;
  min-height: 160px;
}
.pill,
.environment {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 99px;
}
.hero-title .pill {
  color: #e9ebff;
}
.hero-title .warn {
  color: #ffd8ac;
}
.actions {
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border: 1px solid var(--ink);
  border-top: 0;
}
.metric {
  padding: 14px clamp(12px, 2.3vw, 34px) 12px;
  border-right: 1px solid var(--rule);
}
.metric:last-child {
  border: 0;
}
.metric strong {
  display: block;
  font-family: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.065em;
  font-variant-numeric: tabular-nums;
}
.metric strong small {
  margin-left: 6px;
  font-size: 0.78rem;
  letter-spacing: 0;
}
.metric:first-child strong {
  color: var(--brand);
}
.reconcile-strip {
  gap: 14px;
  font-size: 0.91rem;
  min-height: 46px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  padding: 8px 0;
}
.reconcile-strip b {
  background: #ffcc9e;
  padding: 2px 7px;
  color: #50270d;
}
.reconcile-strip button {
  margin-left: auto;
  color: var(--brand);
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px 5px;
}
.panel {
  margin: 20px 0;
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 20px;
}
.panel-head {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-head h2,
.tools h2 {
  border-left: 5px solid var(--orange);
  padding-left: 10px;
}
.scroll {
  width: 100%;
  overflow: auto;
}
.scroll:focus-within {
  outline-offset: 1px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 11px 8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
th {
  font-size: 0.8rem;
  background: #ece9dd;
  color: #4a4b54;
  font-weight: 650;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.item-name {
  font-weight: 750;
}
.unit {
  display: block;
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--muted);
}
.num {
  text-align: right;
}
.number-alert {
  color: #9f361e;
  font-weight: 850;
  background: #ffdfbc;
}
.has-gap td:first-child {
  box-shadow: inset 3px 0 var(--orange);
  padding-left: 12px;
}
input {
  border: 1px solid #afa894;
  background: #fffefb;
  border-radius: 2px;
  padding: 8px 9px;
  color: var(--ink);
  max-width: 100%;
  font-size: 0.95rem;
}
input[type='number'] {
  width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
input[disabled] {
  color: #646463;
  background: #eeeae0;
}
td input[type='text'] {
  width: min(13vw, 175px);
}
label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer {
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  margin-top: 10px;
  padding-top: 12px;
}
.footer .primary {
  background: var(--ink);
  border-color: var(--ink);
}
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tools .panel {
  margin: 0;
}
.stack {
  display: grid;
  gap: 14px;
}
.tools h2 {
  margin-bottom: 14px;
}
.panel:has(> details) {
  background: transparent;
  margin: 12px 0;
  padding: 13px 17px;
  border-left: 0;
  border-right: 0;
}
summary {
  font-weight: 650;
  cursor: pointer;
}
details[open] > form,
details[open] > .scroll,
details > p {
  margin-top: 13px;
}
.hint {
  font-size: 0.87rem;
  background: #f0eee2;
  padding: 10px 13px;
  margin-top: 12px;
}
footer {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  margin-top: 16px;
}
.signed-out {
  background: var(--paper);
}
.signed-out .masthead {
  height: 60px;
}
.signed-out #main {
  width: 100%;
  padding: 0;
}
.entry-spread {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  min-height: calc(100svh - 60px);
}
.entry-cover {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: var(--brand);
}
.entry-cover img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center 57%;
}
.entry-cover figcaption {
  position: absolute;
  inset: 5% 7% auto;
  color: #fff3cf;
  display: grid;
  gap: 3px;
}
.entry-cover figcaption > span {
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.entry-cover strong {
  font-family: 'STIX Two Text', 'Songti SC', 'SimSun', serif;
  font-size: clamp(3.3rem, 6.7vw, 7.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.08em;
  text-shadow: 0 2px 12px #0c1c7530;
}
.entry-cover strong span {
  color: var(--orange);
}
.login {
  display: grid;
  align-items: center;
  padding: 6vw;
  border-left: 9px solid var(--orange);
  background: var(--paper);
}
.login-inner {
  width: 100%;
  max-width: 420px;
  margin: auto;
}
.environment {
  color: #515464;
}
.login h1 {
  font-size: clamp(2.1rem, 3.3vw, 3.6rem);
  letter-spacing: -0.08em;
  line-height: 1.18;
  margin: 19px 0 32px;
}
.login input {
  padding: 13px 12px;
  width: 100%;
  border: 1px solid #8d897d;
  background: #fffcf4;
}
.login .primary {
  padding: 14px;
  margin-top: 5px;
}
.demo-accounts {
  margin-top: 27px;
  border-top: 1px solid var(--rule);
  padding-top: 17px;
}
.demo-accounts h2 {
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 9px;
}
.demo-accounts button {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-color: var(--rule);
}
#notice {
  position: fixed;
  z-index: 5;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92vw;
  padding: 11px 20px;
  background: var(--ink);
  color: white;
  box-shadow: 4px 4px 0 var(--orange);
  border-radius: 2px;
}
#notice.error {
  background: #94351f;
}
@media (min-width: 1650px) {
  .entry-cover img {
    object-position: center 51%;
  }
  .login-inner {
    max-width: 470px;
  }
}
@media (max-width: 800px) {
  .masthead {
    padding: 0 4vw;
  }
  .brand-context {
    display: none;
  }
  main {
    width: 94vw;
  }
  .commandbar {
    align-items: flex-start;
  }
  .datebar {
    margin-left: auto;
  }
  .tabs button {
    padding: 7px 10px;
  }
  .hero-title {
    padding: 18px;
  }
  .hero-photo {
    min-height: 128px;
  }
  .metric {
    padding: 12px;
  }
  .panel {
    padding: 15px;
  }
  .tools {
    grid-template-columns: 1fr;
  }
  .entry-spread {
    grid-template-columns: 0.92fr 1fr;
  }
  .login {
    padding: 5vw;
  }
  .entry-cover {
    min-height: 450px;
  }
  .reconcile-strip {
    gap: 7px;
  }
}
@media (max-width: 590px) {
  .masthead {
    height: 54px;
  }
  .brand {
    font-size: 1rem;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
  }
  #account {
    font-size: 0.75rem;
    gap: 6px;
  }
  main {
    width: 94vw;
  }
  .signed-out .masthead {
    height: 48px;
  }
  .entry-spread {
    display: block;
    min-height: 0;
  }
  .entry-cover {
    height: 27svh;
    min-height: 155px;
    max-height: 235px;
  }
  .entry-cover img {
    object-position: center 54%;
  }
  .entry-cover figcaption {
    inset: auto auto 13px 6%;
  }
  .entry-cover strong {
    font-size: 3.3rem;
  }
  .login {
    border-left: 0;
    border-top: 5px solid var(--orange);
    padding: 22px 7vw 32px;
  }
  .login h1 {
    margin: 9px 0 16px;
    font-size: 2.1rem;
  }
  .demo-accounts {
    margin-top: 18px;
  }
  .commandbar {
    gap: 8px;
    padding: 10px 0;
  }
  .tabs {
    width: 100%;
    justify-content: space-between;
  }
  .tabs button {
    flex: 1;
  }
  .datebar {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .spread-head {
    grid-template-columns: 1fr 32%;
  }
  .hero-title h1 {
    font-size: 2.6rem;
  }
  .hero-photo {
    min-height: 112px;
  }
  .hero-store {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric {
    padding: 8px 12px;
  }
  .metric strong {
    font-size: 2rem;
  }
  .reconcile-strip {
    font-size: 0.82rem;
  }
  .panel {
    padding: 12px;
    margin: 13px 0;
  }
  .panel-head {
    gap: 4px;
  }
  .panel-head h2 {
    font-size: 1.16rem;
  }
  .footer .actions {
    width: 100%;
    justify-content: flex-end;
  }
  #close .scroll {
    overflow: visible;
  }
  #close table,
  #close tbody {
    display: block;
  }
  #close thead {
    display: none;
  }
  #close tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    border-top: 2px solid var(--ink);
    padding: 10px 0 14px;
  }
  #close td {
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
    white-space: normal;
  }
  #close td:first-child {
    grid-column: span 2;
  }
  #close td:last-child {
    grid-column: 1/-1;
  }
  #close td:nth-child(n + 2)::before {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
  }
  #close td:nth-child(2)::before {
    content: '销量';
  }
  #close td:nth-child(3)::before {
    content: '制作';
  }
  #close td:nth-child(4)::before {
    content: '报损';
  }
  #close td:nth-child(5)::before {
    content: '实盘';
  }
  #close td:nth-child(6)::before {
    content: '备注';
  }
  #close input {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#workspace { display:grid; grid-template-columns:clamp(164px,15vw,222px) minmax(0,1fr); min-height:calc(100svh - 64px); }
#sidebar { background:#20283c; color:#fff; padding:24px 12px; }
#sidebar nav { position:sticky; top:14px; display:grid; gap:24px; }
#sidebar h2 { font:600 .78rem/1.8 system-ui,sans-serif; color:#b9c5da; letter-spacing:.1em; padding:0 12px 5px; }
#sidebar button { display:block; width:100%; text-align:left; color:#f2f2ef; border:0; border-radius:5px; padding:10px 12px; background:transparent; }
#sidebar button:hover { background:#343f57; }
#sidebar button[aria-current=page] { color:#18233c; background:#f6c788; font-weight:700; }
body:not(.signed-out) #main { width:100%; min-width:0; padding:0 clamp(12px,2.5vw,48px) 36px; }
.pagebar,.item-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:14px 0; }
.pagebar>span { color:var(--muted); font-size:.86rem; }.pagebar b { color:var(--ink); }
.item-filters { justify-content:flex-start; align-items:end; }
.item-filters label { display:grid; gap:4px; font-size:.86rem; }
.item-filters input,.item-filters select { max-width:100%; min-height:38px; }
#item-results { color:var(--muted); padding:.45em; font-size:.85rem; }
[hidden], #close tr[hidden] { display:none !important; }
#catalog-dialog { width:min(420px,94vw); max-height:90svh; overflow:auto; padding:24px; border:1px solid var(--ink); border-radius:8px; background:var(--paper); color:var(--ink); }
#catalog-dialog::backdrop { background:#18233c88; } [data-catalog-error] { color:#9b3119; }
#menu-toggle,.signed-out #sidebar { display:none; }.signed-out #workspace { display:block; }
@media (max-width:760px) {
  #workspace { display:block; }
  body:not(.signed-out) #menu-toggle { display:block; color:white; border-color:#798398; padding:6px 9px; }
  body:not(.signed-out) .masthead { position:sticky; top:0; z-index:10; }
  #sidebar { display:none; position:fixed; inset:0 auto 0 0; width:min(76vw,264px); z-index:15; overflow-y:auto; padding-top:28px; box-shadow:6px 0 24px #18233c36; }
  .menu-open #sidebar { display:block; }
  .menu-open #menu-toggle { position:fixed; right:12px; top:12px; background:var(--ink); }
  .menu-open #sidebar nav { position:static; }
  .pagebar .datebar { flex-wrap:wrap; }
  .item-filters label { min-width:0; flex:1 1 135px; }
}

.production-form { max-width:28rem; margin-top:1rem; }
.production-form button { justify-self:start; }

.closing-nav { margin: 1rem 0; }

/* 烘焙记忆 · 工作台品牌组件 */
body { font-size:15px; }
h1,h2,h3 { text-wrap:balance; }
h1,h2,.brand-name b { font-family:var(--display); }
h2 { color:#402c20; font-size:1.42rem; letter-spacing:.015em; }
h3 { font-size:1rem; }
button { border-color:#d3c6b7; border-radius:7px; background:#fffdfa; color:#483728; font-weight:600; }
button:hover { background:#f1e9dc; border-color:#bda78d; }
button.primary,.footer .primary { background:var(--brand); border-color:var(--brand); color:#fffaf3; }
button.primary:hover,.footer .primary:hover { background:#512c14; }
button:disabled { opacity:.57; cursor:default; }
:where(button,input,select,textarea,summary,a):focus-visible { outline:3px solid #a96321; outline-offset:2px; }
select,textarea,input,.studio-grid select,.studio-grid textarea,#manage select,#manage textarea {
  font:inherit; color:var(--ink); border:1px solid #cfc4b6; border-radius:6px;
  padding:8px 11px; background:#fffefa; max-width:100%;
}
label { color:#5f5043; font-size:.86rem; }
.masthead,.signed-out .masthead { height:70px; padding-inline:clamp(16px,2.3vw,36px); background:#fffdfa; color:var(--ink); border-bottom:1px solid var(--rule); }
.brand { gap:12px; }
.brand-mark { background:transparent; padding:0; width:46px; height:46px; }
.brand-name { display:grid; line-height:1.15; }
.brand-name b { font-size:22px; letter-spacing:.08em; }
.brand-name small { font:600 9px/1.5 Georgia,serif; letter-spacing:.28em; color:var(--brand); }
.brand-context { border-color:#d2c5b7; color:var(--muted); font-size:13px; }
#account { color:#67594d; }
#account button { background:#f8f4ee; color:#493727; border-color:#dacebd; }
#account button:hover { background:#eee4d6; }
#workspace { grid-template-columns:clamp(170px,15vw,220px) minmax(0,1fr); min-height:calc(100svh - 70px); }
#sidebar { background:#37261d; padding:26px 13px; }
#sidebar nav { gap:20px; }
#sidebar h2 { color:#cbb69e; font-size:11px; padding:2px 13px 7px; letter-spacing:.16em; }
#sidebar button { display:flex; align-items:center; gap:12px; line-height:1.4; min-height:41px; color:#eee4d8; border-radius:6px; padding:9px 13px; font-weight:500; }
#sidebar button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; flex:none; }
#sidebar button:hover { background:#493529; }
#sidebar button[aria-current=page] { background:#f2dfc3; color:#4f2f18; }
body:not(.signed-out) #main { max-width:1600px; padding-inline:clamp(16px,2.7vw,48px); }
.pagebar { min-height:62px; padding:12px 0; }
.pagebar>span,.datebar { font-size:12px; }
.datebar button,.datebar input { min-height:32px; font-size:12px; }
.spread-head { border:0; border-radius:11px; grid-template-columns:minmax(0,1fr) 34%; background:#523019; color:#fff6e4; }
.hero-title { z-index:1; padding:23px clamp(22px,3vw,48px); }
.hero-title h1,.studio-title h1,[data-page=monitoring] h1 { font:700 clamp(32px,3.3vw,54px)/1.15 var(--display); letter-spacing:.035em; margin:8px 0 14px; color:inherit; }
.hero-title h1 i { display:none; }
.hero-store { font-size:12px; color:#e4caaa; letter-spacing:.09em; }
.hero-title .pill,.pill { color:#705333; border:1px solid #d9cbbb; background:#faf4e8; border-radius:5px; font-size:12px; }
.hero-title .pill,.hero-title .warn { background:#fff4dc16; color:#fff1d9; border-color:#ffffff42; }
.hero-photo,.cover-photo { background-image:linear-gradient(90deg,#523019,transparent 40%),url('/poster-styles/cocoa.jpg'); background-size:cover,100% auto; background-position:center,center 61%; }
.hero-photo { min-height:145px; }
#main:is([data-page=closing],[data-page="closing/review"],[data-page=ledger]) .spread-head {
  background:none; color:var(--ink); border-radius:0; display:block;
}
#main:is([data-page=closing],[data-page="closing/review"],[data-page=ledger]) .hero-title { padding:0 0 12px; }
#main:is([data-page=closing],[data-page="closing/review"],[data-page=ledger]) .hero-photo { display:none; }
#main:is([data-page=closing],[data-page="closing/review"],[data-page=ledger]) .hero-store { color:var(--muted); }
#main:is([data-page=closing],[data-page="closing/review"],[data-page=ledger]) .hero-title .pill { color:#6e4926; background:#f3eadd; border-color:#d9cbbb; }
.studio-title { padding:4px 0 14px; }
.studio-title h1 { color:#472f1d; }
.metrics { margin-top:16px; gap:12px; background:none; border:0; }
.metric,.metric:last-child { padding:17px 18px; border:1px solid var(--rule); border-radius:9px; background:var(--card); }
.metric strong { font-family:var(--display); color:#4d3421; font-size:clamp(26px,2.5vw,40px); letter-spacing:0; line-height:1.16; margin:8px 0; overflow-wrap:anywhere; }
.metric .muted { color:#564438; font-weight:650; }
.metric small { font-size:11px; color:var(--muted); }
.reconcile-strip { margin-top:12px; border:1px solid #dbcdbb; border-radius:7px; padding:8px 13px; background:#f2eadc; }
.reconcile-strip b { color:#744921; background:transparent; padding:0; }
.panel { padding:clamp(16px,1.8vw,28px); border-radius:10px; background:var(--card); }
.panel-head h2,.tools h2 { padding-left:0; border:0; }
.panel:has(>details) { border:1px solid var(--rule); background:var(--card); }
.panel p + p,.panel h2 + p,.panel h3 + p { margin-top:8px; }
.panel p + .actions,.panel .scroll + p { margin-top:12px; }
table { font-size:14px; }
th { background:#f2ede5; color:#6b5544; font-weight:650; }
th,td { padding:11px 10px; border-bottom-color:#e7dfd4; }
tbody tr:hover { background:#fbf6ec; }
.hint { background:#f5efe4; border-radius:5px; color:#634f3d; }
#notice { background:#3d2c20; box-shadow:0 5px 18px #37221333; border-radius:7px; }
#notice.error { background:#8b321f; }
.closing-nav { gap:4px; width:fit-content; padding:4px; background:#ede5d8; border-radius:8px; margin:2px 0 16px; }
.closing-nav button { background:transparent; border:0; color:#665443; padding:8px 17px; min-height:36px; }
.closing-nav button[aria-current=page] { background:#fffdfa; color:#583117; box-shadow:0 1px 4px #4d2b151f; }
.production-sheet { display:grid; grid-template-columns:minmax(250px,1.4fr) minmax(180px,.8fr); gap:clamp(18px,4vw,60px); align-items:start; }
.production-form { max-width:37rem; }
.production-form :is(select,input) { width:100%; min-height:44px; }
.production-form input { text-align:left; }
.production-form button { min-width:140px; min-height:43px; }
.production-form [data-saved]:empty { display:none; }
.category-progress { background:#f6f0e5; border-radius:8px; padding:20px; }
.category-progress p { color:#745d48; margin:8px 0; }
.category-progress strong { font:700 36px/1 Georgia,serif; color:#5e381b; }
.category-progress progress { width:100%; height:7px; accent-color:#85532b; }
.category-progress dl { margin:15px 0 0; }
.category-progress dl>div { border-top:1px solid #dfd3c1; padding:8px 0; display:flex; justify-content:space-between; gap:8px; font-size:13px; }
.category-progress dd { margin:0; color:#735237; }
.studio-grid { grid-template-columns:minmax(0,1.25fr) minmax(240px,.82fr); gap:20px; }
.studio-editor { padding:0; overflow:hidden; }
.studio-grid #campaign { margin:0; gap:0; }
.brief-section { display:grid; gap:14px; padding:clamp(16px,1.8vw,26px); }
.brief-section + .brief-section { border-top:1px solid var(--rule); }
.brief-section h2 { margin-bottom:2px; }
.brief-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:end; }
.brief-fields>*,.studio-row>* { min-width:0; }
.brief-fields>.full-field { grid-column:1/-1; }
.brief-fields [name=name] { min-width:0; }
.brief-section>button:not(.primary) { justify-self:start; }
.brief-section .poster-choices>div { grid-template-columns:repeat(auto-fill,minmax(85px,1fr)); }
.poster-choices label { border-radius:6px; overflow:hidden; background:#f9f5ee; }
.poster-choices label:has(:checked) { background:#f3e4cd; }
.studio-preview { position:sticky; top:16px; }
.style-proof { border:1px solid #ded1bd; border-radius:6px; padding:16px; text-align:center; background:repeating-linear-gradient(45deg,#ede6da 0 1px,#f3ede2 1px 9px); }
.style-proof img { display:block; width:auto; height:auto; max-width:100%; max-height:min(45vh,400px); margin:0 auto; box-shadow:0 5px 14px #35241430; }
.style-proof figcaption { display:inline-block; margin-top:14px; background:#fffaf0; border:1px solid #d9ccba; padding:3px 9px; border-radius:4px; color:#674c35; font-size:12px; }
.campaign-assets article { display:grid; align-content:start; gap:10px; background:#fdfaf5; border-radius:8px; }
.campaign-assets article img { border-radius:4px; }
#main[data-page=monitoring] { padding-top:10px; }
#main[data-page=monitoring] .panel:first-child { border-top:3px solid var(--brand); }
#main[data-page=assistant] #presenter { float:left; margin:0 22px 10px 0; }
#main[data-page=assistant] #transcript+.actions { clear:both; margin:12px 0 18px; }
.assistant-knowledge { padding:clamp(20px,3vw,42px); border-top:3px solid var(--brand); }
.assistant-knowledge h2 { font-size:clamp(1.55rem,2.5vw,2rem); margin-bottom:16px; }
.assistant-knowledge textarea { display:block; width:100%; min-height:88px; padding:12px 14px; resize:vertical; font:inherit; }
.chat-presets { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.chat-presets:empty { display:none; }
#knowledge-answer:not(:empty) { max-height:min(50vh,480px); overflow:auto; padding:12px 4px; margin:12px 0; border-block:1px solid var(--rule); line-height:1.65; }
.chat-turn { display:grid; gap:8px; margin:0 0 14px; overflow-wrap:anywhere; }
.chat-question,.chat-reply { max-width:92%; width:fit-content; padding:10px 14px; border-radius:12px; }
.chat-question { justify-self:end; background:#ede0d1; color:#412d20; border-bottom-right-radius:3px; }
.chat-reply { background:#f7f3ed; border-bottom-left-radius:3px; }
.chat-wait { color:var(--brand); }
.assistant-knowledge #ask-knowledge .actions { justify-content:flex-end; }
.signed-out { background:#f7f2e8; }
.signed-out #main { margin:0 auto; padding:clamp(20px,4.2vw,68px); max-width:1520px; }
.entry-spread { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); min-height:clamp(540px,72vh,760px); background:var(--card); border:1px solid var(--rule); border-radius:14px; overflow:hidden; }
.entry-cover { min-height:0; background:#482b1a; display:grid; grid-template-rows:auto 1fr; align-content:start; }
.entry-cover::after { content:''; position:absolute; inset:13px; border:1px solid #e6c59666; pointer-events:none; }
.entry-cover figcaption { position:relative; inset:auto; padding:clamp(28px,4vw,65px) clamp(24px,4vw,58px) 0; color:#f9e6cb; grid-row:1; z-index:1; }
.entry-cover strong { color:#fff1d8; font-family:var(--display); font-size:clamp(40px,5.8vw,90px); letter-spacing:.045em; line-height:1.18; }
.entry-cover em { font:italic 25px/1.3 Georgia,serif; color:#dfbc90; }
.cover-photo { grid-row:2; min-height:210px; margin:0 4% 3%; background-image:linear-gradient(180deg,#482b1a 0%,transparent 14%,transparent 90%,#482b1a),url('/poster-styles/cocoa.jpg'); background-size:100% 100%,100% auto; background-position:center,center 64%; }
.login { padding:clamp(25px,4vw,70px); border:0; background:var(--card); }
.login h1 { color:#482d1c; letter-spacing:.02em; }
.login .environment { border:0; border-radius:4px; background:#f0e6d6; color:#755332; }
.login input { border-color:#d0c5b6; background:#fffdfa; }
@media(max-width:1000px) {
  .studio-grid { grid-template-columns:minmax(0,1.15fr) minmax(220px,.8fr); }
  .brief-fields { grid-template-columns:1fr; }
  .metrics { gap:8px; }
  .metric { padding:14px; }
}
@media(max-width:760px) {
  .masthead,.signed-out .masthead { height:57px; padding-inline:14px; }
  .brand { gap:7px; }
  .brand-mark { width:37px; height:37px; }
  .brand-name b { font-size:17px; }
  .brand-name small { font-size:8px; }
  body:not(.signed-out) #menu-toggle { color:#603919; background:#f6ecde; border-color:#d9cbb8; min-height:36px; }
  #sidebar nav { position:static; }
  #sidebar button { min-height:43px; }
  body:not(.signed-out) #main { padding-inline:14px; }
  .pagebar { min-height:45px; gap:6px; }
  .spread-head { grid-template-columns:minmax(0,1fr) 33%; }
  .hero-title { padding:17px; }
  .hero-title h1,.studio-title h1 { font-size:32px; }
  .hero-photo { min-height:108px; background-size:cover,auto 180%; }
  .metric,.metric:last-child,.metric:nth-child(2) { border:1px solid var(--rule); padding:12px; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric strong { font-size:28px; }
  .production-sheet,.studio-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .category-progress { padding:13px; }
  .category-progress dl { margin-top:8px; }
  .studio-preview { position:static; }
  .brief-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .signed-out #main { padding:14px; }
  .entry-spread { display:block; min-height:0; }
  .entry-cover { display:block; height:clamp(145px,26vh,220px); min-height:0; max-height:none; }
  .entry-cover::after { inset:8px; }
  .entry-cover figcaption { padding:24px 20px; }
  .entry-cover strong { font-size:38px; }
  .entry-cover em { font-size:18px; }
  .entry-cover figcaption>span { font-size:11px; }
  .cover-photo { position:absolute; inset:0 0 0 46%; margin:0; min-height:0; background-image:linear-gradient(90deg,#482b1a,transparent 34%),url('/poster-styles/cocoa.jpg'); background-size:cover,auto 195%; }
  .login { padding:23px 18px; }
}
@media(max-width:380px) {
  .brief-fields { grid-template-columns:1fr; }
  #account { gap:3px; }
  .brand-name b { font-size:15px; }
}

/* Shared field and action layout from the flagship OpenDesign project. */
#main { --control-height:42px; --field-gap:14px; }
#main :where(.panel,.stack,.field-pair,.form-grid,.tools,.brief-section,fieldset,label) { min-width:0; }
#main :where(form,.item-filters,.datebar) :is(input,select):not([type=checkbox],[type=radio],[type=hidden]) {
  height:var(--control-height); min-height:var(--control-height); min-width:0; max-width:100%;
  border-radius:7px; font-family:inherit; font-size:14px; line-height:1.4;
}
#main label > :is(input,select,textarea):not([type=checkbox],[type=radio]) { width:100%; }
#main select { text-overflow:ellipsis; }
#main input[type=file] { padding:4px; color:var(--muted); }
#main input[type=file]::file-selector-button {
  height:32px; margin-right:9px; padding:0 12px; border:0; border-radius:4px;
  background:#f0e6d7; color:#634224; font:inherit; cursor:pointer;
}
#main :is(.panel,.login,.datebar,.reconcile-strip,.commandbar) button {
  max-width:100%; min-height:40px; border-radius:7px; line-height:1.35;
}
#main button:disabled { cursor:not-allowed; }
#main .panel .actions,.form-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.form-actions { padding-top:14px; border-top:1px solid #e8dfd3; }
#main .form-actions a,.sample-link { display:inline-flex; align-items:center; min-height:40px; padding:5px 4px; font-size:14px; text-underline-offset:3px; }
#main .panel-head { flex-wrap:wrap; align-items:center; row-gap:8px; }
#main .panel-head > .muted { flex:0 1 auto; overflow-wrap:anywhere; }
#main .panel :is(.stack,.brief-section) > button { justify-self:start; }
#main :is(.form-grid,.field-pair) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:var(--field-gap); }
#main .form-grid > :is(h2,p,details,.wide-field,.form-actions,.sample-link,label:has(textarea),label:has(input[type=checkbox])) { grid-column:1/-1; }
#main .form-grid > button { justify-self:start; grid-column:1/-1; }
#main .form-grid > .sample-link { justify-self:start; }
#main .form-grid label:has(> input[type=checkbox]) { display:flex; gap:8px; align-items:center; width:fit-content; min-height:32px; }
#main input[type=checkbox] { width:16px; height:16px; padding:0; accent-color:var(--brand); }
#main .form-grid textarea { width:100%; resize:vertical; min-height:86px; }
#main .form-grid > [role=alert]:empty,.chat-presets:empty { display:none; }
#main .item-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:12px; }
#item-results { align-self:end; padding-bottom:10px; font-size:.84rem; color:var(--muted); }
#main .datebar { align-items:end; flex-wrap:wrap; }
#main .datebar label { align-items:center; flex:none; white-space:nowrap; }
#main .datebar label > input { width:9.4rem; }
#main .datebar button { min-height:var(--control-height); }
#main .reconcile-strip button { text-decoration:none; padding:6px 12px; border:1px solid #d9c9b7; }
#main td:has(> button) { white-space:nowrap; }
#main td > button { min-height:34px; padding:5px 10px; font-size:13px; }
#main td > button + button { margin-left:3px; }
#main .ledger-tools { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
.ledger-tools > .panel { display:flex; flex-direction:column; }
.ledger-tools form { flex:1; align-content:space-between; gap:16px; }
#main .ledger-tools .form-actions { margin:0; }
#pos { padding-top:16px; }
#pos pre { overflow:auto; max-width:100%; }
#manage fieldset { align-items:end; border-radius:8px; background:#faf7f1; }
#manage fieldset input[type=number] { width:100%; text-align:start; }
#manage fieldset button { justify-self:start; }
#manage .form-actions .primary:not(:first-child) { margin-inline-start:auto; }
#manage :is(#branch,#account-new,#access) { padding-top:18px; border-top:1px solid var(--rule); }
#catalog-dialog { width:min(520px,94vw); border-color:var(--rule); border-radius:12px; background:var(--card); }
#catalog-dialog .form-actions { justify-content:flex-end; }
#main .production-form { max-width:none; }
#main .production-form > label:has([name=made]) { max-width:18rem; }
#main .production-form input[name=made] { text-align:left; }
#main [data-search] { align-items:center; }
#main [data-search] input { flex:1 1 12rem; min-width:0; }
#main .assistant-knowledge form { gap:8px; }
#main .assistant-knowledge .actions button { padding-inline:24px; }
#main .chat-presets button { text-align:start; }
#sidebar .sidebar-subpages { display:grid; gap:3px; margin:0 0 5px 21px; border-left:1px solid #705845; padding-left:8px; }
#sidebar .sidebar-subpages button { font-size:13px; min-height:36px; padding:7px 11px; }
.asset-library { container-type:inline-size; }
.library-heading,.library-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.library-heading { justify-content:space-between; }
.library-toolbar { flex-wrap:nowrap; gap:8px; }
.library-toolbar input { width:min(24vw,260px); }
.asset-tabs {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:min(100%,23rem);
  gap:3px; padding:4px; margin-bottom:12px; border:1px solid #d8c6af; border-radius:10px; background:#efe6da;
}
#main .asset-tabs button { min-width:0; min-height:42px; padding:8px 4px; border:0; border-radius:7px; background:transparent; color:#57412d; white-space:nowrap; }
#main .asset-tabs button:hover { background:#fff9ef; }
#main .asset-tabs button[aria-selected=true] { background:var(--brand); color:#fffaf2; }
.asset-results { min-width:0; min-height:48vh; padding:clamp(14px,2vw,26px); border:1px solid var(--rule); border-radius:10px; background:var(--card); }
.asset-results-head { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:12px; margin-bottom:18px; }
.asset-results-head [data-count] { color:var(--muted); font-size:14px; }
.asset-results .campaign-assets {
  display:grid; align-items:stretch; gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,390px),1fr));
}
.asset-results .asset-card {
  display:grid; grid-template-rows:1fr auto; align-content:start;
  gap:0; min-width:0; padding:0; border:1px solid #ded2c3; border-radius:10px;
  background:#fffdfa; overflow-wrap:anywhere;
}
.asset-card-main { min-width:0; display:grid; align-items:start; gap:14px; padding:14px; }
.asset-card-main:has(.asset-thumbnail) { grid-template-columns:minmax(0,46fr) minmax(0,54fr); }
.asset-results[aria-labelledby="asset-tab-poster"] .asset-card-main { grid-template-columns:minmax(0,var(--poster-share,56fr)) minmax(0,var(--caption-share,44fr)); }
#main .asset-card .asset-thumbnail {
  width:100%; height:clamp(190px,16vw,220px); margin:0; padding:2px; overflow:hidden;
  border:1px solid #e5d9ca; border-radius:6px; background:#f5eee3; cursor:zoom-in;
}
.asset-results .asset-thumbnail img { display:block; height:100%; width:100%; object-fit:contain; background:transparent; }
.asset-results[aria-labelledby="asset-tab-poster"] .asset-thumbnail img { object-fit:cover; object-position:50% 42%; }
.asset-card-info { min-width:0; }
.asset-card-info h3 { font-size:18px; line-height:1.4; margin:0; }
.asset-card-info small { display:block; margin-top:4px; color:var(--muted); font-size:12px; }
.asset-card-info pre { margin:12px 0 0; font:inherit; font-size:14px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.asset-card-info details { margin-top:8px; }
.asset-card-info summary { width:fit-content; cursor:pointer; color:var(--brand); font-size:13px; }
.asset-card-info:has(details[open]) > .asset-excerpt { display:none; }
.asset-card-tools { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; padding:10px 14px; border-top:1px solid #ede4d8; }
#main .asset-card-tools .asset-action {
  box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; gap:5px;
  margin:0; padding:6px 10px; min-height:34px; border:1px solid #d9cab6; border-radius:6px;
  background:#fffdfa; color:#59412a; text-decoration:none;
  font-family:inherit; font-size:13px; font-weight:600; line-height:1.3; white-space:nowrap;
}
#main .asset-card-tools .asset-action:hover { border-color:#b59a78; background:#f4ebdd; }
#main .asset-card-tools .asset-action-main { color:#fffaf1; background:var(--brand); border-color:var(--brand); }
#main .asset-card-tools .asset-action-main:hover { background:#512c14; }
#main .asset-card-tools .asset-action-quiet { color:#725942; border-color:transparent; background:transparent; }
#main .asset-card-tools .asset-action-quiet:hover { background:#f4ebdd; }
@container(max-width:480px) {
  .asset-results { --poster-share:52fr; --caption-share:48fr; }
  .asset-card-main { padding:12px; gap:10px; }
  .asset-card-main:has(.asset-thumbnail) { grid-template-columns:minmax(0,44fr) minmax(0,56fr); }
  #main .asset-card .asset-thumbnail { height:clamp(138px,42cqw,178px); }
  .asset-card-info h3 { font-size:16px; }
  .asset-card-tools { padding:8px; gap:4px; }
  #main .asset-card-tools .asset-action { min-height:40px; padding-inline:7px; }
}
.asset-status:empty { display:none; }
@container(max-width:340px) {
  .asset-results[aria-labelledby="asset-tab-poster"] { --poster-share:46fr; --caption-share:54fr; }
  .asset-results[aria-labelledby="asset-tab-poster"] .asset-card-main { padding-inline:8px; gap:8px; }
}
.asset-status:not(:empty) { padding:clamp(36px,6vw,80px) 16px; text-align:center; color:var(--muted); border:1px dashed var(--rule); border-radius:8px; }
.asset-results [data-more] { margin-top:16px; }
@container(max-width:480px) {
  .library-toolbar { width:100%; min-width:0; }
  #main .library-toolbar input { flex:1; min-width:0; }
  .asset-results-head { gap:8px; }
}
#main .chat-reply button { margin:3px 4px 3px 0; }
#main .studio-row { grid-template-columns:minmax(0,1.6fr) minmax(65px,1fr); align-items:end; }
#main .brief-section { container-type:inline-size; }
@container (max-width:440px) { .brief-fields { grid-template-columns:minmax(0,1fr); } }
#main .brief-section > .primary { padding-inline:20px; }
#main .footer .actions,#holiday { align-items:end; }
#main .footer .actions > label,#holiday label { flex:1 1 180px; }
@media(max-width:900px) {
  #main .item-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  #main { --control-height:44px; --field-gap:12px; }
  #main :is(.panel,.login,.datebar,.reconcile-strip) button { min-height:44px; }
  #main .pagebar .datebar { margin-left:auto; }
  #main .ledger-tools { grid-template-columns:minmax(0,1fr); }
  #main .ledger-tools .panel { margin:0; }
  #main .footer .actions { justify-content:flex-start; }
  #main .closing-nav { display:inline-flex; max-width:100%; flex-wrap:wrap; }
}
@media(max-width:520px) {
  #main :is(.form-grid,.field-pair) { grid-template-columns:minmax(0,1fr); }
  #main .panel-head { align-items:flex-start; }
  #main .pagebar { align-items:flex-start; gap:8px; }
  #main .pagebar .datebar { margin-left:0; }
  #main .reconcile-strip { column-gap:8px; }
}
@media(max-width:590px) {
  #close tr { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
  #close td:first-child,#close td:last-child { grid-column:1/-1; }
  #close td input[type=text],#close td input[type=number] { width:100%; }
  #main .footer .actions > button { flex:1 1 auto; }
  #main .footer .actions > label { flex-basis:100%; }
}
