@import url('./fonts.css');
:root{--green:#19734b;--deep:#193d2e;--lime:#d8edb4;--orange:#f48644;--ink:#26382e;--muted:#69766d;--line:#e3e9e2;--soft:#f5f8f2;--white:#fff;--shadow:0 16px 48px #183a2410;font-family:'Hiragino Maru Gothic ProN','Hiragino Kaku Gothic ProN','Yu Gothic',Meiryo,sans-serif;color:var(--ink);background:#fff;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}a{color:var(--green);text-underline-offset:4px}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--orange);outline-offset:4px}.skip{position:absolute;top:-60px;left:10px;background:white;padding:12px;z-index:10}.skip:focus{top:10px}.header{height:100px;max-width:1320px;margin:auto;padding:0 48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:16px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--deep);font-size:23px;font-weight:850;letter-spacing:.01em}.brand-icon{display:block;width:56px;height:56px;object-fit:contain;flex-shrink:0}.brand small{display:block;font-size:10px;letter-spacing:.1em;margin-top:5px;font-weight:600;color:var(--muted)}nav{display:flex;gap:27px;align-items:center}nav a{font-size:14px;font-weight:700;text-decoration:none;color:var(--ink)}.icon-button{width:36px;height:36px;border:1px solid #cbd9cb;border-radius:50%;background:white;color:var(--green);font-weight:800;font-size:18px}#main{min-height:calc(100vh - 230px);max-width:1320px;margin:auto;padding:0 48px}.eyebrow{font-size:11px;letter-spacing:.2em;font-weight:800;color:var(--green);display:block}.hero{display:grid;grid-template-columns:1fr 1.1fr;align-items:center;gap:16px;padding:64px 0 52px;position:relative}.event-pill{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);padding:8px 13px;border-radius:30px;font-size:11px;font-weight:700;margin-bottom:24px}.event-pill i{width:6px;height:6px;border-radius:50%;background:var(--green)}h1{font-size:clamp(34px,3.5vw,52px);line-height:1.55;letter-spacing:.025em;font-weight:850;margin:0 0 20px}h1 em{font-style:normal;color:var(--green);position:relative;white-space:nowrap}h1 em:after{content:'';position:absolute;z-index:-1;bottom:2px;left:0;width:100%;height:11px;background:var(--lime);transform:rotate(-1.5deg)}.hero p{font-size:14px;line-height:2.1;color:var(--muted);margin:0 0 25px}.primary,.secondary,.text-button{border:0;display:inline-flex;align-items:center;justify-content:center;gap:18px;border-radius:14px;text-decoration:none;font-weight:750;line-height:1.5;font-size:15px;min-height:52px;padding:14px 25px}.primary{background:var(--green);color:white;box-shadow:0 4px 0 #115034;transition:transform .15s,background .15s}.primary:hover{background:#125f3c;transform:translateY(-1px)}.primary span{font-size:20px}.secondary{background:var(--soft);border:1px solid var(--line);color:var(--green)}.text-button{background:none;color:var(--muted);font-size:13px;min-height:40px;padding:10px}.wide{width:100%}.hero-note{display:flex;gap:15px;font-size:11px;color:var(--muted);margin-top:22px}.hero-art{position:relative;display:flex;align-items:center;justify-content:center;min-height:420px;isolation:isolate}.hero-art:before{content:'';width:83%;height:92%;background:#f3f8eb;border-radius:50% 43% 46% 40%;position:absolute;z-index:-1;transform:rotate(-6deg)}.hero-art img{width:115%;height:auto;max-width:640px;mix-blend-mode:multiply;display:block}.bubble{background:white;box-shadow:var(--shadow);padding:14px 19px;font-size:13px;font-weight:700;border-radius:16px;position:absolute;left:3%;top:3%;transform:rotate(-6deg)}.bubble:after{content:'';position:absolute;bottom:-7px;left:24px;border-width:8px 8px 0;border-style:solid;border-color:white transparent transparent}.art-label{position:absolute;bottom:4%;right:3%;background:#fff;padding:10px 15px;border-radius:30px;font-size:11px;box-shadow:var(--shadow);transform:rotate(4deg)}.art-label b{color:var(--green)}.spark{position:absolute;color:var(--orange);font-size:34px;right:0;top:14%;transform:rotate(10deg)}.how{border-top:1px solid var(--line);padding:28px 0 48px;display:grid;grid-template-columns:1fr 3fr;gap:30px;align-items:center}.how h2{font-size:19px;line-height:1.7;margin:9px 0 0}.how-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.how-item{display:flex;gap:13px;align-items:center;padding:20px 16px;background:var(--soft);border-radius:17px;min-height:103px}.how-icon{font-size:29px}.how-item small{display:block;font-size:10px;color:var(--muted);letter-spacing:.13em;margin-bottom:7px}.how-item b{font-size:13px}.home-bottom{background:var(--green);padding:23px 32px;border-radius:22px;display:flex;align-items:center;gap:22px;color:white;margin-bottom:40px}.home-bottom span{font-size:28px}.home-bottom p{margin:0;font-size:12px;line-height:1.9}.home-bottom b{font-size:14px;display:block}.home-bottom button{margin-left:auto;background:#ffffff17;color:white;border:1px solid #ffffff40;white-space:nowrap;font-size:12px;padding:10px 17px;border-radius:12px}.workspace{padding:34px 0 60px}.workspace-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.workspace-head h1{font-size:29px;margin:7px 0 4px;line-height:1.6}.workspace-head p{font-size:13px;margin:0;color:var(--muted);line-height:1.8}.usage{font-size:11px;background:var(--soft);padding:10px 14px;border-radius:30px;color:var(--green);white-space:nowrap}.steps{display:flex;gap:0;max-width:680px;margin:0 auto 35px;justify-content:center}.step{display:flex;align-items:center;gap:7px;font-size:12px;color:#859086;font-weight:700;position:relative;flex:1}.step:not(:last-child):after{content:'';height:1px;flex:1;background:var(--line);margin:0 16px}.step .number{width:29px;height:29px;border-radius:50%;background:var(--soft);display:grid;place-items:center;flex:none}.step.active{color:var(--green)}.step.active .number{background:var(--green);color:white}.step.done .number{background:var(--lime);color:var(--deep)}.editor-layout{display:grid;grid-template-columns:.87fr 1.13fr;gap:40px;align-items:start}.preview-panel{background:var(--soft);border-radius:26px;padding:25px;position:sticky;top:24px;min-height:380px}.preview-image{width:100%;aspect-ratio:1;object-fit:contain;border-radius:18px;display:block}.preview-panel .preview-example{mix-blend-mode:multiply}.preview-caption{font-size:11px;color:var(--muted);text-align:center;line-height:1.8;margin-top:13px}.preview-tag{font-size:10px;letter-spacing:.13em;color:var(--green);font-weight:800;margin-bottom:15px}.field-panel{padding:3px 0}.field-panel h2{font-size:23px;line-height:1.7;margin:0 0 12px}.sub{font-size:13px;color:var(--muted);line-height:1.9;margin:0 0 23px}label{display:block;font-size:13px;font-weight:700;margin-bottom:20px}input:not([type=checkbox]):not([type=file]),textarea,select{display:block;width:100%;margin-top:9px;padding:14px 15px;border:1.5px solid #d9e2d8;border-radius:12px;min-height:52px;background:white;color:var(--ink);font-size:16px;outline-offset:2px}textarea{resize:vertical;min-height:86px;line-height:1.6}.optional{font-size:10px;color:var(--muted);font-weight:400;margin-left:8px}.hint{font-size:11px;font-weight:400;color:var(--muted);margin-top:8px;line-height:1.8}.upload-box{border:2px dashed #b9d0b6;border-radius:22px;background:#f9fbf5;padding:28px 20px;text-align:center;display:block;cursor:pointer;margin:20px 0 14px}.upload-box span{display:block;font-size:32px;margin-bottom:12px}.upload-box b{display:block;color:var(--green);font-size:15px}.upload-box small{display:block;font-weight:400;font-size:11px;line-height:1.9;color:var(--muted);margin-top:8px}.upload-box input{width:100%;font-size:12px;margin-top:18px;color:var(--green)}.check{display:flex;align-items:flex-start;gap:10px;font-size:11px;line-height:1.9;font-weight:500}.check input{margin:3px 0 0;min-width:20px;height:20px;accent-color:var(--green)}.notice{background:#fff7e9;border-radius:13px;padding:14px 16px;font-size:12px;line-height:1.8;color:#735320}.divider{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:10px;margin:15px 0}.divider:before,.divider:after{content:'';height:1px;background:var(--line);flex:1}.button-row{display:flex;gap:12px;align-items:center;margin-top:24px}.button-row .primary{flex:1}.chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 20px}.chip{background:white;border:1.5px solid var(--line);color:var(--ink);border-radius:30px;padding:10px 15px;font-size:12px;min-height:42px}.chip.selected{background:#eef7e4;color:var(--green);border-color:var(--green);font-weight:750}.style-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:10px}.style-option{border:1.5px solid var(--line);border-radius:15px;background:white;padding:15px 7px;font-size:11px;line-height:1.8;color:var(--ink)}.style-option span{display:block;font-size:26px;margin-bottom:5px}.style-option.selected{border-color:var(--green);background:#f3f8eb;color:var(--green);font-weight:750}.prompt-card{background:var(--soft);border-radius:15px;font-size:12px;line-height:1.9;padding:18px;margin:20px 0}.prompt-card b{display:block;color:var(--green);margin-bottom:6px}.fine{font-size:11px;line-height:1.9;color:var(--muted)}.result-header{text-align:center;margin:5px 0 28px}.result-header h1{font-size:29px;margin:10px 0}.result-header p{font-size:13px;color:var(--muted)}.result-layout{display:grid;grid-template-columns:1fr 1fr;gap:36px;max-width:1000px;margin:auto}.character-card{padding:19px;background:white;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}.character-card img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:15px;background:var(--soft);display:block}.card-bottom{padding:18px 8px 8px}.card-bottom .eyebrow{font-size:9px}.card-bottom h2{font-size:23px;margin:10px 0 7px}.card-bottom p{color:var(--muted);font-size:12px;line-height:1.9;margin:0}.tabs{display:flex;gap:4px;background:var(--soft);padding:5px;border-radius:15px;margin-bottom:23px}.tabs button{flex:1;background:none;border:0;border-radius:11px;padding:12px 7px;font-size:12px;color:var(--muted);font-weight:700}.tabs button.active{background:white;color:var(--green);box-shadow:0 2px 9px #1638200c}.name-form{display:flex;gap:8px;align-items:center}.name-form input{margin:0!important}.name-form button{min-width:72px;padding:10px}.detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}.detail-actions button{padding:12px 10px;font-size:12px}.chat-badge{display:flex;gap:10px;align-items:center;font-size:12px;font-weight:700;margin-bottom:14px}.chat-badge img{width:42px;height:42px;border-radius:50%;object-fit:cover}.chat-badge small{display:block;color:var(--muted);font-size:10px;margin-top:4px;font-weight:400}.messages{background:#f6f8f4;border:1px solid var(--line);border-radius:18px;min-height:160px;max-height:370px;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:13px;margin-bottom:14px}.message{font-size:13px;line-height:1.9;border-radius:15px;padding:12px 15px;max-width:91%;white-space:pre-wrap;overflow-wrap:anywhere}.message.assistant{background:white;align-self:flex-start;border-bottom-left-radius:4px}.message.user{background:var(--green);color:white;align-self:flex-end;border-bottom-right-radius:4px}.chat-prompts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.chat-prompts button{font-size:11px;padding:8px 11px;border:1px solid var(--line);border-radius:30px;background:white;color:var(--green)}.chat-form{display:flex;gap:8px}.chat-form textarea{margin:0;min-height:56px;font-size:14px;max-height:160px}.chat-form button{padding:12px 17px;min-width:65px}.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.gallery-item{background:white;border:1px solid var(--line);padding:14px;border-radius:22px;text-align:left;color:var(--ink);transition:transform .15s}.gallery-item:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.gallery-item img{width:100%;aspect-ratio:1;border-radius:13px;display:block}.gallery-item b{display:block;font-size:16px;margin:15px 4px 8px}.gallery-item small{font-size:11px;color:var(--muted);margin:0 4px}.empty{text-align:center;max-width:500px;margin:20px auto 70px}.empty img{width:100%;max-width:300px}.empty h2{font-size:23px;line-height:1.7}.empty p{font-size:13px;line-height:1.9;color:var(--muted)}.busy{max-width:650px;margin:45px auto 70px;text-align:center}.busy img{width:310px;max-width:85%}.busy h1{font-size:29px}.busy p{font-size:13px;line-height:2;color:var(--muted)}.spinner{width:32px;height:32px;border:3px solid var(--line);border-top-color:var(--green);border-radius:50%;animation:spin 1s linear infinite;margin:15px auto 25px}@keyframes spin{to{transform:rotate(360deg)}}.busy .notice{margin:25px auto;max-width:430px}.error-box{background:#fff0e8;color:#823d28;border-radius:14px;padding:18px;font-size:13px;line-height:1.8}.form-error{font-size:12px;line-height:1.8;color:#a13727}.form-error:empty{display:none}.loading{padding:100px;text-align:center;color:var(--muted);font-size:13px}footer{border-top:1px solid var(--line);max-width:1224px;margin:0 auto;padding:25px 0 30px;display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:10px;line-height:1.8}footer>span{font-weight:600}footer div{display:flex;gap:20px}footer a,footer button{color:var(--muted);font-size:10px;text-decoration:none}footer button{border:0;background:none;padding:0}dialog{border:0;border-radius:26px;padding:38px;width:min(92vw,500px);color:var(--ink);max-height:92dvh;box-shadow:0 20px 100px #102d3040}dialog::backdrop{background:#18382d70;backdrop-filter:blur(4px)}dialog h2{font-size:25px;line-height:1.65;margin:14px 0}dialog p{font-size:13px;line-height:1.9;color:var(--muted)}dialog form{margin-top:25px}.dialog-close{position:absolute;top:12px;right:16px;border:0;background:var(--soft);border-radius:50%;height:32px;width:32px;color:var(--muted);font-size:24px}.help-list{padding-left:24px;font-size:14px}.help-list li{padding-left:7px;margin-bottom:18px}.help-list li::marker{color:var(--green);font-weight:800}.help-list p{font-size:12px;margin:8px 0}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:30;width:max-content;max-width:90vw;background:var(--deep);color:white;border-radius:14px;padding:16px 22px;box-shadow:var(--shadow);font-size:13px;line-height:1.8}.legal{max-width:770px!important;padding-top:45px!important;padding-bottom:60px!important}.legal h1{font-size:30px}.legal h2{font-size:18px;margin:30px 0 13px}.legal p,.legal li{font-size:14px;line-height:2}.legal ul{padding-left:22px}.admin{max-width:750px;padding:40px 0}.admin table{width:100%;border-collapse:collapse;font-size:12px}.admin td,.admin th{padding:12px;text-align:left;border-bottom:1px solid var(--line)}
@media(min-width:1400px){.hero{padding-top:80px;padding-bottom:65px}.hero-art{min-height:450px}}
@media(max-width:900px){.header{padding:0 28px;height:84px}#main{padding:0 28px}.brand{font-size:20px}nav{gap:20px}.hero{padding-top:45px;grid-template-columns:1fr 1fr}.hero-art{min-height:330px}h1{font-size:34px}.hero p{font-size:12px}.how{grid-template-columns:1fr;gap:18px}.how h2 br{display:none}.how-item{padding:18px 14px}.editor-layout{gap:25px}.preview-panel{padding:18px;min-height:0}.result-layout{gap:24px}footer{margin:0 28px;flex-direction:column;gap:8px}.gallery{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.header{height:80px;padding:0 20px;gap:10px}.brand{font-size:17px;gap:8px}.brand small{font-size:8px;letter-spacing:.03em}.brand-icon{width:44px;height:44px}nav{gap:15px}nav a{font-size:11px}nav .nav-create{display:none}.icon-button{width:30px;height:30px;font-size:15px}#main{padding:0 22px}.hero{display:flex;flex-direction:column;padding:30px 0 24px;gap:5px;align-items:stretch}.hero-copy{position:relative;z-index:1}.event-pill{font-size:9px;margin-bottom:16px;padding:7px 11px}h1{font-size:35px;line-height:1.55;margin-bottom:14px}.hero p{font-size:12px;line-height:1.9;max-width:320px;margin-bottom:20px}.hero .primary{width:100%;min-height:55px}.hero-note{justify-content:center;margin-top:16px;gap:19px;font-size:10px}.hero-art{min-height:250px;margin-top:20px}.hero-art img{width:105%;max-width:440px}.hero-art:before{height:94%;width:94%}.bubble{top:-3%;left:0;font-size:11px;padding:10px 14px}.art-label{font-size:9px;bottom:0}.spark{font-size:26px;top:0}.how{padding:26px 0 24px;gap:17px}.how .eyebrow{font-size:9px}.how h2{font-size:17px}.how-grid{gap:8px}.how-item{padding:15px 9px;flex-direction:column;gap:8px;align-items:flex-start;min-height:126px}.how-item small{font-size:9px;margin-bottom:5px}.how-item b{font-size:11px;line-height:1.7}.how-icon{font-size:24px}.home-bottom{padding:19px;gap:13px;border-radius:17px;align-items:flex-start;flex-wrap:wrap;margin-bottom:28px}.home-bottom>span{font-size:23px}.home-bottom b{font-size:12px}.home-bottom p{font-size:11px;flex:1}.home-bottom button{font-size:10px;padding:8px 13px}.workspace{padding:25px 0 40px}.workspace-head{align-items:flex-start;margin-bottom:24px;flex-wrap:wrap;gap:12px}.workspace-head h1{font-size:25px}.workspace-head p{font-size:12px}.usage{font-size:10px;padding:7px 12px}.steps{margin-bottom:26px}.step{font-size:10px;gap:5px}.step .number{width:24px;height:24px}.step:not(:last-child):after{margin:0 9px}.editor-layout{display:flex;flex-direction:column;gap:22px}.preview-panel{width:100%;position:static;padding:15px;border-radius:19px;display:flex;align-items:center;gap:15px}.preview-panel .preview-image{width:38%;max-width:150px;aspect-ratio:1;flex:none}.preview-panel .preview-image.preview-example{width:45%}.preview-text{flex:1}.preview-tag{font-size:9px;margin:0 0 9px}.preview-caption{text-align:left;margin:0;font-size:10px}.field-panel{width:100%}.field-panel h2{font-size:22px}.sub{font-size:12px;margin-bottom:18px}.upload-box{padding:20px 18px;margin-top:15px}.upload-box span{font-size:27px}.chip{padding:8px 13px;font-size:11px}.style-option{font-size:10px}.prompt-card{font-size:11px}.result-header h1{font-size:25px}.result-layout{grid-template-columns:1fr;gap:25px}.character-card{max-width:410px;margin:auto;width:100%}.card-bottom h2{font-size:22px}.card-bottom p{font-size:11px}.gallery{gap:12px}.gallery-item{border-radius:17px;padding:10px}.gallery-item b{font-size:13px;margin:11px 2px 6px}.gallery-item small{font-size:9px;margin:0 2px}.messages{max-height:360px}.message{font-size:13px}.busy{margin-top:30px}.busy h1{font-size:25px}.busy .notice{font-size:12px}footer{margin:0 22px;padding-top:20px;font-size:9px}footer div{flex-wrap:wrap;gap:8px 18px}footer a,footer button{font-size:9px}footer div span{display:block;width:100%}dialog{padding:30px 24px;border-radius:23px}dialog h2{font-size:22px}.legal h1{font-size:25px}.legal p,.legal li{font-size:13px}.detail-actions button{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.style-field{border:0;padding:0;margin:0 0 20px;min-width:0}.style-field legend{font-size:13px;font-weight:700;padding:0}

.account-nav{background:none;border:0;color:var(--green);font-size:12px;font-weight:700;padding:8px 0}.returning{margin-top:14px}.login-card{border:2px solid var(--green);border-radius:18px;padding:20px;margin:20px 0;background:var(--soft)}.login-card> b{display:block;margin-bottom:20px}.login-card code{display:block;overflow-wrap:anywhere;font-family:monospace;font-size:18px;margin-top:9px;user-select:all}.migration-banner{padding:16px;background:var(--soft);border-radius:14px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;font-size:13px}@media(max-width:620px){.header{padding:0 14px}nav{gap:10px}.account-nav{font-size:10px}.header .brand{font-size:16px;gap:6px}.header .brand small{font-size:7px}.login-card{padding:15px}.login-card code{font-size:16px}}

/* 会話を中心にしたトーク画面 */
.work-space{max-width:900px;margin:26px auto 48px;padding:0;border:1px solid var(--line);border-radius:24px;background:#fff;overflow:hidden;box-shadow:0 14px 45px #2342360a}
.workbar{display:flex;align-items:center;gap:12px;padding:16px 20px;background:#fff;flex:none}
.chat-back{font-size:38px;font-weight:400;line-height:1;text-decoration:none;color:var(--deep);min-width:32px;text-align:center}
.chat-avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;border:1px solid var(--line);flex:none}
.chat-identity{flex:1;min-width:0}.chat-identity h1{font-size:18px;line-height:1.4;margin:0 0 4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;letter-spacing:0}.chat-identity>span{font-size:10px;color:var(--muted)}
.chat-menu{border:0;background:var(--soft);color:var(--green);border-radius:20px;padding:10px 12px;font-size:11px;font-weight:700}
.work-tabs{border-radius:0;border-top:1px solid #f0f3ef;border-bottom:1px solid var(--line);background:#fff;margin:0;padding:0 16px;gap:12px;flex:none}
.work-tabs button{border-radius:0;padding:13px 6px;border-bottom:3px solid transparent;box-shadow:none!important;font-size:12px}.work-tabs button.active{border-bottom-color:var(--green);color:var(--green)}
.work-content{padding:28px}.work-detail{max-width:430px;margin:auto}.work-detail>.primary{margin:15px 0}.work-tools{display:grid;grid-template-columns:180px 1fr;gap:28px;align-items:start}.work-tool-preview{width:100%;border-radius:18px}.work-space>#work-error:not(:empty){margin:12px 20px}
.talk-active{height:calc(100dvh - 146px);max-height:850px;min-height:480px;display:flex;flex-direction:column}
.talk-panel{display:flex;flex-direction:column;flex:1;min-height:0}
.conversation-surface{position:relative;flex:1;min-height:0;background:#dce8ef}
.talk-panel .messages{height:100%;min-height:0;max-height:none;border:0;border-radius:0;background:transparent;margin:0;padding:24px;gap:18px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#afbec6 transparent;overflow-anchor:none}
.chat-day{display:flex;justify-content:center;flex:none;margin:1px 0 6px}.chat-day span{background:#c4d4de;color:#526570;border-radius:20px;padding:5px 13px;font-size:10px}
.chat-message{display:flex;align-items:flex-start;gap:9px;flex:none;max-width:88%}.chat-message.from-me{align-self:flex-end;justify-content:flex-end}.chat-message.from-friend{align-self:flex-start}
.message-avatar{width:36px;height:36px;object-fit:cover;border-radius:50%;background:#fff;flex:none;margin-top:2px}
.message-content{min-width:0;max-width:100%;display:flex;flex-direction:column;align-items:flex-start}.from-me .message-content{align-items:flex-end}
.sender-name{font-size:10px;color:#526570;margin:0 0 5px 4px;overflow-wrap:anywhere}
.talk-panel .message{position:relative;max-width:100%;padding:12px 15px;border-radius:18px;box-shadow:0 1px 2px #29433d0c;line-height:1.85;font-size:14px;letter-spacing:.02em}
.talk-panel .message.assistant{background:#fff;color:#26382e;border-top-left-radius:5px}
.talk-panel .message.user{background:#9be381;color:#163d26;border-top-right-radius:5px}
.talk-panel .message:before{content:'';position:absolute;top:0;border:7px solid transparent}
.talk-panel .message.assistant:before{left:-6px;border-top-color:#fff}.talk-panel .message.user:before{right:-6px;border-top-color:#9be381}
.message-time{font-size:9px;color:#596e7b;margin:5px 5px 0;min-height:0}.message-time:empty{display:none}
.chat-intro{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding:16px 0 22px;flex:none;color:#385062}.chat-intro img{height:85px;width:85px;border-radius:50%;object-fit:cover;background:#fff;border:4px solid #ffffff99}.chat-intro b{font-size:14px}.chat-intro span{font-size:11px}
.typing-bubble{display:flex;gap:5px;padding:17px 19px;background:#fff;border-radius:5px 18px 18px;min-height:43px}.typing-bubble i{width:7px;height:7px;border-radius:50%;background:#8ca197;animation:thinking 1.2s ease-in-out infinite}.typing-bubble i:nth-child(2){animation-delay:.16s}.typing-bubble i:nth-child(3){animation-delay:.32s}.typing-label{font-size:10px;color:#596e7b;margin:6px 3px}
@keyframes thinking{0%,65%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.chat-composer{padding:11px 18px 12px;background:#fff;border-top:1px solid #d5e0e6;flex:none}
.chat-composer .chat-prompts{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 0 10px;gap:7px}.chat-composer .chat-prompts button{flex:none;padding:8px 12px;font-size:11px;background:#f7faf6;border-color:#e1eade}
.chat-composer .chat-form{align-items:flex-end;gap:10px;margin:0}
.chat-composer textarea{background:#f1f4f3;border:1px solid #e3e9e5;border-radius:22px;min-height:44px;max-height:104px;padding:10px 15px;font-size:16px;line-height:1.5;resize:none;outline-offset:1px;margin:0;box-shadow:none}
.chat-composer .chat-send{padding:0;flex:none;width:44px;height:44px;min-width:44px;border:0;border-radius:50%;background:#25854f;color:#fff;display:grid;place-items:center;box-shadow:none}.chat-send:hover{background:#19734b}.chat-send:disabled{cursor:default}
.chat-footnote{display:flex;justify-content:space-between;gap:10px;margin-top:8px;color:#758078;font-size:9px;line-height:1.5}.chat-footnote>span:last-child{white-space:nowrap;flex:none}
.new-reply{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);padding:9px 15px;border:1px solid #d1ded3;border-radius:24px;background:#fff;color:var(--green);box-shadow:0 3px 14px #2342361a;font-size:12px;white-space:nowrap}.new-reply[hidden]{display:none}
.in-conversation footer{display:none}.in-conversation #main{min-height:0}
@media(max-width:900px){.talk-active{height:calc(100dvh - 125px)}}
@media(max-width:620px){
  .work-space{margin:18px -8px 30px;border-radius:18px}.workbar{padding:12px;gap:9px}.chat-avatar{width:39px;height:39px}.chat-identity h1{font-size:16px}.chat-identity>span{font-size:9px}.chat-back{min-width:24px;font-size:34px}.chat-menu{font-size:10px;padding:9px}.workbar .icon-button{width:28px;height:28px;flex:none}
  .work-tabs{padding:0 10px;gap:6px}.work-tabs button{font-size:11px;padding:11px 4px}.work-content{padding:20px 14px}.work-tools{display:block}.work-tool-preview{width:75px;float:left;margin:0 15px 12px 0}.work-tools h2{font-size:20px}.work-tools form{clear:both}.work-space .character-card{padding:12px}
  .in-conversation{overflow:hidden}.in-conversation>.header{display:none}.in-conversation #main{position:fixed;top:var(--chat-top,0px);left:0;width:100%;height:var(--chat-height,100dvh);padding:0;margin:0;min-height:0;max-width:none}
  .in-conversation .work-space{width:100%;height:100%;max-height:none;min-height:0;margin:0;border:0;border-radius:0;box-shadow:none}.talk-panel .messages{padding:19px 13px;gap:17px}.chat-message{max-width:91%;gap:8px}.message-avatar{width:32px;height:32px}.talk-panel .message{font-size:14px;padding:10px 13px;line-height:1.8}.sender-name{font-size:9px}.chat-composer{padding:10px 12px max(9px,env(safe-area-inset-bottom))}.chat-footnote{font-size:8px;gap:8px}.chat-footnote>span:first-child{max-width:255px}.chat-composer .chat-prompts{margin-bottom:9px}.chat-composer .chat-prompts button{padding:7px 10px;font-size:10px}.chat-intro{padding:12px 0 20px}.chat-intro img{width:76px;height:76px}
}
@media(max-height:520px) and (max-width:620px){.workbar{padding:7px 12px}.work-tabs button{padding:7px 4px}.chat-footnote{display:none}.chat-composer .chat-prompts{display:none}.chat-intro{display:none}}
@media(prefers-reduced-motion:reduce){.typing-bubble i{animation:none}}

/* 生成の待ち状況 */
.loader{font-size:56px;margin:24px auto;animation:friend-breathe 1.8s ease-in-out infinite}#generation-progress{max-width:480px;margin:16px auto;line-height:1.9}@keyframes friend-breathe{50%{transform:scale(1.1)}}@media(prefers-reduced-motion:reduce){.loader{animation:none}}

/* ログインカードをiPhoneの写真アプリへ保存する案内と長押し用画像。 */
.card-save-guide{font-size:14px;line-height:1.8;background:var(--soft);padding:12px 14px;border-radius:12px}.card-save-fallback{margin:16px 0;border:1px solid var(--line);border-radius:12px;padding:12px}.card-save-fallback summary{cursor:pointer;font-size:14px;font-weight:700;color:var(--green);padding:4px 0}.card-save-fallback img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:8px;-webkit-touch-callout:default}.card-save-fallback img:not([src]){display:none}

/* スマホでは操作・会話を18px、補足を16pxにし、文字が増えても折り返せる配置にする。 */
.custom-vegetable-box[hidden]{display:none}
.custom-vegetable-box{border:2px solid #a9cda2;border-radius:16px;background:var(--soft);padding:18px;margin:0 0 24px}.custom-vegetable-box label{margin-bottom:0;color:var(--deep)}.custom-vegetable-box textarea{background:#fff}.custom-vegetable-box .hint{margin-bottom:0}
@media(max-width:620px){
  body{font-size:18px;line-height:1.7}
  #main{padding:0 16px}
  .header{height:auto;min-height:100px;padding:14px 16px 8px;flex-wrap:wrap;gap:8px}
  .header .brand{font-size:21px;gap:9px}
  .header .brand small{font-size:12px}
  nav{width:100%;justify-content:flex-end;gap:20px}
  nav a,.account-nav{font-size:16px;min-height:44px;display:inline-flex;align-items:center}
  .icon-button{width:44px;height:44px;font-size:20px;flex:none}
  .eyebrow,.how .eyebrow,.preview-tag{font-size:13px;letter-spacing:.08em}
  .event-pill{font-size:14px;line-height:1.6;text-wrap:balance}
  h1{font-size:clamp(28px,8.5vw,38px)}
  .hero p{font-size:18px;max-width:none;line-height:1.9}
  .primary,.secondary,.text-button,.detail-actions button{font-size:18px;min-height:52px;padding:13px 16px;gap:10px}
  .hero-note{font-size:14px;flex-wrap:wrap;gap:4px 14px}
  .bubble,.art-label{font-size:14px}
  .how h2{font-size:23px}
  .how-item b{font-size:16px}
  .how-item small{font-size:13px}
  .home-bottom b,.home-bottom p,.home-bottom button{font-size:16px}
  .home-bottom button{min-height:44px;white-space:normal}
  .workspace-head h1{font-size:28px}
  .workspace-head p,.usage{font-size:16px;white-space:normal}
  .steps{gap:8px}
  .step{font-size:14px;line-height:1.6;align-items:flex-start;min-width:0}
  .step:not(:last-child):after{display:none}
  .step .number{width:26px;height:26px}
  .preview-text{min-width:0}
  .preview-caption{font-size:16px}
  .field-panel h2{font-size:25px}
  label,.style-field legend{font-size:18px}
  input:not([type=checkbox]):not([type=file]),textarea,select{font-size:18px;min-height:56px}
  .sub,.hint,.check,.notice,.fine,.prompt-card,.divider,.upload-box small,.form-error,.legal p,.legal li{font-size:16px;line-height:1.8}
  .hint{display:block}
  .optional{font-size:14px}
  .check input{min-width:24px;height:24px}
  .upload-box b{font-size:18px}
  .upload-box input{font-size:16px}
  .chip{font-size:16px;min-height:46px;padding:10px 15px}
  .style-option{font-size:16px;min-height:90px}
  .style-grid{gap:7px}
  .button-row{flex-wrap:wrap}
  .gallery-item b{font-size:18px;overflow-wrap:anywhere}
  .gallery-item small{font-size:14px;overflow-wrap:anywhere}
  .card-bottom h2{font-size:26px}
  .card-bottom p,.community-guide small{font-size:16px;overflow-wrap:anywhere}
  .empty p,dialog p,dialog li,.help-list p,#toast{font-size:16px;line-height:1.8}
  dialog{padding:30px 20px;max-height:90dvh;overflow-y:auto}
  dialog h2{font-size:24px}
  .dialog-close{min-width:44px;min-height:44px}
  .login-card code{font-size:18px}
  .card-save-guide,.card-save-fallback summary,.migration-banner{font-size:16px}
  footer,footer a,footer button{font-size:14px;line-height:1.8}
  footer a,footer button{min-height:44px;display:inline-flex;align-items:center}
  .work-space{margin-left:0;margin-right:0}
  .workbar{gap:8px;padding:12px 10px}
  .workbar .icon-button{width:44px;height:44px}
  .chat-identity h1{font-size:19px}
  .chat-identity>span{font-size:13px;display:block;line-height:1.5}
  .chat-menu{font-size:15px;min-height:44px;padding:8px;flex:none}
  .work-tabs{gap:4px;padding:0 6px}
  .work-tabs button{font-size:16px;min-height:48px;padding:10px 3px}
  .work-tools h2{font-size:23px}
  .talk-panel .message{font-size:18px;line-height:1.85}
  .sender-name,.message-time,.chat-day span,.typing-label{font-size:13px}
  .chat-intro b{font-size:18px}
  .chat-intro span{font-size:16px}
  .chat-composer .chat-prompts button{font-size:16px;min-height:44px}
  .chat-composer textarea{font-size:18px;min-height:48px}
  .chat-footnote{font-size:13px;flex-wrap:wrap}
  .chat-footnote>span:first-child{max-width:none;flex:1;min-width:180px}
  .new-reply{font-size:16px;min-height:44px}
}

/* 写真保存メニューが使えない端末でも、作品画像を長押しして保存できる。 */
#work-save-image{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:12px;-webkit-touch-callout:default}#work-save-image[hidden],#work-save-dialog [hidden]{display:none}.work-save-fallback-link{font-size:16px;min-height:44px;padding:8px 0;text-decoration:underline;text-underline-offset:4px}

/* ログイン中はヘッダーと会話画面からログアウトできる。 */
#logout-nav[hidden]{display:none}.chat-logout{border:0;background:none;color:var(--green);font:inherit;font-size:14px;font-weight:700;min-height:44px;padding:4px 0;text-decoration:underline;text-underline-offset:4px}

@media(max-width:620px){.header nav{gap:12px}.header nav a,.header .account-nav{white-space:nowrap;flex-shrink:0}}
