:root{--cream:#F5F0E8;--cream2:#EDE6D8;--sage:#7A9E7E;--sage2:#5C8260;--sage3:#4A6E4E;--sage-pale:#EDF3EE;--ink:#3D3029;--muted:#7A6558;--soft:#A89080;--line:#DDD5C8;--white:#fff;--shadow:rgba(100,80,60,.08)}
*{box-sizing:border-box}
html{background:#D8E8D5;scroll-behavior:smooth}
body{font-family:Nunito,system-ui,sans-serif;background:var(--cream);color:var(--ink);max-width:540px;min-height:100vh;margin:0 auto;box-shadow:0 0 40px rgba(0,0,0,.08)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{color:inherit}
.site-header{display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:0 20px;border-bottom:1px solid #EAE3D8;background:rgba(245,240,232,.96)}
.brand{text-decoration:none;font-family:'DM Serif Display',Georgia,serif;font-size:1.22rem;letter-spacing:.2px}
.brand em{font-style:normal;color:var(--sage2)}
.back{border:1.5px solid #B8D4BB;background:#fff;border-radius:10px;padding:8px 12px;color:var(--sage3);font-size:.8rem;font-weight:800;text-decoration:none}
.back:hover,.back:focus-visible{background:var(--sage-pale)}
main{padding:0 18px 36px}
.breadcrumb{font-size:.72rem;font-weight:700;color:var(--soft);padding:20px 2px 2px}
.breadcrumb span{margin:0 6px;color:#BEAE9F}
.intro{padding:24px 4px 26px}
.eyebrow{color:var(--sage2);font-size:.67rem;font-weight:800;letter-spacing:2px;margin:0 0 8px}
.intro h1{font-family:'DM Serif Display',Georgia,serif;font-weight:400;font-size:clamp(2.35rem,8vw,3.4rem);line-height:1.05;letter-spacing:-1.5px;margin:0 0 12px}
.intro h1 span{color:var(--sage)}
.intro>p:last-child{color:var(--muted);font-size:.9rem;line-height:1.6;margin:0;max-width:38ch}
.workspace{background:var(--white);border:1px solid var(--line);border-radius:19px;padding:20px;margin-bottom:17px;box-shadow:0 8px 24px var(--shadow)}
.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}
.section-heading h2{font-family:'DM Serif Display',Georgia,serif;font-size:1.48rem;font-weight:400;line-height:1.2;margin:0}
.step-mark{width:35px;height:35px;display:grid;place-items:center;background:var(--sage-pale);border-radius:50%;color:var(--sage2);font-size:1.4rem}
.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:20px}
.modes button{min-height:43px;padding:8px 4px;border:1px solid var(--line);background:var(--cream);border-radius:10px;color:var(--muted);font-size:.77rem;font-weight:800}
.modes button.active{background:var(--sage3);border-color:var(--sage3);color:white;box-shadow:0 3px 8px rgba(74,110,78,.16)}
.modes button:hover:not(.active){background:var(--sage-pale)}
.field{display:flex;flex-direction:column;gap:7px;margin:0 0 15px;min-width:0}
.field>span{font-size:.79rem;font-weight:800;color:var(--ink)}
.field small{color:var(--soft);font-size:.7rem;line-height:1.35}
.field input:not([type=color]),.field select,.field textarea{width:100%;border:1.5px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);padding:11px 12px;font-size:16px;outline:none;min-height:44px}
.field textarea{resize:vertical;min-height:92px}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--sage2);box-shadow:0 0 0 3px rgba(122,158,126,.16)}
.field input::placeholder,.field textarea::placeholder{color:#A99B8D}
.field input[type=color]{width:100%;height:45px;background:white;border:1.5px solid var(--line);border-radius:10px;padding:4px}
.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field-grid .field{margin-bottom:13px}
.password-wrap{display:flex;gap:8px}
.password-wrap input{flex:1;min-width:0}
.reveal{border:1px solid var(--line);border-radius:9px;background:var(--cream);padding:0 10px;color:var(--sage3);font-size:.75rem;font-weight:800}
.check-field{display:flex;gap:9px;align-items:center;font-size:.81rem;font-weight:700;margin:0 0 18px}
.check-field input{width:18px;height:18px;accent-color:var(--sage3)}
.divider{display:flex;align-items:center;gap:12px;color:var(--soft);font-size:.68rem;letter-spacing:1.5px;font-weight:800;text-transform:uppercase;margin:10px 0 17px}
.divider:after{content:'';height:1px;flex:1;background:#EAE3D8}
.palette{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 17px}
.palette-choice{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);padding:5px 8px;font-size:.7rem;font-weight:800}
.palette-choice span{width:13px;height:13px;border-radius:50%;display:inline-block;border:1px solid rgba(0,0,0,.06)}
.palette-choice:hover{border-color:var(--sage)}
.form-actions{display:flex;gap:9px;margin-top:6px}
.generate{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:47px;border:0;border-radius:11px;background:var(--sage3);color:white;font-size:.9rem;font-weight:800}
.generate:hover{background:#395b3e}
.generate span{font-size:1.1rem}
.reset{min-width:80px;border:1.5px solid var(--line);border-radius:11px;background:var(--cream);color:var(--muted);font-size:.8rem;font-weight:800}
.preview{min-height:245px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1.5px dashed #D7CFC1;border-radius:13px;background:#FAF8F4;padding:17px;color:var(--muted);text-align:center;font-size:.83rem}
.preview p{margin:0}
.preview-empty{font-size:4rem;color:#C0CDBA;line-height:1}
.preview svg{display:block;width:min(100%,270px);height:auto;border-radius:5px;box-shadow:0 2px 15px rgba(0,0,0,.08)}
.status{min-height:1.4em;color:var(--muted);font-size:.74rem;line-height:1.4;margin:12px 0}
.status.error{color:#9D473F}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.result-actions button{min-height:42px;padding:8px 10px;border:1px solid #B8D4BB;border-radius:10px;background:var(--sage-pale);color:var(--sage3);font-size:.78rem;font-weight:800}
.result-actions button:not(:disabled):hover{background:#DCE9DD}
.result-actions button:disabled{opacity:.43;cursor:not-allowed}
footer{display:flex;justify-content:space-between;gap:10px;padding:19px 20px 24px;border-top:1px solid #EAE3D8;color:var(--soft);font-size:.7rem}
footer a{color:var(--sage3);font-weight:800;text-decoration:none}
.boot-error{position:fixed;bottom:10px;left:10px;right:10px;max-width:520px;margin:auto;padding:12px;background:#fff3ef;border:1px solid #d8998e;border-radius:10px;color:#813f39;font-size:.8rem;z-index:5}
:focus-visible{outline:3px solid var(--sage);outline-offset:2px}
@media(max-width:390px){main{padding-left:12px;padding-right:12px}.workspace{padding:16px}.field-grid{gap:8px}.modes{gap:5px}.modes button{font-size:.7rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* Future tool pages should retain this rule to prevent phone focus zoom. */
@media(max-width:767px){
  :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]):not([type=reset]),textarea,select){font-size:16px!important;}
}
