.chat-details-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-block:1rem}
.chat-details-header #chart-status{padding:0;font-size:.85rem;flex:1;min-width:160px}
.chat-details-header #chart-status p{margin:0}
.chat-details-header button{font-size:.8rem;min-height:44px;white-space:normal}
.birth-card{flex-shrink:0;width:100%;box-sizing:border-box;padding:1rem;white-space:normal}
.birth-card h2{font-size:1.3rem;margin-top:0}
.birth-card input,.birth-card select{box-sizing:border-box;max-width:100%;min-width:0;width:100%}
.birth-card .check input{width:22px}
.birth-card label{margin-top:.65rem}
.birth-card .check label{margin:0}
.birth-card .btn{width:100%;min-height:48px}
.birth-place{position:relative}
.birth-card .city-list{overflow-wrap:anywhere}
.birth-card .notice:empty,.birth-card .hint:empty{display:none}
.chat-box{padding-top:.5rem}
#chat-messages{display:flex;flex-direction:column;gap:1.25rem;flex-shrink:0}

/* Keep supporting text in page flow and reserve space for the composer. */
.chat-support{margin-block:1rem}
@media (max-width:719px){
  .chat-box{height:auto;min-height:0;overflow:visible;overscroll-behavior-y:auto;padding-block:.5rem 1rem}
  .chat-form{background:#f7f2e8;-webkit-backdrop-filter:none;backdrop-filter:none;padding-top:.5rem}
  .chat-form .check{min-height:0;padding-bottom:.35rem}
  .chat-form .hint{margin:.35rem 0 0}
  .chat-row textarea{height:56px;min-height:56px;max-height:96px;padding:.5rem .75rem}
  .chat-page .chips{flex-wrap:wrap;overflow:visible;scrollbar-width:none}
  .chat-page .chips button{max-width:100%;flex-shrink:1;overflow-wrap:anywhere}
  .msg,.birth-card{scroll-margin-top:calc(var(--site-header-height,64px) + 12px);scroll-margin-bottom:calc(var(--chat-composer-height,180px) + 12px)}
  .birth-card :is(input,button,select){scroll-margin-top:calc(var(--site-header-height,64px) + 12px);scroll-margin-bottom:calc(var(--chat-composer-height,180px) + 12px)}
}

@media(max-width:719px){
 .chat-box{gap:.75rem;padding-top:.25rem}
 #chat-messages{gap:.85rem}
 .birth-card{padding:.85rem}
 .birth-card h2{font-size:1.2rem;margin-bottom:.5rem}
 .birth-card label{margin-top:.5rem;margin-bottom:.35rem}
 .chat-form{background:var(--surface)}
}

/* Keep the mobile composer available while the birth form stays in page flow. */
@media(max-width:719px){
 body:has(.chat-page){padding-bottom:calc(var(--chat-composer-height,200px) + 1rem)}
 .chat-page .chat-form{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:calc(100% - 2rem);max-width:900px;padding-bottom:max(.75rem,env(safe-area-inset-bottom));border:1px solid var(--border);border-bottom:0;border-radius:var(--radius-md) var(--radius-md) 0 0}
}
