:root{font-family:Noto Sans JP,Hiragino Sans,Yu Gothic,sans-serif;color:#111827;background:#f3f4f6}*{box-sizing:border-box}body{margin:0}.page{min-height:100vh;padding:0 0 24px;display:flex;flex-direction:column;gap:0}.page-editor{padding:0;height:100vh;height:100dvh;overflow:hidden}.page-editor .app-header{margin:0;padding:8px 16px;flex-shrink:0}.app-header{position:sticky;top:0;z-index:30;width:100%;margin:0 0 14px;background:#fff;border-bottom:1px solid #e5e7eb;border-radius:0;padding:8px max(12px,calc((100vw - 1080px)/2));min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:8px}.brand-button{background:transparent;color:#111827;border:none;padding:0;display:inline-flex;align-items:center;gap:10px}.brand-mark{width:30px;height:30px;border-radius:9px;background:#111827;color:#fff;display:grid;place-items:center;font-size:.72rem;font-weight:700}.brand-text{font-size:.98rem;font-weight:700}.top-nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.main-shell{width:min(1080px,calc(100% - 24px));margin:0 auto;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;display:grid;gap:14px}.main-shell-editor{width:100%;margin:0;border:none;border-radius:0;padding:10px 0 0;background:transparent;display:flex;flex-direction:column;gap:0;flex:1;min-height:0;overflow:hidden}.endpoint{margin:0;font-size:.8rem;color:#6b7280}.landing{display:grid;grid-template-columns:1.7fr 1fr;gap:16px;align-items:start}.landing-copy h1{margin:0;font-size:clamp(1.45rem,2.1vw,2rem);line-height:1.35}.eyebrow{margin:0 0 8px;font-size:.82rem;color:#2563eb;font-weight:700}.lead{margin:12px 0 0;color:#374151;line-height:1.65}.cta-row{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}.feature-list{margin:18px 0 0;padding-left:18px;color:#374151;display:grid;gap:8px}.preview-card{border:1px solid #e5e7eb;border-radius:14px;padding:16px;background:#f9fafb;align-self:start}.preview-card h2{margin:0;font-size:1.06rem}.preview-card ol{margin:10px 0 0;padding-left:18px;display:grid;gap:6px}.preview-card p{margin:12px 0 0;color:#4b5563;line-height:1.5}.auth-layout{display:grid;grid-template-columns:1fr 1.2fr;gap:16px}.auth-intro{border:1px solid #e5e7eb;border-radius:14px;padding:16px;background:#f9fafb;display:grid;gap:10px;align-content:start;align-self:start}.auth-intro h2{margin:0}.auth-intro p{margin:0;line-height:1.55;color:#4b5563}.auth-panel{display:grid;gap:12px}.step-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.step-button{border:1px solid #d1d5db;border-radius:10px;padding:10px 8px;background:#fff;color:#374151;font-weight:700}.step-button.active{border-color:#2563eb;background:#2563eb;color:#fff}.form-card{border:1px solid #e5e7eb;border-radius:14px;padding:14px;background:#fff;display:grid;gap:12px}.field{display:grid;gap:6px}.field span{font-size:.83rem;font-weight:700;color:#4b5563}.field input,.field select,.chat-form textarea{width:100%;border:1px solid #d1d5db;border-radius:10px;padding:10px 12px;font:inherit;background:#fff}.action-row{display:flex;gap:8px}.action-row button{min-width:120px}.workspace{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}.workspace-editor{min-height:0;height:100%;align-items:stretch}.workspace-editor .sidebar{height:100%;min-height:0}.workspace-editor .sidebar-content{min-height:0;overflow:auto}.project-create-layout{display:grid;grid-template-columns:1fr 1.2fr;gap:16px;align-items:start}.project-create-intro{border:1px solid #e5e7eb;border-radius:14px;padding:16px;background:#f9fafb;display:grid;gap:10px}.project-create-intro h2,.project-create-intro p{margin:0}.project-create-intro p{color:#4b5563;line-height:1.55}.project-create-form{align-content:start}.sidebar{border:1px solid #e5e7eb;border-radius:14px;padding:14px;background:#f9fafb;display:grid;gap:8px;align-content:start;align-self:stretch;width:252px;transition:width .28s ease,padding .28s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden;position:relative}.sidebar-collapsed{width:72px;padding:10px}.sidebar-content{display:grid;gap:8px;opacity:1;transition:opacity .2s ease}.sidebar-content.hidden{opacity:0;pointer-events:none;max-height:0;overflow:hidden}.sidebar-toggle-button{width:44px;min-height:38px;justify-self:start;font-size:1rem;font-weight:700}.sidebar-collapsed-actions{margin-top:8px;display:grid;gap:8px;justify-items:center}.sidebar-icon-button{width:44px;min-height:38px;padding:0;display:grid;place-items:center;font-size:1.15rem;line-height:1}.workspace-switcher{display:grid;gap:8px;position:relative}.sidebar-label{margin:0;font-size:.75rem;font-weight:700;color:#6b7280;letter-spacing:.04em;text-transform:uppercase}.workspace-switcher-button{display:flex;align-items:center;gap:8px;width:100%;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#111827;padding:8px 10px;font-weight:700;text-align:left}.workspace-switcher-button.open{border-color:#93c5fd;box-shadow:0 0 0 2px #3b82f62e}.workspace-switcher-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.workspace-switcher-caret{color:#6b7280;font-size:.78rem}.workspace-menu-panel{position:absolute;left:0;right:0;top:calc(100% + 6px);border:1px solid #d1d5db;border-radius:12px;background:#fff;box-shadow:0 10px 30px #11182729;padding:8px;display:grid;gap:8px;z-index:50}.workspace-list{display:grid;gap:4px}.workspace-item{display:flex;align-items:center;gap:8px;padding:8px 6px;border-radius:8px;color:#374151;width:100%;border:none;background:transparent;text-align:left;font-weight:600;box-shadow:none;transform:none;transition:background-color .15s ease,color .15s ease}.workspace-item.active{background:#e5edff;color:#1e40af}.workspace-item:not(.active):hover{background:#f3f4f6}.workspace-item-name{font-size:.87rem;font-weight:600}.workspace-avatar{width:24px;height:24px;border-radius:7px;background:#dbeafe;color:#1e40af;display:grid;place-items:center;font-size:.76rem;font-weight:800;flex-shrink:0}.workspace-avatar.small{width:20px;height:20px;border-radius:6px;font-size:.7rem}.workspace-create-button{width:100%;border:1px dashed #c7d2fe;border-radius:10px;background:#f8faff;color:#1d4ed8;font-weight:700;text-align:center}.sidebar-divider{height:1px;background:#e5e7eb;margin:2px 0}.project-editor-route-nav{display:grid;gap:6px}.project-editor-route-nav button{width:100%;text-align:left}.projects-section{display:grid;gap:8px}.project-create-button{width:100%;border:1px dashed #bfdbfe;border-radius:10px;background:#fff;color:#1d4ed8;font-weight:700;text-align:center}.sidebar-project-list{display:grid;gap:6px;max-height:min(40vh,320px);overflow:auto;padding-right:2px}.sidebar-project-item{width:100%;border:1px solid #dbe2ef;border-radius:10px;background:#fff;color:#1f2937;padding:8px;display:grid;grid-template-columns:12px 1fr;gap:8px;align-items:center;text-align:left;box-shadow:0 1px 3px #0f172a14}.sidebar-project-item:hover:not(:disabled){border-color:#93c5fd;background:#f8fbff}.sidebar-project-item.active{border-color:#93c5fd;background:#eff6ff}.sidebar-project-swatch{width:10px;height:10px;border-radius:999px;background:var(--project-main-color, #dbeafe);box-shadow:0 0 0 3px #dbeafee6}.sidebar-project-content{min-width:0;display:grid;gap:2px}.sidebar-project-name{font-size:.82rem;font-weight:700;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-project-meta{font-size:.72rem;color:#6b7280}.sidebar-empty{margin:0;padding:8px 6px;font-size:.8rem;color:#6b7280}.sidebar-meta{margin:0;font-size:.85rem;color:#6b7280;overflow-wrap:anywhere}.workspace-main{display:grid;gap:12px}.workspace-main-editor{display:flex;flex-direction:column;gap:12px;min-height:0;height:100%;overflow:hidden}.workspace-main-editor>.notice{flex:0 0 auto}.workspace-main-editor>:not(.notice){flex:1 1 auto;min-height:0}.project-dashboard{display:grid;gap:14px}.project-group{display:grid;gap:8px}.project-group-label{margin:0;font-size:.85rem;font-weight:700;color:#6b7280}.project-tile-grid{--project-tile-size: 136px;display:grid;grid-template-columns:repeat(auto-fill,var(--project-tile-size));gap:10px;justify-content:start}.project-tile-grid-single{grid-template-columns:var(--project-tile-size)}.project-tile{width:var(--project-tile-size);height:var(--project-tile-size);border:1px solid #d1d5db;border-radius:12px;padding:10px 10px 24px;background:#fff;color:#1f2937;display:flex;align-items:center;justify-content:center;text-align:center;cursor:pointer;box-shadow:0 4px 12px #0f172a1f;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background-color .16s ease,color .16s ease;position:relative;overflow:hidden}.project-tile:before{content:"";position:absolute;top:9px;left:-16px;width:64px;height:10px;border-radius:999px;background:var(--project-main-color, #dbeafe);transform:rotate(-34deg);opacity:.95;pointer-events:none}.project-tile:hover:not(:disabled){transform:translateY(-1px);border-color:#60a5fa;background:#f8fbff;box-shadow:0 12px 24px #1e40af33}.project-tile:active:not(:disabled){transform:translateY(0);box-shadow:0 5px 12px #1e40af24}.project-tile:focus-visible{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f638,0 8px 18px #1e40af24}.project-tile-recent{min-width:0}.project-tile.active{border-color:#93c5fd;background:#f8fbff}.project-tile-name{font-size:.88rem;font-weight:600;color:#4b5563;line-height:1.35;overflow-wrap:anywhere}.project-tile-meta{font-size:.75rem;color:#6b7280}.project-tile-meta-corner{position:absolute;right:8px;bottom:7px;font-size:.66rem;color:#9ca3af;line-height:1}.project-tile-description{font-size:.82rem;color:#4b5563}.chat-log{min-height:300px;max-height:56vh;overflow:auto;border:1px solid #e5e7eb;border-radius:14px;padding:14px;background:#f9fafb}.chat-log-editor{min-height:0;max-height:none;height:auto}.placeholder{margin:0;color:#6b7280}.message{display:flex;margin-bottom:10px}.message p{margin:0;padding:10px 12px;border-radius:11px;line-height:1.55;white-space:pre-wrap}.message.user{justify-content:flex-end}.message.user p{background:#dbeafe}.message.assistant p{background:#eef2ff}.chat-form{display:grid;gap:8px}.chat-form textarea{resize:vertical}.notice{border:1px solid;border-radius:10px;padding:10px 12px}.notice-title{margin:0;font-weight:700}.notice-detail,.notice-next{margin:6px 0 0;font-size:.9rem}.notice.info{border-color:#93c5fd;background:#eff6ff;color:#1e3a8a}.notice.success{border-color:#86efac;background:#f0fdf4;color:#166534}.notice.error{border-color:#fca5a5;background:#fef2f2;color:#991b1b}button{border:none;border-radius:10px;padding:9px 12px;background:#2563eb;color:#fff;font-weight:700;font-size:.92rem;line-height:1.2;cursor:pointer;box-shadow:0 2px 6px #2563eb38;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease,border-color .16s ease,color .16s ease}button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 8px 16px #2563eb40}button:active:not(:disabled){transform:translateY(0);box-shadow:0 3px 8px #2563eb40}button:disabled{opacity:.6;cursor:not-allowed}.ghost-button{background:#fff;color:#1f2937;border:1px solid #d1d5db;box-shadow:0 1px 3px #0f172a1a}.ghost-button:hover:not(:disabled){background:#f8fafc;border-color:#9ca3af;box-shadow:0 7px 14px #0f172a1f}.ghost-button.active{border-color:#3b82f6;background:#eff6ff;color:#1d4ed8}.website-editor-layout{display:grid;grid-template-columns:47% 10px minmax(360px,1fr);gap:0;min-height:0;height:100%;align-items:stretch;overflow:hidden}.editor-pane-splitter{position:relative;cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none}.editor-pane-splitter:before{content:"";position:absolute;top:12px;bottom:12px;left:50%;width:2px;transform:translate(-50%);border-radius:999px;background:#d1d5db;transition:background-color .15s ease}.editor-pane-splitter:hover:before{background:#93c5fd}body.editor-resizing{cursor:col-resize}body.editor-resizing *{-webkit-user-select:none!important;user-select:none!important}.editor-chat-pane,.editor-preview-pane{border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:12px;display:grid;gap:10px;align-content:stretch;min-height:0;overflow:hidden}.editor-chat-pane,.editor-preview-pane{grid-template-rows:auto minmax(0,1fr) auto}.editor-pane-header{display:flex;justify-content:space-between;align-items:start;gap:10px}.editor-pane-title{margin:0;font-size:.78rem;font-weight:700;color:#6b7280;letter-spacing:.06em;text-transform:uppercase}.editor-pane-subtitle{margin:3px 0 0;font-size:.9rem;color:#111827;font-weight:700}.version-badge{margin:0;padding:6px 10px;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:.78rem;font-weight:700}.preview-device-switcher{display:flex;flex-wrap:wrap;gap:6px}.preview-device-switcher button{min-width:104px;padding:8px 10px}.preview-open-tab-button{min-width:40px!important;width:40px;padding:8px 0!important;font-size:1rem;line-height:1}.website-preview-loading{display:grid;gap:10px}.preview-stage{border:1px solid #d1d5db;border-radius:12px;background:#f3f4f6;min-height:0;display:grid;justify-items:center;align-content:start;padding:12px;overflow:auto}.preview-stage.mobile{background:linear-gradient(180deg,#f8fafc,#eef2ff)}.preview-stage.desktop{background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.website-preview-frame{width:100%;min-height:640px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;box-shadow:0 8px 20px #0f172a1f}.preview-stage.mobile .website-preview-frame{min-height:780px}.artifact-path{margin:0;font-size:.74rem;color:#6b7280;overflow-wrap:anywhere}.instruction-editor-layout{display:grid;min-height:0;height:100%;overflow:hidden}.instruction-editor-pane{border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:14px;display:grid;gap:12px;align-content:stretch;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto auto}.instruction-editor-description{margin:0;color:#4b5563;font-size:.9rem}.instruction-editor-textarea{width:100%;min-height:0;height:100%;border:1px solid #cbd5e1;border-radius:12px;padding:12px;font:inherit;line-height:1.55;resize:vertical;background:#fff}.instruction-editor-actions{display:flex;flex-wrap:wrap;gap:8px}.content-manager-layout{display:grid;min-height:0;height:100%;overflow:hidden}.content-manager-pane{border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:14px;display:grid;gap:12px;align-content:stretch;min-height:0;grid-template-rows:auto auto auto minmax(0,1fr)}.content-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.content-search-form input{width:100%;border:1px solid #d1d5db;border-radius:10px;padding:9px 10px;font:inherit}.content-list{min-height:0;overflow:auto;border:1px solid #e5e7eb;border-radius:12px;background:#f3f4f6;padding:12px;display:grid;gap:12px}.content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;align-content:start;align-items:start}.content-thumb-card{position:relative;border:1px solid #d8dee8;border-radius:14px;background:#fff;padding:10px;display:grid;grid-template-rows:auto auto;align-content:start;gap:6px;width:min(100%,264px);height:226px;overflow:hidden;box-shadow:0 2px 8px #0f172a14;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.content-thumb-card:hover{transform:translateY(-1px);border-color:#93c5fd;box-shadow:0 12px 22px #2563eb29}.content-thumb-card:focus-visible{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f638,0 10px 20px #2563eb1f}.content-copy-button{position:absolute;top:8px;right:8px;z-index:2;min-height:28px;padding:4px 8px;font-size:.72rem}.content-thumb-media{border:1px solid #e5e7eb;border-radius:10px;background:#eef2ff;width:100%;aspect-ratio:4 / 3;min-height:0;max-height:none;height:auto;align-self:start;display:grid;place-items:center;overflow:hidden}.content-thumb-media img{max-width:100%;width:100%;height:100%;object-fit:cover}.content-thumb-name{margin:0;padding:1px 0 0;font-size:.84rem;font-weight:700;color:#111827;overflow-wrap:anywhere;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.25}.content-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;background:#0f172a85;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:grid;place-items:center;padding:16px}.content-modal-card{width:min(980px,100%);max-height:calc(100vh - 32px);overflow:auto;border:1px solid #d1d5db;border-radius:16px;background:#fff;padding:14px;display:grid;gap:12px}.content-modal-header{display:flex;align-items:start;justify-content:space-between;gap:10px}.content-modal-title{margin:0;font-size:1rem;font-weight:700;color:#111827}.content-modal-meta{margin:4px 0 0;font-size:.78rem;color:#6b7280}.content-modal-header-actions{display:flex;flex-wrap:wrap;gap:6px}.content-modal-image-wrap{border:1px solid #d1d5db;border-radius:12px;background:#f8fafc;padding:12px;display:grid;place-items:center}.content-modal-image-wrap img{width:100%;max-height:72vh;object-fit:contain}.content-modal-warning{margin:0;border:1px solid #fde68a;border-radius:10px;background:#fffbeb;color:#92400e;padding:10px 12px;line-height:1.5}.content-modal-footer{display:flex;justify-content:flex-end}.danger-button{border-color:#fecaca;color:#b91c1c;background:#fff1f2}.brand-button{box-shadow:none;transition:opacity .16s ease}.brand-button:hover:not(:disabled),.workspace-item:hover:not(:disabled){transform:none;box-shadow:none}.brand-button:hover:not(:disabled){opacity:.86}@media (max-width: 980px){.landing,.auth-layout,.project-create-layout,.workspace{grid-template-columns:1fr}.chat-log{min-height:240px;max-height:48vh}.website-editor-layout{grid-template-columns:1fr;gap:10px;min-height:auto;height:auto;overflow:visible}.editor-pane-splitter{display:none}.instruction-editor-layout{min-height:auto;height:auto;overflow:visible}.instruction-editor-textarea{min-height:50vh}.content-manager-layout{min-height:auto;height:auto;overflow:visible}.content-manager-pane{min-height:auto;grid-template-rows:auto auto auto auto}.content-list{max-height:52vh;min-height:220px}.content-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-modal-card{width:min(720px,100%)}.content-modal-header{flex-direction:column}.workspace-editor{min-height:auto;height:auto}.workspace-main-editor,.main-shell-editor{overflow:visible;height:auto}.sidebar,.sidebar-collapsed{width:100%}.chat-log-editor{height:42vh}}@media (max-width: 640px){.page{padding:0 0 14px;gap:10px}.page-editor{padding:0;height:auto;min-height:100vh;overflow:visible}.app-header{margin-bottom:10px;padding:8px 10px;min-height:52px}.page-editor .app-header{margin-bottom:0;padding:8px 10px}.main-shell{width:calc(100% - 20px);padding:12px}.main-shell-editor{width:100%;padding:10px 0 0}.top-nav-signed-out{width:100%}.top-nav-signed-out button{flex:1}.step-nav{grid-template-columns:1fr}.action-row button{min-width:100px}.chat-log{min-height:200px;max-height:42vh}.editor-chat-pane{padding-bottom:calc(130px + env(safe-area-inset-bottom))}.chat-log-editor{height:calc(100vh - 380px);min-height:220px;max-height:none}.chat-form-editor{position:fixed;left:0;right:0;bottom:0;z-index:55;background:#fff;border-top:1px solid #e5e7eb;box-shadow:0 -8px 18px #0f172a1f;padding:8px 10px calc(8px + env(safe-area-inset-bottom));gap:6px}.chat-form-editor textarea{min-height:88px;max-height:34vh}.content-search-form,.content-grid{grid-template-columns:1fr}.content-modal-overlay{padding:10px}.content-modal-card{max-height:calc(100vh - 20px);padding:12px}.content-modal-header-actions{width:100%}}
