/* A mobile-width inbox on every screen, scoped to the conversation tab. */
body.dm-surface{background:#e9e7e0}
#app.dm-shell{width:100%;max-width:480px;min-height:100vh;min-height:100dvh;margin:0 auto;border:0;border-radius:0;background:#fbf9f3;box-shadow:0 0 40px #253b3210}
#app.dm-shell .page{width:100%;max-width:none;min-height:calc(100dvh - 64px);margin:0;padding:0 20px 110px;animation:none}
#app.dm-shell .app-header{height:64px;padding:0 20px;gap:12px;border-radius:0;background:#fbf9f3;border-bottom:0}
#app.dm-shell .app-header .desktop-nav,#app.dm-shell .brand-divider,#app.dm-shell .brand-sub{display:none}
#app.dm-shell .app-header .brand{gap:8px}
#app.dm-shell .app-header .brand-name{font-size:1.25rem}
#app.dm-shell .app-header .brand-seal{width:32px;height:34px}
#app.dm-shell .header-account{gap:8px;margin-left:auto}
#app.dm-shell .app-header .account-shortcut{min-width:60px;min-height:36px;padding:6px 10px}
#app.dm-shell .mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));left:50%;right:auto;bottom:calc(12px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);width:calc(100% - 32px);max-width:424px;z-index:5;gap:0;padding:8px;border:1px solid #e7e5dc;border-radius:30px;background:#fffefa;box-shadow:0 5px 24px #283a3214;backdrop-filter:blur(12px)}
#app.dm-shell .mobile-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-width:0;min-height:48px;padding:2px;color:#7b8075;font-size:.875rem;line-height:1.3;white-space:nowrap;border-radius:22px}
#app.dm-shell .mobile-nav button.active{color:var(--green);background:#edf0e6;font-weight:700}
#app.dm-shell .mobile-nav svg{width:21px;height:21px}
body.dm-surface .business-footer{max-width:480px;margin:auto;padding:24px 20px 120px;background:#fbf9f3}
body.dm-surface .business-footer span{display:block;margin:0}
.dm-page{width:100%;max-width:100%;margin:0;--dm-accent:#3e5b4e;--dm-avatar-bg:#e3e7dc}
.dm-page.gold,.dm-room-row.gold{--dm-accent:#85704a;--dm-avatar-bg:#efe4cc}
.dm-page.wine,.dm-room-row.wine{--dm-accent:#79565e;--dm-avatar-bg:#ebdfe2}
.dm-page-title{padding:16px 2px 22px}
.dm-page-title .eyebrow{margin:0 0 5px;font-size:.75rem;letter-spacing:.12em;color:#777b70}
.dm-page-title h1{display:flex;gap:10px;align-items:center;font-family:'Noto Sans KR',sans-serif;font-size:1.75rem;letter-spacing:-.04em;margin:0}
.dm-page-title h1 span{font-family:inherit;font-size:1rem;font-weight:500;color:#89917e;letter-spacing:0}
.dm-price{border:1px solid #e4e3d8;border-radius:14px;background:#f0f1e8;padding:15px 16px;margin-bottom:9px}
.dm-price strong{display:flex;align-items:center;gap:8px;font-size:.9375rem;font-weight:600}
.dm-price strong span{padding:3px 9px;border-radius:12px;background:#dfe5d5;font-size:.8125rem;color:#466148}
.dm-price>span{display:block;margin-top:6px;font-size:.8125rem;color:#72796b;line-height:1.6}
.dm-room-list{padding-top:2px}
.dm-room-row{display:flex;align-items:center;gap:13px;width:100%;min-height:130px;padding:23px 0;background:none;border:0;border-bottom:1px solid #e8e6dd;text-align:left;color:var(--ink);--dm-avatar-bg:#e3e7dc}
.dm-room-row:hover{background:#eeeee344}
.dm-avatar{width:64px;height:64px;flex-shrink:0;object-fit:cover;object-position:50% 30%;border-radius:50%;background:var(--dm-avatar-bg,#e3e7dc)}
.dm-room-copy{min-width:0;flex:1}
.dm-room-name{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.dm-room-name strong{font-size:1.125rem;font-weight:700;white-space:nowrap}
.dm-room-name time{flex-shrink:0;font-size:.75rem;font-weight:400;color:#848778}
.dm-room-role{display:block;font-size:.8125rem;color:#7d8175;margin-bottom:7px}
.dm-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:.9375rem;line-height:1.6;color:#5e685e;overflow-wrap:anywhere}
.dm-room-end{display:flex;align-items:center;flex-shrink:0;color:#a7ad9e}
.dm-room-end svg{width:15px;height:18px}
.dm-room-wait{font-weight:500;font-size:.75rem;white-space:nowrap;color:#4b6853}
.dm-account-prompt{text-align:center;padding:26px 0;font-size:.9375rem}
.dm-account-prompt p{margin:0 0 16px;color:var(--muted)}
.dm-account-prompt .button{min-height:46px}
/* An open DM has one scroll area and a composer above the system keyboard. */
body.dm-room-open{overflow:hidden}
body.dm-room-open .business-footer{display:none}
#app.dm-shell[data-dm-layout='room']{position:fixed;top:var(--dm-viewport-top,0px);left:50%;transform:translateX(-50%);height:100vh;height:var(--dm-viewport-height,100dvh);min-height:0;display:flex;flex-direction:column;overflow:hidden}
#app.dm-shell[data-dm-layout='room']>.app-header,#app.dm-shell[data-dm-layout='room']>.mobile-nav{display:none}
#app.dm-shell[data-dm-layout='room']>.page{display:flex;flex:1;min-height:0;height:100%;padding:0;overflow:hidden}
.dm-conversation{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#f1f0e8}
.dm-thread-header{flex-shrink:0;display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top,0px)) 16px 10px 6px;min-height:72px;background:#fbf9f3;border-bottom:1px solid #e3e3d8}
.dm-back{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex-shrink:0;border-radius:50%;padding:0}
.dm-back:hover{background:#eeeee4}
.dm-thread-header .dm-avatar{width:42px;height:42px}
.dm-thread-person{min-width:0}
.dm-thread-header h1{font-family:'Noto Sans KR',sans-serif;font-size:1.0625rem;letter-spacing:-.03em;margin:0 0 3px;font-weight:700}
.dm-thread-header p{margin:0;font-size:.8125rem;line-height:1.4;color:#7a8070;overflow-wrap:anywhere}
.dm-status-bar{display:flex;align-items:center;gap:7px;padding:8px 12px;border-bottom:1px solid #e3e3d8;background:#fbf9f3;font-size:.6875rem;line-height:1.4;flex-shrink:0;flex-wrap:wrap}
.dm-connection{display:flex;align-items:center;gap:5px;color:#52694d;white-space:nowrap}
.dm-connection i{width:6px;height:6px;border-radius:50%;background:#598c69}
.dm-connection.is-offline i{background:#a1844d}
.dm-question-balance{color:#67735e;white-space:nowrap}
.dm-balances{display:flex;gap:5px;margin-left:auto}
.dm-balances button{display:flex;align-items:center;gap:4px;border:1px solid #ded9c9;border-radius:20px;background:#f8f2df;color:#76603b;padding:4px 7px;min-height:30px;font-size:.75rem;white-space:nowrap}
.dm-balances button+button{color:#536851;background:#edf0e6;border-color:#d8dece}
.dm-message-target{display:block;text-align:right;color:#5c705a;margin-bottom:5px;font-size:.6875rem;line-height:1.4}
.dm-thread{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:24px 16px;scrollbar-gutter:stable;display:flex;flex-direction:column;gap:22px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.dm-thread>*{flex-shrink:0}
.dm-message{max-width:90%;display:flex;gap:8px;align-items:flex-start;align-self:flex-start;min-width:0}
.dm-message>.dm-avatar{width:30px;height:30px;margin-top:1px}
.dm-message-body{min-width:0}
.dm-message-name{display:block;margin:0 0 7px;font-size:.8125rem;color:#6c7365}
.dm-message p{margin:0;border:1px solid #e4e5db;background:#fffef9;padding:13px 15px;border-radius:3px 16px 16px 16px;font-size:1rem;line-height:1.75;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere;box-shadow:0 2px 3px #263c3703}
.dm-message-time{display:block;margin-top:6px;color:#888d80;font-size:.75rem;line-height:1.3}
.dm-message.user{align-self:flex-end;max-width:82%}
.dm-message.user p{background:var(--dm-accent);border-color:var(--dm-accent);color:#fffefa;border-radius:16px 3px 16px 16px}
.dm-message.user .dm-message-time{text-align:right}
.dm-starters{display:flex;flex-direction:column;align-items:flex-start;gap:9px;margin-left:38px}
.dm-starters button{max-width:100%;display:flex;align-items:center;gap:8px;padding:12px 14px;min-height:44px;border:1px solid #d3d9ca;border-radius:13px;background:#fafbf5;color:#5b6c54;text-align:left;font-size:.875rem;line-height:1.6;word-break:keep-all;overflow-wrap:anywhere}
.dm-starters button svg{width:15px;height:16px}
.dm-starters button:hover{border-color:#9eae93;background:#f2f5eb}
.dm-typing p{display:flex;align-items:center;gap:10px;min-height:46px;font-size:.875rem;color:#66735c}
.dm-typing-dots{display:inline-flex;align-items:center;gap:4px}
.dm-typing-dots i{width:5px;height:5px;background:currentColor;border-radius:50%;animation:dm-typing 1.2s ease-in-out infinite}
.dm-typing-dots i:nth-child(2){animation-delay:.16s}.dm-typing-dots i:nth-child(3){animation-delay:.32s}
@keyframes dm-typing{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.dm-typing-dots i{animation:none;opacity:.65}}
.dm-compose{flex-shrink:0;max-height:50%;overflow-y:auto;padding:11px 16px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid #e1e3d6;background:#fbf9f3}
.dm-compose-meta{margin:0 0 9px;font-size:.8125rem;line-height:1.5;color:#66735c}
.dm-suggestions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0 0 9px}
.dm-suggestions button{display:flex;justify-content:space-between;align-items:center;gap:4px;padding:8px 10px;min-height:48px;border:1px solid #dde1d5;border-radius:12px;background:#fffef9;color:#52674d;font-size:.75rem;line-height:1.5;text-align:left;word-break:keep-all;overflow-wrap:anywhere}
.dm-suggestions button svg{width:13px;height:13px;flex-shrink:0}
.dm-target-row{display:flex;align-items:center;gap:7px;margin:0 0 8px;min-width:0}
.dm-target-row label{font-size:.6875rem;color:#687462;white-space:nowrap}
.dm-target-row select{min-width:0;flex:1;margin:0;padding:6px 24px 6px 9px;min-height:34px;max-width:100%;border:1px solid #dce0d3;border-radius:16px;background-color:#edf0e6;color:#4f6149;font-size:.75rem}
.dm-target-row .text-button{flex-shrink:0;font-size:.75rem;white-space:nowrap;padding:4px 0;min-height:34px;color:#5c6b51}
.dm-target-row :disabled{opacity:.55}
.dm-compose-row{display:flex;align-items:flex-end;gap:9px;min-width:0}
.dm-compose-row textarea{display:block;width:0;flex:1;min-width:0;min-height:46px;max-height:132px;resize:none;margin:0;border:1px solid #d9ddcf;border-radius:16px;padding:11px 13px;font-size:1rem;line-height:1.5;background:#fffef9;scroll-padding-block:12px}
.dm-compose-row textarea:focus{outline:2px solid #b1bca6;outline-offset:0}
.dm-compose-row textarea:disabled{background:#f0f1e9;opacity:.75}
.dm-send{display:flex;align-items:center;justify-content:center;width:46px;min-width:46px;height:46px;padding:0;background:var(--dm-accent);color:#fffefa;border-radius:50%;font-size:1.5rem;font-weight:700}
.dm-send:disabled{opacity:.4}
.dm-input-hint{display:block;margin:7px 1px 0;color:#8a8e81;font-size:.75rem;line-height:1.4}
.dm-error{flex-shrink:0;max-height:35%;overflow-y:auto;background:#fbf9f3;padding:0 16px 10px}
.dm-error .error{margin:10px 0;overflow-wrap:anywhere}
.dm-conversation>.dm-account-prompt{flex-shrink:0;margin:0;background:#fbf9f3;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px));border-top:1px solid #e1e3d6}
.dm-older{align-self:center;font-size:.875rem;min-height:44px}
#app.dm-shell .app-notice{max-width:calc(100% - 32px);width:400px;left:50%;right:auto;transform:translateX(-50%)}
@media(max-width:359px){#app.dm-shell .page{padding-left:15px;padding-right:15px}.dm-room-row{gap:10px}.dm-room-row>.dm-avatar{width:54px;height:54px}.dm-room-name{flex-wrap:wrap;gap:2px}.dm-room-role{font-size:.75rem}.dm-room-end{display:none}.dm-thread{padding-inline:12px}.dm-message{max-width:94%}.dm-compose{padding-inline:12px}}
@media(max-height:480px){.dm-thread-header{min-height:56px;padding-top:6px;padding-bottom:6px}.dm-thread-header .dm-avatar{width:36px;height:36px}.dm-compose{padding-top:7px;padding-bottom:7px}.dm-input-hint{display:none}.dm-thread{padding-top:16px;padding-bottom:16px}}
