/* Only the Keigo workbench changes; the page frame and lower content stay shared. */
.keigo-tool-hero .keigo-workspace { width:100%; max-width:none; margin:0; padding:0; border:0; border-radius:0; background:transparent; }
.keigo-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:28px; }
.keigo-tool-hero .reply-channel { gap:4px; padding:4px; border-radius:999px; background:#f3f5f2; }
.keigo-tool-hero .reply-channel button { padding:9px 20px; font-size:13px; line-height:1.6; color:#787f79; white-space:nowrap; }
.keigo-tool-hero .reply-channel button[aria-pressed=true] { background:#fff; color:#333b36; box-shadow:0 1px 5px #29352c0c; }
.keigo-tool-hero .reply-workspace-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:40px; align-items:start; overflow:visible; border:0; border-radius:0; background:none; }
.keigo-tool-hero .reply-input-panel,.keigo-tool-hero .reply-output-panel { gap:0; padding:0; background:none; border:0; }
.keigo-tool-hero .reply-panel-heading { min-height:32px; margin-bottom:12px; gap:12px; }
.keigo-tool-hero .reply-panel-heading h2 { font-size:13px; line-height:1.6; font-weight:500; letter-spacing:.02em; color:#7a807c; }
.keigo-tool-hero #tool-message,.keigo-tool-hero #tool-draft,.keigo-tool-hero .reply-empty { width:100%; min-width:0; height:240px; min-height:200px; margin:0; padding:28px 30px; border:1px solid transparent; border-radius:26px; background:#f3f5f2; font:inherit; font-size:17px; line-height:1.9; color:var(--ink); box-shadow:none; resize:vertical; }
.keigo-tool-hero #tool-message::placeholder { color:#9a9f99; }
.keigo-tool-hero #tool-message:focus,.keigo-tool-hero #tool-draft:focus { outline:2px solid #689976; outline-offset:3px; }
.keigo-tool-hero #tool-draft { background:#f7f8f6; }
.keigo-tool-hero .reply-empty { display:block; text-align:left; background:#f7f8f6; }
.keigo-tool-hero .reply-empty p { color:#a1a69f; font-size:17px; line-height:1.9; }
.keigo-tool-hero .reply-result { flex:none; margin:0; gap:16px; }
.keigo-tool-hero #tool-draft,.keigo-tool-hero .reply-empty { flex:none; }
.keigo-tool-hero .reply-copy { min-width:0; border:0; border-radius:0; padding:6px 0; background:transparent; color:#646e65; font-size:12px; text-decoration:underline; text-underline-offset:4px; }
.keigo-tool-hero .reply-generate-row { justify-content:space-between; margin-top:24px; gap:16px; }
.keigo-clear { display:grid; place-items:center; width:46px; height:46px; padding:0; flex:none; border:0; border-radius:50%; background:#f0f2ee; color:#7d867d; cursor:pointer; }
:root body.reply-tool-page main .keigo-tool-hero .reply-generate { flex:none; margin-left:auto; min-height:48px; padding:12px 28px; border-radius:999px; background:var(--button-fill); color:var(--button-ink); border:1px solid var(--button-edge); font-size:14px; }
:root body.reply-tool-page main .keigo-tool-hero .reply-generate:disabled { opacity:1; background:#e9ede6; color:#a4ada0; border-color:#e9ede6; }
:root body.reply-tool-page main .keigo-tool-hero .reply-generate.is-loading { background:var(--button-fill); color:var(--button-ink); border-color:var(--button-edge); }
.keigo-tool-hero .keigo-settings { margin-top:16px; padding:0; }
.keigo-tool-hero .reply-more summary,.keigo-tool-hero .tool-changes summary { font-size:12px; line-height:1.8; color:#7a807c; }
.keigo-tool-hero .tool-extra-fields { gap:16px; margin-top:20px; }
.keigo-tool-hero .reply-settings { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; margin:0; }
.keigo-tool-hero .reply-field label { font-size:12px; line-height:1.6; color:#71796f; }
.keigo-tool-hero .reply-field textarea,.keigo-tool-hero .tool-custom-refine textarea { border-color:#e0e5dc; background:#fbfcfa; font-size:14px; }
.keigo-tool-hero .tool-select-trigger { border-color:#e0e5dc; border-radius:12px; background:#fbfcfa; font-size:13px; }
.keigo-example-menu { position:relative; }
.keigo-example-menu summary { color:#7a807c; font-size:12px; cursor:pointer; list-style:none; }
.keigo-example-menu summary::-webkit-details-marker { display:none; }
.keigo-example-menu > div { position:absolute; z-index:5; right:0; top:calc(100% + 10px); display:flex; flex-direction:column; gap:4px; min-width:185px; padding:7px; border:1px solid #e5e9e2; border-radius:14px; background:#fff; box-shadow:0 6px 24px #263b2b0c; }
.keigo-tool-hero .keigo-example-menu button { padding:12px; border:0; border-radius:8px; text-align:left; background:#fff; color:#4f5c50; font-size:13px; }
.keigo-tool-hero .keigo-example-menu button:hover { background:#f3f5f2; }
.keigo-notices { display:flex; align-items:flex-start; flex-direction:column; gap:7px; margin-top:22px; }
.keigo-tool-hero .reply-allowance { font-size:11px; line-height:1.8; color:#7a807c; }
.keigo-tool-hero .reply-data-note { margin:0; font-size:11px; line-height:1.9; color:#969b94; }
.keigo-tool-hero .reply-status-wrap { margin-top:16px; }
.keigo-tool-hero .tool-change p,.keigo-tool-hero .reply-status { font-size:13px; line-height:1.8; }
.keigo-tool-hero .reply-status-wrap:has(.reply-status:empty) { margin:0; }
.keigo-tool-hero :is(a,button,summary):focus-visible { outline:2px solid #689976; outline-offset:4px; }
@media(max-width:850px) {
  .keigo-tool-hero .reply-workspace-grid { grid-template-columns:1fr; gap:36px; }
  .keigo-tool-hero #tool-message,.keigo-tool-hero #tool-draft,.keigo-tool-hero .reply-empty { height:230px; }
  .keigo-tool-hero .reply-output-panel { scroll-margin-top:24px; }
}
@media(max-width:600px) {
  .keigo-toolbar { margin-bottom:24px; gap:12px; }
  .keigo-tool-hero .reply-channel { flex-wrap:nowrap; padding:3px; }
  .keigo-tool-hero .reply-channel button { padding:9px 13px; font-size:12px; }
  .keigo-tool-hero #tool-message,.keigo-tool-hero #tool-draft,.keigo-tool-hero .reply-empty { height:220px; padding:23px; border-radius:23px; font-size:16px; }
  .keigo-tool-hero .reply-empty p { font-size:16px; }
  .keigo-tool-hero .reply-generate-row { margin-top:20px; }
  .keigo-tool-hero .reply-field textarea,.keigo-tool-hero .tool-custom-refine textarea,.keigo-tool-hero .tool-select-trigger { font-size:16px; }
}

.keigo-tool-hero #tool-message + .reply-field { margin-top:20px; }
.keigo-tool-hero .reply-input-panel > .reply-field { gap:8px; }
.keigo-tool-hero .reply-output-panel { scroll-margin-top:112px; }

.keigo-tool-hero .keigo-primary-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; }
.keigo-tool-hero .keigo-primary-settings .reply-field { display:grid; grid-template-rows:subgrid; grid-row:span 2; gap:8px; }
.keigo-count { margin:7px 0 0; color:var(--muted); font-size:11px; line-height:1.6; text-align:right; }
.keigo-tool-hero .reply-result .keigo-count { margin-top:-9px; }
.keigo-reference-group { margin-top:52px; }
.keigo-reference-group h3 { font-size:28px; line-height:1.4; letter-spacing:-.02em; }
.keigo-reference-group > p { margin:14px 0 24px; font-size:16px; line-height:1.8; }
.keigo-reference .keigo-reference-note { margin-top:18px; color:var(--muted); font-size:13px; line-height:1.85; }
.keigo-reference-note a { color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.keigo-reference-scroll { max-width:100%; }
.keigo-reference-scroll table { min-width:700px; }
.keigo-reference-search { display:grid; grid-template-columns:auto minmax(180px,320px) 1fr; align-items:center; gap:14px; margin:24px 0 20px; }
.keigo-reference-search label,.keigo-reference-search p { font-size:13px; }
.keigo-reference-search p { color:var(--muted); }
.keigo-reference-search input { min-width:0; width:100%; padding:11px 14px; border:1px solid #d8dfdc; border-radius:12px; background:#fff; color:var(--ink); font:inherit; font-size:14px; }
.keigo-reference-search input:focus-visible { outline:2px solid #6f967d; outline-offset:2px; }
@media(max-width:600px) {
  .keigo-tool-hero .keigo-primary-settings { grid-template-columns:1fr; gap:16px; }
  .keigo-tool-hero .keigo-primary-settings .reply-field { display:flex; grid-row:auto; }
  .keigo-reference .reply-section-heading h2 { font-size:28px; line-height:1.4; }
  .keigo-reference-group { margin-top:36px; }
  .keigo-reference-group h3 { font-size:24px; }
  .keigo-reference-search { grid-template-columns:1fr; gap:8px; }
  .keigo-reference-search input { font-size:16px; }
}

.keigo-reference .reply-section-heading h2 span { display:inline-block; }

.keigo-tool-hero .keigo-type-help { margin:10px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }

.keigo-result-actions,.keigo-review-actions { display:flex; align-items:center; gap:16px; }
.keigo-result-actions { flex:none; }
.keigo-review-actions[hidden] { display:none; }

.keigo-result-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.keigo-rewrite-menu { position:relative; }
.keigo-tool-hero :is(.keigo-rewrite-menu > summary,.keigo-copy) { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:42px; padding:9px 16px; border:1px solid #dbe3d9; border-radius:999px; background:#f7f8f6; color:#4b5f4c; font-size:13px; line-height:1.6; text-decoration:none; cursor:pointer; list-style:none; }
.keigo-rewrite-menu > summary::-webkit-details-marker { display:none; }
.keigo-rewrite-menu > div { position:absolute; z-index:10; bottom:calc(100% + 8px); left:0; display:flex; flex-direction:column; min-width:190px; overflow-y:auto; padding:6px; border:1px solid var(--glass-edge); border-radius:16px; background:var(--glass-fill); box-shadow:var(--glass-shadow),0 0 0 1px #7687991a; backdrop-filter:blur(22px) saturate(1.6); -webkit-backdrop-filter:blur(22px) saturate(1.6); }
.keigo-rewrite-menu [role=menuitem] { min-height:42px; padding:10px 14px; border:0; border-radius:10px; background:transparent; color:var(--ink); font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.keigo-rewrite-menu [role=menuitem]:is(:hover,:focus-visible) { background:#ffffffad; }
.keigo-rewrite-menu summary.is-loading svg { animation:keigo-rewrite-spin 1s linear infinite; }
@keyframes keigo-rewrite-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .keigo-rewrite-menu summary.is-loading svg { animation:none; } }

.keigo-toolbar { flex-wrap:wrap; }
.keigo-tutorial-controls { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
.keigo-tutorial-controls[hidden] { display:none; }
.keigo-tutorial-controls button { min-height:32px; padding:4px 0; border:0; background:transparent; color:var(--ink); font:inherit; text-decoration:underline; text-underline-offset:4px; cursor:pointer; }


.keigo-input-actions { display:contents; }
.keigo-mobile-settings { display:none; }
@media(max-width:850px) {
  .usecase-breadcrumb:has(+ .keigo-tool-hero) { display:none; }
  body.reply-tool-page main > .keigo-tool-hero { padding-top:16px; }
  .keigo-tool-hero .reply-tool-intro { margin-bottom:22px; }
  .keigo-tool-hero .reply-tool-intro h1 { font-size:clamp(26px,7.2vw,32px); line-height:1.25; letter-spacing:-.035em; }
  .keigo-tool-hero .reply-tool-intro .lead { display:none; }
  .keigo-toolbar { margin-bottom:12px; }
  .keigo-toolbar:has(.keigo-tutorial-controls[hidden]) { display:none; }
  .keigo-tool-hero .reply-workspace-grid { gap:28px; }
  .keigo-tool-hero .reply-panel-heading { min-height:24px; margin-bottom:8px; }
  .keigo-tool-hero #tool-message { height:auto; min-height:144px; max-height:min(320px,40svh); padding:18px 20px; border-radius:22px; line-height:1.8; resize:none; }
  .keigo-input-actions { display:grid; grid-template-columns:44px auto minmax(0,1fr); align-items:start; gap:0 10px; margin-top:14px; }
  .keigo-tool-hero .keigo-settings { grid-column:1 / -1; grid-row:2; min-width:0; margin:0; }
  .keigo-tool-hero .keigo-settings > summary { display:none; }
  .keigo-mobile-settings { grid-column:2; grid-row:1; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0; border:0; background:transparent; color:#7a807c; font:inherit; font-size:13px; cursor:pointer; }
  .keigo-mobile-settings[aria-expanded=true] svg { transform:rotate(180deg); }
  .keigo-tool-hero .reply-generate-row { display:contents; }
  .keigo-clear { grid-column:1; grid-row:1; width:44px; height:44px; }
  :root body.reply-tool-page main .keigo-tool-hero .reply-generate { grid-column:3; grid-row:1; justify-self:end; min-height:44px; padding:10px 22px; font-size:13px; }
  .keigo-tool-hero [data-tool-cancel] { grid-column:3; grid-row:1; justify-self:end; z-index:1; min-height:44px; padding:10px 22px; border:1px solid var(--button-edge); border-radius:999px; background:var(--button-fill); color:var(--button-ink); font-size:13px; }
  .keigo-tool-hero .reply-input-panel:has([data-tool-cancel]:not([hidden])) .reply-generate { visibility:hidden; }
  .keigo-tool-hero .keigo-settings .tool-extra-fields { margin:16px 0 0; }
  .keigo-tool-hero .keigo-settings .keigo-primary-settings { margin-top:0; }
  .keigo-tool-hero .keigo-settings .keigo-type-help { margin:0; }
  .keigo-tool-hero .keigo-settings :is(textarea,.tool-select-trigger) { font-size:16px; }
  .keigo-tool-hero .keigo-settings .reply-channel { justify-self:start; }
  .keigo-tool-hero .reply-output-panel:has([data-tool-result][hidden]):has([data-tool-status]:empty) { display:none; }
  .keigo-tool-hero .reply-empty { display:none; }
  .keigo-tool-hero .reply-output-panel .reply-panel-heading { min-height:0; }
  .keigo-tool-hero #tool-draft { height:auto; min-height:1.8em; padding:0; border:0; border-radius:0; background:transparent; line-height:1.85; resize:none; }
  .keigo-tool-hero .reply-result .keigo-count { display:none; }
  .keigo-tool-hero .reply-result { gap:14px; }
  .keigo-result-toolbar { gap:10px; }
  .keigo-result-actions { margin-left:auto; }
  .keigo-tool-hero .keigo-result-actions .reply-copy { min-height:44px; padding:6px; }
  .keigo-tool-hero :is(.keigo-rewrite-menu > summary,.keigo-copy) { min-height:44px; padding:9px 14px; }
  .keigo-review-actions { gap:12px; flex-wrap:wrap; }
  .keigo-notices { margin-top:20px; }
}
