:root { --ink:#17313b; --paper:#f4f8fa; --panel:#ffffff; --accent:#d26624; --green:#0a956f; --green-dark:#057455; --muted:#5d727b; --line:#cfdee4; --dark:#0b5268; --ui-scale:1; }
:root[data-type-size="small"] { --ui-scale:1; }
:root[data-type-size="medium"] { --ui-scale:1.13; }
:root[data-type-size="large"] { --ui-scale:1.27; }
* { box-sizing:border-box; }
html,body { min-height:100%; }
body { margin:0; background:var(--paper); color:var(--ink); font:calc(14px * var(--ui-scale))/1.55 ui-sans-serif,system-ui,-apple-system,"Hiragino Sans",sans-serif; }
.app-shell { max-width:1200px; min-height:100vh; margin:0 auto; background:var(--paper); box-shadow:0 0 0 1px rgba(15,74,92,.08); }
header { padding:16px clamp(18px,3vw,30px) 12px; display:flex; justify-content:space-between; gap:10px 22px; align-items:flex-start; flex-wrap:wrap; background:linear-gradient(120deg,#0b5268,#11758a); color:#fff; }
h1,h2,h3,p { margin:0; } h1 { font-size:calc(26px * var(--ui-scale)); line-height:1.2; } h2 { font-size:calc(17px * var(--ui-scale)); margin-bottom:8px; } h3 { font-size:calc(14px * var(--ui-scale)); margin-bottom:7px; }
.brand { display:grid; gap:13px; }.brand-title { display:flex; }
/* タイトル自体をホーム導線にする。見た目は従来の見出しのまま。 */
.brand-home { padding:0; background:transparent; color:inherit; font:inherit; font-weight:800; line-height:inherit; text-align:left; border-radius:5px; cursor:pointer; }
.brand-home:hover { background:transparent; filter:none; text-decoration:underline; text-underline-offset:4px; }
.brand-home:focus-visible { outline:3px solid rgba(255,255,255,.7); outline-offset:3px; }
.header-context { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }.context-divider { color:rgba(255,255,255,.75); font-size:calc(15px * var(--ui-scale)); font-weight:400; line-height:1; }.header-controls { display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.segmented,.type-size { display:inline-flex; align-items:center; gap:2px; padding:2px; border:1px solid rgba(255,255,255,.3); border-radius:7px; background:rgba(4,49,63,.28); }.type-size { color:#e7f4f7; padding-left:5px; font-size:calc(10px * var(--ui-scale)); }.type-size span { margin-right:1px; }
.context-group { width:max-content; min-height:0; padding:2px; }.context-group button { padding:calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale)); border-radius:5px; font-size:calc(11px * var(--ui-scale)); line-height:1.25; }.platform-switcher { background:rgba(255,255,255,.11); border-color:rgba(255,255,255,.26); }.platform-switcher button { border:1px solid #f2b18a; background:#fff8f3; color:#934019; }.platform-switcher button:not(.selected):hover:not(:disabled),.platform-switcher button:not(.selected):active:not(:disabled) { background:#fee4d4; }.platform-switcher button.selected { background:#dc6827; border-color:#dc6827; color:#fff; box-shadow:0 1px 1px rgba(83,31,7,.26); }.store-switcher { background:rgba(255,255,255,.11); border-color:rgba(255,255,255,.26); flex-wrap:wrap; }.store-switcher button { border:1px solid #8ebbd2; background:#f5fbfe; color:#155a79; }.store-switcher button:not(.selected):hover:not(:disabled),.store-switcher button:not(.selected):active:not(:disabled) { background:#dff2fa; }.store-switcher button.selected { background:#087cb5; border:2px solid #d8f5ff; color:#fff; box-shadow:0 0 0 1px rgba(216,245,255,.72),0 2px 5px rgba(1,38,56,.42); }
button,select,textarea,input { font:inherit; } button { border:0; border-radius:7px; padding:calc(8px * var(--ui-scale)) calc(11px * var(--ui-scale)); background:#e3edf0; color:var(--dark); cursor:pointer; font-weight:700; } button:hover:not(:disabled) { filter:brightness(.97); } button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible { outline:3px solid rgba(12,137,159,.45); outline-offset:2px; } button:disabled { opacity:.5; cursor:not-allowed; }.primary { background:var(--green); color:#fff; }.primary:hover:not(:disabled) { background:var(--green-dark); }.secondary { background:#dcebf0; color:var(--dark); }.compact { padding:calc(6px * var(--ui-scale)) calc(9px * var(--ui-scale)); font-size:calc(12px * var(--ui-scale)); }.header-controls .compact { padding:calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale)); border-radius:5px; background:rgba(239,248,250,.9); font-size:calc(11px * var(--ui-scale)); line-height:1.25; }
.segmented:not(.context-group) button,.type-size button { padding:calc(6px * var(--ui-scale)) calc(9px * var(--ui-scale)); border-radius:6px; background:transparent; color:#e7f4f7; font-size:calc(12px * var(--ui-scale)); }.type-size button { padding:calc(3px * var(--ui-scale)) calc(6px * var(--ui-scale)); border-radius:5px; font-size:calc(11px * var(--ui-scale)); line-height:1.25; }.segmented:not(.context-group) button.selected,.type-size button.selected { background:#fff; color:#095467; }.segmented button:disabled { opacity:.6; }
.management-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; color:#dce9d8; }.system-panel,.settings-panel { padding:14px clamp(18px,3vw,30px); }.system-panel { background:#293e36; }.system-panel pre { max-width:none; background:#182822; color:#dce9d8; border-color:#40574e; }.settings-panel { background:#edf5f8; border-bottom:1px solid var(--line); }.panel-heading { margin-bottom:12px; }.panel-heading h2 { margin-bottom:3px; }.settings-fields { display:grid; gap:9px; max-width:560px; margin-bottom:12px; }.settings-row { display:grid; grid-template-columns:minmax(120px,1fr) minmax(170px,1fr); align-items:center; gap:10px; padding:10px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }.settings-row small { color:var(--muted); display:block; }.settings-row input { width:100%; }.settings-result { min-height:1.55em; color:var(--muted); }
.work-queue { padding:12px clamp(18px,3vw,30px) 8px; border-bottom:1px solid var(--line); }.action-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }.action-cards.has-alert { grid-template-columns:repeat(4,minmax(0,1fr)); }.action-card-wrap { position:relative; display:grid; }.action-card { display:grid; grid-template-columns:auto 1fr; gap:0 10px; align-items:center; width:100%; min-height:65px; padding:10px 12px; background:var(--panel); color:var(--ink); border:1px solid var(--line); text-align:left; }
.action-card-help { position:absolute; top:5px; right:5px; width:22px; height:22px; padding:0; border-radius:50%; background:#dcebf0; color:var(--dark); font-size:calc(11px * var(--ui-scale)); line-height:1; }
.link-button { padding:0; background:transparent; color:#0e7187; font-size:calc(11px * var(--ui-scale)); font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.link-button:hover { background:transparent; filter:none; }.link-button[aria-pressed="true"] { color:var(--green-dark); }
.action-card[data-reply-scope="all"] { padding-right:30px; }
/* 要確認は矛盾が見つかった時だけ現れるので、見落とさない配色にする
   （.action-card.selected より後勝ちになるよう詳細度を上げる） */
.action-card.action-card-alert { background:#fdece7; border-color:#d1603c; }
.action-card.action-card-alert b { color:#b0421f; }
.action-card.action-card-alert.selected { border-color:#b0421f; box-shadow:inset 0 0 0 1px #b0421f; background:#fbe0d8; }
.row-substate { color:var(--muted); font-weight:400; }
.review-row.row-needs_check { border-color:#d1603c; background:#fdf3f0; }
.review-row.row-needs_check em { color:#b0421f; font-weight:700; }
.review-row.row-excluded b, .review-row.row-excluded em { color:var(--muted); }
.new-badge { display:inline-block; margin-left:6px; padding:1px 5px; border-radius:999px; background:#d26624; color:#fff; font-size:calc(10px * var(--ui-scale)); line-height:1.3; font-weight:700; vertical-align:middle; }
.scope-help-list { margin:6px 0 0; padding-left:18px; }.scope-help-list li { margin-bottom:2px; }
.human-verify-block { margin-top:10px; padding:10px 12px; background:#fdf3f0; border:1px solid #d1603c; border-radius:8px; }
.human-verify-block .hint { margin:0 0 8px; color:var(--ink); }
#human-verified { min-height:44px; }.action-card.selected { border-color:#0e7187; box-shadow:inset 0 0 0 1px #0e7187; background:#e7f5f7; }.action-card b { grid-row:1 / span 2; color:var(--green-dark); font-size:calc(24px * var(--ui-scale)); line-height:1; }.action-card span { font-size:calc(13px * var(--ui-scale)); }.action-card small { color:var(--muted); font-size:calc(10px * var(--ui-scale)); }.operational-detail { margin-top:7px; color:var(--muted); font-size:calc(11px * var(--ui-scale)); }.operational-detail p { margin:5px 0 0; }#operational-detail-text { white-space:pre-line; }
.controls { padding:10px clamp(18px,3vw,30px) 13px; display:flex; align-items:end; gap:9px; flex-wrap:wrap; border-bottom:1px solid var(--line); } label { font-size:calc(11px * var(--ui-scale)); color:var(--muted); display:grid; gap:3px; } select,input { min-height:calc(31px * var(--ui-scale)); background:#fff; border:1px solid var(--line); border-radius:5px; padding:5px 8px; color:var(--ink); } #query,#reviewer-filter { width:145px; } #counts { margin-left:auto; color:var(--muted); font-size:calc(12px * var(--ui-scale)); padding-bottom:5px; }
main { display:grid; grid-template-columns:312px minmax(0,1fr); min-height:0; overflow:visible; } aside { min-width:0; border-right:1px solid var(--line); background:#eeece5; padding:8px; overflow-y:auto; overscroll-behavior:contain; scroll-behavior:smooth; }.review-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 6px; width:100%; text-align:left; margin:0 0 5px; padding:8px 9px; background:var(--panel); color:var(--ink); border:1px solid transparent; }.review-row.selected { border-color:var(--green); background:#f1f8f2; }.review-row b { font-size:calc(13px * var(--ui-scale)); }.review-row span,.review-row small { font-size:calc(10px * var(--ui-scale)); color:var(--muted); line-height:1.35; }.review-row small { grid-column:1; }.review-row em { grid-column:2; grid-row:1/4; font-style:normal; font-size:calc(10px * var(--ui-scale)); line-height:1.35; text-align:right; color:var(--accent); }
article { min-width:0; overflow:visible; padding:22px clamp(24px,4vw,44px); }.status { font-size:calc(12px * var(--ui-scale)); border-radius:99px; padding:4px 9px; background:#dfe6de; }.status.edited { background:#fde1d6; }.status.approved { background:#d7e7db; }
.workflow-status-section { margin:0 0 18px; }.compact-workflow-status { padding:9px 11px; border:1px solid var(--line); border-radius:8px; background:#f5f8f5; font-size:calc(12px * var(--ui-scale)); }.workflow-status-alert { margin-top:8px; padding:9px 11px; border-left:3px solid #b14c24; background:#fde8df; font-size:calc(12px * var(--ui-scale)); }
section { margin:0 0 18px; } pre { white-space:pre-wrap; word-break:break-word; background:var(--panel); border:1px solid var(--line); border-radius:8px; margin:0; padding:13px; min-height:45px; font:calc(12px * var(--ui-scale))/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; }.primary-review { margin-bottom:22px; }.review-text { max-height:255px; min-height:0; overflow-y:auto; overscroll-behavior:contain; }.review-text.expanded { max-height:760px; }.primary-review #toggle-review-text { display:block; margin:12px 0 4px; }.primary-review #toggle-review-text[hidden] { display:none; }.generation-action { display:grid; gap:11px; }.generation-action h2 { margin-bottom:0; }.generation-run-status { margin:0; background:#e7f5ee; border-left:3px solid var(--green); padding:9px 11px; font-size:calc(12px * var(--ui-scale)); }.generation-run-status.manual { background:#fff4dc; border-left-color:var(--accent); }.generation-run-status.blocked,.generation-run-status.error { background:#fde1d6; border-left-color:#b14c24; }.generation-action .hint { margin:0; }.generation-action .action-buttons { margin-top:2px; }.detail-secondary { margin:0 0 11px; }.detail-secondary details { border:1px solid var(--line); border-radius:8px; background:rgba(255,253,248,.65); padding:9px 11px; }.detail-secondary summary { color:var(--ink); font-size:calc(12px * var(--ui-scale)); font-weight:700; }.detail-secondary details[open] summary { margin-bottom:10px; }
.editor.reply-workspace { padding:12px 0 14px; background:#fdf6db; border:1px solid var(--line); border-radius:9px; }.editor.reply-workspace > h2,.editor.reply-workspace > p,.editor.reply-workspace > .action-buttons,.editor.reply-workspace > .learning-feedback { margin-left:14px; margin-right:14px; }.editor.reply-workspace > h2 { margin-bottom:0; }.editor textarea { display:block; width:100%; margin:8px 0 10px; padding:13px; border:1px solid var(--line); border-left:0; border-right:0; border-radius:0; background:#fff; color:var(--ink); font:calc(12px * var(--ui-scale))/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; }.editor #v2-editor { min-height:280px; max-height:720px; height:auto; overflow-y:hidden; overflow-anchor:none; resize:none; }.editor .learning-feedback { margin-top:0; margin-bottom:8px; }.editor .learning-feedback h3 { margin:0 0 2px; font-size:calc(13px * var(--ui-scale)); }.editor .learning-feedback .hint { margin:0 0 6px; }.editor .learning-feedback textarea { min-height:80px; max-height:200px; margin:0; padding:8px 10px; border:1px solid var(--line); border-radius:6px; resize:vertical; }.editor textarea:disabled { background:#f3f5f6; color:#68746c; }.editor span,.posting-helper span { color:var(--muted); font-size:calc(12px * var(--ui-scale)); }.hint { font-size:calc(12px * var(--ui-scale)); color:var(--muted); margin-top:6px; }.posting-helper { padding:14px; background:#edf4ed; border:1px solid #c9dccb; border-radius:9px; }.action-buttons { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }.action-buttons button { min-height:calc(38px * var(--ui-scale)); font-size:calc(13px * var(--ui-scale)); }.editor .action-buttons,.posting-helper .action-buttons { margin:4px 0 10px; }.editor .reply-actions { margin-bottom:6px; }.editor .reply-actions button { flex:0 1 auto; white-space:nowrap; }.save-action { background:var(--green); color:#fff; }.tabelog-action { background:#0b5268; color:#fff; }.tabelog-safari-action { background:#155a79; color:#fff; }.regenerate-action { background:#d26624; color:#fff; }.approve-action { background:#216bb0; color:#fff; }.good-reply-action { background:transparent; color:#24546e; border:1px solid #7da0b2; font-weight:600; }.learning-action { margin-top:8px; }.learning-action .hint { margin-bottom:10px; }.learning-status-text { margin:8px 0 0; }.learning-status-candidates { display:grid; gap:8px; margin:8px 0 0; }.learning-status-candidate { padding:8px 10px; background:var(--panel); border:1px solid var(--line); border-radius:7px; }.learning-status-candidate p { margin:0 0 6px; font-size:calc(12px * var(--ui-scale)); }.learning-status-candidate p:last-child { margin-bottom:0; }.learning-status-candidate .action-buttons { margin-top:8px; }
.learning-rules-button { position:relative; }.learning-badge { display:inline-block; min-width:16px; margin-left:6px; padding:0 5px; border-radius:99px; background:#dc6827; color:#fff; font-size:calc(10px * var(--ui-scale)); line-height:1.4; }.learning-rules-panel { padding:14px clamp(18px,3vw,30px); background:#f7f2e7; border-bottom:1px solid var(--line); }.learning-rules-filters { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }.learning-filter { background:#fff; border:1px solid var(--line); }.learning-filter.selected { background:#0b5268; color:#fff; }.learning-rules-list { display:grid; gap:10px; }.learning-rule-card { padding:12px 14px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }.learning-rule-card h3 { margin:0 0 6px; font-size:calc(15px * var(--ui-scale)); }.learning-rule-card.quality-issue { border-color:#b14c24; background:#fff6f2; }
.reply-patterns-panel { padding:14px clamp(18px,3vw,30px); background:#eef5f8; border-bottom:1px solid var(--line); }.pattern-mini-manual { padding:10px 12px; margin:0 0 12px; border:1px solid #b9d3de; border-radius:8px; background:#f9fcfd; }.pattern-mini-manual h3 { margin:0 0 7px; font-size:calc(13px * var(--ui-scale)); }.pattern-mini-manual dl { display:grid; gap:6px; margin:0; }.pattern-mini-manual dl div { display:grid; grid-template-columns:128px 1fr; gap:8px; }.pattern-mini-manual dt { font-weight:700; font-size:calc(12px * var(--ui-scale)); }.pattern-mini-manual dd { margin:0; color:var(--muted); font-size:calc(12px * var(--ui-scale)); }.reply-pattern-form { display:grid; gap:9px; max-width:820px; padding:12px; margin:0 0 14px; border:1px solid var(--line); border-radius:8px; background:var(--panel); }.reply-pattern-form textarea { min-height:72px; padding:8px 10px; font:inherit; resize:vertical; }.reply-pattern-form fieldset { display:flex; flex-wrap:wrap; gap:13px; border:0; padding:0; margin:0; }.reply-pattern-form fieldset label { display:flex; align-items:center; gap:5px; color:var(--ink); }.reply-pattern-form input { min-height:auto; }.reply-patterns-list { display:grid; gap:12px; }.reply-pattern-family { margin:0; padding:12px; border:1px solid var(--line); border-radius:8px; background:#f9fbfb; }.reply-pattern-family h3 { margin:0 0 9px; font-size:calc(15px * var(--ui-scale)); }.reply-pattern-family h3 span { color:var(--muted); font-size:calc(12px * var(--ui-scale)); font-weight:400; }.reply-pattern-card { padding:10px 12px; margin:8px 0 0; border:1px solid var(--line); border-radius:7px; background:var(--panel); }.reply-pattern-card-head { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:calc(11px * var(--ui-scale)); }.reply-pattern-card p { margin:5px 0; font-size:calc(12px * var(--ui-scale)); }.reply-pattern-card .action-buttons { margin-top:9px; }.reply-pattern-confirm,.reply-pattern-variants { padding:9px 11px; border:1px solid #b9d3de; border-radius:7px; background:#f9fcfd; }.reply-pattern-confirm p,.reply-pattern-variants p { margin:6px 0; font-size:calc(12px * var(--ui-scale)); }.reply-pattern-variants button { margin-left:8px; }
.history { border:1px solid var(--line); border-radius:8px; background:var(--panel); }.history-row { display:grid; grid-template-columns:150px 150px 1fr; gap:6px; padding:9px 11px; border-bottom:1px solid var(--line); font-size:calc(12px * var(--ui-scale)); }.history-row:last-child { border:0; }.history-row time,.history-row small { color:var(--muted); }.history-row small { grid-column:3; }.empty { color:var(--muted); padding:20px; } details { margin-top:8px; } summary { cursor:pointer; color:var(--muted); margin-bottom:6px; }
.generation-judgment { background:#f7f2e7; border:1px solid var(--line); border-radius:8px; padding:11px 13px; }.generation-judgment summary { color:var(--ink); font-weight:700; }.judgment-stack { display:grid; grid-template-columns:minmax(0,1fr); gap:11px; margin-top:12px; }.judgment-card { background:var(--panel); border:1px solid var(--line); border-radius:7px; padding:13px 14px; }.judgment-card h4 { margin:0 0 9px; font-size:calc(13px * var(--ui-scale)); }.judgment-card ul { margin:0; padding-left:19px; }.judgment-card li { font-size:calc(12px * var(--ui-scale)); margin:6px 0; }.judgment-card .issue-block { list-style:none; margin:0 0 12px -19px; padding:11px 12px; border-left:3px solid #89aebd; background:#f7fafb; }.judgment-card .issue-block:last-child { margin-bottom:0; }.issue-block p { margin:0 0 7px; line-height:1.65; }.issue-block p:last-child { margin-bottom:0; }
.sentence-trace { margin-top:12px; }.sentence-trace h4 { margin:0 0 7px; font-size:calc(13px * var(--ui-scale)); }.sentence-card { padding:11px; margin:0 0 8px; background:var(--panel); border:1px solid var(--line); border-radius:7px; }.sentence-card h5 { margin:0 0 5px; font-size:calc(12px * var(--ui-scale)); color:var(--muted); }.sentence-text { margin:0 0 9px; font-weight:700; white-space:pre-wrap; }.sentence-card dl { margin:0; display:grid; gap:5px; }.sentence-card dl div { display:grid; grid-template-columns:118px 1fr; gap:8px; }.sentence-card dt { color:var(--muted); font-size:calc(11px * var(--ui-scale)); }.sentence-card dd { margin:0; font-size:calc(12px * var(--ui-scale)); white-space:pre-wrap; word-break:break-word; }.trace-empty { margin:12px 0 0; }
@media(max-width:880px) { .app-shell { max-width:none; } main { display:block; height:auto; min-height:0; overflow:visible; } aside { border-right:0; border-bottom:1px solid var(--line); max-height:44vh; } article { min-height:56vh; overflow:visible; padding:22px 18px; }.action-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }.action-cards .action-card-wrap:first-child { grid-column:1 / -1; } }
@media(max-width:600px) { header { align-items:start; flex-direction:column; }.header-controls { justify-content:flex-start; }.context-divider { display:none; }.history-row { grid-template-columns:1fr; }.history-row small { grid-column:auto; }.controls { align-items:stretch; }.controls label { flex:1 1 115px; }.store-switcher { width:100%; }.store-switcher button { flex:1 1 auto; }.settings-row { grid-template-columns:1fr; gap:5px; } }
@media(min-width:881px) {
  html,body { height:auto; min-height:100%; }
  .app-shell { height:auto; min-height:100vh; display:block; }
  .work-queue { padding:8px clamp(18px,3vw,30px) 4px; margin-bottom:0; }
  .operational-detail { margin-top:2px; }
  .operational-detail summary { margin-bottom:0; }
  .operational-detail[open] summary { margin-bottom:4px; }
  .operational-detail p { margin:4px 0 0; }
  .controls { padding:6px clamp(18px,3vw,30px) 6px; gap:6px 7px; margin-bottom:0; }
  .controls label { gap:1px; }
  .controls select,.controls input { min-height:calc(26px * var(--ui-scale)); padding:2px 6px; }
  #query,#reviewer-filter { width:120px; }
  #counts { padding-bottom:0; margin:0 0 0 auto; align-self:end; line-height:1.3; }
  main { height:auto; min-height:0; overflow:visible; align-items:start; }
  aside { position:sticky; top:0; align-self:start; max-height:100vh; overflow-y:auto; overscroll-behavior:contain; }
  article { overflow:visible; padding:14px clamp(24px,4vw,44px) 16px; }
  .primary-review { margin-bottom:12px; }
  .primary-review #toggle-review-text { margin:6px 0 2px; }
  .review-text { max-height:340px; }
  .editor #v2-editor { min-height:280px; max-height:720px; }
  .editor .learning-feedback textarea { min-height:80px; max-height:200px; }
}

.learning-intake { display:grid; gap:8px; margin-top:10px; margin-bottom:12px; padding:11px; border:1px solid #e3b6c9; border-radius:8px; background:#fbebf1; }
.learning-intake h3 { margin:0 0 2px; font-size:calc(13px * var(--ui-scale)); }
.learning-intake .hint { margin:0 0 2px; }
.learning-intake-heading { display:flex; align-items:center; gap:7px; }
.help-button { width:23px; min-height:23px; padding:0; border-radius:50%; background:#dcebf0; color:#155a79; line-height:1; }
.learning-intake label { gap:4px; }
.learning-intake textarea { min-height:64px; max-height:200px; margin:0; padding:8px 10px; border:1px solid var(--line); border-radius:6px; resize:vertical; }
.learning-intake fieldset { display:flex; flex-wrap:wrap; gap:13px; margin:0; padding:0; border:0; }
.learning-intake fieldset label { display:flex; align-items:center; gap:5px; color:var(--ink); }
.learning-intake input { min-height:auto; }
.learning-intake .topic-options { gap:6px 9px; }
.learning-intake .topic-options legend,.learning-intake .registration-kind legend { width:100%; margin-bottom:1px; font-size:calc(11px * var(--ui-scale)); color:var(--muted); }
.learning-intake .topic-options label { padding:4px 7px; border:1px solid var(--line); border-radius:999px; background:#fff; font-size:calc(11px * var(--ui-scale)); }
.explicit-registration-history { padding-top:5px; border-top:1px solid #cbdde3; }
.explicit-registration-history h4 { margin:0 0 6px; font-size:calc(12px * var(--ui-scale)); }
.explicit-registration-history-list { display:grid; gap:6px; }
.explicit-registration-history-item { margin:0; padding:8px 10px; background:#fff; border:1px solid var(--line); border-radius:6px; }
.explicit-registration-history-item > div { display:flex; justify-content:space-between; gap:8px; font-size:calc(11px * var(--ui-scale)); }.explicit-registration-history-item > div span { color:var(--muted); }
.explicit-registration-history-item p { margin:4px 0 0; font-size:calc(11px * var(--ui-scale)); white-space:pre-wrap; }
.help-dialog { width:min(620px, calc(100vw - 32px)); border:0; border-radius:10px; padding:16px; color:var(--ink); box-shadow:0 16px 55px rgba(17,42,51,.34); }.help-dialog::backdrop { background:rgba(17,42,51,.45); }.help-dialog-head { display:flex; align-items:start; justify-content:space-between; gap:12px; margin-bottom:13px; }.help-dialog-head h2 { margin:0; }.help-dialog dl { display:grid; gap:11px; margin:0; }.help-dialog dl div { display:grid; grid-template-columns:120px 1fr; gap:10px; }.help-dialog dt { font-weight:700; font-size:calc(12px * var(--ui-scale)); }.help-dialog dd { margin:0; color:var(--muted); font-size:calc(12px * var(--ui-scale)); line-height:1.55; }
.required-mark { color:#a74825; font-size:calc(11px * var(--ui-scale)); }

/* V2 is the editable working surface; V1 remains a high-contrast read-only comparison. */
.editor.reply-workspace > h2 { display:none; }
.reply-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0 14px; align-items:start; }
.reply-column { min-width:0; display:grid; grid-template-rows:auto 1fr; }
.reply-column-heading { margin-bottom:6px; }
.reply-column-heading h2 { margin:0 0 2px; }
.reply-column-heading .hint { margin:0; }
.reply-comparison .editor { min-width:0; }
.reply-comparison .editor textarea { margin:0; border:1px solid var(--line); border-radius:7px; }
.reply-comparison #v2-editor { width:100%; margin-bottom:0; }
.v1-source-view { min-height:280px; height:280px; max-height:720px; overflow-y:auto; margin:0; background:#f7fafb; border-color:#b9cbd2; color:#28434d; box-shadow:inset 0 0 0 1px rgba(126,153,163,.12); }
.reply-v1-column #adopt-latest-v1 { justify-self:start; margin-top:8px; }
.editor.reply-workspace > .reply-comparison + .learning-feedback { margin-top:6px; }

@media(max-width:600px) {
  .reply-comparison { grid-template-columns:minmax(0,1fr); }
}

/* 一言パーツ（2026-08-25 Step 2承認済み設計） */
.snippet-panel { padding:14px clamp(18px,3vw,30px); background:#f2f8ef; border-bottom:1px solid var(--line); }
.snippet-form { display:grid; gap:9px; max-width:820px; padding:12px; margin:0 0 14px; border:1px solid var(--line); border-radius:8px; background:var(--panel); }
.snippet-form textarea { min-height:56px; padding:8px 10px; font:inherit; resize:vertical; }
.snippet-form fieldset { display:flex; flex-wrap:wrap; gap:13px; border:0; padding:0; margin:0; }
.snippet-form fieldset label { display:flex; align-items:center; gap:5px; color:var(--ink); }
.snippet-form input { min-height:auto; }
.snippet-list { display:grid; gap:8px; max-width:820px; }
.snippet-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:9px 11px; background:var(--panel); border:1px solid var(--line); border-radius:7px; }
.snippet-row b { font-weight:600; font-size:calc(12px * var(--ui-scale)); white-space:pre-wrap; }
.snippet-row small { display:block; color:var(--muted); font-size:calc(10px * var(--ui-scale)); }
/* 挿入UIは常時展開せず、1つのボタン＋モーダル選択にする（2026-08-25 UI改善）。 */
.snippet-bar { display:flex; align-items:center; gap:6px; margin:8px 0 0; }
.snippet-insert-button { border:1px dashed #7da0b2; background:#f5fbfe; color:#24546e; }
.snippet-picker { width:min(560px, calc(100vw - 32px)); }
.snippet-picker .hint { margin:0 0 10px; }
.snippet-picker-body { display:grid; gap:12px; max-height:min(58vh, 460px); overflow-y:auto; overscroll-behavior:contain; }
.snippet-picker-group h3 { margin:0 0 6px; font-size:calc(12px * var(--ui-scale)); color:var(--muted); }
.snippet-picker-group .hint { margin:0 0 2px; }
.snippet-pick { display:block; width:100%; margin:0 0 6px; padding:calc(8px * var(--ui-scale)) calc(11px * var(--ui-scale)); border:1px solid #9fbfa4; border-radius:7px; background:#eef7ef; color:#1d5c33; font-weight:600; font-size:calc(12px * var(--ui-scale)); text-align:left; white-space:pre-wrap; }
.snippet-pick:hover:not(:disabled) { background:#def0e0; }
.snippet-picker-actions { margin-top:12px; }

/* 旧学習UIの非表示（2026-08-25 Step 2確定: 新方式では旧学習方式を使用しない）。
   データ・機能・イベント配線はすべて残したまま、表示だけを消している。
   旧方式運用へ戻す場合は、このブロックを削除するだけで全UIが復元される。 */
#learning-rules, #reply-patterns, #learning-rules-panel, #reply-patterns-panel,
.learning-feedback, .learning-intake, #good-reply, .learning-status-section { display:none !important; }

/* ===== 一言パーツの管理モーダル・カテゴリ（2026-08-25） ===== */
.snippet-manage-dialog { width:min(680px, calc(100vw - 32px)); max-height:min(86vh, 900px); overflow-y:auto; }
.snippet-form { max-width:none; }
.snippet-category-field { display:grid; gap:4px; max-width:280px; }
.snippet-category-field select { min-height:calc(31px * var(--ui-scale)); }
.snippet-category-manage { margin:0 0 12px; padding:9px 11px; border:1px solid var(--line); border-radius:8px; background:#f9fbfb; }
.snippet-category-manage summary { color:var(--ink); font-weight:700; font-size:calc(12px * var(--ui-scale)); }
.snippet-category-form { display:grid; gap:8px; margin:8px 0; }
.snippet-category-form input { max-width:320px; }
.snippet-category-list { display:grid; gap:6px; }
.snippet-category-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:7px 10px; background:var(--panel); border:1px solid var(--line); border-radius:6px; font-size:calc(12px * var(--ui-scale)); }
.snippet-category-row small { margin-left:8px; color:var(--muted); }
.snippet-search-field { display:grid; gap:4px; margin:0 0 10px; }
.snippet-pick small { display:block; margin-top:3px; color:var(--muted); font-weight:400; font-size:calc(10px * var(--ui-scale)); }

/* Google API writes remain behind a read-only target review and one explicit action. */
.google-reply-workflow { display:grid; gap:9px; margin:12px 0; padding:14px; border:2px solid #b77a31; border-radius:9px; background:#fff9ed; }
.google-reply-workflow[hidden], .google-reply-preview[hidden] { display:none; }
.google-reply-workflow h3 { margin:0; font-size:calc(15px * var(--ui-scale)); }
.google-reply-workflow h4 { margin:4px 0 -4px; font-size:calc(12px * var(--ui-scale)); }
.google-reply-workflow > .hint { margin:0; }
.google-reply-preview { display:grid; gap:8px; padding-top:8px; border-top:1px solid #dfc99e; }
.google-reply-meta { display:grid; gap:5px; margin:0; }
.google-reply-meta > div { display:grid; grid-template-columns:150px minmax(0,1fr); gap:8px; }
.google-reply-meta dt { color:var(--muted); font-size:calc(11px * var(--ui-scale)); }
.google-reply-meta dd { margin:0; font-size:calc(12px * var(--ui-scale)); overflow-wrap:anywhere; }
.google-reply-body { max-height:230px; overflow:auto; margin:0; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--ink); white-space:pre-wrap; overflow-wrap:anywhere; font:calc(12px * var(--ui-scale))/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; }
.google-send-action { min-height:44px; justify-self:start; padding:8px 16px; border:2px solid #8e311e; border-radius:7px; background:#a43e25; color:#fff; font-weight:700; }
.google-send-action:hover:not(:disabled) { background:#842f1d; }
.google-send-action:disabled { opacity:.5; }
.google-reply-status { min-height:1.4em; margin:0; font-size:calc(12px * var(--ui-scale)); color:#603d13; }
@media(max-width:600px) { .google-reply-meta > div { grid-template-columns:1fr; gap:1px; } .google-send-action { width:100%; } }

/* ===== 新方式の学習状況 ===== */
.reply-learning { margin:10px 14px 0; padding:10px 12px; border:1px solid #bcd8c4; border-radius:8px; background:#f2f9f3; }
.reply-learning-state { margin:0; font-size:calc(12px * var(--ui-scale)); color:#215c36; }
.reply-learning-state.saved { font-weight:700; }
.reply-learning-exemplars { margin-top:8px; }
.reply-learning-exemplars > summary { color:var(--dark); font-weight:700; font-size:calc(12px * var(--ui-scale)); }
.reply-learning-exemplars-body { display:grid; gap:10px; margin-top:8px; }
.exemplar-card { padding:10px 12px; background:var(--panel); border:1px solid var(--line); border-radius:7px; }
.exemplar-card h4 { margin:0 0 6px; font-size:calc(12px * var(--ui-scale)); }
.exemplar-reason { margin:0; color:var(--muted); font-size:calc(11px * var(--ui-scale)); }
.exemplar-reasons { margin:2px 0 8px; padding-left:18px; }
.exemplar-reasons li { font-size:calc(11px * var(--ui-scale)); }
.exemplar-label { margin:6px 0 2px; color:var(--muted); font-size:calc(11px * var(--ui-scale)); }
.exemplar-card blockquote { margin:0; padding:7px 9px; border-left:3px solid #b9cbd2; background:#f7fafb; font-size:calc(11px * var(--ui-scale)); white-space:pre-wrap; }
.exemplar-card blockquote.exemplar-reply { border-left-color:var(--green); background:#f3faf5; }

/* V1はPCでは従来どおり常時表示（summaryを隠す）。スマホだけアコーディオンにする。 */
.v1-disclosure { margin:0; }
.v1-disclosure > summary { display:none; }
.list-drawer-toggle { display:none; }
/* ドロワー専用のUIはPC幅では存在しないものとして扱う（PC版の左ペインは従来どおり一覧だけ） */
.drawer-head, .drawer-scopes, .drawer-context, .filter-disclosure { display:none; }

/* ===== スマホ幅（PC版には影響しない） ===== */
@media (max-width: 700px) {
  body { overflow-x:hidden; }
  /* 口コミ一覧の入口は他の操作ボタンに埋もれさせず、ヘッダー先頭で目立たせる */
  .list-drawer-toggle { display:inline-flex; align-items:center; justify-content:center; order:-1;
    min-width:44px; min-height:44px; padding:8px; background:#fff; color:var(--dark); border-radius:8px;
    font-size:calc(19px * var(--ui-scale)); line-height:1; font-weight:800;
    box-shadow:0 1px 4px rgba(9,40,50,.28); }
  .header-controls { gap:8px; }
  /* 店舗名まで含めても1行に収まる大きさへ落とす（構造は変えない） */
  h1 { font-size:calc(17px * var(--ui-scale)); }
  /* 3枚を横並びに詰め込まず、全件を1行全幅・未返信/返信済みを2列にする */
  .work-queue .action-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .work-queue .action-cards .action-card-wrap:first-child { grid-column:1 / -1; }
  .work-queue .action-card { min-height:56px; }
  /* 未返信・返信済みはラベルだけで意味が伝わるため、狭い幅では補足を省いて高さを詰める */
  .action-card[data-reply-scope="replied"] small { display:none; }
  .action-card-help { top:50%; right:6px; width:44px; height:44px; transform:translateY(-50%); }
  .action-card[data-reply-scope="all"] { padding-right:56px; }
  .brand-home { min-height:44px; }
  /* 口コミ一覧ドロワー: 上から「見出し＋閉じる → 主切替 → 店舗/媒体 → 一覧 → 絞り込み」。
     一覧だけが内部スクロールするので、下端の「絞り込み」へ常に届く。 */
  #review-list-pane { position:fixed; top:0; left:0; z-index:40; width:min(88vw, 360px); height:100dvh !important;
    max-height:none; padding:10px; background:#eeece5; border-right:1px solid var(--line);
    box-shadow:2px 0 18px rgba(11,50,64,.24); overflow:hidden; transform:translateX(-102%);
    transition:transform .18s ease-out; display:flex; flex-direction:column; gap:8px; }
  body.drawer-open #review-list-pane { transform:translateX(0); }
  body.drawer-open::after { content:""; position:fixed; inset:0; z-index:30; background:rgba(12,40,50,.38); }
  .drawer-head { display:flex; align-items:center; justify-content:space-between; gap:8px; flex:none; }
  .drawer-head h2 { margin:0; font-size:calc(15px * var(--ui-scale)); }
  #drawer-close { min-height:44px; }
  .drawer-scopes { display:flex; flex:none; flex-wrap:wrap; gap:6px; }
  .drawer-scope { display:flex; align-items:center; gap:6px; min-height:44px; padding:6px 11px; background:var(--panel);
    color:var(--ink); border:1px solid var(--line); font-size:calc(12px * var(--ui-scale)); }
  .drawer-scope b { color:var(--green-dark); font-size:calc(14px * var(--ui-scale)); }
  .drawer-scope.selected { border-color:#0e7187; box-shadow:inset 0 0 0 1px #0e7187; background:#e7f5f7; }
  .drawer-scope-alert { background:#fdece7; border-color:#d1603c; }
  .drawer-scope-alert b { color:#b0421f; }
  .drawer-scope-alert.selected { border-color:#b0421f; box-shadow:inset 0 0 0 1px #b0421f; background:#fbe0d8; }
  /* 店舗・媒体切替は使えるが、一覧より目立たせない */
  .drawer-context { display:flex; flex:none; align-items:center; flex-wrap:wrap; gap:5px; padding-bottom:8px;
    border-bottom:1px solid var(--line); }
  .drawer-context .context-divider { display:none; }
  /* 600px以下の「切替を全幅にする」既存ルールは、ドロワー内では打ち消してコンパクトに保つ */
  .drawer-context .segmented { width:auto; }
  .drawer-context .segmented button { flex:0 0 auto; min-height:36px; padding:6px 10px; font-size:calc(11px * var(--ui-scale)); }
  #review-list-pane #review-list { flex:1 1 auto; min-height:64px; overflow-y:auto; overscroll-behavior:contain; }
  /* スマホの行は 投稿者名・日付・評価・対応状態 に絞る（元データの確認状況はPC側だけ） */
  .row-note-attention { display:none; }
  .filter-disclosure { display:block; flex:none; max-height:60vh; overflow-y:auto; padding-top:8px;
    border-top:1px solid var(--line); }
  .filter-disclosure > summary { min-height:44px; display:flex; align-items:center;
    font-size:calc(12px * var(--ui-scale)); font-weight:700; color:var(--dark); }
  #review-list-pane .controls { display:grid; grid-template-columns:1fr; gap:8px; padding:6px 0 0; margin:0; }
  #review-list-pane .controls label { flex:none; }
  #review-list-pane #counts { margin:0; }
  main { display:block; }
  article { padding:14px 12px 28px; }
  /* V2最優先の縦1列。V1は折りたたみ */
  .reply-comparison { grid-template-columns:minmax(0,1fr); gap:10px; padding:0 10px; }
  .editor.reply-workspace > h2, .editor.reply-workspace > p, .editor.reply-workspace > .action-buttons { margin-left:10px; margin-right:10px; }
  .editor #v2-editor { min-height:320px; }
  .v1-disclosure > summary { display:list-item; padding:8px 0; color:var(--dark); font-weight:700; font-size:calc(12px * var(--ui-scale)); }
  .v1-disclosure[open] > summary { margin-bottom:6px; }
  .v1-source-view { min-height:0; height:auto; max-height:360px; }
  .reply-learning { margin:10px; }
  /* タップしやすい大きさ */
  .action-buttons button, .snippet-insert-button, .snippet-pick, .list-drawer-toggle { min-height:44px; }
  .action-buttons { gap:8px; }
  .action-buttons button { flex:1 1 46%; }
  .snippet-picker, .snippet-manage-dialog, .help-dialog { width:calc(100vw - 20px); max-height:88vh; padding:12px; }
  .snippet-picker-body { max-height:56vh; }
  .review-text { max-height:220px; }
  header { padding:12px 14px 10px; }
  pre { padding:10px; }
}

/* スマホでは「食べログ返信（Safari）」を隠す: サーバー側で /usr/bin/pbcopy と
   `open -a Safari` を実行する Mac 専用経路のため、スマホから押してもMac側で開くだけ。
   通常の「食べログ返信」（ブラウザのコピー＋新規タブ）はスマホでも成立する。 */
@media (max-width: 700px) {
  .tabelog-safari-action { display:none !important; }
}

/* PC幅では、V1のアコーディオンが閉じていても中身を常に表示する（PC版の比較表示を維持）。
   スマホ幅のときだけ通常のdetailsとして開閉させる。 */
@media (min-width: 701px) {
  .v1-disclosure:not([open]) > *:not(summary) { display:revert; }
  .v1-disclosure::details-content { content-visibility:visible; }
}
