/* Review layout (owner chose layout A with parts of B and C, 2026-11-05): side by side. One window, source pane left (sticky), review pane right. */
.lay-review .intro { max-width: 90rem; padding-left: clamp(1rem, 3vw, 2rem); padding-right: clamp(1rem, 3vw, 2rem); }
.desk { display: grid; grid-template-columns: minmax(20rem, 4fr) minmax(0, 7fr); margin-bottom: clamp(2.5rem, 6vw, 4.5rem); background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: clip; }
.pane { min-width: 0; }
.bar { display: flex; align-items: center; gap: .75rem; min-height: 3.25rem; padding: .6rem 1.1rem; border-bottom: 1px solid var(--line); }
.bar-name { font-size: .9375rem; font-weight: 700; }

/* source pane */
.src { position: sticky; top: 3.75rem; display: flex; flex-direction: column; height: calc(100dvh - 3.75rem); max-height: 64rem; background: var(--surface-2); border-right: 1px solid var(--line); }
.src-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--ink-3); }
.zoom { margin-left: auto; display: none; gap: .25rem; }
.js body[data-src="image"] .zoom { display: inline-flex !important; }
.zb { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .55rem; border: 0; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .75rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.zb:hover { box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); }
.zb .ico { width: .9rem; height: .9rem; }
.ask { display: grid; align-content: start; gap: 1rem; padding: 1.25rem; overflow: auto; }
body:is([data-state="idle"], [data-state="error"]) .src { height: auto; }
.ask .drop { min-height: 16rem; }
.viewer { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable both-edges; padding: 1rem; background: var(--canvas); }
.viewer img { display: block; width: 100%; max-width: none; margin: 0 auto; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.viewer[data-zoom="in"] { cursor: grab; }
.viewer iframe { display: block; width: 100%; height: 100%; min-height: 30rem; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.sheet-src { padding: 1rem; color: var(--ink-2); font-size: .875rem; }
.src-foot { padding: .75rem 1rem; border-top: 1px solid var(--line); }
.src-foot .btn { width: 100%; }

/* review pane */
.review { display: flex; flex-direction: column; }
.review .bar { flex-wrap: wrap; row-gap: .4rem; }
.roles { display: flex; gap: .3rem; margin-left: auto; }
.state { display: flex; }
.review > .notice { margin: 1rem 1.25rem 0; }
.empty { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2rem; padding: 1.5rem 1.25rem 2rem; }
.empty div { padding-top: .9rem; border-top: 2px solid var(--line); }
.empty div:nth-child(1) { border-top-color: var(--ink); }
.empty div:nth-child(2) { border-top-color: var(--pink); }
.empty div:nth-child(3) { border-top-color: var(--violet); }
.empty div:nth-child(4) { border-top-color: var(--cobalt); }
.empty dt { font-weight: 700; font-size: .9375rem; margin-bottom: .3rem; }
.empty dd { margin: 0; color: var(--ink-2); font-size: .9375rem; max-width: 30em; }
.review:has(#result:not([hidden])) .empty { display: none; }
.result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; padding: 1.25rem 1.25rem 0; }
.src-note { padding: .65rem .85rem; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: .875rem; }
.sec h3, .checks h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.cnt { font-size: .75rem; font-weight: 700; color: var(--ink-3); }

/* what to check, first */
.checks { padding: .9rem; border-radius: 14px; background: var(--canvas); }
.checks h3 { color: var(--ink); font-size: .9375rem; }
.checks h3 .cnt { margin-left: auto; color: var(--amber); }
.ck-list { display: grid; gap: .35rem; }
.ck { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ck-box { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; cursor: pointer; }
.ck-go { display: grid; gap: .1rem; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.ck-go b { font-size: .875rem; font-weight: 700; }
.ck-go span { font-size: .8125rem; color: var(--amber); }
.ck-go:hover b { color: var(--cobalt); }
.ck-side { display: grid; justify-items: end; gap: .35rem; }
.ck-fix { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.9rem; padding: 0 .6rem; border: 0; border-radius: 8px; background: var(--canvas); color: var(--ink-2); font-size: .75rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.ck-fix:hover { background: var(--cobalt-soft); color: var(--cobalt-2); }
.ck-fix .ico { width: .85rem; height: .85rem; }
.ck .names { grid-column: 1 / -1; margin-top: .35rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.names li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) auto 2.1rem; align-items: center; gap: .6rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.nm-n { font-size: .75rem; font-weight: 700; color: var(--ink-3); text-align: right; }
.nm { display: grid; min-width: 0; font-size: .875rem; }
.nm b { font-weight: 600; }
.nm small { font-size: .75rem; color: var(--ink-3); }
.nm-a { font-size: .8125rem; color: var(--ink-2); white-space: nowrap; }
.nm-up { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 0; border-radius: 8px; background: var(--canvas); color: var(--ink-2); cursor: pointer; }
.nm-up:hover { background: var(--cobalt-soft); color: var(--cobalt); }
.nm-up .ico { width: .9rem; height: .9rem; }
.names .hint { margin-top: .5rem; }
.ck-by { font-size: .6875rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: var(--violet-soft); color: var(--violet); }
.ck-always .ck-by { background: var(--pink-soft); color: var(--pink); }
.ck.is-ok { background: transparent; box-shadow: none; }
.ck.is-ok .ck-go span { color: var(--ink-3); }
.ck.is-ok .ck-go b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }

.flds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.flds .fld-supplier, .flds .fld-buyer { grid-column: span 1; }
.flds-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: .75rem; }
.grid-wrap { overflow-x: auto; margin: 0 -.25rem; padding: 0 .25rem; }
.grid .is-flag.g-row { background: none; }
.add { margin-top: .4rem; }
.memo { font-size: .875rem; color: var(--ink-2); margin-top: .75rem; }
.memo b { margin-right: .4rem; color: var(--ink); }

/* export bar: sticks to the bottom of the pane while the table scrolls */
.export { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 -1.25rem; padding: .85rem 1.25rem; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.ex-left { display: grid; gap: .1rem; font-size: .8125rem; color: var(--ink-3); }
.ex-left b { font-size: .9375rem; color: var(--amber); }
.ex-left b.is-clear { color: var(--green-text); }
.ex-col { display: inline-flex; align-items: center; gap: .4rem; margin-top: .3rem; font-size: .8125rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }

@media (max-width: 1180px) {
  .flds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .desk { grid-template-columns: 1fr; }
  .src { position: relative; top: 0; height: auto; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .viewer { height: min(52vh, 26rem); flex: none; }
  .ask .drop { min-height: 11rem; }
  .roles { margin-left: 0; order: 3; width: 100%; }
}
@media (max-width: 560px) {
  .wrap-wide { padding: 0; }
  .ck { grid-template-columns: auto minmax(0, 1fr); }
  .ck-side { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
  .export { flex-wrap: wrap; }
  .export .btn { width: 100%; }
  .desk { border-radius: 0; box-shadow: 0 0 0 1px var(--line); }
  .empty { grid-template-columns: 1fr; }
  .flds, .flds-3 { grid-template-columns: 1fr 1fr; }
  .flds .fld-type, .flds .fld-no { grid-column: span 1; }
  .result { padding: 1rem 1rem 0; }
  .export { margin: 0 -1rem; padding: .75rem 1rem; }
  .export .btn { flex: 0 0 auto; }
}
@media print {
  .src, .checks, .export, .add, .g-del, .g-st { display: none !important; }
  .desk { display: block; box-shadow: none; }
}
