/* サイト専用の管理画面。公開ページ・標準管理画面のスタイルと分離。 */
body.ect-portal { --portal-green:#123d39; --portal-ink:#233d37; --portal-gold:#b6a34c; --portal-line:#dce5df; margin:0; background:#f3f5f2; color:var(--portal-ink); font:14px/1.7 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Meiryo",sans-serif; }
.ect-portal * { box-sizing:border-box; }
.ect-portal a { color:var(--portal-green); text-underline-offset:4px; }
.ect-portal button,.ect-portal input,.ect-portal select,.ect-portal textarea { font:inherit; }
.ect-portal button { cursor:pointer; }
.ect-portal button:disabled { cursor:wait; opacity:.55; }
.ect-portal h1,.ect-portal h2,.ect-portal p { margin-top:0; }
.ect-portal h1 { font-size:28px; letter-spacing:.04em; line-height:1.5; }
.ect-portal h2 { font-size:19px; line-height:1.5; margin-bottom:16px; }
.ect-portal svg { width:22px; height:22px; flex-shrink:0; }
.ect-portal a:focus-visible,.ect-portal button:focus-visible,.ect-portal summary:focus-visible { outline:3px solid var(--portal-gold); outline-offset:3px; }
.portal-sr-only,.portal-skip:not(:focus) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.portal-skip:focus { position:fixed; top:10px; left:10px; z-index:100; background:#fff; padding:12px; }
.portal-button { display:inline-flex; justify-content:center; align-items:center; gap:12px; min-height:44px; padding:10px 20px; border:1px solid var(--portal-green); border-radius:7px; background:var(--portal-green); color:#fff!important; text-decoration:none; font-weight:600; line-height:1.65; text-align:center; }
.portal-button:hover { background:#20574f; }
.portal-button--secondary { background:#fff; color:var(--portal-green)!important; border-color:#bfd0c6; }
.portal-button--secondary:hover { background:#edf3ee; }
.portal-actions { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.portal-field { margin-bottom:22px; min-width:0; }
.portal-field>label,.portal-field-label { display:block; font-weight:600; font-size:13px; margin-bottom:8px; }
.portal-field input:not([type=checkbox]),.portal-field select,.portal-field textarea,.portal-search input,.portal-search select,.portal-new-term input { width:100%; min-width:0; min-height:44px; padding:11px 13px; border:1px solid #cbd7cf; border-radius:6px; background:#fff; color:#213f35; box-shadow:none; }
.portal-field textarea { display:block; resize:vertical; line-height:1.85; }
.portal-field input:focus,.portal-field textarea:focus,.portal-field select:focus,.portal-search input:focus,.portal-search select:focus,.portal-new-term input:focus { outline:2px solid #63917a; outline-offset:1px; }
.portal-field input[readonly] { background:#eff3ef; }
.portal-check { display:flex!important; align-items:center; gap:9px; font-weight:400!important; font-size:13px; padding:5px 0; }
.portal-check input { width:17px; height:17px; accent-color:var(--portal-green); flex-shrink:0; }
.portal-help { color:#63756b; font-size:12px; line-height:1.8; margin:8px 0 0; }
.portal-required { display:inline-block; margin-left:10px; color:#9a433e; font-size:10px; }
.portal-notice { padding:14px 18px; border-left:3px solid #4a8565; background:#e8f2e9; border-radius:6px; margin-bottom:24px; overflow-wrap:anywhere; }
.portal-notice--error { border-color:#b34c42; background:#fff0ed; color:#963c33; }
.portal-login-layout { min-height:100vh; min-height:100dvh; padding:48px 20px 24px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:radial-gradient(ellipse at 90% 10%,#315747 0,transparent 42%),linear-gradient(145deg,#103f39,#132f2a); }
.portal-login-brand { width:min(100%,440px); margin-bottom:28px; display:flex; align-items:center; justify-content:space-between; color:#e4ece4; }
.portal-login-brand>a { font-size:29px; letter-spacing:.12em; color:#fff; font-weight:650; line-height:1.1; text-decoration:none; }
.portal-login-brand>a span { display:block; font-size:10px; letter-spacing:.25em; margin-top:8px; }
.portal-login-brand>p { margin:0; font-size:12px; letter-spacing:.15em; }
.portal-login-card { width:min(100%,440px); background:#fff; border-radius:14px; padding:38px 36px 30px; box-shadow:0 20px 70px #001c2040; }
.portal-login-card h1 { font-size:25px; margin:15px 0 10px; }
.portal-login-description { font-size:13px; color:#65766d; margin-bottom:28px; }
.portal-login-mark { display:inline-flex; color:var(--portal-green); padding:10px; border-radius:10px; background:#edf2ed; }
.portal-login-mark svg { width:27px; height:27px; }
.portal-login-submit { width:100%; justify-content:space-between; margin-top:24px; }
.portal-login-back { display:block; margin-top:24px; text-align:center; font-size:12px; }
.portal-login-footer { color:#b7c9ba; margin:26px 0 0; font-size:10px; letter-spacing:.2em; }
.portal-password-input { position:relative; }
.portal-password-input input { padding-right:65px!important; }
.portal-password-input button { position:absolute; right:5px; top:4px; bottom:4px; padding:5px 10px; border:0; background:transparent; color:#3b6151; font-size:12px; border-radius:4px; }
.portal-shell { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:100vh; }
.portal-sidebar { position:sticky; top:0; height:100vh; height:100dvh; display:flex; flex-direction:column; background:var(--portal-green); color:#fff; padding:32px 20px 22px; overflow-y:auto; }
.portal-brand { display:block; color:#fff!important; font-weight:650; font-size:28px; line-height:1.1; letter-spacing:.1em; padding:5px 12px 32px; text-decoration:none; }
.portal-brand span { display:block; font-size:10px; letter-spacing:.23em; margin-top:7px; }
.portal-brand small { display:block; font-size:11px; font-weight:400; letter-spacing:.1em; color:#b6cbbb; margin-top:22px; }
.portal-sidebar nav { display:grid; gap:7px; }
.portal-sidebar nav a { display:flex; gap:12px; align-items:center; min-height:48px; padding:11px 13px; color:#d6e2d7; border-radius:7px; text-decoration:none; font-size:13px; }
.portal-sidebar nav a:hover { background:#ffffff12; }
.portal-sidebar nav a[aria-current=page] { color:#fff; background:#ffffff20; box-shadow:inset 3px 0 var(--portal-gold); }
.portal-sidebar-bottom { margin-top:auto; padding:40px 12px 0; }
.portal-sidebar-bottom>a { color:#e4ebe4; font-size:12px; }
.portal-logout { display:flex; align-items:center; gap:10px; min-height:44px; border:0; background:none; color:#c3d3c7; padding:12px 0 0; font-size:12px!important; }
.portal-main { min-width:0; padding:28px 40px 60px; width:100%; max-width:1600px; }
.portal-topline { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:32px; padding-bottom:20px; border-bottom:1px solid var(--portal-line); color:#738575; font-size:10px; letter-spacing:.12em; }
.portal-user-name { max-width:40%; font-size:12px; letter-spacing:0; overflow-wrap:anywhere; }
.portal-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:26px; }
.portal-heading h1 { margin:0 0 8px; }
.portal-heading p { color:#617468; font-size:13px; margin:0; }
.portal-panel { background:#fff; border:1px solid var(--portal-line); border-radius:10px; padding:25px; margin-bottom:22px; min-width:0; }
.portal-dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.portal-dashboard-card { border-top:3px solid var(--portal-green); padding:28px; }
.portal-dashboard-card>p { font-size:13px; color:#607368; }
.portal-icon { display:inline-flex; background:#edf3ec; border-radius:9px; padding:12px; margin-bottom:20px; color:var(--portal-green); }
.portal-icon svg { width:27px; height:27px; }
.portal-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; background:#f6f8f4; border-radius:7px; padding:18px 8px; margin:24px 0; text-align:center; }
.portal-counts dt { font-size:11px; color:#6d806e; }
.portal-counts dd { margin:5px 0 0; font-size:29px; font-weight:600; line-height:1.2; }
.portal-counts a { text-decoration:none; display:block; padding:3px; }
.portal-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:8px; }
.portal-panel-heading h2 { margin:0; }
.portal-panel-heading>span { font-size:11px; color:#71816e; }
.portal-recent-row { display:flex; align-items:center; gap:16px; padding:21px 0; border-bottom:1px solid #e9eee7; text-decoration:none; }
.portal-recent-row:last-child { border-bottom:0; padding-bottom:0; }
.portal-recent-row strong { flex:1; font-weight:500; overflow-wrap:anywhere; }
.portal-recent-row time { color:#748270; font-size:12px; white-space:nowrap; }
.portal-kind,.portal-badge { display:inline-block; border:1px solid #d9e3d7; border-radius:4px; color:#63725f; padding:3px 8px; font-size:10px; white-space:nowrap; }
.portal-badge--publish { color:#2f6d4b; background:#edf5e9; border-color:#d7e7ce; }
.portal-badge--trash { color:#9a5750; background:#fff2ef; border-color:#f0d9d1; }
.portal-guide { background:#e7eee5; padding:25px 28px; border-radius:10px; }
.portal-guide h2 { font-size:17px; }
.portal-guide ol { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px; padding-left:20px; margin-bottom:0; }
.portal-guide strong { display:block; font-size:13px; margin-bottom:7px; }
.portal-guide li span { display:block; font-size:12px; color:#5f735e; }
.portal-empty { text-align:center; padding:35px 14px; color:#778571; font-size:13px; }
.portal-list-tools { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:center; gap:16px; margin-bottom:22px; }
.portal-search { display:flex; gap:8px; min-width:0; max-width:100%; }
.portal-search input { width:220px; }
.portal-search select { width:auto; }
.portal-result-count { font-size:12px; color:#6a7b66; border-bottom:1px solid var(--portal-line); padding-bottom:14px; }
.portal-content-row { display:flex; align-items:center; gap:18px; padding:21px 0; border-bottom:1px solid #e7ede4; }
.portal-content-row:last-child { border-bottom:0; }
.portal-content-thumb { display:flex; align-items:center; justify-content:center; width:72px; height:72px; flex-shrink:0; background:#f0f4ed; color:#a4b69d; border-radius:6px; overflow:hidden; }
.portal-content-thumb img { width:100%; height:100%; object-fit:cover; }
.portal-content-thumb svg { width:30px; height:30px; }
.portal-content-info { flex:1; min-width:0; }
.portal-content-info h2 { font-size:16px; margin:7px 0 5px; overflow-wrap:anywhere; }
.portal-content-info a { text-decoration:none; }
.portal-content-info p { margin:0; color:#758570; font-size:11px; }
.portal-row-actions { display:flex; align-items:center; gap:20px; }
.portal-text-button { border:0; background:none; min-height:40px; padding:8px 0; color:var(--portal-green); font-size:12px!important; }
.portal-text-button--danger { color:#9a5246; }
.portal-pagination { display:flex; justify-content:center; align-items:center; gap:16px; margin-top:20px; }
.portal-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:24px; align-items:start; }
.portal-editor-main,.portal-editor-side { min-width:0; }
.portal-publish-panel h2 { font-size:17px; }
.portal-publish-panel>.portal-button { width:100%; margin-top:10px; }
.portal-back { display:block; text-align:center; margin-top:19px; font-size:12px; }
.portal-details>summary { cursor:pointer; font-weight:600; font-size:16px; }
.portal-details[open]>summary { border-bottom:1px solid #e5ece0; padding-bottom:16px; margin-bottom:20px; }
.portal-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.portal-fields .portal-field:last-child { margin-bottom:0; }
.portal-field--wide { grid-column:1/-1; }
.portal-tax-options { display:grid; gap:5px; max-height:270px; overflow:auto; }
.portal-new-term { display:block; font-size:11px; color:#65795f; margin-top:20px; }
.portal-new-term input { margin-top:7px; font-size:12px; }
.portal-media-field { margin-top:24px; }
.portal-selected-images { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0; }
.portal-selected-images>img,.portal-selected-item>img { width:100%; height:90px; object-fit:contain; background:#f2f5ef; border-radius:5px; }
.portal-selected-images>img,.portal-selected-item { width:110px; margin:0; min-width:0; }
.portal-selected-item>div { display:flex; justify-content:space-between; }
.portal-selected-item button { border:0; background:none; padding:5px 7px; color:#677b5d; font-size:12px; }
.portal-image-placeholder { display:flex; align-items:center; justify-content:center; padding:20px; width:100%; min-height:86px; background:#f5f7f1; border:1px dashed #d5e0ce; border-radius:6px; color:#809072; font-size:12px; }
.portal-body-field .wp-editor-wrap { min-width:0; }
.portal-body-media { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:10px 0; }
.portal-body-media .portal-help { flex:1 1 220px; margin:0; }
.portal-body-feedback:empty { display:none; }
.portal-body-field .wp-editor-container { border:1px solid #cad7c7; border-radius:4px; overflow:hidden; }
.portal-body-field .wp-editor-area { border:0; border-radius:0; }
.portal-body-field .wp-editor-tabs button { border:1px solid #cbd7c7; padding:5px 12px; background:#ecf1e8; color:#365f39; }
.portal-account-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.portal-user-list>div { display:flex; align-items:center; flex-wrap:wrap; gap:14px 24px; border-bottom:1px solid #e4ebe0; padding:18px 0; }
.portal-user-list strong { min-width:180px; overflow-wrap:anywhere; }
.portal-user-list>div>span:not(.portal-badge) { flex:1; font-size:12px; color:#708064; overflow-wrap:anywhere; }
.portal-file-button { position:relative; overflow:hidden; cursor:pointer; }
.portal-file-button input { position:absolute; width:1px; height:1px; opacity:0; }
.portal-file-button:focus-within { outline:3px solid var(--portal-gold); outline-offset:3px; }
.portal-media-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; min-height:100px; }
.portal-media-tile { display:block; min-width:0; padding:9px; border:1px solid var(--portal-line); border-radius:7px; background:#fff; text-align:left; color:var(--portal-ink); }
.portal-media-tile img { display:block; width:100%; height:140px; object-fit:contain; background:#f4f6f0; }
.portal-media-tile span { display:block; margin-top:8px; font-size:11px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
.portal-media-tile.is-selected { border:2px solid #3d7456; padding:8px; background:#edf5e8; }
.portal-media-feedback { color:#59744b; font-size:12px; margin:10px 0; min-height:20px; }
.portal-media-feedback.is-error { color:#a54538; }
.ect-portal dialog { color:var(--portal-ink); padding:26px; border:1px solid #d6e2cc; border-radius:13px; background:#fff; box-shadow:0 20px 90px #001c204d; }
.ect-portal dialog::backdrop { background:#072820a6; }
.portal-media-dialog { width:min(1000px,calc(100% - 32px)); max-height:90vh; max-height:90dvh; }
.portal-media-dialog[open] { display:flex; flex-direction:column; }
.portal-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.portal-dialog-head h2 { margin-bottom:6px; }
.portal-dialog-head p { margin:0 0 20px; font-size:12px; color:#6b805f; }
.portal-close { border:0; background:#eff4ea; color:#34522a; width:36px; height:36px; font-size:24px!important; border-radius:6px; flex-shrink:0; }
.portal-dialog-toolbar { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.portal-media-dialog .portal-media-grid { overflow:auto; padding:3px; }
.portal-dialog-footer { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:18px; flex-shrink:0; }
.portal-dialog-footer .portal-pagination { margin-top:0; }
.portal-image-dialog { width:min(560px,calc(100% - 32px)); max-height:90vh; overflow:auto; }
.portal-image-dialog>form[method=dialog] { text-align:right; }
.portal-image-detail { display:block; width:100%; max-height:260px; object-fit:contain; margin-bottom:22px; }
.portal-mobile-header,.portal-mobile-save { display:none; }
.portal-publish-panel { scroll-margin-top:84px; }
@media (max-width:650px) { .portal-mobile-save { display:flex; position:sticky; bottom:0; z-index:15; align-items:center; justify-content:space-between; gap:18px; margin:0 -16px -40px; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid var(--portal-line); background:#fffffff5; box-shadow:0 -4px 18px #07282012; } .portal-mobile-save a { font-size:13px; } .portal-mobile-save .portal-button { min-width:150px; } }
@media (max-width:1200px) { .portal-main { padding:24px; } .portal-editor-layout { grid-template-columns:minmax(0,1fr) 250px; gap:18px; } .portal-panel { padding:21px; } .portal-fields { grid-template-columns:minmax(0,1fr); } .portal-media-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .portal-row-actions { flex-direction:column; gap:5px; } }
@media (max-width:900px) { .portal-shell { display:block; } .portal-mobile-header { position:sticky; top:0; z-index:20; display:flex; justify-content:space-between; align-items:center; height:64px; padding:12px 22px; background:var(--portal-green); color:#fff; } .portal-mobile-header a { color:#fff; text-decoration:none; font-size:21px; letter-spacing:.06em; } .portal-mobile-header small { font-size:9px; } .portal-mobile-header button { color:#fff; padding:7px 12px; border:1px solid #728d75; background:none; border-radius:5px; font-size:12px; } .portal-sidebar { display:none; position:fixed; z-index:19; left:0; top:64px; width:270px; height:calc(100dvh - 64px); box-shadow:20px 0 70px #06291833; } .portal-sidebar.is-open { display:flex; } .portal-brand { display:none; } .portal-topline { margin-bottom:26px; } .portal-account-grid { gap:18px; } }
@media (max-width:650px) { .portal-main { padding:20px 16px 40px; } .portal-topline { padding-bottom:15px; font-size:8px; } .portal-topline .portal-user-name { font-size:10px; } .portal-heading h1 { font-size:24px; } .portal-dashboard-grid,.portal-account-grid,.portal-editor-layout { grid-template-columns:minmax(0,1fr); gap:0; } .portal-dashboard-card { padding:23px; } .portal-panel-heading { align-items:flex-start; flex-direction:column; gap:8px; } .portal-recent-row { gap:10px; flex-wrap:wrap; } .portal-recent-row strong { flex-basis:calc(100% - 75px); font-size:13px; } .portal-recent-row time { font-size:11px; margin-left:auto; } .portal-guide ol { grid-template-columns:minmax(0,1fr); gap:20px; } .portal-search { width:100%; flex-wrap:wrap; } .portal-search input { width:100%; flex:1 1 160px; } .portal-search select { flex:1; } .portal-content-row { gap:12px; flex-wrap:wrap; } .portal-content-thumb { width:54px; height:54px; } .portal-content-info h2 { font-size:14px; } .portal-row-actions { width:100%; flex-direction:row; justify-content:flex-end; gap:20px; } .portal-list-panel { padding:18px; } .portal-media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .portal-media-tile img { height:105px; } .portal-dialog-footer { flex-direction:column; gap:15px; align-items:stretch; } .portal-dialog-toolbar .portal-button { font-size:12px; } .ect-portal dialog { padding:18px; } .portal-dialog-head h2 { font-size:17px; } .portal-dialog-head p { font-size:11px; } .portal-editor-side .portal-publish-panel { border-top:3px solid var(--portal-green); } .portal-user-list strong { min-width:0; width:100%; } .portal-login-layout { padding:30px 18px; } .portal-login-card { padding:30px 25px 26px; } }
