/* 仕様 5.1章の基準(ここから) */
:root { --bg:#f5f7fb; --paper:#fff; --ink:#17243b; --muted:#5f6b7c;
 --line:#d9e0ea; --brand:#155eef; --danger:#b42318; --warn:#b54708;
 --ok:#067647; --radius:12px; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--bg);
 font-family:'Noto Sans JP',sans-serif; font-size:16px; line-height:1.6; }
header { height:64px; background:white; border-bottom:1px solid var(--line); }
.header-inner { max-width:1200px; margin:auto; height:100%; padding:0 24px;
 display:flex; align-items:center; justify-content:space-between; }
.brand { font-size:24px; font-weight:700; color:var(--brand); }
main { max-width:1120px; margin:32px auto 104px; padding:0 24px; }
h1 { font-size:28px; line-height:1.4; margin:0 0 8px; }
h2 { font-size:20px; margin:0 0 16px; }
.muted { color:var(--muted); font-size:14px; }
.panel { padding:24px; border:1px solid var(--line); border-radius:12px; background:white; }
.layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:24px; }
.stack { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; min-width:0; }
label { display:block; font-size:14px; font-weight:500; margin-bottom:8px; }
input,select,textarea { width:100%; min-height:44px; border:1px solid var(--line);
 border-radius:8px; padding:10px 12px; font:inherit; background:white; }
textarea { min-height:120px; }
button,.button { min-height:44px; padding:10px 20px; border-radius:8px;
 border:1px solid var(--line); font:inherit; font-weight:500; cursor:pointer; }
.primary { background:var(--brand); border-color:var(--brand); color:white; }
.secondary { background:white; color:var(--ink); }
.danger { background:var(--danger); color:white; }
:disabled { opacity:.45; cursor:not-allowed; }
:focus-visible { outline:3px solid #84adff; outline-offset:2px; }
.steps { display:flex; gap:12px; margin:24px 0; padding:0; list-style:none; }
.steps li { flex:1; border-bottom:3px solid var(--line); padding:0 0 10px; font-size:14px; }
.steps .active { color:var(--brand); border-color:var(--brand); font-weight:700; }
.dropzone { min-height:200px; border:2px dashed #98a2b3; border-radius:12px;
 display:grid; place-content:center; text-align:center; padding:24px; }
.viewer { background:#e9edf3; min-height:420px; padding:24px;
 display:flex; align-items:center; justify-content:center; overflow:auto; }
.actions { position:fixed; bottom:0; left:0; right:0; background:white;
 border-top:1px solid var(--line); padding:16px 24px; z-index:20; }
.actions-inner { max-width:1072px; margin:auto; display:flex; justify-content:space-between; gap:16px; }
.badge { border-radius:6px; padding:3px 8px; font-size:13px; display:inline-block; }
.badge.error { color:#b42318; background:#fef3f2; }
.badge.warning { color:#b54708; background:#fffaeb; }
.badge.unknown { color:#344054; background:#f2f4f7; }
.badge.pass { color:#067647; background:#ecfdf3; }
table { border-collapse:collapse; width:100%; font-size:14px; }
th,td { padding:12px 16px; border-bottom:1px solid var(--line); text-align:left; }
th { background:#f8fafc; white-space:nowrap; }
.field-error { color:var(--danger); font-size:14px; margin-top:6px; }
@media(max-width:767px) {
 main { margin:24px auto 112px; padding:0 16px; }
 .layout { grid-template-columns:minmax(0,1fr); } .panel { padding:16px; }
 h1 { font-size:24px; } .steps { gap:6px; } .steps li { font-size:12px; }
 .viewer { min-height:280px; padding:12px; }
 .actions { padding:12px 16px; } .actions-inner button { flex:1; }
}
/* 仕様 5.1章の基準(ここまで)。以下は画面部品の追加 */

[hidden] { display:none !important; }
a { color:var(--brand); }
.nav { display:flex; gap:20px; font-size:14px; }
.nav a { text-decoration:none; font-weight:500; }
.footer { max-width:1120px; margin:0 auto 96px; padding:0 24px; font-size:13px; }
.notice { padding:12px 16px; border-radius:8px; margin-bottom:16px; background:#fef3f2; color:var(--danger);
 border:1px solid #fecdca; }
.notice.info { background:#eff4ff; color:#1d2939; border-color:#c7d7fe; }
.message { padding:12px 16px; border-radius:8px; background:#eff4ff; margin-bottom:16px; }
.message.error { background:#fef3f2; color:var(--danger); }
.stack-sm { display:grid; gap:8px; margin:12px 0; }
.form-narrow { max-width:480px; }
.button { display:inline-block; text-decoration:none; text-align:center; }
.kv { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; margin:0; font-size:14px; }
.kv dt { color:var(--muted); }
.kv dd { margin:0; overflow-wrap:anywhere; }
.spec th { width:30%; }
.notes { margin:0; padding-left:20px; font-size:14px; }
.dropzone { cursor:pointer; }
.dropzone.over { border-color:var(--brand); background:#eff4ff; }
.progress { display:grid; grid-template-columns:1fr 120px; gap:8px; align-items:center; font-size:14px; }
progress { width:100%; }
.side-tabs, .seg { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.side-tabs button[aria-selected="true"], .seg button[aria-pressed="true"] { border-color:var(--brand); color:var(--brand);
 font-weight:700; }
.side-tabs .done::after { content:" ✓"; color:var(--ok); }
.toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }
.check { display:flex; gap:10px; align-items:flex-start; font-weight:400; margin:12px 0; }
.check input { width:20px; min-height:20px; margin-top:3px; flex:none; }
.results { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.results li { border-bottom:1px solid var(--line); padding-bottom:12px; font-size:14px; }
.results .label { font-weight:500; display:block; margin:4px 0; }
.results .check { margin:6px 0 0; }
.xy { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.rotate { display:flex; gap:8px; margin-top:12px; }
.rotate button { flex:1; padding:10px; }
.legend { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; }
.key { display:inline-block; width:18px; height:0; margin-right:4px; vertical-align:middle; }
.key-trim { border-top:1px solid #155eef; } .key-bleed { border-top:1px dashed #d92d20; }
.key-safe { border-top:1px dotted #079455; }

/* 面・位置の編集。選択枠は青実線1px、塗り足しは赤破線1px、安全域は緑点線1px(5.3章) */
.editor-viewer { min-height:360px; }
.page-stage { position:relative; display:inline-block; line-height:0; user-select:none; touch-action:none; }
.page-stage img { max-width:100%; max-height:560px; display:block; background:white; box-shadow:0 1px 3px rgba(16,24,40,.2); }
.frame-trim, .frame-bleed, .frame-safe { position:absolute; pointer-events:none; }
.frame-trim { border:1px solid #155eef; background:rgba(21,94,239,.06); pointer-events:auto; cursor:move; }
.frame-bleed { border:1px dashed #d92d20; }
.frame-safe { border:1px dotted #079455; }
.frame-trim.fixed { cursor:default; }

#proof-viewer img { display:block; background:white; box-shadow:0 1px 3px rgba(16,24,40,.25); max-width:100%; }
#proof-viewer.zoomed { align-items:flex-start; justify-content:flex-start; }
#proof-viewer.zoomed img { max-width:none; }
.proof-pages { display:grid; gap:24px; width:100%; justify-items:center; }
.proof-pages.pair { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); align-items:start; }
#proof-viewer.zoomed .proof-pages { width:auto; justify-items:start; }
#proof-viewer.zoomed .proof-pages.pair { grid-template-columns:repeat(2,max-content); }
.proof-page { margin:0; display:grid; gap:8px; justify-items:center; }
.proof-page figcaption { font-weight:700; font-size:14px; }
.side-confirms { display:grid; gap:4px; margin-top:8px; }
.viewer-3d { min-height:420px; perspective:1400px; overflow:hidden; }
.card3d-stage { width:100%; min-height:380px; display:flex; align-items:center; justify-content:center;
 cursor:grab; touch-action:none; user-select:none; }
.card3d { position:relative; transform-style:preserve-3d; transition:transform .5s ease; }
.card3d.dragging { transition:none; cursor:grabbing; }
.card3d-face { position:absolute; inset:0; background:white; backface-visibility:hidden;
 box-shadow:0 6px 18px rgba(16,24,40,.25); }
.card3d-face img { width:100%; height:100%; display:block; pointer-events:none; }
.card3d-back { transform:rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .card3d { transition:none; } }
.done { text-align:center; }
.done .spec { max-width:480px; margin:0 auto 16px; text-align:left; }
.done-mark { font-size:48px; color:var(--ok); margin:0; line-height:1; }
.history-item { border-bottom:1px solid var(--line); padding:12px 0; }
details summary { cursor:pointer; font-weight:500; }
.action-status { align-self:center; text-align:center; flex:1; }

/* 店舗画面 */
.table-wrap { overflow-x:auto; }
.filters { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; margin-bottom:16px; }
.filters > div { min-width:180px; }
.tabs { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--line); margin-bottom:16px; }
.tabs a { padding:8px 14px; text-decoration:none; color:var(--ink); border-bottom:3px solid transparent; font-size:14px; }
.tabs a.active { border-color:var(--brand); color:var(--brand); font-weight:700; }
.pager { display:flex; gap:6px; margin-top:16px; flex-wrap:wrap; }
.pager button { min-height:36px; padding:4px 12px; }
.pager button[aria-current="page"] { border-color:var(--brand); color:var(--brand); font-weight:700; }
.row-actions { display:flex; flex-wrap:wrap; gap:8px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.item-row { border:1px solid var(--line); border-radius:8px; padding:16px; display:grid; gap:12px;
 grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
.resolve-form { display:grid; gap:8px; margin-top:8px; }
.resolve-form textarea { min-height:72px; }
.truncate { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.login { max-width:420px; margin:64px auto; }
@media(max-width:767px) {
 .nav { gap:12px; font-size:13px; } .grid2 { grid-template-columns:1fr; }
 .header-inner { padding:0 16px; }
}
.pre-wrap { white-space:pre-wrap; overflow-wrap:anywhere; }
