:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #171a17;
  background: #f5f5f3;
  color-scheme: light;
  --ink: #171a17;
  --muted: #555951;
  --line: #d8dad5;
  --accent: #aac217;
  --green: #4a6200;
  --pale: #eef3d9;
  --red: #cf0011;
  --radius: 14px;
  --sidebar: 258px;
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-width: 300px }
button, select, input, textarea { font: inherit }
button, select { cursor: pointer }
button { color: inherit }
button:disabled { cursor: default; opacity: .55 }
.print-actions { border: 0; padding: 0; margin: 0; min-width: 0 }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid #587600; outline-offset: 3px }
h1, h2, h3, p { margin-top: 0 }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.028em }
h1 { font-size: clamp(2.15rem, 4.2vw, 3.65rem); margin-bottom: 0 }
h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); margin-bottom: .8rem }
h3 { font-size: 1.15rem; margin-bottom: .55rem }
p { line-height: 1.52 }
a { color: inherit }
.icon { width: 1.3em; height: 1.3em; flex: none }
.icon.large { width: 2.8rem; height: 2.8rem }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap }
.skip:focus { clip-path: none; width: auto; height: auto; top: .7rem; left: .7rem; padding: .6rem 1rem; background: #fff; z-index: 9 }
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh }
.sidebar { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; min-height: 100dvh; padding: 1.35rem .8rem .85rem; background: #fff }
.brand { display: flex; width: 100%; align-items: center; gap: .4rem; padding: 0 .35rem .8rem; margin-bottom: 1.65rem; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 1.31rem; letter-spacing: -.025em; font-weight: 800 }
.brand-mark { display: grid; place-items: center; height: 3.45rem; font: 3.2rem/1 "Segoe UI Symbol", serif }
.nav { display: grid; gap: .36rem }
.nav button { display: flex; align-items: center; min-height: 52px; gap: .9rem; border: 0; border-radius: 10px; background: transparent; padding: .8rem .92rem; text-align: left; font-size: 1.12rem }
.nav button:hover { background: #f1f4e7 }
.nav button[aria-current="page"] { background: var(--accent); font-weight: 750 }
.nav .icon { width: 1.65rem; height: 1.65rem }
.connection { margin-top: auto; padding: 1rem .5rem .1rem; font-size: .85rem; color: var(--muted) }
#main { width: 100%; min-width: 0; max-width: 1650px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.25rem; margin-bottom: 1.22rem }
.badge { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: .34rem; padding: .34rem .62rem; border-radius: 8px; background: #eceeea; color: #3d423a; font-size: .91rem; font-weight: 700 }
.badge.ok { background: var(--pale); color: var(--green) }
.badge.local { background: #e8efc4; color: var(--ink) }
.badge.warning { background: #fff0cf; color: #803900 }
.badge.error { background: #fae6e7; color: #91071c }
.button { display: inline-flex; width: max-content; max-width: 100%; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .65rem .9rem; background: #fff; border: 1px solid #babeb5; border-radius: 9px; font-weight: 690; line-height: 1.25; text-align: center; text-decoration: none }
.button:not(:disabled):hover { background: #f4f6eb }
.button.primary { background: var(--red); border-color: var(--red); color: #fff }
.button.primary:not(:disabled):hover { background: #ac0011 }
.button.green { background: #f8fbe8; border-color: #93ae12; color: var(--green) }
.button.danger { color: #a50016 }
.button.small { padding: .43rem .6rem; min-height: 34px; font-size: .9rem }
.button.upload { font-size: 1.2rem; padding: .75rem 1.15rem; min-height: 49px }
.row, .actions, .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem }
.toolbar { justify-content: space-between; gap: .7rem; margin-bottom: 1rem }
.dashboard { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(245px,.96fr); gap: 1.35rem }
.dashboard-main { min-width: 0 }
.dashboard-main > .actions { margin-bottom: 1rem }
.drop { display: flex; align-items: center; justify-content: center; gap: 1rem; width: 100%; min-height: 124px; margin: 0 0 1rem; padding: 1rem; border: 1px dashed #9ca097; border-radius: var(--radius); background: #fff; text-align: left }
.drop:hover, .drop.drag { background: #f9fce9; border-color: #819400 }
.drop strong { display: block; margin-bottom: .25rem; font-size: 1.33rem }
.next { display: flex; flex-direction: column; min-width: 0; padding: clamp(1rem,2.3vw,1.5rem); border: 1px solid #98ad25; border-radius: var(--radius); background: #f7f8e9 }
.next h2 { font-size: clamp(1.7rem,3vw,2.45rem) }
.next .button { width: 100%; margin-top: auto; font-size: 1.08rem }
.illustration { display: block; width: min(100%,245px); max-height: 205px; margin: .1rem auto .95rem }
.motif { display: grid; place-items: center; overflow: hidden; height: 58px; border-radius: 7px; background: #f5f1e7 }
.motif svg { width: 100%; max-height: 48px }
.projects, .issue-list, .activity-list { list-style: none; margin: 0; padding: 0 }
.projects { display: grid; gap: .68rem }
.project-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .4rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius) }
.project-card.attention { background: linear-gradient(100deg,#fff 18%,#f1f4df) }
.project-open { min-width: 0; width: 100%; display: grid; grid-template-columns: 104px minmax(0,1fr) auto; align-items: center; gap: .8rem; padding: .66rem .72rem; background: transparent; border: 0; text-align: left; border-radius: var(--radius) }
.project-open:hover { box-shadow: inset 0 0 0 1px #aabb66 }
.project-open h3 { overflow-wrap: anywhere; margin: 0 0 .3rem; font-size: 1.25rem }
.project-extra { padding: .5rem .65rem .5rem 0 }
.recent { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: 1.15rem }
.recent h2 { margin: 0; font-size: 1.3rem }
.recent > .button { margin-left: auto }
.panel, .empty { padding: clamp(.8rem,2.1vw,1.2rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0 }
.panel > :last-child, .empty > :last-child { margin-bottom: 0 }
.empty, .muted, .meta { color: var(--muted) }
.meta { margin: .35rem 0 0; font-size: .84rem }
.stack { display: grid; gap: 1rem; min-width: 0 }
.tabs { display: flex; gap: .4rem; overflow: auto; padding-bottom: .5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line) }
.tabs button { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; border-radius: 8px; white-space: nowrap; padding: .6rem .7rem }
.tabs button:hover, .tabs button[aria-current="page"] { background: var(--pale); color: var(--green) }
.tabs button[aria-current="page"] { font-weight: 700 }
.grid-two, .editor { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; align-items: start }
.editor { grid-template-columns: minmax(0,1.5fr) minmax(260px,.85fr) }
.fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(155px,100%),1fr)); gap: .75rem }
.field { display: grid; gap: .33rem; font-weight: 650; align-content: start; min-width: 0 }
.field small { font-weight: 400; color: var(--muted) }
.field input, .field select, .field textarea { min-height: 40px; width: 100%; padding: .55rem .6rem; border: 1px solid #b1b7a9; border-radius: 8px; color: var(--ink); background: #fff }
.field textarea { min-height: 5rem }
.arrangement-section { min-width: 0; margin: 0; padding: .8rem 1rem 1rem; border: 1px solid var(--line); border-radius: 9px }
.arrangement-section legend { padding: 0 .4rem; font-weight: 700 }
.arrangement-proof { margin-top: 1rem; scroll-margin-top: 1rem }
.arrangement-page { position: relative; container-type: inline-size }
.arrangement-page > span { position: absolute; max-width: 85%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #404040; font: 1.51cqw/1 Arial, sans-serif }
.arrangement-running-title { top: 2.19cqw; left: 5.88% }
.arrangement-running-footer { bottom: 3.2cqw; left: 5.88% }
.arrangement-page-number { bottom: 3.2cqw; right: 5.88% }
.arrangement-running-footer.unreviewed { color: #a8130d }
@page arrangement-a4 { size: A4 portrait; margin: 0 }
@page arrangement-a5 { size: A5 landscape; margin: 0 }
@media print {
  body:has([data-arr-pages]) { background: white }
  body:has([data-arr-pages]) > :not(.shell),
  .shell:has([data-arr-pages]) > :not(main),
  #main:has([data-arr-pages]) > :not([data-arr-proof]),
  [data-arr-proof] > :not([data-arr-pages]) { display: none !important }
  .shell:has([data-arr-pages]), #main:has([data-arr-pages]), [data-arr-proof], [data-arr-pages] {
    display: block; margin: 0; max-width: none; min-height: 0; padding: 0; border: 0; box-shadow: none
  }
  [data-arr-pages="a4"] .arrangement-page { page: arrangement-a4; height: 297mm; width: 210mm }
  [data-arr-pages="a5"] .arrangement-page { page: arrangement-a5; height: 148mm; width: 210mm }
  .sheet.arrangement-page { overflow: hidden; margin: 0; padding: 0; border: 0; border-radius: 0; break-inside: avoid }
  .arrangement-page + .arrangement-page { break-before: page }
  .arrangement-page img { height: 100%; width: 100%; object-fit: contain }
}
.check { display: flex; align-items: center; gap: .45rem }
@media print {
  .arrangement-origin, #network-status { display: none !important }
  .arrangement-page:not(:first-child) { break-before: page }
}
@media (pointer: coarse) {
  .button, .nav button, select, .check, input:not([type="checkbox"]), summary { min-height: 44px }
  .note-list button { min-width: 44px }
  select { max-width: 100% }
}
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--green) }
.sheet { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff }
.sheet img { width: 100%; display: block }
.sheet.zoom img { width: 145%; max-width: none }
.sheet iframe { display: block; width: 100%; height: min(68vh,730px); border: 0 }
.sheet.original-crop iframe { height: clamp(175px,32vh,365px) }
.pages { display: grid; grid-template-columns: repeat(auto-fill,minmax(172px,1fr)); gap: .7rem }
.page-card { padding: .65rem; border: 1px solid var(--line); border-radius: 9px }
.page-card h3 { font-size: 1rem }
.page-card .sheet { margin-bottom: .55rem; height: 112px }
.page-card .sheet iframe { height: 112px; pointer-events: none }
.page-card .sheet img { height: 100%; object-fit: contain }
.issue-list li, .activity-list li { padding: .68rem 0; border-bottom: 1px solid var(--line) }
.issue-list li:last-child, .activity-list li:last-child { border-bottom: 0 }
.issue-list p, .activity-list p { margin: .3rem 0 0 }
.note-list { display: flex; flex-wrap: wrap; gap: .4rem }
.measure-review { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start }
.measure-review > section { min-width:0 }
.review-original, .review-score-frame img { display:block; width:100%; height:auto }
.review-score-frame { position:relative; width:100%; max-width:42rem; background:white }
.score-event { position:absolute; transform:translate(-50%,-50%); width:1.45rem; height:1.45rem;
  border:1px solid transparent; background:transparent; padding:0; border-radius:50%; cursor:pointer }
.score-event:hover, .score-event:focus-visible, .score-event[aria-pressed="true"] { background:#accc2238; outline:2px solid #648619 }
@media(max-width:600px) { .measure-review { grid-template-columns:minmax(0,1fr) } }
.note-list button[aria-pressed="true"] { background: #e9f1b8; border-color: #879f1a }
.check-block { padding: .75rem; border-radius: 8px; background: var(--pale); color: #314500 }
.warning-box { padding: .75rem; border-radius: 8px; background: #fff0cf; color: #773300 }
.error-box { padding: .75rem; border-radius: 8px; background: #fae6e7; color: #860b1a; overflow-wrap: anywhere }
.notice:not(:empty) { position: fixed; right: 1rem; bottom: 1rem; z-index: 6; width: min(420px,calc(100% - 2rem)); border-radius: .55rem; background: #284011; color: #fff; padding: .68rem .9rem; box-shadow: 0 6px 23px #0002 }
#alert:not(:empty) { background: #860b1a; bottom: 4.15rem }
progress { accent-color: var(--green); width: min(460px,100%) }
summary { cursor: pointer; font-weight: 670 }
details[open] > summary { margin-bottom: .6rem }
dialog { width: min(475px,calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius) }
dialog::backdrop { background: #151a1766 }
dialog:has([data-original-reader]), dialog:has([data-lane-comparison]) { width: min(900px,calc(100% - 2rem)) }
dialog .actions { justify-content: flex-end }
@media (max-width: 1080px) {
  :root { --sidebar: 215px }
  .brand { font-size: 1.11rem }
  .editor { grid-template-columns: minmax(0,1fr) }
}
@media (max-width: 810px) {
  :root { --sidebar: 70px }
  .sidebar { padding: .85rem .45rem }
  .brand { justify-content: center; padding: 0 0 .6rem; margin-bottom: .9rem }
  .brand > span:last-child, .nav-label, .connection { display: none }
  .nav button { justify-content: center; padding: .65rem .2rem }
  .dashboard { grid-template-columns: minmax(0,1fr) }
  .illustration { height: 142px }
}
@media (max-width: 545px) {
  .shell { display: flex; flex-direction: column }
  .sidebar { z-index: 5; min-height: auto; width: 100%; padding: .37rem .5rem; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: .3rem }
  .brand { flex: 0 0 34px; border: 0; padding: 0; margin: 0 }
  .brand-mark { font-size: 2.45rem; height: 2.6rem }
  .nav { grid-template-columns: repeat(5,minmax(0,1fr)); width: 100%; gap: .15rem }
  .nav button { min-height: 40px }
  .nav .icon { width: 1.38rem; height: 1.38rem }
  .grid-two { grid-template-columns: minmax(0,1fr) }
  .project-open { grid-template-columns: 63px minmax(0,1fr) auto; gap: .55rem }
  .project-open h3 { font-size: 1rem }
  .project-card { grid-template-columns: minmax(0,1fr) }
  .project-extra { padding: 0 .63rem .56rem }
  .recent > .button { margin-left: 0 }
}
