:root{--bg:#faf9f8;--head:#671920;--accent:#a91e23;--accent-light:#fff4f4;--line:#e9e2e0;--ink:#302c2c;--muted:#727072;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink)}
html[data-hh-brand=hacomax]{--head:#0b2b22;--accent:#13714e;--accent-light:#edf8f3;--line:#dfe9e3;--bg:#f5f8f6}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;width:100%;background:var(--bg)}body{overflow-x:hidden}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.52;cursor:not-allowed}a{text-decoration:none}.hh{display:flex;flex-direction:column;min-height:100dvh}.hh-header{height:70px;background:var(--head);color:white;display:flex;justify-content:space-between;align-items:center;padding:0 max(24px,calc((100% - 1190px)/2));gap:16px}.hh-logo{color:#fff;display:flex;align-items:center;gap:11px;font-size:17px;font-weight:800;letter-spacing:.07em}.hh-symbol{border:1px solid rgba(255,255,255,.5);border-radius:12px;width:39px;height:39px;display:grid;place-items:center;font-size:18px;letter-spacing:0}.hh-header-right{font-size:13px;color:#f7ebed;display:flex;gap:8px;align-items:center}.hh-online{width:8px;height:8px;border-radius:50%;background:#6bdc9d}.hh-main{flex:1;min-height:0;width:100%;max-width:1240px;margin:auto;padding:33px 25px;display:grid;grid-template-columns:minmax(0,1fr) 276px;gap:25px;align-items:start}.hh-panel{border:1px solid var(--line);background:white;border-radius:19px;overflow:hidden;box-shadow:0 18px 40px rgba(48,20,20,.055);display:flex;flex-direction:column;height:min(760px,calc(100dvh - 163px));min-height:530px}.hh-panel-top{display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line);padding:18px 20px;flex-shrink:0}.hh-photo{width:49px;height:49px;border-radius:18px;display:grid;place-items:center;background:var(--accent-light);color:var(--accent);font-size:30px;flex-shrink:0}.hh-panel-copy{flex:1;min-width:0}.hh-panel-copy h1{margin:0;font-size:18px;color:var(--head)}.hh-panel-copy p{font-size:12px;line-height:1.45;color:var(--muted);margin:5px 0 0}.hh-live{font-size:11px;white-space:nowrap;background:#fff5dd;border-radius:20px;color:#835f12;padding:6px 9px}.hh-live.ready{background:#ecf8f1;color:#187745}.hh-live.staff{background:#ebf2ff;color:#2366ab}.hh-messages{flex:1;overflow-y:auto;padding:18px 19px;display:flex;flex-direction:column;gap:11px;min-height:0;overscroll-behavior:contain;background:linear-gradient(180deg,#fff,#fffdfd)}.hh-welcome{margin:auto;max-width:370px;text-align:center;padding:18px}.hh-welcome-icon{font-size:41px;margin-bottom:18px}.hh-welcome strong{font-size:18px;line-height:1.4}.hh-welcome p{font-size:14px;line-height:1.6;color:var(--muted)}.hh-msg{width:fit-content;max-width:min(85%,630px);padding:11px 14px;border-radius:15px;background:#f2f3f5;color:#333;line-height:1.57;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.hh-msg.guest{align-self:flex-end;color:white;background:var(--head);border-bottom-right-radius:4px}.hh-msg.ai,.hh-msg.staff{align-self:flex-start;border-bottom-left-radius:4px}.hh-msg.staff{background:#eaf3fb}.hh-author{display:block;font-size:11px;font-weight:700;opacity:.73;margin-bottom:5px}.hh-card{align-self:flex-start;max-width:85%;width:fit-content;background:#fff7f4;border:1px solid #eeded5;color:#563b2a;border-radius:10px;padding:8px 11px;font-size:12px}.hh-quick{display:flex;gap:8px;align-items:center;padding:12px 18px 0;flex-wrap:wrap}.hh-quick button{border:1px solid var(--line);background:white;color:var(--accent);border-radius:20px;padding:7px 11px;font-size:12px}.hh-bottom{padding:12px 18px 16px;flex-shrink:0}.hh-consent{display:flex;align-items:flex-start;gap:9px;font-size:11px;line-height:1.4;color:#666;cursor:pointer;padding-bottom:10px}.hh-consent input{flex-shrink:0;accent-color:var(--accent);width:17px;height:17px;margin:0}.hh-compose{display:flex;align-items:flex-end;gap:9px}.hh-compose textarea{width:100%;resize:none;min-height:47px;max-height:100px;border:1px solid #dddfe4;border-radius:11px;padding:12px 13px;background:#fafafa;outline:0;color:#333;line-height:1.3}.hh-compose textarea:focus{border-color:var(--accent);background:#fff}.hh-compose button{min-width:70px;min-height:47px;border:0;border-radius:10px;color:#fff;font-weight:700;background:var(--accent)}.hh-after{display:flex;justify-content:space-between;gap:16px;margin-top:8px;font-size:11px;color:var(--muted)}.hh-aside{padding:7px 0}.hh-aside-block{border:1px solid var(--line);background:#fff;border-radius:16px;padding:21px 20px}.hh-aside h2{margin:0;font-size:18px;color:var(--head)}.hh-aside p{color:var(--muted);font-size:13px;line-height:1.65}.hh-links{display:flex;flex-direction:column;gap:10px;padding-top:9px}.hh-links a{display:block;border:1px solid var(--line);border-radius:9px;padding:11px 12px;color:var(--accent);font-size:13px;font-weight:600}.hh-links a:hover{background:var(--accent-light)}.hh-safety{font-size:12px;line-height:1.65;margin-top:20px;padding:0 9px}.hh footer,.hh>footer{color:#888;text-align:center;font-size:11px;padding:15px 12px;border-top:1px solid var(--line)}@media(max-width:940px){.hh-main{grid-template-columns:1fr;max-width:740px;padding:14px}.hh-panel{height:calc(100dvh - 138px);min-height:450px}.hh-aside{padding:5px 8px}.hh-aside-block{padding:14px 15px}.hh-links{flex-direction:row;flex-wrap:wrap;gap:7px}.hh-links a{padding:8px 9px}.hh-header{padding:0 18px;height:63px}.hh-header-right{font-size:11px}}@media(max-width:540px){.hh-main{padding:0;gap:0}.hh-panel{border:0;border-radius:0;height:calc(100dvh - 103px);min-height:0}.hh-header{height:54px;padding:0 12px}.hh-header-right{max-width:120px;text-align:right}.hh-panel-top{padding:12px;gap:9px}.hh-photo{width:40px;height:40px;font-size:22px;border-radius:14px}.hh-panel-copy h1{font-size:15px}.hh-panel-copy p{font-size:11px}.hh-live{font-size:10px;padding:4px 7px}.hh-messages{padding:14px 12px}.hh-quick{padding:8px 10px 0}.hh-bottom{padding:9px 10px calc(11px + env(safe-area-inset-bottom,0px))}.hh-msg{max-width:88%}.hh-aside{display:none}.hh>footer{padding:8px 5px;font-size:10px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* OWNER R551: use the original HAGONA wordmark on a neutral field for contrast. */
html[data-hh-brand=hagona] .hh-header{background:#fff;border-bottom:1px solid #f0e8e8;color:#5f2026}
html[data-hh-brand=hagona] .hh-header-right{color:#73333a}
.hh-logo img{width:210px;height:auto;max-height:53px;object-fit:contain;display:block}
.hh-logo img[hidden],.hh-logo [hidden]{display:none!important}
html[data-hh-brand=hagona] .hh-logo{color:#a91e23;letter-spacing:0}
.hh-more{border-bottom:1px solid var(--line);background:#fff;flex-shrink:0;max-height:202px;overflow-y:auto}
.hh-more>summary{padding:8px 19px;color:var(--accent);font-weight:650;font-size:12px;cursor:pointer;list-style:none}
.hh-more>summary::-webkit-details-marker{display:none}
.hh-more>summary::after{content:"⌄";font-size:15px;margin-left:7px}
.hh-more[open]>summary::after{content:"⌃"}
.hh-more-options{padding:0 15px 13px;display:flex;gap:7px;flex-wrap:wrap}
.hh-more-options button{background:var(--accent-light);border:1px solid var(--line);color:var(--head);padding:7px 10px;
 border-radius:15px;font-size:12px;line-height:1.2;cursor:pointer}
.hh-more-options button:hover,.hh-more-options button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:540px){
 .hh-logo img{width:163px;max-height:41px}
 .hh-more{max-height:170px}
 .hh-more>summary{padding:7px 12px;font-size:11px}
 .hh-more-options{padding:0 10px 10px;gap:6px}
 .hh-more-options button{font-size:11px;padding:6px 8px}
}

/* R552: minimum copy/whitespace, user-oriented conversation only. */
.hh-header{justify-content:flex-start}
.hh-panel-top{padding:12px 16px;gap:8px}
.hh-panel-copy h1{font-size:16px}
.hh-live.ready{display:none}
.hh-quick[hidden],.hh-after[hidden],.hh-after [hidden]{display:none!important}
.hh-quick{padding-top:8px}
.hh-welcome{padding:10px}
.hh-welcome-icon{font-size:28px;margin-bottom:9px}
.hh-welcome strong{font-size:16px}
.hh-welcome p{font-size:13px;line-height:1.4}
.hh-msg{line-height:1.48;padding:10px 12px}
.hh-msg .hh-author{font-size:10px;margin-bottom:3px}
.hh-consent{font-size:11px}
.hh-after{margin-top:6px}
@media(max-width:940px){
 .hh-panel{height:calc(100dvh - 90px)}
}
@media(max-width:540px){
 .hh-panel{height:calc(100dvh - 54px)}
 .hh-panel-top{padding:8px 12px}
 .hh-panel-copy h1{font-size:15px}
 .hh-welcome{padding:10px 5px}
 .hh-more{max-height:170px}
 .hh-messages{padding:12px}
 .hh-bottom{padding:7px 10px calc(8px + env(safe-area-inset-bottom,0px))}
}

/* R553 optional-name-first and graduated existing Gmail OTP challenge, scoped to one chat surface. */
.hh-name-label{display:block;font-size:12px;color:var(--head);font-weight:650;margin:12px 0 5px}
.hh-name-input{width:min(100%,300px);padding:10px 12px;border:1px solid var(--line);border-radius:10px;
 background:#fff;color:var(--head);font-size:15px}
.hh-name-input:focus{outline:2px solid var(--accent);outline-offset:1px}
.hh-name-helper{font-size:11px;line-height:1.4;color:var(--muted);margin:6px 0 0}
.hh-identity-panel{flex-shrink:0;max-height:48vh;overflow-y:auto;padding:11px 16px;border-top:1px solid var(--line);background:#fff}
.hh-identity-panel[hidden]{display:none!important}
.hh-identity-panel h2{font-size:16px;font-weight:750;color:var(--head);margin:0 0 5px}
.hh-identity-panel p{font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 9px}
.hh-identity-panel label{display:block;color:var(--head);font-size:12px;margin:7px 0 3px}
.hh-identity-panel input:not([type=checkbox]),.hh-identity-panel select{width:100%;background:#fff;
 border:1px solid var(--line);border-radius:9px;padding:9px 10px;font-size:13px;color:var(--head)}
.hh-identity-panel input[hidden],.hh-identity-panel label[hidden]{display:none!important}
.hh-identity-panel .hh-identity-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:9px}
.hh-identity-panel button{border:0;background:var(--accent);color:white;font-weight:700;font-size:12px;
 border-radius:9px;padding:10px 13px;cursor:pointer}
.hh-identity-panel button[hidden]{display:none!important}
.hh-identity-panel button:disabled{opacity:.5;cursor:not-allowed}
.hh-identity-panel #hh-account-consent-wrap{display:flex;gap:6px;align-items:flex-start;margin-top:8px}
.hh-identity-panel #hh-account-consent-wrap[hidden]{display:none!important}
.hh-identity-panel #hh-account-consent{margin-top:3px}
.hh-identity-panel #hh-identity-status{margin-top:6px;margin-bottom:0}
@media(max-width:540px){.hh-identity-panel{max-height:43dvh;padding:10px 12px}.hh-name-input{max-width:100%}}

/* R556 narrow OTP UX only: reuse existing minimal identity panel. */
#hh-identity-resend{background:transparent;color:var(--accent);border:1px solid var(--line);box-shadow:none}#hh-identity-resend:disabled{opacity:.58}

/* R563 links and gated media: no new controls when Core upload is disabled */
.hh-msg-text{white-space:pre-wrap;overflow-wrap:anywhere}.hh-safe-link{color:inherit;overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:2px}.hh-safe-link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.hh-attach{display:grid;place-items:center;min-width:38px;min-height:46px;cursor:pointer;background:#f7f7f7;border:1px solid var(--line);border-radius:12px;color:var(--accent);font-size:23px}.hh-attach[hidden]{display:none}.hh-attach-status{color:var(--muted);font-size:12px;margin:4px 0 0}.hh-attach-status:empty{display:none}.hh-media{display:block;margin-top:8px;max-width:100%;font-size:12px}.hh-media-content{max-width:min(100%,380px);max-height:350px;border-radius:9px;object-fit:contain}

/* R578 opt-in same-device conversation recovery; no persistent raw chat in browser. */
.hh-remember-wrap{padding:5px 0 8px}.hh-remember{display:inline-flex;align-items:center;gap:8px;font-size:12px;line-height:1.45;color:var(--muted)}.hh-remember input{min-width:16px;min-height:16px;accent-color:var(--accent)}#hh-forget-device{display:inline-flex;margin-left:10px;background:transparent;color:var(--accent);border:none;text-decoration:underline;font-size:12px;cursor:pointer;padding:3px 4px}#hh-forget-device[hidden],#hh-remember-wrap[hidden]{display:none}#hh-remember-status{font-size:12px;color:var(--muted);margin:4px 0 0}#hh-remember-status:empty{display:none}

/* R607: accessible review of verified completed work, never product star reviews. */
.hh-staff-review-entry{padding:4px 12px 8px}
.hh-staff-review-entry[hidden],.hh-staff-review-panel[hidden]{display:none}
.hh-staff-review-entry>button{width:100%;padding:10px 12px;border-radius:10px;
 border:1px solid #e7ccc9;color:#92242a;background:#fff8f8;font-size:13px;font-weight:650;
 text-align:center;cursor:pointer}
html[data-brand=hacomax] .hh-staff-review-entry>button{border-color:#aaccbd;
 color:#0b422f;background:#f3faf6}
.hh-staff-review-panel{margin:4px 12px 8px;padding:14px;border:1px solid #ead7d8;
 border-radius:12px;background:#fff;max-height:min(46vh,480px);overflow-y:auto;overscroll-behavior:contain}
.hh-staff-review-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;
 font-weight:700}
.hh-staff-review-heading>button{border:0;background:#f3f3f3;border-radius:8px;
 padding:6px 10px;cursor:pointer}
#hh-staff-review-hint,#hh-staff-review-status{font-size:12px;line-height:1.5;color:#666}
.hh-staff-review-item{margin:9px 0;padding:12px;border:1px solid #e8e2e2;border-radius:10px}
.hh-staff-review-item strong{display:block;font-size:14px;margin-bottom:4px}
.hh-staff-review-item p{margin:4px 0 10px;font-size:12px;color:#666}
.hh-staff-review-stars{display:flex;flex-wrap:wrap;gap:6px}
.hh-staff-review-stars button{font-size:23px;min-width:38px;min-height:38px;
 border:1px solid #e6d9c5;border-radius:7px;background:#fff;color:#a39a8e;cursor:pointer}
.hh-staff-review-stars button[aria-pressed=true]{background:#fff4d6;color:#a56800;border-color:#ecc15f}
.hh-staff-review-item textarea{width:100%;min-height:66px;border-radius:8px;border:1px solid #ddd;
 padding:9px;margin-top:10px;resize:vertical;font-size:13px;line-height:1.4}
.hh-staff-review-submit{border:0;background:#a91e23;color:white;border-radius:8px;
 padding:10px 14px;font-weight:700;margin-top:9px;cursor:pointer}
html[data-brand=hacomax] .hh-staff-review-submit{background:#0b2b22}
.hh-staff-review-submit:disabled{opacity:.48;cursor:not-allowed}
.hh-staff-review-done{background:#f0f8ee;padding:8px;border-radius:8px;color:#2a653b}

.hh-staff-review-entry a{display:block;padding:10px 12px;border-radius:9px;text-align:center;color:#a91e23;border:1px solid #edd3d5;text-decoration:none;font-size:13px;font-weight:750;background:#fff8f8}html[data-hh-brand=hacomax] .hh-staff-review-entry a{color:#0b2b22;border-color:#c9e0d4;background:#f4faf6}
