.chat-layout{display:grid;grid-template-columns:minmax(180px,260px) minmax(0,1fr);gap:20px}.chat-layout:has(#chat-threads[hidden]){grid-template-columns:1fr}.chat-conversation{min-width:0}#chat-threads{max-height:640px;overflow:auto}#chat-threads button{display:block;width:100%;text-align:left;margin-bottom:8px}#chat-threads span,#chat-threads small{display:block;overflow-wrap:anywhere;font-size:.85rem}#chat-history{height:min(52vh,540px);min-height:220px;overflow:auto;overscroll-behavior:contain;padding:12px;background:#ece7dc;border-radius:12px}.chat-message{background:#fffdf7;border-radius:12px;padding:12px;margin:0 12% 12px 0;overflow-wrap:anywhere}.chat-message.chat-own{margin:0 0 12px 12%;background:#e3d4ad}.chat-message header{font-size:.8rem;font-weight:bold}.chat-message p{white-space:pre-wrap;margin:8px 0}.chat-message time{display:block;font-size:.72rem;opacity:.7;margin-top:6px}.chat-photo{border:0;padding:0;background:none;max-width:100%;cursor:zoom-in}.chat-photo img{display:block;max-width:100%;max-height:280px;border-radius:8px}#chat-form textarea{width:100%;box-sizing:border-box;resize:vertical}#chat-form label{display:block;margin-top:12px}.chat-attach input{max-width:100%;display:block}#chat-photo-preview img{max-width:160px;max-height:120px}.chat-image-dialog,.arrival-dialog{max-width:min(92vw,760px);max-height:90vh;overflow:auto;border:1px solid #c2a76e;border-radius:16px;background:#f6f2e7;padding:20px}.chat-image-dialog img,.arrival-dialog video{max-width:100%;max-height:72vh;display:block;margin:12px auto}.arrival-dialog video{width:100%;background:#171717}.chat-image-dialog button,.arrival-dialog button{margin-top:12px}#chat-error{color:#8f2727}#chat-error:empty{display:none}@media(max-width:650px){.chat-layout{grid-template-columns:1fr}#chat-threads{max-height:160px}.chat-message{margin-right:5%}.chat-message.chat-own{margin-left:5%}.chat-image-dialog,.arrival-dialog{padding:14px;width:92vw;box-sizing:border-box}}

/* Full-page studio information, one close control, own scrolling content. */
#studio-card{box-sizing:border-box;width:min(720px,calc(100% - 24px));max-width:720px;max-height:90dvh;padding:0;border:1px solid #c4ab74;border-radius:22px;background:#f7f4ec;color:#252219;overflow:auto}
#studio-card .sc-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;background:#f7f4ec;border-bottom:1px solid #ded4be}
#studio-card h2{margin:0;font-size:22px}
#studio-card .sc-close{width:44px;height:44px;padding:0;flex-shrink:0;border:0;border-radius:12px;background:#e8dec8;color:#252219;font-size:26px}
#studio-card .sc-content{padding:24px}
#studio-card .sc-intro{margin:0 0 22px;font-size:20px;line-height:1.5}
#studio-card .sc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#studio-card figure{margin:0;overflow:hidden;border:1px solid #ded4be;border-radius:14px;background:#fffdf8}
#studio-card figure img{display:block;width:100%;aspect-ratio:4/3;height:auto;object-fit:cover;opacity:1;filter:none}
#studio-card figcaption{padding:14px;font-size:17px;font-weight:600}
#studio-card figcaption span{display:block;margin-top:4px;font-size:14px;font-weight:400;color:#706957}
#studio-card .sc-contact{margin-top:24px;padding:20px;border-radius:16px;background:#eae0c9}
#studio-card .sc-contact p{margin:12px 0 0;font-size:15px;line-height:1.5}
#studio-card a.sc-primary{background:#c4ab74;border-color:#c4ab74;font-weight:600;width:100%}
#studio-card .sc-social{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.heroart[data-studio-card]{pointer-events:auto;cursor:pointer}
@media(max-width:540px){#studio-card .sc-head{padding:14px 18px}
#studio-card .sc-content{padding:18px}
#studio-card h2{font-size:19px}
#studio-card .sc-intro{font-size:18px}
#studio-card .sc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
#studio-card{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100vh;height:100dvh;max-height:none;border:0;border-radius:0;overflow:hidden}
#studio-card[open]{display:flex;flex-direction:column}
#studio-card .sc-head{position:static;height:auto;min-height:72px;flex-shrink:0;padding-top:max(14px,env(safe-area-inset-top))}
#studio-card .sc-content{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;width:100%;max-width:760px;align-self:center;box-sizing:border-box;padding-bottom:max(24px,env(safe-area-inset-bottom))}
#studio-card .sc-head h2{font-family:inherit}
body:has(#studio-card[open]){overflow:hidden}
#studio-card .sc-close{cursor:pointer}
#studio-card .sc-close:focus-visible{outline:2px solid #967239;outline-offset:3px}
/* Explicit styling for newly generated controls, including Mobile Safari. */
[data-credit-refund-user],.arrival-dialog button{appearance:none;-webkit-appearance:none;font:inherit;cursor:pointer;border:1px solid #c4ab74;border-radius:10px;padding:12px 16px;min-height:44px;background:#c4ab74;color:#252219;text-decoration:none}
[data-credit-refund-user]{margin-top:12px;background:#f7f3ea;color:#635235;border-color:#d7c9af}
.arrival-dialog button.secondary{background:#f7f3ea;color:#635235;border-color:#d7c9af}
.arrival-dialog{box-sizing:border-box;width:min(94vw,480px);max-width:none;height:min(760px,calc(100vh - 24px));height:min(760px,calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));max-height:none;overflow:hidden;padding:14px;border-radius:16px}
.arrival-dialog[open]{display:flex;flex-direction:column;gap:10px}
.arrival-heading{flex:none;height:auto;display:block;padding:0;background:transparent;border:0}
.arrival-heading h2{margin:0;font-size:18px}
.arrival-heading p{margin:4px 0 0;font-size:13px}
.arrival-player{flex:1;min-height:0;display:flex;justify-content:center;overflow:hidden;border-radius:10px;background:#171717}
.arrival-dialog .arrival-player video{width:100%;height:100%;min-height:0;max-height:none;object-fit:contain;display:block;margin:0;background:#171717}
.arrival-controls{flex:none;display:flex;align-items:center;gap:10px}
.arrival-dialog button{margin:0;flex-shrink:0;font-size:14px;padding:10px 12px}
.arrival-seek-label{flex:1;min-width:0;margin:0;font-size:0}
.arrival-seek{display:block;width:100%;height:32px;margin:0;padding:0;accent-color:#a58242}
.arrival-time{font-size:12px;font-variant-numeric:tabular-nums}
.arrival-actions{flex:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.arrival-actions form{margin:0;max-width:none;display:flex}
.arrival-actions button{width:100%;min-width:0;white-space:normal}
.arrival-error{flex:none;margin:0;font-size:12px;color:#8f2727}
@media(max-height:550px){.arrival-dialog{padding:10px;gap:6px}.arrival-heading h2{font-size:15px}.arrival-heading p{font-size:12px}.arrival-dialog button{min-height:40px;padding:6px 10px}}


/* Studio contact links share one aligned button system. */
#studio-card .sc-link{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:48px;padding:12px 16px;border:1px solid #c4ab74;border-radius:10px;background:#f7f4ec;color:#665331;font:inherit;font-weight:600;line-height:1.4;text-align:center;text-decoration:none;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
#studio-card .sc-link.sc-primary{width:100%;background:#c4ab74;color:#252219}
#studio-card .sc-contact{display:grid;gap:12px}
#studio-card .sc-contact p{margin:0}
#studio-card .sc-social{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
#studio-card .sc-social .sc-link{width:100%;height:100%}
#studio-card .sc-link:focus-visible{outline:2px solid #967239;outline-offset:3px}
@media(max-width:360px){#studio-card .sc-social{grid-template-columns:1fr}}

/* The client can choose Telegram above the existing on-site conversation. */
#messages-panel .chat-telegram{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;margin:0 0 18px;border:1px solid #c4ab74;border-radius:12px;background:#eae0c9;color:#3c321e;font:inherit;text-decoration:none}
#messages-panel .chat-telegram:focus-visible{outline:2px solid #967239;outline-offset:3px}
