:root{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Hiragino Sans","Yu Gothic UI","Noto Sans JP",sans-serif;
  color:#1d1d1f;
  background:#f5f5f7;
  color-scheme:light;
  --bg:#f5f5f7;
  --surface:rgba(255,255,255,.88);
  --surface-solid:#fff;
  --surface-soft:#f7f7f9;
  --border:#e2e2e7;
  --border-strong:#d2d2d7;
  --text:#1d1d1f;
  --muted:#6e6e73;
  --blue:#0071e3;
  --blue-hover:#0077ed;
  --blue-soft:#eaf3ff;
  --danger:#c9342f;
  --amber:#8a6200;
  --amber-bg:#fff8df;
  --shadow:0 1px 2px rgba(0,0,0,.04),0 10px 28px rgba(0,0,0,.05);
  --shadow-float:0 18px 48px rgba(0,0,0,.14);
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;min-width:900px;background:var(--bg);color:var(--text);font-size:13px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,select,input,textarea{font:inherit;color:inherit}
input[type="checkbox"],input[type="radio"]{accent-color:var(--blue)}
button,.button-link,select,.display-settings>summary{
  border:1px solid var(--border-strong);
  border-radius:10px;
  background:rgba(255,255,255,.92);
  color:var(--text);
  min-height:34px;
  padding:7px 12px;
  text-decoration:none;
  box-shadow:0 1px 1px rgba(0,0,0,.025);
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .08s ease;
}
button{cursor:pointer}
button:hover:not(:disabled),.button-link:hover,.display-settings>summary:hover{background:#fff;border-color:#b8b8bd}
button:active:not(:disabled){transform:translateY(1px)}
button:disabled{opacity:.38;cursor:default;box-shadow:none}
button:focus-visible,.button-link:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,.display-settings>summary:focus-visible{outline:3px solid rgba(0,113,227,.18);outline-offset:1px;border-color:var(--blue)}
.primary,.action-primary{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 2px 7px rgba(0,113,227,.18)}
.primary:hover:not(:disabled),.action-primary:hover:not(:disabled){background:var(--blue-hover);border-color:var(--blue-hover)}
.secondary-strong{font-weight:600}
.danger-quiet{color:var(--danger)}
.compact-btn,.copy{min-height:30px;padding:5px 10px;border-radius:9px;font-size:12px;white-space:nowrap}

.appbar{
  position:sticky;top:0;z-index:30;
  max-width:1480px;margin:0 auto;
  padding:12px 16px 10px;
  background:rgba(245,245,247,.84);
  border-bottom:1px solid rgba(210,210,215,.72);
  backdrop-filter:saturate(180%) blur(22px);
  -webkit-backdrop-filter:saturate(180%) blur(22px);
}
.brand-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}
.brand-block{display:flex;align-items:center;gap:10px;min-width:0}
.brand-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(145deg,#2789ef,#0068d8);color:#fff;font-size:12px;font-weight:750;letter-spacing:.02em;box-shadow:0 5px 14px rgba(0,113,227,.2)}
.brand-copy{display:flex;align-items:baseline;gap:9px;min-width:0}
.brand-name{font-size:17px;font-weight:720;letter-spacing:-.02em}
.brand-subtitle{font-size:11px;color:var(--muted);white-space:nowrap}
.build-label{font-size:10px;color:#8a8a8f;white-space:nowrap}
.toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.main-toolbar{min-height:38px}
.status-text{margin-left:auto;max-width:390px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--muted)}

.display-settings{position:relative}
.display-settings>summary{list-style:none;cursor:pointer;user-select:none;display:flex;align-items:center;gap:6px}
.display-settings>summary::-webkit-details-marker{display:none}
.display-settings>summary::after{content:"⌄";font-size:12px;color:var(--muted);line-height:1}
.display-settings[open]>summary::after{content:"⌃"}
.settings-popover{position:absolute;top:42px;left:0;z-index:50;width:310px;padding:14px;background:rgba(255,255,255,.96);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-float);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.settings-title{font-size:11px;font-weight:700;color:var(--muted);margin:0 0 9px 2px;text-transform:uppercase;letter-spacing:.04em}
.check{display:flex;align-items:center;gap:8px;font-size:12px;min-height:31px;padding:2px 3px;white-space:normal}

.ai-toolbar{margin-top:10px;padding:9px 10px;border:1px solid #d8e7f8;border-radius:14px;background:rgba(242,248,255,.92);box-shadow:0 1px 1px rgba(0,0,0,.02)}
.ai-message{display:flex;align-items:baseline;gap:8px;min-width:250px}
.ai-kicker{font-size:11px;font-weight:750;color:#275b91;white-space:nowrap}
.ai-guidance{font-size:11px;color:#56708a;white-space:nowrap}
.spacer{flex:1}
.batch-wrap{font-size:10px;white-space:nowrap;color:var(--muted)}
.batch-wrap select{min-height:30px;padding:4px 8px}
.bridge-status{padding:5px 9px;border-radius:999px;font-size:10px;font-weight:700;white-space:nowrap}
.bridge-status.ready{background:#e9f7ee;color:#24693e}
.bridge-status.fallback{background:#fff1cf;color:#795700}

.split{
  min-height:calc(100vh - 145px);
  max-width:1480px;margin:0 auto;
  display:grid;grid-template-columns:286px minmax(0,1fr);
  gap:14px;padding:14px 16px 18px;
}
.sidebar{
  align-self:start;position:sticky;top:145px;
  height:calc(100vh - 164px);min-height:560px;
  display:flex;flex-direction:column;min-width:0;
  padding:13px;
  background:var(--surface-solid);
  border:1px solid var(--border);
  border-radius:17px;
  box-shadow:var(--shadow);
}
.side-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.side-title{font-size:13px;font-weight:700;letter-spacing:-.01em}
.doc-count{font-weight:500;color:var(--muted);font-size:10px}
.review-filter{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:4px;white-space:nowrap}
.selection-row{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:10px;color:var(--muted);margin-bottom:8px}
.selection-row button{font-size:10px;min-height:26px;padding:3px 7px;border-radius:8px}
.record-list{background:var(--surface-soft);border:1px solid #ededf0;border-radius:12px;overflow:auto;flex:1;min-height:180px;padding:4px}
.list-item{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:3px;padding:8px 7px;margin:1px 0;border:0;border-radius:9px;cursor:pointer;font-size:12px;line-height:1.4;transition:background .12s ease}
.list-item:hover{background:#fff}
.list-item.selected{background:var(--blue-soft);box-shadow:inset 0 0 0 1px rgba(0,113,227,.09)}
.list-item.pending{color:#89898e}
.list-item.needs-review-item{background:#fff9e8}
.list-item.needs-review-item.selected{background:#fff0bf}
.list-review-check{margin:2px 0 0 1px}
.list-item-main{min-width:0}
.list-badge{font-weight:700;margin-right:4px}
.list-review-mark{display:inline-block;margin-left:4px;padding:1px 5px;border-radius:999px;background:#ffe7a3;color:#705100;font-size:9px;font-weight:750}
.nav-row,.side-actions{display:flex;gap:7px;margin-top:8px}
.nav-row button{flex:1}
.side-actions button{width:100%}
.small-note{font-size:10px;color:#8a8a8f;margin-top:9px;text-align:center}

.workspace{min-width:0;padding:0 0 34px;overflow:visible}
.empty-view{display:none!important}
.record-view{max-width:1080px;margin:0 auto}
.record-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;margin:0 2px 9px}
.record-title{font-size:14px;font-weight:650;line-height:1.35;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.property-badge{flex:0 0 auto;display:inline-flex;align-items:center;font-size:10px;font-weight:750;padding:5px 9px;border-radius:999px;margin:0}
.property-badge.land{background:#e8f7ed;color:#286641}
.property-badge.building{background:#e8f2ff;color:#275e9b}

.panel{background:var(--surface-solid);border:1px solid var(--border);border-radius:17px;margin-bottom:12px;overflow:hidden;box-shadow:var(--shadow)}
.panel-title{display:flex;align-items:center;min-height:43px;font-size:12px;font-weight:700;padding:10px 14px;background:linear-gradient(180deg,#fff,#fdfdfd);border-bottom:1px solid #efeff2}
.row-title{justify-content:space-between;gap:12px}
.field-section{padding:9px 14px 11px}
.field-row{display:grid;grid-template-columns:118px minmax(0,1fr) auto;gap:8px;align-items:center;margin:6px 0}
.field-row label{font-size:11px;color:var(--muted)}
.field-row input,.owner-line input[type="text"],.history-owner-line input,.free-row input,.history-text,.advanced textarea{
  width:100%;border:1px solid var(--border-strong);border-radius:10px!important;background:#fbfbfd;padding:8px 10px;box-shadow:inset 0 1px 1px rgba(0,0,0,.015);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.field-row input:focus,.owner-line input[type="text"]:focus,.history-owner-line input:focus,.free-row input:focus,.history-text:focus,.advanced textarea:focus{background:#fff;border-color:#75aef0;box-shadow:0 0 0 3px rgba(0,113,227,.11);outline:none}
.owner-status-row{display:flex;gap:12px;padding:8px 14px 0;font-size:10px;color:var(--muted)}
.owner-section,.history-rows{padding:7px 14px 12px;min-height:48px}
.owner-line{display:grid;grid-template-columns:24px minmax(200px,1.5fr) auto minmax(140px,1fr) auto minmax(110px,.7fr) auto;gap:6px;align-items:center;margin:6px 0}
.owner-select{text-align:center}
.owner-history-card{border:1px solid #e9e9ed;border-radius:13px;padding:10px;margin:7px 0;background:#fafafd}
.history-meta{font-size:10px;color:var(--muted);margin-bottom:7px}
.history-owner-line{display:grid;grid-template-columns:minmax(180px,1.5fr) auto minmax(120px,1fr) auto minmax(90px,.7fr) auto;gap:6px;align-items:center}
.history-text{width:calc(100% - 28px);margin:12px 14px;min-height:116px;line-height:1.6;resize:vertical;font-family:inherit}
.free-row{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 14px}
.debug-actions{display:flex;gap:7px;margin:4px 2px 8px}
.debug-actions button{font-size:11px;min-height:31px}
.debug-box{background:#16181d;color:#e8e8ea;border:1px solid #2a2d34;border-radius:13px;padding:12px;white-space:pre-wrap;word-break:break-word;max-height:420px;overflow:auto;box-shadow:var(--shadow)}

.review-hint{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:7px 14px 1px;padding:8px 10px;border:1px solid #efd17c;border-radius:11px;background:var(--amber-bg);color:var(--amber);font-size:10px}
.review-hint button{font-size:10px;min-height:28px;padding:4px 8px;white-space:nowrap}
.review-hint[hidden]{display:none!important}
.review-panel{border-color:#ecd485}
.review-panel>.panel-title{background:#fffbef}
.review-reason{margin:8px 14px;padding:8px 10px;border-radius:10px;background:#fff8df;color:#745300;font-size:10px}
#reviewAllBtn:disabled,#selectedReviewBtn:disabled{opacity:.38}

.advanced{max-width:1480px;margin:0 auto;padding:0 16px 14px}
.advanced details{max-width:1080px;margin-left:auto;margin-right:0;background:rgba(255,255,255,.72);border:1px solid var(--border);border-radius:14px;padding:9px 12px;box-shadow:0 1px 2px rgba(0,0,0,.025)}
.advanced summary{cursor:pointer;color:var(--muted);font-size:11px;font-weight:650;user-select:none}
.advanced-inner{padding-top:11px}
.advanced textarea{font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.status{min-height:20px;color:#336b9e}
.result-fallback{margin-top:12px}
footer{max-width:1480px;margin:0 auto;text-align:right;color:#8a8a8f;font-size:10px;padding:3px 18px 12px}
.drag-target{outline:3px dashed rgba(0,113,227,.55);outline-offset:-8px;background:#eef6ff}

*{scrollbar-width:thin;scrollbar-color:#c8c8cd transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#c8c8cd;border:3px solid transparent;background-clip:padding-box;border-radius:999px}
::-webkit-scrollbar-track{background:transparent}

@media(max-width:1180px){
  .split{grid-template-columns:250px minmax(0,1fr);gap:10px;padding-left:10px;padding-right:10px}
  .appbar{padding-left:10px;padding-right:10px}
  .record-view{max-width:none}
  .status-text{max-width:260px}
  .ai-guidance{display:none}
}
@media(max-width:980px){
  body{min-width:760px}
  .split{grid-template-columns:220px minmax(0,1fr)}
  .sidebar{padding:10px}
  .owner-line{grid-template-columns:20px 1fr auto}
  .owner-line .name-field,.owner-line .share-field{grid-column:2}
  .owner-line .name-copy,.owner-line .share-copy{grid-column:3}
  .history-owner-line{grid-template-columns:1fr auto}
  .history-owner-line .h-name,.history-owner-line .h-share{grid-column:1}
  .history-owner-line .h-name-copy,.history-owner-line .h-share-copy{grid-column:2}
  .build-label{display:none}
  .status-text{display:none}
}

/* CP_J17_SEO_DISCOVERABILITY */
.public-links{display:flex;gap:14px;align-items:center;margin-left:auto;font-size:15px;font-weight:600;flex-wrap:wrap;justify-content:flex-end}.public-links a{color:var(--text-2);text-decoration:none;padding:8px 10px;border-radius:9px;line-height:1.2}.public-links a:hover{background:rgba(0,113,227,.08);color:var(--blue)}.noscript-info{margin:12px auto;max-width:1460px;padding:12px 16px;border-radius:12px;background:#fff3cd;color:#5f4b00;font-size:13px}@media(max-width:900px){.public-links{display:none}}

/* CP_J18_WHITE_BLACK_INLINE_SETTINGS_PDF_MERGE */
:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-solid:#ffffff;
  --surface-soft:#ffffff;
  --border:#111111;
  --border-strong:#111111;
  --shadow:0 1px 2px rgba(0,0,0,.03),0 8px 22px rgba(0,0,0,.035);
}
html,body{background:#fff}
.appbar{background:#fff;border-bottom:1px solid #111;backdrop-filter:none;-webkit-backdrop-filter:none}
button,.button-link,select{border-color:#111;background:#fff}
button:hover:not(:disabled),.button-link:hover{border-color:#000;background:#f7f7f7}
.primary,.action-primary{border-color:var(--blue)}
.ai-toolbar{margin-top:10px;padding:9px 0 10px;border:0;border-bottom:1px solid #111;border-radius:0;background:#fff;box-shadow:none}
.display-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:9px 0 4px;background:#fff}
.settings-inline-title{font-size:11px;font-weight:750;color:#111;white-space:nowrap}
.check-inline{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#222;white-space:nowrap}
.merge-controls{display:inline-flex;align-items:center;gap:6px;padding-left:2px}
.merge-label{font-size:10px;font-weight:750;color:#333;white-space:nowrap}
.sidebar,.panel,.advanced details{border-color:#111;background:#fff}
.record-list{border-color:#111;background:#fff}
.list-item{border:1px solid transparent}
.list-item.selected{box-shadow:inset 0 0 0 1px var(--blue)}
.panel-title{border-bottom:1px solid #111;background:#fff}
.field-row input,.owner-line input[type="text"],.history-owner-line input,.free-row input,.history-text,.advanced textarea{border-color:#111;background:#fff}
.owner-history-card{border-color:#111;background:#fff}
.review-hint{border-color:#111}
.debug-box{border-color:#111}
.selection-row{align-items:center}
.selection-buttons{display:inline-flex;gap:4px}
.selection-row button{border-color:#111}
.small-note{color:#555}
footer{color:#555}
@media(max-width:1180px){.display-toolbar{gap:9px}.check-inline{font-size:10px}.merge-label{display:none}}


/* Web v14 — separated merge row, cleaner macOS-like curves, postal lookup */
.merge-toolbar{margin-top:7px;padding:7px 0;border-top:1px solid #111;border-bottom:1px solid #111;gap:7px}
.merge-toolbar .merge-label{font-size:11px;font-weight:750;color:#111;min-width:48px}
.merge-note{font-size:10px;color:#666;margin-left:2px}
.main-toolbar .merge-controls{display:none!important}

/* One radius system avoids uneven-looking corners where nested borders meet. */
.sidebar,.panel,.advanced details{border-radius:14px!important;overflow:hidden;background-clip:padding-box;isolation:isolate}
.record-list{border-radius:12px!important;background-clip:padding-box;overflow:auto}
.panel-title{border-radius:0!important}
.owner-history-card{border-radius:11px!important;background-clip:padding-box;overflow:hidden}
.field-row input,.owner-line input[type="text"],.history-owner-line input,.free-row input,.history-text,.advanced textarea{border-radius:10px!important;background-clip:padding-box}
button,.button-link,select{border-radius:10px;background-clip:padding-box}
.list-item{border-radius:9px!important}

.list-item-main{min-width:0}
.list-primary-line{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-owner-mini{margin-top:2px;padding-left:1px;color:#111;font-size:9px;font-weight:500;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.panel-title-actions{display:flex;align-items:center;gap:7px;min-width:0}
.postal-tools{display:flex;align-items:center;gap:6px;min-width:0}
.postal-tabs{display:inline-flex;align-items:center;border:1px solid #111;border-radius:8px;overflow:hidden;background:#fff}
.postal-tab{border:0!important;border-right:1px solid #111!important;border-radius:0!important;min-height:25px!important;padding:3px 7px!important;font-size:9px;background:#fff!important;box-shadow:none!important}
.postal-tab:last-child{border-right:0!important}
.postal-tab.active{background:#111!important;color:#fff!important}
.postal-link{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:4px 9px;border:1px solid #111;border-radius:9px;background:#fff;color:#111;text-decoration:none;font-size:10px;font-weight:650;white-space:nowrap}
.postal-link:hover{background:#f5f5f5}
.postal-link[aria-disabled="true"]{display:none}
@media(max-width:1180px){.merge-note{display:none}.postal-link{font-size:9px;padding:4px 7px}.postal-tab{padding:3px 5px!important}}

/* Web v15 — local lookup using Japan Post official postal-code data */
.postal-result{display:inline-flex;align-items:center;min-height:27px;padding:4px 8px;border:1px solid #111;border-radius:9px;background:#fff;color:#111;font-size:10px;font-weight:700;white-space:nowrap}
.postal-code-select{min-height:27px;padding:3px 24px 3px 7px;border:1px solid #111;border-radius:9px;background:#fff;color:#111;font-size:10px}


/* Web v16 — postal code copies digits-only; owner mini text uses readable black */
.postal-result{font-family:inherit;cursor:pointer}
.postal-result:hover:not(:disabled){background:#f5f5f5}
.postal-result:disabled{cursor:default;opacity:.72}
