
.grid-shape-maker-root,.grid-shape-maker-root *{box-sizing:border-box}.grid-shape-maker-root{--navy:#1e3a5f;--gold:#d4af37;font-family:system-ui,Meiryo,sans-serif;color:#2c3e50;background:linear-gradient(135deg,#0ea5e9,#6366f1,#8b5cf6);height:100vh;height:100dvh;display:flex;flex-direction:column}.grid-shape-maker-root button,.grid-shape-maker-root input,.grid-shape-maker-root select{font:inherit}.grid-shape-maker-root button{cursor:pointer;border:0;border-radius:10px;min-height:44px;padding:8px 16px;background:#edf2f8;color:#1e3a5f;font-weight:700}.grid-shape-maker-root button:disabled{opacity:.4;cursor:default}.grid-shape-maker-root button:focus-visible,.grid-shape-maker-root input:focus-visible,.grid-shape-maker-root select:focus-visible{outline:3px solid #d4af37;outline-offset:3px}.grid-shape-maker-root header{height:66px;flex-shrink:0;background:var(--navy);color:white;display:flex;align-items:center;justify-content:space-between;padding:10px 20px;gap:12px}.grid-shape-maker-root h1{font-size:20px;margin:0;white-space:nowrap}.grid-shape-maker-root nav{display:flex;gap:6px}.grid-shape-maker-root nav button{background:#ffffff20;color:white;border-radius:25px}.grid-shape-maker-root nav button[aria-pressed=true]{background:var(--gold);color:#122641}.grid-shape-maker-root main{flex:1;min-height:0;padding:18px 90px 20px 18px;display:flex;flex-direction:column;gap:12px}.grid-shape-maker-root .options{display:flex;align-items:center;gap:9px;flex-wrap:wrap;background:white;border-radius:14px;padding:10px 14px;box-shadow:0 5px 20px #0001}.grid-shape-maker-root select{min-height:44px;border:1px solid #c6d2e0;border-radius:8px;padding:6px;background:white;max-width:100%}.grid-shape-maker-root .color{display:flex;align-items:center;gap:8px;font-size:14px}.grid-shape-maker-root input[type=color]{width:48px;height:44px;border:1px solid #c6d2e0;background:white;border-radius:8px;padding:3px}.grid-shape-maker-root .board{flex:1;min-height:220px;background:white;border-radius:16px;box-shadow:0 8px 24px #0002;display:flex;flex-direction:column;overflow:hidden}.grid-shape-maker-root .drawing{flex:1;min-height:0;padding:14px;display:flex;align-items:center;justify-content:center}.grid-shape-maker-root svg{width:100%;height:100%;touch-action:none;user-select:none}.grid-shape-maker-root .caption{padding:10px 15px;border-top:1px solid #eef2f7;display:flex;justify-content:space-between;gap:12px;font-size:14px;color:#5e7187;flex-wrap:wrap}.grid-shape-maker-root .toolbar{position:absolute;right:20px;bottom:20px;display:flex;flex-direction:column;gap:14px}.grid-shape-maker-root .toolbar button{height:56px;width:56px;border-radius:50%;padding:0;font-size:24px;display:grid;place-items:center;background:white;box-shadow:0 4px 14px #0004}.grid-shape-maker-root .toolbar .primary{background:var(--gold)}.grid-shape-maker-root .toolbar .danger{color:#b43e3e}.grid-shape-maker-root .toolbar button svg{width:25px;height:25px;pointer-events:none}.grid-shape-maker-root dialog{border:0;border-radius:18px;padding:24px;width:min(520px,calc(100vw - 24px));max-height:85dvh;color:#2c3e50;box-shadow:0 20px 70px #0005}.grid-shape-maker-root dialog::backdrop{background:#101e3c88}.grid-shape-maker-root dialog h2{margin:0 0 20px;font-size:22px}.grid-shape-maker-root .row{display:flex;align-items:center;gap:12px;justify-content:space-between;margin:12px 0}.grid-shape-maker-root input[type=number],.grid-shape-maker-root input[type=text]{border:1px solid #c6d2e0;border-radius:8px;padding:10px;width:100px;min-height:44px}.grid-shape-maker-root .names{display:grid;grid-template-columns:1fr 1fr;gap:10px}.grid-shape-maker-root .names label{display:flex;align-items:center;justify-content:space-between;gap:10px}.grid-shape-maker-root .names input{width:70px}.grid-shape-maker-root .note{font-size:13px;color:#60758e}.grid-shape-maker-root .dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.grid-shape-maker-root .gold{background:var(--gold)}.grid-shape-maker-root .error{color:#b43e3e;font-size:14px;min-height:20px}.grid-shape-maker-root .view-only .edit-control{display:none}.grid-shape-maker-root .view-only .options{display:none}@media(max-width:640px){.grid-shape-maker-root header{height:58px;padding:8px 10px;gap:6px}.grid-shape-maker-root h1{font-size:15px}.grid-shape-maker-root header button{padding:6px 10px;font-size:13px}.grid-shape-maker-root main{padding:10px 72px 12px 10px}.grid-shape-maker-root .options{padding:8px;gap:6px}.grid-shape-maker-root .options select{flex:1;min-width:130px}.grid-shape-maker-root .color{font-size:12px}.grid-shape-maker-root .toolbar{right:12px;bottom:12px;gap:10px}.grid-shape-maker-root .toolbar button{height:50px;width:50px}.grid-shape-maker-root .drawing{padding:5px}.grid-shape-maker-root .caption{font-size:12px}.grid-shape-maker-root .names{grid-template-columns:1fr}}@media print{.grid-shape-maker-root{background:white;height:95vh}.grid-shape-maker-root header,.grid-shape-maker-root .options,.grid-shape-maker-root .toolbar,.grid-shape-maker-root .caption{display:none}.grid-shape-maker-root main{padding:0}.grid-shape-maker-root .board{box-shadow:none;border-radius:0}}

/* Header controls wrap and keep explicit widths against theme form styles. */
.grid-shape-maker-root header{height:auto;min-height:66px;flex-wrap:wrap;justify-content:flex-start}
.grid-shape-maker-root header h1{flex:0 0 auto}
.grid-shape-maker-root header .options{flex:1 1 600px;min-width:0;max-width:100%;width:auto;margin:0;padding:0;display:flex;background:transparent;box-shadow:none;border-radius:0;flex-wrap:wrap;overflow:visible;gap:8px}
.grid-shape-maker-root header .options>*{flex:0 0 auto;max-width:100%;margin:0}
.grid-shape-maker-root header .options select{display:inline-block;flex:0 0 auto;width:160px;min-width:0;max-width:100%;margin:0;color:#1e3a5f}
.grid-shape-maker-root header .options [data-gsm="lineStyle"],.grid-shape-maker-root header .options #lineStyle{width:130px}
.grid-shape-maker-root header .options button{width:auto;white-space:nowrap;padding:8px 12px}
.grid-shape-maker-root header .color{display:inline-flex;width:auto;white-space:nowrap;align-items:center}
.grid-shape-maker-root header .color input[type=color]{flex:0 0 48px;width:48px;min-width:48px}
.grid-shape-maker-root header nav{flex:0 0 auto;margin-left:auto}
.grid-shape-maker-root header #full,.grid-shape-maker-root header [data-gsm="full"]{flex:0 0 44px;width:44px;padding:8px}
.grid-shape-maker-root [hidden]{display:none!important}
.grid-shape-maker-root.view-only .options,.grid-shape-maker-root.view-only .edit-control{display:none}
@media(max-width:1199px){
 .grid-shape-maker-root header{padding:8px 14px;gap:8px 12px}
 .grid-shape-maker-root header .options{order:5;flex-basis:100%;padding:3px 0}
}
@media(max-width:640px){
 .grid-shape-maker-root header{padding:8px 10px}
 .grid-shape-maker-root header .options{gap:7px}
 .grid-shape-maker-root header .options button{font-size:13px}
 .grid-shape-maker-root header .options select{font-size:13px;min-height:44px}
 .grid-shape-maker-root header .color{font-size:13px}
}

/* WordPress theme isolation and administrator bar height. */
.grid-shape-maker-root{position:relative;width:100%;max-width:none;isolation:isolate;line-height:1.5;overflow:hidden;margin:0}
.grid-shape-maker-root button{width:auto;box-shadow:none;text-transform:none;letter-spacing:normal;line-height:1.3}
.grid-shape-maker-root input,.grid-shape-maker-root select{margin:0;letter-spacing:normal}
.grid-shape-maker-root svg{display:block;max-width:none}
.grid-shape-maker-root h1,.grid-shape-maker-root h2,.grid-shape-maker-root h3{border:0;background:none;padding:0;letter-spacing:normal}
.grid-shape-maker-root h1::before,.grid-shape-maker-root h1::after,.grid-shape-maker-root h2::before,.grid-shape-maker-root h2::after,.grid-shape-maker-root h3::before,.grid-shape-maker-root h3::after{display:none}
.grid-shape-maker-root h1{color:inherit;line-height:1.3}
.grid-shape-maker-root dialog{background:white}
.grid-shape-maker-root [hidden]{display:none!important}
body.admin-bar .grid-shape-maker-root{height:calc(100vh - 32px);height:calc(100dvh - 32px)}
@media(max-width:782px){body.admin-bar .grid-shape-maker-root{height:calc(100vh - 46px);height:calc(100dvh - 46px)}}
.grid-shape-maker-root:fullscreen{height:100vh;height:100dvh}

.grid-shape-maker-root header .grid-toggle{display:inline-flex;align-items:center;gap:7px;min-height:44px;margin:0;white-space:nowrap;cursor:pointer;font-weight:700;flex-shrink:0}.grid-shape-maker-root .grid-toggle input{appearance:auto;width:20px;height:20px;margin:0;accent-color:#d4af37}

/* 移動・可変の道具BOX */
.vtb-host .atb-toolbox{display:flex;position:fixed;right:16px;bottom:84px;width:244px;height:380px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 64px);padding:0;gap:0;align-items:stretch;flex-direction:column;background:#f5f7fc;border:2px solid #c8d3e3;border-radius:16px;box-shadow:0 6px 24px #13274240;overflow:hidden;z-index:30;box-sizing:border-box;container-type:inline-size}
.vtb-host .atb-toolbox-head{display:flex;flex-shrink:0;height:44px;background:var(--navy,#1e3a5f);color:white;align-items:center}
.vtb-host .atb-toolbox-head button{border:0;background:transparent;color:white;height:44px;margin:0;padding:0 12px;font-family:inherit;font-size:16px;font-weight:bold;box-shadow:none;border-radius:0}
.vtb-host .atb-toolbox-grip{flex:1;text-align:left;cursor:move;touch-action:none;user-select:none}
.vtb-host .atb-toolbox-fold{width:40px;font-size:24px!important;cursor:pointer}
.vtb-host .atb-toolbox-body{display:grid;grid-template-columns:repeat(auto-fit,minmax(94px,1fr));align-content:start;gap:8px;padding:10px 10px 24px;overflow:auto;min-height:0;flex:1}
.vtb-host .atb-toolbox .atb-toolbar-group{display:contents;border-radius:0;box-shadow:none}
.vtb-host .atb-toolbox-body button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;height:68px;min-height:48px;margin:0;padding:6px;border:1px solid #d7dfeb;border-radius:12px;background:white;color:var(--navy,#1e3a5f);box-shadow:0 2px 4px #13274212;cursor:pointer;font-family:inherit}
.vtb-host .atb-toolbox-body button.mode-on{background:var(--gold,#d4af37);border-color:var(--gold,#d4af37)}
.vtb-host .atb-toolbox-body button:disabled{opacity:.35;cursor:default}
.vtb-host .atb-toolbox-body .atb-tool-icon{width:26px;height:26px;flex-shrink:0}
.vtb-host .atb-toolbox-body .atb-tool-label{font-size:13px;font-weight:bold;line-height:1.2;white-space:normal;text-align:center}
.vtb-host .atb-toolbox-resize{position:absolute;right:0;bottom:0;width:26px;height:24px;border:0;background:#e4eaf4;color:var(--navy,#1e3a5f);font-size:20px;cursor:nwse-resize;touch-action:none;padding:0;margin:0}
.vtb-host .atb-toolbox.atb-toolbox-compact .atb-toolbox-body{grid-template-columns:repeat(auto-fit,minmax(44px,1fr));padding:6px 6px 24px}
.vtb-host .atb-toolbox.atb-toolbox-compact .atb-toolbox-body button{width:44px;height:44px;min-height:44px;border-radius:50%;justify-self:center;gap:0}
.vtb-host .atb-toolbox.atb-toolbox-compact .atb-tool-label{display:none}
.vtb-host .atb-toolbox.atb-toolbox-compact button:has(img[hidden]) .atb-tool-label{display:block;font-size:10px}
.vtb-host .atb-toolbox-closed{height:44px!important;min-height:44px}
.vtb-host .atb-toolbox-closed .atb-toolbox-body,
.vtb-host .atb-toolbox-closed .atb-toolbox-resize{display:none}
.vtb-host .atb-toolbox button:focus-visible{outline:3px solid #4d97ff;outline-offset:-3px}
.vtb-host .atb-toolbox #atb-slide-num{grid-column:1/-1;text-align:center;color:var(--navy,#1e3a5f)}

.vtb-host .atb-toolbox-layouts{display:flex;flex-shrink:0;gap:4px;padding:5px;background:#e7edf6}
.vtb-host .atb-toolbox-layouts button{flex:1;min-width:0;height:32px;margin:0;padding:2px;border:1px solid #c7d2e3;border-radius:7px;background:white;color:var(--navy,#1e3a5f);font-family:inherit;font-size:12px;font-weight:bold;cursor:pointer}
.vtb-host .atb-toolbox-layouts button[aria-pressed="true"]{background:var(--gold,#d4af37);border-color:var(--gold,#d4af37)}
.vtb-host .atb-toolbox[data-layout] .atb-toolbox-body{grid-template-columns:repeat(var(--atb-tool-columns),minmax(0,1fr))}
.vtb-host .atb-toolbox-closed .atb-toolbox-layouts{display:none}

/* 役割ごとの固定色。丸形・文字付きで共通。 */
.vtb-host .atb-toolbox-body button{--tool-bg:#eef1f5;--tool-border:#cbd2dc;--tool-ink:#394657;--tool-active:#465568;background:var(--tool-bg);border-color:var(--tool-border);color:var(--tool-ink)}
.vtb-host .atb-toolbox-body button[data-color="blue"]{--tool-bg:#e0edff;--tool-border:#9abce9;--tool-ink:#184d91;--tool-active:#245fa8}
.vtb-host .atb-toolbox-body button[data-color="orange"]{--tool-bg:#ffead4;--tool-border:#e6b07a;--tool-ink:#8b420c;--tool-active:#a64c10}
.vtb-host .atb-toolbox-body button[data-color="green"]{--tool-bg:#dcf2e5;--tool-border:#91c7a8;--tool-ink:#1d6342;--tool-active:#24734d}
.vtb-host .atb-toolbox-body button[data-color="purple"]{--tool-bg:#ede4fb;--tool-border:#bda2df;--tool-ink:#654091;--tool-active:#7045a1}
.vtb-host .atb-toolbox-body button[data-color="navy"]{--tool-bg:#e3eaf4;--tool-border:#9eafc7;--tool-ink:#1e3a5f;--tool-active:#1e3a5f}
.vtb-host .atb-toolbox-body button:hover:not(:disabled){box-shadow:0 0 0 2px var(--tool-border)}
.vtb-host .atb-toolbox-body button.mode-on{background:var(--tool-active);border-color:var(--tool-active);color:#fff;box-shadow:inset 0 0 0 2px #ffffff80}
.vtb-host .atb-toolbox-body button.mode-on img.atb-tool-icon{filter:brightness(0) invert(1)}


.vtb-host .atb-tool-icon{width:26px;height:26px;display:block;fill:currentColor}.vtb-host .atb-toolbox-settings svg{fill:currentColor}

.vtb-host .atb-toolbox{z-index:1000;display:flex}
.vtb-host .atb-toolbox [hidden]{display:none!important}
.vtb-host .atb-toolbox-grip{font-size:15px!important;line-height:1.2!important;min-width:0;white-space:normal}
.vtb-host .atb-toolbox-body>label,.vtb-host .atb-toolbox-body>select,.vtb-host .atb-toolbox-body>.tool-options,.vtb-host .atb-toolbox-body>.tool-info{grid-column:1/-1;min-width:0;margin:0;padding:6px;position:static;transform:none;background:transparent;box-shadow:none}
.vtb-host .atb-toolbox-body label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;color:#1e3a5f}
.vtb-host .atb-toolbox-body select{min-width:0;max-width:100%;width:100%;height:44px;background:white;color:#1e3a5f;border:1px solid #c7d2e3;border-radius:8px;font-size:14px}
.vtb-host .atb-toolbox-body .tool-options{display:flex;flex-direction:column;gap:8px}
.vtb-host .atb-toolbox-body :is(.atb-toolbar-group,.piece-tools,nav){display:contents;position:static;transform:none;padding:0;background:none;box-shadow:none}
.vtb-host .atb-toolbox-body button{border-radius:12px!important;font-size:14px;line-height:1.3!important}
.vtb-host .atb-toolbox-body img.atb-tool-icon,.vtb-host .atb-toolbox-body svg.atb-tool-icon{width:26px!important;height:26px!important;fill:currentColor;stroke:none;touch-action:auto}
.vtb-host .atb-toolbox-head svg{width:24px!important;height:24px!important;fill:currentColor}
.vtb-host .atb-toolbox-compact .atb-toolbox-body button{border-radius:50%!important}
.vtb-host .atb-toolbox-body :is(.tool-info,[data-role=status]){font-size:13px;text-align:center;color:#1e3a5f}
.vtb-host .atb-toolbox-body [aria-pressed=true]{background:var(--tool-active,#245fa8);color:white}
@media print{.vtb-host .atb-toolbox{display:none!important}}

.grid-shape-maker-root main{padding:12px!important}.grid-shape-maker-root.view-only .atb-toolbox-body .options,.grid-shape-maker-root.view-only .atb-toolbox-body .edit-control{display:none!important}

.grid-shape-maker-root dialog.gsm-shape-dialog{position:fixed;inset:0;margin:auto;width:min(640px,calc(100vw - 24px));max-width:640px;max-height:calc(100dvh - 32px);padding:20px;overflow:auto}
.grid-shape-maker-root .gsm-shape-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.grid-shape-maker-root .gsm-shape-heading h2{margin:0;font-size:22px}
.grid-shape-maker-root .gsm-shape-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.grid-shape-maker-root .gsm-shape-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;min-height:130px;font-size:17px;background:#fff;border:2px solid #dce3ef}
.grid-shape-maker-root .gsm-shape-preview{display:block;width:100%;height:80px;pointer-events:none}
.grid-shape-maker-root .gsm-shape-card[aria-pressed="true"]{background:#eee5fb;border-color:#8b68bb;color:#583382}
.grid-shape-maker-root .atb-toolbox-body [data-gsm="preset"] .gsm-shape-preview{width:36px;height:28px;flex-shrink:0}
.grid-shape-maker-root.vtb-host [data-gsm="showGrid"][aria-pressed="true"]{background:#dbeafe;color:#17458c;box-shadow:inset 0 0 0 2px #5592d8}
.grid-shape-maker-root.vtb-host [data-gsm="showGrid"][aria-pressed="false"]{background:#f0f3f7;color:#657080;box-shadow:none}
@media(max-width:480px){.grid-shape-maker-root .gsm-shape-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.grid-shape-maker-root .gsm-shape-card{font-size:15px;min-height:112px}.grid-shape-maker-root .gsm-shape-preview{height:65px}}

.grid-shape-maker-root .gsm-tool-dialog{position:fixed;inset:0;margin:auto}
.grid-shape-maker-root .gsm-line-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid-shape-maker-root .gsm-line-card{display:flex;flex-direction:column;align-items:center;gap:8px;min-height:90px;padding:14px;border:2px solid #dce3ef;background:#fff}
.grid-shape-maker-root .gsm-line-card svg{width:100%;height:28px;touch-action:auto}
.grid-shape-maker-root .gsm-line-card[aria-pressed="true"]{background:#e3eaf4;border-color:#8096b6}
.grid-shape-maker-root .atb-toolbox-body [data-gsm="color"] .atb-tool-icon{background:var(--gsm-selected-color,#ee9eb1);border-radius:7px;padding:3px}
